Intention recognition method, system and related device

CN119377390APending Publication Date: 2025-01-28IFLYTEK CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411222344.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing intent recognition methods have low recognition accuracy when dealing with user statements.

Method used

By obtaining the initial intention of the user input, obtain the relevant candidate's intent from the intention database, calculate the relatively blur between the initial intent and the candidate intent, use a relatively blur to obtain the intention reference information, and supplement the lack or blur information in the initial intent. Get a clear goal intent.

Benefits of technology

Improving the accuracy of intentional identification, can more effectively handle the vagueness in the user's expression, and provide a clearer goal intent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377390A_ABST
    Figure CN119377390A_ABST
Patent Text Reader

Abstract

The invention discloses an intention recognition method and system and a related device, and the method comprises the steps: obtaining an initial intention inputted by a user, and obtaining a candidate intention related to the initial intention from an intention database; obtaining relative ambiguity between the initial intention and each candidate intention; wherein the relative ambiguity is determined based on a matching degree between an initial element of the initial intention and a candidate element corresponding to the candidate intention, and the relative ambiguity is inversely proportional to the matching degree; and obtaining intention supplementary information based on the candidate intention and the corresponding relative ambiguity, and obtaining a target intention by using the initial intention and the intention supplementary information. In this way, the intention recognition accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of intent recognition, and in particular to an intent recognition method, system and related devices. Background Art

[0002] In human-computer interaction systems, intent recognition is one of the most critical technologies. It is mainly based on natural language processing (NLP) technology to understand user questions and determine user needs or purposes. At present, existing intent recognition methods mainly train corresponding neural network models, and the neural network model analyzes the user's input to determine the user's intention. However, when the user's expression contains ambiguous words, this method is likely to lead to low recognition accuracy.

[0003] In view of this, how to propose an intention recognition method with higher accuracy has become an urgent problem to be solved. Summary of the invention

[0004] The main technical problem solved by the present application is to provide an intention recognition method, system and related devices, which can improve the accuracy of intention recognition.

[0005] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide an intention recognition method, including: obtaining an initial intention input by a user, and obtaining candidate intentions related to the initial intention from an intention database; obtaining the relative ambiguity between the initial intention and each of the candidate intentions; wherein the relative ambiguity is determined based on the degree of matching between the initial elements of the initial intention and the candidate elements corresponding to the candidate intentions, and the relative ambiguity is inversely proportional to the degree of matching; based on the candidate intentions and their corresponding relative ambiguities, obtaining intention reference information, and obtaining the target intention using the initial intention and the intention reference information.

[0006] In order to solve the above technical problems, another technical solution adopted in the present application is: to provide an intention recognition system, including: an acquisition module, used to obtain the initial intention input by the user, and obtain candidate intentions related to the initial intention from the intention database; a first processing module, used to obtain the relative ambiguity between the initial intention and each of the candidate intentions; wherein the relative ambiguity is determined based on the degree of matching between the initial elements of the initial intention and the candidate elements corresponding to the candidate intentions, and the relative ambiguity is inversely proportional to the degree of matching; a second processing module, used to obtain intention reference information based on the candidate intentions and their corresponding relative ambiguity, and obtain the target intention using the initial intention and the intention reference information.

[0007] To solve the above technical problems, another technical solution adopted in the present application is: to provide an electronic device, comprising: a memory and a processor coupled to each other, the memory storing program instructions, and the processor being used to execute the program instructions to implement the intention recognition method mentioned in the above technical solution.

[0008] In order to solve the above technical problems, another technical solution adopted in the present application is: providing a computer-readable storage medium on which program instructions are stored, and when the program instructions are executed by a processor, the intention recognition method mentioned in the above technical solution is implemented.

[0009] The beneficial effect of the present application is as follows: Different from the prior art, the intent recognition method proposed in the present application, after obtaining the initial intent given by the user, selects candidate intents related to the initial intent from the constructed intent database. According to the initial elements of the initial intent and the candidate elements of the candidate intent, the relative ambiguity between the initial intent and each candidate intent is calculated, and the intent reference information is determined according to the relative ambiguity. By using the intent reference information, the missing information or ambiguous information in the initial intent is supplemented to obtain a clear target intent, thereby improving the accuracy of intent recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] 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 description of the embodiments. 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 creative work. Among them:

[0011] Figure 1 It is a flowchart of an implementation method of the present application's intention recognition method;

[0012] Figure 2 is a flowchart of an implementation method of an intention database construction method;

[0013] Figure 3 yes Figure 1 Step S101 corresponds to a flowchart of an implementation method;

[0014] Figure 4 yes Figure 1 Step S102 corresponds to a flowchart of an implementation method;

[0015] Figure 5 yes Figure 1 Step S103 corresponds to a flowchart of an implementation method;

[0016] Figure 6 It is a structural diagram corresponding to the intention recognition system of this application;

[0017] Figure 7 It is a structural schematic diagram of an embodiment of the electronic device of the present application;

[0018] Figure 8 It is a structural schematic diagram of an implementation method of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments, and different embodiments can be adaptively combined. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0020] See also Figure 1 , Figure 1 : is a flowchart of an implementation method of the present application's intention recognition method, the method comprising:

[0021] S101: Obtain an initial intent input by a user, and obtain candidate intents related to the initial intent from an intent database.

[0022] In one embodiment, the intention text input by the user is obtained and used as the initial intention. An intention database including multiple construction intentions is obtained, and at least one construction intention related to the initial intention is retrieved from the intention database as a candidate intention.

[0023] Specifically, after obtaining the intended text input by the user, the intended text is segmented, and the keywords corresponding to the intended text are determined according to the part of speech of each word obtained after the segmentation. The keywords are used to retrieve the relevant constructed intents from the intent database as candidate intents.

[0024] In another embodiment, the intention audio input by the user is obtained, the intention audio is recognized, and the obtained recognized text is used as the initial intention. A candidate intention matching the initial intention is retrieved from the intention database.

[0025] S102: Obtain the relative ambiguity between the initial intent and each candidate intent; wherein the relative ambiguity is determined based on the degree of matching between the initial elements of the initial intent and the candidate elements of the corresponding candidate intent, and the relative ambiguity is inversely proportional to the degree of matching.

[0026] In one embodiment, the initial intent is subjected to element extraction to obtain the corresponding initial element. Also, element extraction is performed on each candidate intent to obtain the candidate element of each candidate intent. For the initial intent and any candidate intent, the corresponding relative fuzziness is determined according to the degree of match between the initial element and the candidate element. The smaller the relative fuzziness, the higher the degree of match between the initial intent and the corresponding candidate intent.

[0027] S103: Based on the candidate intents and their corresponding relative ambiguities, obtain intent reference information, and use the initial intent and the intent reference information to obtain the target intent.

[0028] In one embodiment, the intention sequence is obtained by sorting the intentions in ascending order of relative ambiguity, and the intention reference information for supplementing the initial intention is obtained according to the candidate intentions of the first reference number in the intention sequence.

[0029] Furthermore, the intention reference information is used to obtain supplementary information provided by the user to supplement the initial intention. Based on the supplementary information and the initial intention, a target intention with a clear intention is obtained.

[0030] The intent recognition method proposed in the present application selects candidate intents related to the initial intent from the constructed intent database after obtaining the initial intent given by the user. The relative ambiguity between the initial intent and each candidate intent is calculated based on the initial elements of the initial intent and the candidate elements of the candidate intent, and the intent reference information is determined based on the relative ambiguity. By using the intent reference information, the missing information or ambiguous information in the initial intent is supplemented to obtain a clear target intent, thereby improving the accuracy of intent recognition.

[0031] See also Figure 2 , Figure 2 1 is a flow chart of an embodiment of the method for constructing an intention database. Specifically, before step S101, the intention database is constructed, and the construction process includes:

[0032] S201: Acquire multiple groups of construction information, and generate intent text based on the construction information; wherein the construction information includes an intent name and a description text matching the intent name.

[0033] In one embodiment, multiple sets of build information are obtained, each set of build information includes an intent name and a description text matching the intent name, and the description text is used to explain the intent name. The build information is input into the intelligent analysis model so that the intelligent analysis model analyzes the build information and outputs the intent text. The intent name is the name of a specific business activity or transaction; the description text is used to explain the matching intent name, thereby helping the intelligent analysis model to understand the build information.

[0034] In an implementation scenario, a task text is generated based on the acquired construction information, and the task text is used to prompt the intelligent analysis model to play the user role. The task text is input into the intelligent analysis model so that the intelligent analysis model simulates the intention text expressed in the real intention scenario.

[0035] It should be noted that in order to improve the efficiency of constructing the intent database and save the cost of obtaining construction information, an intelligent analysis model can be used to generate multiple intent texts for the same construction information.

[0036] In a specific application scenario, to simulate a bank loan scenario, the acquired construction information includes the intent name "consumer loan limit query" and the description text "the user wants to query the approved loan limit for consumer loans", and generates the task text "please play the role of the user according to the intent name and the corresponding description text". By inputting the construction information into the intelligent analysis model, the intent text "I want to know how much my loan limit is" output by the intelligent analysis model playing the role of the user is obtained.

[0037] S202: Obtain a preset template, and obtain a construction intent based on the preset template, construction information and corresponding intent text; wherein the construction intent is used to construct an intent database.

[0038] In one embodiment, a preset template is obtained, and construction information and corresponding intent text are added to corresponding positions of the preset template to obtain a construction intent containing multiple types of information, so as to help improve the accuracy of subsequent determination of candidate intents.

[0039] Further, the obtained construction intent is stored in the intent database. In response to the number of construction intents stored in the intent database meeting the quantity threshold, the generation of construction intents is stopped, and the constructed intent database is obtained. Alternatively, in response to obtaining the construction intents corresponding to all construction information, all construction intents are stored in the intent database, and the constructed intent database is obtained.

[0040] In a specific application scenario, in response to the construction information including the intent name "Consumer loan amount query" and the description text "The user wants to query the approved loan amount of the consumer loan", the generated intent text is "I want to know what my loan amount is". By adding the above information to the preset template, the final constructed intent is "Consumer loan amount query: The user wants to query the approved loan amount of the consumer loan, for example, I want to know what my loan amount is".

[0041] In another embodiment, in order to save storage resources of the intent database and save subsequent computing resource consumption, the intent text may also be directly stored in the intent database as a constructed intent.

[0042] In another embodiment, after the construction intent is obtained through the above step S202, the first vector corresponding to each construction intent is obtained, and the first vector is stored in the intent database.

[0043] Specifically, the construction intent is input into the trained semantic coding network so that the semantic coding network extracts semantic features of the construction intent and obtains the corresponding first vector. After the first vector is associated with the corresponding construction intent, it is stored in the intent database. Among them, the specific structure of the semantic coding network can refer to the existing neural network model structure, and will not be explained in detail here.

[0044] See also Figure 3 , Figure 3 yes Figure 1 Step S101 in the flowchart corresponds to an implementation method. Specifically, in response to the first vector corresponding to each construction intent being stored in the intent database, the implementation process of step S101 includes:

[0045] S301: Obtaining the initial intention of the user input.

[0046] In one implementation, the initial intention is obtained according to the text or audio input by the user. The specific implementation process can refer to the above corresponding implementation, which will not be described in detail here.

[0047] S302: Obtain a second vector corresponding to the initial intent, and based on the matching degree between the first vector and the second vector, select an intent name corresponding to at least part of the constructed intent in the intent database as a candidate intent.

[0048] In one embodiment, the acquired initial intent is input into the semantic encoding network mentioned in the above corresponding embodiment to obtain a second vector corresponding to the initial intent. The matching degree between the second vector and each first vector in the intent database is obtained. In response to the matching degree being greater than the matching degree threshold, the intent name in the constructed intent matched by the corresponding first vector is used as a candidate intent. By using the intent name as a candidate intent, the efficiency of subsequent processing is improved and the difficulty of subsequent processing is reduced.

[0049] Specifically, the similarity between the second vector and each first vector is calculated, and the similarity is used as the matching degree, so as to screen and obtain the candidate intents.

[0050] Optionally, in other implementations, in response to the matching degree being greater than a matching degree threshold, the construction intent matched by the corresponding first vector may also be used as a candidate intent.

[0051] In another embodiment, each first vector and the obtained second vector are converted into a format that can be stored in an Elasticsearch index, retrieved from the intent database using Elasticsearch technology, and the construction intent related to the initial intent is returned. The intent name corresponding to the returned construction intent is used as a candidate intent.

[0052] See also Figure 4 , Figure 4 yes Figure 1 Step S102 corresponds to a flowchart of an implementation method.

[0053] Specifically, the implementation process of step S102 includes:

[0054] S401: Acquire a plurality of predetermined element categories, wherein each element category is matched with a corresponding element weight.

[0055] In one embodiment, application scenario information is acquired and input into an intelligent analysis model so that the intelligent analysis model outputs element categories and corresponding element weights that match the target scenario information.

[0056] Specifically, in order to improve the recognition accuracy of the intention recognition method proposed in this application in the target scene, the target scene information is predetermined. The target scene information is input into the intelligent analysis model so that the intelligent analysis model analyzes the target scene information, thereby summarizing multiple element categories that match the target scene information, and setting corresponding element weights for each element category. Among them, the target scene information includes at least one of the name of the target scene, processing business information, service object information, and product information, and the element weight is determined based on the importance of the corresponding element category in the target scene information.

[0057] In a specific application scenario, in order to improve the accuracy of intent recognition in the "bank" scenario, the application scenario information "bank" is input into the intelligent analysis model to obtain element categories including business instances, operation instances, conditional factors and business types, where the conditional factors include multiple restrictive sub-factors, such as: at least one of people, time, place, channel, cost and failure. In addition, "business instance" refers to a specific business activity or transaction, and its corresponding element weight is 0.3; "operation instance" refers to the supporting operations of the business, such as inquiry, report loss or reissue, and its corresponding element weight is 0.3; "conditional factor" refers to the restrictive factors of business operations, and its corresponding element weight is 0.2; "business type" refers to the type of user demand, such as consultation or processing, and its corresponding element weight is 0.2.

[0058] In another embodiment, after the intelligent analysis model outputs the element categories and the corresponding element weights, the generated element categories and element weights are fed back to the user, and the user is prompted to modify or confirm. In response to obtaining the modification information from the user, the generated element categories and element weights are modified based on the modification information. In response to obtaining the confirmation information from the user, the currently generated element categories and element weights are saved, and subsequent steps are executed. Among them, the above-mentioned modifications include adding element categories and their corresponding element weights, deleting some of the generated element categories, and adjusting some of the generated element weights.

[0059] In another embodiment, the above-mentioned element categories and corresponding element weights may also be formulated by relevant technical personnel. The formulated element categories and element weights are obtained and input into the intelligent analysis model to enable subsequent intelligent analysis.

[0060] In another embodiment, an intelligent analysis model is used to generate common element categories and corresponding element weights applicable to a variety of scenarios. This method does not require the construction of matching element categories and element weights for different scenarios, thereby improving processing efficiency.

[0061] S402: Based on the initial intent, obtain the initial element matching each element category; and based on the candidate intent, obtain the candidate element matching each element category.

[0062] In one embodiment, after the initial intent is acquired, the initial intent is input into the intelligent analysis model, so that the initial intent is analyzed by the intelligent analysis model, and the initial elements matching each element category are extracted. Similarly, for the candidate intents matching the initial intent, the intelligent analysis model is used to analyze each candidate intent, and the candidate elements matching each element category are extracted.

[0063] In one implementation scenario, when information matching the element category cannot be extracted from the initial intent, the number "0" or an empty set is used as the corresponding initial element.

[0064] In a specific application scenario, when the initial intention is "consultation on materials for reporting a credit card lost in a different place", the initial elements extracted using the intelligent analysis model include "business instance: credit card", "operation instance: reporting a loss", "business type: consultation", and "condition factor (location): out of town", and the element weight corresponding to "business instance: credit card" is 0.3, the element weight corresponding to "operation instance: reporting a loss" is 0.3, the element weight corresponding to "business type: consultation" is 0.2, and the element weight corresponding to "condition factor (location): out of town" is 0.2.

[0065] S403: The element category corresponding to the same initial element and candidate element is taken as the target category, and the relative fuzziness is obtained based on the target category and the element weight matching the target category.

[0066] In one embodiment, for the initial intent and each candidate intent, the initial elements corresponding to the initial intent and the candidate elements corresponding to the candidate intent are input into the intelligent analysis model, so that the intelligent analysis model aligns the initial elements with the candidate elements according to the element categories, and takes the element categories corresponding to the same initial elements and candidate elements as the target categories.

[0067] It should be noted that when a certain element category includes multiple subcategories, the initial elements corresponding to the element category include initial subelements that match each subcategory; similarly, the candidate elements corresponding to the element category include candidate subelements that match each subcategory. And, only when all the initial subelements corresponding to the element category are consistent with all the candidate subelements corresponding to the element category, the element category is used as the target category. For example, for the element category "conditional factors", the initial elements corresponding to the initial intent include "location", and the initial elements corresponding to the candidate elements include "location" and "cost", then the initial elements corresponding to the "conditional factors" are inconsistent with the candidate elements, and the "conditional factors" cannot be used as the target category.

[0068] Furthermore, the relative ambiguity between the initial intent and the corresponding candidate intent is obtained based on the target category and the element weights of the target category matching.

[0069] Specifically, for the initial intent and the corresponding candidate intent, the first sum of the weights of the elements matching all the corresponding target categories is obtained. The difference between the first value and the first sum is taken as the corresponding relative ambiguity. The specific calculation formula of the relative ambiguity is as follows:

[0070]

[0071] Where i represents the relative ambiguity and n represents the number of initial elements of the initial intent. j Indicates the hit status of the jth initial element, and its value is 0 or 1. When the jth initial element corresponds to the same candidate element, that is, when the element category corresponding to the jth initial element is the target category, S j The value of S is 1; otherwise, j The value of W is 0. j Represents the factor weight corresponding to the jth initial factor.

[0072] In another embodiment, in order to improve the accuracy of the intelligent analysis model in extracting and aligning elements, the intelligent analysis model is fine-tuned in advance before step S401. The fine-tuning method includes Chain of Thought (CoT) or supervised fine-tuning (SFT).

[0073] See also Figure 5 , Figure 5 yes Figure 1 Step S103 corresponds to a flowchart of an implementation method.

[0074] Specifically, the implementation process of step S103 includes:

[0075] S501: Based on the relative ambiguity, select a reference intent that matches the initial intent from the candidate intents.

[0076] In one implementation, candidate intentions whose relative ambiguity is less than a preset threshold are sorted in ascending order of relative ambiguity to obtain an intention sequence.

[0077] Further, the intention sequence is divided into a first subsequence and a second subsequence, and the candidate intentions in the first subsequence are used as reference intentions, wherein the relative ambiguity corresponding to any candidate intention in the first subsequence is smaller than the relative ambiguity corresponding to any candidate intention in the second subsequence.

[0078] Specifically, according to a predetermined reference quantity, the reference sequence is divided so that the first subsequence contains the reference quantity of candidate intents, and all candidate intents in the first subsequence are used as reference intents. The specific value of the reference quantity can be obtained by relevant technical personnel through estimation, or can also be obtained through multiple experimental reverse deductions.

