201113725 六、發明說明 【發明所屬之技術領域】 本發明關於搜索技術領域,特別關於一種實現圖片搜 索的方法及網站伺服器。 【先前技術】 網際網路網站提供的圖片搜索服務,可以通過搜索程 式,向用戶提供網際網路上相關的圖片資料。 現有技術中的圖片搜索,如各大網站提供的那樣,是 由用戶在搜索框內輸入搜索文字並提交到網站的搜索引擎 後,搜索引擎在網路爬蟲抓取到的海量圖片中,以用戶提 交的搜索文字作爲關鍵字搜索附加在這些海量圖片中的文 字,典型的如搜索圖片的檔案名或圖片檔屬性中附屬欄位 上的文字。進而,伺服器將找到的檔案名或檔屬性附屬欄 位與關鍵字匹配的圖片返回給用戶。 可見,事實上這類圖片搜索本質還是基於文本內容的 搜索。而這種方式搜索到的圖片’與用戶真正想搜索的圖 片有時相去甚遠。例如’同一關鍵字對應的圖片搜索結果 中,用戶越來越多的意圖搜索其中具有某一特定形狀的圖 片,而按照現有技術的搜索力β @於返回的搜索結果中 包含了諸多形狀的圖片’因此其中包含有大量並非用戶言式 圖搜索的圖片’那® ’彳足β p自勺@點’這種方式;相應纟也降 低了搜索結果的準確性’而不能滿足用戶的搜索需求。 201113725 【發明內容】 本發明實施例的目的是提供一種實現圖片搜索的方法 及網站伺服器,以實現搜索結果符合用戶的搜索需求。 爲解決上述技術問題,本發明一實施例提供的一種實 現圖片搜索的方法是這樣實現的: 一種實現圖片搜索的方法,其特徵在於,在圖片資料 庫中預先根據關鍵字將對應的圖片按照圖片中物體的形狀 進行分類’並爲每一形狀類型選定樣本圖片; 當伺服器接收到用戶端發來的圖片搜索請求之後,該 方法包括: 伺服器在圖片資料庫中查找所述搜索請求中的關鍵字 對應的預先分類的幾種形狀類型的樣本圖片,並將查找到 的幾種形狀類型的樣本圖片返回給用戶端; 伺服器接收用戶端選定的某種形狀類型的樣本圖片, 並在圖片資料庫中搜索對應所述關鍵字的且與所述選定樣 本圖片的特徵値滿足預定要求的圖片; 伺服器將所述搜索到的圖片返回給用戶端。 由上述第一實施例可見,當伺服器接收到用戶端發來 的圖片搜索請求之後,伺服器在圖片資料庫中查找所述搜 索請求中的關鍵字對應的預先分類的幾種形狀類型的樣本 圖片,並將查找到的幾種形狀類型的樣本圖片返回給用戶 端;伺服器接收用戶端選定的某種形狀類型的樣本圖片, 並在圖片資料庫中搜索與所述選定樣本圖片的特徵値滿足 預定要求的圖片;伺服器將所述搜索到的圖片返回給用戶 -6 - 201113725 端,可以實現按照用戶意圖來搜索圖片’特別是可以實現 提供用戶搜索關鍵字對應的圖片形狀類型,進而按照用戶 所選擇的形狀類型搜索類似形狀的圖片,從而可以滿足用 戶的搜索需求,提高用戶的體驗。 爲解決上述技術問題,本發明又一實施例提供的一種 實現圖片搜索的方法是這樣實現的: 一種實現圖片搜索的方法,在圖片資料庫中預先根據 關鍵字將對應的圖片按照圖片中物體的形狀進行分類,並 爲每一形狀類型選定樣本圖片; 當伺服器接收到用戶端發來的圖片搜索請求之後,該 方法包括: 伺服器在圖片資料庫中查找所述搜索請求中的關鍵字 對應的預先分類的幾種形狀類型的樣本圖片,並將查找到 的幾種形狀類型的樣本圖片返回給用戶端; 伺服器接收用戶端選定的某種形狀類型的樣本圖片, 並返回與提交的樣本圖片同一或近似形狀類型的圖片資料 庫中的圖片。 由上述第二實施例可見,當伺服器接收到用戶端發來 的圖片搜索請求之後,伺服器在圖片資料庫中查找所述搜 索請求中的關鍵字對應的預先分類的幾種形狀類型的樣本 圖片’並將查找到的幾種形狀類型的樣本圖片返回給用戶 端;伺服器接收用戶端選定的某種形狀類型的樣本圖片, 並返回與提父的樣本圖片同一或近似形狀類型的圖片資料 庫中的圖片’這樣’可以實現按照用戶意圖來返回搜索的 201113725 圖片,特別是可以實現提供用戶搜索關鍵字對應的圖片形 狀類型,進而按照用戶所選擇的形狀類型返回搜索的類似 形狀的圖片,從而可以滿足用戶的搜索需求,提高用戶的 體驗。 爲解決上述技術問題,本發明第三實施例提供的一種 實現圖片搜索的方法是這樣實現的: 一種實現圖片搜索的方法,包括: 伺服器接收到用戶端發來的圖片搜索請求; 伺服器在圖片資料庫中查找所述搜索請求中的關鍵字 對應的圖片; 伺服器將所述查找到的圖片按照圖片中物體的形狀進 行分類,並爲每一形狀類型選定樣本圖片,進而將預定個 數的形狀類型的樣本圖片返回給用戶端; 伺服器接收用戶端選定的某種形狀類型的樣本圖片, 並在圖片資料庫中搜索對應所述關鍵字的且與所述選定樣 本圖片的特徵値滿足預定要求的圖片; 伺服器將所述搜索到的圖片返回給用戶端。 由上述第三實施例可見,伺服器接收到用戶端發來的 圖片搜索請求;伺服器在圖片資料庫中查找所述搜索請求 中的關鍵字對應的圖片:伺服器將所述搜索到的圖片按照 圖片中物體的形狀進行分類,並爲每一形狀類型選定樣本 圖片,進而將預定個數的形狀類型的樣本圖片返回給用戶 端;伺服器接收用戶端選定的某種形狀類型的樣本圖片, 並在圖片資料庫中搜索與所述選定樣本圖片的特徵値滿足 -8- 201113725 預定要求的圖片;伺服器將所述查找到的圖片返回給用戶 端,這樣,可以實現按照用戶意圖來搜索圖片’特別是可 以提供用戶搜索關鍵字對應的圖片形狀類型’進而按照用 戶所選擇的形狀類型搜索類似形狀的圖片’從而可以滿足 用戶的搜索需求,提高用戶的體驗。 爲解決上述技術問題,本發明第三實施例提供的一種 實現圖片搜索的方法是這樣實現的: 一種實現圖片搜索的方法,包括: 伺服器接收到用戶端發來的圖片搜索請求; 伺服器在圖片資料庫中查找所述搜索請求中的關鍵字 對應的圖片; 伺服器將所述查找到的圖片按照圖片中物體的形狀進 行分類,並爲每一形狀類型選定樣本圖片,進而將預定個 數的形狀類型的樣本圖片返回給用戶端; 伺服器接收用戶端選定的某種形狀類型的樣本圖片, 並將圖片資料庫中該形狀類型的圖片返回給用戶端。 由上述第四實施例可見,伺服器接收到用戶端發來的 圖片搜索請求:伺服器在圖片資料庫中查找所述搜索請求 中的關鍵字對應的圖片;伺服器將所述查找到的圖片按照 圖片中物體的形狀進行分類,並爲每一形狀類型選定樣本 圖片,進而將預定個數的形狀類型的樣本圖片返回給用戶 端;伺服器接收用戶端選定的某種形狀類型的樣本圖片, 並將圖片資料庫中該形狀類型的圖片返回給用戶端,這 樣,可以實現按照用戶意圖來搜索圖片,特別是可以提供 -9 - 201113725 用戶搜索關鍵字對應的圖片形狀類型,進而按照用戶所選 擇的形狀類型返回該形狀的圖片,從而可以滿足用戶的搜 索需求,提高用戶的體驗。 爲解決上述技術問題,本發明提供一種實現圖片搜索 的伺服器第一實施例,是這樣實現的: 一種實現圖片搜索的伺服器,包括: 圖片資料庫,其中存有圖片,對於對應同一關鍵字的 圖片,預先被按照圖片中物體的形狀分類,且每一形狀類 型具有選定的樣本圖片; 搜索請求接收單元,用於接收用戶端發來的圖片搜索 請求; 樣本圖片返回單元,用於在圖片資料庫中査找所述搜 索請求中的關鍵字對應的預先分類的幾種形狀類型的樣本 圖片,並將查找到的幾種形狀類型的樣本圖片返回給用戶 端; 選定圖片接收單元,用於接收用戶端選定的某種形狀 類型的樣本圖片; 搜索單元,用於在圖片資料庫中搜索對應所述關鍵字 的且與所述選定樣本圖片的特徵値滿足預定要求的圖片; 搜索結果返回單元,用於將所述搜索到的圖片返回給 用戶端。 爲解決上述技術問題,本發明提供一種實現圖片搜索 的伺服器第二實施例,是這樣實現的: 一種實現圖片搜索的伺服器,包括: -10- 201113725 圖片資料庫,其中存有圖片,對於對應同一關鍵字的 圖片’預先被按照圖片中物體的形狀分類,且每一形狀類 型具有選定的樣本圖片; 搜索請求接收單元,用於接收用戶端發來的圖片搜索 請求; 樣本圖片返回單元,用於在圖片資料庫中查找所述搜 索請求中的關鍵字對應的預先分類的幾種形狀類型的樣本 圖片,並將查找到的幾種形狀類型的樣本圖片返回給用戶 辆, 選定圖片接收單元,用於接收用戶端選定的某種形狀 類型的樣本圖片; 搜索結果返回單元,用於返回與提交的樣本圖片同一 或近似形狀類型的圖片資料庫中的圖片。 爲解決上述技術問題,本發明提供一種實現圖片搜索 的伺服器第三實施例,是這樣實現的: 一種實現圖片搜索的伺服器,包括: 圖片資料庫,其中存有圖片; 搜索請求接收單元,用於接收用戶端發來的圖片搜索 請求; 查找單元,用於在圖片資料庫查找所述搜索請求中的 關鍵字對應的圖片; 分類單元,用於將所述查找到的圖片按照圖片中物體 的形狀進行分類; 樣本圖片返回單元,用於爲分類單元分類的每一形狀 -11 - 201113725 類型選定樣本圖片,進而將預定個數的形狀類型的樣本圖 片返回給用戶端; 選定圖片接收單元,用於接收用戶端選定的某種形狀 類型的樣本圖片; 搜索單元,用於在圖片資料庫中搜索對應所述關鍵字 的且與所述選定樣本圖片的特徵値滿足預定要求的圖片; 搜索結果返回單元,用於返回搜索到的圖片。 爲解決上述技術問題,本發明提供一種實現圖片搜索 的伺服器第四實施例,是這樣實現的: —種實現圖片搜索的伺服器,包括: 圖片資料庫,其中存有圖片; 搜索請求接收單元,用於接收用戶端發來的圖片搜索 請求; 查找單元’用於在圖片資料庫查找所述搜索請求中的 關鍵字對應的圖片; 分類單元’用於將所述査找到的圖片按照圖片中物體 的形狀進行分類; 樣本圖片返回單兀,用於爲分類單元分類的每一形狀 類型選定樣本圖片’進而將預定個數的形狀類型的樣本圖 片返回給用戶阳}, 選定圖片接收單元’用於接收用戶端選定的某種形狀 類型的樣本圖片; 搜索結果返回單元’用於返回與提交的樣本圖片同一 或近似形狀類型的圖片資料庫中的圖片。 -12- 201113725 【實施方式】 本發明實施例提供一種實現圖片搜索的方法及網站伺 服器。 爲了使本技術領域的人員更好地理解本發明中的技術 方案,下面將結合本發明實施例中的附圖,對本發明實施 例中的技術方案進行清楚、完整地描述,顯然,所描述的 實施例僅僅是本發明一部分實施例,而不是全部的實施 例。基於本發明中的實施例,本領域普通技術人員在沒有 作出創造性勞動前提下所獲得的所有其他實施例,都應當 屬於本發明保護的範圍。 以下介紹本發明實現圖片搜索的方法第一實施例。 爲了實現本發明第一方法實施例中的圖片搜索,網站 伺服器需要在圖片資料庫中預先根據關鍵字將對應的圖片 按照圖片中物體的形狀進行分類。 網站伺服器中具有存儲圖片資料的圖片資料庫,這個 圖片資料庫中存儲的圖片’可以是登陸該網站的用戶上傳 的圖片’也可以是從其他系統中的導入的圖片,還可以是 通過網路爬蟲從海量的網際網路網頁中抓取得到,還可能 以其他方式得到的圖片’再或者是上述幾種來源中的一種 或幾種方式結合而來的圖片,本發明中並不做限定。網路 爬蟲定時抓取網際網路中的海量網頁圖片的技術已是公知 的技術,這裏不再介紹。每個存儲的圖片,還包括圖片的 檔案名以及圖片屬性中附屬的文本內容。圖片的檔案名及 -13- 201113725 圖片屬性中附屬的文本內容,都可以用來表示圖片中特定 的內容。如圖片中顯示內容爲mp3播放器實體的圖片, 該圖片的檔案名和/或圖片屬性中附屬的文本內容,一般 都會包括“ mp3”這一內容。 網站伺服器可以預先從圖片資料庫中提取出一定數量 的具有同一文本關鍵字的圖片,例如將圖片檔案名和/或 圖片屬性中附屬的文本內容中包括“mp3”這一關鍵字的 圖片提取出1000張。需要指出的是,該提取的圖片,可 以是網站伺服器記錄的用戶點擊數量最多的1 000張圖 片,從而可以保證提取出的圖片的典型性。 進而,網站伺服器可以對提取出的圖片按照圖片的形 狀特徵進行分類,例如分爲典型的幾種形狀類型。仍以上 述的mp3圖片爲例,在提取的1 000張關於mp3的圖片 中,可以按照形狀將這1 〇〇〇張圖片分類爲幾種形狀類 型,如可以包括顯示圓形mp3的圖片,顯示菱形mp3的 圖片,顯示方形mp3的圖片,以及顯示長方形mp3的圖 片這幾種類型。 關於將圖片按照形狀類型進行分類,具體的,可以通 過比較圖片的特徵値來實現將圖片按照形狀類型進行分 類。 該特徵値,是將圖像中能夠反映所顯示物體形狀的特 徵通過數學方式提取並表達出來。現有技術中,已有若干 種提取圖像形狀特徵的方案。圖片提取出的特徵値,一般 可以表示爲一定維度的向量,如(P1,P2,...,Pn ),這 •14- 201113725 個η維向量,從而可以用該向量來描述圖像中物體的形狀 特徵。具體的提取方式,可以採取現有的圖像特徵提取方 式,如採用Hough變換等方式的圖像特徵提取,在此不 再介紹。另外,以下簡單介紹一種較優的圖像特徵提取的 方式,可以包括下面步驟: A 1 :從原始圖像中樞出所含物體的圖像; A2 :將所述樞出的圖像用單一顏色爲背景塡充邊 界,並使得塡充後的圖像成爲最小正方形; A3 :將正方形圖像全圖等比縮放爲第一預定大小的 圖像,將縮放後的圖像分割爲第二預定大小的子圖像塊; A4:分別計算子圖像塊水準、豎直、正45°、負45° 9 方向上相鄰圖元的亮度導數,將分別在四個方向導數極値 點的個數、以及位於子圖像塊四個邊界上極値點的總個數 作爲該子圖像塊的特徵向量; A5 :將所有子圖像塊的特徵向量作爲原始圖像的特 徵向量。 上述圖像特徵提取方式’主要利用了圖像中顯示的物 體其邊緣部分與周圍的背景等的圖元亮度差異來找出物體 的邊緣’也就可以提取得到圖像中物體的形狀特徵,從而 可以作爲該圖像提取的特徵。該方式表示的圖像特徵爲— 定維度的向量’如(PI,P2’…’ Pn),這個η維向量, 從而可以用該向量來描述圖像中物體的形狀特徵。 無論何種方式’都可以使得圖片具有表明其所顯示物 體形狀的特徵値。 -15- 201113725 例如,對於上述提取出包含文本“ mp3 ”的圖片,如 最好得到的1 000張圖片,可以由伺服器比較這1 000張圖 片的特徵値,將特徵値相近的圖片劃分爲同一或近似形狀 類型的圖片。具體的,可以設定預定距離,將特徵値之差 在預定距離之內的圖片設定爲同一或近似形狀類型的圖 片。 所述特徵値之差,可以通過對表明特徵値的向量求距 離來獲得。 對於二維平面上的點 A1 ( X 1,y 1 )和 A 2 ( X 2, y2),這兩個點的距離可以由公式如-12)2+(少1-少2)2得到。 而這兩個點 A1和 A2的座標,即(xl,yl)和(x2, y2 ),即可以視爲兩個二維&量。對於三維座標中的點 Bl(xl,yl,zl)和B2(x2,y2,z2),這兩個點的距離可以 由公式^(x\-x2)2 + (^1 -y2)2 + {z\ -z2)2得到。而這兩個點Β 1和Β 2 的座標,即(xl,yl ,ζΐ )和(x2,y2,z2 ) ’即可以視爲兩 個三維向量。類似的,對於兩個n維的向量,這兩個向量 的距離,可以通過公式+ (^2 - Q2f +... + (Pn- Qnf得到, 其中,兩個向量分別爲(PI,P2,…,Pn) ’ (Q 1 ,Q2,... ,Qn )。 這樣,就得到了這1 000張涉及“ mp3 ”的圖片的幾 種典型形狀,對於每種典型形狀’可以選取—張圖片作爲 該典型形狀的樣本圖片°該樣本圖片’可以是由網站維護 人員指定的該形狀類型中的一張圖片’也可以是由伺服器 按照一定的標準指定的該形狀類型中的一張圖片’這裏並 -16- 201113725 不限定。對於選取的樣本圖片’可以爲其做標記,以方便 後續返回該標記的樣本圖片。 另外’該作爲典型形狀的樣本圖片,其特徵値也可以 得到,如前述已經計算得出的每一圖片的特徵値。 需要說明的是,上面對於同一文本關鍵字涉及的圖片 所劃分的形狀類型,是由伺服器來執行實現。此外,還可 以是由人工來實現。 如,在提取得到涉及“ m p 3 ”的1 〇 〇 〇張圖片後,可 以由網站的工作人員人工得出這1000張圖片的幾種典型 形狀類型的樣本圖片。甚至可以直接由網站工作人員從涉 及“mp3”的若干張圖片中挑選出幾種典型形狀類型的圖 片。 進一步,網站伺服器接收該指定的樣本圖片後,可以 提取出該樣本圖片的特徵値。 預先對圖片資料庫中關鍵字涉及的圖片完成劃分形狀 類型’還可以由網站工作人員人工對樣本圖片排序,例如 將更可能成爲搜索目的的形狀類型的樣本圖片排在靠前的 位置。還可以由網站伺服器對樣本圖片排序,例如將包含 的圖片數量多的形狀類型所對應的樣本圖片排在靠前的位 置。 在預先對圖片資料庫中關鍵字涉及的圖片完成劃分形 狀類型’並爲每一形狀類型選定樣本圖片基礎上,當伺服 器接收到用戶端發來的圖片搜索請求之後,本發明實現圖 片搜索的方法第一實施例可以按照如圖1所示的流程,包 -17- 201113725 括: 步驟110:伺服器在圖片資料庫中查找所述搜索請求 中的關鍵字對應的預先分類的幾種形狀類型的樣本圖片’ 並將查找到的幾種形狀類型的樣本圖片返回給用戶端。 伺服器接收用戶端發來的圖片搜索請求之後’首先在 圖片資料中進行查找,具體的,査找所述搜索請求中的關 鍵字在圖片資料庫中對應的預先分類的幾種形狀類型的樣 本圖片,如查找圖片資料庫中包含所述搜索請求中的關鍵 字的預先分類的幾種形狀類型的樣本圖片。這裏的“幾 種”,一方面可以取決於實際對關鍵字對應圖片的按形狀 分類情況,也就是說可以與該分類的數量相等;另一方 面,也可以是按照形狀分類數量中的一部分類別。並且’ 這裏的“幾種”,僅取決於按形狀分類的情況,但是’分 成幾類(當然通常會大於等於2種),實際上對本實施例 的實施並沒有影響。另外,這裏的“幾種”可以爲預定個 數。 由於圖片資料庫中已經預先將檔案名和/或圖片屬性 中附屬的文本內容包含某一關鍵字的圖片按照如前述所說 的方式進行按形狀類型分類,並已爲分類的形狀類型選取 了樣本圖片,因此,對於接收到的搜索請求中的關鍵字, 如果與圖片資料庫中的前述處理中涉及的某一關鍵字相 同,或存在包含關係等,如搜索請求中的關鍵字包含於預 先進行前述處理涉及的某一關鍵字中,或預先進行前述處 理涉及的某一關鍵字包含於搜索請求中的關鍵字中’則’ -18- 201113725 伺服器可以容易的查找到與搜索請求中的關鍵字相同,或 存在包含關係的圖片資料庫中預先分類的幾種形狀類型的 樣本圖片。進而,伺服器可將查找到的幾種形狀類型的樣 本圖片返回給用戶端,以提供用戶端的選擇,從而選定用 戶期望查找的圖片的形狀類型。 步驟120:伺服器接收用戶端選定的某種形狀類型的 樣本圖片,並在圖片資料庫中搜索對應所述關鍵字的且與 所述選定樣本圖片的特徵値滿足預定要求的圖片。 用戶在伺服器返回的網頁頁面上,可以看到幾種形狀 類型的樣本圖片,用戶出於搜索目的,可以進一步選定某 種形狀類型的樣本圖片,以表明用戶的搜索意圖爲搜索該 選定形狀類型的圖片。 伺服器接收到用戶選定的某種形狀類型的樣本圖片 後,在圖片資料庫中搜索對應所述關鍵字的且與所述選定 樣本圖片的特徵値滿足預定要求的圖片。具體的,對於圖 片特徵値爲向量形式時,可以在圖片資料庫中搜索與選定 圖片的特徵値向量的距離低於預定閾値的圖片。 與前述類似的,該具體的搜索方式,可以通過計算選 定圖片的特徵値向量與圖片資料庫中圖片的特徵値向量的 舉例來進行。前述提到,對於兩個η維的向量,這兩個向 量的距離,可以通過公式^(Ρ\ - ρΐ)2 + (Ρ2 - Q2f +... + (Pn- Qnf得 到’其中,兩個向量分別爲(P1 ,P2, ...,Pn ), (Ql,Q2,...,Qn )。設(PI, P2,…,Pn)爲選定圖片的特徵 値向量,(Ql,Q2,...,Qn)爲圖片資料庫中的某一圖片的 -19- 201113725 特徵値向量。則通過上述公式可以得出兩者的距離。一般 地,距離爲〇的圖片爲同一形狀的圖片,距離在一定範圍 限度內,可以被認爲是近似形狀的圖片。這個範圍,可以 通過所述的預定閾値來設定。例如,將閩値設爲1 〇,則 表明,與選定圖片的特徵値向量距離在10以內的圖片, 都作爲搜索結果,即與選定圖片相同或近似形狀的圖片, 從而之後可以將圖片資料庫中這些與選定圖片相同形狀的 圖片返回給用戶端。 在圖片資料庫中搜索對應所述關鍵字的且與所述選定 樣本圖片的特徵値滿足預定要求的圖片,可以是在圖片資 料庫中搜索出與所述選定樣本圖片的特徵値滿足預定要求 的圖片之後,再將搜索出的圖片過濾出檔案名和/或圖片 屬性中附屬的文本內容包含所述關鍵字的圖片。當然,也 可以是先在圖片資料庫中搜索出檔案名和/或圖片屬性中 附屬的文本內容包含所述關鍵字的圖片,再在搜索出的所 述關鍵字對應的圖片中搜索與所述選定樣本圖片的特徵値 滿足預定要求的圖片。 步驟1 3 0 :伺服器將所述搜索到的圖片返回給用戶 端。 經過該步驟,用戶端所顯示的搜索結果,都是滿足用 戶搜索意願的圖片。如用戶提出關鍵字爲“ mp3 ”的搜索 請求,由於步驟1 2 0中用戶可以在伺服器返回的集中形狀 類型中選擇某種特定形狀的mp3,如圓形,於是,步驟 1 3 0中用戶端接收的搜索結果,都是關於圓形的mp3圖 -20- 201113725 片。 伺服器將所述搜索到的圖片,按照點擊次數由多至少 的順序返回給用戶端。一般,圖片資料庫中對圖片還將記 錄該圖片的點擊次數(或訪問次數),容易理解的,點擊 次數多的爲用戶經常關注的,反之,爲用戶較不易關注 的。那麼,優先返回點擊次數多的圖片,將更容易滿足用 戶的搜索需求。 需要補充的是’步驟130後’用戶端通常還會點擊搜 索到的圖片中的某一具體的圖片’則伺服器還可以記錄用 戶端點擊的該具體的圖片,從而對該圖片,伺服器可以累 計其點擊量(或稱訪問量)。從而,前述提到的網站伺服 器提取的某關鍵字用戶點擊數量最多的若干張圖片,其中 提到的圖片的點擊量,可以是伺服器累計的用戶端點擊 量。這樣’用戶端對圖片的訪問與伺服器預先對某一關鍵 字按照圖片點擊量的提取,可以構成自回饋系統。下述例 子中與此類似。 由上述第一實施例可見,當伺服器接收到用戶端發來 的圖片搜索請求之後,伺服器在圖片資料庫中查找所述搜 索請求中的關鍵字對應的預先分類的幾種形狀類型的樣本 圖片,並將查找到的幾種形狀類型的樣本圖片返回給用戶 端;伺服器接收用戶端選定的某種形狀類型的樣本圖片, 並在圖片資料庫中搜索與所述選定樣本圖片的特徵値滿足 預定要求的圖片;伺服器將所述搜索到的圖片返回給用戶 端,可以實現按照用戶意圖來搜索圖片’特別是可以實現 -21 - 201113725 提供用戶搜索關鍵字對應的圖片形狀類型,進而按照用戶 所選擇的形狀類型搜索類似形狀的圖片,從而可以滿足用 戶的搜索需求’提高用戶的體驗。 上述實施例中,需要說明的是,所述預先提取具有典 型形狀的樣本圖片,目的是提取出圖片資料庫中的涉及某 —關鍵字的幾種典型形狀的圖片,而這些典型形狀,一般 在一段長的時間內是不會改變的,因此可以間隔較長的週 期執行一次。而圖片資料庫中的資料,由於用戶上傳圖片 的時間不確定性,以及網路爬蟲在網際網路中高頻率的抓 取’伺服器當接收到用戶的搜索請求後,都要在步驟120 中立即執行對圖片資料庫中圖片的搜索,以確保搜索物件 包括最新的圖片,進而才可能在搜索結果中包含最新的圖 片。 以下介紹本發明實現圖片搜索的方法第二實施例。需 要說明的是,以下第二方法實施例著重介紹與第一實施例 的不同之處’而相類似之處,還須參考第一方法實施例中 的相關記載。 爲了實現本發明第二方法實施例中的圖片搜索,網站 伺服器需要在圖片資料庫中預先根據關鍵字將對應的圖片 按照圖片中物體的形狀進行分類。 如前所述,網站伺服器中具有存儲圖片資料的圖片資 料庫’這個圖片資料庫中存儲的圖片,可以是登陸該網站 的用戶上傳的圖片,也可以是從其他系統中導入的圖片, 還可以是通過網路爬蟲從海量的網際網路網頁中抓取得 -22- 201113725 到’還可能以其他方式得到的圖片’再或者是上述幾種來 源中的一種或幾種方式結合而來的圖片。每個存儲的圖 片,還包括圖片的檔案名以及圖片屬性中附屬的文本內 容。 網站伺服器可以預先對圖片資料庫中的圖片按照預定 義的關鍵字進行分類,例如將圖片檔案名和/或圖片屬性 中附屬的文本內容中包括“mp3”這一關鍵字的圖片分爲 —類,而將圖片檔案名和/或圖片屬性中附屬的文本內容 中包括其他關鍵字的圖片分爲另一類。 進一步的,網站伺服器可以對提取出的一類關鍵字對 應的圖片按照圖片的形狀特徵進行分類,例如分爲典型的 幾種形狀類型。仍以上述關鍵字爲mp3的圖片爲例,在 關鍵字爲mp3的這一類圖片中,可以按照形狀將這些圖 片分類爲幾種形狀類型,如可以包括顯示圓形mp3的圖 片,顯示菱形mp3的圖片,顯示方形mp3的圖片,以及 顯示長方形mp3的圖片這幾種類型。 關於將圖片按照形狀類型進行分類,具體的,可以通 過比較圖片的特徵値來實現將圖片按照形狀類型進行分 類。 該特徵値,是將圖像中能夠反映所顯示物體形狀的特 徵通過數學方式提取並表達出來。現有技術中,已有若干 種提取圖像形狀特徵的方案。圖片提取出的特徵値,一般 可以表示爲一定維度的向量,如(PI,P2,…’ Pn) ’這 個η維向量,從而可以用該向量來描述圖像中物體的形狀 -23- 201113725 特徵。具體的提取方式,可以採取現有的圖像特徵提取方 式,如採用Hough變換等方式的圖像特徵提取’或者採 用前述A1至A5提到的圖像特徵提取的方式,這裏不再 重複。 例如,對於上述圖片資料庫中包含文本“ mp3 ”的圖 片,可以由伺服器比較這些張圖片的特徵値,將特徵値相 近的圖片劃分爲同一或近似形狀類型的圖片。具體的,可 以設定預定距離,將特徵値之差在預定距離之內的圖片設 定爲同一或近似形狀類型的圖片。 所述特徵値之差’可以通過對表明特徵値的向量求距 離來獲得。如前所述的’對於兩個η維的向量,這兩個向 量的距離’可以通過公式V(P1 ~Ql)2+ (P2 - Q2f +...+(Pn - Qnf得 到,其中,兩個向量分別爲(Ρ1,Ρ2,·.·,Ρη ), (Ql,Q2”..,Qn )。 這樣’就得到了圖片資料庫中涉及“ m P 3 ”的圖片的 幾種典型形狀’對於每種典型形狀,可以選取一張圖片作 爲該典型形狀的樣本圖片。 進一步’網站伺服器接收該指定的樣本圖片後,可以 提取出該樣本圖片的特徵値。 預先對圖片資料庫中關鍵字涉及的圖片完成劃分形狀 類型,還可以由網站工作人員人工對樣本圖片排序,例如 將更可能爲搜索目的的形狀類型的樣本圖片排在靠前的位 置。還可以由網站伺服器對樣本圖片排序,例如將包含的 圖片數量多的形狀類型所對應的樣本圖片排在靠前的位 -24 - 201113725 置。 在預先對圖片資料庫中關鍵字涉及的圖片完 狀類型,並爲每一形狀類型選定樣本圖片基礎上 器接收到用戶端發來的圖片搜索請求之後,本發 片搜索的方法第二實施例可以按照如圖2所示的 括: 步驟2 1 0 :伺服器在圖片資料庫中査找所述 中的關鍵字對應的預先分類的幾種形狀類型的樣 並將查找到的幾種形狀類型的樣本圖片返回給用 伺服器接收用戶端發來的圖片搜索請求之後 圖片資料中進行查找,具體的,查找所述搜索請 鍵字在圖片資料庫中對應的預先分類的幾種形狀 本圖片,如查找圖片資料庫中包含所述搜索請求 字的預先分類的幾種形狀類型的樣本圖片。這 種”,一方面可以取決於實際對關鍵字對應圖片 分類情況,也就是說可以與該分類的數量相等 面,也可以是按照形狀分類數量中的一部分類別 這裏的“幾種”,僅取決於按形狀分類的情況, 成幾類(當然通常會大於等於2種),實際上對 的實施並沒有影響。 由於圖片資料庫中已經預先將檔案名和/或 中附屬的文本內容包含某一關鍵字的圖片按照如 的方式進行按形狀類型分類,並已爲分類的形狀 了樣本圖片,因此’對於接收到的搜索請求中的 成劃分形 ,當伺服 明實現圖 流程,包 搜索請求 本圖片, 戶端。 ,首先在 求中的關 類型的樣 中的關鍵 裏的“幾 的按形狀 ; 另一方 。並且, 但是,分 本實施例 圖片屬性 前述所說 類型選取 關鍵字, -25- 201113725 如果與圖片資料庫中的前述處理中涉及的某一關鍵字相 同,或存在包含關係等,如搜索請求中的關鍵字包含於預 先進行前述處理涉及的某一關鍵字中,或預先進行前述處 理涉及的某一關鍵字包含於搜索請求中的關鍵字中,則, 伺服器可以容易的查找到與搜索請求中的關鍵字相同,或 存在包含關係的圖片資料庫中預先分類的幾種形狀類型的 樣本圖片。進而,伺服器可將將查找到的幾種形狀類型的 樣本圖片返回給用戶端,以提供用戶端的選擇,從而選定 用戶期望查找的圖片的形狀類型。 步驟220 :伺服器接收用戶端選定的某種形狀類型的 樣本圖片,並返回與提交的樣本圖片同一或近似形狀類型 的圖片資料庫中的圖片。 伺服器將所述搜索到的圖片,按照點擊次數由多至少 的順序返回給用戶端。 由上述第二實施例可見,當伺服器接收到用戶端發來 的圖片搜索請求之後,伺服器在圖片資料庫中查找所述搜 索請求中的關鍵字對應的預先分類的幾種形狀類型的樣本 圖片,並將查找到的幾種形狀類型的樣本圖片返回給用戶 端;伺服器接收用戶端選定的某種形狀類型的樣本圖片, 並返回與提交的樣本圖片同一或近似形狀類型的圖片資料 庫中的圖片,這樣,可以實現按照用戶意圖來返回搜索的 圖片,特別是可以實現提供用戶搜索關鍵字對應的圖片形 狀類型,進而按照用戶所選擇的形狀類型返回搜索的類似 形狀的圖片,從而可以滿足用戶的搜索需求,提高用戶的 -26- 201113725 體驗。 上述實施例中,需要說明的是,所述預先處理的環 節,伺服器做了大量的工作,如預先在圖片資料庫中按照 盡可能多的關鍵字對圖片進行分類,進一步地,需要對一 關鍵字涉及的分類圖片在按照形狀類型進行劃分,並爲每 一形狀提供以樣本圖片。進而,伺服器收到用戶端發來的 搜索請求時,可以直接查找圖片資料庫中對圖片分類的關 鍵字是否存在搜索請求中的關鍵字相同或相包含的情況, 如果存在,則提供用戶端對該關鍵字對應的圖片形狀進行 選擇,並將選擇的形狀對應的圖片資料庫中的圖片立即返 回給用戶端。該實施例,對於小型網站,如圖片資料庫規 模不是特別大,而又並不是頻繁更新的情況,比較方便實 用。即使頻繁更新的情況,只要網站伺服器可以同樣頻繁 的做預先的處理,仍可以實現同樣的目的。 以下介紹本發明實現圖片搜索的方法第三實施例。圖 3示出了該方法實施例的流程圖,如圖,包括: 步驟3 1 0 :伺服器接收到用戶端發來的圖片搜索請 求。 用戶端發來的圖片搜索請求,包括文本關鍵字,即請 求圖片檔案名或圖片屬性中附屬的文本內容包括該搜索請 求中的關鍵字的圖片。 步驟3 2 0 :伺服器在圖片資料庫中查找所述搜索請求 中的關鍵字對應的圖片。 圖片資料庫中存儲有大量的圖片’如011所述,這些圖 -27- 201113725 片,可以是登陸該網站的用戶上傳的圖片,也可以是從其 他系統中的導入的圖片,還可以是通過網路爬蟲從海量的 網際網路網頁中抓取得到,還可能以其他方式得到的圖 片,再或者是上述幾種來源中的一種或幾種方式結合而來 的圖片。 每個存儲的圖片,還包括圖片的檔案名以及圖片屬性 中附屬的文本內容。圖片的檔案名和/或圖片屬性中附屬 的文本內容,都可以用來表示圖片中特定的內容。如圖片 中顯示內容爲mp3播放器實體的圖片,該圖片的檔案名 和/或圖片屬性中附屬的文本內容,一般都會包括“mp3” 這一內容。 步驟3 1 0中伺服器接收到用戶端發來的搜索請求後, 步驟3 20中,伺服器以搜索請求中包含的關鍵字對圖片資 料庫的圖片進行搜索,具體的,可以搜索圖片資料庫中檔 案名和/或圖片屬性中附屬的文本內容包含搜索請求中關 鍵字的預定個數的圖片,即在圖片資料庫中查找所述搜索 請求中的關鍵字對應的預定個數的圖片。如搜索請求中包 括“ mp3 ”這一關鍵字,則可以查找圖片資料庫檔案名和/ 或圖片屬性中附屬的文本內容包含該關鍵字的1〇〇〇張圖 片。 這裏查找圖片資料庫中所述搜索請求中的關鍵字對應 的預定個數的圖片,而不是圖片資料庫中所述搜索請求中 的關鍵字對應的全部圖片,是因爲該步驟僅僅是爲了提取 典型的圖片,從而在後續步驟中從這些典型圖片中能夠分 -28- 201113725 類爲集中形狀類型,以供後續用戶端選擇後,再以選定的 形狀在圖片資料庫中進行大範圍的搜索。於是,該步驟中 查找所述關鍵字對應的典型圖片,應當以能得出形狀類型 爲目的,並且兼顧較短的執行時間,以降低整個搜索過程 的時間。爲了達到這一目的,圖片資料庫可以優先返回關 鍵字對應的訪問次數高的那些圖片。 步驟3 3 0 :伺服器將所述查找到的圖片按照圖片中物 體的形狀進行分類,並爲每一形狀類型選定樣本圖片,進 而將預定個數的形狀類型的樣本圖片返回給用戶端。 伺服器可以對步驟320中搜索到的圖片按照圖片的形 狀特徵進行分類,例如分爲典型的幾種形狀類型。仍以的 mp3圖片爲例,在按關鍵字搜索到的關於mp3的圖片 中,可以按照形狀將這些圖片分類爲幾種形狀類型,如可 以包括顯示圓形mp3的圖片,顯示菱形mp3的圖片’顯 示方形mp3的圖片,以及顯示長方形mp3的圖片這幾種 類型。 關於將圖片按照形狀類型進行分類,具體的,可以通 過比較圖片的特徵値來實現將圖片按照形狀類型進行分 類。比較特徵値確定圖片形狀類型的方式’與前述第一方 法實施例中類似。 例如,對於上述查找出的包含文本“mp3”的1〇〇〇 張圖片,可以由伺服器比較這1 〇〇〇張圖片的特徵値’將 特徵値相近的圖片劃分爲同一或近似形狀類型的圖片°具 體的,可以設定預定距離,將特徵値之差在預定距離之內 -29- 201113725 的圖片設定爲同一或近似形狀類型的圖片。 所述特徵値之差,可以通過對表明特徵値的向量求距 離來獲得。這一點也與前述類似。 之後,可以爲每種典型形狀選取一張圖片作爲該典型 形狀的樣本圖片。進而,伺服器將預定個數的形狀類型的 樣本圖片返回給用戶端。 步驟340 :伺服器接收用戶端選定的某種形狀類型的 樣本圖片,並在圖片資料庫中搜索對應所述關鍵字的且與 所述選定樣本圖片的特徵値滿足預定要求的圖片。 用戶端接收到步驟330中伺服器發來的預定個數個形 狀類型的樣本圖片,用戶可圖選擇其中的某個樣本圖片, 從而表明用戶對前述的關鍵字,意圖搜索其中具有某種特 定形狀的圖片結果,而該特定形狀即爲用戶選定的樣本圖 片所代表的形狀類型。用戶提交選中的樣本圖片後,通過 網路提交到伺服器。 伺服器接收到用戶端選定的某種形狀類型的樣本圖片 後’以該選定的樣本圖片在圖片資料庫中搜索,具體的, 在圖片資料庫中搜索對應所述關鍵字的且與所述選定樣本 圖片的特徵値滿足預定要求的圖片。對於圖片特徵値爲向 量形式時’可以在圖片資料庫中搜索與選定圖片的特徵値 向量的距離低於預定閾値的圖片。 與前述類似的’該具體的搜索方式,可以通過計算選 定圖片的特徵値向量與圖片資料庫中圖片的特徵値向量的 舉例來進行。前述提到’對於兩個n維的向量,這兩個向 -30- 201113725 量的距離,可以通過公式yl(P\ - Q\)2 + (P2 - Q2f +... + {Pn-Qnf得 到,其中,兩個向量分別爲(P1,P2,…,Pn ) ’ (Ql,Q2,...,Qn)。設(Ρ1,Ρ2,···,Ρη)爲選定圖片的特徵 値向量,(Q1,Q2,…,Qn )爲圖片資料庫中的某一圖片的 特徵値向量。則通過上述公式可以得出兩者的距離。一般 地,距離爲〇的圖片爲同一形狀的圖片,距離在一定範圍 限度內,可以被認爲是近似形狀的圖片。這個範圍,可以 通過所述的預定閾値來設定。例如,將閾値設爲1 〇,則 表明,與選定圖片的特徵値向量距離在10以內的圖片, 都作爲搜索結果,即與選定圖片相同形狀的圖片,從而之 後可以將圖片資料庫中這些與選定圖片相同形狀的圖片返 回給用戶端。 在圖片資料庫中搜索對應所述關鍵字的且與所述選定 樣本圖片的特徵値滿足預定要求的圖片,可以是在圖片資 料庫中搜索出與所述選定樣本圖片的特徵値滿足預定要求 的圖片之後,再將搜索出的圖片過濾出檔案名和/或圖片 屬性中附屬的文本內容包含所述關鍵字的圖片。當然,也 可以是先在圖片資料庫中搜索出檔案名和/或圖片屬性中 附屬的文本內容包含所述關鍵字的圖片,再在搜索出的所 述關鍵字對應的圖片中搜索與所述選定樣本圖片的特徵値 滿足預疋要求的圖片。 步驟3 5 0 :伺服器將所述搜索到的圖片返回給用戶 端。 經過該步驟’用戶端所顯示的搜索結果,都是滿足用 -31 - 201113725 戶搜索意願的圖片。如用戶提出關鍵字爲“mp3”的搜索 請求,由於步驟120中用戶可以在伺服器返回的集中形狀 類型中選擇某種特定形狀的mp3 ’如圓形,於是,步驟 130中用戶端接收的搜索結果,都是關於圓形的mp3圖 片。 伺服器將所述搜索到的圖片,按照點擊次數由多至少 的順序返回給用戶端。 由上述第三實施例可見,伺服器接收到用戶端發來的 圖片搜索請求;伺服器在圖片資料庫中查找所述搜索請求 中的關鍵字對應的圖片;伺服器將所述搜索到的圖片按照 圖片中物體的形狀進行分類,並爲每一形狀類型選定樣本 圖片,進而將預定個數的形狀類型的樣本圖片返回給用戶 端;伺服器接收用戶端選定的某種形狀類型的樣本圖片, 並在圖片資料庫中搜索與所述選定樣本圖片的特徵値滿足 預定要求的圖片;伺服器將所述查找到的圖片返回給用戶 端,這樣,可以實現按照用戶意圖來搜索圖片,特別是可 以提供用戶搜索關鍵字對應的圖片形狀類型,進而按照用 戶所選擇的形狀類型搜索類似形狀的圖片,從而可以滿足 用戶的搜索需求,提高用戶的體驗。 該第三實施例’對於圖片資料庫較爲龐大的情況,需 要伺服器具有較高的軟硬體存取速度及處理能力。 以下介紹本發明實現圖片搜索的方法第三實施例。圖 4示出了該方法實施例的流程圖,如圖,包括·· 步驟4 1 〇 :伺服器接收到用戶端發來的圖片搜索請 -32- 201113725 求。 用戶端發來的圖片搜索請求,包括文本關鍵字 求圖片檔案名或圖片屬性中附屬的文本內容包括該 求中的關鍵字的圖片。 步驟420 :伺服器在圖片資料庫中查找所述搜 中的關鍵字對應的圖片。 圖片資料庫中存儲有大量的圖片,如前所述, 片,可以是登陸該網站的用戶上傳的圖片,也可以 他系統中的導入的圖片,還可以是通過網路爬蟲從 網際網路網頁中抓取得到,還可能以其他方式得 片,再或者是上述幾種來源中的一種或幾種方式結 的圖片。 每個存儲的圖片,還包括圖片的檔案名以及圖 中附屬的文本內容。圖片的檔案名和/或圖片屬性 的文本內容,都可以用來表示圖片中特定的內容。 中顯示內容爲mp3播放器實體的圖片,該圖片的 和/或圖片屬性中附屬的文本內容,一般都會包括1 這一內容。 步驟43 0 :伺服器將所述查找到的圖片按照圖 體的形狀進行分類,並爲每一形狀類型選定樣本圖 而將預定個數的形狀類型的樣本圖片返回給用戶端 伺服器可以對步驟4 2 0中搜索到的圖片按照圖 狀特徵進行分類’例如分爲典型的幾種形狀類型。 mp3圖片爲例’在按關鍵字搜索到的關於mp3 ,即請 搜索請 索請求 這些圖 是從其 海量的 到的圖 合而來 片屬性 中附屬 如圖片 檔案名 mp3 片中物 片,進 〇 片的形 仍以的 的圖片 -33- 201113725 中,可以按照形狀將這些圖片分類爲幾種形狀類型,如可 以包括顯示圓形mp3的圖片’顯示菱形mp3的圖片’顯 示方形mp3的圖片,以及顯示長方形mp3的圖片這幾種 類型。 關於將圖片按照形狀類型進行分類,具體的,可以通 過比較圖片的特徵値來實現將圖片按照形狀類型進行分 類。比較特徵値確定圖片形狀類型的方式,與前述第一方 法實施例中類似。 例如,對於上述查找出的包含文本“ mp3 ”的圖片’ 可以由伺服器比較這些圖片的特徵値,將特徵値相近的圖 片劃分爲同一或近似形狀類型的圖片。具體的,可以設定 預定距離,將特徵値之差在預定距離之內的圖片設定爲同 一或近似形狀類型的圖片。 所述特徵値之差,可以通過對表明特徵値的向量求距 離來獲得。這一點也與前述類似。 之後’可以爲每種典型形狀選取一張圖片作爲該典型 形狀的樣本圖片。進而,伺服器將預定個數的形狀類型的 樣本圖片返回給用戶端。 進一步的’伺服器可以僅從與所述搜索請求中的關鍵 字對應的圖片中提取一定數量的圖片,例如,只提取 1 0 00張圖片,然後對該1000張圖片按照圖片中物體的形 狀進行分類,並爲每一形狀類型選定樣本圖片,進而將預 定個數的形狀類型的樣本圖片返回給用戶端。這樣可以提 高搜索的效率。 -34- 201113725 步驟440:伺服器接收用戶端選定的某種形狀類型的 樣本圖片,並將圖片資料庫中該形狀類型的圖片返回給用 戶端。 用戶端接收到步驟4 3 0中伺服器發來的預定個數個形 狀類型的樣本圖片’用戶可圖選擇其中的某個樣本圖片’ 從而表明用戶對前述的關鍵字,意圖搜索其中具有某種特 定形狀的圖片結果,而該特定形狀即爲用戶選定的樣本圖 片所代表的形狀類型。用戶提交選中的樣本圖片後’通過 網路提交到伺服器。 伺服器接收到用戶端選定的某種形狀類型的樣本圖片 後,由於前述步驟43 0中已對查找到的關鍵字對應的圖片 進行了分類,而對於用戶選定的樣本圖片,其形狀類型中 包含的圖片已經被劃分出來,因此,該步驟440,可以直 接返回該形狀類型對應的圖片。 如用戶端選定的爲圓形的mp3,則由於前述步驟中伺 服器已將查找到的mp3分爲了多個形狀類型,其中包含 圓形mp3,因此,該步驟中,伺服器可以將分類爲圓形 mp3的圖片返回給用戶端。伺服器最終返回給用戶端的圖 片,可以按照點擊次數由多至少的順序返回。 由上述第四實施例可見,伺服器接收到用戶端發來的 圖片搜索請求;伺服器在圖片資料庫中查找所述搜索請求 中的關鍵字對應的圖片;伺服器將所述查找到的圖片按照 圖片中物體的形狀進行分類,並爲每一形狀類型選定樣本 圖片,進而將預定個數的形狀類型的樣本圖片返回給用戶 -35- 201113725 端;伺服器接收用戶端選定的某種形狀類型的樣本圖片, 並將圖片資料庫中該形狀類型的圖片返回給用戶端,這 樣,可以實現按照用戶意圖來搜索圖片,特別是可以提供 用戶搜索關鍵字對應的圖片形狀類型,進而按照用戶所選 擇的形狀類型返回該形狀的圖片,從而可以滿足用戶的搜 索需求,提高用戶的體驗。 該第四實施例,適用於圖片資料庫規模不是很大的情 況,從而將所述查找到的圖片按照圖片中物體的形狀進行 分類不會佔用整個搜索過程太長的時間。當然,伺服器具 有較高的軟硬體存取速度及處理能力也是影響搜索效率的 重要因素。 以下介紹本發明實現圖片搜索的伺服器第一實施例, 圖5示出了該實施例的框圖,如圖5,包括: 圖片資料庫51,其中存有圖片,對於對應同一關鍵 字的圖片’預先被按照圖片中物體的形狀分類,且每一形 狀類型具有選定的樣本圖片; 搜索請求接收單元52’用於接收用戶端發來的圖片 搜索請求; 樣本圖片返回單元53,用於在圖片資料庫中查找所 述搜索請求中的關鍵字對應的預先分類的幾種形狀類型的 樣本圖片’並將查找到的幾種形狀類型的樣本圖片返回給 用戶端; 選定圖片接收單元54’用於接收用戶端選定的某種 形狀類型的樣本圖片; -36- 201113725 搜索單元5 5,用於在圖片資料庫中搜索對應所述關 鍵字的且與所述選定樣本圖片的特徵値滿足預定要求的圖 片; 搜索結果返回單元5 6,用於將所述搜索到的圖片返 回給用戶端。 最好,所述實現圖片搜索的伺服器,還可以包括排序 單元57,用於對圖片資料庫中選定的樣本圖片排序,例 如將包含的圖片數量多的形狀類型所對應的樣本圖片排在 靠前的位置。 最好,所述圖片資料庫中的圖片,包括上傳的圖片和 /或通過網路爬蟲從海量的網際網路網頁中抓取得到的圖 片。 最好,所述實現圖片搜索的伺服器,還包括分類單元 58,用於通過比較圖片的特徵値實現對圖片資料庫中的圖 片按照圖片中物體的形狀分類。 最好,所述比較圖片的特徵値,包括將特徵値之差在 預定距離之內的圖片設定爲同一或近似形狀類型的圖片。 最好,所述滿足預定要求的圖片包括圖片資料庫中與 選定圖片的特徵値向量的距離低於預定閩値的圖片。 利用該伺服器實施例實現圖片搜索的方法,與前述第 一方法實施例類似,每個單元的具體執行以及各個單元間 的交互也與前述第四方法實施例類似,在此不再贅述。 以下介紹本發明實現圖片搜索的伺服器第二實施例, 圖6示出了該實施例的框圖,如圖6,包括: -37- 201113725 圖片資料庫61,其中存有圖片,對於對應同一關鍵 字的圖片,預先被按照圖片中物體的形狀分類,且每一形 狀類型具有選定的樣本圖片; 搜索請求接收單元6 2,用於接收用戶端發來的圖片 搜索請求; 樣本圖片返回單元63,用於在圖片資料庫中查找所 述搜索請求中的關鍵字對應的預先分類的幾種形狀類型的 樣本圖片,並將査找到的幾種形狀類型的樣本圖片返回給 用戶端; 選定圖片接收單元64,用於接收用戶端選定的某種 形狀類型的樣本圖片; 搜索結果返回單元65,用於返回與提交的樣本圖片 同一或近似形狀類型的圖片資料庫中的圖片。 利用該伺服器實施例實現圖片搜索的方法,與前述第 二方法實施例類似,每個單元的具體執行以及各個單元間 的交互也與前述第四方法實施例類似,在.此不再贅述。 以下介紹本發明實現圖片搜索的伺服器第三實施例, 圖7示出了該實施例的框圖,如圖7,包括: 圖片資料庫71,其中存有圖片; 搜索請求接收單元72,用於接收用戶端發來的圖片 搜索請求; 查找單元73,用於在圖片資料庫查找所述搜索請求 中的關鍵字對應的圖片; 分類單元74,用於將所述查找到的圖片按照圖片中 -38- 201113725 物體的形狀進行分類; 樣本圖片返回單元75,用於爲分類單元分類的每一 形狀類型選定樣本圖片,進而將預定個數的形狀類型的樣 本圖片返回給用戶端; 選定圖片接收單元76,用於接收用戶端選定的某種 形狀類型的樣本圖片; 搜索單元77,用於在圖片資料庫中搜索對應所述關 鍵字的且與所述選定樣本圖片的特徵値滿足預定要求的圖 片; 搜索結果返回單元78,用於返回搜索到的圖片。 利用該伺服器實施例實現圖片搜索的方法,與前述第 三方法實施例類似,每個單元的具體執行以及各個單元間 的交互也與前述第四方法實施例類似,在此不再贅述。 以下介紹本發明實現圖片搜索的伺服器第四實施例, 圖8示出了該實施例的框圖,如圖8,包括: 圖片資料庫81,其中存有圖片; 搜索請求接收單元8 2,用於接收用戶端發來的圖片 搜索請求; 查找單元8 3,用於在圖片資料庫查找所述搜索請求 中的關鍵字對應的圖片; 分類單元84,用於將所述查找到的圖片按照圖片中 物體的形狀進行分類; 樣本圖片返回單元85,用於爲分類單元分類的每一 形狀類型選定樣本圖片,進而將預定個數的形狀類型的樣 -39- 201113725 本圖片返回給用戶端; 選定圖片接收單元86,用於接收用戶端選定的某種 形狀類型的樣本圖片; 搜索結果返回單元87,用於返回與提交的樣本圖片 同一或近似形狀類型的圖片資料庫中的圖片。 利用該伺服器實施例實現圖片搜索的方法,與前述第 四方法實施例類似,每個單元的具體執行以及各個單元間 的交互也與前述第四方法實施例類似,在此不再贅述。 爲了描述的方便,描述以上裝置時以功能分爲各種單 元分別描述。當然,在實施本發明時可以把各單元的功能 在同一個或多個軟體和/或硬體中實現。 通過以上的實施方式的描述可知,本領域的技術人員 可以清楚地瞭解到本發明可借助軟體加必需的通用硬體平 臺的方式來實現。基於這樣的理解,本發明的技術方案本 質上或者說對現有技術做出貢獻的部分可以以軟體產品的 形式體現出來,該電腦軟體產品可以存儲在存儲介質中, 如ROM/RAM、磁碟、光碟等,包括若干指令用以使得一 台電腦設備(可以是個人電腦,伺服器,或者網路設備 等)執行本發明各個實施例或者實施例的某些部分所述的 方法。 本說明書中的各個實施例均採用遞進的方式描述,各 個實施例之間相同相似的部分互相參見即可’每個實施例 重點說明的都是與其他實施例的不同之處。尤其,對於系 統實施例而言,由於其基本相似於方法實施例’所以描述 -40- 201113725 的比較簡單,相關之處參見方法實施例的部分說明即可。 本發明可用於眾多通用或專用的計算系統環境或配置 中。例如:個人電腦、伺服器電腦、手持設備或可檇式設 備、平板型設備、多處理器系統、基於微處理器的系統、 置頂盒、可編程的消費電子設備、網路PC、小型電腦、 大型電腦、包括以上任何系統或設備的分散式計算環境等 等。 本發明可以在由電腦執行的電腦可執行指令的一般上 下文中描述,例如程式模組。一般地,程式模組包括執行 特定任務或實現特定抽象資料類型的常式、程式、物件、 元件、資料結構等等。也可以在分散式計算環境中實踐本 發明,在這些分散式計算環境中,由通過通信網路而被連 接的遠端處理設備來執行任務。在分散式計算環境中,程 式模組可以位於包括存儲設備在內的本地和遠端電腦存儲 介質中。 雖然通過實施例描繪了本發明,本領域普通技術人員 知道,本發明有許多變形和變化而不脫離本發明的精神, 希望所附的權利要求包括這些變形和變化而不脫離本發明 的精神。 【圖式簡單說明】 爲了更清楚地說明本發明實施例或現有技術中的技術 方案,下面將對實施例或現有技術描述中所需要使用的附 圖作簡單地介紹,顯而易見地,下面描述中的附圖僅僅是 -41 - 201113725 本發明中記載的一些實施例,對於本領域普通技術人員來 講,在不付出創造性勞動性的前提下’還可以根據這些附 圖獲得其他的附圖。 圖1爲本發明實現圖片搜索的方法第一實施例的流程 圖; 圖2爲本發明實現圖片搜索的方法第二實施例的流程 圖, 圖3爲本發明實現圖片搜索的方法第三實施例的流程 圖; 圖4爲本發明實現圖片搜索的方法第四實施例的流程 圖: 圖5爲本發明實現圖片搜索的伺服器第一實施例的框 圖; 圖6爲本發明實現圖片搜索的伺服器第二實施例的框 圖; 圖7爲本發明實現圖片搜索的伺服器第三實施例的框 圖; 圖8爲本發明實現圖片搜索的伺服器第四實施例的框 圖。 【主要元件符號說明】 5 1 :圖片資料庫 52:搜索請求接收單元 53:樣本圖片返回單元 54:選定圖片接收單元 -42- 201113725 5 5 :搜索單元 56 :搜索結果返回單元 5 7 :排序單元 58 :分類單元 6 1 :圖片資料庫 6 2 :搜索請求接收單元 63:樣本圖片返回單元 64 :選定圖片接收單元 65 :搜索結果返回單元 7 1 :圖片資料庫 72 :搜索請求接收單元 73 :查找單元 74 :分類單元 75:樣本圖片返回單元 76 :選定圖片接收單元 7 7 :搜索單元 7 8 :搜索結果返回單元 8 1 :圖片資料庫 8 2 :搜索請求接收單元 8 3 :查找單元 8 4 :分類單元 85:樣本圖片返回單元 86 :選定圖片接收單元 87 :搜索結果返回單元 -43201113725 VI. Description of the Invention [Technical Field] The present invention relates to the field of search technology, and more particularly to a method for implementing picture search and a website server. [Prior Art] The image search service provided by the Internet website can provide users with relevant image data on the Internet through the search process. The image search in the prior art, as provided by major websites, is a search engine that the search engine enters in the search box and submits it to the website, and the search engine captures the massive image captured by the web crawler. The submitted search text is used as a keyword to search for text attached to these massive images, typically such as the file name of the search image or the text in the attached field in the image file attribute. In turn, the server returns the found file name or the attribute attribute of the file attribute to the user. It can be seen that the essence of such image search is actually based on the search of text content. The picture searched in this way is sometimes far from the picture that the user really wants to search. For example, in the image search result corresponding to the same keyword, the user is more and more intent to search for a picture having a certain shape, and the search power according to the prior art has a plurality of shapes in the returned search result. 'Therefore, there are a large number of pictures that are not searched by the user's words. 'The ® 'suffocate the β p from the spoon @点' way; the corresponding 纟 also reduces the accuracy of the search results' and can not meet the user's search needs. 201113725 [Description of the Invention] An object of the embodiments of the present invention is to provide a method for implementing image search and a website server, so as to achieve search results that meet user search requirements. To solve the above technical problem, a method for implementing image search according to an embodiment of the present invention is implemented as follows: A method for realizing image search, wherein a corresponding image is pressed according to a keyword in a picture database in advance. The shape of the medium object is classified 'and a sample picture is selected for each shape type; after the server receives the image search request sent by the client, the method includes: the server searches for the search request in the picture database a sample image of several shape types pre-classified corresponding to the keyword, and returning the sample images of the several shape types found to the user end; the server receives the sample image of a certain shape type selected by the user end, and in the picture Searching, in the database, a picture corresponding to the keyword and having characteristics of the selected sample picture satisfying a predetermined requirement; the server returns the searched picture to the user end. It can be seen from the above-mentioned first embodiment that after the server receives the image search request sent by the user, the server searches the image database for the samples of the pre-classified several shape types corresponding to the keywords in the search request. a picture, and returning the sample pictures of the several shape types found to the user end; the server receives the sample picture of a certain shape type selected by the user end, and searches the picture database for the characteristics of the selected sample picture値The image that satisfies the predetermined requirement; the server returns the searched image to the user -6 - 201113725, and can search for the image according to the user's intention. In particular, the image shape type corresponding to the user search keyword can be implemented, and then The shape type selected by the user searches for a similarly shaped image, thereby satisfying the user's search needs and improving the user's experience. In order to solve the above technical problem, a method for implementing image search according to another embodiment of the present invention is implemented as follows: A method for realizing image search, in which a corresponding image is in accordance with an object in a picture according to a keyword in advance in a picture database. The shape is classified, and a sample picture is selected for each shape type; after the server receives the image search request sent by the client, the method includes: the server searching for a keyword corresponding to the search request in the image database Pre-classified sample images of several shape types, and return the sample images of several shape types found to the client; the server receives the sample image of a certain shape type selected by the client, and returns the submitted sample Pictures in the same or similar shape type of image library. It can be seen from the foregoing second embodiment that after the server receives the image search request sent by the user, the server searches the image database for a sample of several pre-classified shape types corresponding to the keywords in the search request. The picture 'returns the sample picture of several shape types found to the client; the server receives the sample picture of a certain shape type selected by the user end, and returns the picture data of the same or approximate shape type as the sample picture of the parent The picture 'such' in the library can be used to return the searched 201113725 image according to the user's intention. In particular, it can realize the image shape type corresponding to the user search keyword, and then return the searched similar shape image according to the shape type selected by the user. Thereby, the user's search needs can be satisfied and the user experience can be improved. In order to solve the above technical problem, a method for implementing a picture search according to a third embodiment of the present invention is implemented as follows: A method for implementing a picture search, comprising: receiving, by a server, a picture search request sent by a client; Searching for a picture corresponding to the keyword in the search request in the picture database; the server classifies the searched picture according to the shape of the object in the picture, and selects a sample picture for each shape type, and then sets a predetermined number The sample image of the shape type is returned to the client; the server receives the sample image of a certain shape type selected by the user, and searches the image database for the corresponding keyword and the feature of the selected sample image is satisfied. The requested picture is requested; the server returns the searched picture to the client. It can be seen from the foregoing third embodiment that the server receives the image search request sent by the user terminal; the server searches the image database for the picture corresponding to the keyword in the search request: the server searches the searched image Sorting according to the shape of the object in the picture, and selecting a sample picture for each shape type, and then returning a predetermined number of sample images of the shape type to the user end; the server receives the sample picture of a certain shape type selected by the user end, And searching in the picture database for the picture that meets the requirement of the selected sample picture 値 to meet the predetermined requirement of -8-201113725; the server returns the found picture to the user end, so that the picture can be searched according to the user intention In particular, it is possible to provide a picture shape type corresponding to the user search keyword and then search for a similarly shaped picture according to the shape type selected by the user', thereby satisfying the user's search requirements and improving the user experience. In order to solve the above technical problem, a method for implementing a picture search according to a third embodiment of the present invention is implemented as follows: A method for implementing a picture search, comprising: receiving, by a server, a picture search request sent by a client; Searching for a picture corresponding to the keyword in the search request in the picture database; the server classifies the searched picture according to the shape of the object in the picture, and selects a sample picture for each shape type, and then sets a predetermined number The sample image of the shape type is returned to the client; the server receives the sample image of a certain shape type selected by the user, and returns the image of the shape type in the image database to the client. It can be seen from the foregoing fourth embodiment that the server receives the image search request sent by the user: the server searches for the image corresponding to the keyword in the search request in the image database; the server searches the image that is found Sorting according to the shape of the object in the picture, and selecting a sample picture for each shape type, and then returning a predetermined number of sample images of the shape type to the user end; the server receives the sample picture of a certain shape type selected by the user end, And returning the image of the shape type in the image database to the user end, so that the image can be searched according to the user's intention, in particular, the image shape type corresponding to the user search keyword of -9 - 201113725 can be provided, and then the user selects the image shape. The shape type returns a picture of the shape, thereby satisfying the user's search needs and improving the user experience. In order to solve the above technical problem, the present invention provides a first embodiment of a server for implementing image search, which is implemented as follows: A server for realizing image search, comprising: a picture database, wherein a picture is stored, corresponding to the same keyword a picture, which is pre-classified according to the shape of the object in the picture, and each shape type has a selected sample picture; a search request receiving unit for receiving a picture search request sent by the user; and a sample picture returning unit for the picture Searching for a sample picture of several shape types of the pre-categorized corresponding to the keywords in the search request, and returning the sample pictures of the several shape types found to the user end; the selected picture receiving unit is configured to receive a sample picture of a certain shape type selected by the user; a search unit, configured to search, in the picture database, a picture corresponding to the keyword and having the feature of the selected sample picture satisfying a predetermined requirement; the search result return unit, Used to return the searched image to the client. In order to solve the above technical problem, the present invention provides a second embodiment of a server for implementing image search, which is implemented as follows: A server for realizing image search, comprising: -10- 201113725 image database, in which a picture is stored, for The picture corresponding to the same keyword is pre-classified according to the shape of the object in the picture, and each shape type has a selected sample picture; the search request receiving unit is configured to receive a picture search request sent by the user; the sample picture return unit, And searching for a sample image of several shape types of the pre-categorized corresponding to the keywords in the search request in the image database, and returning the sample images of the several shape types that are found to the user, and selecting the image receiving unit And receiving a sample image of a certain shape type selected by the user end; the search result returning unit is configured to return a picture in the image database of the same or approximate shape type as the submitted sample image. In order to solve the above technical problem, the present invention provides a third embodiment of a server for implementing image search, which is implemented as follows: A server for realizing image search, comprising: a picture database in which a picture is stored; a search request receiving unit, And a searching unit, configured to search for a picture corresponding to the keyword in the search request in the picture database, and a classification unit, configured to: use the searched picture according to the object in the picture The shape of the sample is sorted; the sample image returning unit is configured to select a sample image for each shape -11 - 201113725 type of the classification unit, and then return a predetermined number of sample images of the shape type to the user end; a sample picture for receiving a certain shape type selected by the user; a search unit, configured to search, in the picture database, a picture corresponding to the keyword and having a feature of the selected sample picture that meets a predetermined requirement; Returns a unit that returns the searched image. In order to solve the above technical problem, the present invention provides a fourth embodiment of a server for implementing image search, which is implemented as follows: a server for realizing image search, comprising: a picture database in which a picture is stored; a search request receiving unit For receiving a picture search request sent by the user; the searching unit is configured to search for a picture corresponding to the keyword in the search request in the picture database; the classification unit is configured to follow the found picture according to the picture The shape of the object is classified; the sample picture returns a single frame for selecting a sample picture for each shape type classified by the classification unit', and then returns a sample picture of a predetermined number of shape types to the user yang}, the selected picture receiving unit' Receiving a sample picture of a certain shape type selected by the user end; the search result returning unit ' is used to return a picture in the picture database of the same or approximate shape type as the submitted sample picture. -12-201113725 [Embodiment] Embodiments of the present invention provide a method for implementing picture search and a website server. In order to make those skilled in the art better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. The embodiments are only a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without departing from the inventive scope should fall within the scope of the invention. The first embodiment of the method for implementing picture search of the present invention is described below. In order to implement the image search in the first method embodiment of the present invention, the website server needs to classify the corresponding picture according to the shape of the object in the picture according to the keyword in advance in the picture database. The web server has an image database for storing image data, and the image stored in the image database 'can be a picture uploaded by a user who logs in to the website' may also be an imported picture from other systems, or may be through a network. The reptiles are captured from a large number of Internet web pages, and may also be obtained in other ways. The pictures are combined with one or more of the above sources, and are not limited in the present invention. . The technology that web crawlers regularly capture large amounts of web pages in the Internet is well known and will not be covered here. Each stored image also includes the file name of the image and the text content attached to the image attribute. The file name of the image and the text content attached to the -13- 201113725 image attribute can be used to represent specific content in the image. If the picture shows the picture as an mp3 player entity, the file name and/or the text content attached to the picture attribute will generally include the content "mp3". The web server can extract a certain number of images with the same text keyword from the image database in advance, for example, extracting the image including the keyword "mp3" in the text content attached to the image file name and/or image attribute. 1000 sheets. It should be pointed out that the extracted picture can be the most downloaded image of the user recorded by the website server, thus ensuring the typicality of the extracted picture. Further, the web server can classify the extracted pictures according to the shape characteristics of the pictures, for example, into several typical shape types. Still taking the above mp3 picture as an example, in the extracted 1 000 pictures about mp3, the 1 picture can be classified into several shape types according to the shape, for example, the picture showing the circular mp3 can be displayed, The picture of the diamond mp3 shows the pictures of the square mp3 and the pictures of the rectangular mp3. Regarding classifying pictures according to shape types, in particular, it is possible to classify pictures according to shape types by comparing the characteristics of pictures. This feature is to mathematically extract and express features that reflect the shape of the displayed object in the image. In the prior art, there have been several proposals for extracting image shape features. The features extracted from the image can generally be represented as vectors of a certain dimension, such as (P1, P2,. . . , Pn ), this • 14- 201113725 n-dimensional vectors, which can be used to describe the shape characteristics of objects in the image. The specific extraction method can adopt the existing image feature extraction method, such as image feature extraction using Hough transform, etc., which will not be introduced here. In addition, the following briefly introduces a better image feature extraction method, which may include the following steps: A1: pivoting the image of the contained object from the original image; A2: using the pivoted image in a single color Filling the boundary for the background and making the expanded image the smallest square; A3: scaling the square image full image to the image of the first predetermined size, and dividing the scaled image into a second predetermined size Sub-image block; A4: Calculate the brightness derivative of the adjacent picture element in the sub-image block level, vertical, positive 45°, negative 45° 9 direction, respectively, and the number of derivative points in the four directions And the total number of poles located on the four boundaries of the sub-image block as the feature vector of the sub-image block; A5: The feature vector of all the sub-image blocks is used as the feature vector of the original image. The image feature extraction method described above mainly utilizes the difference in brightness of the object between the edge portion of the object displayed in the image and the surrounding background to find the edge of the object, thereby extracting the shape feature of the object in the image, thereby Can be used as a feature of this image extraction. The image feature represented by this mode is a vector of a certain dimension such as (PI, P2'...' Pn), this n-dimensional vector, which can be used to describe the shape feature of the object in the image. Either way, the picture can have a characteristic 表明 indicating the shape of the object it displays. -15- 201113725 For example, for the above-mentioned picture containing the text "mp3", if the best image is obtained, the server can compare the features of the 1 000 pictures and divide the pictures with similar features into A picture of the same or approximate shape type. Specifically, a predetermined distance may be set, and a picture whose difference between the features 在 within a predetermined distance is set as a picture of the same or approximate shape type. The difference between the features 获得 can be obtained by finding the distance of the vector indicating the feature 値. For points A1 (X 1, y 1 ) and A 2 (X 2, y2) on a two-dimensional plane, the distance between these two points can be obtained by the formula -12) 2+ (less 1 - less 2) 2 . The coordinates of these two points A1 and A2, namely (xl, yl) and (x2, y2), can be regarded as two two-dimensional & For the points B1(xl, yl, zl) and B2(x2, y2, z2) in the three-dimensional coordinates, the distance between these two points can be obtained by the formula ^(x\-x2)2 + (^1 -y2)2 + {z\ -z2)2 Get. The coordinates of these two points Β 1 and Β 2, namely (xl, yl, ζΐ) and (x2, y2, z2) ′ can be regarded as two three-dimensional vectors. Similarly, for two n-dimensional vectors, the distance between the two vectors can be obtained by the formula + (^2 - Q2f +. . . + (Pn-Qnf is obtained, where the two vectors are (PI, P2, ..., Pn) ' (Q 1 , Q2,. . . , Qn). In this way, several typical shapes of the 1 000 pictures involving "mp3" are obtained. For each typical shape, a picture can be selected as a sample picture of the typical shape. The sample picture can be maintained by a website. A picture in the specified shape type 'can also be a picture of the shape type specified by the server according to a certain standard' here and 16-201113725 is not limited. The selected sample picture ' can be marked to facilitate subsequent return of the sample picture of the mark. In addition, the feature picture of the typical shape can also be obtained, such as the feature 每一 of each picture that has been calculated as described above. It should be noted that the shape type divided by the picture related to the same text keyword is implemented by the server. In addition, it can be implemented manually. For example, after extracting 1 〇 〇 涉及 images involving “m p 3 ”, the sample pictures of several typical shape types of the 1000 pictures can be manually obtained by the website staff. It is even possible to select several images of typical shape types directly from several pictures of “mp3” by the website staff. Further, after receiving the specified sample picture, the website server may extract the feature of the sample picture. Pre-defining the shape type of the image related to the keyword in the image database' can also manually sort the sample image by the website staff, for example, placing the sample image of the shape type more likely to be the search purpose in the front position. The sample pictures can also be sorted by the web server, for example, the sample picture corresponding to the shape type having a large number of pictures is placed in the front position. The present invention implements the image search after the server receives the image search request sent by the user terminal based on the image shape of the keyword in the image database in advance and the sample image is selected for each shape type. The first embodiment of the method may be in accordance with the process shown in FIG. 1, including -17-201113725: Step 110: The server searches the picture database for several pre-classified shape types corresponding to the keywords in the search request. The sample image ' returns the sample images of several shape types found to the client. After receiving the image search request sent by the client, the server first searches for the image data. Specifically, the sample image of several shape types corresponding to the pre-categorized keywords in the image database is searched for in the search request. For example, look up a sample picture of several shape types of a pre-categorized word in the picture database that contains the keywords in the search request. The "several" here may depend on the actual classification of the image corresponding to the keyword, that is, it may be equal to the number of the classification; on the other hand, it may also be a part of the classification according to the shape. . And 'several' here, only depends on the case of classification by shape, but 'divided into several categories (of course, usually more than or equal to 2), and actually has no effect on the implementation of this embodiment. In addition, the "several" herein may be a predetermined number. Since the picture database has pre-assigned the picture containing the keyword in the file name and/or picture attribute, the picture is classified according to the shape type as described above, and the sample picture has been selected for the classified shape type. Therefore, for the keyword in the received search request, if it is the same as a certain keyword involved in the foregoing processing in the image database, or there is an inclusion relationship, etc., for example, the keyword in the search request is included in the foregoing In a certain keyword involved in processing, or a keyword involved in the foregoing processing is included in the keyword in the search request, 'Yes' -18- 201113725 The server can easily find the keyword in the search request The same, or there are sample images of several shape types pre-classified in the image database containing the relationship. In turn, the server can return the sample images of the several shape types found to the client to provide the user's selection to select the shape type of the image that the user desires to find. Step 120: The server receives a sample picture of a certain shape type selected by the user, and searches the picture database for a picture corresponding to the keyword and the feature of the selected sample picture meets a predetermined requirement. On the webpage page returned by the server, the user can see sample images of several shape types. For the purpose of searching, the user can further select a sample image of a certain shape type to indicate that the user's search intention is to search for the selected shape type. picture of. After receiving the sample picture of a certain shape type selected by the user, the server searches the picture database for a picture corresponding to the keyword and the feature of the selected sample picture meets the predetermined requirement. Specifically, when the picture feature is in the form of a vector, the picture database may be searched for a picture whose distance from the feature 値 vector of the selected picture is below a predetermined threshold. Similar to the foregoing, the specific search method can be performed by calculating an example of the feature 値 vector of the selected picture and the feature 値 vector of the picture in the picture database. As mentioned above, for two n-dimensional vectors, the distance between the two vectors can be obtained by the formula ^(Ρ\ - ρΐ)2 + (Ρ2 - Q2f +. . . + (Pn-Qnf gets 'where the two vectors are (P1, P2, . . . , Pn ), (Ql, Q2,. . . , Qn). Let (PI, P2,..., Pn) be the characteristic 选定 vector of the selected picture, (Ql, Q2,. . . , Qn) is the -19-201113725 feature 値 vector of a picture in the image database. Then the distance between the two can be obtained by the above formula. Generally, a picture having a distance of 〇 is a picture of the same shape, and a distance within a certain range can be regarded as an image of an approximate shape. This range can be set by the predetermined threshold 所述. For example, if 闽値 is set to 1 〇, it means that the image with the feature 値 vector distance of 10 is selected as the search result, that is, the same or similar shape as the selected image, so that the image database can be used later. These images of the same shape as the selected image are returned to the client. Searching in the picture database for a picture corresponding to the keyword and satisfying a predetermined requirement with the feature of the selected sample picture may be searching for a feature in the picture database and satisfying a predetermined requirement of the selected sample picture. After the picture, the searched image is filtered out of the file name and/or the attached text content in the picture attribute containing the picture of the keyword. Of course, it is also possible to search for a picture in the picture database and the text content attached to the file attribute, including the picture of the keyword, and then search and select the selected picture corresponding to the keyword. The characteristics of the sample image are pictures that meet the predetermined requirements. Step 1 3 0: The server returns the searched picture to the user. After this step, the search results displayed by the user are all pictures that satisfy the user's willingness to search. If the user proposes a search request with the keyword "mp3", since the user can select a certain shape of the mp3, such as a circle, in the centralized shape type returned by the server in step 1200, then, the user in step 130 The search results received by the end are all about the round mp3 figure -20-201113725 pieces. The server returns the searched image to the client according to the number of clicks in at least the order. Generally, the image database will also record the number of clicks (or the number of visits) of the image, which is easy to understand. The number of clicks is often paid attention by the user, and vice versa, which is less noticeable for the user. Then, prioritizing the return of images with a large number of clicks will make it easier to meet the user's search needs. Need to add is 'after step 130' the client will usually click on a specific picture in the searched image', then the server can also record the specific picture clicked by the user, so that the server can Accumulate its clicks (or visits). Therefore, the above-mentioned website server extracts a number of pictures with the largest number of clicks of a certain keyword user, and the click volume of the mentioned picture may be the number of user clicks accumulated by the server. In this way, the user's access to the image and the server's pre-extraction of a key word according to the image click amount can constitute a self-feedback system. This is similar in the following examples. It can be seen from the above-mentioned first embodiment that after the server receives the image search request sent by the user, the server searches the image database for the samples of the pre-classified several shape types corresponding to the keywords in the search request. a picture, and returning the sample pictures of the several shape types found to the user end; the server receives the sample picture of a certain shape type selected by the user end, and searches the picture database for the characteristics of the selected sample picture値The image that satisfies the predetermined requirement; the server returns the searched image to the user, and can search for the image according to the user's intention. In particular, it can realize the image shape type corresponding to the user search keyword, and then follow The shape type selected by the user searches for a similarly shaped image to satisfy the user's search needs 'improving the user's experience. In the above embodiment, it should be noted that the sample picture with a typical shape is extracted in advance, and the purpose is to extract a picture of several typical shapes related to a certain keyword in the picture database, and these typical shapes are generally It will not change for a long period of time, so it can be executed once in a longer interval. The data in the image database, due to the time uncertainty of the user uploading the image, and the high-frequency crawling of the web crawler in the Internet, the server must immediately receive the search request in step 120. Perform a search for images in the image library to ensure that the search object includes the most recent image, and then it is possible to include the latest image in the search results. A second embodiment of the method for implementing picture search according to the present invention is described below. It should be noted that the following second method embodiment focuses on the differences from the first embodiment, and reference is also made to the related description in the first method embodiment. In order to implement the picture search in the second method embodiment of the present invention, the website server needs to classify the corresponding picture according to the shape of the object in the picture according to the keyword in advance in the picture database. As mentioned above, the image server stored in the web server has the image stored in the image database, which may be the image uploaded by the user who logs in to the website, or the image imported from other systems. It can be a web crawler that captures a large number of webpages from -22-201113725 to 'pictures that may be otherwise obtained' or a combination of one or more of the above sources. . Each stored picture also includes the file name of the picture and the text content attached to the picture attribute. The web server can pre-categorize the images in the image database according to predefined keywords, for example, classify the image including the keyword "mp3" in the text content attached to the image file name and/or image attribute. , and the pictures including other keywords in the text file name and/or picture attribute are classified into another class. Further, the web server can classify the extracted images corresponding to a type of keyword according to the shape characteristics of the image, for example, into several typical shape types. For example, in the picture with the above keyword mp3, in the picture with the keyword mp3, the pictures can be classified into several shape types according to the shape, for example, the picture including the circular mp3 can be displayed, and the diamond mp3 is displayed. The picture shows the picture of the square mp3 and the pictures of the picture of the rectangular mp3. Regarding classifying pictures according to shape types, in particular, it is possible to classify pictures according to shape types by comparing the characteristics of pictures. This feature is to mathematically extract and express features that reflect the shape of the displayed object in the image. In the prior art, there have been several proposals for extracting image shape features. The feature extracted from the image can generally be represented as a vector of a certain dimension, such as (PI, P2,...'Pn) 'this n-dimensional vector, so that the vector can be used to describe the shape of the object in the image-23- 201113725 . For the specific extraction method, the existing image feature extraction method, such as image feature extraction using Hough transform or the like, or the image feature extraction mentioned in the above A1 to A5, may not be repeated here. For example, for a picture containing the text "mp3" in the above picture database, the server may compare the features of the pictures to divide the pictures with similar features into pictures of the same or approximate shape type. Specifically, a predetermined distance may be set, and a picture in which the difference between the features 在 is within a predetermined distance is set as a picture of the same or approximate shape type. The difference 値 of the features 可以 can be obtained by finding the distance of the vector indicating the feature 値. As described above, for two n-dimensional vectors, the distance between the two vectors can be obtained by the formula V(P1 ~ Ql)2+ (P2 - Q2f +. . . +(Pn - Qnf is obtained, where the two vectors are (Ρ1, Ρ2, ·. ·, Ρη ), (Ql, Q2". . , Qn). Thus, several typical shapes of pictures involving "m P 3 " in the picture database are obtained. For each typical shape, a picture can be selected as the sample picture of the typical shape. Further, after the website server receives the specified sample picture, the feature of the sample picture can be extracted. The shape of the image involved in the keyword in the image database is divided in advance, and the sample image can be manually sorted by the website staff, for example, the sample image of the shape type more likely to be the search purpose is placed in the front position. The sample image can also be sorted by the web server, for example, the sample image corresponding to the shape type containing a large number of images is placed in the front position -24 - 201113725. The second embodiment of the present hair image search method is performed after the image search type related to the keyword in the image database is pre-selected, and the image search request sent by the user terminal is received after the sample image is selected for each shape type. It can be as shown in Figure 2: Step 2 1 0: The server searches the picture database for the pre-categorized samples of several shape types corresponding to the keywords in the picture, and finds several shape types of the search. The sample picture is returned to the image data requesting by the server to receive the image search request sent by the user end, and specifically, the search for the search key word in the picture database corresponding to the pre-classified several shapes of the picture, such as Find a sample image of several shape types of the pre-categorized image search library containing the search request words. On the one hand, it may depend on the actual classification of the corresponding picture of the keyword, that is to say, it may be equal to the number of the classification, or may be a part of the classification according to the shape, and the "several" here, only In the case of classification by shape, into several categories (of course, usually greater than or equal to 2), in fact, the implementation has no effect. Because the image database has pre-recorded the file name and / or the text content of the attached text contains a key The picture of the word is classified according to the shape type according to the method, and the sample picture has been shaped for the classification, so 'for the divided shape in the received search request, when the servo implementation map process, the package search requests the picture, The client. First of all, in the key of the type of the type of seeking, the "several shape"; the other side. And, however, the picture type attribute of the present embodiment is selected as the keyword, -25- 201113725 if it is the same as a certain keyword involved in the foregoing processing in the picture database, or there is an inclusion relationship, etc., such as in a search request. The keyword is included in a certain keyword involved in the foregoing processing, or a keyword involved in the foregoing processing is included in the keyword in the search request, and the server can easily find the search request. The keywords in the same are the same, or there are sample images of several shape types pre-classified in the image database containing the relationship. In turn, the server can return the sample images of the several shape types that are found to the client to provide the user's selection to select the shape type of the image that the user desires to find. Step 220: The server receives the sample picture of a certain shape type selected by the user end, and returns the picture in the picture database of the same or similar shape type as the submitted sample picture. The server returns the searched image to the client according to the number of clicks in at least the order. It can be seen from the foregoing second embodiment that after the server receives the image search request sent by the user, the server searches the image database for a sample of several pre-classified shape types corresponding to the keywords in the search request. The image returns the sample images of the several shape types found to the client; the server receives the sample image of a certain shape type selected by the user, and returns a picture database of the same or approximate shape type as the submitted sample image. In the picture, in this way, it is possible to return the searched image according to the user's intention, in particular, it is possible to provide the image shape type corresponding to the user search keyword, and then return the searched similar shape image according to the shape type selected by the user, thereby Meet the user's search needs and improve the user's -26-201113725 experience. In the above embodiment, it should be noted that the server performs a lot of work in the pre-processing, for example, pre-classifying the image according to as many keywords as possible in the image database, and further, it is necessary to The classified images involved in the keyword are divided according to the shape type, and a sample image is provided for each shape. Further, when the server receives the search request sent by the user, the server may directly search whether the keyword classified in the image database has the same or the same keyword in the search request, and if yes, provide the client. The shape of the image corresponding to the keyword is selected, and the image in the image database corresponding to the selected shape is immediately returned to the user. In this embodiment, for a small website, such as a picture database, the size of the image database is not particularly large, and it is not a frequent update, which is convenient and practical. Even in the case of frequent updates, the same purpose can be achieved as long as the web server can perform the pre-processing as frequently. A third embodiment of the method for implementing picture search according to the present invention is described below. FIG. 3 is a flowchart of an embodiment of the method, as shown in the figure, including: Step 3: 0: The server receives a picture search request sent by the user. The image search request sent by the client includes a text keyword, that is, the image content attached to the image file name or the image attribute includes a picture of the keyword in the search request. Step 3 2 0: The server searches for a picture corresponding to the keyword in the search request in the picture database. There are a large number of pictures stored in the picture database 'as described in 011, these pictures -27- 201113725 pieces, which can be uploaded by users who log in to the website, or imported pictures from other systems, or through Web crawlers are captured from a large number of Internet pages, and may also be obtained in other ways, or in combination with one or more of the above sources. Each stored image also includes the file name of the image and the text content attached to the image attribute. The textual name of the image and/or the textual content attached to the image attribute can be used to represent specific content in the image. If the picture shows the picture as an mp3 player entity, the file name and/or the text content attached to the picture attribute will generally include the content "mp3". After the server receives the search request sent by the client, in step 3 20, the server searches for the image of the image database by using the keyword included in the search request. Specifically, the image database can be searched. The text content attached to the file name and/or picture attribute includes a predetermined number of pictures of the keywords in the search request, that is, a predetermined number of pictures corresponding to the keywords in the search request are searched in the picture database. If the search request includes the keyword "mp3", you can find the image file name and/or the text content attached to the image attribute containing 1 picture of the keyword. Here, the predetermined number of pictures corresponding to the keywords in the search request in the picture database are searched, instead of all the pictures corresponding to the keywords in the search request in the picture database, because the step is only for extracting typical The picture, in the subsequent steps from these typical pictures can be divided into -28-201113725 class as a centralized shape type, for subsequent user selection, and then in the selected shape in the image database for a wide range of search. Therefore, in the step, the typical picture corresponding to the keyword should be searched for the purpose of obtaining the shape type, and the short execution time is taken into consideration to reduce the time of the entire search process. In order to achieve this, the image database can preferentially return those images with a high number of accesses corresponding to the keyword. Step 3 3 0: The server classifies the found picture according to the shape of the object in the picture, and selects a sample picture for each shape type, and then returns a predetermined number of shape type sample pictures to the user end. The server can classify the pictures searched in step 320 according to the shape characteristics of the pictures, for example, into several typical shape types. Still taking the mp3 picture as an example, in the picture about the mp3 searched by the keyword, the pictures can be classified into several shape types according to the shape, for example, the picture showing the circular mp3 can be displayed, and the picture of the diamond mp3 is displayed. Display square mp3 pictures, as well as display rectangular mp3 pictures. Regarding classifying pictures according to shape types, in particular, it is possible to classify pictures according to shape types by comparing the characteristics of pictures. The manner in which the feature is compared to determine the shape type of the picture is similar to that in the first method embodiment described above. For example, for the above-mentioned 1 〇〇〇 picture containing the text “mp3”, the server may compare the features of the 1 〇〇〇 picture to the same picture or the approximate shape type. For the specific picture, the predetermined distance can be set, and the picture with the difference of the feature 在 within the predetermined distance -29-201113725 is set as the picture of the same or approximate shape type. The difference between the features 获得 can be obtained by finding the distance of the vector indicating the feature 値. This is similar to the foregoing. After that, you can select a picture for each typical shape as a sample picture of the typical shape. Further, the server returns a predetermined number of sample pictures of the shape type to the client. Step 340: The server receives the sample picture of a certain shape type selected by the user, and searches the picture database for a picture corresponding to the keyword and the feature of the selected sample picture meets the predetermined requirement. The user terminal receives the sample picture of the predetermined number of shape types sent by the server in step 330, and the user can select one of the sample pictures, thereby indicating that the user searches for the aforementioned keyword, and intends to search for a certain shape. The result of the picture, and the specific shape is the shape type represented by the sample picture selected by the user. After submitting the selected sample image, the user submits it to the server via the network. After receiving the sample picture of a certain shape type selected by the user end, the server searches for the selected sample picture in the picture database. Specifically, searching for the corresponding keyword in the picture database and selecting the picture The characteristics of the sample image are pictures that meet the predetermined requirements. When the picture feature is in the form of a vector, the picture library may be searched for a picture whose distance from the feature 値 vector of the selected picture is below a predetermined threshold. The specific search method similar to the foregoing can be performed by calculating an example of the feature 値 vector of the selected picture and the feature 値 vector of the picture in the picture database. As mentioned above, for two n-dimensional vectors, the distance between the two to -30-201113725 can be obtained by the formula yl(P\ - Q\)2 + (P2 - Q2f +. . . + {Pn-Qnf is obtained, where the two vectors are (P1, P2, ..., Pn) ’ (Ql, Q2,. . . , Qn). Let (Ρ1,Ρ2,···,Ρη) be the feature 値 vector of the selected picture, (Q1, Q2, ..., Qn) is the feature 値 vector of a picture in the picture database. Then the distance between the two can be obtained by the above formula. Generally, a picture having a distance of 〇 is a picture of the same shape, and a distance within a certain range can be regarded as an image of an approximate shape. This range can be set by the predetermined threshold 所述. For example, setting the threshold 1 to 1 〇 indicates that the image with the feature 値 vector of the selected picture is within 10, as the search result, that is, the same shape as the selected image, so that the image database can be followed by The image with the same shape of the selected image is returned to the client. Searching in the picture database for a picture corresponding to the keyword and satisfying a predetermined requirement with the feature of the selected sample picture may be searching for a feature in the picture database and satisfying a predetermined requirement of the selected sample picture. After the picture, the searched image is filtered out of the file name and/or the attached text content in the picture attribute containing the picture of the keyword. Of course, it is also possible to search for a picture in the picture database and the text content attached to the file attribute, including the picture of the keyword, and then search and select the selected picture corresponding to the keyword. The characteristics of the sample image are images that meet the requirements of the preview. Step 3: 0: The server returns the searched picture to the user. After this step, the search result displayed by the user terminal is a picture that satisfies the willingness to search with -31 - 201113725. If the user proposes a search request with the keyword "mp3", since the user can select a certain shape of mp3 'such as a circle in the centralized shape type returned by the server in step 120, then the search received by the client in step 130 is performed. The result is all about round mp3 images. The server returns the searched image to the client according to the number of clicks in at least the order. It can be seen from the foregoing third embodiment that the server receives the image search request sent by the user terminal; the server searches the image database for the image corresponding to the keyword in the search request; the server searches the searched image Sorting according to the shape of the object in the picture, and selecting a sample picture for each shape type, and then returning a predetermined number of sample images of the shape type to the user end; the server receives the sample picture of a certain shape type selected by the user end, And searching in the picture database for the picture that meets the predetermined requirement of the selected sample picture; the server returns the searched picture to the user end, so that the search for the picture according to the user intention can be implemented, in particular, The image shape type corresponding to the user search keyword is provided, and then a similarly shaped image is searched according to the shape type selected by the user, thereby satisfying the user's search requirement and improving the user experience. In the case where the picture database is relatively large, the third embodiment requires the server to have a high software and hardware access speed and processing capability. A third embodiment of the method for implementing picture search according to the present invention is described below. FIG. 4 shows a flow chart of the method embodiment, as shown in the figure, including: Step 4: 〇: The server receives the image search sent by the user, please request -32- 201113725. The image search request sent by the client includes the text keyword. The text content attached to the picture file name or picture attribute includes the picture of the keyword in the picture. Step 420: The server searches for a picture corresponding to the searched keyword in the picture database. There are a large number of images stored in the image database. As mentioned above, the images can be uploaded by users who log in to the website, or imported images from the system, or they can be crawled from the Internet through web crawlers. If you get it, you may get it in other ways, or it may be a picture of one or several of the above sources. Each stored image also includes the file name of the image and the text content attached to the image. The textual name of the image and/or the textual content of the image attribute can be used to represent specific content in the image. The content displayed in the image is an mp3 player entity, and the text content attached to the image and/or image attributes generally includes 1 content. Step 43 0: The server classifies the found picture according to the shape of the picture body, and selects a sample picture for each shape type and returns a predetermined number of shape type sample pictures to the client server. The pictures searched in 4 2 0 are classified according to the feature of the figure', for example, into several typical shape types. The mp3 picture is an example of 'searching for mp3 by keyword, that is, please search for the request. These pictures are from the mass of the picture to the picture attribute attached to the picture file name mp3 piece of film, enter In the picture-33-201113725, the pictures can be classified into several shape types according to the shape, such as a picture showing a circular mp3 'displaying a picture of a diamond mp3' showing a square mp3 picture, and Display these types of pictures of rectangular mp3. Regarding classifying pictures according to shape types, in particular, it is possible to classify pictures according to shape types by comparing the characteristics of pictures. The manner in which the feature is compared to determine the shape type of the picture is similar to that in the first method embodiment described above. For example, for the above-mentioned searched picture containing the text "mp3", it is possible for the server to compare the features of the pictures, and to divide the pictures with similar features into pictures of the same or approximate shape type. Specifically, a predetermined distance may be set, and a picture having a difference of the feature 在 within a predetermined distance is set as a picture of the same or approximate shape type. The difference between the features 获得 can be obtained by finding the distance of the vector indicating the feature 値. This is similar to the foregoing. Then, a picture can be selected for each typical shape as a sample picture of the typical shape. Further, the server returns a predetermined number of sample pictures of the shape type to the client. Further, the server may extract only a certain number of pictures from the picture corresponding to the keyword in the search request, for example, extract only 100 pictures, and then perform the 1000 pictures according to the shape of the object in the picture. The classification is performed, and a sample picture is selected for each shape type, and a sample picture of a predetermined number of shape types is returned to the client. This can improve the efficiency of the search. -34- 201113725 Step 440: The server receives the sample picture of a certain shape type selected by the client, and returns the picture of the shape type in the picture database to the user. The client receives the sample picture of the predetermined number of shape types sent by the server in step 430, "the user can select one of the sample pictures" to indicate that the user searches for the aforementioned keyword, and has an intention The result of a picture of a particular shape, which is the type of shape represented by the sample picture selected by the user. After submitting the selected sample image, the user submits to the server via the network. After the server receives the sample picture of a certain shape type selected by the user end, the image corresponding to the searched keyword is classified in the foregoing step 430, and the shape type is included in the sample picture selected by the user. The picture has been divided, so, in step 440, the picture corresponding to the shape type can be directly returned. If the user selects a circular mp3, the server has divided the found mp3 into multiple shape types, including the circular mp3. Therefore, in this step, the server can be classified into a circle. The mp3 image is returned to the client. The image that the server finally returns to the client can be returned in at least the order of the number of clicks. It can be seen from the foregoing fourth embodiment that the server receives the image search request sent by the user terminal; the server searches for the image corresponding to the keyword in the search request in the image database; the server searches the image that is found According to the shape of the object in the picture, and select the sample picture for each shape type, and then return the sample picture of the predetermined number of shape types to the user-35-201113725; the server receives a certain shape type selected by the user end. The sample image, and return the image of the shape type in the image database to the user end, so that the image can be searched according to the user's intention, in particular, the image shape type corresponding to the user search keyword can be provided, and then the user selects the image. The shape type returns a picture of the shape, thereby satisfying the user's search needs and improving the user experience. The fourth embodiment is applicable to the case where the size of the picture database is not very large, so that classifying the searched picture according to the shape of the object in the picture does not occupy the entire search process for a long time. Of course, the high software and hardware access speed and processing power of the servo device are also important factors affecting the search efficiency. The following describes a first embodiment of a server for implementing picture search according to the present invention. FIG. 5 shows a block diagram of the embodiment. FIG. 5 includes: a picture database 51 in which pictures are stored for pictures corresponding to the same keyword. 'Pre-classified according to the shape of the object in the picture, and each shape type has a selected sample picture; the search request receiving unit 52' is configured to receive a picture search request sent by the user; the sample picture returning unit 53 is used for the picture Searching, in the database, the sample pictures of the pre-classified several shape types corresponding to the keywords in the search request and returning the sample pictures of the several shape types found to the user end; the selected picture receiving unit 54' is used for Receiving a sample picture of a certain shape type selected by the user end; -36- 201113725 searching unit 5 5, for searching in the picture database for the corresponding keyword and the feature of the selected sample picture meets the predetermined requirement The search result return unit 5 6 is configured to return the searched picture to the client. Preferably, the server that implements the image search may further include a sorting unit 57 for sorting the selected sample images in the image database, for example, arranging the sample images corresponding to the shape types of the plurality of images. Front position. Preferably, the images in the image library, including uploaded images and/or images captured from a vast number of internet pages via web crawlers. Preferably, the server for realizing picture search further includes a classifying unit 58 for classifying the pictures in the picture database according to the shape of the objects in the picture by comparing the features of the pictures. Preferably, the feature of the comparison picture includes setting a picture having a difference of the feature 在 within a predetermined distance as a picture of the same or approximate shape type. Preferably, the picture that satisfies the predetermined requirement includes a picture in the picture database that is less than a predetermined frame from a feature 値 vector of the selected picture. The method for implementing the image search by using the server embodiment is similar to the foregoing first method embodiment. The specific execution of each unit and the interaction between the units are similar to the foregoing fourth method embodiment, and details are not described herein again. The following describes a second embodiment of the server for implementing picture search according to the present invention. FIG. 6 shows a block diagram of the embodiment, as shown in FIG. 6, including: -37-201113725 Picture database 61, in which pictures are stored, corresponding to the same The picture of the keyword is pre-classified according to the shape of the object in the picture, and each shape type has a selected sample picture; the search request receiving unit 62 is configured to receive a picture search request sent by the user; the sample picture returning unit 63 And searching for a sample image of several shape types of the pre-categorized corresponding to the keyword in the search request in the image database, and returning the sample images of the several shape types found to the user end; The unit 64 is configured to receive a sample picture of a certain shape type selected by the user end. The search result returning unit 65 is configured to return a picture in the picture database of the same or approximate shape type as the submitted sample picture. The method for implementing image search by using the server embodiment is similar to the foregoing second method embodiment, and the specific execution of each unit and the interaction between the units are similar to the foregoing fourth method embodiment. This will not be repeated here. The following describes a third embodiment of the server for implementing picture search according to the present invention. FIG. 7 shows a block diagram of the embodiment. FIG. 7 includes: a picture database 71 in which pictures are stored; and a search request receiving unit 72. Receiving a picture search request sent by the user end; the searching unit 73 is configured to search for a picture corresponding to the keyword in the search request in the picture database; the classification unit 74 is configured to: use the searched picture according to the picture -38- 201113725 The shape of the object is classified; the sample picture returning unit 75 is configured to select a sample picture for each shape type classified by the classification unit, and then return a sample picture of a predetermined number of shape types to the user end; The unit 76 is configured to receive a sample image of a certain shape type selected by the user end, and the searching unit 77 is configured to search, in the image database, the feature corresponding to the keyword and the selected sample image meets a predetermined requirement. The search result is returned to unit 78 for returning the searched picture. The method for implementing the image search by using the server embodiment is similar to the foregoing third method embodiment, and the specific execution of each unit and the interaction between the units are similar to the foregoing fourth method embodiment, and details are not described herein again. The following describes a fourth embodiment of the server for implementing picture search according to the present invention. FIG. 8 shows a block diagram of the embodiment. As shown in FIG. 8, the method includes: a picture database 81 in which pictures are stored; a search request receiving unit 8 2, For receiving a picture search request sent by the user; the searching unit 83 is configured to search for a picture corresponding to the keyword in the search request in the picture database; the classification unit 84 is configured to: follow the searched picture The shape of the object in the picture is classified; the sample picture returning unit 85 is configured to select a sample picture for each shape type classified by the classification unit, and then return a predetermined number of shape types to the user end; The selected picture receiving unit 86 is configured to receive a sample picture of a certain shape type selected by the user end; the search result returning unit 87 is configured to return a picture in the picture database of the same or approximate shape type as the submitted sample picture. The method for implementing the image search by using the server embodiment is similar to the foregoing fourth method embodiment, and the specific execution of each unit and the interaction between the units are similar to the foregoing fourth method embodiment, and details are not described herein again. For the convenience of description, the above devices are described in terms of functions and are divided into various units for description. Of course, the functions of the various units can be implemented in the same or multiple software and/or hardware in the practice of the invention. From the description of the above embodiments, it will be apparent to those skilled in the art that the present invention can be implemented by means of a software plus a necessary universal hardware platform. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, can be embodied in the form of a software product that can be stored in a storage medium such as a ROM/RAM, a disk, Optical disks, etc., include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or portions of the embodiments. The various embodiments in the present specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each of the embodiments focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description of -40-201113725 is relatively simple, and the relevant parts can be referred to the description of the method embodiment. The invention is applicable to a wide variety of general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, small computers, Large computers, decentralized computing environments including any of the above systems or devices, and more. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in a distributed computing environment where tasks are performed by remote processing devices that are connected through a communication network. In a decentralized computing environment, the program modules can be located in local and remote computer storage media, including storage devices. While the invention has been described by the embodiments of the present invention, it will be understood that BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, in the following description The drawings are only -41 - 201113725. Some embodiments described in the present invention can be obtained by those skilled in the art from the drawings without further inventive labor. 1 is a flowchart of a first embodiment of a method for implementing a picture search according to the present invention; FIG. 2 is a flowchart of a second embodiment of a method for implementing picture search according to the present invention, and FIG. 3 is a third embodiment of a method for implementing picture search according to the present invention. Figure 4 is a flow chart of a fourth embodiment of a method for implementing a picture search according to the present invention: Figure 5 is a block diagram of a first embodiment of a server for implementing picture search according to the present invention; FIG. 7 is a block diagram of a third embodiment of a server for implementing a picture search according to the present invention; FIG. 8 is a block diagram of a fourth embodiment of a server for implementing picture search according to the present invention. [Main component symbol description] 5 1 : Picture database 52: Search request receiving unit 53: Sample picture returning unit 54: Selected picture receiving unit - 42 - 201113725 5 5 : Search unit 56: Search result returning unit 5 7 : Sorting unit 58 : Classification unit 6 1 : Picture database 6 2 : Search request receiving unit 63 : Sample picture return unit 64 : Selected picture receiving unit 65 : Search result return unit 7 1 : Picture database 72 : Search request receiving unit 73 : Search Unit 74: Classification unit 75: Sample picture return unit 76: Selected picture receiving unit 7 7: Search unit 7 8: Search result return unit 8 1 : Picture database 8 2 : Search request receiving unit 8 3 : Search unit 8 4 : Classification unit 85: sample picture return unit 86: selected picture receiving unit 87: search result return unit -43