TWM645216U - Reply Generation System Based on Intent Classification and Keyword Extraction - Google Patents
Reply Generation System Based on Intent Classification and Keyword Extraction Download PDFInfo
- Publication number
- TWM645216U TWM645216U TW111214558U TW111214558U TWM645216U TW M645216 U TWM645216 U TW M645216U TW 111214558 U TW111214558 U TW 111214558U TW 111214558 U TW111214558 U TW 111214558U TW M645216 U TWM645216 U TW M645216U
- Authority
- TW
- Taiwan
- Prior art keywords
- reply
- module
- merchant
- information
- generate
- Prior art date
Links
- 238000000605 extraction Methods 0.000 title claims abstract description 56
- 230000004044 response Effects 0.000 claims description 20
- 230000002457 bidirectional effect Effects 0.000 claims description 7
- 230000007246 mechanism Effects 0.000 claims description 6
- 239000000284 extract Substances 0.000 abstract description 5
- 238000003058 natural language processing Methods 0.000 description 10
- 238000000034 method Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000008713 feedback mechanism Effects 0.000 description 3
- 230000009118 appropriate response Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000013598 vector Substances 0.000 description 2
- 244000269722 Thea sinensis Species 0.000 description 1
- 235000006468 Thea sinensis Nutrition 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 235000020279 black tea Nutrition 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000005352 clarification Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000008451 emotion Effects 0.000 description 1
- 239000003205 fragrance Substances 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本新型提供一種基於意圖分類與關鍵詞提取的回覆生成系統,其包括對話機器人模組、意圖分類模組、關鍵詞提取模組以及回覆生成模組,藉由對話機器人模組讀取對話資訊後,以意圖分類模組訊號連接對話機器人模組以讀取並分析該對話資訊中所含之意圖,接著以關鍵詞提取模組訊號連接意圖分類模組以響應於意圖分類結果以自該對話資訊提取關鍵詞組作為回覆生成之依據,最後由回覆生成模組訊號連接關鍵詞提取模組及對話機器人模組以根據關鍵詞提取模組所產生之回覆指示以對應生成即時回覆,並通過該對話機器人模組輸出該即時回覆。 This new model provides a reply generation system based on intention classification and keyword extraction, which includes a dialogue robot module, an intention classification module, a keyword extraction module and a reply generation module. After the dialogue robot module reads the dialogue information, , connect the conversation robot module with the intent classification module signal to read and analyze the intent contained in the conversation information, and then connect the intent classification module with the keyword extraction module signal to respond to the intent classification result from the conversation information. Extract keyword groups as the basis for reply generation. Finally, the reply generation module signal connects the keyword extraction module and the conversation robot module to generate real-time replies according to the reply instructions generated by the keyword extraction module, and through the conversation robot The module outputs this instant reply.
Description
本新型涉及一種對話回覆生成系統,尤其是具有辨識用戶端意圖並可搭配反饋機制以實現回覆內容最佳化的智慧型回覆生成系統。 The present invention relates to a dialogue reply generation system, in particular, an intelligent reply generation system that can identify the user's intention and can be combined with a feedback mechanism to optimize reply content.
聊天機器人(Chatbot)為透過語音或文字對話與用戶進行交談的電腦程式,其具有能夠模擬人類對話的能力;現今聊天機器人在電子商務領域中廣泛應用,通過與客戶交談以解決一般客服問題或提取資訊;部分習知的聊天機器人會搭載自然語言處理系統,惟多數系統僅能判斷輸入的關鍵詞,並於資料庫中找尋合適的應答資訊;習知技術中聊天機器人能夠應對的問答情境有其侷限性,並使其應答準確性不足且不夠人性化。 Chatbot is a computer program that communicates with users through voice or text dialogue. It has the ability to simulate human dialogue. Today, chatbots are widely used in the field of e-commerce to solve general customer service problems or extract information by talking to customers. Information; some conventional chat robots are equipped with natural language processing systems, but most systems can only judge the input keywords and find appropriate response information in the database; there are other question and answer situations that chat robots in conventional technologies can handle. limitations, and make its responses less accurate and less humane.
例如中華民國專利公告號I751567所揭示的「提供用戶自助服務之方法及系統」以人工智慧語意分析模組分析聊天機器人模組上傳的對談歷程,並決定提供相應的服務或後續轉接至真人服務,該系統並無法藉由自身的反饋機制來生成準確的回覆內容;又如中華民國專利公告號M615272所揭示的「智慧型語音客服系統」係以語意內容分析模組實現讀取文字紀錄檔中的語意,並分析其語意結果後,再由對話回應資料庫中搜尋適當的回應,同樣也缺乏反饋機制來優化應答的準確度;再如中華民國專利公告號M609010所揭示的「對話互動系統」,雖然該專利技術也運用了語句意圖分析模組來辨識輸入之語句並產生關鍵詞,惟其仍需由多個回覆模板中挑選合適回覆模板,仍無法產生同時兼具準確度且人形化的回覆內容。 For example, the "Method and System for Providing User Self-Service" disclosed in the Republic of China Patent Announcement No. I751567 uses an artificial intelligence semantic analysis module to analyze the conversation process uploaded by the chatbot module, and decides to provide corresponding services or subsequently transfer to a real person. service, the system cannot generate accurate reply content through its own feedback mechanism; another example is that the "intelligent voice customer service system" disclosed in the Republic of China Patent Announcement No. M615272 uses a semantic content analysis module to read text record files. After analyzing the semantic results, the appropriate response is searched for in the dialogue response database. There is also a lack of feedback mechanism to optimize the accuracy of the response; another example is the "dialogue interactive system" disclosed in the Republic of China Patent Announcement No. M609010. ”, although this patented technology also uses a sentence intent analysis module to identify the input sentence and generate keywords, it still needs to select the appropriate reply template from multiple reply templates, and it is still unable to generate a response that is both accurate and human-like. Reply content.
為了能夠提供準確的資訊且同時具備人性化的回覆,聊天機器人須對於使用者發出訊息的意圖進行分析,再依照其中的意圖以完成不同的應對答覆;為達到上述目的,本新型提供一種基於意圖分類與關鍵詞提取的回覆生成系統,其可對於使用者訊息進行意圖分類及關鍵詞提取,再依照訊息中的意圖及提取出的關鍵詞組抓取相對應的資訊,由關鍵詞組擴充成完整語句來做成回覆。 In order to provide accurate information and humanized responses, the chatbot must analyze the user's intention of sending a message, and then complete different responses according to the intention. To achieve the above purpose, this new model provides an intention-based A reply generation system for classification and keyword extraction, which can perform intent classification and keyword extraction on user messages, and then capture the corresponding information according to the intent in the message and the extracted keyword groups, and expand the keyword groups into complete sentences. to formulate a reply.
本新型所提供的一種基於意圖分類與關鍵詞提取的回覆生成系統,其包括:一對話機器人模組,其用以讀取一用戶資訊對話資訊;一意圖分類模組,訊號連接該對話機器人模組,其讀取並分析該用戶資訊對話資訊以產生一意圖分類結果,其包含一意圖明確結果或一意圖不明確結果;一關鍵詞提取模組,訊號連接該意圖分類模組,其響應於該意圖明確結果以自該用戶資訊對話資訊提取一關鍵詞組,其中,該關鍵詞提取模組存取一商家資訊,其用以比對該關鍵詞組以產生一回覆指示,其中,該回覆指示包括一商家回覆指示或一反問回覆指示;及一回覆生成模組,訊號連接該對話機器人模組及該關鍵詞提取模組,其根據該回覆指示產生一即時回覆,並通過該對話機器人模組輸出該即時回覆,該即時回覆包括一商家回覆或一反問回覆,其中,該回覆生成模組包含:一商家回覆單元,其響應於該商家回覆指示以產生該商家回覆;及一反問回覆單元,其響應於該反問回覆指示以產生該反問回覆。 The invention provides a reply generation system based on intention classification and keyword extraction, which includes: a dialogue robot module, which is used to read a user information dialogue information; an intention classification module, which signals connect the dialogue robot module A group that reads and analyzes the user information dialogue information to generate an intent classification result, which includes a clear intent result or an unclear intent result; a keyword extraction module, a signal connected to the intent classification module, which responds to The intent clear result is to extract a keyword group from the user information dialogue information, wherein the keyword extraction module accesses a business information, and is used to compare the keyword group to generate a reply instruction, wherein the reply instruction includes A merchant reply instruction or a rhetorical question reply instruction; and a reply generation module, the signal is connected to the conversation robot module and the keyword extraction module, which generates an instant reply according to the reply instruction and outputs it through the conversation robot module The instant reply includes a merchant reply or a rhetorical reply, wherein the reply generation module includes: a merchant reply unit that responds to the merchant reply instruction to generate the merchant reply; and a rhetorical reply unit, The rhetorical question reply is generated in response to the rhetorical question reply instruction.
本新型所提供的系統透過讀取使用者訊息進行意圖分類,接著依照分類結果將使用者訊息分類為商家問答或非商家問答,並對於商家問答的訊息進一步地提取出具有代表性的關鍵詞組,再與預先建立之商家資訊比對以判斷該關鍵詞組是否完整,以獲取對應該關鍵詞組之商家資訊;最後,導入自然語言處理模型(Natural language processing model)中以生成回覆用的語句。 The system provided by this new model performs intent classification by reading user information, and then classifies the user information into merchant Q&A or non-merchant Q&A according to the classification results, and further extracts representative keyword groups from the merchant Q&A information. Then compare it with the pre-established business information to determine whether the keyword group is complete to obtain the business information corresponding to the keyword group; finally, import it into a natural language processing model (Natural language processing model) to generate a reply sentence.
本新型之具體效果在於,透過語言生成模型進行意圖分類及關鍵詞提取,再結合文字對文字(text-to-text)的自然語言處理模型以提高回覆語句的準確率,並可增加回覆語句的句型多樣性,使聊天機器人在回覆應答上更人性化;本新型不僅避免了先前技術中語言生成模型的生成方式太過自由,導致所生成的回覆內容過於發散而產生文不對題的情況,更不需要大量資料集訓練,也能提供正確的資訊回覆。 The specific effect of this new model is to use a language generation model to perform intent classification and keyword extraction, and then combine it with a text-to-text natural language processing model to improve the accuracy of reply sentences and increase the number of reply sentences. The diversity of sentence patterns makes the chat robot more humane in replying; this new model not only avoids the too free generation method of the language generation model in the previous technology, resulting in the generated reply content being too divergent and causing the text to be incorrect, but also It requires a large amount of data set training to provide correct information responses.
100:基於意圖分類與關鍵詞提取的回覆生成系統 100: Reply generation system based on intent classification and keyword extraction
1:對話機器人模組 1: Conversation robot module
11:對話介面 11: Dialogue interface
2:意圖分類模組 2: Intent classification module
3:關鍵詞提取模組 3: Keyword extraction module
4:回覆生成模組 4: Reply generation module
40:T5模型 40:T5 model
41:商家回覆單元 41: Merchant reply unit
42:反問回覆單元 42: Rhetorical question reply unit
43:預設回覆單元 43: Default reply unit
5:資料庫 5:Database
51:商家資訊模板 51: Business information template
52:反問回覆模板 52: Rhetorical question reply template
53:預設回覆模板 53: Default reply template
圖1A至1B係一系列方塊圖用以說明本新型第一實施例之系統架構圖;圖2係一方塊圖用以說明本新型第二實施例之系統架構圖;圖3係一方塊圖用以說明本新型第三實施例之系統架構圖;圖4係一流程圖用以說明本新型執行時之工作原理。 Figures 1A to 1B are a series of block diagrams illustrating the system architecture of the first embodiment of the present invention; Figure 2 is a block diagram illustrating the system architecture of the second embodiment of the present invention; Figure 3 is a block diagram illustrating the system architecture of the second embodiment of the present invention. To illustrate the system architecture diagram of the third embodiment of the present invention; Figure 4 is a flow chart to illustrate the working principle of the present invention during execution.
為了更清楚的說明本新型,茲列舉數個實施例並配合圖式詳細說明如下;請參閱圖1A至1B,其係本新型所提供之一種基於意圖分類與關鍵詞提取的回覆生成系統(100)之第一實施例,其可搭載以個人電腦、智慧型手機、平板電腦、智慧影音系統、車用導航系統、電子商務客服系統等需要密集人機互動之電子裝置,具體地,該系統(100)包括一對話機器人模組(1)、一意圖分類模組(2)、一關鍵詞提取模組(3)及一回覆生成模組(4)。 In order to explain the present invention more clearly, several embodiments are listed below and described in detail with drawings; please refer to Figures 1A to 1B, which are a reply generation system (100) based on intent classification and keyword extraction provided by the present invention. ), which can be equipped with electronic devices that require intensive human-computer interaction, such as personal computers, smart phones, tablets, smart audio and video systems, car navigation systems, e-commerce customer service systems, etc. Specifically, the system ( 100) includes a conversation robot module (1), an intent classification module (2), a keyword extraction module (3) and a reply generation module (4).
該對話機器人模組(1)用以讀取一對話資訊,其具有一與用戶互動之對話介面(11);該對話機器人模組(1)可以通過該對話介面(11)與用戶進行對話以獲取該對話資訊,其中該對話介面(11)可例如語音或文字輸入平台,具體如電子商務客服系統中的語音通話頻道或文字聊天室。 The conversation robot module (1) is used to read a conversation information, and has a conversation interface (11) for interacting with the user; the conversation robot module (1) can conduct conversations with the user through the conversation interface (11). Obtain the dialogue information, where the dialogue interface (11) can be, for example, a voice or text input platform, specifically a voice call channel or a text chat room in an e-commerce customer service system.
該意圖分類模組(2)訊號連接該對話機器人模組(1),其讀取並分析該對話資訊以產生一意圖分類結果,其包含一意圖明確結果或一意圖不明確結果;具體而言,該意圖分類模組(2)透過語言生成模型針對該對話資訊進行分析,並與預設的意圖類型比對以產生該意圖分類結果,若該對話資訊中所包含的語句與預設的對話類型相同,例如評論型語句如「你們店裡的紅茶滿香的」或商家問答型語句如「你們店裡一套洋裝賣多少?」,則產生該意圖明確結果;若該對話資訊中所包含的語句無法符合任何一種預設的對話類型,則產生該意圖不明確結果;在本新型的一些實施案例中,該意圖明確結果對應於商家問答,而該意圖不明確結果則對應於非商家問答。 The intention classification module (2) is signal-connected to the conversation robot module (1), which reads and analyzes the conversation information to generate an intent classification result, which includes a clear-intention result or an unclear-intention result; specifically, , the intention classification module (2) analyzes the dialogue information through the language generation model, and compares it with the preset intention type to generate the intention classification result. If the sentences contained in the dialogue information are consistent with the preset dialogue The types are the same, for example, comment-type statements such as "The black tea in your store is full of fragrance" or business question-and-answer statements such as "How much does a dress cost in your store?" will produce a result with clear intent; if the dialogue information contains The statement cannot conform to any preset dialogue type, and the result of unclear intention is generated; in some implementation cases of the present invention, the result of clear intention corresponds to merchant Q&A, and the result of unclear intention corresponds to non-merchant Q&A. .
該關鍵詞提取模組(3)訊號連接該意圖分類模組(2),其響應於該意圖明確結果以自該對話資訊提取一關鍵詞組,其中,該關鍵詞提取模組(3)存取一商家資訊用以比對該關鍵詞組以產生一回覆指示,其中,該回覆指示包括一商家回覆指示或一反問回覆指示;具體地,該商家資訊可以是由內存於該系統(100)中的資料庫存取而得,也可以是透過連結網路由特定商家的網站資訊中所獲得;舉例來說,商家資訊可以列舉如商家名稱、地址、電話、服務項目、商品資訊例如商品規格、商品價格或庫存數量、以及支付方式等,舉凡任何使用該系統(100)以進行客服應答所需的商家資訊皆為本新型可據以實施前述功能之項目。 The keyword extraction module (3) is signal-connected to the intent classification module (2), which responds to the intent clarification result to extract a keyword group from the conversation information, wherein the keyword extraction module (3) accesses A merchant information is used to compare the keyword group to generate a reply instruction, wherein the reply instruction includes a merchant reply instruction or a rhetorical reply instruction; specifically, the merchant information may be stored in the system (100) The data can be obtained from a database or from the website information of a specific merchant through a link network; for example, the merchant information can include merchant name, address, phone number, service items, product information such as product specifications, product prices, or Inventory quantity, payment methods, etc., any merchant information required to use the system (100) for customer service response are all items on which this new model can implement the aforementioned functions.
該回覆生成模組(4)訊號連接該對話機器人模組(1)及該關鍵詞提取模組(3),其根據該回覆指示產生一即時回覆,並通過該對話機器人模組(1)輸出該即時回覆,該即時回覆包括一商家回覆或一反問回覆,其中,該回覆生成模組(4)包含一商家回覆單元(41)及一反問回覆單元(42);該商家回覆單元(41)響應於該商家回覆指示以產生該商家回覆,該反問回覆單元(42)響應於該回覆指示以產生該反問回覆;具體而言,該關鍵詞提取模組(3)係響應於該關鍵詞組相 同於該商家資訊以輸出該商家回覆指示,其用以指示該商家回覆單元(41)以產生一商家回覆,或該關鍵詞提取模組(3)響應於該關鍵詞組不同於該商家資訊以輸出該反問回覆指示,其用以指示該反問回覆單元(42)以產生一反問回覆;舉例來說,當關鍵詞組之中具有「地址」此一關鍵詞,經過該關鍵詞提取模組(3)比對商家資訊後其相同於「商家地址」,即發布商家回覆指示以呼叫該商家回覆單元(41)輸出商家回覆,使用者得以通過對話介面(11)獲取「商家地址」相關資訊;另一方面,若關鍵詞組中僅出現「住」、「哪裡」等關鍵詞,無法比對出與商家資訊中有任何相同的關鍵詞,即發布反問回覆指示以呼叫該反問回覆單元(42)輸出反問回覆,例如回覆以「您是想詢問本店的地址嗎?」以期望由用戶端獲取更精確的對話資訊。 The reply generation module (4) is connected by signal to the conversation robot module (1) and the keyword extraction module (3). It generates an instant reply according to the reply instruction and outputs it through the conversation robot module (1). The instant reply includes a merchant reply or a rhetorical question reply, wherein the reply generation module (4) includes a merchant reply unit (41) and a rhetorical question reply unit (42); the merchant reply unit (41) In response to the merchant reply instruction to generate the merchant reply, the rhetorical question reply unit (42) responds to the reply instruction to generate the rhetorical question reply; specifically, the keyword extraction module (3) is in response to the keyword group. The same as the merchant information to output the merchant reply instruction, which is used to instruct the merchant reply unit (41) to generate a merchant reply, or the keyword extraction module (3) responds to the keyword group being different from the merchant information. Output the rhetorical question reply instruction, which is used to instruct the rhetorical question reply unit (42) to generate a rhetorical question reply; for example, when there is a keyword "address" in the keyword group, through the keyword extraction module (3 ) compares the merchant information and it is the same as the "merchant address", then the merchant reply instruction is issued to call the merchant reply unit (41) to output the merchant reply, and the user can obtain the "merchant address" related information through the dialogue interface (11); in addition, On the one hand, if only keywords such as "live" and "where" appear in the keyword group, and it is impossible to compare any keywords that are the same as those in the business information, a rhetorical question reply instruction is issued to call the output of the rhetorical question reply unit (42) Reply to the question, for example, reply with "Do you want to ask for the address of our store?" in the hope that the user can obtain more accurate conversation information.
於本實施例中,如圖1B所示,該回覆生成模組(4)更包括一預設回覆單元(43),其響應於一預設回覆指示以生成一預設回覆,其中,該預設回覆指示係由該關鍵詞提取模組(3)響應於該意圖不明確結果所產生;具體而言,若該意圖分類模組(2)產生一意圖不明確結果,則該關鍵詞提取模組(3)響應於該意圖不明確結果以產生一預設回覆指示,該預設回覆單元(43)根據該預設回覆指示生成一預設回覆,並通過該對話機器人模組(1)輸出該預設回覆;舉例來說,當該對話資訊中所包含的語句不符合任何預設的對話類型時,例如「你好,我是某某某」屬於問候類型而非商家問答,則該回覆生成模組(4)可以產生如「你好,該如何協助您呢?」或「您好,這裡是XXX商店,有什麼能為您服務嗎?」等預設回覆,並無特別限制。 In this embodiment, as shown in FIG. 1B , the reply generation module (4) further includes a preset reply unit (43) that responds to a preset reply instruction to generate a preset reply, wherein the preset reply is Assume that the reply instruction is generated by the keyword extraction module (3) in response to the unclear intent result; specifically, if the intent classification module (2) generates an unclear intent result, then the keyword extraction module The group (3) generates a preset reply instruction in response to the unclear intention result, the preset reply unit (43) generates a preset reply according to the preset reply instruction, and outputs it through the conversation robot module (1) The default reply; for example, when the sentence contained in the conversation information does not match any default conversation type, for example, "Hello, I am so-and-so" is a greeting type rather than a business Q&A, then the reply The generation module (4) can generate default responses such as "Hello, how can I help you?" or "Hello, this is the XXX store, how can I serve you?" and there are no special restrictions.
請參閱圖2,其係本新型所提供之一種基於意圖分類與關鍵詞提取的回覆生成系統(100)之第二實施例,其中,基本構件與作動機制與第一實施例相同,於此不加贅述,惟該商家回覆單元(41)係基於一自然語言處理模型以響應該商家回覆指示以產生該商家回覆,更具體地,該自然語言處理模型 (Natural Language Processing model,NLP)係T5模型(40),以響應該商家回覆指示以產生該商家回覆,其中該T5模型(40)係基於Transformer encoder-decoder架構;於T5模型(40)架構中,所有NLP任務都被重新構建為統一的文字到文字(text-to-text)格式,所有的輸入和輸出均為文字的型態表示,能夠允許在任何NLP任務上使用相同的模型及損失函數和超參數。 Please refer to Figure 2, which is a second embodiment of a reply generation system (100) based on intent classification and keyword extraction provided by the present invention. The basic components and operating mechanism are the same as those in the first embodiment. To reiterate, the merchant reply unit (41) is based on a natural language processing model to respond to the merchant reply instructions to generate the merchant reply. More specifically, the natural language processing model (Natural Language Processing model, NLP) is a T5 model (40) to generate the merchant reply in response to the merchant reply instruction, wherein the T5 model (40) is based on the Transformer encoder-decoder architecture; in the T5 model (40) architecture , all NLP tasks are restructured into a unified text-to-text format. All inputs and outputs are text representations, allowing the same model and loss function to be used on any NLP task. and hyperparameters.
請參閱圖3,其係本新型所提供之一種基於意圖分類與關鍵詞提取的回覆生成系統(100)之第三實施例,其中,基本構件與作動機制與第一實施例相同,於此不加贅述,惟其中該商家回覆單元(41)係基於一T5模型(40)以響應該商家回覆指示以產生該商家回覆,且該系統(100)進一步包括一資料庫(5),訊號連接該關鍵詞提取模組(3)及該回覆生成模組(4),其預存有多筆商家資訊模板(51)、多筆反問回覆模板(52)及多筆預設回覆模板(53);須說明的是,該些商家資訊模板(51)、多筆反問回覆模板(52)及多筆預設回覆模板(53)可以是在該系統(100)初始化前就已預存於該資料庫(5)中,或透過該資料庫(5)連結網際網路自特定商家之網站資訊中抓取,並無特別限制。 Please refer to Figure 3, which is the third embodiment of a reply generation system (100) based on intent classification and keyword extraction provided by the present invention. The basic components and operating mechanism are the same as those in the first embodiment. To reiterate, the merchant reply unit (41) is based on a T5 model (40) to respond to the merchant reply instruction to generate the merchant reply, and the system (100) further includes a database (5), and the signal is connected to the merchant reply unit (41). The keyword extraction module (3) and the reply generation module (4) pre-store multiple business information templates (51), multiple rhetorical reply templates (52) and multiple default reply templates (53); required It is noted that the business information templates (51), multiple rhetorical reply templates (52) and multiple default reply templates (53) may have been pre-stored in the database (5) before the system (100) is initialized. ), or crawl from the website information of a specific merchant through the database (5) to connect to the Internet, without special restrictions.
於第三實施例中,該關鍵詞提取模組(3)自該些商家資訊模板(51)存取該商家資訊。 In the third embodiment, the keyword extraction module (3) accesses the merchant information from the merchant information templates (51).
於第三實施例中,該反問回覆單元(42)係響應該反問回覆指示以自該些反問回覆模板(52)中存取該反問回覆。 In the third embodiment, the rhetorical question reply unit (42) responds to the rhetorical question reply instruction to access the rhetorical question reply from the rhetorical question reply templates (52).
於第三實施例中,該預設回覆單元(43)係響應該預設回覆指示以自該些預設回覆模板(53)中存取該預設回覆。 In the third embodiment, the default reply unit (43) responds to the default reply instruction to access the default reply from the default reply templates (53).
於上述實施例中,該意圖分類模組(2)係基於一語言生成模型以分析該對話資訊所使用之語句以產生該意圖分類結果,具體為一雙向編碼的轉 換器模型(Bidirectional Encoder Representations from Transformers model,BERT model)以實現上述對話資訊之意圖分類。 In the above embodiment, the intent classification module (2) is based on a language generation model to analyze the sentences used in the dialogue information to generate the intent classification result, specifically a bidirectional encoding conversion. Bidirectional Encoder Representations from Transformers model (BERT model) to achieve the above intention classification of dialogue information.
於上述實施例中,該關鍵詞提取模組(3)係基於一語言生成模型以自該對話資訊所使用之語句蒐集關鍵詞以產生該關鍵詞組,具體為一雙向編碼的轉換器模型(Bidirectional Encoder Representations from Transformers model,BERT model)以實現上述關鍵詞組之提取;BERT模型是一種能夠將文字內容轉換為特定向量以捕捉其含義,並在該些特定向量的基礎之上分析單詞與文字內容之間的上下文關係,最終利用餘弦相似性的方法比較出與文字內容最相關的單詞;舉例來說,BERT模型可以在包括整個Wikipedia和Book Corpus在內的大量未標記文字內容的資料庫上進行雙向的預訓練,通過上下句預測及完形填空等任務的訓練後,使得模型可以更正確的理解語言的含意,從而更有效地用於情感分類或意圖檢測等下游任務。 In the above embodiment, the keyword extraction module (3) is based on a language generation model to collect keywords from the sentences used in the dialogue information to generate the keyword group, specifically a bidirectional encoding converter model (Bidirectional Encoder Representations from Transformers model, BERT model) to achieve the extraction of the above keyword phrases; the BERT model is a method that can convert text content into specific vectors to capture its meaning, and analyze words and text content based on these specific vectors. contextual relationships between them, and finally uses the cosine similarity method to compare the words most relevant to the text content; for example, the BERT model can perform bidirectional operations on a large number of unlabeled text content databases, including the entire Wikipedia and Book Corpus. Pre-training, through training on tasks such as sentence prediction and cloze, enables the model to more accurately understand the meaning of language, and thus be more effectively used for downstream tasks such as emotion classification or intention detection.
請參閱圖4,其說明本新型所提供之基於意圖分類與關鍵詞提取的回覆生成系統(100)於關鍵詞不足時所進行的反問機制,以獲取更多需要的關鍵詞來生成適當的回覆,其中該反問機制包括:該對話機器人模組(1)讀取一響應於該反問回覆之用戶回覆資訊;該意圖分類模組(2)讀取並分析該用戶資回覆訊以產生另一意圖分類結果,其包含另一意圖明確結果或另一意圖不明確結果;該關鍵詞提取模組(3)響應於該另一意圖明確結果以自該對話資訊提取另一關鍵詞組,其中,該關鍵詞提取模組(3)存取另一商家資訊用以比對該另一關鍵詞組以產生另一回覆指示,其中該另一回覆指示包括另一商家回覆指示或另一反問回覆指示;及該回覆生成模組(4)根據該另一回覆指示產生另一即時回覆,並通過該對話機器人模組(1)輸出該另一即時回覆,該另一即時回覆包括另一商家回覆或另一反問回覆,其中,該商家回覆單元(41)響應於該另一商家回覆指 示以產生該商家回覆,或該反問回覆單元(42)響應於該另一反問回覆指示以產生該反問回覆。 Please refer to Figure 4, which illustrates the reply generation system (100) based on intent classification and keyword extraction provided by the present invention and performs a counter-questioning mechanism when there are insufficient keywords to obtain more required keywords to generate appropriate replies. , wherein the rhetorical question mechanism includes: the conversation robot module (1) reads a user reply information in response to the rhetorical question reply; the intent classification module (2) reads and analyzes the user information reply information to generate another intention The classification result includes another clear-intent result or another unclear-intent result; the keyword extraction module (3) responds to the other clear-intention result to extract another keyword group from the dialogue information, wherein the key The word extraction module (3) accesses another merchant information to compare with another keyword group to generate another reply instruction, wherein the other reply instruction includes another merchant reply instruction or another rhetorical reply instruction; and the The reply generation module (4) generates another real-time reply according to the another reply instruction, and outputs the other real-time reply through the conversation robot module (1). The other real-time reply includes another merchant reply or another rhetorical question. Reply, wherein the merchant reply unit (41) responds to the other merchant reply instruction Indicates to generate the merchant reply, or the rhetorical question reply unit (42) responds to the other rhetorical reply instruction to generate the rhetorical reply.
在不同情境中,該回覆生成模組(4)可以基於所缺少的關鍵詞生成該反問回覆;在一些實施例中,該回覆生成模組(4)可以由該些反問回覆模板(52)中存取一第一反問回覆模板或一第二反問模板,由該反問回覆單元(42)直接輸出該第一反問回覆模板為反問回覆,或將該第二反問回覆模板與所缺少的關鍵詞生成反問回覆並輸出。 In different situations, the reply generation module (4) can generate the rhetorical question reply based on the missing keywords; in some embodiments, the reply generation module (4) can generate the rhetorical question reply from the rhetorical question reply templates (52) Access a first rhetorical question reply template or a second rhetorical question template, and the rhetorical question reply unit (42) directly outputs the first rhetorical question reply template as a rhetorical question reply, or generates the second rhetorical question reply template with the missing keywords Reply to the question and output.
請參閱圖4,其係一方塊流程圖用以說明本新型之工作原理;如圖4所示,該系統(100)初始化後,由該對話機器人模組(1)讀取用戶對話資訊後,由該意圖分類模組(2)讀取該對話資訊,並基於BERT模型分析該對話資訊之具體意圖,其所產生的意圖分類結果由該關鍵詞提取模組(3)讀取並判斷其意圖是否為商家問答;若其意圖判斷為商家問答,則該關鍵詞提取模組(3)響應於該意圖分類結果並基於BERT模型以自該對話資訊提取關鍵詞組,且該關鍵詞提取模組(3)由系統(100)外部如網際網路、或由系統(100)內部資料庫(5)存取對應的商家資訊,用以比對該關鍵詞組以產生回覆指示;若其意圖判斷為非商家問答,則該關鍵詞提取模組(3)響應於該意圖分類結果以產生預設回覆指示。 Please refer to Figure 4, which is a block flow chart to illustrate the working principle of the present invention; as shown in Figure 4, after the system (100) is initialized, after the dialogue robot module (1) reads the user dialogue information, The intention classification module (2) reads the dialogue information and analyzes the specific intention of the dialogue information based on the BERT model. The generated intention classification result is read by the keyword extraction module (3) and determines its intention. Whether it is a merchant Q&A; if the intention is judged to be a merchant Q&A, then the keyword extraction module (3) responds to the intent classification result and extracts keyword groups from the conversation information based on the BERT model, and the keyword extraction module (3) 3) Access the corresponding business information from outside the system (100), such as the Internet, or from the internal database (5) of the system (100), to compare the keyword group to generate a reply instruction; if the intention is determined to be non- If the merchant asks a question, the keyword extraction module (3) responds to the intent classification result to generate a preset reply instruction.
接著,若該回覆生成模組(4)讀取到預設回覆指示,則生成一預設回覆以嘗試由用戶端獲取更多資訊;若該關鍵詞組比對後判斷其內容可完整對應該商家資訊,則該回覆生成模組(4)根據該回覆指示產生商家回覆;若該關鍵詞組比對後判斷其內容不足以完整對應該商家資訊,為了由用戶端取得更多資訊,則該回覆生成模組(4)根據該回覆指示產生反問回覆,其中,該回覆生成模組(4)係基於T5對話生成模型而據以實現上述回覆內容的生成。 Then, if the reply generation module (4) reads the default reply instruction, it generates a default reply to try to obtain more information from the client; if the keyword phrase is compared and judged that its content can completely correspond to the merchant information, the reply generation module (4) generates a merchant reply according to the reply instruction; if the content of the keyword phrase is judged not to fully correspond to the merchant information after comparison, in order to obtain more information from the client, the reply is generated The module (4) generates a rhetorical reply according to the reply instruction, wherein the reply generation module (4) is based on the T5 dialogue generation model to realize the generation of the above reply content.
請繼續參閱圖4,若該系統(100)產生反問回覆,則進一步執行反問機制;用戶讀取了該系統(100)所生成之反問回覆後,進一步於對話介面(11)上輸入更多用戶回覆資訊;該對話機器人模組(1)讀取該用戶回覆資訊後,由該意圖分類模組(2)讀取並分析該用戶資回覆訊以產生另一意圖分類結果;此另一意圖分類結果由於內容以和先前的意圖分類結果不同,仍需由該關鍵詞提取模組(3)讀取以判斷其意圖是否仍為商家問答;若其意圖判斷仍為商家問答,則該關鍵詞提取模組(3)響應於該另一意圖分類結果以自該用戶回覆資訊中提取另一關鍵詞組;同樣地,該關鍵詞提取模組(3)存取對應的商家資訊用以比對該另一關鍵詞組以產生另一回覆指示;接著,若該另一關鍵詞組經比對後判斷其內容可完整對應該商家資訊,則該回覆生成模組(4)根據該另一回覆指示產生商家回覆;若該關鍵詞組經比對後判斷其內容仍然不足以完整對應該商家資訊,為了由用戶端進一步取得更多資訊,該回覆生成模組(4)根據該回覆指示產生另一反問回覆,並開啟新一輪的反問機制。 Please continue to refer to Figure 4. If the system (100) generates a rhetorical question reply, the rhetorical question mechanism is further executed; after the user reads the rhetorical question reply generated by the system (100), the user further enters more users on the dialogue interface (11). Reply information; after the conversation robot module (1) reads the user reply information, the intent classification module (2) reads and analyzes the user information reply information to generate another intent classification result; this other intent classification As a result, since the content is different from the previous intention classification result, it still needs to be read by the keyword extraction module (3) to determine whether the intention is still a merchant Q&A; if the intention is still judged to be a merchant Q&A, the keyword extraction The module (3) responds to the other intent classification result to extract another keyword group from the user's reply information; similarly, the keyword extraction module (3) accesses the corresponding merchant information to compare the other keyword group. A keyword group to generate another reply instruction; then, if the content of the other keyword group is compared and determined to completely correspond to the merchant information, the reply generation module (4) generates a merchant reply based on the other reply instruction. ; If the content of the keyword phrase is judged after comparison to still be insufficient to completely correspond to the merchant information, in order to further obtain more information from the user end, the reply generation module (4) generates another rhetorical reply according to the reply instruction, and Start a new round of rhetorical questions.
本新型結合了兩種語言模型以產生更準確且更人性化的回覆內容;本新型可偵測對話資訊中之意圖,並提取出關鍵詞以作為後續回覆生成之依據;本新型更可藉由與用戶間不斷的互動產生更貼近用戶意圖之回覆內容;透過搭配意圖分析與關鍵詞提取的方式,使得本新型可以在貼近其意圖的前提下,由關鍵詞擴展生成對應之回覆,不僅提高了回覆內容的準確度,更由於貼近用戶原先的意圖而使得回覆內容更顯人性化,使聊天機器人不再是冰冷的資訊提供機器,在資訊提供同時增添人性溫暖。 This new model combines two language models to generate more accurate and humane reply content; this new model can detect the intention in the conversation information and extract keywords as the basis for subsequent reply generation; this new model can also use Continuous interaction with users generates reply content that is closer to the user's intention; by combining intention analysis and keyword extraction, this new model can generate corresponding replies from keyword expansion on the premise of being close to the user's intention, which not only improves the The accuracy of the reply content and the closeness to the user's original intention make the reply content more humane, making the chatbot no longer a cold information-providing machine and adding human warmth while providing information.
100:基於意圖分類與關鍵詞提取的回覆生成系統 100: Reply generation system based on intent classification and keyword extraction
1:對話機器人模組 1: Conversation robot module
2:意圖分類模組 2: Intent classification module
3:關鍵詞提取模組 3: Keyword extraction module
4:回覆生成模組 4: Reply generation module
41:商家回覆單元 41: Merchant reply unit
42:反問回覆單元 42: Rhetorical question reply unit
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111214558U TWM645216U (en) | 2022-12-30 | 2022-12-30 | Reply Generation System Based on Intent Classification and Keyword Extraction |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111214558U TWM645216U (en) | 2022-12-30 | 2022-12-30 | Reply Generation System Based on Intent Classification and Keyword Extraction |
Publications (1)
Publication Number | Publication Date |
---|---|
TWM645216U true TWM645216U (en) | 2023-08-21 |
Family
ID=88560149
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW111214558U TWM645216U (en) | 2022-12-30 | 2022-12-30 | Reply Generation System Based on Intent Classification and Keyword Extraction |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWM645216U (en) |
-
2022
- 2022-12-30 TW TW111214558U patent/TWM645216U/en unknown
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107846350B (en) | Method, computer readable medium and system for context-aware network chat | |
US11769018B2 (en) | System and method for temporal attention behavioral analysis of multi-modal conversations in a question and answer system | |
WO2022095380A1 (en) | Ai-based virtual interaction model generation method and apparatus, computer device and storage medium | |
CN117521675A (en) | Information processing method, device, equipment and storage medium based on large language model | |
US20230394247A1 (en) | Human-machine collaborative conversation interaction system and method | |
Tarek et al. | Towards highly adaptive edu-chatbot | |
CN114372123A (en) | Interactive man-machine interaction customization and service system | |
CN111694940A (en) | User report generation method and terminal equipment | |
WO2024193596A1 (en) | Natural language understanding method and refrigerator | |
WO2024188277A1 (en) | Text semantic matching method and refrigeration device system | |
CN112669842A (en) | Man-machine conversation control method, device, computer equipment and storage medium | |
CN115221306A (en) | Automatic response evaluation method and device | |
Inupakutika et al. | Integration of NLP and Speech-to-text Applications with Chatbots | |
CN117829166A (en) | Intention recognition system and method suitable for telephone recording and chat recording | |
TWI751504B (en) | Dialogue system and method for human-machine cooperation | |
CN118114679A (en) | Service dialogue quality control method, system, electronic equipment and storage medium | |
TWM645216U (en) | Reply Generation System Based on Intent Classification and Keyword Extraction | |
CN115688758A (en) | Statement intention identification method and device and storage medium | |
CN114490974A (en) | Automatic information reply method, device, system, electronic equipment and readable medium | |
CN115408500A (en) | Question-answer consistency evaluation method and device, electronic equipment and medium | |
JP2012064073A (en) | Automatic conversation control system and automatic conversation control method | |
CN113836932A (en) | Interaction method, device and system, and intelligent device | |
IO et al. | COMMENTS ABOUT THE SIRI CHATBOT: A SENTIMENT ANALYSIS OF THE POSTINGS AT A MICROBLOGGING SITE. | |
TWM645251U (en) | System of interactive voice response service | |
George | AI CHAT BOT USING SHAN ALGORITHM |