[0079] The above scheme compares the relative ambiguity with the preset threshold to preliminarily screen out candidate intents with high relevance to the initial intent, which helps to improve the accuracy of intent recognition. In addition, it should be noted that when all relative ambiguities are greater than or equal to the preset threshold, it means that the candidate intent related to the initial intent cannot be obtained. In order to improve the accuracy of intent recognition, a prompt message is directly generated and fed back to the user. For example, the prompt message is "The information you entered cannot be understood, please re-enter your requirements."

[0080] In another embodiment, to improve processing efficiency, all candidate intents matching the initial intent are sorted in ascending order of relative fuzziness to obtain an intent sequence, and a reference number of candidate intents are selected from the intent sequence as reference intents.

[0081] S502: Based on the reference intent, obtain intent reference information, and use the initial intent and the intent reference information to obtain the target intent.

[0082] In one implementation, all reference intentions are concatenated to obtain intention reference information, obtain follow-up information based on the intention reference information, and feed back the follow-up information to the user.

[0083] Specifically, the intention reference information is input into the intelligent analysis model, so that the intelligent analysis model analyzes the intention reference information, generates follow-up information, and feeds back the follow-up information to the user.

[0084] Further, in response to obtaining supplementary information given by the user based on the follow-up information, the target intention is obtained based on the supplementary information and the initial intention.

[0085] Specifically, after obtaining the supplementary information given by the user based on the follow-up information, the supplementary information and the initial intention are re-input into the intelligent analysis model, so that the intelligent analysis model summarizes the supplementary information and the initial intention information to generate a target intention with clear intention.

[0086] In a specific application scenario, the user's initial intention is "I want to ask about my credit card", and the reference intentions obtained through the above corresponding implementation methods include "Credit card application" and "Credit card loss report", then the reference intentions are spliced ​​and input into the intelligent analysis model, and the follow-up information is obtained as "Hello, I am not sure what credit card business you want to consult, are you consulting about credit card application or credit card loss report?" In response to the supplementary information provided by the user, "I want to consult about credit card loss report", the target intention finally obtained is "I want to consult about my credit card loss report".

[0087] In another embodiment, after obtaining the reference intent, multiple candidate options corresponding to the ambiguous information in the initial intent are generated according to the initial intent given by the user and all the reference intents, and the candidate options are fed back to the user. In response to obtaining the user's selection of any candidate option, a target intent with a clear intention is generated based on the initial intent and the user's selection. The multiple candidate options are generated by summarizing and generalizing the reference intent by the intelligent analysis model.

[0088] In a specific application scenario, the user's initial intention is "I want to ask about my credit card". The reference intentions obtained through the above corresponding implementation methods include "Credit card application" and "Credit card loss report". The intelligent analysis model generates corresponding candidate options: "Application" and "Report loss", and displays these two options to the user. In response to the user clicking the "Report loss" option, the target intention finally obtained is "I want to consult about my credit card loss report".

[0089] The above scheme obtains reference intent through screening, and obtains supplementary information to clarify the ambiguous information in the initial intent through interaction with the user, thereby clarifying the user's initial intent based on the supplementary information, and effectively improving the accuracy of intent recognition.

[0090] In another embodiment, the present application also proposes an intent processing method, including obtaining the user's target intent through the method mentioned in any of the above embodiments, and processing the target intent. For example, when the user's target intent is "I want to consult about reporting my credit card lost", the corresponding function is called to explain the relevant process of reporting the credit card lost to the user.

[0091] See also Figure 6 , Figure 6 1 is a schematic diagram of the structure of the intention recognition system of the present application. The intention recognition system comprises an acquisition module 10, a first processing module 20 and a second processing module 30 which are coupled to each other.

[0092] Specifically, the acquisition module 10 is used to acquire the initial intent input by the user, and acquire candidate intents related to the initial intent from the intent database.

[0093] The first processing module 20 is used to obtain the relative ambiguity between the initial intention and each candidate intention; wherein the relative ambiguity is determined based on the degree of matching between the initial elements of the initial intention and the candidate elements of the corresponding candidate intention, and the relative ambiguity is inversely proportional to the degree of matching.

