TW201140344A - Searching method and device - Google Patents

Searching method and device Download PDF

Info

Publication number
TW201140344A
TW201140344A TW99115483A TW99115483A TW201140344A TW 201140344 A TW201140344 A TW 201140344A TW 99115483 A TW99115483 A TW 99115483A TW 99115483 A TW99115483 A TW 99115483A TW 201140344 A TW201140344 A TW 201140344A
Authority
TW
Taiwan
Prior art keywords
execution
module
search
execution module
result
Prior art date
Application number
TW99115483A
Other languages
Chinese (zh)
Other versions
TWI507897B (en
Inventor
xu-ping Nie
He Xiao
Wei He
Jing-Hui Zhong
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to TW099115483A priority Critical patent/TWI507897B/en
Publication of TW201140344A publication Critical patent/TW201140344A/en
Application granted granted Critical
Publication of TWI507897B publication Critical patent/TWI507897B/en

Links

Landscapes

  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

This invention discloses a kind of searching method and device, the method includes the following steps; acquire the searching parameters inputted by the clients; making sure the processing execution sequence for the searching parameters according to the preset or client-selected searching tag; retrieving the execution modules corresponding to the execution sequence in turn according to the execution sequence to obtain the output result of searching parameters by the execution module; generating searching plan according to the precision levels of the output result of the execution module, the searching plan includes the execution module that processes the searching parameter; using the execution module affirmed by the searching plan to process the searching parameters to obtain the execution result of the affirmed execution module and performing searching according to the execution results and obtaining the search results. Through this invention, the intention of the client can be acquired more quickly and precisely, which then can be transformed into the machine language and execution strategy that searching engine can understand for facilitating the management of the execution module.

Description

201140344 六、發明說明: 【發明所屬之技術領域】 本案關於網路技術領域,特別是關於一種搜尋方法和201140344 VI. Description of the invention: [Technical field to which the invention belongs] This case relates to the field of network technology, in particular to a search method and

M-f- PM 裝置》 【先前技術】 隨著電腦技術和網路技術的高速發展,以及近年來國 內網際網路環境的改善,網際網路逐漸成爲一種獲取資訊 的重要管道,而網上資訊也得到了***性的增長。搜尋技 術的出現爲網路用戶快速找到所需資訊提供了便捷的手段 ’傳統的搜尋方法主要使用三種類型的搜尋引擎,即機器 人搜尋引擎(Robot )、目錄式搜尋引擎(Directory 0Γ Catalog)和元搜尋引擎(Meta)。傳統的搜尋方法主要採 用關鍵字匹配來實現對資訊的檢索,由於用戶很難簡單地 用關鍵字或關鍵字串來忠實地表達真正需要檢索的內容, 表達困難導致檢索困難,而且自然語言隨著時間、地域或 領域的改變’同一槪念可以用不同的語言表現形式來表達 ’對同一槪念的檢索,不同的用戶可能使用不同的關鍵字 査詢’結果導致大量的無關資訊返回用戶。 爲解決上述問題,業內出現了以智慧搜尋方法爲基礎 的智慧搜尋引擎,採取以知識庫爲基礎的語義分析技術, 利用分詞技術、短語識別、處理同義詞等手段,根據特徵 對用戶輸入的搜尋參數進行分析,產生不同的搜尋方案, 即搜尋計畫。其中,用戶輸入的搜尋參數可以是具有一定 -5- 201140344 特徵的辭彙,可以是音譯詞或同音詞。如果用戶輸錯了搜 尋參數’例如’用戶錯誤地將“諾基亞”輸入成“諾記亞 ” ’系統平臺可以對錯詞進行分析,自動推薦出用“諾基 亞”進行搜尋的方案’該搜尋方案即爲對應用戶輸入的搜 尋參數的一個搜尋計畫。另外,當用戶過於口語化的描述 “我要採購手機”時,實際上搜尋的是“手機”,因此, 搜尋引擎可以僅保留“手機”作爲搜尋計畫。上述兩種產 生搜尋計畫的方案,可以在搜尋引擎中分別透過拼寫糾錯 模組和重寫模組實現。其中,拼寫糾錯模組可以將錯誤的 輸入詞改變成正確的輸入詞;重寫模組可以進行輸入詞分 詞,找出中心詞等,改寫成適合搜尋應用的詞。 現有技術中,通常採用動態載入模組的方式產生搜尋 計畫。具體地,在現有的開源服務平臺,例如Apache伺 服器,可以透過寫C代碼實現動態擴展模組。其中, Apache 伺服器是一個回應 HTTP (Hyper Text Transfer Protocol,超文本傳輸協定)請求的web伺服器,用於回 應最基本的web服務。在Apache伺服器上動態載入模組 時,首先需要充分瞭解Apache伺服器的運行機制,或是 編寫PHP( Hypertext Preprocessor,超級文本預處理語言 )模組,利用PHP模組對Apache介面進行再次封裝,將 PHP模組編譯後動態裝載到Apache伺服器中提供服務。 上述動態載入模組採用普通的貴任鏈模式的設計,一旦模 組的任務完成,則立即退出應用。 在實現本案的過程中,發明人發現現有技術至少存在 -6- 201140344 如下問題= 由於Apache伺服器本身的設計過於複雜,實現 Apache動態模組會直接導致實現模組成本很高,增加了維 護的難度。另外’模組之間無法協調工作,也不能對模組 的編寫進行統一控制。當出現衝突的Apache模組時,如 果直接提高對模組的編寫要求,則在新增模組時需要修改 以前的模組’當模組數量較多時,成本會很大,會降低模 組的擴展性;如果透過使用Ρ Η P模組擴展,又會增加依賴 性和維護的難度。 【發明內容】 本案提供了 一種搜尋方法和裝置,能夠更快地獲取搜 尋詞,方便了對執行模組的管理。 本案提出一種搜尋方法,包括以下步驟: 獲取用戶端輸入的搜尋參數,根據預先配置的或者該 用戶端選擇的搜尋標籤確定處理該搜尋參數的執行序列; 按照該執行序列依次調用該執行序列對應的執行模組 ’獲取該執行模組對該搜尋參數的輸出結果,根據該執行 模組的輸出結果的精確度等級產生搜尋計畫,該搜尋計畫 包括處理該搜尋參數的執行模組; 使用該搜尋計畫確定的執行模組處理該搜尋參數,獲 取該確定的執行模組的執行結果,並按照該執行結果進行 搜尋,獲取搜尋結果。 較佳地,該根據該執行模組的輸出結果的精確度等級 201140344 產生搜尋計畫,具體包括: 判斷該執行模組的輸出結果的精確度等級是否滿足第 一精確度要求,如果滿足,則確定由該執行模組處理該搜 尋參數。 較佳地,該判斷執行模組的輸出結果的精確度等級滿 足精確度要求之後,還包括: 判斷該滿足第一精確度要求的執行模組之間是否互相 衝突,如果互相衝突,則由該互相衝突的執行模組中輸出 結果的精確度等級最高的執行模組處理該搜尋參數。 較佳地,該判斷滿足精確度要求的執行模組之間是否 互相衝突,具體包括: 判斷該滿足第一精確度要求的執行模組中是否存在至 少兩個包含在預定義的衝突序列中的執行模組; 如果存在,則判斷該滿足第一精確度要求的執行模組 之間互相衝突;如果不存在,則判斷該滿足第一精確度要 求的執行模組之間不互相衝突。 較佳地,該執行模組的輸出結果還包括該執行模組的 執行結果, 當該執行模組的輸出結果滿足第二精確度要求且該搜 尋參數滿足預設的複雜度要求時,按照該執行模組的執行 結果進行搜尋,獲取搜尋結果。 較佳地,該執行模組的輸出結果包括該執行模組的執 行結果時, 該獲取執行模組對該搜尋參數的輸出結果之後,還包 -8- 201140344 括: 將該執行模組的輸出結果中的執行結果通知該執行序 列中的後續執行模組,使該後續執行模組根據該執行模組 的執行結果產生輸出結果。 較佳地,該的方法,還包括: 爲該執行序列中的各個執行模組設置統一的介面,透 過該介面爲該各個執行模組的輸出結果設置統一的精確度 等級。 本案還提出一種搜尋裝置,包括: 獲取模組,用於獲取用戶端輸入的搜尋參數,根據預 先配置的或者該用戶端選擇的搜尋標籤確定處理該搜尋參 數的執行序列; 調用模組,用於按照該獲取模組確定的執行序列依次 調用該執行序列對應的執行模組,獲取該執行模組對該搜 尋參數的輸出結果,根據該執行模組的輸出結果的精確度 等級產生搜尋計畫,該搜尋計畫包括處理該搜尋參數的執 行模組; 搜尋模組,用於使用該調用模組產生的搜尋計畫確定 的執行模組處理該搜尋參數,獲取該確定的執行模組的執 行結果,並按照該執行結果進行搜尋,獲取搜尋結果。 較佳地,該調用模組,具體用於判斷該執行模組的輸 出結果的精確度等級是否滿足第一精確度要求,如果滿足 ,則確定由該執行模組處理該搜尋參數。 較佳地,該調用模組,還用於判斷該滿足第一精確度 -9 - 201140344 要求的執行模組之間是否互相衝突,如果互相衝突,則由 該互相衝突的執行模組中輸出結果的精確度等級最高的執 行模組處理該搜尋參數。 較佳地,該調用模組,具體用於判斷該滿足第一精確 度要求的執行模組中是否存在至少兩個包含在預定義的衝 突序列中的執行模組;如果存在,則判斷該滿足第一精確 度要求的執行模組之間互相衝突;如果不存在,則判斷該 滿足第一精確度要求的執行模組之間不互相衝突。 較佳地,該執行模組的輸出結果還包括該執行模組的 執行結果, 該搜尋模組,還用於在該執行模組的輸出結果滿足第 二精確度要求且該搜尋參數滿足預設的複雜度要求時,按 照該執行模組的執行結果進行搜尋,獲取搜尋結果。 較佳地,該執行模組的輸出結果包括該執行模組的執 行結果時, 該調用模組,還用於將該執行模組的輸出結果中的執 行結果通知該執行序列中的後續執行模組,使該後續執行 模組根據該執行模組的執行結果產生輸出結果。 較佳地,該的裝置,還包括: 設置模組,用於爲該執行序列中的各個執行模組設置 統一的介面,透過該介面爲該各個執行模組的輸出結果設 置統一的精確度等級,供該調用模組使用。 本案包括以下優點,根據執行模組的執行結果的精確 度對可能衝突的執行模組進行協調,方便了對執行模組的 -10- 201140344 管理,在不改變原有的執行模組的前提下,能夠輸出更優 的搜尋詞。另外,對執行模組的調用採用獨立的服務,不 影響搜尋引擎核心查詢服務的穩定性,且執行模組可以進 行分佈部署,不與搜尋引擎服務綁定,也不與搜尋引擎競 爭伺服器資源,對伺服器產生的壓力小,處理速度快。當 然,實施本案的任一產品並不一定需要同時達到以上所述 的所有優點。 【實施方式】 本案的主要思想包括,使用獨立的平臺統一控制搜尋 詞的產生,按照統一的介面管理同一執行序列中的多個執 行模組,根據各個執行模組的輸出結果的精確度等級確定 處理搜尋參數的執行模組,並根據該確定的執行模組的執 行結果,使用搜尋引擎進行搜尋,並獲取搜尋結果。例如 ,當系統同時選擇拼寫糾錯模組和重寫模組處理搜尋參數 時,當拼寫糾錯模組和重寫模組的輸出結果均滿足執行序 列對應的精確度要求時,則搜尋計畫中包括拼寫糾錯模組 和重寫模組,可以獲取拼寫糾錯模組和重寫模組的執行結 果以及搜尋引擎對該執行結果的搜尋結果;如果拼寫糾錯 模組和重寫模組互相衝突,則根據拼寫糾錯模組和重寫模 組的輸出結果的精確度等級確定保留在搜尋計畫中的執行 模組。 其中,執行模組的輸出結果可以是對是否需要使用該 執行模組處理搜尋參數的判斷結果,包括“是”和“否” -11 - 201140344 :也可以是該執行模組對搜尋參數的處理結果,即執行模 組的執行結果。系統可以設定對執行模組的輸出結果的精 確度要求’當執行模組的輸出結果滿足預設的精確度要求 時,則執行該執行模組,獲取該執行模組的執行結果。 另外,爲便於比較不同執行模組的輸出結果的精確度 ,系統可以爲各個執行模組的輸出結果設置統一的精確度 等級。將執行模組的輸出結果以及該輸出結果對應的搜尋 參數作爲精確度演算法的計算因數,進行精確度計算,可 以獲取執行模組的輸出結果的精確度等級。其中,精確度 等級用於表徵執行模組處理搜尋參數的適合程度。 此外,系統還可以爲執行序列設置精確度要求,透過 比較該精確度要求與執行模組的輸出結果的精確度等級之 間的關係’判斷執行序列對應的各個執行模組的輸出結果 是否滿足要求。如果執行模組的輸出結果的精確度等級大 於執行序列對應的精確度要求,則判斷該執行模組的輸出 結果滿足執行序列對應的精確度要求;否則,則判斷該執 行模組的輸出結果不滿足執行序列對應的精確度要求。 下面將結合本案中的附圖,對本案中的技術方案進行 清楚 '完整的描述,顯然,所描述的實施例是本案的一部 分實施例’而不是全部的實施例。基於本案中的實施例, 本領域普通技術人員在沒有作出創造性勞動的前提下所獲 得的所有其他實施例,都屬於本案保護的範圍。 如圖1所示,爲本案實施例一中的一種搜尋方法流程 圖,包括以下步驟: -12- 201140344 步驟101’獲取用戶端輸入的搜尋參數,根據預先配 置的或者該用戶端選擇的搜尋標籤確定處理搜尋參數的執 行序列。 其中,搜尋標籤爲用戶端輸入的搜尋參數對應的搜尋 結果的類別’可以包括“產品”、“資訊”、“技術”和 “全部”等類別。用戶端可以根據用戶需求選擇搜尋標籤 ’當用戶端沒有選擇搜尋標籤時,系統可以使用預先配置 的搜尋標籤,即“全部”的搜尋標籤。 不同的搜尋標籤對應不同的執行序列,執行序列爲系 統預先設定的包含一個或多個執行模組的封裝包,執行序 列中的執行模組可以是自定義的模組。系統可以定義包含 部分執行模組的執行序列,透過該執行序列對執行模組進 行選擇執行;也可以將執行序列默認配置爲全部的執行模 組。系統設定的各個執行序列可以對用戶端輸入的搜尋參 數進行不同的處理,對應不同的處理功能和對輸出結果的 精確度要求。用戶端可以根據用戶的需求,選擇對應所需 處理功能對應的搜尋標籤,並輸入待處理的搜尋參數,系 統以及該搜尋標籤確定處理該搜尋參數的執行序列。 步驟1 02,按照執行序列依次調用執行序列對應的執 行模組,獲取該執行模組對該搜尋參數的輸出結果,根據 執行模組的輸出結果的精確度等級產生搜尋計畫。 其中,搜尋計畫可以包括處理搜尋參數的執行模組, 還可以執行模組對搜尋參數的處理策略。 具體地,可以爲該執行序列中的各個執行模組設置統 -13- 201140344 一的介面’透過該介面爲該各個執行模組的輸出結果設置 統一的精確度等級。系統可以判斷該執行模組的輸出結果 的精確度等級是否滿足第一精確度要求,如果滿足,則確 定由該執行模組處理該搜尋參數,即該執行模組包括在搜 尋計畫中。 當判斷執行模組的輸出結果的精確度等級滿足精確度 要求之後’還可以判斷該滿足第一精確度要求的執行模組 之間是否互相衝突’如果互相衝突,則由該互相衝突的執 行模組中輸出結果的精確度等級最高的執行模組處理該搜 尋參數,即在搜尋計畫中僅保留該互相衝突的執行模組中 輸出結果的精確度等級最高的執行模組。 上述判斷滿足精確度要求的執行模組之間是否互相衝 突,具體包括:判斷該滿足第一精確度要求的執行模組中 是否存在至少兩個包含在預定義的衝突序列中的執行模組 ;如果存在,則判斷該滿足第一精確度要求的執行模組之 間互相衝突;如果不存在,則判斷該滿足第--精確度要求 的執行模組之間不互相衝突。 該執行模組的輸出結果還可以包括該執行模組的執行 結果’當該執行模組的輸出結果滿足第二精確度要求且該 搜尋參數滿足預設的複雜度要求時,按照該執行模組的執 行結果進行搜尋,獲取搜尋結果。上述第二精確度要求高 於第一精確度要求。 其中,執行模組對搜尋參數的執行結果可以爲該執行 模組修正後的搜尋參數。例如,當執行模組爲拼寫糾錯模 -14 - 201140344 組、搜尋參數爲“諾記亞”時’拼寫糾錯模組的執行結果 爲修正後的搜尋參數’即“諾基亞”:當執行模組爲重寫 模組、搜尋參數爲"我要採購手機”時,重寫模組的執行 結果爲修正後的搜尋參數,即“手機”。當執行模組的輸 出結果包括該執行模組的執行結果時,上述獲取執行模組 對該搜尋參數的輸出結果之後,還可以將該執行模組的輸 出結果中的執行結果通知該執行序列中的後續執行模組, 使該後續執行模組根據該執行模組的執行結果產生輸出結 果。 步驟103’使用搜尋計畫確定的執行模組處理搜尋參 數’獲取該確定的執行模組的執行結果,並按照該執行結 果進行搜尋,獲取搜尋結果。 具體地’可以使用搜尋計畫中的各個執行模組分別處 理搜尋參數’獲取各個執行模組的執行結果,並判斷執行 結果的個數是否大於指定輸出個數;如果該執行結果的個 數大於該指定輸出個數’則將該保留的執行結果中精確度 等級最高的執行結果作爲搜尋詞發送到搜尋引擎,透過搜 尋引擎獲取搜尋結果。 此外,在將執行模組的執行結果發送到搜尋引擎進行 搜尋的同時’系統還可以將執行模組的執行結果返回給用 戶端’供用戶端使用。系統也可以將執行模組的執行結果 僅返回給用戶端,而不再發送給搜尋引擎,以減輕搜尋引 擎的壓力。例如,執行模組爲違禁詞的過濾模組時,可以 將執行結果直接返回給用戶端,而不再根據執行結果進行 -15- 201140344 搜尋。 本案包括以下優點,根據執行模組的執行結果的精確 度對可能衝突的執行模組進行協調,能夠更加快速準確地 獲取搜尋參數背後的用戶意圖並將用戶意圖轉換爲搜尋引 擎能夠理解的機器語言和執行策略,方便了對執行模組的 管理’在不改變原有的執行模組的前提下,能夠輸出更優 的搜尋詞。另外,對執行模組的調用採用獨立的服務,不 影響搜尋引擎核心查詢服務的穩定性,且執行模組可以進 行分佈部署’不與搜尋引擎服務綁定,也不與搜尋引擎競 爭伺服器資源,對伺服器產生的壓力小,處理速度快。當 然’實施本案的任一產品並不一定需要同時達到以上所述 的所有優點。 本案中的搜尋方法,可應用於如圖2所示的系統架構 中’該系統包括用戶端、參數處理伺服器和搜尋引擎伺服 器1其中,用戶端用於向參數處理伺服器發送搜尋請求, 輸入搜尋參數並選擇參數處理伺服器預先設定的搜尋標籤 ;參數處理伺服器根據用戶端選擇的執行序列調用該執行 序列對應的執行模組,獲取執行模組對搜尋參數的輸出結 果,當執行模組的輸出結果滿足執行序列對應的精確度要 求時,將該執行模組的執行結果發送到搜尋引擎伺服器和 用戶端:搜尋引擎伺服器將來自參數處理伺服器的執行結 果作爲搜尋詞,對搜尋詞進行搜尋,獲取搜尋結果。 具體地,參數處理伺服器包括糾錯模組、重寫模組, 以及其他執行模組,上述各執行模組可以分別對搜尋參數 -16- 201140344 進行處理,分別獲取輸出結果,當該輸出結果滿足執行序 列對應的精確度要求時,可以執行模組的執行結果作爲搜 尋詞返回給用戶端,並發送到搜尋引擎伺服器。搜尋引擎 伺服器包括解析模組、查詢模組和合倂模組,其中,解析 模組用於對來自參數處理伺服器的執行結果進行解析,獲 取搜尋詞;查詢模組用於根據搜尋詞查詢網站資料庫,如 網路爬蟲結構,獲取查詢結果;合倂模組用於對查詢模組 的查詢結果進行合倂處理,獲取搜尋結果。 需要說明的是,在本案的具體實施方式中,上述系統 架構中的參數處理伺服器和搜尋引擎伺服器可以分別獨立 部署’也可以將參數處理伺服器和搜尋引擎伺服器合併爲 系統中的同一個裝置。上述參數處理伺服器和搜尋引擎伺 服器的部署方式,不影響本案的保護範圍。 以下結合上述應用場景,對本案中的搜尋方法進行詳 細、具體的描述。 如圖3所示,爲本案實施例二中的一種搜尋方法流程 圖,包括以下步驟: 步驟301,參數處理伺服器獲取用戶端輸入的搜尋參 數’根據預先配置的或者用戶端選擇的搜尋標籤確定處理 搜尋參數的執行序列。 步驟3 02,參數處理伺服器按照執行序列依次調用該 執行序列對應的執行模組,獲取執行模組對搜尋參數的輸 出結果。 步驟3 03,參數處理伺服器判斷執行模組的輸出結果 -17- 201140344 的精確度等級是否滿足第一精確度要求。 如果判斷結果爲是,則執行步驟3 04 ;否則,結束流 程。 步驟304,參數處理伺服器判斷滿足第一精確度要求 的執行模組之間是否互相衝突。 如果滿足第一精確度要求的執行模組之間互相衝突, 則執行模組3 05 ;否則,執行步驟3 06。 步驟3 05,參數處理伺服器確定由互相衝突的執行模 組中輸出結果的精確度等級最高的執行模組處理搜尋參數 ,在搜尋計畫中保留該執行模組,獲取執行模組的執行結 果。 步驟3 06,參數處理伺服器使用搜尋計畫確定的執行 模組處理搜尋參數’獲取該確定的執行模組的執行結果》 步驟3 07,參數處理伺服器判斷執行模組的執行結果 的個數是否大於指定輸出個數。 如果執行結果的個數大於指定輸出個數’則執行步驟 308;否則,執行步驟309。 步驟308,參數處理伺服器將執行模組的執行結果中 精確度等級最高@ #行'結果作爲搜尋詞胃@ '袷丨叟胃弓丨_伺 服器,並將執行結果返回用戶端。 需要說明的是’執行完本步驟後’可以繼續執行步驟 3 10° 步驟3 09,參數處理伺服器將所有執行結果作爲搜尋 詞發送給搜尋引擎伺服器’並將執彳了結果返回用戶觸° -18- 201140344 具體地,可以爲執行序列中的各個執行模組設置統一 的介面,透過該介面爲各個執行模組的執行結果設置統一 的精確度等級。當保留的執行結果的個數大於指定輸出個 數時,則將各個執行結果按照精確度等級進行排序,選取 指定個數的精確度等級高的執行結果作爲搜尋計畫。 在具體的實現過程中,由於系統中的執行模組的輸出 存在多個可能性,即對輸入的關鍵字等條件有精確的匹配 度。如果輸入的關鍵字與模組中的詞嚴格匹配,則該模組 的輸出精准度就高。由於各個模組的詞典索引是獨立的, 不同模組的輸出精准度之間沒有相關性。由於各模組相互 獨立,在新增新的模組的時候不用改變以前的模組,可以 對模組輸出設置一個統一的介面,用於模組對輸出的準確 度進行設置。各模組對精確度演算法不一樣,結果不具有 可比性,在介面中將輸出結果統一到幾個精確度等級,作 爲輸出時統一選擇的參考依據。 步驟3 1 0 ’搜尋引擎伺服器對搜尋詞進行搜尋,獲取 搜尋結果。 需要說明的是,本案也可以透過各個模組獨立搭建服 務來實現’由用戶端分別調用各自的服務可以將服務整合 在一起。本案提出的技術方案可以使用C + +實現,在 Linux系統上運行能達到最佳的實施效果。 本案包括以下優點,根據執行模組的執行結果的精確 度對可能衝突的執行模組進行協調,能夠更加快速準確地 獲取搜尋參數背後的用戶意圖並將用戶意圖轉換爲搜尋引 -19- 201140344 擎能夠理解的機器語言和執行策略,方便了對執行模組的 管理’在不改變原有的執行模組的前提下,能夠輸出更優 的搜尋詞。另外’對執行模組的調用採用獨立的服務,不 影響搜尋引擎核心查詢服務的穩定性,且執行模組可以進 行分佈部署’不與搜尋引擎服務綁定,也不與搜尋引擎競 爭伺服器資源,對伺服器產生的壓力小,處理速度快。當 然,實施本案的任一產品並不一定需要同時達到以上所述 的所有優點。 本案上述實施例提供了搜尋方法和應用場景,相應地 ,本案還透過以下實施例提供了應用上述方法的裝置。 如圖4所示,爲本案實施例三中的一種產生搜尋計畫 的裝置結構示意圖,包括: 獲取模組4 1 0,用於獲取用戶端輸入的搜尋參數,根 據預先配置的或者該用戶端選擇的搜尋標籤確定處理該搜 尋參數的執行序列。 調用模組420,用於按照該獲取模組4 1 0確定的執行 序列依次調用該執行序列對應的執行模組,獲取該執行模 組對該搜尋參數的輸出結果,根據該執行模組的輸出結果 的精確度等級產生搜尋計畫,該搜尋計畫包括處理該搜尋 參數的執行模組。 搜尋模組430,用於使用該調用模組420產生的搜尋 計畫確定的執行模組處理該搜尋參數,獲取該確定的執行 模組的執行結果,並按照該執行結果進行搜尋,獲取搜尋 結果。 -20- 201140344 本案包括以下優點,根據執行模組的執行結果的精確 度對可能衝突的執行模組進行協調,能夠更加快速準確地 獲取搜尋參數背後的用戶意圖並將用戶意圖轉換爲搜尋引 擎能夠理解的機器語言和執行策略,方便了對執行模組的 管理’在不改變原有的執行模組的前提下,能夠輸出更優 的搜尋詞。當然’實施本案的任一產品並不一定需要同時 達到以上所述的所有優點。 如圖5所示’爲本案實施例四中的一種產生搜尋計畫 的裝置結構不意圖,包括: 獲取模組5 1 0 ’用於獲取用戶端輸入的搜尋參數,根 據預先配置的或者該用戶端選擇的搜尋標籤確定處理該搜 尋參數的執行序列。 調用模組520 ’用於按照該獲取模組5〗〇確定的執行 序列依次調用該執行序列對應的執行模組,獲取該執行模 組對該搜尋參數的輸出結果,根據該執行模組的輸出結果 的精確度等級產生搜尋計畫,該搜尋計畫包括處理該搜尋 參數的執行模組。 上述調用模組5 2 0 ’具體用於判斷該執行模組的輸出 結果的精確度等級是否滿足第一精確度要求,如果滿足, 則確定由該執行模組處理該搜尋參數。 上述調用模組520,還用於判斷該滿足第一精確度要 求的執行模組之間是否互相衝突,如果互相衝突,則由該 互相衝突的執行模組中輸出結果的精確度等級最高的執行 模組處理該搜尋參數。 -21 - 201140344 上述調用模組520’具體用於判斷該滿足第一精確度 要求的執行模組中是否存在至少兩個包含在預定義的衝突 序列中的執行模組:如果存在,則判斷該滿足第一精確度 要求的執行模組之間互相衝突;如果不存在’則判斷該滿 足第一精確度要求的執行模組之間不互相衝突。 當上述執行模組的輸出結果包括該執行模組的執行結 果時,上述調用模組520,還用於將該執行模組的輸出結 果中的執行結果通知該執行序列中的後續執行模組,使該 後續執行模組根據該執行模組的執行結果產生輸出結果。 搜尋模組5 30,用於使用該調用模組520產生的搜尋 計畫確定的執行模組處理該搜尋參數,獲取該確定的執行 模組的執行結果,並按照該執行結果進行搜尋,獲取搜尋 結果。 上述執行模組的輸出結果還包括該執行模組的執行結 果’上述搜尋模組5 3 0,還用於在該執行模組的輸出結果 滿足第二精確度要求且該搜尋參數滿足預設的複雜度要求 時’按,照該執行模組的執行結果進行搜尋,獲取搜尋結果 〇 IS S模組540,用於爲該執行序列中的各個執行模組 $ ® Μ -的介面,透過該介面爲該各個執行模組的輸出結 果設置統—的精確度等級,供該調用模組520使用。 # $包· ί舌以下優點,根據執行模組的執行結果的精確 # # β »突的執行模組進行協調,能夠更加快速準確地 @ Μ ί! ##數背後的用戶意圖並將用戶意圖轉換爲搜尋引 -22- 201140344 擎能夠理解的機器語言和執行策略,方便了對執行模組的 管理,在不改變原有的執行模組的前提下,能夠輸出更優 的搜尋詞。當然’實施本案的任一產品並不一定需要同時 達到以上所述的所有優點。 透過以上的實施方式的描述,本領域的技術人員可以 清楚地瞭解到本案可借助軟體加必需的通用硬體平臺的方 式來實現’當然也可以透過硬體,但很多情況下前者是更 佳的實施方式。基於這樣的理解,本案的技術方案本質上. 或者說對現有技術做出貢獻的部分可以以軟體產品的形式 體現出來’該電腦軟體產品儲存在一個儲存媒體中,包括 若千指令用以使得一台終端設備(可以是手機,個人電腦 ’伺服器,或者網路設備等)執行本案各個實施例該的方 法。 以上所述僅是本案的較佳實施方式,應當指出,對於 本技術領域的普通技術人員來說,在不脫離本案原理的前 提下,還可以做出若干改進和潤飾,這些改進和潤飾也應 視爲本案的保護範圍。 本領域技術人員可以理解實施例中的裝置中的模組可 以按照實施例描述進行分佈於實施例的裝置中,也可以進 行相應變化位於不同於本實施例的一個或多個裝置中。上 述實施例的模組可以集成於一體,也可以分離部署;可以 合倂爲一個模組,也可以進一步拆分成多個子模組。上述 本案實施例序號僅僅爲了描述,不代表實施例的優劣。 以上揭示的僅爲本案的幾個具體實施例,但是,本案 -23- 201140344 並非侷限於此,任何本領域的技術人員能思之的變化都應 落入本案的保護範圍。 【圖式簡單說明】 爲了更清楚地說明本案或現有技術中的技術方案’下 面將對本案或現有技術描述中所需要使用的附圖作簡單的 介紹,顯而易見地,下面描述中的附圖僅僅是本案的一些 實施例,對於本領域普通技術人員來講,在不付出創造性 勞動的前提下’還可以根據這些附圖獲得其他的附圖。 圖1爲本案實施例一中的一種搜尋方法流程圖; 圖2爲本案實施例二中的一種搜尋系統架構示意圖; 圖3爲本案實施例二中的一種搜尋方法流程圖; 圖4爲本案實施例三中的一種搜尋裝置結構示意圖; 圖5爲本案實施例四中的一種搜尋裝置結構示意圖。 【主要元件符號說明】 4 1 0 :獲取模組 420 :調用模組 43 0 :搜尋模組 5 1 0 :獲取模組 5 20 :調用模組 5 3 0 :搜尋模組 540 :設置模組 -24-Mf-PM device [Prior technology] With the rapid development of computer technology and network technology, and the improvement of the domestic Internet environment in recent years, the Internet has gradually become an important channel for obtaining information, and online information has also been obtained. An explosive growth. The emergence of search technology provides a convenient means for Internet users to quickly find the information they need. Traditional search methods use three types of search engines, namely, the robot search engine (Robot), the directory search engine (Directory 0Γ Catalog), and Meta Search Engine (Meta). The traditional search method mainly uses keyword matching to realize the retrieval of information. Since it is difficult for users to simply use keywords or keyword strings to faithfully express the content that really needs to be retrieved, the difficulty of expression leads to difficulty in retrieval, and the natural language follows Changes in time, geography or domain 'The same mourning can be expressed in different language expressions 'retrieving the same mourning, different users may use different keyword queries' resulting in a large amount of irrelevant information being returned to the user. In order to solve the above problems, a smart search engine based on the smart search method has appeared in the industry. The semantic analysis technology based on the knowledge base is adopted, and the user input is searched according to the features by means of word segmentation technology, phrase recognition, and processing of synonyms. The parameters are analyzed to produce different search scenarios, ie search plans. The search parameter input by the user may be a vocabulary with a certain -5-201140344 feature, and may be a transliteration word or a homophone. If the user enters the wrong search parameter 'for example', the user incorrectly enters "Nokia" into "Nuo Ke Ya". The system platform can analyze the wrong words and automatically recommend the "Search for Nokia" program. A search plan for the search parameters entered by the user. In addition, when the user is too colloquial to describe "I want to purchase a mobile phone", the user actually searches for "mobile phone", so the search engine can only keep the "mobile phone" as a search plan. The above two schemes for generating a search plan can be implemented in the search engine through a spelling correction module and a rewrite module, respectively. Among them, the spelling correction module can change the wrong input word into the correct input word; the rewriting module can input the word segmentation, find the center word, etc., and rewrite it into a word suitable for searching for the application. In the prior art, a crawling module is usually generated by using a dynamic loading module. Specifically, in existing open source service platforms, such as the Apache server, dynamic expansion modules can be implemented by writing C code. Among them, the Apache server is a web server that responds to HTTP (Hyper Text Transfer Protocol) requests to respond to the most basic web services. When dynamically loading a module on an Apache server, you first need to fully understand the operating mechanism of the Apache server, or write a PHP (Hypertext Preprocessor) module to repackage the Apache interface with a PHP module. The PHP module is compiled and dynamically loaded into the Apache server to provide services. The above dynamic loading module adopts the design of the ordinary noble chain mode, and once the task of the module is completed, the application is immediately exited. In the process of implementing this case, the inventor found that the existing technology has at least -6-201140344. The following problem = Because the design of the Apache server itself is too complicated, implementing the Apache dynamic module will directly lead to high module cost and increased maintenance. Difficulty. In addition, there is no coordination between the modules, and it is impossible to control the programming of the modules. When there is a conflicting Apache module, if you directly improve the programming requirements of the module, you need to modify the previous module when adding a new module. 'When the number of modules is large, the cost will be large, and the module will be lowered. Scalability; if you use the Ρ 模组 P module to expand, it will increase the difficulty of dependency and maintenance. SUMMARY OF THE INVENTION The present invention provides a search method and apparatus that can acquire search terms more quickly and facilitate management of execution modules. The present invention provides a search method, including the following steps: acquiring a search parameter input by a user terminal, determining an execution sequence for processing the search parameter according to a pre-configured or search tag selected by the user terminal; and sequentially calling the execution sequence corresponding to the execution sequence according to the execution sequence The execution module 'acquires the output result of the execution module for the search parameter, and generates a search plan according to the accuracy level of the output result of the execution module, the search plan includes an execution module for processing the search parameter; The execution module determined by the search plan processes the search parameter, obtains the execution result of the determined execution module, and performs a search according to the execution result to obtain the search result. Preferably, the generating the search plan according to the accuracy level 201140344 of the output result of the execution module comprises: determining whether the accuracy level of the output result of the execution module satisfies the first accuracy requirement, and if so, It is determined that the search parameter is processed by the execution module. Preferably, after determining that the accuracy level of the output result of the execution module meets the accuracy requirement, the method further includes: determining whether the execution modules satisfying the first accuracy requirement conflict with each other, and if they conflict with each other, The execution module having the highest accuracy level of the output result in the conflicting execution module processes the search parameter. Preferably, the determining whether the execution modules satisfying the accuracy requirement conflict with each other comprises: determining whether at least two execution modules in the execution module that meet the first accuracy requirement are included in the predefined conflict sequence. Executing the module; if yes, determining that the execution modules satisfying the first accuracy requirement conflict with each other; if not, determining that the execution modules satisfying the first accuracy requirement do not conflict with each other. Preferably, the output result of the execution module further includes an execution result of the execution module. When the output result of the execution module satisfies the second accuracy requirement and the search parameter meets the preset complexity requirement, according to the Execute the execution result of the module to search and obtain the search result. Preferably, when the output result of the execution module includes the execution result of the execution module, after the output of the search execution module is outputted by the execution module, the package is further included in the package: -8- 201140344: output of the execution module The execution result in the result is notified to the subsequent execution module in the execution sequence, so that the subsequent execution module generates an output result according to the execution result of the execution module. Preferably, the method further includes: setting a unified interface for each execution module in the execution sequence, and setting a uniform accuracy level for the output of the execution modules through the interface. The present invention also provides a search device, comprising: an acquisition module, configured to acquire a search parameter input by a user terminal, and determine an execution sequence for processing the search parameter according to a pre-configured or search tag selected by the user terminal; The execution module corresponding to the execution sequence is sequentially invoked according to the execution sequence determined by the acquisition module, and the output result of the execution module is obtained, and the search plan is generated according to the accuracy level of the output result of the execution module. The search program includes an execution module for processing the search parameter, and a search module for processing the search parameter by using an execution module determined by the search plan generated by the call module to obtain an execution result of the determined execution module. And search according to the execution result to obtain search results. Preferably, the calling module is specifically configured to determine whether the accuracy level of the output result of the execution module satisfies the first accuracy requirement, and if so, determine that the search parameter is processed by the execution module. Preferably, the calling module is further configured to determine whether the execution modules satisfying the requirement of the first accuracy -9 - 201140344 conflict with each other, and if they conflict with each other, output the result by the conflicting execution module. The execution module with the highest level of accuracy processes the search parameters. Preferably, the calling module is specifically configured to determine whether there are at least two execution modules included in the predefined conflict sequence in the execution module that meet the first accuracy requirement; if yes, determine that the The execution modules of the first accuracy requirement conflict with each other; if not, it is determined that the execution modules satisfying the first accuracy requirement do not conflict with each other. Preferably, the output of the execution module further includes an execution result of the execution module, and the search module is further configured to: the output result of the execution module meets a second accuracy requirement and the search parameter meets a preset When the complexity is required, the search result is performed according to the execution result of the execution module, and the search result is obtained. Preferably, when the output result of the execution module includes the execution result of the execution module, the calling module is further configured to notify the execution result in the output result of the execution module to the subsequent execution mode in the execution sequence. The group is configured to generate an output result according to the execution result of the execution module. Preferably, the device further includes: a setting module, configured to set a unified interface for each execution module in the execution sequence, and set a uniform precision level for outputting the execution modules through the interface For use by the calling module. The present invention includes the following advantages, and the execution modules of the conflicting execution modules are coordinated according to the accuracy of the execution result of the execution module, which facilitates the management of the execution module -10- 201140344 without changing the original execution module. Can output better search terms. In addition, the execution of the module is independent, does not affect the stability of the search engine core query service, and the execution module can be distributed, not bound to the search engine service, or compete with the search engine for server resources. The pressure generated on the server is small and the processing speed is fast. Of course, implementing any of the products of this case does not necessarily require achieving all of the advantages described above. [Embodiment] The main idea of the present case includes: using an independent platform to uniformly control the generation of search words, managing a plurality of execution modules in the same execution sequence according to a unified interface, and determining according to the accuracy level of the output results of the respective execution modules. The execution module of the search parameter is processed, and based on the determined execution result of the execution module, the search engine is used to search and obtain the search result. For example, when the system selects the spelling correction module and the rewriting module to process the search parameters at the same time, when the output of the spelling error correction module and the rewriting module meets the accuracy requirements of the execution sequence, the search plan is searched. The spelling correction module and the rewriting module can be used to obtain the execution result of the spelling correction module and the rewriting module, and the search result of the search engine for the execution result; if the spelling correction module and the rewriting module In conflict with each other, the execution module retained in the search plan is determined according to the accuracy level of the output of the spelling correction module and the rewriting module. The output result of the execution module may be a judgment result of whether the execution module needs to be used to process the search parameter, including “yes” and “no” -11 - 201140344: the execution module may also process the search parameter As a result, the execution result of the module is executed. The system can set the accuracy requirement for the output result of the execution module. When the output result of the execution module meets the preset accuracy requirement, the execution module is executed to obtain the execution result of the execution module. In addition, in order to compare the accuracy of the output results of different execution modules, the system can set a uniform accuracy level for the output of each execution module. The output result of the execution module and the search parameter corresponding to the output result are used as the calculation factors of the accuracy algorithm, and the accuracy is calculated, and the accuracy level of the output result of the execution module can be obtained. Among them, the accuracy level is used to characterize the suitability of the execution module to process the search parameters. In addition, the system can also set an accuracy requirement for the execution sequence, and by comparing the relationship between the accuracy requirement and the accuracy level of the output result of the execution module, it is determined whether the output result of each execution module corresponding to the execution sequence satisfies the requirement. . If the accuracy level of the output result of the execution module is greater than the accuracy requirement corresponding to the execution sequence, it is determined that the output result of the execution module satisfies the accuracy requirement corresponding to the execution sequence; otherwise, the output result of the execution module is not determined Meet the accuracy requirements of the execution sequence. The technical solutions in this case will be clearly described in the following description 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 rather than all embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative efforts are within the scope of the present disclosure. As shown in FIG. 1 , a flow chart of a search method in the first embodiment of the present invention includes the following steps: -12- 201140344 Step 101: Obtain a search parameter input by a user terminal, according to a pre-configured or search tag selected by the user end. Determine the execution sequence that processes the search parameters. The category of the search result corresponding to the search parameter input by the user terminal may include categories such as "product", "information", "technology" and "all". The client can select the search tag according to the user's needs. When the user does not select the search tag, the system can use the pre-configured search tag, which is the "all" search tag. The different search tags correspond to different execution sequences. The execution sequence is a package package that is preset by the system and includes one or more execution modules. The execution module in the execution sequence may be a customized module. The system can define an execution sequence containing a portion of the execution module through which the execution module can be selected for execution; or the execution sequence can be configured by default as the entire execution module. Each execution sequence set by the system can perform different processing on the search parameters input by the user end, corresponding to different processing functions and accuracy requirements for the output results. The user terminal can select a search tag corresponding to the required processing function according to the user's needs, and input the search parameter to be processed, and the system and the search tag determine the execution sequence for processing the search parameter. In step 1200, the execution module corresponding to the execution sequence is sequentially called according to the execution sequence, and the output result of the execution parameter is obtained by the execution module, and the search plan is generated according to the accuracy level of the output result of the execution module. The search plan may include an execution module that processes the search parameters, and may also execute a processing strategy of the module for the search parameters. Specifically, an interface of the execution module of the execution sequence can be set to a uniform accuracy level for the output of the respective execution modules through the interface. The system can determine whether the accuracy level of the output of the execution module satisfies the first accuracy requirement. If so, it is determined that the search module processes the search parameter, i.e., the execution module is included in the search plan. After judging that the accuracy level of the output result of the execution module satisfies the accuracy requirement, 'it is also possible to determine whether the execution modules satisfying the first accuracy requirement conflict with each other'. If they conflict with each other, the conflicting execution modes are The execution module with the highest accuracy level of the output result in the group processes the search parameter, that is, only the execution module with the highest accuracy level of the output result in the conflicting execution module is retained in the search plan. The determining whether the execution modules satisfying the accuracy requirement conflict with each other may include: determining whether there are at least two execution modules included in the predefined conflict sequence in the execution module that meets the first accuracy requirement; If yes, it is determined that the execution modules satisfying the first accuracy requirement conflict with each other; if not, it is determined that the execution modules satisfying the first-precision requirement do not conflict with each other. The output result of the execution module may further include an execution result of the execution module. When the output result of the execution module satisfies the second accuracy requirement and the search parameter meets the preset complexity requirement, the execution module is followed. The results of the execution are searched to obtain search results. The second accuracy requirement above is higher than the first accuracy requirement. The execution result of the execution module on the search parameter may be the search parameter corrected by the execution module. For example, when the execution module is the spelling correction module - 201140344 group and the search parameter is "Nuo Ke Ya", the execution result of the spelling correction module is the corrected search parameter 'that is, Nokia': when executing the module When the group is a rewrite module and the search parameter is "I want to purchase a mobile phone, the execution result of the rewrite module is the corrected search parameter, that is, "mobile phone". When the execution result of the execution module includes the execution module After the execution result is obtained, after the output module obtains the output result of the search parameter, the execution result in the output result of the execution module may be notified to the subsequent execution module in the execution sequence, so that the subsequent execution module And generating an output result according to the execution result of the execution module. Step 103: using the execution module determined by the search plan to process the search parameter 'acquiring the execution result of the determined execution module, and performing a search according to the execution result to obtain the search result. Specifically, 'the execution module can be processed separately using each execution module in the search plan to obtain the execution result of each execution module, and judge Whether the number of rows is greater than the specified number of outputs; if the number of execution results is greater than the specified number of outputs, the execution result with the highest accuracy level in the retained execution result is sent to the search engine as a search term. The search engine obtains the search result. In addition, while sending the execution result of the execution module to the search engine for searching, the system can also return the execution result of the execution module to the client for use by the client. The system can also execute The execution result of the module is only returned to the client, and is not sent to the search engine to reduce the pressure on the search engine. For example, when the execution module is a filter module for the prohibited word, the execution result can be directly returned to the client. The search is not performed according to the execution result. The case includes the following advantages: the execution module of the conflicting execution module is coordinated according to the accuracy of the execution result of the execution module, and the user intention behind the search parameter can be obtained more quickly and accurately. And translate user intent into machine language and execution that the search engine can understand. The strategy facilitates the management of the execution module. It can output better search terms without changing the original execution module. In addition, the execution of the execution module uses independent services, which does not affect the core of the search engine. Query the stability of the service, and the execution module can be distributed and deployed' not bound to the search engine service, nor compete with the search engine for server resources, and the pressure on the server is small, and the processing speed is fast. Of course, the implementation of the case Any product does not necessarily need to achieve all the advantages described above at the same time. The search method in this case can be applied to the system architecture shown in Figure 2, which includes the user terminal, the parameter processing server and the search engine server. 1 wherein the client is configured to send a search request to the parameter processing server, input the search parameter, and select a search tag preset by the parameter processing server; the parameter processing server invokes the execution mode corresponding to the execution sequence according to the execution sequence selected by the user terminal. Group, obtain the output result of the execution module to the search parameter, and when the output result of the execution module is satisfied When the accuracy of the row sequence is required, the execution result of the execution module is sent to the search engine server and the client: the search engine server searches the search term as a search term by using the execution result from the parameter processing server. Get search results. Specifically, the parameter processing server includes an error correction module, a rewriting module, and other execution modules, and each of the execution modules can respectively process the search parameter-16-201140344 to obtain an output result respectively, when the output result is obtained. When the accuracy requirement corresponding to the execution sequence is met, the execution result of the execution module can be returned to the client as a search term and sent to the search engine server. The search engine server includes a parsing module, a query module and a merge module, wherein the parsing module is configured to parse the execution result from the parameter processing server to obtain a search term; the query module is configured to query the website according to the search term. The database, such as the web crawler structure, obtains the query result; the merge module is used to combine the query results of the query module to obtain the search result. It should be noted that, in the specific implementation manner of the present invention, the parameter processing server and the search engine server in the above system architecture may be separately deployed. 'The parameter processing server and the search engine server may also be merged into the same system. a device. The deployment of the above parameter processing server and search engine server does not affect the scope of protection of this case. The search method in this case is described in detail below in conjunction with the above application scenarios. As shown in FIG. 3, a flow chart of a search method in the second embodiment of the present invention includes the following steps: Step 301: The parameter processing server obtains a search parameter input by the user terminal, which is determined according to a pre-configured or search tag selected by the user end. Process the execution sequence of the search parameters. In step 3 02, the parameter processing server sequentially calls the execution module corresponding to the execution sequence according to the execution sequence, and obtains the output result of the execution module to the search parameter. Step 3 03, the parameter processing server judges whether the accuracy level of the execution module -17-201140344 meets the first accuracy requirement. If the result of the determination is yes, go to step 3 04; otherwise, end the process. In step 304, the parameter processing server determines whether the execution modules satisfying the first accuracy requirement conflict with each other. If the execution modules satisfying the first accuracy requirement conflict with each other, the module 305 is executed; otherwise, step 306 is performed. Step 3 05: The parameter processing server determines that the execution module is processed by the execution module with the highest accuracy level of the output result in the conflicting execution module, and the execution module is retained in the search plan to obtain the execution result of the execution module. . Step 3 06: The parameter processing server processes the search parameter 'Obtain the execution result of the determined execution module' using the execution module determined by the search plan. Step 3 07, the parameter processing server determines the number of execution results of the execution module. Whether it is greater than the specified number of outputs. If the number of execution results is greater than the specified number of outputs, then step 308 is performed; otherwise, step 309 is performed. In step 308, the parameter processing server will execute the result of the execution of the module with the highest accuracy level @#row' as the search word stomach@'袷丨叟气丨丨_server, and return the execution result to the client. It should be noted that 'after this step is executed', you can continue to perform step 3 10° Step 3 09, the parameter processing server sends all execution results as search words to the search engine server' and returns the results to the user. -18- 201140344 Specifically, a unified interface can be set for each execution module in the execution sequence, and a uniform accuracy level is set for the execution result of each execution module through the interface. When the number of retained execution results is greater than the specified number of outputs, the execution results are sorted according to the accuracy level, and the execution result of the specified number of precision levels is selected as the search plan. In the specific implementation process, there are multiple possibilities due to the output of the execution module in the system, that is, the matching of the input keywords and the like. If the entered keyword exactly matches the word in the module, the output accuracy of the module is high. Since the dictionary index of each module is independent, there is no correlation between the output precision of different modules. Since the modules are independent of each other, it is not necessary to change the previous modules when adding new modules. A unified interface can be set for the module output for the module to set the accuracy of the output. Each module has different accuracy algorithms, and the results are not comparable. The output is unified to several accuracy levels in the interface as a reference for unified selection at the output. Step 3 1 0 ' The search engine server searches for the search term and obtains the search result. It should be noted that the case can also be achieved by independently building services through various modules. The services can be integrated by calling the respective services by the user side. The technical solution proposed in this case can be implemented in C++, and it can achieve the best implementation effect by running on Linux system. The present invention includes the following advantages: coordinating the execution modules that may conflict according to the accuracy of the execution result of the execution module, can obtain the user intention behind the search parameters more quickly and accurately, and convert the user intention into a search -19-201140344 The machine language and execution strategy that can be understood facilitates the management of the execution module. It can output better search terms without changing the original execution module. In addition, the 'call to the execution module uses independent services, does not affect the stability of the search engine core query service, and the execution module can be distributed deployment' is not bound to the search engine service, nor competes with the search engine for server resources. The pressure generated on the server is small and the processing speed is fast. Of course, implementing any of the products of this case does not necessarily require achieving all of the advantages described above. The foregoing embodiment of the present invention provides a search method and an application scenario. Accordingly, the present invention also provides an apparatus for applying the above method through the following embodiments. As shown in FIG. 4, a schematic structural diagram of a device for generating a search plan according to a third embodiment of the present invention includes: acquiring a module 4 1 0 for acquiring a search parameter input by a user terminal, according to a pre-configured or the user end The selected search tag determines the execution sequence that processes the search parameters. The calling module 420 is configured to sequentially call the execution module corresponding to the execution sequence according to the execution sequence determined by the acquisition module 410, and obtain the output result of the execution module for the search parameter, according to the output of the execution module. The accuracy level of the results produces a search plan that includes an execution module that processes the search parameters. The search module 430 is configured to process the search parameter by using the execution module determined by the search plan generated by the call module 420, obtain the execution result of the determined execution module, and perform a search according to the execution result to obtain the search result. . -20- 201140344 This case includes the following advantages: Coordinating the execution modules that may conflict according to the accuracy of the execution result of the execution module, the user intention behind the search parameters can be obtained more quickly and accurately, and the user intention can be converted into a search engine. The understanding of the machine language and execution strategy facilitates the management of the execution module's ability to output better search terms without changing the original execution module. Of course, implementing any of the products in this case does not necessarily require achieving all of the advantages described above. As shown in FIG. 5, the device structure for generating a search plan in the fourth embodiment of the present invention is not intended to include: the acquiring module 5 1 0 ' is used to acquire the search parameter input by the user terminal, according to the pre-configured or the user. The search tag selected by the end determines the execution sequence for processing the search parameter. The calling module 520' is configured to sequentially call the execution module corresponding to the execution sequence according to the execution sequence determined by the acquisition module 5, and obtain the output result of the execution module for the search parameter, according to the output of the execution module. The accuracy level of the results produces a search plan that includes an execution module that processes the search parameters. The calling module 5 2 0 ' is specifically configured to determine whether the accuracy level of the output result of the execution module satisfies the first accuracy requirement, and if so, determine that the search parameter is processed by the execution module. The calling module 520 is further configured to determine whether the execution modules satisfying the first accuracy requirement conflict with each other. If they conflict with each other, the execution level of the conflicting execution module has the highest accuracy level. The module processes the search parameters. -21 - 201140344 The calling module 520' is specifically configured to determine whether there are at least two execution modules included in the predefined conflict sequence in the execution module that meets the first accuracy requirement: if yes, determine the Execution modules that satisfy the first accuracy requirement conflict with each other; if there is no ', then it is determined that the execution modules satisfying the first accuracy requirement do not conflict with each other. When the output result of the execution module includes the execution result of the execution module, the calling module 520 is further configured to notify the subsequent execution module in the execution sequence of the execution result in the output result of the execution module. The subsequent execution module is caused to generate an output result according to the execution result of the execution module. The search module 530 is configured to process the search parameter by using the execution module determined by the search plan generated by the call module 520, obtain the execution result of the determined execution module, and perform a search according to the execution result to obtain a search. result. The output of the execution module further includes the execution result of the execution module, the search module 530, and the output of the execution module meets the second accuracy requirement and the search parameter meets the preset When the complexity is required, the user searches for the execution result of the execution module, and obtains the search result, the IS S module 540, for the interface of each execution module $ ® Μ in the execution sequence, through the interface. A precision level is set for the output of the respective execution modules for use by the calling module 520. # $包· ί The following advantages, according to the execution result of the execution module, the precise execution of the ##β» sudden execution module, can be more quickly and accurately @ Μ ί! ## Converted to search guide-22- 201140344 Engine understands the machine language and execution strategy, which facilitates the management of the execution module and can output better search terms without changing the original execution module. Of course, implementing any of the products in this case does not necessarily require achieving all of the advantages described above. Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of a software plus a necessary universal hardware platform. Of course, it can also be transmitted through hardware, but in many cases, the former is better. Implementation. Based on this understanding, the technical solution of the present case is essentially. Or the part contributing to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a thousand instructions for making one The terminal device (which may be a mobile phone, a personal computer 'server, or a network device, etc.) performs the method of the various embodiments 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 some improvements and retouching without departing from the principle of the present invention, and these improvements and retouchings should also be It is regarded as the scope of protection of this case. Those skilled in the art can understand that the modules in the apparatus in the embodiment can be distributed in the apparatus of the embodiment according to the embodiment, or can be correspondingly changed in one or more apparatuses different from the embodiment. The modules of the above embodiments may be integrated into one or may be deployed separately; they may be combined into one module, or may be further split into multiple sub-modules. The above-mentioned embodiments are only for the purpose of description, and do not represent the advantages and disadvantages of the embodiments. The above disclosure is only a few specific embodiments of the present invention, but the present case -23-201140344 is not limited thereto, and any changes that can be considered by those skilled in the art should fall within the scope of protection of the present case. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the present invention or the technical solutions in the prior art, a brief description of the drawings used in the present disclosure or the prior art description will be briefly made. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work. 1 is a flow chart of a search method in the first embodiment of the present invention; FIG. 2 is a schematic diagram of a search system architecture in the second embodiment of the present invention; FIG. 3 is a flow chart of a search method in the second embodiment of the present invention; A schematic diagram of a search device structure in the third embodiment; FIG. 5 is a schematic structural diagram of a search device in the fourth embodiment of the present invention. [Main component symbol description] 4 1 0 : acquisition module 420: calling module 43 0 : search module 5 1 0 : acquisition module 5 20 : calling module 5 3 0 : search module 540: setting module - twenty four-

Claims (1)

201140344 七、申請專利範園: 1. 一種搜尋方法,其特徵在於,包括以下步驟: 獲取用戶端輸入的搜尋參數,根據預先配置的或者該 用戶端選擇的搜尋標籤確定處理該搜尋參數的執行序列; 按照該執行序列依次調用該執行序列對應的執行模組 ’獲取該執行模組對該搜尋參數的輸出結果,根據該執行 模組的輸出結果的精確度等級產生搜尋計畫,該搜尋計畫 包括處理該搜尋參數的執行模組;以及 使用該搜尋計畫確定的執行模組處理該搜尋參數,獲 取該確定的執行模組的執行結果,並按照該執行結果進行 搜尋,以獲取搜尋結果。 2. 如申請專利範圍第1項所述的方法,其中,該根 據該執行模組的輸出結果的精確度等級產生搜尋計畫,具 體包括: 判斷該執行模組的輸出結果的精確度等級是否滿足第 一精確度要求,如果滿足,則確定由該執行模組處理該搜 尋參數。 3-如申請專利範圍第2項所述的方法,其中,該判 斷執行模組的輸出結果的精確度等級滿足精確度要求之後 ,還包括: 判斷該滿足第一精確度要求的執行模組之間是否互相 衝突,如果互相衝突,則由該互相衝突的執行模組中輸出 結果的精確度等級最高的執行模組處理該搜尋參數。 4.如申請專利範圍第3項所述的方法,其中,該判 -25- 201140344 斷滿足精確度要求的執行模組之間是否互相衝突’具體包 括· 判斷該滿足第一精確度要求的執行模組中是否存在至 少兩個包含在預定義的衝突序列中的執行模組; 如果存在,則判斷該滿足第一精確度要求的執行模組 之間互相衝突;及如果不存在,則判斷該滿足第一精確度 要求的執行模組之間不互相衝突。 5. 如申請專利範圍第1項所述的方法,其中,該執 行模組的輸出結果還包括該執行模組的執行結果, 當該執行模組的輸出結果滿足第二精確度要求且該搜 尋參數滿足預設的複雜度要求時,按照該執行模組的執行 結果進行搜尋,以獲取搜尋結果。 6. 如申請專利範圍第1項所述的方法,其中,該執 行模組的輸出結果包括該執行模組的執行結果時, 該獲取執行模組對該搜尋參數的輸出結果之後,還包 括: 將該執行模組的輸出結果中的執行結果通知該執行序 列中的後續執行模組,使該後續執行模組根據該執行模組 的執彳了結果產生輸出結果。 7. 如申請專利範圍第1項所述的方法,其中,還包 括: 爲該執行序列中的各個執行模組設置統一的介面,透 過該介面爲該各個執行模組的輸出結果設置統一的精確度 等級。 -26- 201140344 8. —種搜尋裝置,其特徵在於,包括: 獲取模組,用於獲取用戶端輸入的搜尋參數,根據預 先配置的或者該用戶端選擇的搜尋標籤確定處理該搜尋參 數的執行序列; 調用模組,用於按照該獲取模組確定的執行序列依次 調用該執行序列對應的執行模組,獲取該執行模組對該搜 尋參數的輸出結果,根據該執行模組的輸出結果的精確度 等級產生搜尋計畫,該搜尋計畫包括處理該搜尋參數的執 行模組;以及 搜尋模組,用於使用該調用模組產生的搜尋計畫確定 的執行模組處理該搜尋參數,獲取該確定的執行模組的執 行結果,並按照該執行結果進行搜尋,以獲取搜尋結果。 9. 如申請專利範圍第8項所述的裝置,其中, 該調用模組,具體用於判斷該執行模組的輸出結果的 精確度等級是否滿足第一精確度要求,如果滿足,則確定 由該執行模組處理該搜尋參數。 1 0 ·如申請專利範圍第9項所述的裝置,其中, 該調用模組,還用於判斷該滿足第一精確度要求的執 行模組之間是否互相衝突,如果互相衝突,則由該互相衝 突的執行模組中輸出結果的精確度等級最高的執行模組處 理該搜尋參數。 1 1 .如申請專利範圍第1 0項所述的裝置,其中, 該調用模組,具體用於判斷該滿足第一精確度要求的 執行模組中是否存在至少兩個包含在預定義的衝突序列中 -27- 201140344 的執行模組;如果存在,則判斷該滿足第一精確度要求的 執行模組之間互相衝突;及如果不存在,則判斷該滿足第 一精確度要求的執行模組之間不互相衝突。 12. 如申請專利範圍第8項所述的裝置,其中,該執 行模組的輸出結果還包括該執行模組的執行結果, 該搜尋模組,還用於在該執行模組的輸出結果滿足第 二精確度要求且該搜尋參數滿足預設的複雜度要求時,按 照該執行模組的執行結果進行搜尋,以獲取搜尋結果。 13. 如申請專利範圍第8項所述的裝置,其中,該執 行模組的輸出結果包括該執行模組的執行結果時, 該調用模組,還用於將該執行模組的輸出結果中的執 行結果通知該執行序列中的後續執行模組,使該後續執行 模組根據該執行模組的執行結果產生輸出結果。 14. 如申請專利範圍第8項所述的裝置,其中,還包 括: 設置模組,用於爲該執行序列中的各個執行模組設置 統一的介面,透過該介面爲該各個執行模組的輸出結果設 置統一的精確度等級,供該調用模組使用。 -28-201140344 VII. Application for Patent Park: 1. A search method, comprising the steps of: obtaining a search parameter input by a user terminal, and determining an execution sequence for processing the search parameter according to a pre-configured or search tag selected by the user end. And executing, according to the execution sequence, the execution module corresponding to the execution sequence to obtain an output result of the execution module, and generating a search plan according to an accuracy level of the output result of the execution module, the search plan The execution module for processing the search parameter is processed; and the execution module determined by using the search plan processes the search parameter, obtains the execution result of the determined execution module, and performs a search according to the execution result to obtain the search result. 2. The method of claim 1, wherein the generating the search program according to the accuracy level of the output result of the execution module comprises: determining whether the accuracy level of the output result of the execution module is The first accuracy requirement is met, and if so, it is determined that the search parameter is processed by the execution module. The method of claim 2, wherein the determining the accuracy level of the output of the execution module meets the accuracy requirement, further comprising: determining the execution module that satisfies the first accuracy requirement Whether or not they conflict with each other, if they conflict with each other, the search parameter is processed by the execution module having the highest accuracy level of the output result in the conflicting execution module. 4. The method of claim 3, wherein the determining whether the execution modules satisfying the accuracy requirements conflict with each other 'specifically includes: determining the execution of the first accuracy requirement Whether there are at least two execution modules included in the predefined conflict sequence in the module; if present, determining that the execution modules satisfying the first accuracy requirement conflict with each other; and if not, determining the Execution modules that meet the first accuracy requirements do not conflict with each other. 5. The method of claim 1, wherein the output of the execution module further includes an execution result of the execution module, and the output of the execution module satisfies a second accuracy requirement and the search When the parameter meets the preset complexity requirement, the search result is performed according to the execution result of the execution module to obtain the search result. 6. The method of claim 1, wherein the output of the execution module includes an execution result of the execution module, and after the output of the execution module is output by the execution module, the method further includes: The execution result in the output result of the execution module is notified to the subsequent execution module in the execution sequence, so that the subsequent execution module generates an output result according to the execution result of the execution module. 7. The method of claim 1, wherein the method further comprises: setting a unified interface for each execution module in the execution sequence, and setting a uniform precision for outputting the execution modules through the interface; Degree level. -26- 201140344 8. A search device, comprising: an obtaining module, configured to acquire a search parameter input by a user end, and determine, according to a pre-configured or search tag selected by the user end, processing execution of the search parameter. a calling module, configured to sequentially call an execution module corresponding to the execution sequence according to an execution sequence determined by the acquisition module, and obtain an output result of the execution module for the search parameter, according to an output result of the execution module The accuracy level generates a search plan, the search plan includes an execution module that processes the search parameter, and a search module that processes the search parameter using the execution module determined by the search plan generated by the call module to obtain The determined execution result of the execution module is searched according to the execution result to obtain the search result. 9. The device of claim 8, wherein the calling module is specifically configured to determine whether an accuracy level of an output result of the execution module satisfies a first accuracy requirement, and if yes, determine The execution module processes the search parameters. The device of claim 9, wherein the calling module is further configured to determine whether the execution modules satisfying the first accuracy requirement conflict with each other, and if they conflict with each other, The execution module having the highest accuracy level of the output result in the conflicting execution module processes the search parameter. The device of claim 10, wherein the calling module is specifically configured to determine whether at least two of the execution modules satisfying the first accuracy requirement are included in a predefined conflict. An execution module of the sequence -27-201140344; if present, determining that the execution modules satisfying the first accuracy requirement conflict with each other; and if not, determining the execution module that satisfies the first accuracy requirement There is no conflict between them. 12. The device of claim 8, wherein the output of the execution module further includes an execution result of the execution module, and the search module is further configured to satisfy an output result of the execution module. When the second precision is required and the search parameter meets the preset complexity requirement, the search is performed according to the execution result of the execution module to obtain the search result. 13. The device of claim 8, wherein the output module of the execution module includes an execution result of the execution module, and the calling module is further used to output the execution module The execution result is notified to the subsequent execution module in the execution sequence, so that the subsequent execution module generates an output result according to the execution result of the execution module. 14. The device of claim 8, further comprising: a setting module, configured to set a unified interface for each execution module in the execution sequence, through which the interface is the execution module The output result sets a uniform accuracy level for use by the calling module. -28-
TW099115483A 2010-05-14 2010-05-14 Search methods and devices TWI507897B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW099115483A TWI507897B (en) 2010-05-14 2010-05-14 Search methods and devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW099115483A TWI507897B (en) 2010-05-14 2010-05-14 Search methods and devices

Publications (2)

Publication Number Publication Date
TW201140344A true TW201140344A (en) 2011-11-16
TWI507897B TWI507897B (en) 2015-11-11

Family

ID=46760272

Family Applications (1)

Application Number Title Priority Date Filing Date
TW099115483A TWI507897B (en) 2010-05-14 2010-05-14 Search methods and devices

Country Status (1)

Country Link
TW (1) TWI507897B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825864A (en) * 2019-11-13 2020-02-21 北京香侬慧语科技有限责任公司 Method and device for obtaining answers to questions

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897343B (en) * 2016-07-20 2020-08-07 阿里巴巴集团控股有限公司 Searching method, storing method and device for execution plan

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6578032B1 (en) * 2000-06-28 2003-06-10 Microsoft Corporation Method and system for performing phrase/word clustering and cluster merging
US7617205B2 (en) * 2005-03-30 2009-11-10 Google Inc. Estimating confidence for query revision models
US20090077056A1 (en) * 2007-09-17 2009-03-19 Yahoo! Inc. Customization of search results
TW200951743A (en) * 2008-06-05 2009-12-16 Tornado Technologies Co Ltd Method and system of using text characteristics to expand a query scope, data query method capable of searching word phrases having similar characteristics, and search engine server

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825864A (en) * 2019-11-13 2020-02-21 北京香侬慧语科技有限责任公司 Method and device for obtaining answers to questions

Also Published As

Publication number Publication date
TWI507897B (en) 2015-11-11

Similar Documents

Publication Publication Date Title
US9183511B2 (en) System and method for universal translating from natural language questions to structured queries
JP5357326B2 (en) Apparatus and method for rendering a page
CN102141990B (en) Searching method and device
US10698654B2 (en) Ranking and boosting relevant distributable digital assistant operations
US11809442B2 (en) Facilitating data transformations
JP5856139B2 (en) Indexing and searching using virtual documents
US10706066B2 (en) Extensible data transformations
US20140282375A1 (en) Generating Program Fragments Using Keywords and Context Information
KR20160061305A (en) Method and apparatus for customized software development kit (sdk) generation
US11809223B2 (en) Collecting and annotating transformation tools for use in generating transformation programs
US11163788B2 (en) Generating and ranking transformation programs
US10930272B1 (en) Event-based semantic search and retrieval
US20200258523A1 (en) Activation of remote devices in a networked system
US10635725B2 (en) Providing app store search results
JP2022172090A (en) Coordination of overlapping processing of audio queries
CN106471492B (en) Acts of indexing resources
TWI507897B (en) Search methods and devices
RU2603535C2 (en) METHOD AND SYSTEM FOR USING A Web-BROWSER
Kyriakakis et al. Enabling ontology-based search: a case study in the bioinformatics domain
US20240012808A1 (en) Computer Systems and Methods for a Guided Query
US20110276554A1 (en) Query and note based search system
CN118069883A (en) Training method of music correlation model, music searching method and equipment
CN117493369A (en) Data retrieval method and device, storage medium and computer equipment
WO2019083601A1 (en) Ranking and boosting relevant distributable digital assistant operations
CN113392301A (en) Method, device, medium and electronic equipment for crawling data

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees