Instruction intention recognition method and device, equipment, medium and program product
By acquiring the intent association between the command to be recognized and the multi-turn dialogue statements in the voice dialogue system, and generating intent verification commands for reverse verification, the accuracy problem of command intent recognition in the open domain is solved, and the applicability and user satisfaction of multi-turn conversations are improved.
Patent Information
- Application Number
- CN202411334108.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-10
AI Technical Summary
Existing voice dialogue systems struggle to accurately identify users' multi-turn dialogue command intentions in open domains, resulting in unmet user needs.
By acquiring the intent association between the instruction to be recognized and the multi-turn dialogue statements, an intent verification instruction is generated for reverse verification, thereby improving the accuracy of the instruction intent.
It improves the accuracy of command recognition in open domain multi-turn sessions, enhances the applicability to user multi-turn task session scenarios, and meets the increasingly diverse usage needs of users.
Smart Images

Figure CN119292462A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of human-computer interaction technology, and in particular to a command intention recognition method, device, equipment, medium and program product. Background Art
[0002] With the development of artificial intelligence technology, voice dialogue systems have gradually been applied to various fields of production and life, such as vehicle voice control, business conversation mining and smart home. The models used in current voice dialogue systems are often trained for certain vertical domains. The dialogue systems corresponding to such models have relatively fixed logic settings during the dialogue process. For example, when a dialogue system using such a model conducts a navigation task dialogue, it basically follows a fixed logic to ask the user where to navigate to, which route to choose, etc.
[0003] As the use scenarios and usage requirements of voice dialogue systems become increasingly diverse, voice dialogue systems for open domains have gradually become the mainstream of applications. For the same navigation task dialogue as above, the dialogue logic needs to support more statements, such as asking for an introduction to the attractions along the way, and conducting a more in-depth search for attractions of interest.
[0004] However, after the introduction of richer dialogue logic, the voice dialogue system faces a difficult problem when performing natural language processing. It needs to accurately identify the intent of each user input command to know what the user's current command requires. For voice dialogue systems in vertical domains, since the dialogue logic is fixed and the statements are relatively fixed, the recognition of command intent can be easily completed according to rules or templates; however, for voice dialogue systems in open domains, since their characteristic is to have as unlimited and casual dialogue as possible, many commands with ambiguous meanings and non-intuitive intentions may be generated, which increases the difficulty of intent recognition. If the recognition is inaccurate, it will cause problems directly in the voice dialogue system, making it difficult to meet the increasingly rich usage needs of users. Summary of the invention
[0005] The present invention provides a method, apparatus, device, medium and program product for identifying command intent. When performing command intent identification, the correlation between multi-round dialogue information features is fully considered, and the accuracy of the determined command intent is improved through reverse verification, thereby reducing the number of times the command intent is unclearly identified due to ambiguous command meaning and non-intuitive intent, improving the accuracy of command identification in open domain multi-round conversations, and improving the applicability to multi-round task conversation scenarios, thereby better meeting the increasingly diverse usage needs of users.
[0006] In a first aspect, an embodiment of the present invention provides a method for identifying instruction intent, comprising:
[0007] Obtain the command to be recognized and at least two groups of historical dialogue sentences;
[0008] Determine at least one intent to be matched corresponding to the instruction to be recognized according to the intention association relationship between the instruction to be recognized and each historical dialogue sentence;
[0009] According to each intention to be matched and the instruction to be recognized, respectively generate an intention verification instruction corresponding to each intention to be matched;
[0010] Each intention verification instruction is compared with the instruction to be identified for similarity, and the instruction intent of the instruction to be identified is determined based on the obtained similarity comparison results.
[0011] In a second aspect, an embodiment of the present invention further provides a device for identifying instruction intention, comprising:
[0012] An instruction statement acquisition module is used to acquire instructions to be recognized and at least two groups of historical dialogue statements;
[0013] A module for determining an intention to be matched, used to determine at least one intention to be matched corresponding to the instruction to be identified based on the intention association relationship between the instruction to be identified and each historical dialogue sentence;
[0014] A verification instruction generation module, used to generate an intent verification instruction corresponding to each intent to be matched according to each intent to be matched and the instruction to be identified;
[0015] The instruction intention determination module is used to perform similarity comparison between each intention verification instruction and the instruction to be identified, and determine the instruction intention of the instruction to be identified based on the obtained similarity comparison results.
[0016] In a third aspect, an embodiment of the present invention further provides a device for recognizing instruction intentions, including:
[0017] at least one processor; and
[0018] a memory communicatively connected to at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the instruction intent recognition method of any embodiment of the present invention.
[0020] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the instruction intent recognition method of any embodiment of the present invention.
[0021] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which implements the instruction intent recognition method of any embodiment of the present invention when executed by a processor.
[0022] The embodiments of the present invention provide a method, device, equipment, medium and program product for identifying the intention of an instruction, which obtains an instruction to be identified and at least two groups of historical conversation sentences; determines at least one intention to be matched corresponding to the instruction to be identified based on the intention association relationship between the instruction to be identified and each historical conversation sentence; generates intention verification instructions corresponding to each intention to be matched based on each intention to be matched and the instruction to be identified; performs a similarity comparison between each intention verification instruction and the instruction to be identified, and determines the instruction intention of the instruction to be identified based on the obtained similarity comparison results. By adopting the above technical solution, the intention and association of the instruction to be identified and the historical conversation sentences generated by multiple rounds of conversations are first identified, so that the correlation between the instruction to be identified and different historical conversation sentences can be determined, and then it can be considered that the intention corresponding to the historical conversation sentence with a higher correlation with the instruction to be identified is more likely to be the intention of the instruction to be identified. At this time, the intention to be matched of the determined historical conversation sentence is not directly used as the intention of the instruction to be recognized. Instead, an intention verification instruction is regenerated based on the instruction to be recognized and the intention to be matched. The similarity between the intention verification instruction and the instruction to be recognized is used to reversely verify whether the matching intention belongs to the intention of the instruction to be recognized. This improves the accuracy of the final determined instruction intention, reduces the number of times the instruction intention is unclear due to ambiguous instruction meaning and non-intuitive intention, improves the accuracy of instruction recognition in open domain multi-round conversations, and improves the applicability to multi-round task conversation scenarios, which can better meet the increasingly rich usage needs of users.
[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 A flowchart of a method for identifying instruction intent provided in Embodiment 1 of the present invention;
[0026] Figure 2 A flowchart of a method for identifying instruction intent provided in Embodiment 2 of the present invention;
[0027] Figure 3 A schematic diagram of a flow chart of determining at least one to-be-matched intent corresponding to an instruction to be identified from an intent set according to each associated value provided in Embodiment 2 of the present invention;
[0028] Figure 4 A schematic diagram of the structure of a device for identifying instruction intentions provided in Embodiment 3 of the present invention;
[0029] Figure 5 A structural diagram of a command intent recognition device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Embodiment 1
[0033] Figure 1 This is a flow chart of a method for recognizing the intention of a command provided in the first embodiment of the present invention. The embodiment of the present invention can be applied to the situation where the intention of an input voice command is recognized during multiple rounds of voice interaction. The method can be executed by a command intention recognition device, which can be implemented by software and / or hardware, and the command intention recognition device can be configured in a command intention recognition device. Optionally, the command intention device can be an electronic device, which can be a notebook, a desktop computer, a car computer, a smart tablet, etc., and the embodiment of the present invention does not limit this.
[0034] like Figure 1As shown, a method for identifying instruction intention provided by an embodiment of the present invention specifically includes the following steps:
[0035] S101, obtaining instructions to be recognized and at least two groups of historical dialogue sentences.
[0036] In this embodiment, the instruction to be recognized can be specifically understood as a sentence instruction input from the outside during the human-computer dialogue process that needs to be semantically and intentionally recognized. The historical dialogue sentence can be specifically understood as a group of question-and-answer sentences in multiple rounds of conversations before the input of the instruction to be recognized. It can be understood that a group of historical dialogue sentences can include an instruction and an answer to the instruction.
[0037] Specifically, during the human-computer dialogue process, if it is necessary to perform intent recognition on the sentences input during a certain round of question-and-answer process, the command sentences input during this round can be used as the instructions to be recognized. At the same time, at least two groups of question-and-answer sentences are extracted from the multiple rounds of conversations before this round of question-and-answer process as the historical dialogue sentences corresponding to the instructions to be recognized.
[0038] It is understandable that when acquiring historical dialogue sentences, question and answer sentences that are close to the input time of the instruction to be recognized are generally selected to increase the possibility of an association between the selected historical dialogue sentences and the instruction to be recognized.
[0039] Optionally, the instructions to be identified and the historical dialogue sentences are sentences in an open domain dialogue.
[0040] Specifically, since the instructions to be identified and the historical dialogue sentences are the basis of the open domain dialogue, it can be considered that the intentions corresponding to the instructions input by each group of historical dialogue sentences are different. For example, the intention of the first round can be itinerary planning, the intention of the second round can be encyclopedia questions and answers, the intention of the third round can be weather query, and the intention of the fourth round is also the intention corresponding to the round of instructions to be identified, which is navigation. There is no obvious sequential correlation between the rounds of dialogue, and the intention features of some rounds are more obvious and can be easily identified, but the intentions of some rounds are hidden deeper and require in-depth analysis and judgment. That is, the randomness between different rounds is high, which is essentially different from the difficulty of intention recognition in vertical fields where the intentions of each round of dialogue are almost the same or there is a correlation.
[0041] For example, take the following human-computer conversation process as an example:
[0042] First round of instructions: I want to go to Beijing and plan a trip
[0043] First round of answers: Okay, first I recommend visiting the Forbidden City, then the Summer Palace…
[0044] Second round of instructions: Can you introduce the Forbidden City?
[0045] Second round of answers: Yes, the Forbidden City was built in…
[0046] The third round of instructions: What kind of clothes are suitable for that place now?
[0047] Third round of answers: The weather is sunny and the temperature is 20 degrees. It is recommended to wear a thin coat.
[0048] Fourth round of instructions: Let’s go there
[0049] Each set of instructions and answers can be regarded as a set of historical dialogue sentences, and the fourth round of instructions is the instruction to be identified in the embodiment of the present invention. The intentions corresponding to different rounds of questions and answers are different and jumpy, which conforms to the characteristics of open domain dialogue sentences.
[0050] S102: Determine at least one intention to be matched corresponding to the instruction to be recognized based on the intention association relationship between the instruction to be recognized and each historical dialogue sentence.
[0051] In this embodiment, the intention association relationship can be specifically understood as information indicating the correlation between the instruction to be identified and different historical dialogue sentences, as well as whether they belong to the same type of intention and the type of intention. The intention to be matched can be specifically understood as the intention corresponding to each historical dialogue sentence that has a high correlation with the instruction to be identified and can be ultimately determined to be the instruction intention of the instruction to be identified.
[0052] Specifically, the instruction to be identified is matched with each group of historical dialogue sentences for relevance and intent, the relevance between the instruction to be identified and each group of historical dialogue sentences and the intentions corresponding to the historical dialogue sentences is determined, and then at least one intention with a higher relevance is selected from the multiple intentions corresponding to each historical dialogue sentence to be determined as the intention to be matched corresponding to the instruction to be identified.
[0053] S103. Generate intent verification instructions corresponding to each intention to be matched according to each intention to be matched and instruction to be recognized.
[0054] In this embodiment, the intention verification instruction can be specifically understood as an instruction that has the same expression form as the instruction to be identified and is used to verify the intention that may be contained in the instruction to be identified.
[0055] Specifically, in order to determine the intention that best matches the instruction to be identified among the intentions to be matched, based on the expression form of the instruction to be identified, each intention to be matched can generate an instruction expressed in the expression form as the intention verification instruction corresponding to each intention to be matched.
[0056] S104, performing a similarity comparison between each intention verification instruction and the instruction to be identified, and determining the instruction intention of the instruction to be identified based on the obtained similarity comparison results.
[0057] Specifically, since the expression form of each intention verification instruction is consistent with that of the instruction to be identified, the ambiguity of the meaning due to inconsistent expression can be eliminated. At this time, each intention verification instruction is compared with the instruction to be identified for similarity, and a similarity comparison result with similar content is obtained. Since the higher the similarity, the more consistent the meaning of the content expressed in the intention verification instruction and the instruction to be identified, at this time, based on the obtained similarity comparison results of each intention verification instruction, the intention corresponding to the intention verification instruction with the highest consistency in meaning with the content of the instruction to be identified can be determined as the instruction intention of the instruction to be identified.
[0058] The technical solution of this embodiment is to obtain the instruction to be identified and at least two groups of historical conversation sentences; determine at least one intention to be matched corresponding to the instruction to be identified based on the intention association relationship between the instruction to be identified and each historical conversation sentence; generate intention verification instructions corresponding to each intention to be matched based on each intention to be matched and the instruction to be identified; perform similarity comparison between each intention verification instruction and the instruction to be identified, and determine the instruction intention of the instruction to be identified based on the obtained similarity comparison result. By adopting the above technical solution, the intention and association of the instruction to be identified and the historical conversation sentences generated by multiple rounds of conversations are first identified, so that the correlation between the instruction to be identified and different historical conversation sentences can be determined, and then it can be considered that the intention corresponding to the historical conversation sentence with a higher correlation with the instruction to be identified is more likely to be the intention of the instruction to be identified. At this time, the intention to be matched of the determined historical conversation sentence is not directly used as the intention of the instruction to be recognized. Instead, an intention verification instruction is regenerated based on the instruction to be recognized and the intention to be matched. The similarity between the intention verification instruction and the instruction to be recognized is used to reversely verify whether the matching intention belongs to the intention of the instruction to be recognized. This improves the accuracy of the final determined instruction intention, reduces the number of times the instruction intention is unclear due to ambiguous instruction meaning and non-intuitive intention, improves the accuracy of instruction recognition in open domain multi-round conversations, and improves the applicability to multi-round task conversation scenarios, which can better meet the increasingly rich usage needs of users.
[0059] Embodiment 2
[0060] Figure 2A flowchart of a method for identifying instruction intentions provided in the second embodiment of the present invention is further optimized on the basis of the above-mentioned optional technical solutions. After obtaining the instruction to be identified and the historical dialogue sentences, the instruction to be identified is combined with each group of historical dialogue sentences respectively, and the intention matching groups obtained after the combination are determined by the pre-trained intention matching model for the intention association value, and then the determination of the intention to be matched of the instruction to be identified is completed by comprehensively analyzing the association values of each intention. For each determined intention to be matched, a text with the same expression form as the instruction to be identified is generated by the pre-trained large language model to obtain the corresponding intention verification instruction, and the intention corresponding to the intention verification instruction with the highest similarity to the instruction to be identified is determined as the instruction intention of the instruction to be identified, and the similarity between the intention verification instruction and the instruction to be identified is used to reversely verify whether the matching intention belongs to the intention of the instruction to be identified, thereby realizing accurate identification of instruction intentions in open domain dialogues, improving the accuracy of the instruction intentions finally determined, reducing the number of unclear instruction intentions due to vague instruction meanings and non-intuitive intentions, improving the accuracy of instruction recognition under open domain multi-round conversations, and improving the applicability of multi-round task conversation scenarios, which can better meet the increasingly rich usage needs of users.
[0061] like Figure 2 As shown, a method for identifying instruction intention provided by an embodiment of the present invention specifically includes the following steps:
[0062] S201, obtaining instructions to be recognized and at least two groups of historical dialogue sentences.
[0063] S202: Combine each group of historical dialogue sentences with the instructions to be recognized to obtain corresponding intention matching groups.
[0064] Specifically, for each group of historical dialogue sentences, the instructions to be recognized are combined with the historical dialogue sentences to form a group of sentence sets, and the group of sentence sets is determined as the intention matching group corresponding to the historical dialogue sentences.
[0065] Continuing with the above human-computer conversation example, if the historical conversation sentence is the first round of conversation in the example, the generated intent matching group can be expressed as:
[0066] 1) I want to go to Beijing and plan a trip
[0067] 2) OK, I recommend visiting the Forbidden City first, and then the Summer Palace...
[0068] 3) Then go there
[0069] S203: Input each intent matching group into a pre-trained intent matching model, and determine the association value of each intent matching group with respect to each intent in the intent set.
[0070] In this embodiment, the intent matching model can be specifically understood as a neural network model for classifying the intent of the text information input therein and determining the association between the text information and different types of intent. It can be understood that the intent matching model in the embodiment of the present invention can be a pre-trained deep neural network model or a large language model for implementing text classification tasks. Among them, the large language model can be specifically understood as an artificial intelligence model trained on a large-scale text data set using a deep learning algorithm, especially a transformer architecture. It can also be understood as a highly complex and powerful artificial intelligence system for processing and generating natural language text, which can be used to automate language-related tasks, such as automatic summarization, text classification, dialogue systems, language translation, etc., as well as more complex applications, such as composing poetry, writing code, simulating texts of a specific style, etc.
[0071] In this embodiment, the intent set can be specifically understood as a set of different intents that are pre-set according to actual conditions, and the intent matching model can identify different intents. The associated value can be specifically understood as the intent obtained by analyzing the intent matching group and the matching degree between different intents.
[0072] Specifically, each group of intent matching groups is input into the pre-trained intent matching model in turn, and the intent matching model performs text semantic extraction and text classification on each group of intent matching groups, determines the degree of matching between the text and each intent in the intent set, and finally outputs the association value for each intent in the intent set.
[0073] S204. Determine at least one intention to be matched corresponding to the instruction to be identified from the intention set according to each association value.
[0074] Specifically, since the association value between each intent matching group and all the intents in the intent set has been determined, the intent with the highest association relationship in each intent matching group can be identified. In order to comprehensively determine the intent of the instruction to be identified, it is necessary to conduct a comprehensive analysis of the intents corresponding to all intent matching groups, that is, it is necessary to conduct a comprehensive analysis of the association values obtained for each intent in the intent set in different intent matching groups to obtain the comprehensive association relationship between the instruction to be identified and the intent, and then based on the determined comprehensive association relationship, identify at least one intent to be matched that is most likely to be matched by the instruction to be identified in the intent set.
[0075] Optional, Figure 3 A flowchart of determining at least one intent to be matched corresponding to an instruction to be identified from an intent set according to each associated value is provided for the second embodiment of the present invention, such as Figure 3 As shown, the specific steps include:
[0076] S2041. Sum and average the association values corresponding to each intent in the intent set to determine the average association value corresponding to each intent.
[0077] Specifically, in order to comprehensively analyze the association relationship between each intent matching group and each intent in the intent set, all association values corresponding to each intent in the intent set can be summed and averaged, and the processed value can be determined as the average association value corresponding to the intent.
[0078] For example, assuming that the intent set includes various intents such as navigation, itinerary planning, phone calls, music and encyclopedia, each group of intent matching groups will give corresponding association values for all intents in the intent set. Assume that the association values of the first group of intent matching groups for the above navigation, itinerary planning, phone calls, music and encyclopedia are expressed as A1, A2, A3, A4 and A5 respectively; the association values of the second group of intent matching groups for the above navigation, itinerary planning, phone calls, music and encyclopedia are expressed as B1, B2, B3, B4 and B5 respectively; the association values of the third group of intent matching groups for the above navigation, itinerary planning, phone calls, music and encyclopedia are expressed as C1, C2, C3, C4 and C5 respectively. For the intent of the navigation type, the corresponding average association value can be expressed as (A1+B1+C1) / 3, and the expression method of other intents is the same as above. The average association value of each intent in the intent set can be finally determined to be expressed in the following form:
[0079] Navigation: 0.34; trip planning: 0.33; phone: 0.01; music: 0.01; encyclopedia: 0.01…
[0080] S2042. Sort the average correlation values in descending order, and determine the intentions corresponding to the average correlation values of a preset number as the intentions to be matched.
[0081] In this embodiment, the preset number can be specifically understood as the number of intentions that are pre-set according to actual conditions and need to be selected from the intention set to perform reverse verification on the instruction to be recognized.
[0082] Specifically, the average correlation values are sorted in descending order, where the intentions corresponding to the top average correlation values can be considered as intentions with a higher degree of match with the instruction to be identified, which means that it is highly likely that the intention of the instruction to be identified is the top intention. At this time, the intentions corresponding to a preset number of top average correlation values can be determined as the intentions to be matched that need to be used for subsequent reverse verification of the intention of the instruction to be identified.
[0083] S205. For each intention to be matched, the intention to be matched and the instruction to be recognized are input into a pre-trained large language model for text generation to obtain an intention verification instruction with the same form as the instruction to be recognized.
[0084] Specifically, before this solution is put into use, the large language model will first be trained in the application scenario of the instruction to be recognized. After it is put into use, for each determined intention to be matched, the intention to be matched and the instruction to be recognized will be simultaneously input into the trained large language model, and the text generation function of the large language model will be used to generate an intent verification instruction in the same form as the instruction to be recognized, which contains the intent to be matched.
[0085] Continuing with the above example, assuming that the instruction to be recognized is "Let's go there", and the intention to be matched is navigation, the generated intent verification instruction is "Navigate there"; when the intention to be matched is itinerary planning, the generated intent verification instruction is "Plan a itinerary to there"; when the intention to be matched is a phone call, the generated intent verification instruction is "Call there".
[0086] S206 , performing a similarity comparison between each intention verification instruction and the instruction to be identified, and determining the intention corresponding to the intention verification instruction with the highest similarity as the instruction intention of the instruction to be identified.
[0087] Specifically, a similarity comparison is performed between each intent verification instruction and the instruction to be identified through a vector model or other model capable of performing text similarity comparison, and the intent corresponding to the intent verification instruction with the highest similarity after comparison is determined as the instruction intent of the instruction to be identified.
[0088] The technical solution of this embodiment, after obtaining the instruction to be identified and the historical dialogue sentences, respectively combines the instruction to be identified with each group of historical dialogue sentences, and determines the intention association value of each intention matching group obtained after the combination through the pre-trained intention matching model, and then completes the determination of the intention to be matched of the instruction to be identified by combining the association values of each intention. For each determined intention to be matched, a text with the same expression form as the instruction to be identified is generated through the pre-trained large language model to obtain the corresponding intention verification instruction, and the intention corresponding to the intention verification instruction with the highest similarity to the instruction to be identified is determined as the instruction intention of the instruction to be identified, and the similarity between the intention verification instruction and the instruction to be identified is used to reversely verify whether the matching intention belongs to the intention of the instruction to be identified, thereby realizing accurate identification of instruction intentions in open domain dialogues, improving the accuracy of the instruction intentions finally determined, reducing the number of unclear instruction intentions due to vague instruction meanings and non-intuitive intentions, improving the accuracy of instruction recognition under open domain multi-round conversations, and improving the applicability of multi-round task conversation scenarios, which can better meet the increasingly rich usage needs of users.
[0089] Embodiment 3
[0090] Figure 4A schematic diagram of the structure of a command intention recognition device provided in Embodiment 3 of the present invention is shown in FIG. Figure 4 As shown, the instruction intention recognition device includes an instruction statement acquisition module 31, a to-be-matched intention determination module 32, a verification instruction generation module 33 and an instruction intention determination module 34.
[0091] Among them, the instruction statement acquisition module 31 is used to obtain the instruction to be identified and at least two groups of historical dialogue sentences; the to-be-matched intention determination module 32 is used to determine at least one to-be-matched intention corresponding to the instruction to be identified based on the intention association relationship between the instruction to be identified and each historical dialogue sentence; the verification instruction generation module 33 is used to generate intention verification instructions corresponding to each to-be-matched intention based on each to-be-matched intention and the instruction to be identified; the instruction intention determination module 34 is used to perform a similarity comparison between each intention verification instruction and the instruction to be identified, and determine the instruction intention of the instruction to be identified based on the obtained similarity comparison result.
[0092] The technical solution of the embodiment of the present invention first identifies the intention and relevance of the instruction to be identified and the historical conversation sentences generated by multiple rounds of conversations, so as to determine the correlation between the instruction to be identified and different historical conversation sentences, and then it can be considered that the intention corresponding to the historical conversation sentence with a higher correlation with the instruction to be identified is more likely to be the intention of the instruction to be identified. At this time, the intention to be matched of the determined historical conversation sentence is not directly used as the intention of the instruction to be identified, but an intention verification instruction is regenerated based on the instruction to be identified and the intention to be matched, and the similarity between the intention verification instruction and the instruction to be identified is used to reversely verify whether the intention to be matched belongs to the intention of the instruction to be identified, thereby improving the accuracy of the instruction intention finally determined, reducing the number of times the instruction intention is unclear due to ambiguous meaning of the instruction and non-intuitive intention, improving the accuracy of instruction recognition in open domain multi-round conversations, and improving the applicability to multi-round task conversation scenarios, which can better meet the increasingly rich usage needs of users.
[0093] Optionally, the to-be-matched intention determination module 32 is specifically configured to:
[0094] Combine each group of historical dialogue sentences with the instructions to be recognized to obtain the corresponding intent matching group;
[0095] Input each intent matching group into a pre-trained intent matching model to determine the association value of each intent matching group relative to each intent in the intent set;
[0096] At least one intention to be matched corresponding to the instruction to be identified is determined from the intention set according to each associated value.
[0097] Optionally, determining at least one intent to be matched corresponding to the instruction to be identified from the intent set according to each associated value includes:
[0098] Sum and average the association values corresponding to each intent in the intent set to determine the average association value corresponding to each intent;
[0099] The average correlation values are sorted in descending order, and the intentions corresponding to the average correlation values of a preset number are determined as the intentions to be matched.
[0100] Optionally, the instruction intention determination module 34 is specifically used to:
[0101] Each intention verification instruction is compared with the instruction to be identified for similarity, and the intention corresponding to the intention verification instruction with the highest similarity is determined as the instruction intention of the instruction to be identified.
[0102] Optionally, the verification instruction generating module 33 is specifically used for:
[0103] For each intent to be matched, the intent to be matched and the instruction to be recognized are input into the pre-trained large language model for text generation to obtain an intent verification instruction with the same form as the instruction to be recognized.
[0104] Optionally, the instructions to be identified and the historical dialogue sentences are sentences in an open domain dialogue.
[0105] The instruction intention recognition device provided in the embodiment of the present invention can execute the instruction intention recognition method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0106] Embodiment 4
[0107] Figure 5 A schematic diagram of the structure of a command intent recognition device provided for Embodiment 4 of the present invention. The command intent recognition device 40 may be an electronic device intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present invention described and / or required herein.
[0108] like Figure 5As shown, the instruction intention recognition device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the instruction intention recognition device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0109] Multiple components in the instruction intention recognition device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the instruction intention recognition device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0110] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as the instruction intent recognition method.
[0111] In some embodiments, the instruction intent recognition method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the instruction intent recognition device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the instruction intent recognition method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the instruction intent recognition method in any other appropriate manner (e.g., by means of firmware).
[0112] Optionally, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the instruction intent recognition method provided by any embodiment of the present invention.
[0113] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0114] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0115] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0116] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0117] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0118] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0119] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0120] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for identifying instruction intention, characterized in that: include: Obtain the command to be recognized and at least two groups of historical dialogue sentences; Determine at least one to-be-matched intention corresponding to the to-be-recognized instruction according to the intention association relationship between the to-be-recognized instruction and each of the historical dialogue sentences; According to each of the intentions to be matched and the instructions to be identified, respectively generate an intention verification instruction corresponding to each of the intentions to be matched; Each of the intention verification instructions is compared with the instruction to be identified for similarity, and the instruction intent of the instruction to be identified is determined based on the obtained similarity comparison results.
2. The method for recognizing instruction intention according to claim 1, characterized in that: The determining, according to the intention association relationship between the instruction to be recognized and each of the historical dialogue sentences, at least one intention to be matched corresponding to the instruction to be recognized includes: Combining each group of the historical dialogue sentences with the instructions to be recognized to obtain a corresponding intention matching group; Inputting each of the intent matching groups into a pre-trained intent matching model, respectively, to determine an association value of each of the intent matching groups relative to each intent in the intent set; At least one intention to be matched corresponding to the instruction to be identified is determined from the intention set according to each of the associated values.
3. The method for recognizing instruction intention according to claim 2, characterized in that: The determining at least one to-be-matched intention corresponding to the to-be-identified instruction from the intention set according to each of the association values comprises: Sum and average the association values corresponding to each of the intents in the intent set to determine an average association value corresponding to each of the intents; The average correlation values are sorted in descending order, and the intentions corresponding to the previous preset number of average correlation values are determined as the intentions to be matched.
4. The method for recognizing instruction intention according to claim 1, characterized in that: Determining the instruction intent of the instruction to be identified according to the obtained similarity comparison result includes: The intention corresponding to the intention verification instruction with the highest similarity is determined as the instruction intention of the instruction to be identified.
5. The method for recognizing instruction intention according to claim 1, characterized in that: The generating, according to each of the intentions to be matched and the instructions to be identified, an intention verification instruction corresponding to each of the intentions to be matched comprises: For each of the intentions to be matched, the intentions to be matched and the instructions to be recognized are input into a pre-trained large language model for text generation to obtain an intention verification instruction in the same form as the instruction to be recognized.
6. The method for identifying instruction intention according to any one of claims 1 to 5, characterized in that: The instructions to be recognized and the historical dialogue sentences are sentences in an open domain dialogue.
7. A device for identifying instruction intention, characterized in that: include: An instruction statement acquisition module is used to acquire instructions to be recognized and at least two groups of historical dialogue statements; A to-be-matched intention determination module, used to determine at least one to-be-matched intention corresponding to the to-be-recognized instruction according to the intention association relationship between the to-be-recognized instruction and each of the historical dialogue sentences; A verification instruction generation module, used to generate an intention verification instruction corresponding to each of the intentions to be matched according to each of the intentions to be matched and the instructions to be identified; The instruction intention determination module is used to perform similarity comparison between each of the intention verification instructions and the instructions to be identified, and determine the instruction intention of the instructions to be identified based on the obtained similarity comparison results.
8. A command intention recognition device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the instruction intention recognition method according to any one of claims 1 to 6.
9. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the instruction intent recognition method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the instruction intent recognition method according to any one of claims 1 to 6.