Intention recognition method and device

By generating rhetorical question text using a large language model and performing further intent recognition on the target response, the problem of limited content in existing technologies is solved, thereby improving the accuracy of intent recognition and enhancing the user experience.

CN121579667APending Publication Date: 2026-02-27JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411080879.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing intent recognition technologies, when faced with unfamiliar data, often present limited and unspecific questions, leading to inaccurate intent recognition and a poor user experience.

Method used

By performing intent recognition on the text to be recognized, generating a rhetorical question using a pre-trained large language model, and receiving the target response from the user, the intent recognition of the target response is performed again until the final intent recognition result is determined. A cutoff condition is set to avoid infinite loops.

Benefits of technology

It improves the accuracy of intent recognition and user experience, guides users to clarify their intent through rich and targeted rhetorical questions, and enhances the efficiency of human-computer dialogue and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121579667A_ABST
    Figure CN121579667A_ABST
Patent Text Reader

Abstract

The invention discloses an intention recognition method, and relates to the technical field of computers. A specific embodiment of the method comprises the steps of performing intention recognition on a to-be-recognized text, and determining a recognition result; in response to an intention represented by the recognition result as a preset intention, generating a reverse question text corresponding to the recognition result by using a pre-trained large language model, displaying the reverse question text to the user, and receiving a target response fed back by the user based on the reverse question text; performing intention recognition on the target response again, and determining a final intention recognition result of the to-be-recognized text according to a recognition result of the target response; according to the invention, the user can be guided to clarify the intention through rich and targeted anti-question content, so that the intention recognition accuracy and the user experience are 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 computer technology, and in particular to an intention recognition method and device. BACKGROUND

[0002] The intention recognition technology is used for analyzing and understanding the language input of a user to determine the intention or requirement of the user. However, once the existing intention recognition technology encounters a similar data that has not been seen before, the intention recognition judgment of the user is ambiguous, and a bottom-up solution is usually used for reply.

[0003] In the process of implementing the present application, the inventors have found that at least the following problems exist in the related art:

[0004] The counter-question content of the bottom-up solution is single, lacks pertinence and definiteness, and is not accurate in recognizing the intention of the user, and the user experience is insufficient. SUMMARY

[0005] Therefore, the embodiments of the present application provide an intention recognition method and device, which can guide the user to clarify the intention through rich and targeted counter-question content, and thus improve the accuracy of intention recognition and the user experience.

[0006] To achieve the above object, according to an aspect of the embodiments of the present application, an intention recognition method is provided, comprising:

[0007] Performing intention recognition on the to-be-recognized text to determine a recognition result;

[0008] In response to the intention represented by the recognition result being a preset intention, generating a counter-question text corresponding to the recognition result by using a pre-trained large language model, and displaying the counter-question text to the user, and receiving a target response feedback by the user based on the counter-question text;

[0009] Performing intention recognition on the target response again, and determining a final intention recognition result of the to-be-recognized text according to the recognition result of the target response.

[0010] Further, determining the final intention recognition result of the to-be-recognized text according to the recognition result of the target response comprises:

[0011] In response to the intention represented by the recognition result of the target response being a non-pre-set intention, taking the recognition result of the target response as the final intention recognition result of the to-be-recognized text;

[0012] In response to the intention represented by the identification result of the target response still being the preset intention, the large language model is used again to generate the counter-question text corresponding to the identification result of the target response, and the generated counter-question text is again displayed to the user until the intention represented by the identification result of the target response fed back by the user is the non-pre-set intention, and the identification result of the target response corresponding to the non-pre-set intention is determined as the final intention identification result.

[0013] Further, before the counter-question text is displayed to the user, the method further includes:

[0014] risk detection is performed on the counter-question text to obtain a detection result of the counter-question text;

[0015] In response to the detection result being a pass, the counter-question text is displayed to the user;

[0016] In response to the detection result being a fail, the counter-question text is deleted, and a new counter-question text is generated using a preset preset scheme, and the new counter-question text is displayed to the user.

[0017] Further, the method further includes:

[0018] The large language model is iteratively optimized according to the counter-question text and the target response fed back by the user based on the counter-question text.

[0019] Further, the method further includes:

[0020] An intention identification request of the to-be-identified text sent by the user is obtained; wherein the intention identification request includes demand text information sent by the user through the terminal;

[0021] The pre-trained intention identification model is used to perform natural language analysis and processing based on the demand text information to obtain the identification result.

[0022] Further, the method further includes:

[0023] The intention identification model is iteratively optimized according to the demand text information and the identification result.

[0024] According to a second aspect of an embodiment of the present application, an intention identification device is provided, including:

[0025] An intention identification result module is configured to perform intention identification on the to-be-identified text to determine an identification result;

[0026] A counter-question result module is configured to, in response to the intention represented by the identification result being a preset intention, use a pre-trained large language model to generate a counter-question text corresponding to the identification result, and display the counter-question text to the user, and receive a target response fed back by the user based on the counter-question text;

[0027] The consciousness clarification module is configured to perform intent recognition on the target response again, and determine a final intent recognition result of the text to be recognized according to the recognition result of the target response.

[0028] According to a third aspect of the embodiments of the present application, an electronic device is provided, comprising:

[0029] one or more processors;

[0030] a storage device configured to store one or more programs,

[0031] When the one or more programs are executed by the one or more processors, the one or more processors implement the method of any of the above embodiments.

[0032] According to a fourth aspect of the embodiments of the present application, a computer readable medium is provided, which stores a computer program, and the program is executed by a processor to implement the method of any of the above embodiments.

[0033] According to a fifth aspect of the embodiments of the present application, a computer program product is provided, which comprises a computer program, and the computer program is executed by a processor to implement the method of any of the above embodiments.

[0034] One embodiment of the above application has the following advantages or beneficial effects: by performing intent recognition on the text to be recognized to determine a recognition result, in response to the intent represented by the recognition result being a preset intent, using a pre-trained large language model to generate a counter-question text corresponding to the recognition result and displaying the counter-question text to the user, and receiving a target response feedback by the user based on the counter-question text, performing intent recognition on the target response again, and determining a final intent recognition result of the text to be recognized according to the recognition result of the target response; the user can be guided to clarify the intent through rich and targeted counter-question content, thereby improving the accuracy of intent recognition and the user experience.

[0035] The further effects of the above non-conventional optional mode will be described in the following combined with the specific embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0036] The accompanying drawings are used to better understand the present application, and do not constitute an improper limitation on the present application. Among them:

[0037] Figure 1 is a schematic diagram of the main process of the intent recognition method according to an embodiment of the present application;

[0038] Figure 2 is a schematic diagram of the main process of the intent recognition method according to a reference embodiment of the present application;

[0039] Figure 3is a schematic diagram of the main flow of an intent recognition method according to another exemplary embodiment of the present application;

[0040] Figure 4 is a schematic diagram of the main flow of an intent recognition method according to another exemplary embodiment of the present application;

[0041] Figure 5 is a schematic diagram of the main modules of an intent recognition apparatus according to an embodiment of the present application;

[0042] Figure 6 is an exemplary system architecture diagram to which embodiments of the present application can be applied;

[0043] Figure 7 is a structural schematic diagram of a computer system of a terminal device or a server suitable for implementing embodiments of the present application. DETAILED DESCRIPTION

[0044] Exemplary embodiments of the present application are described below with reference to the accompanying drawings, which include various details of the embodiments of the present application to assist in understanding, which should be considered in their context only. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Also, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0045] It should be noted that the acquisition, storage and application of personal information and the like involved in embodiments of the present application comply with relevant laws and regulations and do not violate public order and good customs.

[0046] The intent recognition technology is used to analyze and understand the language input of the user to determine the intent or needs of the user. However, the existing intent recognition technology is ambiguous in identifying the intent of the user once it encounters similar data that has not been seen before, and usually uses a bottom-up solution to reply, the content of the bottom-up solution is single, lacks pertinence and definiteness, and the intent recognition of the user is not accurate, and the user experience is insufficient.

[0047] For example, current e-commerce platforms prioritize quality and user experience, and excellent customer service is a crucial guarantee. With increasing customer traffic, using intelligent customer service robots is imperative. Understanding user intent is key in the robot's service delivery process. Existing technologies rely on classification and matching models to identify user intent and provide corresponding solutions. However, based on existing intent recognition technologies, when the model hasn't encountered similar data, it often provides a fallback response. Typically, these fallback responses are generic and lack specificity, leading users to continue asking broad, unfocused questions in subsequent conversations. General counter-questions, such as "What help do you need?", are simplistic, lack specificity and clarity, and result in a poor user experience. General counter-questions may also be too euphemistic and vague, failing to directly convey the key point, and in some cases, leading to decreased communication efficiency and making it difficult for users to clearly articulate their intent in subsequent conversations.

[0048] In view of this, according to one aspect of the present invention, an intent recognition method is provided.

[0049] Figure 1 This is a schematic diagram illustrating the main flow of the intent recognition method according to an embodiment of the present invention. Figure 1 As shown, the present invention includes, according to an embodiment of the invention:

[0050] Step S101: Perform intent recognition on the text to be recognized and determine the recognition result.

[0051] The text to be identified is the question text entered by real online users. Typically, user-inputted questions may be unclear, vague, or incomplete. Examples include: shopping-related questions such as "Do you have any suitable clothes?", "I need something new", "I'm looking for a nice gift", "This washing machine", "Ordered", or "Can't find it", etc.; service-related questions such as "What's special about your company?", "This service", "I need help", or "Can you tell me more?"; technical support-related questions such as "My computer is having problems", "I'm having trouble", "How do I fix this error?", or "What's wrong with me?"; travel planning-related questions such as "I want to go somewhere fun", "I need some suggestions", "Tell me some attractions", or "What's good to eat?"; or health-related questions such as "I'm not feeling well", "Any health suggestions?", or "I need some suggestions to improve my lifestyle", etc. This embodiment does not specifically limit the text to be identified.

[0052] The process involves several steps: First, the user-input text is subjected to intent recognition. This includes preprocessing the text, such as removing special characters and punctuation, converting it to lowercase, or performing word segmentation. The preprocessed text is then converted into features that the intent recognition model can understand. This can be done using methods like word vectors to represent the text in numerical form. Next, a defined intent recognition model is trained using labeled training data. This model can employ statistical methods (such as Naive Bayes), machine learning methods (such as support vector machines and decision trees), and deep learning methods (such as recurrent neural networks, convolutional neural networks, and pre-trained language models). The trained intent recognition model is then validated using a validation dataset to assess its performance and check its generalization ability on new data. Based on the validation results, the model's hyperparameters are adjusted to improve its performance and stability. Finally, the trained intent recognition model is used to predict the intent of the text. The model outputs the desired recognition result, which includes both preset and non-preset intents.

[0053] Preset intents are a mechanism in dialogue systems used to handle situations where the model cannot accurately identify the user's intent. When a user's input question or request does not belong to the explicit intent that the model has been trained to recognize, preset intents serve as a backup approach, preventing the system from providing a meaningful answer when it cannot understand the user. Non-preset intents, on the other hand, refer to user input questions that are successfully recognized as having explicit meaning and have been trained by the machine. Unlike preset intents, non-preset intents represent the machine's ability to accurately understand the user's core needs and provide specific answers or perform relevant actions accordingly. In dialogue systems, non-preset intents are typically associated with specific business scenarios or functions. For example, a user might make explicit requests such as shopping, checking the weather, or booking flights. The system, through intent recognition, can accurately determine the user's purpose and respond accordingly.

[0054] In step S102, in response to the intention represented by the recognition result being a preset intention, a rhetorical question text corresponding to the recognition result is generated using a pre-trained large language model, and the rhetorical question text is displayed to the user, and the user's target response based on the rhetorical question text is received.

[0055] Specifically, when the recognition result of the text to be recognized is a preset intent, since the problem corresponding to the preset intent is not covered by the existing intent system, this embodiment of the invention introduces a pre-trained large-scale language model to generate rhetorical question text. Typically, large-scale language models have a vast knowledge system and powerful creative capabilities, and can ask users targeted rhetorical questions. Compared with the rhetorical question text generated by the general large-scale language model, the rhetorical question text is more guiding and also incorporates heartwarming care, thus improving the user experience.

[0056] For example, a typical rhetorical question might be "Could you please briefly describe your problem again?" or "How can I help you?"; while a large-scale language model generates different rhetorical questions, such as: for the user's input question "this washing machine", the large-scale language model generates the rhetorical question "What problem did you encounter with the washing machine you bought?"; for the user's input question "order placed", the large-scale language model generates the rhetorical question "Thank you for your support, is there anything else I can help you with?"; for the user's input question "not found", the large-scale language model generates the rhetorical question "I'm sorry to hear you say that, could you tell me specifically what you couldn't find?".

[0057] An interactive user interface is set up in the dialogue system to display the question text to the user. This could be a webpage, application, or chat window. Specifically, the user interface can display the chat history, showing the user's dialogue history in text form, including user input and system responses. The question text is highlighted in the system's responses, using special symbols, colors, font styles, etc. Dialog boxes, speech bubbles, or other forms can be used to present the interaction between the user and the system in a conversational manner. If the question text contains a problem or requires more information from the user, corresponding interactive options, such as buttons or input boxes, can be provided on the user interface to facilitate the user's feedback. For example, if the question text is: "What type of goods do you want to buy?", the dialogue history is displayed on the user interface, and this sentence is highlighted with special markers (e.g., bold, different colors). At the same time, buttons or drop-down menus can be provided on the user interface to allow the user to select the specific type of goods, so that the system can better understand the user's needs.

[0058] Receiving a target response from a user based on a rhetorical question can be achieved by providing corresponding interactive elements in the user interface. These elements allow users to easily respond to the system's questions, including text input boxes, multiple-choice buttons, radio buttons, checkboxes, confirmation buttons, and voice input. For example, if the system's question requires a text response, a text input box can be placed on the user interface for the user to type their answer. If the question contains selectable options, corresponding buttons, checkboxes, or dropdown menus can be displayed for the user to select. If the user can only choose one from several predefined options, a radio button can be provided. Multiple-choice boxes can be provided to allow users to select multiple options, including those of interest. A confirmation button can be displayed to allow the user to confirm the target response. A voice input button can also be provided to allow the user to answer the question verbally. The user's selected or entered target response can be passed to the system through a corresponding interface. The system can then proceed with the appropriate business logic based on the user's response. This interactive design improves the user experience and facilitates communication between the user and the system.

[0059] Step S103: Perform intent recognition on the target response again, and determine the final intent recognition result of the text to be recognized based on the recognition result of the target response.

[0060] Specifically, the target response received in step S102 is subjected to the intent recognition process described in step 101 again. The specific implementation details have been explained in steps S101 and S102 above, and therefore will not be repeated here. Based on the recognition result of the target response, the final intent recognition result of the text to be recognized is determined as follows: Figure 2 The described examples.

[0061] This invention, through intent recognition of the text to be recognized, determines the recognition result. If the recognition result corresponds to a preset intent, a rhetorical question is generated using a pre-trained large-scale language model based on the recognition result. This rhetorical question is then displayed to the user, and the user's target response based on the rhetorical question is received. The target response is then subjected to intent recognition again, and the final intent recognition result of the text to be recognized is determined based on the recognition result of the target response. This method can guide users to clarify their intent through rich and targeted rhetorical questions, thereby improving the accuracy of intent recognition and the user experience. This invention, through its intent clarification method using a large-scale language model to generate rhetorical question text, utilizes the characteristics of a large-scale language model to ask users questions corresponding to preset intents during the process of intelligent customer service robots serving users. This guides users to clarify their intent, improves the efficiency of human-computer dialogue, and enriches the user experience.

[0062] Figure 2This is a schematic diagram illustrating the main flow of an intent recognition method according to a possible embodiment of the present invention. Figure 2 As shown, the final intent recognition result of the text to be recognized is determined based on the recognition result of the target response, including:

[0063] The intent represented by the recognition result of the target response is a non-preset intent, and the recognition result of the target response is taken as the final intent recognition result of the text to be recognized.

[0064] If the intent represented by the recognition result of the target response is still the preset intent, the large language model is used again to generate a rhetorical question text corresponding to the recognition result of the target response, and the generated rhetorical question text is shown to the user again. This process continues until the user feedback that the intent represented by the recognition result of the target response is not the preset intent. At this point, the recognition result of the target response corresponding to the non-preset intent is determined as the final intent recognition result.

[0065] Specifically, as described in step S101, the text to be identified is subjected to intent recognition, the recognition result is determined, and it is determined whether the recognition result is the preset intent in step S102. If it is the preset intent, it is determined whether the cutoff condition is met. If the cutoff condition is not met, then according to step S102, a rhetorical question is generated using a pre-trained large-scale language model based on the recognition result. The rhetorical question is displayed to the user, and the user's target response based on the rhetorical question is received. The target response is subjected to intent recognition again as described in step S101, the recognition result is determined, and it is determined whether the recognition result is the preset intent in step S102. If it is not the preset intent, the recognition result of the target response is taken as the final intent recognition result of the text to be identified. If it is the preset intent, it is determined whether the cutoff condition is met. If the cutoff condition is met, the recognition result of the target response is taken as the final intent recognition result of the text to be identified. If the cutoff condition is not met, then according to step S102, a rhetorical question is generated again using a pre-trained large-scale language model based on the recognition result. The regenerated rhetorical question is displayed to the user, and the user's target response based on the rhetorical question is received. The loop continues until the cutoff condition is met.

[0066] The determination of the cutoff condition depends on the system design and business requirements. For example, the cutoff condition could be reaching a maximum number of attempts, setting a threshold for the maximum number of attempts. If the system loops after a specified number of attempts, the threshold could be 3, 5, or 10 attempts, etc. Alternatively, it could be user-initiated interruption; if the user stops interacting midway or explicitly indicates they do not want to continue providing information, the system can end the loop. It could also be due to overly vague questions; if the user's input is too ambiguous and the system still cannot understand it after a certain number of attempts, it can choose to end the loop and provide a general response or guide the user to provide more specific information. Finally, it could be reaching a system confidence threshold; if the intent recognition model's confidence in the user's input falls below a certain threshold, the system can consider the current recognition result unreliable and end the loop. In practical applications, the choice of cutoff condition should be adjusted according to the specific dialogue system and user needs, balancing user experience and system robustness, ensuring that while seeking clarification from the user during the loop, it does not fall into an infinite loop or provide confusing follow-up questions.

[0067] This invention improves the accuracy of intent recognition and user experience by determining whether the recognition result of the target response is a preset intent; if not, the recognition result of the target response is taken as the final intent recognition result of the text to be recognized; if so, a rhetorical question is generated based on the recognition result using a pre-trained large-scale language model, the rhetorical question is displayed to the user, and the target response based on the user's feedback is received; the intent of the target response fed back by the user is recognized again, and the final intent recognition result of the text to be recognized is determined based on the recognition result, thereby improving the accuracy of user intent recognition and user experience.

[0068] Furthermore, the embodiments of the present invention set a cutoff condition, which can ensure that the system stops trying after a certain number of attempts or stages, avoiding resource waste and getting stuck in an infinite loop. It can limit the number of times the system asks questions or asks back to the user. Setting a reasonable cutoff condition can avoid excessively disturbing the user, improve the efficiency and friendliness of the overall interaction, and better manage the system performance when resources are limited.

[0069] Optionally, pre-trained large-scale language models include chat generation pre-trained converters, Tongyi Qianwen language models, or Baichuan language models.

[0070] Large-scale Language Modeling (LLM) refers to the techniques for building and training large-scale natural language processing models. These models use deep learning and natural language processing algorithms to learn and understand the structure, meaning, and usage of human language. The key to LLM technology lies in the massive amounts of data and computational resources required to train the model. During training, the model learns language concepts, grammatical rules, and semantic relationships by reading large corpora of text, thereby generating coherent and logical sentences to answer questions and complete various natural language processing tasks. Currently, LLM technology is applied in multiple fields, such as machine translation, text generation, question-answering systems, and intelligent dialogue.

[0071] Large-scale language models include Chat Generative Pre-trained Transformer (ChatGPT), Qwen, or Baichuan.

[0072] Figure 3 This is a schematic diagram of the main flow of an intent recognition method according to another applicable embodiment of the present invention. Figure 3 As shown, before displaying the rhetorical question text to the user, the following steps are also included:

[0073] Step S301: Perform risk detection on the rhetorical question text and obtain the detection result of the rhetorical question text;

[0074] Step S302: In response to the detection result being a pass, the question text is displayed to the user;

[0075] In step S303, in response to the detection result being that the detection failed, the rhetorical question text is deleted, and a new rhetorical question text is generated using a preset scheme, and the new rhetorical question text is displayed to the user.

[0076] Specifically, the rhetorical question text undergoes preprocessing, including removing special characters and punctuation marks, converting to lowercase letters, and performing word segmentation. The preprocessed text is then converted into features understandable to the risk detection model, using word vectors or other representation methods. Risk detection can employ traditional machine learning methods or deep learning models, depending on the application's needs and data. The risk detection model is trained using labeled training data, aiming to enable it to recognize different types of risky text. The trained model is validated using a validation dataset to evaluate its performance and check its generalization ability on new data. The trained risk detection model performs risk detection on the rhetorical question text, outputting a probability or label indicating whether the text contains risky content. Appropriate actions are taken based on the detection results: if the detection is successful, the rhetorical question text is displayed to the user; if it fails, the text is deleted, a new rhetorical question text is generated using a pre-defined scheme, and displayed to the user. The system can also take restrictive measures, such as warning the user, blocking content, or logging events. In addition to mitigating risks through risk models combined with rules (regular expressions, keywords), risk mitigation can also be achieved through corresponding specifications set during the model's training process. In practical applications, different models and algorithms can be selected based on specific scenarios and needs, and the models can be continuously optimized and updated based on real-time data.

[0077] This invention performs rigorous risk detection on the rhetorical questions generated by a large-scale language model. If the generated content involves sensitive topics such as pornography or violence, it needs to be removed, and the original preset solution is used to ask the rhetorical question to enter the next round of dialogue. If no risk is involved, the rhetorical question text is displayed to the user to advance the next round of dialogue. This can promptly detect and respond to network security threats to ensure the security of information systems, maintain the platform's good image, protect users from inappropriate or harmful content, help ensure that behavior complies with laws and regulations, prevent potential legal liabilities and fines, reduce threats to user safety, and reduce the risk of user privacy exposure.

[0078] Optionally, risk detection is performed on the rhetorical question text, including: using a pre-trained risk detection model, the rhetorical question text is used as input for risk detection.

[0079] Risk detection models can include rule-based models, statistical models, machine learning models, decision trees, support vector machines, neural networks, ensemble learning, deep learning models, natural language processing models, graph analysis models, and reinforcement learning models, among others. These models can be used individually or in combination, depending on the application scenario, available data, and performance requirements. In practical applications, the model needs to be selected and adjusted based on the characteristics of the specific problem and the features of the data.

[0080] Optionally, the method further includes iteratively optimizing the large language model based on the question text and the user's target response based on the question text.

[0081] Specifically, after generating the rhetorical question text and receiving the user's target response, the accuracy and effectiveness of the user feedback are evaluated. If the user's response to the rhetorical question text accurately clarifies or confirms their intent, this feedback data is labeled and used to further train the large language model. In this way, the model can continuously learn the user's true intent and reaction patterns, gradually improving the rhetorical question text generation strategy. During iterative optimization, a large amount of user interaction data is collected and analyzed, especially rhetorical question-response pairs that successfully clarify intent. This data is used as part of the training set, enabling the large language model to better understand intent expressions in different contexts. The training process can employ supervised learning or reinforcement learning methods, fine-tuning the model's parameters by introducing new training data, thereby improving the accuracy and relevance of the large language model in generating rhetorical question text. Furthermore, user feedback can be used for dynamic adjustments, i.e., updating and optimizing the model in real time during practical applications. Through regular iterative optimization, the model can not only adapt to constantly changing user needs but also improve its ability to handle various complex dialogue scenarios. Ultimately, through continuous iterative optimization, the large language model becomes more intelligent and efficient, better meeting user needs and improving the accuracy of intent recognition and user experience.

[0082] Figure 4 This is a schematic diagram of the main flow of an intent recognition method according to another embodiment of the present invention. Figure 4 As shown, intent recognition is performed on the text to be recognized, and the recognition result is determined, including:

[0083] Step S401: Obtain the intent recognition request of the text to be recognized sent by the user; wherein, the intent recognition request includes the request text information sent by the user through the terminal;

[0084] Step S402: Based on the demand text information, natural language analysis is performed using a pre-trained intent recognition model to obtain the recognition result.

[0085] Specifically, the system listens for and receives text messages sent by users through terminals (e.g., applications, web pages, chat windows, etc.), which may be user-generated questions, requests, or other interactive text; preprocesses the received text messages; constructs the preprocessed text messages into an intent recognition request format, including encapsulating the text into a request object, constructing a data structure, or organizing it according to the system requirements; sends the constructed intent recognition request to the intent recognition model or service, which may be done through network requests, API calls, or other suitable communication methods; waits for the response from the intent recognition model or service, performs natural language analysis on the user input, and returns a response containing the recognized intent and related information; parses the response returned by the intent recognition model, extracts the recognized intent and possible related information, including determining the user's core needs and extracting entity information; and executes step S102 based on the recognition results.

[0086] Intent recognition models are commonly used in the field of natural language processing, with the goal of determining the user's intent contained in text. Intent recognition models include rule-based models, statistical models, machine learning models, deep learning models, transfer learning models, ensemble learning models, sequence labeling models, or attention mechanism models, among others. In practical applications, the choice of intent recognition model depends on the complexity of the task, the scale and characteristics of the available data, and the real-time requirements of the system.

[0087] Optionally, the method further includes iteratively optimizing the intent recognition model based on the required text information and the recognition results.

