@Override
		public void run() {
			// TODO Auto-generated method stub
			dbConnClass database = new dbConnClass(addressField.getText(), portField.getText(), "customer", userField.getText(), passwordField.getText());
			database.connectDB();
			ReadFileClass words = new ReadFileClass(field.getText());
			FindUrlClass findurl = new FindUrlClass();
			
			//ļйؼʣعؼarraylink
			ArrayList keywords = words.getKeyWords();
			
			//ؼʱڶӦ5Ĺؼ ӽkeywords
			ResultSet rs = null;
			try {
				rs = database.selectDBResult("select * from keywords where linkcount < 5");
				int j = rs.getRow();
				while (rs.previous()){
					String name = rs.getString("keyword");
					keywords.add(name);
				}
			} catch (SQLException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}
			
			int keywordCount = keywords.size();
			//ظؼ
			HashSet keywordSet = new HashSet(keywords);
			keywords.clear();
			keywords.addAll(keywordSet);
			//ؼʸܴ
			totalKeywords.setText(totalKeywords.getText().replace("0", String.valueOf(keywordCount)));
			
			ArrayList urlList = new ArrayList();
			//ѭùؼ
			int mount = 0;
			for (int i = 0 ;i < keywordCount; i++){
				//ѵǰڲѯĹؼֵǰؼı
				nowKeywords.setText(nowKeywords.getText().replace(String.valueOf(i), String.valueOf(i+1)));
				//
				findurl.setKeyword((String)keywords.get(i));
				
				try {
					//ʼв
					findurl.manageGetLink();
				} catch (MalformedURLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				} catch (Throwable e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				
				//ѵǰؼʲ鵽ӽarraylist
				urlList.addAll(findurl.getUrlList());
				//
				totalLinks.setText(totalLinks.getText().replace(String.valueOf(mount), String.valueOf(urlList.size())));
				mount = urlList.size();
				//ӹؼ--hashmap
				words.addKeyWordValue((String)keywords.get(i), findurl.getUrlList().size());
			}
			
			HashMap keywordValue = new HashMap();
			keywordValue.putAll(words.getKeyWordValue());
			Set keys = keywordValue.keySet();
			java.util.Iterator keyIter = keys.iterator();
			
			//ѹؼʺͲѯӽݿ
			while(keyIter.hasNext()){
				 String nextkey = (String) keyIter.next();
				 int linkcount =Integer.parseInt(keywordValue.get(nextkey).toString());
				 try {
					if(database.selectDB("select id from keywords where keyword = '" + nextkey + "'") > 0) {
						 database.updateDB("update keywords set linkcount = " + linkcount + " where keyword = '" + nextkey + "'");
					 } else {
						 database.updateDB("insert into keywords (keyword, linkcount) values ('" + nextkey + "', " + linkcount +")");
					 }
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			nowKeywords.setText("ɣ");
			////////////////////////Ӹ////////////////////////////////////
			
			//Ƿظ   ɾ
			HashSet hSet = new HashSet(urlList);
			urlList.clear();
			urlList.addAll(hSet);
			//ݿǷظ   ɾ
			for(int i = 0 ;i < urlList.size(); i++) {
				database.setSql("select id from info where website = 'http://"+(String)urlList.get(i) + "'");
				try {
					database.connectDB();
					if(database.selectDB() != 0) {
						urlList.remove(i);
						i--;
					}
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			totalLinks.setText(totalLinks.getText().replace(String.valueOf(mount), String.valueOf(urlList.size())));
			SearchWebInfoClass webinfo = new SearchWebInfoClass("");
			for(int i = 0 ;i < urlList.size() ; i++) {
				nowLinks.setText(nowLinks.getText().replace(String.valueOf(i), String.valueOf(i+1)));
				webinfo.setWebSite((String)urlList.get(i));
				try {
					database.setSql(webinfo.createSql());
					//System.out.println(database.getSql());
					database.updateDB();
				} catch (Throwable e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			nowLinks.setText("ɣ");
		}