Intention recognition method and device, equipment and medium
By combining query information and contextual information, generating candidate intents using a large model, and combining them with standardized business intents, the problem of extending traditional intent recognition methods in new scenarios is solved, achieving high-quality and flexible intent recognition.
Patent Information
- Application Number
- CN202510871479.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-10-28
AI Technical Summary
Existing intent recognition methods rely on predefined intent labels and fixed features, which makes it difficult to cope with frequently changing business needs, resulting in insufficient expansion and intent recognition quality in new scenarios.
By combining query information and contextual information of the current interactive object, similar historical intent recognition cases are retrieved, and candidate intents are generated using a large model. Finally, the intents are determined by combining them with standardized business intents, thus achieving flexible intent recognition.
It eliminates the need to redesign fixed intent labels, enabling it to handle frequently changing business needs, ensuring the quality and flexibility of intent recognition, and adapting to different business scenarios.
Smart Images

Figure CN120849546A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to an intent recognition method, intent recognition device, computer equipment, and computer-readable storage medium. Background Art
[0002] With the rapid development of artificial intelligence technology, intelligent customer service is gradually becoming an important tool for improving enterprise service efficiency and optimizing customer experience. For example, in the insurance claims scenario in the fintech field, intelligent customer service can interact with policyholders to answer their questions about different stages such as insurance application, claims reporting, and claims settlement. Similarly, in the medication inquiry scenario in the healthcare field, intelligent customer robots can converse with policyholders to meet their needs for medication knowledge, advice, and recommendations. Understandably, the interaction between intelligent customer service and its users relies heavily on recognizing the user's intent; only by accurately identifying the user's intent can accurate interaction be achieved. Summary of the Invention
[0003] The present invention provides an intent recognition method, intent recognition device, computer equipment, and computer-readable storage medium, which can improve the quality and flexibility of intent recognition.
[0004] Firstly, an intent recognition method is provided, including: Combine the current query information input by the current interactive object with the context information corresponding to the current query information to obtain the target query information; Retrieve historical intent identification cases that are similar to the target query information. Historical intent identification cases include historical target query information corresponding to historical interaction objects, and historical target intents corresponding to historical interaction objects. Based on the target query information and historical intent recognition cases, construct intent generation prompt text, and input the intent generation prompt text into a large model to generate candidate intents corresponding to the current interaction object; Retrieve standardized business intents similar to candidate intents, and determine the target intent of the current interaction object based on the standardized business intents and candidate intents.
[0005] Secondly, an intent recognition device is provided, comprising: The information combination module is used to combine the current query information input by the current interactive object with the context information corresponding to the current query information to obtain the target query information; The case retrieval module is used to retrieve historical intent recognition cases that are similar to the target query information. Historical intent recognition cases include historical target query information corresponding to historical interaction objects, and historical target intents corresponding to historical interaction objects. The intent generation module is used to construct intent generation prompt text based on target query information and historical intent recognition cases, and to input the intent generation prompt text into a large model to generate candidate intents corresponding to the current interaction object. The intent normalization module is used to retrieve business-standardized intents similar to candidate intents, and to determine the target intent of the current interaction object based on the business-standardized intents and candidate intents.
[0006] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the above-described intent recognition method.
[0007] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps in the aforementioned intent recognition method.
[0008] In the scheme implemented by the aforementioned intent recognition method, apparatus, device, and medium, the target query information is obtained by combining the current query information input by the current interactive object and the context information corresponding to the current query information; historical intent recognition cases similar to the target query information are retrieved, including historical target query information corresponding to historical interactive objects and historical target intents corresponding to historical interactive objects; intent generation prompt text is constructed based on the target query information and historical intent recognition cases, and the intent generation prompt text is input into a large model to generate candidate intents corresponding to the current interactive object; business-standardized intents similar to the candidate intents are retrieved, and the target intent of the current interactive object is determined based on the business-standardized intents and candidate intents. It is understood that traditional intent recognition methods based on classification models rely on predefined intent labels and fixed features (such as keywords and syntactic patterns), making it difficult to cope with frequently changing business needs. However, this invention, by combining large model prompt generation with knowledge-enhanced retrieval, eliminates the need to redesign fixed intent labels; expansion to new scenarios only requires adjusting the knowledge base content or optimizing the prompt text, thus enabling it to cope with frequently changing business needs. Furthermore, by using predefined business standardization intents to constrain the final determined target intents, the determined target intents are associated with the business, and the quality of intent recognition is also ensured. Attached Figure Description
[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. 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 paying any creative labor.
[0010] Figure 1 This is a schematic diagram of the application environment of the intent recognition method in one embodiment of the present invention; Figure 2 This is a flowchart illustrating an intent recognition method according to an embodiment of the present invention; Figure 3 This is an example diagram of an interface intended for standardization in one embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an intent recognition device in one embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 6 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0011] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0012] The intent recognition method provided in this embodiment of the invention can be applied to, for example... Figure 1 In the application environment shown, the client communicates with the server via a network. The server can receive the current query information input by the current interactive object transmitted by the client, and obtain the context information corresponding to the current query information. Then, it combines the current query information and the context information to obtain the target query information; further, it retrieves historical intent recognition cases similar to the target query information. These historical intent recognition cases include historical dialogue information between historical interactive objects and historical target intents corresponding to historical interactive objects; it constructs intent generation prompt text based on the target query information and historical intent recognition cases, and inputs the intent generation prompt text into a large model to generate candidate intents corresponding to the current interactive object; it retrieves business-standardized intents similar to the candidate intents, and determines the target intent of the current interactive object based on the retrieved business-standardized intents and candidate intents. The client can include, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.
[0013] Please see Figure 2 As shown, Figure 2A flowchart illustrating the intent recognition method provided in this embodiment of the invention includes the following steps: S110, combine the current query information input by the current interactive object with the context information corresponding to the current query information to obtain the target query information.
[0014] The following description uses the execution of the intent recognition method provided by this invention on the server side as an example.
[0015] In this embodiment of the invention, after receiving the current query information input by the current interactive object transmitted by the client, the server obtains the context information of the current query information. The context information includes a preset number of dialogue messages between the server and the current interactive object prior to receiving the current query information. The value of the preset number of messages is not specifically limited here and can be configured by those skilled in the art according to actual needs.
[0016] Furthermore, the server, according to the configured information combination strategy, combines the current query information input by the current interaction object with the corresponding context information to obtain structured target query information. For example, the target query information is configured as follows: Contextual information: [A summary of the original contextual information]; Current query information: [Original description of the current query information].
[0017] For example, the server interacts with the user (i.e., the interactive object) at the application level in the form of intelligent customer service. On June 14, the server received the current query information of the current interactive object - the user, and the previous dialogue information is as follows: (June 10) Question: "What documents do I need to prepare to apply for car insurance claims?" (June 10) Answer: "You need to submit the accident report, driver's license, ID card, and vehicle registration certificate. Once all the documents are complete, the review will be conducted within 24 hours." (June 13) Question: "I submitted the information through the app yesterday (June 12), but the status is still 'pending review'. What's going on?" (June 13) Answer: "We have checked for you. The system shows that the information has been received and the review is expected to be completed before 6 pm today." (June 14, current query information) Question: "It's already 3 pm on June 14, and I still haven't received the review result. The processing is too slow!"
[0018] The combined target query information is as follows: Contextual information: On June 10, the user inquired about car insurance claim materials, and was told that four documents, including an accident report, were required, with a promise to review them within 24 hours; after submitting the materials on June 12, the user received feedback on June 13 that the claim was "pending review," and was told that the claim would be completed "before 6 PM today." Current query information: It's already 3 PM on June 14th, and I still haven't received the review result. The processing is too slow!
[0019] S120, retrieve historical intent identification cases similar to the target query information. The historical intent identification cases include historical target query information corresponding to historical interaction objects and historical target intents corresponding to historical interaction objects.
[0020] As described above, after combining the current query information input by the current interaction object with the corresponding context information to obtain the target query information, the server further retrieves historical intent recognition cases similar to the target query information request from the historical intent recognition cases recorded in the knowledge base. These historical intent recognition cases are recorded by the server during previous intent recognition processes, including historical target query information corresponding to historical interaction objects and historical target intents corresponding to those objects. It is understood that in practical applications, the historical interaction object and the current interaction object can be the same object or different objects.
[0021] For example, please refer to the following historical intent identification case record table: It should be noted that for each recorded historical intent recognition case, in this embodiment of the invention, the server uses an embedding model (there is no specific restriction on which embedding model to use, and it can be selected by those skilled in the art according to actual needs) to embed the historical target query information into a representation vector of fixed dimensions (which can be selected by those skilled in the art according to actual needs, such as 768 dimensions), which is denoted as the index vector of the historical intent recognition case.
[0022] When retrieving historical intent recognition cases similar to the target query information, the server uses the same embedding model as above to embed the target query information into a representation vector, and then calculates the similarity between the representation vector corresponding to the target query information and the index vectors of different historical intent recognition cases (for example, cosine similarity can be calculated). The historical intent recognition cases corresponding to the index vectors whose similarity reaches the first similarity threshold (which can be determined by those skilled in the art according to actual needs, and no specific restrictions are made here) are regarded as historical intent recognition cases similar to the target query information.
[0023] For example, taking the historical intent recognition cases recorded in the historical intent recognition case record table shown in Table 1 above as an example, assuming that the similarity between the representation vector of the target query information and the index vector of the historical intent recognition cases Case001-Case003 is calculated to be 0.96, 0.81, and 0.65 respectively, if the first similarity threshold is configured to 0.80, then the historical intent recognition cases Case001 and Case002 will be retrieved as historical intent recognition cases similar to the target query information.
[0024] S130: Construct intent generation prompt text based on target query information and historical intent recognition cases, and input the intent generation prompt text into a large model to generate candidate intents corresponding to the current interaction object.
[0025] Large models refer to machine learning models with a large number of parameters and complex structures, capable of processing massive amounts of data and completing various complex tasks, such as natural language processing, computer vision, and speech recognition. In this embodiment of the invention, the large model used for intent recognition can be selected by those skilled in the art as needed; it can be a large language model, a multimodal large model, etc.
[0026] In this embodiment of the invention, after retrieving historical intent recognition cases similar to the target query information, the server further constructs intent generation prompt text to guide the large model in intent generation according to the configured prompt construction strategy, based on the target query information and historical intent recognition cases. The configuration of the prompt construction strategy is not specifically limited here and can be configured by those skilled in the art according to actual needs. Accordingly, after constructing the intent generation prompt text, it is input into the large model, which generates an intent corresponding to the current interaction object, recorded as a candidate intent.
[0027] For example, the intent to generate the prompt text is: You are an intelligent intent recognition assistant, and you need to recognize the user's intent based on the following information: The following is the target query information for the current interactive object: Contextual information: On June 10th, a user inquired about car insurance claim materials. The response was that four documents, including an accident report, were required, and a promise to review the claim within 24 hours was made. After submitting the materials on June 12th, the user received feedback on June 13th that the claim was "pending review," with the response that it would be completed "before 6 PM today." Current query information: It's already 3 PM on June 14th, and the review result still hasn't been received. The processing is too slow!
[0028] The following are examples of historical intent identification retrieved that are similar to the target query information: Historical Target Query Information: Historical Context Information: On May 1st, the user inquired about car insurance claim materials, and was told that four documents, including an accident report, were required, with a promise to review within 24 hours; after submitting the materials on May 1st, the user received feedback of "pending review" on May 2nd, with the reply "to be completed before 6 PM today"; Historical Query Information: It's already May 3rd, and the review result still hasn't been received! → Historical Target Intent: Complaint about the claims process; Historical Target Inquiry Information: Historical Context Information: On May 12, the user inquired about car insurance claim materials, and was told that four documents, including an accident report, were required and a promise was made to review them within 24 hours; after the user submitted the materials on May 13, feedback was received on May 14 that the application was "pending review," and the reply was "to be completed before 6 PM today"; Historical Inquiry Information: Two days have passed, and the review result has not yet been received. How much longer will it take? → Historical Target Intent: Claim progress inquiry.
[0029] Please complete the following task: Generate the core intent of the current interaction object.
[0030] Input the intent-generated prompt text constructed above into the large model to obtain the candidate intent "complaint and claims process" corresponding to the current interactive object output by the large model.
[0031] S140, retrieve business-standardized intents similar to candidate intents, and determine the target intent of the current interaction object based on the business-standardized intents and candidate intents.
[0032] It should be noted that, based on actual business logic, the embodiments of the present invention also predefine multiple standardized business intents adapted to the business in the knowledge base. For example, for insurance claims in the fintech field, standardized business intents such as claims process consultation, claims progress inquiry, and claims objection complaint are predefined; for medication inquiry in the healthcare field, standardized business intents such as drug usage and dosage consultation, drug side effects consultation, and drug storage consultation are predefined.
[0033] For each standardized business intent, the server uses an embedding model to embed it into a fixed-dimensional representation vector, denoted as the index vector of that standardized business intent. Similarly, when retrieving standardized business intents similar to candidate intents, the server uses the same embedding model to embed the candidate intent into its corresponding representation vector, then calculates the similarity between the representation vector corresponding to the candidate intent and different standardized business intents. The standardized business intents corresponding to the index vectors whose similarity reaches the second similarity threshold (which can be determined by those skilled in the art according to actual needs, without specific restrictions here) are considered as standardized business intents similar to the candidate intents.
[0034] As shown above, after retrieving standardized business intents similar to candidate intents, the server determines the target intent of the current interaction object based on the candidate intents and their similar standardized business intents. For example, the server can directly determine the standardized business intents similar to candidate intents as the target intent of the current interaction object.
[0035] In addition, the server will record the target query information and the final determined target intent in this intent recognition process as intent recognition cases for reference in subsequent intent recognition processes.
[0036] Optionally, in one embodiment, constructing intent-generating prompt text based on target query information and historical intent recognition cases includes: Based on the historical business scenarios corresponding to the historical intent identification cases, determine the reference business scenario corresponding to the current interaction object; It acquires business knowledge corresponding to the reference business scenario, and constructs intent-generating prompt text based on business knowledge, target query information, and historical intent recognition cases.
[0037] It should be noted that the intent recognition method provided by this invention, as the underlying implementation of intelligent customer service, can support different business scenarios, such as insurance claims and medication inquiry, etc.
[0038] In this embodiment of the invention, for each historical intent recognition case, based on the historical target intent included in the historical intent recognition case and the preset correspondence between intent and business scenario, the business scenario corresponding to the historical target intent is recorded as the historical business scenario of the historical intent recognition case. The correspondence between intent and business scenario can be set by those skilled in the art according to actual business needs, and is not specifically limited here. For example, intents such as complaints about policy cancellation progress, inquiries about policy cancellation progress, and supplementation of policy cancellation materials correspond to insurance claims scenarios; intents such as medication knowledge inquiries, medication advice inquiries, and medication recommendations correspond to medication inquiry scenarios, and so on.
[0039] Accordingly, when constructing the intent-generating prompt text based on the target query information and historical intent recognition cases, the server first determines the reference business scenario corresponding to the current interaction object based on the historical business scenarios corresponding to the historical intent recognition cases. Specifically, the server can determine the historical business scenario that appears most frequently among the historical business scenarios corresponding to the historical intent recognition cases as the reference business scenario for the current interaction object.
[0040] Business knowledge refers to domain-specific professional information strongly tied to specific business scenarios, and its content is directly related to the execution logic of business processes. For example, in a medication inquiry scenario, "describing side effects in drug instructions" and "dietary restrictions for postoperative recovery" are considered business knowledge; in an insurance claims scenario, "the reimbursement scope of comprehensive medical insurance" and "response timeliness rules for complaint handling" are also considered business knowledge, and so on. In this embodiment of the invention, business knowledge for different business scenarios is predefined.
[0041] As shown above, after determining the reference business scenario corresponding to the current interaction object, the server further obtains the business knowledge corresponding to the reference business scenario, and constructs the intent generation prompt text based on the business knowledge, the target query information obtained above, and historical intent recognition cases.
[0042] For example, taking the insurance claims scenario as an example, the intent generation prompt text is constructed as follows: You are an intelligent intent recognition assistant, and you need to recognize the user's intent based on the following information: The following is the core process of insurance claims: 1. Filing a case: Call the case filing hotline within 48 hours of the accident and provide the policy number, accident time / location, and vehicle information to complete the case filing; 2. Document Submission: The following documents are required: original policy, insured's ID card, accident liability determination letter (or photos of the accident scene), and repair invoice; 3. Review and Loss Assessment: Initial review within 3 working days; if on-site inspection is required, a loss assessor will be arranged. 4. Payment: The claim will be paid to the insured's account within 5 business days after approval. 5. Handling of objections: For objections to claim rejection or amount, a review application can be submitted.
[0043] The following is the target query information for the current interactive object: Contextual information: On June 10th, a user inquired about car insurance claim materials. The response was that four documents, including an accident report, were required, and a promise to review the claim within 24 hours was made. After submitting the materials on June 12th, the user received feedback on June 13th that the claim was "pending review," with the response that it would be completed "before 6 PM today." Current query information: It's already 3 PM on June 14th, and the review result still hasn't been received. The processing is too slow!
[0044] The following are examples of historical intent identification retrieved that are similar to the target query information: Historical Target Query Information: Historical Context Information: On May 1st, the user inquired about car insurance claim materials, and was told that four documents, including an accident report, were required, with a promise to review within 24 hours; after submitting the materials on May 1st, the user received feedback of "pending review" on May 2nd, with the reply "to be completed before 6 PM today"; Historical Query Information: It's already May 3rd, and the review result still hasn't been received! → Historical Target Intent: Complaint about the claims process; Historical Target Inquiry Information: Historical Context Information: On May 12, the user inquired about car insurance claim materials, and was told that four documents, including an accident report, were required and a promise was made to review them within 24 hours; after the user submitted the materials on May 13, feedback was received on May 14 that the application was "pending review," and the reply was "to be completed before 6 PM today"; Historical Inquiry Information: Two days have passed, and the review result has not yet been received. How much longer will it take? → Historical Target Intent: Claim progress inquiry.
[0045] Please complete the following task: Generate the core intent of the current interaction object.
[0046] Optionally, in one embodiment, determining the target intent of the current interaction object based on the business standardization intent and candidate intents includes: Based on business knowledge, target query information, candidate intents and standardized business intents, an intent verification prompt text is constructed, and the intent verification prompt text is input into the large model to obtain the intent verification results of standardized business intents and candidate intents. The intent verification results are used to indicate whether the standardized business intents and candidate intents match the target query information. Based on the business standardization intent, candidate intents, and intent verification results, determine the target intent of the current interaction object.
[0047] It should be noted that the large model is essentially a "general-purpose intelligent agent," whose capabilities do not depend on "dedicated models," but rather are guided to perform specific tasks through input prompts. The intent generation of the large model is essentially "probabilistic prediction," limited by the ambiguity of information description (e.g., "low efficiency" may refer to "processing timeliness" or "service response") and the inadequacy of knowledge fusion (e.g., ignoring "timeliness thresholds" in business knowledge). A single generation may deviate from the actual needs. Therefore, to ensure that the final determined target intent matches the actual needs of the current interaction object, the large model is also used to verify the intent.
[0048] Specifically, the process involves constructing intent verification prompt text based on business knowledge, target query information, candidate intents, and standardized business intents. This text is then input into the same large model used for intent generation. The large model verifies whether the standardized business intents and candidate intents match the target query information and outputs the corresponding intent verification results. Finally, based on the standardized business intents, candidate intents, and intent verification results, the target intent of the current interactive object is determined.
[0049] For example, taking "complaint efficiency" as the candidate intent and "claims progress complaint" as the business standardization intent, the constructed intent verification prompt text could be: You are an intelligent intent verification expert, and you need to verify whether the following candidate intents and standardized intents meet the user's needs based on the following information: The following is the core process of insurance claims: 1. Filing a case: Call the case filing hotline within 48 hours of the accident and provide the policy number, accident time / location, and vehicle information to complete the case filing; 2. Document Submission: The following documents are required: original policy, insured's ID card, accident liability determination letter (or photos of the accident scene), and repair invoice; 3. Review and Loss Assessment: Initial review within 3 working days; if on-site inspection is required, a loss assessor will be arranged. 4. Payment: The claim will be paid to the insured's account within 5 business days after approval. 5. Handling of objections: For objections to claim rejection or amount, a review application can be submitted.
[0050] The following is the target query information for the current interactive object: Contextual information: On June 10th, a user inquired about car insurance claim materials. The response was that four documents, including an accident report, were required, and a promise to review the claim within 24 hours was made. After submitting the materials on June 12th, the user received feedback on June 13th that the claim was "pending review," with the response that it would be completed "before 6 PM today." Current query information: It's already 3 PM on June 14th, and the review result still hasn't been received. The processing is too slow!
[0051] Please complete the following tasks: 1. Determine whether the candidate intent "complaint efficiency" matches the overall demand expressed in the target query information. If they do not match, explain why. 2. Determine whether the business standardization intent "claims progress complaint" matches the overall demand expressed by the target query information. If they do not match, the reason must be explained.
[0052] Input the above intent verification prompt text into the large model, and obtain the intent verification result output by the large model: 1. Matching of candidate intent "complaint efficiency": Match; 2. Business standardization intent "Claims progress complaints" matching: Match.
[0053] As can be seen from the above, the intent generation and intent verification in this embodiment of the invention use the same large model. Essentially, through "functionally differentiated Prompt design," the "general intelligence" of the large model is decomposed into two stages: "generation" and "verification," forming a closed-loop mechanism of "self-checking." This solves the uncertainty of single generation and enhances interpretability by utilizing contextual consistency.
[0054] Optionally, in one embodiment, determining the target intent of the current interaction object based on the business standardization intent, candidate intents, and intent verification results includes: If the intent verification result indicates that the standardized business intent matches the target query information, then the standardized business intent is determined as the target intent of the current interaction object; or, If the intent verification result indicates that the standardized business intent does not match the target query information, but the candidate intent matches the target query information, then the candidate intent is determined as the target intent of the current interaction object.
[0055] In this embodiment of the invention, the priority of the business standardization intent is higher than that of the candidate intent. As long as the business standardization intent matches the target query information, the business standardization intent is determined as the target intent of the current interaction object, regardless of whether the candidate intent matches the target query information. When the candidate intent matches the target query information, the candidate intent is determined as the target intent of the current interaction object only if the business standardization intent does not match the target query information.
[0056] Optionally, in one embodiment, after determining the candidate intent as the target intent of the current interaction object, the method further includes: The candidate intents are standardized to obtain the business-standardized intents corresponding to the candidate intents.
[0057] It is understood that in this embodiment of the invention, a candidate intent will only be determined as the target intent of the current interaction object when the business standardization intent similar to the candidate intent does not match the target query information, and the candidate intent matches the target query information. In other words, if there is no corresponding candidate intent in the current business standardization intent, the server will perform standardization processing on the candidate intent to obtain the business standardization intent corresponding to the candidate intent.
[0058] For example, please refer to Figure 3 The server can display an intent standardization interface, which includes target query information from which the candidate intent originates, prompt information for inputting a business standard intent corresponding to the candidate intent, input controls in the form of input boxes, cancellation and confirmation controls, and business standard intents corresponding to the candidate intents that are received through the input controls.
[0059] Optionally, in one embodiment, to ensure a fallback output for intent recognition, the target intent of the current interaction object is determined based on the standardized business intent, candidate intents, and intent verification results, further including: If the intent verification result indicates that neither the standardized business intent nor the candidate intent matches the target query information, then the target query information is input into the intent classification model for intent classification to obtain the target intent of the current interaction object.
[0060] In this embodiment of the invention, an intent classification model is also pre-trained. The intent classification model is configured to take target query information as input and output the predicted probability that the target query information belongs to different preset intents. Here, no specific restrictions are placed on the model architecture and training method of the intent classification model, which can be selected by those skilled in the art according to actual needs.
[0061] Correspondingly, when the intent verification result indicates that the business-standard intent and candidate intent do not match the target query information, the target query information is input into the intent classification model for intent classification to obtain the probability that the target query information belongs to different preset intents, and the preset intent with the highest probability is determined as the target intent of the current interaction object.
[0062] For example, there are two predefined intents: "business consultation" and "business complaint". For a target query, assuming the intent classification model classifies the intent of the target query and finds that the probability of the target query belonging to "business consultation" is 0.8 and the probability of belonging to "business complaint" is 0.2, then "business consultation" is determined as the target intent of the current interaction object.
[0063] Optionally, in one embodiment, after determining the target intent of the current interaction object based on the business standardization intent and candidate intents, the method further includes: If there are multiple target intentions, then determine the execution priority corresponding to each target intention; According to the execution priority corresponding to each objective intent, the business operations corresponding to each objective intent are executed in sequence.
[0064] In this embodiment of the invention, when there are multiple target intents for the current interaction object, the server determines the execution priority of each target intent according to the configured priority determination strategy. Then, the business operations corresponding to each target intent are executed sequentially in descending order of their execution priorities. The configuration of the priority determination strategy is not specifically limited here and can be configured by those skilled in the art according to actual needs.
[0065] For example, in this embodiment of the invention, a priority determination strategy prioritizing negative emotions is adopted. For instance, assuming that the target intent of the current interaction object is determined to be two, namely "complaint about the cancellation progress" and "inquiry about the cancellation progress", where "complaint about the cancellation progress" belongs to negative emotions and "inquiry about the cancellation progress" belongs to neutral emotions, the execution priority corresponding to "complaint about the cancellation progress" is determined to be higher than that of "inquiry about the cancellation progress". First, the business operation corresponding to "complaint about the cancellation progress" is executed: create a work order for abnormal verification of the claim progress, and have the technical team investigate and review the system failure and prioritize manual intervention; then, the business operation corresponding to "inquiry about the cancellation progress" is executed: call the "claim progress inquiry interface" to obtain the real-time cancellation progress, and return the obtained cancellation progress to the customer service terminal, which is then displayed to the current interaction object by the client.
[0066] As described above, this invention obtains target query information by combining the current query information input by the current interactive object with the context information corresponding to the current query information; it retrieves historical intent recognition cases similar to the target query information, including historical target query information and historical target intents corresponding to historical interactive objects; it constructs intent generation prompt text based on the target query information and historical intent recognition cases, and inputs the intent generation prompt text into a large model to generate candidate intents corresponding to the current interactive object; it retrieves business-standardized intents similar to the candidate intents, and determines the target intent of the current interactive object based on the business-standardized intents and candidate intents. It is understood that traditional intent recognition methods based on classification models rely on predefined intent labels and fixed features (such as keywords and syntactic patterns), making it difficult to cope with frequently changing business needs. This invention, by combining large model prompt generation with knowledge-enhanced retrieval, eliminates the need to redesign fixed intent labels; expansion to new scenarios only requires adjusting the knowledge base content or optimizing the prompt text, thus addressing frequently changing business needs. Furthermore, using predefined business-standardized intents to constrain the final determined target intent ensures that the determined target intent is related to the business and also guarantees the quality of intent recognition.
[0067] In one embodiment, the present invention provides an intent recognition device, which corresponds one-to-one with the intent recognition methods described in the above embodiments. For example... Figure 4 As shown, the intent recognition device includes an information combination module 210, a case retrieval module 220, an intent generation module 230, and an intent normalization module 240. Detailed descriptions of each functional module are as follows: The information combination module 210 is used to combine the current query information input by the current interactive object and the context information corresponding to the current query information to obtain the target query information; The case retrieval module 220 is used to retrieve historical intent recognition cases similar to the target query information. The historical intent recognition cases include historical target query information corresponding to historical interaction objects and historical target intents corresponding to historical interaction objects. The intent generation module 230 is used to construct intent generation prompt text based on target query information and historical intent recognition cases, and to input the intent generation prompt text into a large model to generate candidate intents corresponding to the current interaction object through the large model; The intent normalization module 240 is used to retrieve business-standardized intents similar to candidate intents, and to determine the target intent of the current interaction object based on the business-standardized intents and candidate intents.
[0068] Optionally, in one embodiment, the intent generation module 230 is used to determine a reference business scenario corresponding to the current interactive object based on the historical business scenarios corresponding to the historical intent recognition cases; obtain business knowledge corresponding to the reference business scenario; and construct intent generation prompt text based on the business knowledge, target query information and historical intent recognition cases.
[0069] Optionally, in one embodiment, the intent recognition device provided by the present invention further includes an intent verification module, which is used to construct intent verification prompt text based on business knowledge, target query information, candidate intents and business standardization intents, and input the intent verification prompt text into a large model to obtain intent verification results of business standardization intents and candidate intents. The intent verification results are used to indicate whether business standardization intents and candidate intents match the target query information. The intent normalization module 240 is used to determine the target intent of the current interaction object based on business standardization intents, candidate intents and intent verification results.
[0070] Optionally, in one embodiment, the intent normalization module 240 is configured to: if the intent verification result indicates that the business-standardized intent matches the target query information, then determine the business-standardized intent as the target intent of the current interaction object; or, if the intent verification result indicates that the business-standardized intent does not match the target query information, and the candidate intent matches the target query information, then determine the candidate intent as the target intent of the current interaction object.
[0071] Optionally, in one embodiment, the intent recognition device provided by the present invention further includes an intent standardization module, which is used to standardize the candidate intent after the intent normalization module 240 determines the candidate intent as the target intent of the current interaction object, so as to obtain the business standardized intent corresponding to the candidate intent.
[0072] Optionally, in one embodiment, the intent normalization module 240 is further configured to, if the intent verification result indicates that the business-standardized intent and the candidate intent do not match the target query information, input the target query information into the intent classification model for intent classification to obtain the target intent of the current interaction object.
[0073] Optionally, in one embodiment, the intent recognition device provided by the present invention further includes an intent execution module, which is used to determine the execution priority of each target intent if there are multiple target intents, and to execute the business operations corresponding to each target intent in sequence according to the execution priority of each target intent.
[0074] For specific limitations regarding the intent recognition device, please refer to the limitations of the intent recognition method above, which will not be repeated here. Each module in the aforementioned intent recognition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0075] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the steps of the intent recognition method described in the above embodiments.
[0076] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with a target external server via a network connection. When the computer program is executed by the processor, it implements the steps of the intent recognition method described in the above embodiments.
[0077] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the intent recognition method described in the above embodiment, such as: Combine the current query information input by the current interactive object with the context information corresponding to the current query information to obtain the target query information; Retrieve historical intent identification cases that are similar to the target query information. Historical intent identification cases include historical target query information corresponding to historical interaction objects, and historical target intents corresponding to historical interaction objects. Based on the target query information and historical intent recognition cases, construct intent generation prompt text, and input the intent generation prompt text into a large model to generate candidate intents corresponding to the current interaction object; Retrieve standardized business intents similar to candidate intents, and determine the target intent of the current interaction object based on the standardized business intents and candidate intents.
[0078] In one embodiment, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the intent recognition method described in the above embodiments, such as: Combine the current query information input by the current interactive object with the context information corresponding to the current query information to obtain the target query information; Retrieve historical intent identification cases that are similar to the target query information. Historical intent identification cases include historical target query information corresponding to historical interaction objects, and historical target intents corresponding to historical interaction objects. Based on the target query information and historical intent recognition cases, construct intent generation prompt text, and input the intent generation prompt text into a large model to generate candidate intents corresponding to the current interaction object; Retrieve standardized business intents similar to candidate intents, and determine the target intent of the current interaction object based on the standardized business intents and candidate intents.
[0079] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0080] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0081] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0082] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
[0083] It should be noted that the software tools or components not belonging to our company that appear in the embodiments of this invention are merely illustrative examples and do not represent actual use.
Claims
1. An intent recognition method, characterized in that, include: The target query information is obtained by combining the current query information input by the current interactive object and the context information corresponding to the current query information; Retrieve historical intent recognition cases similar to the target query information, wherein the historical intent recognition cases include historical target query information corresponding to historical interaction objects, and historical target intents corresponding to the historical interaction objects; Based on the target query information and the historical intent recognition cases, an intent generation prompt text is constructed, and the intent generation prompt text is input into a large model to generate candidate intents corresponding to the current interaction object. Retrieve standardized business intents similar to the candidate intents, and determine the target intent of the current interaction object based on the standardized business intents and the candidate intents.
2. The intent recognition method according to claim 1, characterized in that, The step of constructing intent-generating prompt text based on the target query information and the historical intent recognition cases includes: Based on the historical business scenarios corresponding to the historical intent recognition cases, a reference business scenario corresponding to the current interaction object is determined; Obtain business knowledge corresponding to the reference business scenario, and construct intent-generating prompt text based on the business knowledge, the target query information, and the historical intent recognition cases.
3. The intent recognition method according to claim 2, characterized in that, Determining the target intent of the current interaction object based on the standardized business intent and the candidate intents includes: Based on the business knowledge, the target query information, the candidate intent, and the standardized business intent, an intent verification prompt text is constructed, and the intent verification prompt text is input into the large model to obtain the intent verification results of the standardized business intent and the candidate intent. The intent verification results are used to indicate whether the standardized business intent and the candidate intent match the target query information. Based on the business standardization intent, the candidate intents, and the intent verification results, the target intent of the current interaction object is determined.
4. The intent recognition method according to claim 3, characterized in that, Determining the target intent of the current interaction object based on the standardized business intent, the candidate intents, and the intent verification result includes: If the intent verification result indicates that the standardized business intent matches the target query information, then the standardized business intent is determined as the target intent of the current interaction object; or, If the intent verification result indicates that the business standard intent does not match the target query information, and the candidate intent matches the target query information, then the candidate intent is determined as the target intent of the current interaction object.
5. The intent recognition method according to claim 4, characterized in that, After determining the candidate intent as the target intent of the current interaction object, the method further includes: The candidate intents are standardized to obtain the business-standardized intents corresponding to the candidate intents.
6. The intent recognition method according to claim 4, characterized in that, The step of determining the target intent of the current interaction object based on the business standardization intent, the candidate intents, and the intent verification result further includes: If the intent verification result indicates that neither the business standard intent nor the candidate intent matches the target query information, then the target query information is input into the intent classification model for intent classification to obtain the target intent of the current interaction object.
7. The intent recognition method according to any one of claims 1-6, characterized in that, After determining the target intent of the current interaction object based on the standardized business intent and the candidate intents, the method further includes: If there are multiple target intentions, then determine the execution priority corresponding to each target intention; According to the execution priority corresponding to each of the stated target intentions, the business operations corresponding to each stated target intention are executed sequentially.
8. An intent recognition device, characterized in that, include: The information combination module is used to combine the current query information input by the current interactive object and the context information corresponding to the current query information to obtain the target query information; The case retrieval module is used to retrieve historical intent recognition cases similar to the target query information. The historical intent recognition cases include historical target query information corresponding to historical interaction objects and historical target intents corresponding to the historical interaction objects. The intent generation module is used to construct intent generation prompt text based on the target query information and the historical intent recognition cases, and to input the intent generation prompt text into a large model to generate candidate intents corresponding to the current interaction object through the large model; The intent normalization module is used to retrieve business-standardized intents similar to the candidate intents, and to determine the target intent of the current interaction object based on the business-standardized intents and the candidate intents.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the intent recognition method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the intent recognition method as described in any one of claims 1 to 7.