[0088] Specifically, after the system generates recognition results based on user-defined textual information, the accuracy and effectiveness of these results are evaluated. User feedback or actual execution results are used to assess the performance of the current intent recognition model in processing this textual information. If the recognition results are accurate and meet user needs, these successful cases are recorded as positive samples; if the results are inaccurate or fail to meet user needs, they are recorded as negative samples. Positive and negative sample data are used for further training and optimization of the intent recognition model. The training process can employ supervised learning methods, where positive samples reinforce the model's correct recognition ability, while negative samples help the model correct errors and improve its predictive ability. During iterative optimization, the intent recognition model continuously updates its parameters and structure to improve the recognition accuracy for various textual information. Regular model retraining can also be performed, with batch updates based on newly collected data. Furthermore, an active learning mechanism can be introduced, selecting representative or easily confused samples for focused learning to further improve model performance. In this way, the intent recognition model can dynamically adapt to changes in user needs, continuously improving its processing capabilities, enabling it to accurately understand and respond to user intent in various contexts. This iterative optimization not only improves the model's accuracy but also enhances its generalization ability, making it more stable when processing unseen text.

[0089] According to a second aspect of the embodiments of the present invention, such as Figure 5 As shown, an intent recognition device 500 is provided, comprising:

[0090] The intent recognition result module 501 is used to perform intent recognition on the text to be recognized and determine the recognition result.

[0091] The awareness-based questioning result module 502 is used to generate questioning text corresponding to the recognition result in response to the intention represented by the recognition result being a preset intention, using a pre-trained large language model, displaying the questioning text to the user, and receiving the user's target response based on the questioning text.

[0092] The awareness clarification module 503 is used to re-identify the intent of the target response and determine the final intent recognition result of the text to be identified based on the recognition result of the target response.

[0093] Optionally, the consciousness clarification module 503 is also used for:

[0094] The intent represented by the recognition result of the target response is a non-preset intent, and the recognition result of the target response is taken as the final intent recognition result of the text to be recognized.

[0095] If the intent represented by the recognition result of the target response is still the preset intent, the large language model is used again to generate a rhetorical question text corresponding to the recognition result of the target response, and the generated rhetorical question text is shown to the user again. This process continues until the user feedback that the intent represented by the recognition result of the target response is not the preset intent. At this point, the recognition result of the target response corresponding to the non-preset intent is determined as the final intent recognition result.

[0096] Optionally, the consciousness-questioning result module 502 is also used for:

[0097] Perform risk detection on the rhetorical question text and obtain the detection results;

[0098] In response to a successful detection result, a question text will be displayed to the user.

[0099] In response to a failure result, the rhetorical question text is deleted, and a new rhetorical question text is generated using a preset scheme and displayed to the user.

[0100] Optionally, the intent recognition device 500 also includes a large language model optimization module, which is used for:

[0101] The large language model is iteratively optimized based on the rhetorical question text and the user's target response based on the rhetorical question text.

[0102] Optionally, the consciousness recognition result module 501 is also used for:

[0103] Obtain the intent recognition request of the text to be recognized sent by the user; wherein, the intent recognition request includes the request text information sent by the user through the terminal;

[0104] The required text information is used to perform natural language analysis and processing using a pre-trained intent recognition model to obtain the recognition results.

[0105] Optionally, the intent recognition device 500 further includes an intent recognition model optimization module, which is used for:

[0106] The intent recognition model is iteratively optimized based on the required text information and recognition results.

[0107] It should be noted that the specific implementation of the intent recognition device of the present invention has been described in detail in the above intent recognition method, so the content will not be repeated here.

[0108] According to a third aspect of the present invention, an electronic device is provided, comprising:

[0109] One or more processors;

[0110] Storage device for storing one or more programs.

[0111] When one or more programs are executed by one or more processors, the one or more processors implement the method provided in the first aspect of the embodiments of the present invention.

[0112] According to a fourth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method provided in the first aspect of the present invention.

[0113] According to a fifth aspect of the present invention, a computer program product is provided, including a computer program that, when executed by a processor, implements the method provided in the first aspect of the present invention.

[0114] Figure 6 An exemplary system architecture 600 is shown that can be applied to the intent recognition method or intent recognition device of the present invention.

[0115] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, and 603, a network 604, and a server 605. Network 604 serves as the medium for providing communication links between terminal devices 601, 602, and 603 and server 605. Network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0116] Users can use terminal devices 601, 602, and 603 to interact with server 605 via network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0117] Terminal devices 601, 602, and 603 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0118] Server 605 can be a server that provides various services, such as a backend management server that supports shopping websites browsed by users using terminal devices 601, 602, and 603 (for example only). The backend management server can analyze and process data such as received product information query requests, and feed back the processing results (such as the final intent recognition result - for example only) to the terminal devices.

[0119] It should be noted that the intent recognition method provided in the embodiments of the present invention is generally run by server 605, and correspondingly, the intent recognition device is generally set in server 605.

