A method, device and terminal equipment for processing human-computer dialogue
By extracting and distributing domain and intention information in the conversation, the target response robot is determined, which solves the problem of low efficiency of intelligent customer service and realizes efficient human-computer dialogue processing, which is suitable for complex needs of the securities industry.
Patent Information
- Application Number
- CN201911366348.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-26
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2039-12-26
AI Technical Summary
The existing intelligent customer service is inefficient in the securities industry and cannot effectively handle customers' stock market search, stock trading and problem consultation needs, high maintenance costs, and the general human-computer dialogue processing methods cannot be directly reused and cannot effectively connect to internal and external. system.
By obtaining the target text information of the current conversation, extracting the domain information and intention information, and determining the target response robot based on this information, distributing the intention information to the response robot of the corresponding domain and response method, improving the speed of information query and the efficiency of human-computer dialogue.
It improves the speed of information query and the efficiency of human-computer dialogue, reduces maintenance costs, supports hot plugging and seamless access to external systems, and is suitable for complex needs of the securities industry.
Smart Images

Figure CN112784020B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, and terminal device for processing human-computer dialogue. Background Art
[0002] With the continuous advancement of science and technology, smart devices have brought convenience to people's lives and work. In order to provide users with more convenient and efficient one-to-one services, more and more companies have introduced human-computer dialogue technology on the basis of manual customer service to adapt to business and service requirements.
[0003] At present, the most common customer demands in the securities industry are stock quote retrieval, stock trading, and problem consultation. Intelligent customer service often searches for answers based on customer language and from an overall knowledge base. This voice processing method is inefficient and provides a poor customer experience. Summary of the Invention
[0004] The embodiments of the present application provide a method, apparatus, and terminal device for processing human-computer dialogue, which can solve the problem of low dialogue processing efficiency.
[0005] In a first aspect, an embodiment of the present application provides a method for processing human-computer dialogue, including:
[0006] Obtain the target text information of the current conversation, including domain information and intent information;
[0007] Determine a target answering robot according to the intention information, the domain information, and the domain and answering method corresponding to the answering robot, and distribute the intention information to the target answering robot;
[0008] Obtain the response information fed back by the target response robot.
[0009] In a possible implementation of the first aspect, before obtaining target text information of the current conversation and the domain information and intent information included in the target text information, the method further includes:
[0010] Acquire target text information and historical conversation information of the current conversation, wherein the historical conversation information is conversation information within a preset time period before the current conversation;
[0011] According to the target text information and the historical conversation information, domain information of the target text information and intention information of the target text information are obtained.
[0012] In a possible implementation of the first aspect, obtaining, based on the target text information and the historical conversation information, the domain information of the target text information and the intent information of the target text information includes:
[0013] Extracting first domain keywords and deep semantic information from the target text information, first intent keywords from the target text information, second domain keywords and deep semantic information from the historical conversation information, and second intent keywords from the historical conversation information;
[0014] Determining the domain information of the target text information according to the first domain keyword and deep semantic information and the second domain keyword and deep semantic information;
[0015] Determine the intent information of the target text information according to the first intent keyword and the second intent keyword.
[0016] In a possible implementation of the first aspect, determining the domain information of the target text information based on the first domain keyword and deep semantic information and the second domain keyword and deep semantic information includes:
[0017] If the first domain keyword and the deep semantic information are not extracted, the second domain keyword and the deep semantic information are used as the domain information of the target text information.
[0018] In a possible implementation of the first aspect, determining the intent information of the target text information according to the first intent keyword and the second intent keyword includes:
[0019] When the first intent keyword is extracted and the intent information cannot be determined based on the first intent keyword, obtaining a target keyword from the second intent keyword; wherein the target keyword is a keyword that does not exist in the first intent keyword and can represent the intent information;
[0020] Based on the target keyword and the first intention keyword, intention information of the target text information is determined.
[0021] In a possible implementation of the first aspect, determining a target answering robot based on the intention information, the domain information, and the domain and answering method corresponding to the answering robot, and distributing the intention information to the target answering robot includes:
[0022] Determining a first answering robot corresponding to the domain information according to the domain information and the domain corresponding to the answering robot;
[0023] According to the intention information and the response method of the response robot, the target response robot is determined in the first response robot, and the intention information is distributed to the target response robot.
[0024] In a possible implementation of the first aspect, the response mode of the response robot includes a first response mode, a second response mode, and a third response mode; the first response mode is a mode in which the response robot generates response information based on intent information and knowledge base information, the second response mode is a mode in which the response robot generates response information based on intent information and graph data information, and the third response mode is a mode in which the response robot generates response information based on intent information and a slot-filling task dialogue;
[0025] The step of determining the target answering robot among the first answering robots according to the intention information and the answering mode of the answering robot includes:
[0026] If the keyword in the intention information can represent the user's intention and the data to be queried is not relevant, determining the first answering robot corresponding to the first answering method as the target answering robot;
[0027] If the data to be queried in the intention information is relevant, determining the first answering robot corresponding to the second answering method as the target answering robot;
[0028] When the semantic information in the intention information is associated with the task intention supported by the answering robot, the first answering robot corresponding to the third answering method is determined to be the target answering robot.
[0029] In a second aspect, an embodiment of the present application provides a device for processing human-computer dialogue, including:
[0030] An information acquisition module is used to acquire the target text information of the current conversation, including domain information and intent information;
[0031] An information distribution module, configured to determine a target answering robot based on the intention information, the domain information, and the domain and answering mode corresponding to the answering robot, and distribute the intention information to the target answering robot;
[0032] The response information acquisition module is used to obtain the response information fed back by the target response robot.
[0033] In a third aspect, an embodiment of the present application provides a terminal device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for processing human-computer dialogue described in any one of the first aspects above when executing the computer program.
[0034] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and is characterized in that when the computer program is executed by a processor, it implements the human-computer dialogue processing method described in any one of the first aspects above.
[0035] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the method for processing human-computer dialogue described in any one of the above-mentioned first aspects.
[0036] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0037] The beneficial effects of the embodiments of the present application compared with the prior art are as follows: the answering robot of the present application is set according to the field and the answering method. When querying questions raised by users, it can be distributed to the answering robot in the corresponding field according to the field of the query information to conduct queries in that field. At the same time, the intention information is distributed to the answering robot in the corresponding field and the corresponding answering method according to the type of question raised by the user and the information of the question. Compared with the prior art method of querying on the answering robot covering all fields according to the user query information, the method of the present application improves the speed of information query and the efficiency of human-computer dialogue. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0039] Figure 1 This is a schematic diagram of an application scenario of a method for processing human-computer dialogue provided in an embodiment of the present application;
[0040] Figure 2 This is a flowchart of a method for processing human-computer dialogue provided by an embodiment of the present application;
[0041] Figure 3 1 is a flow chart of a method for selecting a target response robot provided in one embodiment of the present application;
[0042] Figure 4 This is a schematic diagram of the graph data of a bank provided in one embodiment of the present application;
[0043] Figure 5 This is a schematic diagram of a slot-filling table provided in one embodiment of the present application;
[0044] Figure 6 This is a flowchart of a method for obtaining domain information and intent information provided in one embodiment of the present application;
[0045] Figure 7 This is a flowchart of a method for obtaining specific domain information and intent information provided in one embodiment of the present application;
[0046] Figure 8 This is a flowchart of a method for determining specific domain information provided in one embodiment of the present application;
[0047] Figure 9 This is a flowchart of a method for determining specific intent information provided in one embodiment of the present application;
[0048] Figure 10 This is a schematic diagram of the structure of a device for processing human-computer dialogue provided by an embodiment of the present application;
[0049] Figure 11 This is a schematic diagram of the structure of a terminal device provided in one embodiment of the present application;
[0050] Figure 12 It is a block diagram of a partial structure of a computer provided in one embodiment of the present application. DETAILED DESCRIPTION
[0051] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0052] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0053] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0054] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0055] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0056] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0057] Currently, more and more users are using mobile client apps (mobile applications) to query questions. For example, in the securities industry, apps are used to search for stock quotes, buy and sell stocks, inquire about stock issues, and inquire about bond issues. Due to the increasing number of inquiries, existing intelligent customer service systems mostly use a knowledge base-based question template matching method, which has high maintenance costs and limited functionality. In addition, some intelligent assistants use general human-computer dialogue processing methods to stack various functions in the form of knowledge bases. When task-based dialogues occur, a task intent detection module is pre-installed. As the number of knowledge categories increases, knowledge overlap increases, resulting in a large increase in question matching costs and the inability of simple task detection modules to effectively handle knowledge questions and answers during the task.
[0058] Intelligent assistant products for the securities industry focus on checking stock quotes, but also need to include features like problem-solving and stock trading. General-purpose human-computer interaction processing methods, which focus on problem-solving, cannot be directly applied to the securities industry. Furthermore, some systems in the securities industry rely on external systems, and general-purpose, comprehensive human-computer interaction processing methods require integrating all involved modules, making it difficult to effectively connect internal and external systems, or new and existing systems. Existing independent online customer service systems cannot be directly integrated into intelligent assistants based on general-purpose human-computer interaction processing methods.
[0059] Figure 1 This is a schematic diagram of an application scenario for the method for processing human-computer dialogue provided in an embodiment of the present application. The method can be used to process and answer questions raised by users. The terminal device 20 receives voice information from the user 10, processes the voice information, and distributes it to the corresponding answering robot. Finally, the answer information generated by the answering robot is fed back to the user 10.
[0060] The following combination Figure 1 The defect detection method of the embodiment of the present application is described in detail.
[0061] Figure 2 A schematic flow chart of the method for processing human-computer dialogue provided by this application is shown, with reference to Figure 2 The processing method is described in detail as follows:
[0062] S101, obtaining target text information of the current conversation, wherein the target text information includes domain information and intention information.
[0063] In this example, the current conversation refers to the chat between the user and the computer at the current moment. If the user uses natural language, the computer must first convert the user's natural language into text before performing searches and other operations based on the text. Domain information refers to the specific domain within which the user's query falls. For example, the securities industry encompasses stocks, bonds, and funds. Intent information refers to the specific content the user wants to express or obtain.
[0064] For example, the current message sent by the user is "query the market price of stock A this month", the domain information is "stock", and the intent information is "the market price of stock A this month".
[0065] S102, determining a target answering robot according to the intention information, the field information, and the field and answering method corresponding to the answering robot, and distributing the intention information to the target answering robot.
[0066] In this embodiment, the answering robot can be divided into multiple answering robots based on the domain and answering method, supporting jumping in and out of questions with multiple answer ranges and types, making data query more convenient and efficient. This application divides the answering robots by domain and answering method, and subdivides the data and data types stored in the answering robots. When querying data, the required information can be quickly and accurately determined, improving the speed of human-computer dialogue.
[0067] like Figure 3 As shown, in a possible implementation, the implementation process of step S102 may include:
[0068] S201, determining a first answering robot corresponding to the domain information based on the domain information and the domain corresponding to the answering robot;
[0069] S202: Determine the target answering robot among the first answering robots according to the intention information and the answering method of the answering robot, and distribute the intention information to the target answering robot.
[0070] Optionally, the answering robot's answering methods include a first answering method, a second answering method and a third answering method; the first answering method is a method in which the answering robot generates answering information based on intention information and knowledge base information, the second answering method is a method in which the answering robot generates answering information based on intention information and graph data information, and the third answering method is a method in which the answering robot generates answering information based on intention information and slot-filling task dialogue.
[0071] In a possible implementation, the implementation process of step S202 may include:
[0072] If the keyword in the intention information can represent the user's intention and the data to be queried is not relevant, determining the first answering robot corresponding to the first answering method as the target answering robot;
[0073] If the data to be queried in the intention information is relevant, determining the first answering robot corresponding to the second answering method as the target answering robot;
[0074] In the case that the keywords in the intention information cannot represent the user's intention, the first answering robot corresponding to the third answering method is determined to be the target answering robot.
[0075] Among them, knowledge base information refers to knowledge information stored in the form of question templates. When the semantic information in the intent information can represent the user's intention and there is no correlation between the data to be queried and the keywords in the intent information, deep semantic matching can be used to find questions matching the intent information in the knowledge base, and then obtain the answer information corresponding to the question.
[0076] Graph data information refers to a network established through the connection between information. When the information a user wants to obtain is related to the keywords in the intent information, the user can obtain the desired information from the data in the graph by querying the graph.
[0077] Slot-filling task dialogue refers to the process of completing information to translate user intent into explicit instructions. For example, a table can be pre-set in the response robot. When a user sends an intent message, the robot extracts and identifies keywords from the intent message and fills them into the corresponding table. If the intent message does not fully fill the table or a required table is empty, the response robot will send the required information to the user for completion.
[0078] In this embodiment, the answering robots are set according to the fields and answering methods. One answering robot corresponds to one field, and information of different fields is set in different answering robots. When it is necessary to query the information in this field, it is only necessary to query in the answering robot of the corresponding field, and there is no need to query in an answering robot that is set with information of all fields, which improves the speed of the query; one answering method can be set in an answering robot of a field, or two or more answering methods can be set. Selecting robots with different answering methods to answer according to the intention information can improve the speed of the answer. This application determines the answering robot by field and intention, can accurately locate the corresponding answering robot, and distribute the intention information to the corresponding answering robot.
[0079] In specific applications, you can first determine the response robot in the corresponding field based on the field of the information that needs to be queried. Since the response robots in the same field may have different response methods, you need to further determine the response method through intention information and select the response robot in this field based on the response method.
[0080] For example, the first answering robot's field is stocks, and its answering method is knowledge base information; the second answering robot's field is stocks, and its answering method is both knowledge base information and graph data information; the third answering robot's field is bonds, and its answering method is slot-filling task dialogue.
[0081] For example, if the user's current conversation is "What are stocks", the determined domain information is "stocks", and the intent information is "What are stocks", the intent information can represent the user's intention, and the data to be queried represented in the intent information has no correlation with the keywords in the intent information. Then, based on the domain information "stocks", all answering robots about stocks can be determined as the first answering robot, and the intent information "What are stocks" can be found in the knowledge base information through semantic matching by querying the knowledge base information.
[0082] like Figure 4The graph data of a bank is shown. If the user's current conversation is "the legal person name of Bank A", the determined field information is "bank", and the intent information is "the legal person name of Bank A". Because there is a connection between the bank, legal person and legal person name, the legal person name corresponding to Bank A can be queried through the graph data information query method.
[0083] like Figure 5 The figure shows a slot-filling form corresponding to a stock query. If the user's current dialogue is "buy and sell stocks, stock name A", the determined field information is "stocks", and the intent information is "buy and sell stocks". Usually, buying and selling stocks requires obtaining the "stock name", "buying price" and "buying quantity" to respond correctly. There is only the stock name in the current dialogue, so you can choose the slot-filling dialogue response method. According to the form set up for the slot-filling dialogue, fill in the stock name A in the name table. The price and quantity in the table cannot be obtained, so it is necessary to return the query information "What is the buying price" and "What is the buying quantity" to the user. The user answers the returned query information to supplement the content in the table.
[0084] It should be noted that the problem distribution mechanism supports hot plugging (robot routing), and various external systems can be seamlessly connected in the form of answering robots, and switching between new and old systems can also be seamlessly connected.
[0085] S103, obtaining the response information fed back by the response robot.
[0086] In this embodiment, the response information is the information that the user needs to obtain as a result of the response robot's query.
[0087] like Figure 6 As shown, in a possible implementation, before step S101, the following steps may also be included:
[0088] S1101: Acquire target text information and historical conversation information of a current conversation, wherein the historical conversation information is conversation information within a preset time period before the current conversation.
[0089] In this embodiment, historical conversation information refers to conversation information within a preset time period before the current conversation information in this conversation information, where the preset time period can be conversation information within 30 minutes before the current moment, or conversation information within 10 minutes before the current moment. Of course, the preset time period can be set as needed.
[0090] S1102: Obtain domain information of the target text information and intention information of the target text information according to the target text information and the historical conversation information.
[0091] In this embodiment, because the target text may contain incomplete information, it is necessary to combine the information above to determine the intended meaning of the current conversation. Combining historical conversation information can clearly determine the intended meaning of the current conversation. Furthermore, combining historical conversation information to determine intent and domain information strengthens the understanding of the multi-round process of task-based questions and supports jumping in and out of task-based questions, rather than simply single-round question recognition.
[0092] like Figure 7 As shown, in a possible implementation, the implementation process of step S1102 may include:
[0093] S1021, extracting the first domain keywords and deep semantic information in the target text information, the first intention keywords in the target text information, the second domain keywords and deep semantic information in the historical conversation information, and the second intention keywords in the historical conversation information.
[0094] S1022: Determine the domain information of the target text information according to the first domain keyword and deep semantic information and the second domain keyword and deep semantic information.
[0095] like Figure 8 As shown, in a possible implementation, step S1022 may specifically include:
[0096] S10221 : If the first domain keyword and deep semantic information are not extracted, use the second domain keyword and deep semantic information as the domain information of the target text information.
[0097] In a possible implementation, step S1022 may specifically include:
[0098] When the first domain keyword and the deep semantic information are extracted, the first domain keyword and the deep semantic information are used as the domain information of the target text information.
[0099] In this embodiment, if the first domain keywords and deep semantic information can be extracted from the target text information, the domain information can be determined directly through the target text information without the need to combine the historical conversation information to determine the domain information; if the first domain keywords and deep semantic information are not extracted from the target text information, the domain information needs to be determined in combination with the historical conversation information.
[0100] It should be noted that if the first domain keywords and deep semantic information are not extracted from the target text information, and the second domain keywords and deep semantic information cannot be extracted from the historical conversation information, or there is no historical conversation information within the preset time period, it is necessary to send a query message to the user to complete the information and then re-determine the domain information.
[0101] For example, if the content of the current conversation is "B's trend" and the historical conversation information is "Stock A's trend", then the information in the target text information is "B's trend". The first domain keyword and deep semantic information cannot be extracted from the target text information, and it is necessary to combine the historical conversation to determine the domain information. The second domain keyword and deep semantic information in the historical conversation information is "stock", then the domain information in the target text information is "stock".
[0102] If the content of the current conversation is "the trend of stock B", and the first domain keyword and deep semantic information extracted from the target text information is "stock", then the domain information in the target text information is "stock".
[0103] S1023: Determine the intent information of the target text information according to the first intent keyword and the second intent keyword.
[0104] like Figure 9 As shown, in a possible implementation, step S1023 may specifically include:
[0105] S10231: When the first intent keyword is extracted and the intent information cannot be determined based on the first intent keyword, obtain a target keyword from the second intent keyword; wherein the target keyword is a keyword that does not exist in the first intent keyword and can represent the intent information;
[0106] S10232: Determine the intent information of the target text information based on the target keyword and the first intent keyword.
[0107] Specifically, based on the target keyword and the first intention keyword, the intention information of the target text information is determined by combining the target keyword and the first intention keyword to obtain the intention information.
[0108] In this embodiment, if the first intent keyword cannot clearly indicate what the user wants to express, it is necessary to combine the second intent keyword in the historical conversation information to jointly determine the intent information of the target text information. The intent information of the target text information can be accurately obtained through the historical conversation information, making information query more accurate and efficient.
[0109] For example, if the content of the current conversation is "What about stock B?" and the historical conversation information is "The trend of stock A", then the first intention keyword in the target text information is "stock B". The first intention keyword extracted from the target text information cannot clearly indicate the user's intention, and it is necessary to combine the historical conversation to determine the intention information. The second intention keyword in the historical conversation information is "stock A, trend", and the target keyword in the historical conversation information is "trend", then the intention information in the target text information is "stock B, trend".
[0110] In a possible implementation, step S1023 may specifically include:
[0111] When the first intention keyword is extracted and the first intention keyword can clearly represent the user's intention, the intention information of the target text information is determined through the first intention keyword.
[0112] In this embodiment, if the first intention keyword can clearly indicate what the user wants to express, the user's intention information can be directly determined through the first intention keyword.
[0113] For example, if the content of the current conversation is "What is the trend of stock B?", the first intention keyword in the target text information is "stock B, trend". The first intention keyword can clearly indicate the user's intention, so there is no need to combine historical conversation information to directly determine the intention information of the target text information. The intention information of the target text information is "stock B, trend".
[0114] It should be noted that if the first intent information extracted from the target text information cannot clearly represent the user's intention, and there is no historical conversation information within the preset time period or the second intent information is not extracted in the historical conversation information, a query message will be sent to the user to allow the user to complete the information and then re-determine the intent information.
[0115] In a possible implementation, before step S101, the method may include:
[0116] Get the voice information of the current conversation;
[0117] Recognizing the voice information to obtain initial text information;
[0118] The initial text information is cleaned based on a preset vocabulary to obtain the target text information.
[0119] In this embodiment, users can send either natural language voice messages or text messages. When sending natural language voice messages, they must first be converted into text messages before they can be recognized. Text message cleaning involves deleting invalid characters, words, or phrases in the text message, making the content more concise and accurate.
[0120] In a possible implementation, after step S103, the method may include:
[0121] The response information is converted into natural language, and the natural language is synthesized into response language information and sent to the user.
[0122] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0123] Corresponding to the processing method of human-computer dialogue described in the above embodiment, Figure 10 A structural block diagram of a human-computer dialogue processing device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0124] Reference Figure 10 , the apparatus 100 comprises: an information acquisition module 110, an information distribution module 120 and a response information acquisition module 130;
[0125] The information acquisition module 110 is used to acquire the target text information of the current conversation, and the target text information includes domain information and intention information;
[0126] An information distribution module 120 is configured to determine a target answering robot based on the intention information, the domain information, and the domain and answering mode corresponding to the answering robot, and distribute the intention information to the target answering robot;
[0127] The response information acquisition module 130 is used to obtain the response information fed back by the target response robot.
[0128] In a possible implementation, the information acquisition module 110 is further connected to:
[0129] An initial information acquisition module, configured to acquire target text information and historical conversation information of the current conversation, wherein the historical conversation information is conversation information within a preset time period before the current conversation;
[0130] The information extraction module is used to obtain the domain information of the target text information and the intention information of the target text information according to the target text information and the historical conversation information.
[0131] In one possible implementation, the information extraction module may be specifically used to:
[0132] an information extraction unit, configured to extract first domain keywords and deep semantic information from the target text information, first intent keywords from the target text information, second domain keywords and deep semantic information from the historical conversation information, and second intent keywords from the historical conversation information;
[0133] a domain determining unit, configured to determine domain information of the target text information based on the first domain keyword and deep semantic information and the second domain keyword and deep semantic information;
[0134] An intention determination unit is used to determine the intention information of the target text information based on the first intention keyword and the second intention keyword.
[0135] In a possible implementation, the domain determination unit may be specifically configured to:
[0136] If the first domain keyword and the deep semantic information are not extracted, the second domain keyword and the deep semantic information are used as the domain information of the target text information.
[0137] In one possible implementation, the intention determination unit may be specifically configured to:
[0138] When the first intent keyword is extracted and the intent information cannot be determined based on the first intent keyword, obtaining a target keyword from the second intent keyword; wherein the target keyword is a keyword that does not exist in the first intent keyword and can represent the intent information;
[0139] Based on the target keyword and the first intention keyword, intention information of the target text information is determined.
[0140] In a possible implementation, the information distribution module 120 may be specifically configured to:
[0141] an information confirmation unit, configured to determine a first answering robot corresponding to the field information based on the field information and the field corresponding to the answering robot;
[0142] A target selection unit is used to determine the target answering robot among the first answering robots based on the intention information and the answering method of the answering robot, and distribute the intention information to the target answering robot.
[0143] In one possible implementation, the answering robot's answering method includes a first answering method, a second answering method, and a third answering method; the first answering method is a method in which the answering robot generates answering information based on intention information and knowledge base information, the second answering method is a method in which the answering robot generates answering information based on intention information and graph data information, and the third answering method is a method in which the answering robot generates answering information based on intention information and slot-filling task dialogue.
[0144] In a possible implementation, the target selection unit may be specifically configured to:
[0145] If the keyword in the intent information can represent the user's intent and there is no correlation between the data to be queried and the keyword in the intent information, determining the first answering robot corresponding to the first answering method as the target answering robot;
[0146] When the data to be queried in the intention information is associated with the keyword in the intention information, determining the first answering robot corresponding to the second answering method as the target answering robot;
[0147] In the case that the keywords in the intention information cannot represent the user's intention, the first answering robot corresponding to the third answering method is determined to be the target answering robot.
[0148] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0149] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0150] The present application also provides a terminal device. Figure 11The terminal device 400 may include: at least one processor 410, a memory 420, and a computer program stored in the memory 420 and executable on the at least one processor 410. When the processor 410 executes the computer program, the steps in any of the above-mentioned method embodiments are implemented, for example Figure 2 Alternatively, when the processor 410 executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are realized, for example, Figure 10 The functions of the modules 110 to 130 are shown.
[0151] For example, the computer program may be divided into one or more modules / units, one or more modules / units being stored in the memory 420 and executed by the processor 410 to complete the present application. The one or more modules / units may be a series of computer program segments capable of completing specific functions, and the program segments are used to describe the execution process of the computer program in the terminal device 400.
[0152] Those skilled in the art will understand that Figure 11 These are merely examples of terminal devices and do not constitute a limitation on the terminal devices. The terminal devices may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as input and output devices, network access devices, buses, etc.
[0153] The processor 410 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0154] The memory 420 may be an internal storage unit of the terminal device or an external storage device of the terminal device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. The memory 420 is used to store the computer program and other programs and data required by the terminal device. The memory 420 may also be used to temporarily store data that has been output or is about to be output.
[0155] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be classified into address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0156] The method for processing human-computer dialogue provided in the embodiment of the present application can be applied to terminal devices such as computers, tablet computers, laptops, netbooks, personal digital assistants (PDAs), etc. The embodiment of the present application does not impose any restrictions on the specific type of terminal devices.
[0157] Take the terminal device as a computer as an example. Figure 12 The block diagram shows a partial structure of a computer provided by an embodiment of the present application. Figure 12 The computer includes components such as a communication circuit 510, a memory 520, an input unit 530, a display unit 540, an audio circuit 550, a wireless fidelity (WiFi) module 560, a processor 570, and a power supply 580.
[0158] The following combination Figure 12 A detailed introduction to the various components of a computer:
[0159] The communication circuit 510 can be used to receive and send signals during information transmission or calls. In particular, it receives image samples sent by the image acquisition device and sends them to the processor 570 for processing. In addition, it sends image acquisition instructions to the image acquisition device. Generally, the communication circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the communication circuit 510 can also communicate with the network and other devices via wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0160] The memory 520 can be used to store software programs and modules. The processor 570 executes the various computer functions and applications and processes data by running the software programs and modules stored in the memory 520. The memory 520 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created based on the use of the computer (such as audio data, a phone book, etc.). In addition, the memory 520 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state memory device.
[0161] The input unit 530 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the computer. Specifically, the input unit 530 may include a touch panel 531 and other input devices 532. The touch panel 531, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus, etc. on or near the touch panel 531) and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 531 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction and detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 570. It can also receive commands sent by the processor 570 and execute them. In addition, the touch panel 531 can be implemented using various types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch panel 531, the input unit 530 may further include other input devices 532. Specifically, the other input devices 532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick.
[0162] The display unit 540 can be used to display information input by the user or information provided to the user and various menus of the computer. The display unit 540 may include a display panel 541. Optionally, the display panel 541 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 531 may cover the display panel 541. When the touch panel 531 detects a touch operation on or near it, it is transmitted to the processor 570 to determine the type of touch event. Subsequently, the processor 570 provides corresponding visual output on the display panel 541 according to the type of touch event. Although in Figure 12 In the embodiment, the touch panel 531 and the display panel 541 are used as two independent components to implement the input and output functions of the computer, but in some embodiments, the touch panel 531 and the display panel 541 can be integrated to implement the input and output functions of the computer.
[0163] Audio circuit 550 provides an audio interface between the user and the computer. Audio circuit 550 converts received audio data into electrical signals, which are then transmitted to the speaker, where they are converted into sound signals for output. Meanwhile, the microphone converts collected sound signals into electrical signals, which are received by audio circuit 550 and converted into audio data. The audio data is then processed by processor 570 and transmitted via communication circuit 510 to, for example, another computer, or stored in memory 520 for further processing.
[0164] WiFi is a short-range wireless transmission technology. Computers can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 560. It provides users with wireless broadband Internet access. Figure 12 A WiFi module 560 is shown, but it is understandable that it is not an essential component of the computer and can be omitted as needed without changing the essence of the invention.
[0165] Processor 570 is the computer's control center, connecting all computer components using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 520 and accessing data stored in memory 520, it performs various computer functions and processes data, thereby providing overall computer monitoring. Optionally, processor 570 may include one or more processing units. Preferably, processor 570 integrates an application processor and a modem processor, with the application processor primarily processing the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 570.
[0166] The computer also includes a power supply 580 (such as a battery) for supplying power to various components. Preferably, the power supply 580 can be logically connected to the processor 570 through a power management system, thereby managing charging, discharging, and power consumption through the power management system.
[0167] An embodiment of the present application further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the steps in each embodiment of the processing method for realizing the above-mentioned human-computer dialogue are implemented.
[0168] An embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal, the mobile terminal implements the steps in each embodiment of the processing method for realizing the above-mentioned human-computer dialogue when executing the computer program product.
[0169] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process of the above-mentioned method embodiment by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can at least include: any entity or device capable of carrying computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, mobile hard drive, magnetic disk, or optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals or telecommunication signals.
[0170] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0171] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0172] In the embodiments provided in this application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0173] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0174] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for processing human-computer dialogue, characterized in that: include: Obtaining target text information of the current conversation, wherein the target text information includes domain information and intent information; Determine a target answering robot according to the intention information, the field information, and the field and answering method corresponding to the answering robot, and distribute the intention information to the target answering robot; Obtaining response information fed back by the target response robot; The answering mode of the answering robot includes a first answering mode, a second answering mode and a third answering mode; The first response mode is a mode in which the response robot generates response information based on the intention information and the knowledge base information, the second response mode is a mode in which the response robot generates response information based on the intention information and the graph data information, and the third response mode is a mode in which the response robot generates response information based on the intention information and the slot-filling task dialogue; The step of determining the target answering robot in the first answering robot according to the intention information and the answering mode of the answering robot comprises: When the keywords in the intention information can represent the user's intention and the data to be queried has no correlation with the keywords in the intention information, determining the first answering robot corresponding to the first answering method as the target answering robot; In a case where the data to be queried in the intention information is associated with the keyword in the intention information, determining the first answering robot corresponding to the second answering method as the target answering robot; When the semantic information in the intention information is related to the task intention supported by the answering robot, the first answering robot corresponding to the third answering method is determined to be the target answering robot.
2. The method for processing human-computer dialogue according to claim 1, characterized in that: Before obtaining the target text information of the current conversation, the domain information and the intention information included in the target text information, the method further includes: Acquire target text information and historical conversation information of the current conversation, wherein the historical conversation information is conversation information within a preset time period before the current conversation; According to the target text information and the historical conversation information, domain information of the target text information and intention information of the target text information are obtained.
3. The method for processing human-computer dialogue according to claim 2, characterized in that: The step of obtaining the domain information of the target text information and the intention information of the target text information according to the target text information and the historical conversation information includes: Extracting the first domain keyword and deep semantic information in the target text information, the first intention keyword in the target text information, the second domain keyword and deep semantic information in the historical conversation information, and the second intention keyword in the historical conversation information; Determining the domain information of the target text information according to the first domain keyword and deep semantic information and the second domain keyword and deep semantic information; Intent information of the target text information is determined according to the first intent keyword and the second intent keyword.
4. The method for processing human-computer dialogue according to claim 3, characterized in that: The determining the domain information of the target text information according to the first domain keyword and the deep semantic information and the second domain keyword and the deep semantic information includes: When the first domain keyword and the deep semantic information are not extracted, the second domain keyword and the deep semantic information are used as the domain information of the target text information.
5. The method for processing human-computer dialogue according to claim 3, characterized in that: The determining, according to the first intention keyword and the second intention keyword, the intention information of the target text information includes: When the first intent keyword is extracted and the intent information cannot be determined according to the first intent keyword, a target keyword in the second intent keyword is obtained; wherein the target keyword is a keyword that does not exist in the first intent keyword and can represent the intent information; Based on the target keyword and the first intention keyword, intention information of the target text information is determined.
6. The method for processing human-computer dialogue according to any one of claims 1 to 5, characterized in that: The step of determining a target answering robot according to the intention information, the field information, and the field and answering method corresponding to the answering robot, and distributing the intention information to the target answering robot includes: Determining a first answering robot corresponding to the field information according to the field information and the field corresponding to the answering robot; According to the intention information and the response method of the response robot, the target response robot is determined in the first response robot, and the intention information is distributed to the target response robot.
7. A processing device for human-computer dialogue, characterized in that: include: An information acquisition module is used to acquire target text information of the current conversation, wherein the target text information includes domain information and intention information; An information distribution module, used for determining a target answering robot according to the intention information, the field information, and the field and answering mode corresponding to the answering robot, and distributing the intention information to the target answering robot; The response information acquisition module is used to obtain the response information fed back by the target response robot.
8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for processing human-computer dialogue according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for processing human-computer dialogue according to any one of claims 1 to 6 is implemented.