[0094] The second processing module 30 is used to obtain intention reference information based on candidate intentions and their corresponding relative ambiguities, and obtain the target intention using the initial intention and the intention reference information.

[0095] In one embodiment, the first processing module 20 obtains the relative ambiguity between the initial intent and each candidate intent, including: obtaining a plurality of predetermined element categories; wherein each element category is matched with a corresponding element weight; based on the initial intent, obtaining an initial element matching each element category; and, based on the candidate intent, obtaining a candidate element matching each element category; taking the element category corresponding to the same initial element and candidate element as the target category, and obtaining the relative ambiguity based on the target category and the element weight matching the target category.

[0096] In one embodiment, please continue to refer to Figure 6The intent recognition system proposed in the present application also includes a construction module 40 coupled to the acquisition module 10, and the construction module 40 is used to obtain multiple sets of construction information, and generate intent text based on the construction information; wherein the construction information includes an intent name and a description text matching the intent name; obtain a preset template, and obtain a construction intent based on the preset template, the construction information and the corresponding intent text; wherein the construction intent is used to construct an intent database.

[0097] In one embodiment, after the construction module 40 obtains the construction intent based on the preset template, construction information and corresponding intent text, it includes: obtaining a first vector corresponding to the construction intent, and storing the first vector in the intent database. Among them, the acquisition module 10 obtains the initial intent input by the user, and obtains candidate intents related to the initial intent from the intent database, including: obtaining the initial intent input by the user; obtaining a second vector corresponding to the initial intent, and based on the matching degree between the first vector and the second vector, selecting the intent name corresponding to at least part of the construction intent in the intent database as the candidate intent.

[0098] In one embodiment, the second processing module 30 obtains intention reference information based on candidate intentions and their corresponding relative ambiguity, and obtains the target intention using the initial intention and the intention reference information, including: based on the relative ambiguity, selecting a reference intention that matches the initial intention from the candidate intentions; based on the reference intention, obtaining intention reference information, and obtaining the target intention using the initial intention and the intention reference information.

[0099] In one embodiment, the second processing module 30 selects a reference intention that matches the initial intention from the candidate intentions based on the relative ambiguity, including: sorting the candidate intentions whose relative ambiguity is less than a preset threshold in order of relative ambiguity from small to large to obtain an intention sequence; dividing the intention sequence into a first subsequence and a second subsequence, and taking the candidate intentions in the first subsequence as reference intentions; wherein the relative ambiguity corresponding to any candidate intention in the first subsequence is less than the relative ambiguity corresponding to any candidate intention in the second subsequence.

[0100] In one embodiment, the second processing module 30 uses the initial intent and the intention reference information to obtain the target intent, including: obtaining follow-up information based on the intention reference information, and feeding back the follow-up information to the user; in response to obtaining supplementary information given by the user based on the follow-up information, obtaining the target intent based on the supplementary information and the initial intent.

[0101] See also Figure 7 , Figure 7: It is a structural diagram of an embodiment of an electronic device of the present application. The electronic device includes: a memory 50 and a processor 60 coupled to each other. The memory 50 stores program instructions, and the processor 60 is used to execute the program instructions to implement the intention recognition method mentioned in any of the above embodiments. Specifically, the electronic device includes but is not limited to: a desktop computer, a laptop computer, a tablet computer, a server, etc., which are not limited here. In addition, the processor 60 can also be called a CPU (Center Processing Unit). The processor 60 may be an integrated circuit chip with signal processing capabilities. The processor 60 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 60 can be implemented by an integrated circuit chip.

[0102] See also Figure 8 , Figure 8 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. The computer-readable storage medium 70 stores program instructions 80 that can be run by a processor. When the program instructions 80 are executed by the processor, the intention recognition method mentioned in any of the above embodiments is implemented.