[0120] It should be understood that Figure 6 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0121] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing a terminal device of the present invention. Figure 7 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0122] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0123] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.

[0124] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is run by central processing unit (CPU) 701, it performs the functions defined above in the system of this invention.

[0125] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0126] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more operable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually operate substantially in parallel, and they may sometimes operate in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0127] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor can be described as including a consciousness recognition result module, a consciousness questioning result module, and a consciousness clarification module. The names of these modules do not necessarily limit the module itself; for example, the consciousness recognition result module can also be described as "a module for performing intent recognition on the text to be recognized and determining the recognition result."

[0128] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: performing intent recognition on the text to be recognized and determining a recognition result; in response to the intent represented by the recognition result being a preset intent, generating a rhetorical question text corresponding to the recognition result using a pre-trained large language model, displaying the rhetorical question text to the user, and receiving a target response from the user based on the rhetorical question text; performing intent recognition again on the target response, and determining the final intent recognition result of the text to be recognized based on the recognition result of the target response.

[0129] The computer program product provided in this embodiment of the invention includes a computer program that, when executed by a processor, implements the intent recognition method in this embodiment of the invention.

[0130] The technical solution according to the embodiments of the present invention has the following advantages or beneficial effects: by performing intent recognition on the text to be recognized, the recognition result is determined; in response to the intent represented by the recognition result being a preset intent, a pre-trained large language model is used to generate a rhetorical question text corresponding to the recognition result, and the rhetorical question text is displayed to the user, and the user's target response based on the rhetorical question text is received; intent recognition is performed again on the target response, and the final intent recognition result of the text to be recognized is determined according to the recognition result of the target response; it is possible to guide the user to clarify the intent through rich and targeted rhetorical question content, thereby improving the accuracy of intent recognition and the user's experience.

[0131] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

[0132] It should be noted that the acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

Claims

1. An intent recognition method, characterized in that, include: Perform intent recognition on the text to be recognized and determine the recognition result; In response to the intent represented by the recognition result being a preset intent, a rhetorical question text corresponding to the recognition result is generated using a pre-trained large language model, and the rhetorical question text is displayed to the user, and the target response fed back by the user based on the rhetorical question text is received; The target response is subjected to intent recognition again, and the final intent recognition result of the text to be recognized is determined based on the recognition result of the target response.

2. The method according to claim 1, characterized in that, Determining the final intent recognition result of the text to be recognized based on the recognition result of the target response includes: If the intent represented by the recognition result of the target response is not a preset intent, the recognition result of the target response shall be taken as the final intent recognition result of the text to be recognized. If the intent represented by the recognition result of the target response is still the preset intent, the large language model is used again to generate a rhetorical question text corresponding to the recognition result of the target response, and the generated rhetorical question text is displayed to the user again, until the intent represented by the recognition result of the target response received from the user is the non-preset intent, then the recognition result of the target response corresponding to the non-preset intent is determined as the final intent recognition result.

3. The method according to claim 1, characterized in that, Before displaying the rhetorical question text to the user, the following is also included: Perform risk detection on the rhetorical question text to obtain the detection result of the rhetorical question text; In response to the detection result being a pass, the question text is displayed to the user; In response to the detection result being a failure, the rhetorical question text is deleted, and a new rhetorical question text is generated using a preset scheme, and the new rhetorical question text is displayed to the user.

4. The method according to claim 1, characterized in that, The method further includes: The large language model is iteratively optimized based on the rhetorical question text and the user's target response based on the rhetorical question text.

5. The method according to claim 1, characterized in that, Intent recognition is performed on the text to be recognized, and the recognition result is determined, including: Obtain the intent recognition request of the text to be recognized sent by the user; wherein, the intent recognition request includes the request text information sent by the user through the terminal; Based on the stated requirement text information, a pre-trained intent recognition model is used for natural language analysis to obtain the recognition result.

6. The method according to claim 5, characterized in that, The method further includes: The intent recognition model is iteratively optimized based on the required text information and the recognition results.

7. An intent recognition device, characterized in that, include: The intent recognition result module is used to perform intent recognition on the text to be recognized and determine the recognition result. The awareness-based questioning result module is used to generate question text corresponding to the recognition result in response to the intention represented by the recognition result being a preset intention, using a pre-trained large language model, displaying the question text to the user, and receiving the target response from the user based on the question text. The awareness clarification module is used to re-identify the intent of the target response and determine the final intent identification result of the text to be identified based on the identification result of the target response.

8. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.

9. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.