201207646 六、發明說明: 【發明所屬之技術領域】 本發明涉及網路技術領域,特別是涉及一種基於垂直 搜索的查詢方法、系統和裝置。 【先前技術】 隨著網際網路的日益發展,網際網路上儲存的資訊量 曰趨龐大。當人們需要獲取某方面的專用資訊時,藉由搜 索引擎進行搜索。但由於網際網路上的資訊量過大,採用 通用搜索方式獲取的査詢結果缺乏準確性,於是垂直搜索 方式得到了快速的發展。垂直搜索是針對某一個行業的專 業搜索引擎,是搜索引擎的細分和延伸,是對網頁庫中的 某類專門的資訊進行一次整合,定向分欄位抽取出需要的 資料進行處理後再以某種形式返回給用戶。相對通用搜索 引擎的資訊量大、査詢不準確、深度不夠等提出來的新的 搜索引擎服務模式,藉由針對某一特定領域、某一特定人 群或某一特定需求提供的有一定價値的資訊和相關服務。 其特點就是“專、精、深”,且具有行業色彩,相比較通用 搜索引擎的海量資訊無序化,垂直搜索引擎則顯得更加專 注、具體和深入。 垂直搜索引擎的應用方向很多,比如企業庫搜索、供 求資訊搜索引擎、購物搜索、房產搜索、人才搜索、地圖 搜索、mp3搜索、圖片搜索等,幾乎各行各業各類資訊都 可以進一步細化成各類的垂直搜索引擎。 -5- 201207646 當垂直搜索用於購物搜索時’用戶在B2C ( Business to Customer,企業對消費者購物模式)或C2C( Consumer to Customer,消費者對消費者購物模式)購物網站輸入査 詢詞購物,如圖1 (a)和圖1 (b)所示’通常會返回兩部 分的結果:1 .商品分類的導航 送的商品類目對應的屬性類目 商品。導航的商品分類名稱依 用戶沿樹結構的路徑自上而下 更準確的査詢結果。屬性類 錄獲得的用戶關注度較高的商 屬性。 •商品類目樹結構保存在資 的輸入與維護需要人工進行, 商品的展示都必須屬於該商品 節點。 當前的電子商務網站往往 品分類過多。在上億規模的商 會接近一萬個節點,每一層級 幾十個。在用戶査詢時,顯示 ,並且無法告訴用戶這些商品 要。對該問題,目前主流的解 個統計每個類目下的返回結果 目依據商品數量按照從大到小 閥値。把商品數低於這個閥値 資訊,即商品類目,2 .與推 ,3 .對應商品類目下推送的 據樹的結構組織起來,方便 藉由商品分類的資訊定位到 目爲根據用戶的歷史點擊記 品類目中關注度較高的商品 料庫相對應的資料表,資料 在B2C或C2C網站中每一個 類目樹的某一個節點或多個 商品數量過於龐大,導致商 品數量上,商品類目樹通常 的類目節點數量往往會多達 給用戶的商品分類資訊過多 類目哪些對用戶的査詢更重 決方式是當用戶查詢時,逐 數量。然後把這些商品類 進行排序,並且設置一定的 的類目隱藏起來。達到減少 -6- 201207646 分類數量的目的。 在實現本發明的過程中,發明人發現現有技術至少存 在如下問題: (1 )顯示的類目與用戶的査詢相關性很低。 (2 )商品分類之間沒有機制決定哪個商品類目更重 要。 (3 )對於商品的類目顯示的數量僅僅用閥値控制會 把相關性高的類目隱藏起來。 【發明內容】 本發明實施例提供一種基於垂直搜索的查詢方法、系 統和裝置,用於提高用戶査詢結果與用戶查詢意圖的相關 度,提高用戶體驗感。 本發明實施例提供一種基於垂直搜索的査詢方法,包 括: 獲取用戶的查詢資訊; 根據所述查詢資訊在類目模型庫中檢索與所述查詢資 訊相匹配的類目模型,並根據檢索到的類目模型生成第一 查詢結果’所述類目模型包括與用戶輸入的關鍵字對應的 商品類目;並根據所述查詢資訊在商品庫中搜索與所述查 詢資訊相匹配的商品類目,生成第二查詢結果; 對所述第一查詢結果和所述第二査詢結果合倂,生成 最終查詢結果。 其中,所述生成最終査詢結果之後,還包括: 201207646 將所述最終査詢結果發送給用戶,使所述用戶進行查 看’並根據所述用戶對所述最終査詢結果的點擊操作和所 述查詢資訊生成日誌,對所述日誌進行統計分析獲得類目 模型’將所述類目模型更新到所述類目模型庫中。 其中,所述類目模型還包括:與所述商品類目對應的 隨性類目; 所述生成第二査詢結果的方法,還包括:根據所述査 詢資訊在商品庫中搜索與所述査詢資訊相匹配的商品類目 和與所述商品類目對應的屬性類目。 其中,所述査詢資訊僅包括用戶輸入的關鍵字時,所 述根據所述查詢資訊在類目模型庫中檢索與所述査詢資訊 相匹配的類目模型,並根據檢索到的類目模型生成第一查 詢結果,具體包括: 判斷類目模型對應的關鍵字中是否存在與所述査詢資 訊中的關鍵字匹配的關鍵字; 若存在,則根據所述査詢資訊中的關鍵字在所述類目 模型庫中檢索,査詢並獲取匹配的類目模型;否則,對所 述査詢資訊中關鍵字進行改寫,並進行再次判斷,直到判 斷結果爲存在並獲取到匹配的類目模型爲止; 根據所獲取的類目模型及其對應的權重和所獲取的直 達屬性的屬性類目及其對應權重,生成第一査詢結果。 其中,所述査詢資訊包括用戶輸入的關鍵字和用戶所 選擇的商品類目時,所述根據所述查詢資訊在類目模型庫 中檢索與所述査詢資訊相匹配的類目模型,並根據檢索到 -8- 201207646 的類目模型生成第一査詢結果,具體包括: 判斷類目模型對應的關鍵字中是否存在與所述查詢資 訊中的關鍵字匹配的關鍵字; 若存在,則根據所述用戶輸入的關鍵字在所述類目模 型庫中檢索,查詢並獲取匹配的類目模型;否則,對所述 查詢資訊中關鍵字進行改寫,並進行再次判斷’直到判斷 結果爲存在並獲取到與該關鍵字匹配的類目模型爲止; 從所獲取的類目模型中獲取與該查詢資訊中的商品類 目匹配的類目模型; 獲取與該商品類目匹配的類目模型中的商品類目及其 對應的權重,生成第一查詢結果。 其中,對所述第一查詢結果和所述第二查詢結果合倂 ,生成最終査詢結果,具體包括: 獲取第一合倂結果,所述第一合倂結果爲所述第一査 詢結果和所述第二查詢結果中相同的商品類目及其對應的 權重,其中第一合倂結果中的權重根據同一商品類目來自 兩個査詢結果的權重進行加權獲得; 獲取第二合倂結果,所述第二合倂結果爲僅在所述第 二査詢結果中出現的商品類目及其對應的權重; 對第一合倂結果中的權重進行權重提升,分別使第一 合倂結果中商品類目和屬性類目的每一個權重高於第二合 倂結果中的商品類目和屬性類目的每一個權重; 按照商品類目對應的權重和與商品類目對應的屬性類 目對應的權重由高到低的順序排列’並返回給用戶。 -9- 201207646 其中,對所述第一查詢結果和所述第二查詢結果合倂 ,生成最終査詢結果,具體包括: 獲取第-合倂結果’所述第—合倂結果爲所述第—查 過結果和所述第—査詢結果中相同的商品類目及其對應的 權重和與商品類目對應的屬性類目及其對應權重,其中第 一合倂結果中的權重根據同—商品類目或屬性類目的來自 兩個查詢結果的權重進行加權獲得; 獲取第二合倂結果,所述第二合倂結果爲僅在所述第 —査詢結果中出現的商品類目及其對應的權重和與所述商 品類目對應的屬性類目及其對應權重; 對第一合倂結果中的權重進行權重提升,分別使第一 合併結果中商品類目和屬性類目的每—個權重高於第二合 倂結果中的商品類目和屬性類目的每—個權重; 按照商品類目對應的權重和與商品類目對應的屬性類 目對應的權重由高到低的順序排列,並返回給用戶。 其中’所述根據所述用戶對所述最終査詢結果的點擊 操作和所述查詢資訊生成日誌,具體包括: 獲取用戶對作爲請求回應返回的商品類目、與商品類 目對應的屬性類目和商品進行點擊查看的點擊操作; 根據點擊操作生成日誌’所述日誌包括查詢資訊和對 應的點擊資訊,所述點擊資訊包括點擊的商品所在商品類 目和所屬商品屬性、點擊的商品類目和點擊的屬性類目; 儲存所生成的日誌。 其中,所述對所述日誌進行統計分析獲得類目模型, -10- 201207646 具體包括: 根據所述日誌記錄中的查詢資訊和對應的點擊資訊對 所述日誌記錄進行統計分析,獲得統計分析結果,所述統 計分析結果爲與所述查詢資訊對應的商品類目及其對應的 權重和與商品類目對應的屬性類目及其對應權重;所述權 重爲所述商品類目和與商品類目對應的屬性類目點擊次數 和/或點擊機率; 根據所述統計分析結果生成類目模型,並將所述統計 分析結果按照商品類目樹進行排列。 其中,所述根據所述統計分析結果生成類目模型,具 體包括: 判斷與所述查詢資訊對應的商品類目及其對應的權重 和與商品類目對應的屬性類目及其對應權重是否達到預設 的權重門限; 當達到預設的權重門限時,根據與所述查詢資訊對應 的商品類目及其對應的權重和與商品類目對應的屬性類目 及其對應權重建立類目模型》 本發明實施例還提供一種基於垂直搜索的查詢系統, 包括査詢伺服器、建模伺服器和日誌伺服器,其中, 所述査詢伺服器,用於獲取用戶的査詢資訊;根據所 述查詢資訊在類目模型庫中檢索與所述查詢資訊相匹配的 類目模型,並根據檢索到的類目模型生成第一査詢結果, 所述類目模型包括與用戶輸入的關鍵字對應的商品類目; 並根據所述查詢資訊在商品庫中搜索與所述查詢資訊相匹 -11 - 201207646 配的商品類目,生成第二査詢結果;對所述第一査詢結果 和所述第二查詢結果合倂,生成最終查詢結果; 所述日誌伺服器,用於根據所述用戶對所述査詢伺服 器生成的最終査詢結果的點擊操作和所述查詢資訊生成曰 誌,並將所述日誌發送給所述建模伺服器; 所述建模伺服器,用於對所述日誌進行統計分析,獲 得類目模型。 其中,所述建模伺服器,還用於將所述類目模型發送 給所述査詢伺服器; 所述査詢伺服器,還用於將所述最終査詢結果發送給 用戶,使所述用戶進行査看;將來自所述建模伺服器的類 s模型更新到所述類目模型庫中。 其中,所述類目模型還包括:與所述商品類目對應的 斶性類目; 所述查詢伺服器,還用於根據所述査詢資訊在商品庫 中搜索與所述查詢資訊相匹配的商品類目和與所述商品類 目對應的屬性類目。 其中’所述日誌伺服器,具體用於獲取用戶對作爲請 求回應返回的商品類目、與商品類目對應的屬性類目和商 品進行點擊査看的點擊操作;根據點擊操作生成日誌,所 述日誌包括査詢資訊和對應的點擊資訊,所述點擊資訊包 括點擊的商品所在商品類目和所屬商品屬性、點擊的商品 類目和點擊的屬性類目;儲存所生成的日誌。 其中’所述建模伺服器’具體用於根據所述日誌記錄 -12- 201207646 中的查詢資訊和對應的點擊資訊對所述日誌記錄進行統計 分析,獲得統計分析結果,所述統計分析結果爲與所述查 詢資訊對應的商品類目及其對應的權重和與商品類目對應 的屬性類目及其對應權重;所述權重爲所述商品類目和與 商品類目對應的屬性類目點擊次數和/或點擊機率:根據 所述統計分析結果生成類目模型,並將所述統計分析結果 按照商品類目樹進行排列。 其中,所述建模伺服器,具體用於判斷與所述查詢資 訊對應的商品類目及其對應的權重和與商品類目對應的屬 性類目及其對應權重是否達到預設的權重門限;當達到預 設的權重門限時,根據與所述查詢資訊對應的商品類目及 其對應的權重和與商品類目對應的屬性類目及其對應權重 建立類目模型。 本發明實施例還提供一種査詢伺服器,包括: 獲取模組,用於獲取用戶的査詢資訊; 査詢模組,用於根據所述查詢資訊在類目模型庫中檢 索與所述査詢資訊相匹配的類目模型,並根據檢索到的類 目模型生成第一查詢結果,所述類目模型包括與用戶輸入 的關鍵字對應的商品類目;並根據所述查詢資訊在商品庫 中搜索與所述査詢資訊相匹配的商品類目,生成第二査詢 結果; 合併模組,用於對所述第一查詢結果和所述第二查詢 結果合倂,生成最終查詢結果。 其中,所述查詢伺服器,還包括: -13- 201207646 發送模組’用於將所述最終査詢結果發送給用戶,使 所述用戶進行查看,並使日誌伺服器根據所述用戶對所述 最終査詢結果的點擊操作和所述查詢資訊生成日誌,並將 所述日誌發送給建模伺服器進行統計分析獲得類目模型並 將所述類目模型更新到所述商品類目伺服器的類目模型庫 中〇 其中,所述類目模型還包括:與所述商品類目對應的 斶性類目; 所述査詢模組,還用於根據所述査詢資訊在商品庫中 搜索與所述査詢資訊相匹配的商品類目和與所述商品類目 對應的屬性類目。 其中,所述査詢資訊僅包括用戶輸入的關鍵字時,所 述查詢模組,具體包括: 判斷子模組,用於判斷類目模型對應的關鍵字中是否 存在與所述査詢資訊中的關鍵字匹配的關鍵字; 匹配子模組,用於若判斷子模組判斷存在,則根據所 述查詢資訊中的關鍵字在所述類目模型庫中檢索,査詢並 獲取匹配的類目模型;否則,對所述査詢資訊中關鍵字進 行改寫,並進行再次判斷,直到判斷結果爲存在並獲取到 匹配的類目模型爲止: 生成子模組,用於根據所獲取的類目模型及其對應的 權重和所獲取的直達屬性的屬性類目及其對應權重,生成 第一查詢結果。 其中,所述查詢資訊包括用戶輸入的關鍵字和用戶所 -14- 201207646 選擇的商品類目時,所述査詢模組,具體包括: 判斷子模組,用於判斷類目模型對應的關鍵字中是否 存在與所述查詢資訊中的關鍵字匹配的關鍵字; 匹配子模組,用於若判斷子模組判斷存在,則根據所 述用戶輸入的關鍵字在所述類目模型庫中檢索,查詢並獲 取匹配的類目模型;否則,對所述査詢資訊中關鍵字進行 改寫,並進行再次判斷,直到判斷結果爲存在並獲取到與 該關鍵字匹配的類目模型爲止; 提取子模組,用於從所獲取的類目模型中獲取與該査 詢資訊中的商品類目匹配的類目模型; 生成子模組,用於所述查詢伺服器獲取與該商品類目 匹配的類目模型中的商品類目及其對應的權重,生成第一 查詢結果。 其中,所述合倂模組,具體包括: 第一合倂子模組,用於獲取第一合倂結果,所述第一 合倂結果爲所述第一查詢結果和所述第二査詢結果中相同 的商品類目及其對應的權重,其中第一合倂結果中的權重 根據同一商品類目來自兩個査詢結果的權重進行加權獲得 » 第二合倂子模組,用於獲取第二合倂結果,所述第二 合倂結果爲僅在所述第二查詢結果中出現的商品類目及其 對應的權重; 權重提升子模組,用於對第一合倂結果中的權重進行 權重提升,分別使第一合倂結果中商品類目和屬性類目的 -15- 201207646 每一個權重高於第二合倂結果中的商品類目和屬性類目的 每一個權重; 生成子模組’用於按照商品類目對應的權重和與商品 類目對應的屬性類目對應的權重由高到低的順序排列,並 返回給用戶。 其中,所述合倂模組,具體包括: 第一合倂子模組,用於獲取第一合倂結果,所述第— 合倂結果爲所述第一査詢結果和所述第二查詢結果中相同 的商品類目及其對應的權重和與商品類目對應的屬性類目 及其對應權重’其中第一合倂結果中的權重根據同一商品 類目或屬性類目的來自兩個査詢結果的權重進行加權獲得 » 第二合倂子模組,用於獲取第二合倂結果,所述第二 合倂結果爲僅在所述第二査詢結果中出現的商品類目及其 對應的權重和與所述商品類目對應的屬性類目及其對應權 重: 權重提升子模組,用於對第一合倂結果中的權重進行 權重提升,分別使第一合倂結果中商品類目和屬性類目的 每一個權重高於第二合倂結果中的商品類目和屬性類目的 每一個權重; 生成子模組,用於按照商品類目對應的權重和與商品 類目對應的屬性類目對應的權重由高到低的順序排列,並 返回給用戶。 本發明具有以下優點:藉由在由用戶的歷史點擊操作 -16- 201207646 生成的類目模型庫和商品庫中査詢用戶的請求’並對二者 進行合併,從而提高了用戶查詢結果與用戶査詢意圖的相 關度,提高用戶體驗感。藉由對第一査詢結果、第二查詢 結果的權重進行加權合倂,可以將更重要的商品類目提供 給用戶。另外,本發明與現有技術相比,只需在類目模型 庫中以及商品庫中匹配查找與查詢資訊相匹配的商品類目 ,作爲排序結果的商品類目僅僅是所有商品類目中的一部 分;而現有技術需要統計每一個商品類目下的商品數量’ 並按照商品數量的大小對所有商品類目進行排序,因此’ 本發明節省了對商品類目的排序時間,能夠更加快速的生 成查詢結果。 【實施方式】 本發明的實施例包括:在由用戶的點擊操作生成的類 目模型庫和商品庫中查詢用戶的請求,並對二者進行合倂 作爲最終的査詢結果返回給用戶,提高了査詢結果的相關 度,提高用戶體驗感。其中類目模型爲根據用戶歷史的査 詢資訊中的關鍵字和對應的點擊記錄生成的與關鍵字對應 的商品類目和與商品類目對應的屬性類目,每一個類目模 型中的商品類目和屬性類目爲用戶根據某一關鍵字查詢時 ’用戶所關注的査詢結果,按照商品類目樹的形式組織。 商品庫是指將各類商品按照商品類目樹的形式進行儲存的 資料庫,藉由商品類目對商品進行導航,對於其中的每一 個商品,儲存有其對應的屬性資訊。 -17- 201207646 下面將結合本發明中的附圖,對本發明中的技術方案 進行清楚、完整的描述,顯然,所描述的實施例是本發明 的一部分實施例,而不是全部的實施例。基於本發明中的 责施例,本領域普通技術人員在沒有做出創造性勞動的前 提下所獲得的所有其他實施例,都屬於本發明保護的範圍 〇 本發明實施例提供一種基於垂直搜索的查詢方法,如 圖2所示,包括以下步驟: 步驟101、獲取用戶的査詢資訊。 其中,所述査詢資訊可以包括:所述用戶輸入的關鍵 字、用戶輸入或選擇的由查詢系統提供的商品類目、商品 屬性。其中,商品類目是指將商品按照不同的種類進行劃 分,所得的種類名稱,例如:“服裝”、“手機”,用於對商 品進行導航。而且商品類目是有層次和父子關係的,例如 :“服裝->男裝-> 男式牛仔褲”,其中“男士牛仔褲’,是“男裝 ”的子類目,“服裝,,是“男裝”的父類目。每一個商品都有 --些屬性’並從屬於一個或多個類目,例如:某—品牌的 男士牛仔褲,既屬於“男裝”商品類目,也屬於“休閒裝,,商 品類目’擁有“品牌:蘋果/款式:直筒,,等商品屬性。與商 品類目類似’將商品按照不同的屬性劃分,得到屬性類目 ’例如:“品牌->國產”。 例如:若用戶輸入關鍵字“Nokia”,並未選擇由査詢 系統提供的商品類目或商品屬性,此時査詢資訊爲 “Nokia” ;或用戶輸入關鍵字“N〇kia”並選擇由査詢系統提 -18- 201207646 供的商品類目“手機”,此時査詢資訊爲“Nokia手機”。 &驟102、根據所述査詢資訊在類目模型庫中檢索與 所述查詢資訊相匹配的類目模型,所述類目模型包括與用 的關鍵字對應的商品類目和與商品類目對應的屬性 類目’並根據檢索到的類目模型生成第一查詢結果。 其中根據査詢資訊的不同,該步驟包括以下兩種情況 情況1、所述査詢資訊僅包括用戶輸入的關鍵字,此 時根據所述査詢資訊在類目模型庫中檢索與所述査詢資訊 相匹配的商品類目和對應的屬性類目,生成第一查詢結果 包括以下步驟: (1 )判斷類目模型對應的關鍵字中是否存在與所述 查詢資訊中的關鍵字匹配的關鍵字。 (2 )若存在,則根據所述查詢資訊中的關鍵字在所 述類目模型庫中檢索,查詢並獲取匹配的類目模型;否則 ’對所述查詢資訊中關鍵字進行改寫,並進行再次判斷, 直到判斷結果爲存在並獲取到匹配的類目模型爲止》 (3)從所獲取的類目模型中獲取峰値類目,並根據 該峰値類目獲取對應的直達屬性的屬性類目。其中,峰値 類目是能夠突出地反映用戶的査詢意圖和需求的商品類目 ’可以是權重最高的商品類目,舉例來說,可以是用戶歷 史點擊次數或點擊機率最高的商品類目。直達屬性的屬性 類目是從峰値類目的多個商品屬性中提取的屬性類目’該 提取過程與從全部商品類目中獲得作爲查詢結果中的商品 -19- 201207646 類目的方法類似,此處不再贅述。 例如:當査詢資訊僅包括關鍵字“Nokia”時,在類目 模型庫獲取到的匹配的類目模型爲:手機(4000 )和手機 外殻(2000 ),其中4000爲商品類目“手機”對應的權重, 2000爲商品類目“手機外殼”對應的權重。若此時權重門限 爲500,則此時峰値類目爲“手機”,按照類似的流程從“手 機”一商品類目下的多個屬性中提取出直達屬性的屬性類 目,例如:根據直達屬性“品牌”獲得“品牌”屬性類目。 需要說明的是,若沒有滿足條件的峰値類目,則可以 設定權重最高的商品類目爲峰値類目,或者無峰値類目, 此時無需獲取直達屬性的屬性類目》具體的設定條件不影 響本發明的保護範圍,例如:權重最高的兩個商品類目, 此時直達屬性的屬性類目從該兩個商品類目中各取一半》 (4)根據所獲取的類目模型及其對應的權重和所獲 取的直達屬性的屬性類目及其對應權重,生成第一査詢結 果。 具體地,將商品類目按照權重由高到低的順序排列, 生成第一査詢結果中商品類目集合,同時將屬性類目按照 權重由高到低的順序排列,生成第一査詢結果的屬性類目 集合,第一查詢結果中的商品類目和屬性類目集合均將推 送給用戶。較佳地,屬性類目按照所屬的不同屬性進行分 類排列。 例如:基於步驟(3),生成的第一査詢結果中的商 品類目集合爲:手機(4〇00 );手機外殼(2000 );生成 -20- 201207646 的第一査詢結果中的屬性類目集合爲:按屬性“品牌’ 的國產品牌(2000 );歐美品牌(1 000 )。當然,屬 目集合還可以包括:按屬性“網路制式”劃分的GSM ( );CDMA ( 500 )。 情況2、所述査詢資訊包括用戶輸入的關鍵字和 所選擇的商品類目,此時根據所述査詢資訊在類目模 中檢索與所述査詢資訊相匹配的類目模型,並根據檢 的類目模型生成第一査詢結果,具體包括以下步驟: 判斷類目模型對應的關鍵字中是否存在與所述查 訊中的關鍵字匹配的關鍵字; 若存在,則根據所述用戶輸入的關鍵字在所述類 型庫中檢索,査詢並獲取匹配的類目模型;否則,對 査詢資訊中關鍵字進行改寫,並進行再次判斷,直到 結果爲存在並獲取到與該關鍵字匹配的類目模型爲止 從所獲取的類目模型中獲取與該査詢資訊中的商 目匹配的類目模型; 獲取與該商品類目匹配的類目模型中的商品類目 對應的權重和與商品類目對應的屬性類目及其對應權 生成第一査詢結果。 例如:當查詢資訊爲“Nokia手機”時’由於該 商品類目下沒有子類目,因此第一查詢結果中僅有屬 目集合,即:按屬性“品牌”劃分的國產品牌(2000 ) 美品牌( 1000)。當然,屬性類目集合還可以包括: 性“網路制式,’劃分的GSM ( 1〇〇〇 ) ; CDMA ( 5 00 )。 劃分 性類 1000 用戶 型庫 索到 詢資 目模 所述 判斷 1 品類 及其 重, L機” 性類 :歐 按屬 -21 - 201207646 需要說明的是’若“手機”商品類目下沒有子類目時 ’也可將該層類目作爲第一査詢結果中的商品類目集合’ 例如:手機(40 00);手機外殻(2000)。 步驟103、根據所述査詢資訊在商品庫中搜索與所述 査詢資訊相匹配的商品類目和對應的屬性類目,生成第二 査詢結果。 該步驟與現有技術類似,即在商品庫中按照商品樹的 結構査找匹配的商品類目和對應的屬性類目,生成商品類 目集合和屬性類目集合,此處不再贅述。 需要說明的是,第一查詢結果中的類目模型是根據用 戶對査詢結果的歷史點擊資料生成的,因此作爲排序標準 的權重爲對應的點擊次數或機率,而第二查詢結果中商品 庫的商品類目是按照商品自身的分類而組織的,因此作爲 排序標準的權重爲該商品類目、或商品屬性在所有商品中 的數量分佈。 例如:生成的第二査詢結果爲:生成的第二査詢結果 中的商品類目集合爲:手機(40 00 );手機掛鏈(2000 ) ,其中4000爲商品類目“手機”對應的權重’ 2000爲商品類 目“手機掛鏈’’對應的權重;生成的第二査詢結果中的屬性 類目集合爲:按屬性“品牌”劃分的國產品牌(2〇〇〇 );歐 美品牌(5 00 )。 步驟1 04、對所述第一査詢結果和所述第二査詢結果 合倂,生成最終査詢結果。 具體地,第一查詢結果和第二査詢結果分別由商品類 -22- 201207646 目集合和對應的屬性類目集合組成’因此分別將兩個查詢 結果中的商品類目集合和對應的屬性類目集合進行合倂, 生成最終査詢結果中的商品類目集合和屬性類目集合,包 括以下步驟: (η獲取第一合倂結果,所述第一合倂結果爲所述 第一查詢結果和所述第二查詢結果中相同的商品類目及其 對應的權重和與商品類目對應的屬性類目及其對應權重, 其中第一合倂結果中的權重根據同一商品類目或屬性類目 的來自兩個査詢結果的權重進行加權獲得。 其中,具體的加權方式可根據實際情況預先設定,如 進行1比1的加權,或進行2比1的加權。 (2) 獲取第二合倂結果,所述第二合倂結果爲僅在 所述第二查詢結果中出現的商品類目及其對應的權重和與 該商品類目對應的屬性類目及其對應權重。 (3) 對第一合倂結果中的權重進行權重提升,使第 —合倂結果中的每一個權重高於第二合倂結果中的每一個 權重。此時,若第一合倂結果中的對應集合中每一個權重 已經高於第一合倂結果中的每一個權重,則無需進行權重 提升。 (4 )按照商品類目對應的權重和與商品類目對應的 屬性類目對應的權重由高到低的順序排列,並返回給用戶 〇 本發明實施例中以第一査詢結果爲:手機(4〇00 ); 手機外殻(2 0 0 0 );按屬性“品牌,,劃分的國產品牌(2 〇 〇 〇 -23- 201207646 );歐美品牌( 1 000 );生成的第二査詢結果爲:手機( 4000 );手機掛鏈( 2000 );按屬性“品牌”劃分的國產品 牌(2000 );歐美品牌(500 )爲例說明。 此時,對上述兩個査詢結果進行合倂,具體地,獲取 商品類目集合中相同的商品類目“手機”,並對分別來自第 —査詢結果的權重“4000”和來自第二查詢結果的“4000”進 行加權,加權比例爲2比1 ’此時,商品類目“手機,,的權重 爲“ 1 2000” ;類似地,得出按屬性“品牌”劃分的國產品牌 (6000 );歐美品牌(2500 ),得到第一合倂結果。獲取 只在第一査詢結果中的手機外殻( 2000),進行加權後., 得到第二合倂結果爲手機外殼(4000 )。 較佳地’在上述最終查詢結果中提取具體的商品,並 作爲最終査詢結果中的一部分返回給用戶。例如:從最終 查詢結果中排在第一位的商品類目中提取點擊率最高的商 品及其詳細資訊作爲最終査詢結果的一部分》 步驟1 05、將所述最終査詢結果發送給用戶,使所述 用戶進行査看。 步驟1 06、根據所述用戶對所述最終査詢結果的點擊 操作和所述査詢資訊生成日誌。 較佳地,根據所述用戶對所述最終査詢結果的點擊操 作和所述査詢資訊生成日誌包括: 獲取用戶對作爲請求回應返回的商品類目、對應的屬 性類目和商品進行點擊查看的點擊操作;根據點擊操作生 成曰誌’所述日誌包括查詢資訊和對應的點擊資訊,所述 -24- 201207646 點擊資訊包括點擊的商品所在商品類目和所屬商品屬性、 點擊的商品類目和點擊的屬性類目;儲存所生成的日誌。 例如:用戶在查詢資訊“Nokia”的最終査詢結果中依 次點擊了 “手機_>N〇kia_>1600萬色,’,並在此時選擇了一款 手機商品進行點擊查看。此時,根據用戶的每一次點擊操 作生成日誌記錄,該日誌記錄中包括:査詢資訊,點擊物 件’相關點擊物件(即點擊“手機”爲點擊“ 1 600萬色,,的相 關點擊操作)等等。 步驟1 07、根據接收的日誌進行統計分析獲得類目模 型。 具體地’根據接收的日誌進行統計分析獲得類目模型 包括以下步驟: 根據所述日誌記錄中的査詢資訊和對應的點擊資訊對 所述日誌記錄進行統計分析,獲得統計分析結果,所述統 計分析結果爲與所述查詢資訊對應的商品類目及其對應的 權重和與商品類目對應的屬性類目及其對應權重:所述權 重爲所述商品類目和對應的屬性類目點擊次數和/或點擊 機率; 根據所述統計分析結果生成類目模型: 將所述統計分析結果按照商品類目樹進行排列,生成 類目模型。 其中,根據所述統計分析結果生成類目模型包括: 判斷與所述查詢資訊對應的商品類目及其對應的權重 和與商品類目對應的屬性類目及其對應權重是否達到預設 -25- 201207646 的權重門限: 當達到預設的權重門限時’根據與所述查詢資訊對應 的商品類目及其對應的權重和與商品類目對應的屬性類目 及其對應權重建立類目模型。 ’ 例如:對一天之內的日誌進行統計分析’得到當査詢 資訊爲“Nokia”時,點擊商品類目“手機”的次數爲1〇〇〇 ’ 點擊“手機外殼”次數爲5 00,點擊“手機”下的網路制式的 次數爲3 00,其中點擊“GSM”的次數爲100次’點擊 “CDMA”的次數爲50次。此時,生成的類目模型爲:商品 類目:手機(1〇〇〇)手機外殼(500);屬性類目:GSM (100) CDMA ( 50 )。 步驟1 08、將所述類目模型更新到所述類目模型庫中 〇 該步驟不斷地藉由用戶的歷史點擊記錄更新類目模型 庫,而更新後的類目模型庫用於根據後續用戶的査詢返回 查詢結果,從而不斷地保持類目模型庫的精度,提高返回 的査詢結果的準確性。 當然,也可以對時間較早的資料進行資料淘汰。 需要說明的是,上述步驟102和步驟103之間無先後順 序。 爲實現上述基於垂直搜索的査詢方法,本發明實施例 提供一種基於垂直搜索的査詢系統,如圖3所示,包括: 日誌伺服器、建模伺服器、査詢伺服器、商品庫和商品類 目模型庫。其中,查詢伺服器包括爲:前端查詢伺服器, -26- 201207646 類目查詢伺服器和商品查詢伺服 在類目查詢伺服器,商品庫儲存 ,前端伺服器作爲用戶與後臺交 的查詢請求,並將後臺的査詢結 詢伺服器和商品査詢伺服器用於 詢請求在商品庫和商品類目模型 品類目模型庫中的類目模型是由 器記錄的日誌生成的。 以下分別對上述功能模組進 其中,如圖4所示,前端査 ,用於接收用戶的査詢請求和類 伺服器返回的查詢結果;合倂模 器和商品查詢伺服器返回的查詢 的查詢結果;發送模組,用於將 目査詢伺服器和商品査詢伺服器 送給用戶。 如圖5所示,類目查詢伺服 接收前端査詢伺服器發送的查詢 査詢資訊;査詢模組,用於根據 檢索與所述査詢資訊相匹配的商 對應的屬性類目以及對應的權重 結果發送給前端查詢伺服器。 如圖6所示,商品査詢伺服 接收前端查詢伺服器發送的查詢 器,商品類目模型庫儲存 在商品查詢伺服器。其中 互的媒介,用於接收用戶 果回饋給用戶。而類目査 根據前臺伺服器轉發的査 庫中進行査詢。其中,商 建模伺服器根據日誌伺服 行進一步的介紹。 詢伺服器包括:接收模組 目査詢伺服器和商品査詢 組,用於對類目查詢伺服 結果進行合倂,生成最終 用戶的查詢請求發送給類 ,並將接收的查詢結果發 器包括:接收模組,用於 請求,該査詢請求中攜帶 査詢資訊在類目模型庫中 品類目以及對應的權重和 :發送模組,用於將查詢 器包括:接收模組,用於 請求,該查詢請求中攜帶 -27- 201207646 查詢資訊;查詢模組,用於根據查詢資訊在商品 所述査詢資訊相匹配的商品類目以及對應的權重 腿性類目以及對應的權重;發送模組,用於並將 發送給前端査詢伺服器。 如圖7所示,建模伺服器包括:接收模組, 曰誌伺服器生成的日誌記錄;統計分析模組,用 述曰誌記錄中的查詢資訊和對應的點擊資訊對所 錄進行統計分析,獲得統計分析結果,所述統計 爲與所述査詢資訊對應的商品類目及其對應的權 品類目對應的屬性類目及其對應權重;所述權重 品類目和對應的屬性類目點擊次數和/或點擊機 模組,根據所述統計分析結果生成類目模型,並 計分析結果按照商品類目樹進行排列;發送模組 生成的類目模型發送給商品類目模型庫。 上述各種伺服器之間的交互過程具體包括以 段:(1 )査詢階段;(2 )更新階段。 其中,査詢階段爲:前端査詢伺服器接收用 請求,所述查詢請求中攜帶査詢資訊。前端査詢 該查詢資訊分別發送給類目査詢伺服器和商品査 。類目查詢伺服器根據該查詢資訊在類目模型庫 所述査詢資訊相匹配的商品類目和/或屬性類目 一査詢結果,並將該第一查詢結果發送給前端查 。商品査詢伺服器根據該查詢資訊在商品庫中檢 査詢資訊相匹配的商品類目和/或屬性類目,生 庫檢索與 和對應的 査詢結果 用於接收 於根據所 述曰誌記 分析結果 重和與商 爲所述商 率;生成 將所述統 ,用於將 下兩個階 戶的査詢 伺服器將 詢伺服器 中檢索與 ,生成第 詢伺服器 索與所述 成第二查 -28- 201207646 詢結果,並將該第二查詢結果發送給前端查詢伺服器 端査詢伺服器將二個查詢結果進行合倂’生成最終査 果發送給用戶,使用戶進行點擊查看。 査詢後的更新階段爲:當用戶在最終查詢結果中 點擊査看時,前端查詢伺服器將該操作發送給曰誌伺 ,使日誌伺服器根據該點擊操作生成日誌;日誌伺服 一段時間內的批量日誌發送給建模伺服器’建模伺服 據本批資料進行統計分析,獲取統計分析結果,並根 統計分析結果生成類目模型,發送給類目查詢伺服器 類目查詢伺服器將該生成的類目模型更新到類目模型 。而對於商品搜索伺服器中的商品庫,則根據商品自 所屬類目和屬性進行維護和更新。 由上述交互過過程可知,查詢階段和更新階段是 整體循環過程,査詢的返回結果供用戶點擊查看,根 戶的點擊査看進行更新,在根據更新後的資料進行査 如此往復,不斷更新,以提高査詢的相關度。 以下結合具體應用場景,對本發明中的基於垂直 的査詢方法進行詳細闡述。 如圖8所示,爲本發明實施例提供的一種基於垂 索的査詢方法,爲根據查詢請求在類目模型庫和商品 進行査詢的過程(即查詢階段),具體包括以下步驟 步驟3 0 1、前端查詢伺服器獲取用戶的査詢請求 査詢請求中攜帶查詢資訊。 前端査詢伺服器藉由對查詢請求進行解析,獲取 0 刖 詢結 進行 服器 器將 器根 據該 ,使 庫中 身的 —個 據用 詢, 搜索 直搜 庫中 ,該 查詢 -29- 201207646 資訊。該解析過程具體包括,分析該查詢請求是用戶藉由 査詢輸入框輸入的關鍵字還是用戶在查詢系統提供的商品 類目或屬性類目中選擇的某一商品類目或屬性類目。因此 ,所述査詢請求中攜帶的査詢資訊可以爲用戶輸入的査詢 關鍵字,也可以是用戶輸入的查詢關鍵字和用戶選擇的商 品類目或屬性類目的組合。 例如:當査詢請求中攜帶的內容爲“Nokia手機滑蓋” 時,前端伺服器從該內容中提取出査詢資訊“Nokia”,“手 機”,“滑蓋”,並分析該三個查詢資訊的來源,若“Nokia” 爲用戶藉由査詢輸入框輸入的關鍵字,“手機”爲用戶選擇 的商品類目,“滑蓋”爲用戶選擇的屬性類目,則該査詢請 求爲用戶輸入的查詢關鍵字和用戶選擇的商品類目或屬性 類目的組合。 步驟302、前端査詢伺服器將接收的査詢資訊分別轉 發給類目査詢伺服器和商品査詢伺服器。 步驟303、類目査詢伺服器根據所述查詢資訊在類目 模型庫中檢索與該査詢資訊相匹配的商品類目和對應的屬 性類目,生成第一査詢結果,並將第一査詢結果返回給前 端査詢伺服器。 類目模型庫儲存有大量的類目模型,每一個類目模型 由若干個商品類目及其權重和對應的屬性類目及其權重組 成,並與關鍵字——對應。其中由商品類目及其權重組成 根據對應的關鍵字推送的商品類目集合,與商品類目對應 的屬性及其權重組成根據對應的關鍵字推送的屬性集合, -30- 201207646 且每個集合中按照權重由高到低的順序進行排列。需要說 明的是,每一個類目模型的生成根據對應的關鍵字的歷史 點擊資料完成,具體生成過程詳見後續說明。 較佳地,該類目模型以關鍵字爲單位按照商品類目樹 的結構(當然,也可以爲其他順序)進行儲存,具體地, 該類目模型的格式如表1所示= 表1、類 泪醒 關鍵字 商品類目及其 對應的權重 屬性類型 屬性類目及其 對應的權重 其中,表1中的類目模型按商品類目樹的關係進行組 織(當然,也可以商品類目樹的形式體現,具體表現形式 不應視爲對本發明保護範圍的限制),即存在以下三層關 係:商品類目,每一種商品類目對應的多種商品屬性類型 (含一種),每一種商品屬性類型對應的多個屬性。例如 :手機類目--品牌/網路制式等屬性類型--諾基亞/GSM等屬 性。 具體地,類目查詢伺服器根據所述査詢資訊在類目模 型庫中檢索與該査詢資訊相匹配的商品類目和對應的屬性 類目,如圖9所示,包括以下步驟: 步驟3031、類目査詢伺服器提取查詢資訊中的關鍵字 〇 步驟3 03 2、類目查詢伺服器判斷該關鍵字是否在類目 模型庫中。 -31 - 201207646 具體地,類目査詢伺服器判斷該關鍵字是否在 型庫中包括以下兩種情況中的任一種: (1 )當判斷該關鍵字不在類目模型庫中時, 驟 303 3 ; (2)當判斷該關鍵字在類目模型庫中時,轉 3034 ; 步驟3 0 3 3、類目査詢伺服器對該關鍵字進行改| 類目查詢伺服器在保留核心意圖的基礎上,對 字進行改寫’該步驟具體包括:首先,對查詢資訊 詞,刪除不重要的詞,輔以同義詞替換;其次,對 所獲取的每個詞進行類型標注,例如:比如產品P 詞等等;第三,根據每個詞標注的類型,按照預設 標明每個詞的權重;最後,根據每個詞的權重確定 的關鍵字,轉到步驟3 032。 例如:當査詢資訊爲“Nokia手機紅色”時,首 査詢資訊進行分詞,得到“Nokia”、“手機”和“紅色” ,對獲取的各個分詞進行標注,例如:將“Nokia” 品牌詞、將“手機”標注爲產品詞、將“紅色”標注爲 性;第三,按照預設的標注類型和權重的對應關係 個分詞的權重,例如:預設品牌詞對應的權重爲5 0 詞對應的權重爲3 〇、商品屬性對應的權重爲2,貝IJ “ 的權重爲50、“手機”的權重爲30和“紅色”的權重爲 後,由於“紅色”的權重較低,可以忽略不計,因此 的關鍵字爲“Nokia手機”。 類目模 轉到步 到步驟 該關鍵 進行分 經分詞 司/品牌 的規則 改寫後 先,對 :其次 標注爲 商品屬 標明每 、產品 Nokia" S 2 ;最 改寫後 -32- 201207646 步驟3 03 4、類目查詢伺服器判斷該査詢資訊中是否指 定了商品類目。 具體地,判斷該査詢資訊中是否指定了商品類目包括 以下兩種情況中的任一種: (1 )當判斷該查詢資訊中指定了商品類目時,轉到 步驟3 0 3 5 ; (2 )當判斷該查詢資訊中未指定商品類目時,轉到 步驟303 6。 例如:當查詢資訊僅爲用戶輸入的關鍵字“Nokia”時 ,判斷該查詢資訊中未包括商品類目;當査詢資訊爲用戶 輸入的關鍵字“Nokia”以及用戶在查詢系統提供的商品類 目中選取了 “手機”時,判斷該查詢資訊中指定了商品類目 〇 步驟3 03 5、類目查詢伺服器根據該關鍵字和所指定的 商品類目在模型庫中檢索,獲取匹配的類目模型,轉到步 驟 304。 (1)根據該關鍵字,在類目模型庫中檢索,獲取與 該關鍵字對應的類目模型樹。 (2 )根據所指定的商品類目,在所獲取的類目模型 樹中獲取與所指定的商品類目匹配的類目模型,根據類目 模型中的商品類目及其對應的權重和與商品類目對應的屬 性類目及其對應權重生成第一查詢結果,包括推送的商品 類目集合和屬性類目集合。即從獲取的類目模型樹選擇所 包括的商品類目所在的分支,並獲取以該商品類目爲父節 -33- 201207646 點的樹狀結構的類目模型。 例如:當査詢資訊爲“Nokia手機,’時,在對應的“手機 ”和“手機外殼”這一層中選擇“手機”這一支對應的樹狀結 構的類目模型。 步驟3036、類目査詢伺服器在獲取的匹配的類目模型 中提取峰値類目,並根據該峰値類目獲取對應的直達屬性 的屬性類目。 具體地,類目査詢伺服器在獲取的匹配模型中提取峰 値類目包括以下步驟: (1)將匹配的類目模型中的商品類目按照權重從高 到低的順序進行排序。 (2 )獲取排序第一的商品類目。 (3) 判斷該排序第一的商品類目的權重是否大於權 重門限a。 當判斷該排序第一的商品類目的權重大於權重門限a 時,轉到步驟(4 )。較佳地,權重門限a可以根據歷史資 料中,用戶對査詢結果中的商品類目的點擊次數設置,例 如:歷史記錄中査詢結果中某一商品類目的點擊率高於 5 0%,則設置該商品類目對應的權重爲權重門限a。 (4) 判斷該排序第一的類目模型的權重與排序第二 的類目模型的權重差是否大於權重門限b。 該排序第一的商品類目的權重與排序第二的類目模型 的權重差大於權重門限b時,說明歷史記錄中’該商品類 目的用戶點擊率較高,因此可以針對該商品類目進行優先 -34- 201207646 推送,即將該商品類目的屬性類目推送給用戶,從而提高 用戶查詢的效率,轉到步驟(5)。 (5 )該排序第一的商品類目所對應的商品類目爲峰 値類目,根據該峰値類目的屬性獲取對應的直達屬性,將 該直達屬性的屬性類目藉由查詢結果推送給用戶。 例如:當査詢資訊爲“Nokia”時,選擇“手機”和“手機 外殻”爲父節點的樹狀結構的類目模型推送給用戶。其當“ 手機”爲峰値類目時,從其屬性中選擇出直達屬性“網路制 式”,並將按“網路制式”分類的“GSM”和“CDMA”推送給用 戶。 需要說明的是,本發明實施例中以峰値類目僅爲排序 第一的商品類目爲例進行說明,當然峰値類目也可以爲排 序在前幾位的商品類目,此處不再贅述。 較佳地,根據該峰値類目的屬性獲取直達屬性的屬性 類目可以爲按照權重將該峰値類目的屬性按照由高到低的 順序進行排列,過濾掉權重低於預設値的屬性,權重高於 預設値的屬性即爲直達屬性的屬性類目,對其進行推送。 需要說明的是,對屬性類目按照一定的順序推送給用 戶的流程與推送商品類目的流程基本一致,即按照權重進 行排序推送,只是屬性類目是附屬於商品類目的,所以必 須首先進行類目的推送,然後對同一個類目下的屬性進一 步進行推送,此處不再贅述。 此時,査詢結果爲與該關鍵字匹配的類目模型中的商 品類目和獲取的直達屬性的屬性類目。 -35- 201207646 步驟3 04、商品查詢伺服器根據所述査詢資訊在商品 庫中搜索與該査詢資訊相匹配的商品類目及其對應的權重 和對應的屬性類目及其對應的權重,生成第二查詢結果’ 並將第二査詢結果返回給前端査詢伺服器。 例如:生成的第二査詢結果爲:生成的第二査詢結果 中的商品類目集合爲:手機(4000 );手機掛鏈(2000 ) ;生成的第二查詢結果中的屬性類目集合爲:按屬性“品 牌”劃分的國產品牌( 2000 );歐美品牌( 5 00 )。 步驟305、前端查詢伺服器對所述第一査詢結果和所 述第二查詢結果合倂,生成最終查詢結果。 具體地,前端査詢伺服器對所述第一査詢結果和所述 第二查詢結果合倂,生成最終査詢結果包括以下多種情況 中的任一種: 情況一:對於第一查詢結果和第二查詢結果中都存在 的商品類目和對應的屬性類目,表明此類商品類目和對應 &屬性類目在用戶歷史以往的點擊操作中點擊査看次數比 較高,即關注度較高,且在商品庫中此類商品類目的分佈 也較高,此時對此類商品類目和對應的屬性類目的權重進 行疊加,較佳地,疊加的過程中來自於兩個査詢結果中的 資料可以進行加權疊加,生成最終此類中每一個商品類目 及其對應的權重和與商品類目對應的屬性類目及其對應權 ® ’並按照對商品類目和對應的屬性類目分別按照權重由 高到低的順序進行排列,作爲第一合倂結果。 情況二:對於僅存在於第二查詢結果中的商品類目和 -36- 201207646 對應的屬性類目,表明此類商品類目在商品 ,但用戶的關注度較低,也將僅在第二查詢 類目及其對應的權重和與商品類目對應的屬201207646 VI. Description of the Invention: [Technical Field] The present invention relates to the field of network technologies, and in particular, to a method, system and apparatus for querying based on vertical search. [Prior Art] With the development of the Internet, the amount of information stored on the Internet has become enormous. When people need to obtain some specific information, they search by search engine. However, due to the large amount of information on the Internet, the query results obtained by the universal search method lack accuracy, so the vertical search method has been rapidly developed. Vertical search is a professional search engine for a certain industry. It is a subdivision and extension of the search engine. It is an integration of a certain type of information in the webpage library. The corresponding sub-fields are extracted and the required data is processed for processing. The form is returned to the user. A new search engine service model proposed by a relatively large amount of information, inaccurate inquiries, and insufficient depth of a general search engine, with a pricing information for a specific domain, a specific group of people, or a specific demand. And related services. Its characteristics are “specialized, refined, and deep”, and it has an industry color. Compared with the massive information disorder of the general search engine, the vertical search engine is more focused, specific and in-depth. Vertical search engines have many application directions, such as enterprise search, supply and demand information search engine, shopping search, real estate search, talent search, map search, mp3 search, image search, etc., and almost all kinds of information in various industries can be further refined into various The vertical search engine of the class. -5- 201207646 When the vertical search is used for shopping search, the user enters the query word shopping in the B2C (Business to Customer) or C2C (Consumer to Consumer) shopping website. As shown in Figure 1 (a) and Figure 1 (b), the results of the two parts are usually returned: 1 . Navigation of the product category The attribute category product corresponding to the product category to be sent. The navigation product category name is based on the user's path along the tree structure from top to bottom. More accurate query results. The attribute category is obtained by the user with a higher degree of interest. • The entry and maintenance of the product category tree structure needs to be done manually, and the product display must belong to the commodity node. Current e-commerce sites tend to have too many categories. In the hundreds of millions of scales, the Chamber of Commerce is close to 10,000 nodes, dozens of each level. When the user queries, it displays and cannot tell the user about these items. For this problem, the current mainstream solution statistics are returned under each category. The number of products depends on the quantity from large to small. The number of goods is lower than this valve information, that is, the commodity category, 2 . With push, 3 . Corresponding to the structure of the data tree pushed under the product category, it is convenient to locate the information table corresponding to the commodity database with higher degree of attention in the category of the user's history according to the user's history, and the data is in B2C. Or the number of a node or multiple items in each category tree in the C2C website is too large, resulting in the number of items. The number of category nodes in the product category tree tends to be as large as the category classification information of the user. The more important way to query a user is when the user queries, by number. Then sort the product classes and set a certain category to hide. Achieve the purpose of reducing the number of classifications -6- 201207646. In the process of implementing the present invention, the inventors have found that at least the following problems exist in the prior art: (1) The displayed category has a low correlation with the user's query. (2) There is no mechanism between commodity classifications to determine which commodity category is more important. (3) The number of categories displayed for the product is only hidden by the valve control to hide the highly relevant category. SUMMARY OF THE INVENTION The embodiments of the present invention provide a query method, system, and device based on a vertical search, which are used to improve the correlation between user query results and user query intent, and improve user experience. An embodiment of the present invention provides a query method based on a vertical search, including: acquiring query information of a user; and searching, in the category model library, a category model matching the query information according to the query information, and according to the retrieved The category model generates a first query result, the category model includes a product category corresponding to the keyword input by the user, and searches the product library for a product category matching the query information according to the query information, Generating a second query result; combining the first query result and the second query result to generate a final query result. After the final query result is generated, the method further includes: 201207646 sending the final query result to the user, causing the user to view 'and according to the user's click operation on the final query result and the query information. Generating a log, performing statistical analysis on the log to obtain a category model 'updates the category model to the category model library. The method of the category further includes: a reciprocal category corresponding to the product category; the method for generating a second query result, further comprising: searching for the query in the commodity library according to the query information The product category that matches the information and the attribute category corresponding to the product category. Wherein, when the query information includes only the keyword input by the user, the searching for a category model matching the query information in the category model library according to the query information, and generating according to the retrieved category model The first query result specifically includes: determining whether a keyword matching the keyword in the query information exists in a keyword corresponding to the category model; if yes, according to the keyword in the query information, in the class Retrieving, querying, and obtaining a matching category model in the target model library; otherwise, rewriting the keywords in the query information and re-judgement until the judgment result is present and obtaining a matching category model; The obtained category model and its corresponding weights and the attribute categories of the obtained direct attributes and their corresponding weights generate a first query result. Wherein, when the query information includes a keyword input by the user and a product category selected by the user, the searching for a category model matching the query information in the category model library according to the query information, and according to The category of the -8-201207646 is generated to generate the first query result, which includes: determining whether there is a keyword matching the keyword in the query information in the keyword corresponding to the category model; The keywords input by the user are retrieved in the category model library, and the matching category model is queried and obtained; otherwise, the keywords in the query information are rewritten and judged again until the judgment result exists and is obtained. Obtaining a category model that matches the category of the item in the query information from the acquired category model; obtaining the item in the category model that matches the item category The category and its corresponding weights, the first query result is generated. The first query result is obtained by combining the first query result and the second query result, and the method includes: acquiring a first merge result, where the first merge result is the first query result and the The same product category and its corresponding weight in the second query result, wherein the weight in the first merge result is weighted according to the weight of the same product category from the two query results; obtaining the second merge result, The second merge result is a commodity category that appears only in the second query result and its corresponding weight; the weight in the first merge result is weighted to make the commodity category in the first merge result Each weight of the target and attribute categories is higher than each weight of the commodity category and the attribute category in the second merge result; the weight corresponding to the commodity category corresponds to the attribute category corresponding to the commodity category is higher Arrange in low order and return to the user. -9- 201207646 wherein, the first query result and the second query result are combined to generate a final query result, which specifically includes: obtaining a first-merger result, the first-integrated result is the first- Checking the same product category and its corresponding weight in the first query result and the attribute category corresponding to the commodity category and their corresponding weights, wherein the weight in the first merge result is based on the same-commodity category The weight of the object or attribute category is obtained by weighting the weights of the two query results; obtaining the second merge result, the second merge result is the product category and its corresponding weight only appearing in the first query result And an attribute category corresponding to the commodity category and its corresponding weight; weighting the weight in the first merge result, respectively, so that each of the commodity category and the attribute category in the first merge result has a higher weight The weight of each of the product category and the attribute category in the second merge result; the weights corresponding to the product category and the weights corresponding to the attribute category corresponding to the product category are arranged in descending order And returned to the user. The generating a log according to the user's click operation on the final query result and the query information includes: acquiring a product category returned by the user as a response, and an attribute category corresponding to the product category. The click operation of the product for clicking and clicking; generating the log according to the click operation. The log includes the query information and the corresponding click information, and the click information includes the product category of the clicked product and the attribute of the product, the clicked product category and the click. Attribute category; store the generated log. The statistical analysis of the log obtains a category model, and -10- 201207646 specifically includes: performing statistical analysis on the log record according to the query information and the corresponding click information in the log record, and obtaining statistical analysis results. The statistical analysis result is a product category corresponding to the query information and a corresponding weight thereof, and an attribute category corresponding to the product category and a corresponding weight thereof; the weight is the product category and the commodity category The attribute category clicks and/or the click probability corresponding to the target; generating a category model according to the statistical analysis result, and arranging the statistical analysis results according to the commodity category tree. The generating the category model according to the statistical analysis result specifically includes: determining whether the product category corresponding to the query information and the corresponding weight and the attribute category corresponding to the product category and the corresponding weight thereof are a preset weight threshold; when the preset weight threshold is reached, a category model is established according to the product category corresponding to the query information and its corresponding weight and the attribute category corresponding to the product category and its corresponding weights. The embodiment of the present invention further provides a query system based on a vertical search, including a query server, a modeling server, and a log server, wherein the query server is configured to obtain query information of a user; Retrieving a category model matching the query information in the category model library, and generating a first query result according to the retrieved category model, the category model including a commodity category corresponding to the keyword input by the user; And searching for the product category in the product library according to the query information and matching the query information to generate a second check. Querying results; combining the first query result and the second query result to generate a final query result; the log server, configured to perform a click according to the final query result generated by the user on the query server The operation and the query information are generated, and the log is sent to the modeling server. The modeling server is configured to perform statistical analysis on the log to obtain a category model. The modeling server is further configured to send the category model to the query server; the query server is further configured to send the final query result to a user, so that the user performs Viewing; updating the class s model from the modeling server to the category model library. The category model further includes: a categorical category corresponding to the product category; the query server is further configured to search the commodity library for matching the query information according to the query information. A product category and an attribute category corresponding to the product category. The log server is specifically configured to obtain a click operation of the user to return a product category returned as a request, an attribute category corresponding to the product category, and an item, and generate a log according to the click operation. The log includes query information and corresponding click information, and the click information includes a product category and a product attribute of the clicked product, a clicked product category, and a clicked attribute category; and the generated log is stored. The 'the modeling server' is specifically configured to perform statistical analysis on the log record according to the query information and the corresponding click information in the log record -12-201207646, and obtain a statistical analysis result, where the statistical analysis result is a product category corresponding to the query information and a corresponding weight thereof and an attribute category corresponding to the product category and a corresponding weight thereof; the weight is the product category and the attribute category corresponding to the product category Number of times and/or click probability: A category model is generated based on the statistical analysis result, and the statistical analysis results are arranged according to the commodity category tree. The modeling server is specifically configured to determine whether the product category corresponding to the query information and its corresponding weight and the attribute category corresponding to the product category and the corresponding weight thereof reach a preset weight threshold; When the preset weight threshold is reached, the category model is established according to the product category corresponding to the query information and its corresponding weight and the attribute category corresponding to the product category and its corresponding weight. The embodiment of the present invention further provides a query server, including: an obtaining module, configured to obtain query information of a user; and a query module, configured to search, according to the query information, in the category model library to match the query information a category model, and generating a first query result according to the retrieved category model, the category model includes a product category corresponding to the keyword input by the user; and searching and searching in the product library according to the query information The merging module is configured to combine the first query result and the second query result to generate a final query result. The query server further includes: -13- 201207646 a sending module 'for sending the final query result to a user, causing the user to view, and causing the log server to perform according to the user The click operation of the final query result and the query information generate a log, and send the log to the modeling server for statistical analysis to obtain a category model and update the category model to the class of the commodity category server. In the target model library, the category model further includes: a categorical category corresponding to the product category; the query module is further configured to search and search the commodity library according to the query information The product category that matches the information and the attribute category corresponding to the product category. When the query information includes only the keyword input by the user, the query module specifically includes: a determining sub-module, configured to determine whether a keyword corresponding to the category model exists and a key in the query information a keyword matching keyword; a matching sub-module, configured to: if the judging sub-module judges existence, search, search, and obtain a matching category model according to the keyword in the query information; Otherwise, the keywords in the query information are rewritten and judged again until the judgment result is present and the matching category model is obtained: a sub-module is generated, according to the acquired category model and its corresponding The weight of the attribute and the attribute category of the obtained direct attribute and their corresponding weights generate a first query result. Wherein, the query information includes a keyword input by the user and a product category selected by the user-14-201207646, the query module specifically includes: a judgment sub-module, configured to determine a keyword corresponding to the category model Whether there is a keyword matching the keyword in the query information; a matching sub-module, configured to search, in the category model library, according to the keyword input by the user, if the judgment sub-module determines that the existence exists Querying and obtaining a matching category model; otherwise, rewriting the keyword in the query information and making a judgment again until the judgment result is present and obtaining a category model matching the keyword; extracting the submodule a group, configured to obtain, from the obtained category model, a category model that matches the product category in the query information; and generate a sub-module, configured to obtain, by the query server, a category that matches the commodity category The product category in the model and its corresponding weights, the first query result is generated. The merging module specifically includes: a first merging module, configured to obtain a first merging result, where the first merging result is the first query result and the second query result The same commodity category and its corresponding weight, wherein the weight in the first merge result is weighted according to the weight of the same product category from the two query results » The second merge sub-module is used to obtain the second a result of the merge, the second merge result is a product category and its corresponding weight appearing only in the second query result; the weight promotion sub-module is configured to perform weight on the first merge result The weights are increased, respectively, so that the product categories and attribute categories in the first merge result are -15-201207646, each weight is higher than each weight of the product category and attribute category in the second merge result; generating sub-modules' The weights corresponding to the weights corresponding to the product category and the attribute categories corresponding to the product category are arranged in descending order and returned to the user. The merging module specifically includes: a first merging submodule, configured to obtain a first merging result, where the first merging result is the first query result and the second query result The same commodity category and its corresponding weight and the attribute category corresponding to the commodity category and its corresponding weight 'where the weight in the first merge result is from the two query results according to the same product category or attribute category Weighting is performed to obtain a second merged sub-module for obtaining a second merge result, the second merge result being a commodity category and its corresponding weight sum appearing only in the second query result An attribute category corresponding to the product category and its corresponding weight: a weight promotion sub-module, configured to weight the weight in the first merge result, respectively, to make the product category and attribute in the first merge result Each weight of the category is higher than each weight of the commodity category and the attribute category in the second merge result; generating a sub-module for corresponding to the weight corresponding to the commodity category and the attribute category corresponding to the commodity category of Arranged in descending order of weight, and returned to the user. The invention has the following advantages: the user's request is queried in the category model library and the commodity library generated by the user's historical click operation-16-201207646 and the two are combined, thereby improving the user query result and the user query. The relevance of the intent to improve the user experience. By weighting the weights of the first query result and the second query result, a more important item category can be provided to the user. In addition, compared with the prior art, the present invention only needs to match the category of the product matching the query information in the category model library and the commodity library, and the product category as the sorting result is only a part of all the product categories. However, the prior art needs to count the number of commodities under each commodity category and sort all commodity categories according to the number of commodities. Therefore, the present invention saves the sorting time of the commodity categories and can generate query results more quickly. [Embodiment] The embodiment of the present invention includes: querying a user's request in a category model library and a commodity library generated by a user's click operation, and combining the two as a final query result and returning to the user, thereby improving Improve the user experience by correlating the results of the query. The category model is a product category corresponding to the keyword generated by the keyword in the query information of the user history and the corresponding click record, and an attribute category corresponding to the product category, and the commodity category in each category model. The object and attribute categories are organized in the form of a product category tree when the user queries the query according to a certain keyword. A merchandise library is a database that stores various types of merchandise in the form of a merchandise category tree. The merchandise is navigated through the merchandise category, and each of the merchandise stores its corresponding attribute information. The technical solutions in the present invention will be clearly and completely described in conjunction with the drawings in the present invention. It is obvious that the described embodiments are a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention. The embodiments of the present invention provide a query based on vertical search. The method, as shown in FIG. 2, includes the following steps: Step 101: Acquire query information of a user. The query information may include: a keyword input by the user, a product category or a product attribute provided by the query system selected by the user. Among them, the product category refers to the classification of the products according to different types, and the obtained category names, for example, "clothing" and "mobile phone", are used to navigate the products. Moreover, the merchandise category has a hierarchical and parent-child relationship, for example: "Clothing -> Menswear -> Men's Jeans", in which "men's jeans" is a subcategory of "men's clothing", "clothing, is The parent category of "Men's Wear". Every item has - some attributes' and is subordinate to one or more categories, for example: a certain brand of men's jeans, belonging to the "men's clothing" category, also belongs to "casual wear, goods category" Has "brand: Apple / style: straight,, and other commodity attributes. Similar to the commodity category, the goods are classified according to different attributes to obtain the attribute category ‘ for example: “Brand-> Domestic”. For example, if the user enters the keyword "Nokia", the product category or product attribute provided by the query system is not selected, and the query information is "Nokia" at this time; or the user inputs the keyword "N〇kia" and selects the query system. -18-201207646 The product category "Mobile Phone", the information is "Nokia Mobile". & Step 102, searching, in the category model library, a category model matching the query information according to the query information, where the category model includes a product category and a product category corresponding to the used keyword The corresponding attribute category 'generates the first query result according to the retrieved category model. According to different query information, the step includes the following two situations: the query information includes only the keyword input by the user, and the search in the category model database is matched with the query information according to the query information. The product category and the corresponding attribute category, the first query result includes the following steps: (1) determining whether a keyword matching the keyword in the query information exists in the keyword corresponding to the category model. (2) if present, searching in the category model library according to keywords in the query information, querying and obtaining a matching category model; otherwise, 'rewriting the keywords in the query information, and performing Again, until the judgment result is present and the matching category model is obtained. (3) Obtain the peak category from the obtained category model, and obtain the attribute class of the corresponding direct attribute according to the peak category. Head. Among them, the peak category is a product category that can prominently reflect the user's query intent and demand. ‘The product category with the highest weight, for example, may be the product category with the highest number of user clicks or clicks. The attribute category of the direct attribute is an attribute category extracted from a plurality of item attributes of the peak category. The extraction process is similar to the method of obtaining the item -19-201207646 in the query result from all the product categories, I won't go into details here. For example, when the query information only includes the keyword “Nokia”, the matching category models obtained in the category model library are: mobile phone (4000) and mobile phone case (2000), of which 4000 is the product category “mobile phone”. Corresponding weights, 2000 is the weight corresponding to the product category "mobile phone case". If the weight threshold is 500 at this time, then the peak category is “mobile phone”, and the attribute category of the direct attribute is extracted from multiple attributes in the “mobile phone” category according to a similar process, for example: according to direct The attribute "brand" gets the "brand" attribute category. It should be noted that if there is no peak category that satisfies the condition, the product category with the highest weight can be set as the peak category or the peak category, and it is not necessary to obtain the attribute category of the direct attribute. The setting conditions do not affect the protection scope of the present invention, for example, two commodity categories with the highest weight, in which the attribute category of the direct attribute is taken from each of the two commodity categories. (4) According to the acquired category The model and its corresponding weights and the attribute categories of the obtained direct attributes and their corresponding weights generate a first query result. Specifically, the product categories are arranged in descending order of weights to generate a product category set in the first query result, and the attribute categories are arranged in descending order of weights to generate attributes of the first query result. The category collection, the product category and the attribute category collection in the first query result will be pushed to the user. Preferably, the attribute categories are sorted according to different attributes to which they belong. For example, based on step (3), the generated product category in the first query result is: mobile phone (4〇00); mobile phone shell (2000); generating attribute category in the first query result of -20-201207646 The collection is: domestic brands according to the attribute "brand" (2000); European and American brands (1 000). Of course, the collection of items can also include: GSM ( ); CDMA (500) according to the attribute "network standard". 2. The query information includes a keyword input by the user and the selected product category. At this time, the category model matching the query information is retrieved in the category module according to the query information, and the class according to the check is used. The target model generates the first query result, and specifically includes the following steps: determining whether a keyword matching the keyword in the query exists in a keyword corresponding to the category model; if yes, selecting a keyword according to the user Searching in the type library, querying and obtaining the matching category model; otherwise, rewriting the keyword in the query information and making another judgment until the result is present and obtaining the keyword The category model obtains a category model that matches the business category in the query information from the acquired category model; obtains the weights and products corresponding to the product category in the category model that matches the product category The attribute category corresponding to the category and its corresponding rights generate the first query result. For example, when the query information is “Nokia mobile phone”, “there is no subcategory under the product category, so only the collection of the first query results. That is: the domestic brand (2000) US brand (1000) according to the attribute “brand”. Of course, the attribute category set can also include: Sexual “network standard, 'divided GSM (1〇〇〇); CDMA ( 5 00 ). Divided class 1000 User-type CSU to the inquiry model to judge 1 category and its weight, L machine" Sex class: Europe-based genre-21 - 201207646 It should be noted that there is no sub-category under the "If" mobile phone product category At the same time, the layer category can also be used as a collection of commodity categories in the first query result, for example: mobile phone (40 00); mobile phone casing (2000). Step 103, searching in the commodity library according to the query information The product category and the corresponding attribute category matching the query information generate a second query result. The step is similar to the prior art, that is, searching for a matching product category and corresponding products according to the structure of the commodity tree in the commodity library. Attribute category, generate product category collection and attribute category collection, which will not be described here. It should be noted that the category model in the first query result is generated according to the user's historical click data of the query result, so The weight of the sorting standard is the corresponding number of clicks or the probability, and the product category of the commodity library in the second query result is organized according to the classification of the commodity itself, so as a sorting criterion The weight is the quantity distribution of the product category or the product attribute in all the commodities. For example, the generated second query result is: the generated product category in the second query result is: mobile phone (40 00); Chain (2000), where 4000 is the weight corresponding to the product category "mobile phone" '2000 is the weight corresponding to the product category "mobile phone chain"; the generated attribute category in the second query result is: by attribute " Branded domestic brands (2〇〇〇); European and American brands (500). Step 1 04: Combine the first query result and the second query result to generate a final query result. Specifically, the first query result and the second query result are respectively composed of the commodity class-22-201207646 mesh set and the corresponding attribute category set, respectively, so the product category set and the corresponding attribute category in the two query results respectively The collection is merged, and the product category set and the attribute category set in the final query result are generated, including the following steps: (n: obtaining the first merge result, the first merge result is the first query result and the The same product category and its corresponding weight in the second query result and the attribute category corresponding to the product category and the corresponding weight thereof, wherein the weight in the first merge result is from the same product category or attribute category The weights of the two query results are weighted. Among them, the specific weighting method can be preset according to the actual situation, such as weighting 1 to 1, or weighting 2 to 1. (2) Obtaining the second combining result, The second merge result is the product category and its corresponding weight appearing only in the second query result and the attribute category corresponding to the product category and their corresponding weights. (3) weighting the weights in the first merge result so that each weight in the first merge result is higher than each weight in the second merge result. At this time, if the first merge result is in the middle Each weight in the corresponding set is already higher than each weight in the first merge result, and no weight increase is required. (4) The weight corresponding to the product category and the weight corresponding to the attribute category corresponding to the product category Arranged from high to low, and returned to the user. In the embodiment of the present invention, the first query result is: mobile phone (4〇00); mobile phone case (200); according to attribute "brand," Domestic brands (2 〇〇〇-23- 201207646); European and American brands (1 000); the second query results generated are: mobile phone (4000); mobile phone chain (2000); domestic brands by attribute "brand" ( 2000); European and American brands (500) as an example. At this point, the above two query results are combined, specifically, the same product category "mobile phone" in the product category set is obtained, and they are respectively from the first query. The weight of the result is "4000" and comes from The "4000" of the second query result is weighted, and the weighting ratio is 2 to 1 ' At this time, the product category "mobile phone," has a weight of "1 2000"; similarly, the domestic brand classified by attribute "brand" is obtained ( 6000); European and American brands (2500), get the first combined result. Get the phone shell (2000) only in the first query result, after weighting. , get the second combined result for the phone case (4000). Preferably, the specific item is extracted in the final query result described above and returned to the user as part of the final query result. For example, the product with the highest click rate and its detailed information are extracted from the product category ranked first in the final query result as part of the final query result. Step 1 05, the final query result is sent to the user, so that The user views it. Step 1 06: Generate a log according to the click operation of the final query result by the user and the query information. Preferably, generating a log according to the user's click operation on the final query result and the query information includes: obtaining a click that the user clicks to view the product category, the corresponding attribute category, and the item returned as the request response. Operation; generating a log according to a click operation. The log includes query information and corresponding click information, and the information includes the product category and product attributes of the clicked product, the clicked product category, and the clicked product. Attribute category; store the generated log. For example, the user clicks "Mobile_>N〇kia_> 16 million colors," in the final query result of the query information "Nokia", and selects a mobile phone item to click and view at this time. Each click operation of the user generates a log record, which includes: query information, click on the object 'related click object (ie click "mobile phone" to click "16 million colors," related click operation) and the like. Step 1 07: Perform statistical analysis based on the received logs to obtain a category model. Specifically, obtaining a category model according to the statistical analysis of the received logs includes the following steps: performing statistical analysis on the log records according to the query information and the corresponding click information in the log records, and obtaining statistical analysis results, and the statistical analysis is performed. The result is a product category corresponding to the query information and a corresponding weight thereof and an attribute category corresponding to the product category and corresponding weights: the weight is the number of clicks of the product category and the corresponding attribute category / or click probability; generate a category model according to the statistical analysis result: The statistical analysis results are arranged according to the commodity category tree to generate a category model. The generating the category model according to the statistical analysis result includes: determining whether the product category corresponding to the query information and its corresponding weight and the attribute category corresponding to the product category and the corresponding weight thereof reach a preset-25 - 201207646 Weight threshold: When the preset weight threshold is reached, 'the category model is established according to the product category corresponding to the query information and its corresponding weight and the attribute category corresponding to the product category and its corresponding weight. ' For example: Statistical analysis of logs within one day'. When the query information is "Nokia", click the number of times the product category "Mobile" is 1〇〇〇' Click on the "Phone Case" number is 5 00, click " The number of network standards under the mobile phone is 300, and the number of times of clicking "GSM" is 100 times, and the number of clicks on "CDMA" is 50 times. At this time, the generated category model is: commodity category: mobile phone (1〇〇〇) mobile phone case (500); attribute category: GSM (100) CDMA (50). Step 108: Update the category model to the category model library. This step continuously updates the category model library by the user's history click record, and the updated category model library is used according to subsequent users. The query returns the query results, thus constantly maintaining the accuracy of the category model library and improving the accuracy of the returned query results. Of course, it is also possible to eliminate data from earlier data. It should be noted that there is no sequence between the above steps 102 and 103. To implement the above-described vertical search-based query method, the embodiment of the present invention provides a vertical search-based query system, as shown in FIG. 3, including: a log server, a modeling server, a query server, a commodity library, and a commodity category. Model library. The query server includes: a front-end query server, -26- 201207646 category query server and commodity query servo in the category query server, the commodity store, and the front-end server as the query request of the user and the background, and The background query query server and the commodity query server are used to query the category model in the commodity library and the product category model category model library generated by the log recorded by the device. The following function modules are respectively included in the above, as shown in FIG. 4, the front end check is used to receive the query request of the user and the query result returned by the class server; the query result of the query returned by the merger and the commodity query server a sending module for sending the visual query server and the commodity query server to the user. As shown in FIG. 5, the category query servo receives the query query information sent by the front-end query server, and the query module is configured to send the attribute category corresponding to the quotient matching the query information and the corresponding weight result to the query module. The front end queries the server. As shown in Fig. 6, the commodity inquiry servo receives the querier sent by the front-end query server, and the commodity category model library is stored in the commodity inquiry server. The mutual medium is used to receive feedback from the user. The category check is based on the query that is forwarded by the front-end server. Among them, the quotient modeling server is further introduced according to the log servo line. The query server includes: a receiving module object query server and a commodity query group, configured to merge the class query servo results, generate an end user query request and send the class to the class, and the received query result sender includes: receiving The module is configured to request, the query request carries the query information in the category model library, and the corresponding weight sum: the sending module is configured to: the querier includes: a receiving module, configured to request, the query request Carrying -27- 201207646 query information; query module, which is used to match the product category and the corresponding weight leg category and corresponding weight according to the query information in the query information; the sending module is used for Will be sent to the front-end query server. As shown in FIG. 7, the modeling server includes: a receiving module, a log record generated by the server, and a statistical analysis module, which performs statistical analysis on the recorded information by using the query information and the corresponding click information in the record. Obtaining a statistical analysis result, where the statistic is an attribute category corresponding to the item category corresponding to the query information and a corresponding attribute category thereof, and a corresponding weight thereof; the weight item category and the corresponding attribute category click number And/or clicking the machine module, generating a category model according to the statistical analysis result, and calculating the analysis result according to the commodity category tree; the category model generated by the sending module is sent to the commodity category model library. The interaction process between the above various servers specifically includes a segment: (1) a query phase; and (2) an update phase. The query phase is: the front-end query server receives the request, and the query request carries the query information. Front-end query The query information is sent to the category query server and the commodity check. The category query server queries the result of the matching product category and/or attribute category according to the query information in the category model library, and sends the first query result to the front end to check. The commodity inquiry server checks the product category and/or the attribute category matched by the information in the commodity library according to the query information, and the database search and the corresponding query result are used to receive the result according to the analysis result of the record And the merchant is the said merchant rate; generating the system, the query server for the next two ranks will be retrieved from the query server, and the query server is generated and the second check is made -28 - 201207646 The result is sent, and the second query result is sent to the front-end query server. The query server combines the two query results to generate a final check result and send it to the user, so that the user can click to view. The update phase after the query is: when the user clicks to view in the final query result, the front-end query server sends the operation to the server, so that the log server generates a log according to the click operation; the log server batches within a certain period of time The log is sent to the modeling server 'modeling servo according to the batch data for statistical analysis, the statistical analysis result is obtained, and the root statistical analysis result is generated to generate a category model, which is sent to the category query server category query server to generate the generated The category model is updated to the category model. For the product library in the product search server, it is maintained and updated according to the category and attribute of the product. It can be known from the above interaction process that the query phase and the update phase are the overall loop process, and the returned result of the query is for the user to click to view, the root user clicks to view and update, and according to the updated data, the query is repeated, and the update is continuously performed. Improve the relevance of the query. The vertical-based query method in the present invention will be described in detail below in conjunction with specific application scenarios. As shown in FIG. 8 , a method for querying a sling-based query according to an embodiment of the present invention, which is a process of querying a category model library and an item according to a query request (ie, a query phase), specifically includes the following steps: Step 3 0 1 The front-end query server obtains the query information of the user's query request query request. The front-end query server obtains 0 刖 query node by parsing the query request, and the server device uses the database to query the database, and searches the direct search library, the query -29-201207646 information. The parsing process specifically includes analyzing whether the query request is a keyword input by the user through the query input box or a product category or attribute category selected by the user in the product category or attribute category provided by the query system. Therefore, the query information carried in the query request may be a query keyword input by the user, or may be a combination of a query keyword input by the user and a product category or attribute category selected by the user. For example, when the content carried in the query request is “Nokia mobile phone slide”, the front-end server extracts query information “Nokia”, “mobile phone”, “slider” from the content, and analyzes the three query information. Source, if "Nokia" is the keyword entered by the user through the query input box, "mobile phone" is the product category selected by the user, and "slider" is the attribute category selected by the user, then the query request is a query input by the user. A combination of keywords and user-selected product categories or attribute categories. Step 302: The front-end query server forwards the received query information to the category query server and the commodity query server respectively. Step 303: The category query server searches the category model library for the product category and the corresponding attribute category that match the query information according to the query information, generates a first query result, and returns the first query result. Give the front end the query server. The category model library stores a large number of category models, each of which is composed of several commodity categories and their weights and corresponding attribute categories and their rights, and corresponds to the keyword. The product category group and the weight thereof are composed of the product category set pushed according to the corresponding keyword, and the attribute corresponding to the product category and its weight constitute an attribute set pushed according to the corresponding keyword, -30- 201207646 and each set They are arranged in order of weight from high to low. It should be noted that the generation of each category model is completed according to the history of the corresponding keyword, and the specific generation process is detailed in the following description. Preferably, the category model is stored in units of keywords according to the structure of the product category tree (of course, may be other orders). Specifically, the format of the category model is as shown in Table 1 = Table 1. The tear-up keyword product category and its corresponding weight attribute type attribute category and their corresponding weights, the category model in Table 1 is organized according to the relationship of the commodity category tree (of course, the commodity category tree is also available The form is embodied, and the specific form of expression should not be regarded as limiting the scope of protection of the present invention. That is, there are three layers of relationships: commodity categories, multiple commodity attribute types (including one) for each commodity category, and each commodity attribute. Multiple attributes corresponding to the type. For example: mobile phone category - attribute type such as brand / network standard - Nokia / GSM and other attributes. Specifically, the category query server searches the category model library for the product category and the corresponding attribute category that match the query information according to the query information, as shown in FIG. 9 , and includes the following steps: Step 3031 The category query server extracts the keywords in the query information. Step 3 03 2. The category query server determines whether the keyword is in the category model library. -31 - 201207646 Specifically, the category query server determines whether the keyword includes any one of the following two conditions in the type library: (1) When it is determined that the keyword is not in the category model library, step 303 3 (2) When judging that the keyword is in the category model library, go to 3034; Step 3 0 3 3. The category query server changes the keyword | The category query server is based on retaining the core intent Rewriting the word 'This step specifically includes: first, querying the information word, deleting the unimportant word, supplemented by the synonym replacement; secondly, typeifying each word obtained, for example: product P word, etc. Third, according to the type of each word tag, the weight of each word is marked according to the preset; finally, the keyword determined according to the weight of each word, go to step 3 032. For example, when the query information is “Nokia Mobile Red”, the first query information is segmented, and “Nokia”, “Mobile” and “Red” are obtained, and each participle obtained is marked, for example: “Nokia” brand word, will "Mobile phone" is marked as product word, "red" is marked as sex; third, according to the preset label type and weight correspondence, the weight of each word segmentation, for example: the weight of the default brand word corresponds to 5 0 word corresponding The weight is 3 〇, the weight corresponding to the commodity attribute is 2, the weight of the shell IJ is 50, the weight of the “mobile phone” is 30, and the weight of the “red” is later. Since the weight of the “red” is low, it can be ignored. Therefore, the keyword is “Nokia Mobile Phone.” The category module goes to the step to the step of the key division after the division of the word division/brand rules, first: the next: the product is marked as the product, each product, Nokia" S 2; After rewriting -32- 201207646 Step 3 03 4. The category query server determines whether the product category is specified in the query information. Specifically, it is determined whether the quotient is specified in the query information. The category includes any one of the following two conditions: (1) When it is determined that the item category is specified in the query information, go to step 3 0 3 5; (2) when it is determined that the item category is not specified in the inquiry information Then, go to step 303 6. For example, when the query information is only the keyword "Nokia" input by the user, it is judged that the item category is not included in the query information; when the query information is the keyword "Nokia" input by the user and the user When "Mobile" is selected in the product category provided by the query system, it is determined that the product category is specified in the query information. Step 3 03 5. The category query server is based on the keyword and the specified product category in the model. Search in the library, obtain the matching category model, and go to step 304. (1) According to the keyword, search in the category model library to obtain the category model tree corresponding to the keyword. (2) According to the specified The product category, in the acquired category model tree, obtains a category model that matches the specified product category, according to the product category in the category model and its corresponding weight and the attribute corresponding to the product category And the corresponding weights generate the first query result, including the pushed product category set and the attribute category set, that is, select the branch of the included product category from the obtained category model tree, and obtain the product category For the parent category -33- 201207646, the category model of the tree structure. For example: when the query information is "Nokia mobile phone," select "mobile phone" in the corresponding layer of "mobile phone" and "phone case" A category model of the corresponding tree structure. Step 3036: The category query server extracts the peak category from the obtained matching category model, and obtains the attribute category of the corresponding direct attribute according to the peak category. Specifically, the category query server extracts the peak category in the acquired matching model, including the following steps: (1) Sorting the commodity categories in the matched category model according to the weight from high to low. (2) Obtain the first category of goods. (3) It is judged whether the weight of the item category of the first sort is greater than the weight threshold a. When it is judged that the weight of the first sorted commodity category is greater than the weight threshold a, the process proceeds to step (4). Preferably, the weight threshold a can be set according to the history data, the user clicks the number of clicks of the product category in the query result, for example, if the click rate of a certain product category in the query result in the history record is higher than 50%, the setting is set. The weight corresponding to the product category is the weight threshold a. (4) It is judged whether the weight of the first category model of the sorting and the weight of the sorted second category model are greater than the weight threshold b. When the weight of the first product category and the weight of the second category model are greater than the weight threshold b, the user's click rate of the product category is higher in the history record, so the product category can be prioritized. -34- 201207646 Push, to push the attribute category of the product category to the user, so as to improve the efficiency of the user query, go to step (5). (5) The product category corresponding to the first product category is a peak category, and the corresponding direct attribute is obtained according to the attribute of the peak category, and the attribute category of the direct attribute is pushed by the query result. user. For example, when the query information is “Nokia”, the “mobile phone” and “phone shell” are selected as the tree model of the parent node to be pushed to the user. When the "mobile phone" is the peak category, the direct attribute "network system" is selected from its attributes, and the "GSM" and "CDMA" classified by the "network standard" are pushed to the user. It should be noted that, in the embodiment of the present invention, the product category of the peak category is only the first order, and the peak category may also be the product category sorted in the first few places. Let me repeat. Preferably, the attribute category of obtaining the direct attribute according to the attribute of the peak class may be arranged according to the weight of the attribute of the peak class in descending order, and filtering out the attribute whose weight is lower than the preset parameter. An attribute whose weight is higher than the default is the attribute category of the direct attribute and is pushed. It should be noted that the process of pushing the attribute category to the user in a certain order is basically the same as the process of pushing the product category, that is, sorting and pushing according to the weight, but the attribute category is attached to the product category, so the class must be first performed. The purpose is to push, and then the attributes in the same category are further pushed, and will not be described here. At this point, the query result is the attribute category in the category model that matches the keyword and the attribute category of the obtained direct attribute. -35- 201207646 Step 3 04. The commodity inquiry server searches the commodity library for the product category matching the query information and the corresponding weights and the corresponding attribute categories and their corresponding weights according to the query information, and generates The second query result ' returns the second query result to the front-end query server. For example, the generated second query result is: the generated product category set in the second query result is: mobile phone (4000); mobile phone chain (2000); and the generated attribute category set in the second query result is: Domestic brands (2000) according to the attribute "brand"; European and American brands (500). Step 305: The front-end query server merges the first query result and the second query result to generate a final query result. Specifically, the front-end query server merges the first query result and the second query result, and the final query result includes any one of the following multiple cases: Case 1: For the first query result and the second query result The product categories and corresponding attribute categories that exist in the middle indicate that such product categories and corresponding & attribute categories have a higher number of clicks in the previous click operations of the user history, that is, the degree of attention is higher, and The distribution of such commodity categories in the commodity library is also high. At this time, the weights of such commodity categories and corresponding attribute categories are superimposed. Preferably, the data from the two query results can be performed during the superposition process. Weighted superposition, generating each of the commodity categories in the final category and their corresponding weights and attribute categories corresponding to the product category and their corresponding rights®' and according to the weight of the commodity category and the corresponding attribute category respectively Arranged in high to low order as a result of the first merge. Case 2: For the product category that exists only in the second query result and the attribute category corresponding to -36- 201207646, it indicates that such commodity category is in the commodity, but the user's attention is low, and will only be in the second Query category and its corresponding weight and genus corresponding to the commodity category
情況三:對於僅存在第一查詢結果中的 應屬性類目,表明此類商品類目在商品庫中 (該結果產生的可能性較低),因此不對此 查詢結果中。 (4)確定最終査詢結果中商品類目的排 分別對第一合倂結果中的商品類目和屬 行權重提升,即按照預設的規則提高權重値 合倂結果中商品類目集合和屬性類目集合中 高於第二合倂結果中的每一個權重,此時將 目和對應的屬性類目分別按照權重由高到低ϋ 例如:第一合倂結果中的權重値分別爲 :120、商品類目b: 100和商品類目c: 80; 中的權重値分別爲商品類目i : 1 1 0、商品類丨 類目k : 70。若不進行提升,則按照權重由 排列的結果爲:商品類目a-商品類目i -商品 目j-商品類目c-商品類目k。設此時權重提升 始權重的2倍作爲提升後的權重,此時第一 權重値分別爲:商品類目a : 240、商品類目 類目c : 1 62,按照權重由高到低的順序排列 庫的分佈較高 結果中將商品 性類目及其對 第二合倂結果 商品類目和對 無法得到匹配 類目放在最終 列順序。 性類目權重進 ,分別使第一 的每一個權重 所有的商品類 順序排列。 & :商品類目a 第二合倂結果 目j · 9 0和商品 高到低的順序 類目b-商品類 的規則爲將原 合併結果中的 b : 2 0 0和商品 的結果爲:商 -37- 201207646 品類目a-商品類目b-商品類目c-商品類目i-商品類目j-商品 類目k。 步驟306、前端査詢伺服器將生成的最終査詢結果發 送給用戶,使用戶進行點擊查看。 需要說明的是,上述步驟3 〇3和步驟3 04沒有先後順序 〇 需要說明的是,上述權重提升的使用僅爲本發明實施 例中一種較佳的實施方式,權重提升不僅可以用於査詢結 果合倂過程中,也可以用於根據査詢資訊進行査詢的過程 中,以及任何需要根據權重進行調整的過程中,例如:類 目模型的建立等。此外,本發明實施例同樣適用於僅推送 商品類目,不退送屬性類目的推送方式,此時不獲取所要 推送的屬性類目即可。 如圖10所示,爲本發明實施例提供的一種基於垂直搜 索的査詢方法,根據用戶對商品的點擊查看更新用於査詢 的類目模型庫和商品庫(即更新階段),具體包括以下步 驟: 步驟40 1、前端査詢伺服器將最終査詢結果發送給用 戶,以供用戶進行點擊查看。 前端查詢伺服器接收類目查詢伺服器和商品查詢伺服 器的查詢結果後,對二組査詢結果進行合倂,生成最終查 詢結果,並將該最終査詢結果發送給用戶。 例如:對於查詢資訊“Nokia”,返回的商品類目爲: 手機(4000 );手機外殼(2000 );返回的屬性類目爲: -38- 201207646 按屬性“品牌”劃分的國產品牌(2000 ) ·,歐美品牌( )° 步驟402、日誌伺服器接收用戶的點擊操作。 當用戶在返回的最終査詢結果中選擇所關注的商 目、屬性類目或商品進行點擊時,後臺的日誌伺服器 錄下該用戶的點擊操作。 該點擊操作包含的資訊包括:用戶點擊的商品類 屬性類目或商品;與此次查詢對應的查詢資訊。例如 擊商品類目“手機”,藉由點擊“手機”後或直接點擊屬 目國產品牌;點擊某一符合查詢資訊的具體產品,如 黑色的Nokia N97。 需要說明的是,對於一次查詢,用戶所點擊的商 目、屬性類目或商品通常爲多個,日誌伺服器可以將 此次査詢的所有點擊物件作爲一組資料進行處理。 步驟403、日誌伺服器根據該點擊操作生成日誌。 曰誌伺服器根據接收到的用戶在瀏覽器一側的點 作轉化爲對應的文字檔案, 步驟404、日誌伺服器將批量日誌發送給建模伺 〇 曰誌伺服器可以根據預設的週期到來(例如:一 或接收到請求,或達到預設的發送條件(如日誌伺服 待建模伺服器處理的日誌達到一定數量)時等,曰誌 器將批量日誌發送給建模伺服器。 需要說明的是,凡是使日誌伺服器向建模伺服器 1000 品類 將記 目、 :點 性類 一款 品類 對應 擊操 服器 天) 器中 伺服 發送 -39- 201207646 曰誌的方式均屬於本發明的保護範圍。 步驟405、建模伺服器根據本批資料進行統計分析, 獲取統計分析結果。 曰誌記錄包括以下多種情況中的任一種: (1)該日誌中的曰誌記錄爲用戶點擊具體商品的曰 誌記錄。 (2 )該日誌中的日誌記錄爲用戶點擊商品類目的曰 誌記錄。 (3)該日誌中的日誌記錄爲用戶點擊屬性類目的曰 誌記錄。 通常日誌記錄是以天爲單位進行統計分析的。具體地 ,統計分析包括以下兩個步驟: (1 )從所接收的資料中對新增的以天爲單位的所有 用戶的日誌記錄進行單天處理。 具體地,抽取出單天內所有用戶的日誌記錄,並按照 不同的關鍵字進行統計,最後得到按關鍵字組織的格式化 資料。其中,按照不同的關鍵字進行統計包括:在藉由每 一個關鍵字進行查詢時,統計藉由該關鍵字進行點擊的商 品及其對應的商品的屬性和藉由該關鍵字點擊的商品類目 和屬性類目。 例如:對於關鍵字“Nokia”,統計了藉由該關鍵字進 行點擊的商品類目“手機”的點擊數爲1 〇〇〇次、屬性類目“ 網路制式”的點擊數爲300次,“網路制式’,下的“GSM”點擊 數爲100次、“手機”類目下網路制式爲GSM的—款手機黑 -40- 201207646 色Nokia N97的點擊數爲50次,則其對應的屬性類 擊數也爲50次。其中,對於存在因果關係的點擊記 要將結果事件的點擊數折算到原因事件的點擊數, 將點擊的商品黑色Nokia N97所對應的屬性“GSM” 用於推送的屬性類目“GSM”中,將商品黑色Nokia 點擊數折算到對應的商品類目“手機”中,具體的折 可按照經驗値或者實際需求設置,例如:折算後的 數分別爲:手機--1500次;網路制式- -500次,GSM 然後進行多天合倂處理,累加了每一天的“Nokia” 對應的點擊數,並按照商品類目樹的形式組織。 需要說明的是,上述統計方法僅爲本發明實施 種較佳的實施方式,凡是根據日誌記錄進行點擊統 式均屬於本發明的保護範圍。 (2)對包括新增的一天在內往前回溯一個週 如40天),進行多天合倂處理。 步驟406、建模伺服器根據該統計分析結果生 模型,並將生成的類目模型發送給類目査詢伺服器 判斷與所述査詢資訊對應的商品類目及其對應 和與商品類目對應的屬性類目及其對應權重是否達 的權重門限; 當達到預設的權重門限時,根據與所述查詢資 的商品類目及其對應的權重和與商品類目對應的屬 及其對應權重建立按照商品類目樹的形式組織,生 模型。 目的點 錄,需 例如: 折算到 N97的 算比例 點擊次 - 2 0 0 ° 關鍵字 例中一 計的方 期(比 成類目 0 的權重 到預設 訊對應 性類目 成類目 • 41 - 201207646 步驟407、類目查詢伺服器將生成的類目模型更新到 類目模型庫中。 該步驟不斷地藉由用戶的歷史點擊記錄更新類目模型 庫,而更新後的類目模型庫用於根據後續用戶的査詢返回 査詢結果,該過程爲閉環迴圏過程,從而不斷地保持類目 模型庫的精度,提高返回的査詢結果的準確性。 本發明實施例提供一種基於垂直搜索的查詢系統,如 圖11所示,包括査詢伺服器111 0、日誌伺服器11 2 0和建模 伺服器1 1 3 0,其中, 查詢伺服器1110,用於獲取用戶的査詢資訊;根據所 述查詢資訊在類目模型庫中檢索與所述查詢資訊相匹配的 類目模型,所述類目模型包括:與關鍵字對應的商品類目 ,並根據檢索到的類目模型生成第一查詢結果;並根據所 述査詢資訊在商品庫中搜索與所述査詢資訊相匹配的商品 類目,生成第二查詢結果;對所述第一查詢結果和所述第 二査詢結果合併,生成最終査詢結果》 其中,所述類目模型還包括:與所述商品類目對應的 屬性類目; 上述査詢伺服器1110,還用於根據所述査詢資訊在商 品庫中搜索與所述查詢資訊相匹配的商品類目和與所述商 品類目對應的屬性類目。 日誌伺服器Π 2 0,用於根據所述用戶對所述查詢伺服 器111 0生成的最終查詢結果的點擊操作和所述査詢資訊生 成曰誌,並將所述日誌發送給所述建模伺服器。 • 42- 201207646 上述日誌伺服器1 1 2 0,具體用於獲取用戶對作爲請求 回應返回的商品類目、與商品類目對應的屬性類目和商品 進行點擊査看的點擊操作;根據點擊操作生成日誌,所述 曰誌包括査詢資訊和對應的點擊資訊,所述點擊資訊包括 點擊的商品所在商品類目和所屬商品屬性、點擊的商品類 目和點擊的屬性類目;儲存所生成的日誌。 建模伺服器1 1 3 0,用於對所述日誌進行統計分析,獲 得類目模型。 具體地,上述建模伺服器1 1 3 0,可以具體用於根據所 述曰誌記錄中的查詢資訊和對應的點擊資訊對所述日誌記 錄進行統計分析,獲得統計分析結果,所述統計分析結果 爲與所述查詢資訊對應的商品類目及其對應的權重和與商 品類目對應的屬性類目及其對應權重;所述權重爲所述商 品類目和與商品類目對應的屬性類目點擊次數和/或點擊 機率;根據所述統計分析結果生成類目模型,並將所述統 計分析結果按照商品類目樹進行排列。 上述建模伺服器1130,還可以具體用於判斷與所述査 詢資訊對應的商品類目及其對應的權重和與商品類目對應 的屬性類目及其對應權重是否達到預設的權重門限;當達 到預設的權重門限時’根據與所述查詢資訊對應的商品類 目及其對應的權重和與商品類目對應的屬性類目及其對應 權重建立類目模型。 上述建模伺服器1130’還用於將所述類目模型發送給 所述査詢伺服器1110 ;相應地’上述查詢伺服器1110 ’還 -43- 201207646 用於將所述最終査詢結果發送給用戶,使所述用戶進行查 看;將來自所述建模伺服器1 1 30的類目模型更新到所述類 目模型庫中。 本發明實施例提供一種查詢伺服器,如圖1 2所示,査 詢伺服器1 2 0 0包括: 獲取模組1210,用於獲取用戶的查詢資訊。 査詢模組1 220,用於根據所述査詢資訊在類目模型庫 中檢索與所述査詢資訊相匹配的類目模型,所述類目模型 包括:與關鍵字對應的商品類目,並根據檢索到的類目模 型生成第一査詢結果;並根據所述查詢資訊在商品庫中搜 索與所述查詢資訊相匹配的商品類目,生成第二查詢結果 〇 其中,類目模型還包括:與所述商品類目對應的屬性 類目; 上述査詢模組1220’還用於根據所述査詢資訊在商品 庫中搜索與所述査詢資訊相匹配的商品類目和與所述商品 類目對應的屬性類目。 合倂模組1 2 3 0 ’用於對所述第一查詢結果和所述第二 查詢結果合倂,生成最終査詢結果。 上述查詢伺服器1200,還可以進—步包括: 發送模組1 240 ’用於將所述最終査詢結果發送給用戶 ’使所述用戶進行査看,並使日誌伺服器根據所述用戶對 所述最終査詢結果的點擊操作和所述査詢資訊生成日誌, 並將所述日誌發送給建模伺服器進行統計分析獲得類目模 -44 - 201207646 型並將所述類目模型更新到所述商品類目伺服器的類目模 型庫中。 其中,所述查詢資訊僅包括用戶輸入的關鍵字時,如 圖1 3所示,査詢模組1 2 2 0,具體包括: 判斷子模組1 22 1 ’用於判斷類目模型對應的關鍵字中 是否存在與所述查詢資訊中的關鍵字匹配的關鍵字; 匹配子模組1 222 ’用於若判斷子模組判斷存在,則根 據所述査詢資訊中的關鍵字在所述類目模型庫中檢索,査 詢並獲取匹配的類目模型;否則,對所述査詢資訊中關鍵 字進行改寫,並進行再次判斷,直到判斷結果爲存在並獲 取到匹配的類目模型爲止; 提取子模組1 223,用於從所獲取的類目模型中獲取峰 値類目,並根據該峰値類目獲取對應的直達屬性的屬性類 目; 生成子模組1 224,用於根據所獲取的類目模型及其對 應的權重和所獲取的直達屬性的屬性類目及其對應權重, 生成第一査詢結果。 其中,所述查詢資訊包括用戶輸入的關鍵字和用戶所 選擇的商品類目時, 判斷子模組1 22 1,用於判斷類目模型對應的關鍵字中 是否存在與所述查詢資訊中的關鍵字匹配的關鍵字; 匹配子模組1 222,用於若判斷子模組判斷存在,則根 據所述用戶輸入的關鍵字在所述類目模型庫中檢索,查詢 並獲取匹配的類目模型;否則,對所述查詢資訊中關鍵字 -45- 201207646 進行改寫,並進行再次判斷,直到判斷結果爲存在並獲取 到與該關鍵字匹配的類目模型爲止; 提取子模組1 223,用於從所獲取的類目模型中獲取與 該查詢資訊中的商品類目匹配的類目模型; 生成子模組1 224,用於所述査詢伺服器獲取與該商品 類目匹配的類目模型中的商品類目及其對應的權重,生成 第一査詢結果。 其中,如圖14所示,合倂模組1 230具體包括: 第一合倂子模組1 23 1,用於獲取第一合倂結果,所述 胃~~合倂結果爲所述第一查詢結果和所述第二查詢結果中 ί目同的商品類目及其對應的權重和與商品類目對應的屬性 _目及其對應權重,其中第一合倂結果中的權重根據同一 商品類目或屬性類目的來自兩個査詢結果的權重進行加權 獲得; 第二合倂子模組1 23 2,用於獲取第二合倂結果,所述 胃二合倂結果爲僅在所述第二査詢結果中出現的商品類目 及其對應的權重和與所述商品類目對應的屬性類目及其對 應權重; 權重提升子模組1 23 3,用於對第一合倂結果中的權重 進行權重提升,分別使第一合倂結果中商品類目和屬性類 目的每一個權重高於第二合倂結果中的商品類目和屬性類 目的每一個權重; 生成子模組1 234,用於按照商品類目對應的權重和與 商品類目對應的屬性類目對應的權重由高到低的順序排列 -46- 201207646 ,並返回給用戶。 本發明具有以下優點:藉由在由用戶的點擊操 的類目模型庫和商品庫中查詢用戶的請求,並對二 合倂’提高了用戶査詢結果與用戶査詢意圖的相關 高用戶體驗感。 藉由以上的實施方式的描述,本領域的技術人 清楚地瞭解到本發明可借助軟體加必需的通用硬體 方式來實現’當然也可以藉由硬體,但很多情況下 更佳的實施方式。基於這樣的理解,本發明的技術 質上或者說對現有技術做出貢獻的部分可以以軟體 形式體現出來’該電腦軟體產品儲存在一個儲存媒 包括若干指令用以使得一台終端設備(可以是手機 電腦,伺服器,或者網路設備等)執行本發明各個 所述的方法。 以上所述僅是本發明的較佳實施方式,應當指 於本技術領域的普通技術人員來說,在不脫離本發 的前提下,還可以做出若干改進和潤飾,這些改進 也應視本發明的保護範圍。 【圖式簡單說明】 爲了更清楚地說明本發明或現有技術中的技術 下面將對本發明或現有技術描述中所需要使用的附 單的介紹,顯而易見地,下面描述中的附圖僅僅是 的一些實施例,對於本領域普通技術人員來講,在 作生成 者進行 度,提 員可以 平臺的 前者是 方案本 產品的 體中, ,個人 實施例 出,對 明原理 和潤飾 方案, 圖作簡 本發明 不付出 -47- 201207646 创造性勞動的前提下,還可以根據這些附圖獲得其他的附 圖。 圖1 (a)爲現有技術中返回查詢結果的結構示意圖; 圖1 (b)爲現有技術中返回的査詢結果; 圖2爲本發明中的一種基於垂直搜索的査詢方法流程 圖, 圖3爲本發明中的一種基於垂直搜索的査詢系統結構 示意圖; 圖4爲本發明中的前端查詢伺服器的結構示意圖: 圖5爲本發明中的類目查詢伺服器的結構示意圖; 圖6爲本發明中的商品査詢伺服器的結構示意圖; 圖7爲本發明中的建模伺服器的結構示意圖; 圖8爲本發明中的一種基於垂直搜索的查詢方法流程 圖: 圖9爲本發明中的類目査詢伺服器檢索與査詢資訊相 匹配的商品類目和對應的屬性類目的流程圖; 圖10爲本發明中的一種基於垂直搜索的査詢方法流程 圖; 圖11爲本發明中的一種基於垂直搜索的査詢系統結構 示意圖; 圖12爲本發明中的一種查詢伺服器的結構示意圖; 圖13爲本發明中的查詢伺服器中査詢模組的結構示意 圖; 圖14爲本發明中的查詢伺服器中合倂模組的結構示意 -48- 201207646 【主要元件符號說明】 1 1 1 0 :查詢伺服器 1 120 :日誌伺服器 1 1 3 0 :建模伺服器 1 2 1 0 :獲取模組 1 2 2 0 :査詢模組 1 23 0 :合倂模組 1 240 :發送模組 1221 :判斷子模組 1 222 :匹配子模組 1 223 :提取子模組 1 224 :生成子模組 1231 :第一合倂子模組 1 2 3 2 :第二合倂子模組 1 2 3 3 :權重提升子模組 1 2 34 :生成子模組 -49Case 3: For the attribute category only in the first query result, it indicates that such commodity category is in the commodity library (the result is less likely to be generated), so it is not included in the query result. (4) Determining the product category in the final query result separately increases the weight of the product category and the belongings in the first merge result, that is, according to the preset rule, the weight category is combined with the product category set and the attribute class in the result. Each of the weights in the target set is higher than the weight of the second merged result. In this case, the target attribute category and the corresponding attribute category are respectively according to the weight from high to low. For example, the weights in the first merge result are: 120, the product The weights in category b: 100 and commodity category c: 80; are commodity category i: 1 1 0, commodity category k category k: 70. If the promotion is not performed, the result of the arrangement by weight is: product category a - product category i - product item j - product category c - product category k. At this time, the weight is increased by 2 times as the weight of the boost. At this time, the first weights are: product category a: 240, product category category c: 1 62, in descending order of weights. In the higher distribution result of the arrangement library, the commodity category and its paired product category and the pair of unmatched categories are placed in the final column order. The sex category weights are re-entered, and each of the first weights is ordered in order. & : Product category a The second contract result j · 90 and the order of the goods high to low category b - the class of the commodity class is the result of b : 2 0 0 and the commodity in the original combined result: -37- 201207646 Category a-Commodity category b-Commodity category c-Commodity category i-Commodity category j-Commodity category k. Step 306: The front-end query server sends the generated final query result to the user, so that the user performs click-to-view. It should be noted that the foregoing steps 3 〇 3 and 308 have no sequence. It should be noted that the use of the weight increase is only a preferred embodiment of the embodiment of the present invention, and the weight improvement can be used not only for the query result. In the process of merging, it can also be used in the process of querying according to the query information, and any process that needs to be adjusted according to the weight, for example, the establishment of the category model. In addition, the embodiment of the present invention is also applicable to a push type that only pushes a product category and does not return an attribute category. In this case, the attribute category to be pushed is not obtained. As shown in FIG. 10, a vertical search-based query method according to an embodiment of the present invention updates a category model library and a commodity library (ie, an update phase) for querying according to a user's click view on an item, and specifically includes the following steps. : Step 40 1. The front-end query server sends the final query result to the user for the user to click to view. After receiving the query result of the category query server and the commodity query server, the front-end query server merges the two sets of query results to generate a final query result, and sends the final query result to the user. For example, for the query information “Nokia”, the returned product categories are: mobile phone (4000); mobile phone case (2000); the returned attribute categories are: -38- 201207646 Domestic brands by attribute “brand” (2000) ·, European and American brands ( ) ° Step 402, the log server receives the user's click operation. When the user selects the business, attribute category or item of interest in the returned final query result, the background log server records the user's click operation. The information included in the click operation includes: the product category attribute category or product clicked by the user; and the query information corresponding to the query. For example, click on the product category “Mobile Phone”, click on “Mobile Phone” or directly click on the domestic brand of the item; click on a specific product that matches the query information, such as the black Nokia N97. It should be noted that for a query, the number of attributes, attribute categories, or products that the user clicks is usually multiple, and the log server can process all the click objects of the query as a group of data. Step 403: The log server generates a log according to the click operation. The server is converted into a corresponding text file according to the received user's point on the browser side. Step 404, the log server sends the batch log to the modeling server, and the server can arrive according to a preset period. (For example: When a request is received, or a preset sending condition is reached (such as when the log servo to process the log processed by the modeling server reaches a certain number), the device sends the batch log to the modeling server. The method of making the log server to the modeling server 1000 category will be recorded, the point type class corresponds to the type of servo machine, and the method of servo transmission -39-201207646 belongs to the present invention. protected range. Step 405: The modeling server performs statistical analysis according to the data of the batch to obtain statistical analysis results. The record includes any of the following: (1) The record in the log is the record of the user clicking on the specific item. (2) The log record in the log is the record of the user clicking on the item category. (3) The log record in the log is the user's click on the attribute category of the attribute category. Usually log records are statistically analyzed in days. Specifically, the statistical analysis includes the following two steps: (1) One-day processing of the log records of all newly added users in days from the received data. Specifically, the log records of all users in a single day are extracted, and statistics are performed according to different keywords, and finally the formatted data organized by keywords is obtained. The statistic according to different keywords includes: when querying by each keyword, counting the attributes of the item clicked by the keyword and the corresponding item and the item category clicked by the keyword And attribute categories. For example, for the keyword "Nokia", it is counted that the number of clicks of the product category "mobile phone" clicked by the keyword is 1 time, and the number of clicks of the attribute category "network standard" is 300 times. "Network standard", the number of "GSM" clicks is 100 times, the "mobile phone" category is GSM - the mobile phone black -40 - 201207646 The number of Nokia N97 clicks is 50, then the corresponding The number of hits of the attribute class is also 50. Among them, for the click response with causal relationship, the number of clicks of the result event is converted to the number of clicks of the cause event, and the attribute "GSM" corresponding to the black N97 of the clicked item is used for pushing. In the attribute category "GSM", the number of black Nokia clicks is converted into the corresponding product category "mobile phone". The specific discount can be set according to experience or actual demand. For example, the number after conversion is: mobile phone - -1500 times; network standard - 500 times, GSM then multi-day processing, accumulating the number of clicks corresponding to "Nokia" every day, and organized according to the category tree of goods. It should be noted that the above System The method is only a preferred embodiment of the present invention, and any click-based system according to the log record belongs to the protection scope of the present invention. (2) For a week including a new day, such as 40 days, Step 406: The modeling server generates a model according to the statistical analysis result, and sends the generated category model to the category query server to determine a product category corresponding to the query information and corresponding And a weight threshold corresponding to the attribute category corresponding to the commodity category and whether the corresponding weight reaches; when the preset weight threshold is reached, according to the commodity category of the query and its corresponding weight and corresponding to the commodity category The genus and its corresponding weights are organized according to the category of the commodity category tree, and the model is generated. For the purpose, for example, the proportion of the calculation to N97 is clicked - 2 0 0 °. The weight of category 0 is changed to the default correspondence category. 41 - 201207646 Step 407, the category query server updates the generated category model to the category model library. The step continuously updates the category model library by the user's history click record, and the updated category model library is used to return the query result according to the subsequent user's query, and the process is a closed loop process, thereby continuously maintaining the category model. The accuracy of the library is improved, and the accuracy of the returned query result is improved. The embodiment of the present invention provides a query system based on vertical search, as shown in FIG. 11, including a query server 111 0, a log server 11 2 0, and a modeling server. 1 1 3 0, wherein the query server 1110 is configured to obtain query information of the user; and retrieve, in the category model library, a category model that matches the query information according to the query information, where the category model includes a product category corresponding to the keyword, and generating a first query result according to the retrieved category model; and searching for a product category matching the query information in the product library according to the query information, generating a second Querying results; combining the first query result and the second query result to generate a final query result, wherein the category model further includes: The attribute category corresponding to the product category; the query server 1110 is further configured to search, in the product library, the product category that matches the query information according to the query information, and the product category corresponding to the product category. Attribute category. a log server Π20 for generating a click according to the click operation of the final query result generated by the user on the query server 111 0 and the query information, and sending the log to the modeling server Device. • 42- 201207646 The above-mentioned log server 1 1 2 0 is specifically used to obtain the click operation of the user to return the product category returned by the request, the attribute category corresponding to the product category, and the product; Generating a log, the information includes query information and corresponding click information, the click information includes a product category and a product attribute of the clicked product, a clicked product category, and a clicked attribute category; and the generated log is stored . The modeling server 1 1 3 0 is configured to perform statistical analysis on the log to obtain a category model. Specifically, the foregoing modeling server 1 1 3 0 may be specifically configured to perform statistical analysis on the log record according to the query information and the corresponding click information in the log record, and obtain a statistical analysis result, where the statistical analysis is performed. The result is a product category corresponding to the query information and a corresponding weight thereof and an attribute category corresponding to the product category and corresponding weights; the weight is the product category and the attribute category corresponding to the product category a number of clicks and/or a click probability; generating a category model based on the statistical analysis result, and arranging the statistical analysis results according to the commodity category tree. The modeling server 1130 may be further configured to determine whether the product category corresponding to the query information and the corresponding weight and the attribute category corresponding to the product category and the corresponding weight thereof reach a preset weight threshold; When the preset weight threshold is reached, 'the category model is established according to the product category corresponding to the query information and its corresponding weight and the attribute category corresponding to the product category and its corresponding weight. The above modeling server 1130' is further configured to send the category model to the query server 1110; correspondingly the above query server 1110' is further -43-201207646 for transmitting the final query result to the user And causing the user to view; updating the category model from the modeling server 1 1 30 into the category model library. The embodiment of the present invention provides a query server. As shown in FIG. 12, the query server 1200 includes: an obtaining module 1210, configured to obtain query information of a user. The query module 1 220 is configured to retrieve, in the category model library, a category model that matches the query information according to the query information, where the category model includes: a product category corresponding to the keyword, and according to And the category model further includes: The attribute category corresponding to the product category; the query module 1220' is further configured to search, in the product library, the product category matching the query information according to the query information, and the product category corresponding to the product category Attribute category. The merge module 1 2 3 0 ' is used to merge the first query result and the second query result to generate a final query result. The query server 1200 may further include: the sending module 1 240' is configured to send the final query result to the user to enable the user to view, and the log server according to the user a click operation of the final query result and the query information generating a log, and sending the log to the modeling server for statistical analysis to obtain a category model -44 - 201207646 type and updating the category model to the product The category server library of the category server. When the query information only includes the keyword input by the user, as shown in FIG. 13 , the query module 1 2 2 0 specifically includes: determining the sub-module 1 22 1 'for determining the key corresponding to the category model Whether there is a keyword matching the keyword in the query information in the word; the matching sub-module 1 222 ′ is configured to determine, according to the keyword in the query information, the category in the query information Retrieving, querying, and obtaining a matching category model in the model library; otherwise, rewriting the keywords in the query information and making a judgment again until the judgment result is present and obtaining a matching category model; extracting the submodule a group 1 223, configured to obtain a peak category from the obtained category model, and obtain an attribute category of the corresponding direct attribute according to the peak category; generate a submodule 1 224, according to the acquired The category model and its corresponding weights and the attribute categories of the obtained direct attributes and their corresponding weights generate a first query result. Wherein, when the query information includes a keyword input by the user and a product category selected by the user, the determining sub-module 1 22 1 is configured to determine whether the keyword corresponding to the category model exists in the query information. Keyword matching keyword; matching sub-module 1 222, if it is determined that the sub-module judges existence, searching in the category model library according to the keyword input by the user, querying and obtaining a matching category Model; otherwise, the keyword -45-201207646 in the query information is rewritten, and the judgment is made again until the judgment result is existence and the category model matching the keyword is obtained; the extraction sub-module 1 223, And a method for obtaining a category model matching the product category in the query information from the acquired category model; generating a sub-module 1 224, configured to acquire, by the query server, a category that matches the commodity category The product category in the model and its corresponding weights, the first query result is generated. As shown in FIG. 14 , the merging module 1 230 specifically includes: a first merging module 1 23 1 for acquiring a first merging result, and the stomach ~ 倂 倂 result is the first a product category and a corresponding weight thereof in the query result and the second query result, and an attribute_object corresponding to the product category and a corresponding weight thereof, wherein the weight in the first merge result is based on the same product category The weight of the object or attribute category is obtained by weighting the weights of the two query results; the second merged sub-module 1 23 2 is used to obtain the second merge result, and the stomach dichotomy result is only in the second The product category appearing in the query result and its corresponding weight and the attribute category corresponding to the product category and their corresponding weights; the weight lifting sub-module 1 23 3 is used for weighting the first combined result Performing a weight increase, respectively making each weight of the commodity category and the attribute category in the first merge result higher than each weight of the commodity category and the attribute category in the second merge result; generating the sub-module 1 234, In accordance with the weights and products of the product category Category attribute weights corresponding to the sequence corresponding to the heavy mesh arranged in descending -46-201207646, and returned to the user. The present invention has the advantage of improving the user experience of the user query results and the user's query intent by querying the user's request in the category model library and the product library operated by the user's click operation. Through the description of the above embodiments, those skilled in the art clearly understand that the present invention can be implemented by means of a software plus a necessary general hardware method. Of course, it can also be by hardware, but in many cases, a better embodiment. . Based on such understanding, the technically or partially contributing parts of the present technology can be embodied in a software form. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a terminal device (may be A mobile computer, server, or network device, etc., performs the methods described in the various aspects of the present invention. The above description is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can make several improvements and refinements without departing from the present invention. The scope of protection of the invention. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the present invention or the prior art, the following description of the annexes to be used in the description of the present invention or the prior art will be apparent. For the embodiment, for those skilled in the art, in the performance of the producer, the former can be the platform of the product, the personal embodiment, the principle of the Ming and the retouching scheme, the picture is a simplified version. Other inventions may also be obtained from these drawings without paying -47-201207646 creative labor. 1(a) is a schematic structural diagram of a query result returned in the prior art; FIG. 1(b) is a query result returned in the prior art; FIG. 2 is a flowchart of a vertical search-based query method according to the present invention, and FIG. FIG. 4 is a schematic structural diagram of a front-end query server according to the present invention; FIG. 5 is a schematic structural diagram of a category query server according to the present invention; FIG. 7 is a schematic structural diagram of a modeling server in the present invention; FIG. 8 is a flowchart of a vertical search-based query method according to the present invention: FIG. 9 is a class in the present invention. The target query server retrieves a flow chart of the product category and the corresponding attribute category matching the query information; FIG. 10 is a flowchart of a vertical search based query method according to the present invention; FIG. 11 is a vertical based on the present invention. FIG. 12 is a schematic structural diagram of a query server according to the present invention; FIG. 13 is a schematic diagram of a query server in the present invention; FIG. 14 is a schematic structural diagram of a module in a query server according to the present invention - 48 - 201207646 [Description of main component symbols] 1 1 1 0 : Query server 1 120 : Log server 1 1 3 0 : Modeling server 1 2 1 0 : acquisition module 1 2 2 0 : query module 1 23 0 : merge module 1 240 : transmission module 1221 : judgment sub-module 1 222 : matching sub-module 1 223: extraction sub-module 1 224: generating sub-module 1231: first combining sub-module 1 2 3 2: second combining sub-module 1 2 3 3: weight lifting sub-module 1 2 34: generating Submodule-49