[0103] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, 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, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0104] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0105] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0106] If the integrated unit is implemented in the form of 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 technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0107] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for intention recognition, characterized in that: include: Obtaining an initial intent input by a user, and obtaining candidate intents related to the initial intent from an intent database; Acquire a relative ambiguity between the initial intention and each of the candidate intentions; wherein the relative ambiguity is determined based on a matching degree between an initial element of the initial intention and a candidate element corresponding to the candidate intention, and the relative ambiguity is inversely proportional to the matching degree; Based on the candidate intentions and the corresponding relative ambiguity, intention reference information is acquired, and the target intention is obtained by using the initial intention and the intention reference information.

2. The method according to claim 1, characterized in that The obtaining of the relative ambiguity between the initial intention and each of the candidate intentions includes: Acquire a plurality of predetermined element categories, wherein each of the element categories is matched with a corresponding element weight; Based on the initial intention, obtaining the initial element matching each element category; and based on the candidate intention, obtaining the candidate element matching each element category; The element category corresponding to the same initial element and the candidate element is taken as a target category, and the relative ambiguity is obtained based on the target category and the element weight matching the target category.

3. The method according to claim 1, characterized in that Also includes: Acquire multiple sets of build information, and generate intent text based on the build information; wherein the build information includes an intent name and a description text matching the intent name; Obtain a preset template, and obtain a construction intent based on the preset template, the construction information and the corresponding intention text; wherein the construction intent is used to construct the intention database.

4. The method according to claim 3, characterized in that After obtaining the construction intention based on the preset template, the construction information and the corresponding intention text, the method includes: Obtaining a first vector corresponding to the construction intention, and storing the first vector in the intention database; The obtaining of the initial intent input by the user and obtaining candidate intents related to the initial intent from the intent database includes: Get the initial intention of the user input; A second vector corresponding to the initial intent is obtained, and based on the degree of match between the first vector and the second vector, the intent names corresponding to at least part of the constructed intents in the intent database are selected as the candidate intents.

5. The method according to claim 1, characterized in that The acquiring of intention reference information based on the candidate intention and the relative ambiguity corresponding thereto, and obtaining the target intention by using the initial intention and the intention reference information, comprises: Based on the relative ambiguity, selecting a reference intent matching the initial intent from the candidate intents; Based on the reference intent, the intent reference information is acquired, and the target intent is obtained by using the initial intent and the intent reference information.

6. The method according to claim 5, characterized in that The selecting, based on the relative ambiguity, a reference intent matching the initial intent from the candidate intents comprises: The candidate intentions whose relative ambiguity is less than a preset threshold are sorted in ascending order of the relative ambiguity to obtain an intention sequence; The intention sequence is divided into a first subsequence and a second subsequence, and the candidate intentions in the first subsequence are used as the reference intentions; wherein the relative ambiguity corresponding to any candidate intention in the first subsequence is less than the relative ambiguity corresponding to any candidate intention in the second subsequence.

7. The method according to claim 5, characterized in that The obtaining the target intent by using the initial intent and the intent reference information includes: Based on the intention reference information, obtaining follow-up information, and feeding back the follow-up information to the user; In response to obtaining the supplementary information given by the user based on the follow-up information, the target intention is obtained based on the supplementary information and the initial intention.

8. An intention recognition system, characterized in that: include: An acquisition module, used to acquire an initial intent input by a user, and acquire candidate intents related to the initial intent from an intent database; A first processing module, configured to obtain a relative ambiguity between the initial intention and each of the candidate intentions; wherein the relative ambiguity is determined based on a matching degree between an initial element of the initial intention and a candidate element corresponding to the candidate intention, and the relative ambiguity is inversely proportional to the matching degree; The second processing module is used to obtain intention reference information based on the candidate intentions and the corresponding relative ambiguity, and obtain the target intention using the initial intention and the intention reference information.

9. An electronic device, characterized in that: include: A memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the intention recognition method as described in any one of claims 1-7.

10. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the intention recognition method as described in any one of claims 1-7 is implemented.

Citation Information

Cited By

  • Intention recognition method, system and related device

    CN120973908A