Multi-scene-oriented voice-driven AI large model intention analysis method and action execution system
By constructing an intent entity library and a large language model, the system accurately identifies patients' inquiries or action intentions and maps them into action commands, solving the problem that AI medical systems cannot automatically execute operations and realizing a closed-loop intelligent medical experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING R&W ELECTRONICS TECH
- Filing Date
- 2026-03-31
- Publication Date
- 2026-05-01
AI Technical Summary
Existing AI medical systems cannot recognize patients' intentions, resulting in the inability to automatically perform corresponding operations. Patients need to switch to a manual window or operate manually on a mobile device, which lacks a closed-loop service experience.
We construct a speech-driven AI big model intent parsing method for multiple scenarios. Through intent entity library, intent scoring and language big model, we can accurately distinguish between inquiry and action intent, and map them into action instructions to call backend business system for execution.
It achieves closed-loop execution from patient language to business actions, eliminates the semantic gap in doctor-patient interaction, and significantly improves medical efficiency and intelligent service level.
Smart Images

Figure CN121963734A_ABST
Abstract
Description
A method for intent parsing and action execution system for large-scale voice-driven AI models for multiple scenarios Technical Field
[0001] This application relates to the field of intent recognition technology, specifically to a method and action execution system for intent parsing of large voice-driven AI models for multiple scenarios. Background Technology
[0002] With the deep application of artificial intelligence technology in the medical field, intelligent consultation, triage, and medical advice systems are gradually becoming important means to improve the efficiency of medical services and optimize the patient's medical experience. In medical scenarios, accurately understanding the patient's verbal expression intent is a key prerequisite for transforming natural interaction into effective service.
[0003] Currently, AI-based medical intent recognition technology mainly focuses on inquiry intent recognition. This involves using natural language processing models to semantically understand the questions posed by patients, then retrieving matching answers from a pre-set knowledge base or database, and outputting them to the patient in voice or text / image format. For example, when a patient asks "Which department should I see for a headache?", the system recognizes this as an intent to "search for a department" and then provides suggestions such as neurology. When a patient asks "How do I get reimbursed by medical insurance?", the system recognizes this as an intent to "consult a policy" and then displays the relevant reimbursement process. This model is essentially a question-and-answer interaction, with its core logic being "question-retrieval-answer," aiming to meet patients' information access needs.
[0004] However, in real-world medical settings, patients' intentions are complex and diverse, encompassing not only inquiries about information but also numerous operational requests that the system must execute. For example, when a patient expresses requests like "Please book an appointment with Dr. Wang for tomorrow morning," "I need to pay," or "Please check me in," their true intention is for the system to complete a series of specific business actions such as registration, payment, and check-in. Current technologies, lacking the ability to recognize such intentions, often categorize these as inquiries, merely outputting guidance on how to register and pay, without actually triggering the backend business system to perform the corresponding operations.
[0005] The root of this limitation lies in the fact that existing intent recognition models typically only construct a mapping relationship between "intent and answer," lacking a complete "intent-action-execution" link. When patients express action-based requests, the system cannot map them to the corresponding action execution instruction library, nor can it call backend service interfaces such as the Hospital Information System (HIS), registration system, and payment system. This results in a semantic gap between the patient's verbal intent and the system's actual execution capability. Patients are forced to switch from the intelligent dialogue interface to a manual window or mobile device for manual operation, failing to achieve a closed-loop service experience where "what you say is what you get."
[0006] Therefore, how to overcome the limitation of existing AI medical systems that can only recognize inquiry intentions, achieve accurate analysis of patients' action intentions, and map them to the backend action execution instruction library to drive the automatic completion of business processes has become a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0007] In view of this, the purpose of this application is to provide a method for parsing intent of large voice-driven AI models and an action execution system for multiple scenarios, so as to solve the problems in the background technology.
[0008] To achieve the above objectives, this application adopts the following technical solution:
[0009] This application presents a method for intent parsing in large-scale voice-driven AI models across multiple scenarios, including the following steps:
[0010] Acquire voice data from the user, convert the voice data into text, and extract the intent entity from the text;
[0011] An intent probability score is calculated based on the intent entity and a pre-built intent entity library; and an intent evaluation is performed based on the intent probability score to obtain an intent evaluation result, wherein the intent evaluation result is used to distinguish whether the user has an inquiry intent, an action intent, or an unclear intent;
[0012] When the intent assessment result indicates that the user's intent is unclear, the intent probability score is converted into intent bias, and the text and intent bias are input into a pre-fine-tuned language model to obtain guiding text. The pre-fine-tuned language model is pre-trained on samples through guiding question answering.
[0013] The guiding text is sent to the user's terminal, and upon receiving voice data from the user's feedback, the process returns to converting the voice data into text until the intent assessment result indicates that the user has an inquiry intent or an action intent.
[0014] When the intent assessment result indicates that the user has an inquiry intent, the matching answer text is output based on question-answer pair matching; when the intent assessment result indicates that the user has an action intent, the action intent is mapped into an action command.
[0015] In one embodiment of this application, mapping the action intent to an action command includes:
[0016] Obtain the slot information template corresponding to the action intent, and extract the slot information from the multi-turn dialogue;
[0017] The integrity of the slot information is verified based on the slot information template.
[0018] When the slot information is missing, multiple rounds of dialogue guidance are conducted based on the missing slot information until the slot information is complete.
[0019] When the slot information is complete, the action instruction template corresponding to the current action intent is determined based on the pre-built intent-action instruction library; and the complete slot information is filled into the action instruction template to obtain the action instruction.
[0020] In one embodiment of this application, the intent entity library includes intent scores for multiple intent entities, the values of which are used for differentiation. The method for constructing the intent entity library includes:
[0021] Obtain multiple input text samples and label the multiple input text samples with intent categories to obtain the intent category labels of the multiple input text samples;
[0022] Each input text sample is segmented, part-of-speech tagging is performed, and named entity recognition is performed to obtain multiple intent-related entities with target parts of speech;
[0023] Aggregate and count the intent-related entities of multiple input text samples to obtain the frequency of occurrence of each intent-related entity; intent-related entities with a frequency greater than or equal to a preset frequency threshold are designated as high-frequency entities, and intent-related entities with a frequency less than the preset frequency threshold are designated as low-frequency entities.
[0024] Calculate the relevant entity for each intent With Intent Category Point mutual information The point mutual information The mathematical expression is:
[0025]
[0026] In the formula, Representing entities With category The probability of them occurring simultaneously Representing entities The probability of occurrence Indicate category The probability of occurrence;
[0027] mutual information of the points Normalization is performed, and the mutual information of the normalized points is calculated. The normalized point mutual information The mathematical expression is:
[0028]
[0029] Based on the normalized point mutual information Calculate the relevant entity for each intent Initial Intent Score The mathematical expression for the initial intent score is:
[0030]
[0031] In the formula, Indicating the relevant entity For the category of inquiry intent The biased score, Indicating the relevant entity For the category of action intention The biased score;
[0032] For high-frequency entities, the initial intent score will be determined. As the final intent score; for low-frequency entities, the initial intent score of the low-frequency entity is weighted with the intent scores of multiple high-frequency entities to obtain the final intent score of the low-frequency entity.
[0033] Based on all intent-related entities The intent scoring constructs an intent entity library.
[0034] In one embodiment of this application, the initial intent score of the low-frequency entity is weighted with the intent scores of multiple high-frequency entities to obtain the final intent score of the low-frequency entity, including:
[0035] Calculate the cosine similarity between the low-frequency entity and all high-frequency entities;
[0036] High-frequency entities with a cosine similarity greater than a preset similarity threshold are considered as similar entities to low-frequency entities.
[0037] Initial intent scoring for the low-frequency entities Intent scoring with similar high-frequency entities Weighted values are applied to obtain the final intent score for low-frequency entities. The final intent score of the low-frequency entity. The mathematical expression is:
[0038]
[0039]
[0040] In the formula, For weight parameters, Represents a set of similar entities. Represents low-frequency entities Similar entities cosine similarity, The frequency of occurrence of low-frequency entities. This is the weight adjustment parameter.
[0041] In one embodiment of this application, an intent probability score is calculated based on the intent entity and a pre-built intent entity library; and an intent evaluation is performed based on the intent probability score to obtain an intent evaluation result, including:
[0042] The intent entity is matched with a pre-built intent entity library to obtain the intent score of the intent entity, wherein the intent entity library includes intent scores of multiple intent entities;
[0043] The intention probability score is obtained by averaging the intention scores of all intention entities.
[0044] The intention probability score is compared with a preset first threshold and a second threshold. When the intention probability score is less than or equal to the first threshold, it is determined that the user has an intention to take action. When the probability score is greater than or equal to the second threshold, it is determined that the user has an intention to ask a question. When the probability score is between the first threshold and the second threshold, it is determined that the user's intention is unclear, wherein the second threshold is greater than the first threshold.
[0045] In one embodiment of this application, the fine-tuning method for the large language model includes:
[0046] S1, Obtain guided question-and-answer pairs samples, wherein the guided question-and-answer pairs samples include historical dialogues, current user text, intent bias, task instructions, and expected guidance;
[0047] S2, input the guided question-answering pairs into the language model to obtain the probability of each word in the actual guidance text, and calculate the loss based on the probability of each word in the actual guidance text and a pre-constructed loss function, wherein the mathematical expression of the loss function is:
[0048]
[0049] In the formula, Indicates loss, Indicates the expected total length of the introductory text. The first introductory phrase indicating expectation One word, Indicates position All the previous words, Additional information comprising intent bias, historical dialogue, and current user text. This represents the model's prediction, given additional information, for the first... The word is The probability of;
[0050] S3, Adjust the internal parameters of the large language model based on the loss;
[0051] S4, and repeat steps S2-S3 until the loss is less than or equal to the preset loss threshold and remains stable, thus completing the fine-tuning of the large language model.
[0052] In one embodiment of this application, outputting the matched answer text based on question-answer pair matching includes:
[0053] The text of multi-turn dialogues is segmented and entity recognition is performed to construct a sequence of question entities;
[0054] The sequence of problem entities is vectorized to obtain the problem vector;
[0055] The similarity between the question vector and the question template vector in the pre-built question-answering library is calculated to obtain the similarity between the question vector and multiple question template vectors;
[0056] When one or more question template vectors have a similarity to the question vector greater than or equal to a preset similarity threshold, the answer template of the question template vector with the highest similarity among the one or more question template vectors is used as the answer text for data processing;
[0057] When no question template vector has a similarity to the question vector greater than or equal to the preset similarity threshold, a general guidance template is output.
[0058] In one embodiment of this application, before sending the guidance text to the user terminal, the method further includes:
[0059] The guiding text is segmented and irrelevant words are removed to obtain a set of guiding text keywords. The text is then segmented and irrelevant words are removed to obtain a set of text keywords. ;
[0060] The set of keywords in the text guided by the calculation With the set of text keywords word coverage The word coverage rate The mathematical expression is:
[0061]
[0062] The word coverage rate is compared with a preset ratio threshold, and when the word coverage rate is greater than or equal to the ratio threshold, the intention bias of the guiding text is checked.
[0063] When the intent bias of the guiding text is consistent with the intent bias of the text, the guiding text is verified and the subsequent guiding text sending process begins.
[0064] In one embodiment of this application, when the word coverage rate is less than the ratio threshold, or when the intent bias of the guiding text is inconsistent with the intent bias of the text, the fine-tuned large model is called again to generate the guiding text, and the process of segmenting the guiding text and removing irrelevant words is repeated until the guiding text passes the verification.
[0065] If the verification of the guidance text fails after exceeding the target number of iterations, a preset general guidance template will be sent to the user.
[0066] This application also provides a voice-driven AI large-scale model intent parsing and action execution system for multiple scenarios, including:
[0067] The acquisition module is used to acquire voice data from the user, convert the voice data into text, and extract intent entities from the text.
[0068] The intent assessment module is used to match the intent entities with a pre-built intent entity library to obtain an intent probability score; and to perform intent assessment based on the intent probability score to obtain an intent assessment result, wherein the intent assessment result is used to distinguish whether the user has an inquiry intent, an action intent, or an unclear intent;
[0069] The guidance module is used to convert the intent probability score into an intent bias when the intent evaluation result indicates that the user's intent is unclear, and input the text and the intent bias into a pre-fine-tuned language model to obtain guidance text. The pre-fine-tuned language model is pre-trained on samples through guided question answering.
[0070] The loop module is used to send the guidance text to the user terminal, and when it receives voice data from the user feedback, it returns to the process of converting the voice data into text until the intent evaluation result indicates that the user has an inquiry intent or an action intent;
[0071] The action mapping module is used to output the matching answer text based on question-answer pair matching when the intent evaluation result indicates that the user has an inquiry intent; and to map the action intent into an action command when the intent evaluation result indicates that the user has an action intent.
[0072] The beneficial effects of this application are as follows: The speech-driven AI large-scale model intent parsing method and action execution system for multiple scenarios constructed in this application, by building an intent entity library containing inquiry and action bias scoring, combined with threshold judgment and intent probability scoring, can accurately distinguish between patients' inquiry needs and operational needs; when the intent is unclear, a fine-tuned language large-scale model is introduced to generate guiding text, achieving multiple rounds of clarification and ensuring the accuracy of intent recognition; after clarifying the inquiry intent, the answer is matched with the question-and-answer library; after clarifying the action intent, it is mapped to the action instruction library and called the backend business system, truly realizing closed-loop execution from patient language to business action. This method breaks through the traditional one-way "intent-answer" model, fills the gap in action intent recognition and execution, eliminates the semantic gap in doctor-patient interaction, and enables patients to directly complete operations such as registration, payment, and check-in through voice, significantly improving medical efficiency and intelligent service level, forming a complete service experience of "what you say is what you get". Attached Figure Description
[0073] The present application will be further described below with reference to the accompanying drawings and embodiments:
[0074] Figure 1 is a flowchart of a conventional single-stage fire monitoring method shown in an embodiment of this application;
[0075] Figure 2 is a flowchart of a speech-driven AI large model intent parsing method for multiple scenarios, as shown in one embodiment of this application.
[0076] Figure 3 is a schematic diagram of the YOLOv5+HCFE detection network in one embodiment of this application;
[0077] Figure 4 is a schematic diagram of the structure of the thermal conduction frequency domain enhancement module in one embodiment of this application;
[0078] Figure 5 is a schematic diagram of the verification process in one embodiment of this application. Detailed Implementation
[0079] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0080] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the layers related to this application and are not drawn according to the actual number, shape and size of the layers in the actual implementation. In the actual implementation, the form, number and proportion of each layer can be arbitrarily changed, and the layer layout may also be more complex.
[0081] Numerous details are explored in the following description to provide a more thorough explanation of embodiments of this application; however, it will be apparent to those skilled in the art that embodiments of this application may be practiced without these specific details.
[0082] Figure 1 illustrates an application scenario of the speech-driven AI large model intent parsing method for multiple scenarios in one embodiment of this application. As shown in Figure 1, this application relies on a user front-end 110 and a back-end server 120.
[0083] In one operational scenario of this application, patients interact via voice through an AI inquiry system deployed on a multimodal user front-end (such as a self-service machine or mobile app). The front-end is primarily responsible for data collection and result presentation, ensuring low latency and high availability of the interaction. When a patient says phrases such as "I want to register with Dr. Wang" or "Which department should I go to for a headache?", the front-end microphone array captures the voice stream in real time. The front-end typically integrates lightweight voice wake-up and endpoint detection, sending the voice stream to the back-end in real time or performing preliminary speech-to-text conversion (some implementations may place ASR in the back-end to support complex models; here, for clear division of labor, it can be set up so that the front-end collects the audio and then uploads it).
[0084] The backend server handles all complex semantic understanding, decision-making, and business execution, serving as the intelligent hub of the solution. It receives the text TT uploaded from the frontend, extracts intent entities using techniques such as word segmentation and NER, matches it against a pre-built intent entity library, and calculates the intent probability score S, including:
[0085] If S explicitly points to an action (e.g., below the threshold of -0.3), then the action intent processing chain is entered.
[0086] If S explicitly points to a query (e.g., above the threshold of 0.3), then the question-and-answer matching chain is entered.
[0087] If S falls within the fuzzy range, the LLM guidance chain is triggered. This includes: calling the fine-tuned medical guidance model, inputting "current text + intent bias score", generating guidance text, and returning it to the front end.
[0088] For the query intent, perform vector retrieval or semantic matching in the knowledge base to find the most similar question-answer pair and output the answer.
[0089] For action intents, query the intent-action mapping database to convert intents such as "register" into standard action instructions. Then, call backend services such as the hospital information system (HIS), payment system, and queuing system through the API gateway to complete real business operations such as registration, payment, and check-in, and return the execution results to the front end.
[0090] The following is a typical example of data flow, showing a user's intention to register for an appointment, including:
[0091] Front-end: User's voice message "Dr. Wang".
[0092] Frontend: Upload text to the backend.
[0093] Backend: Entity extraction → "Dr. Wang" matching score 0.0 → Intent unclear.
[0094] Backend: Call the guiding LLM → Generate "Do you want to check Dr. Wang's clinic information, or make an appointment directly?".
[0095] Front-end: The system announces a prompt, and the user replies "Book an appointment for tomorrow morning".
[0096] Backend: New text entity extraction → "appointment" (-0.8), "tomorrow morning" (neutral) → cumulative score S=-0.4 S=−0.4 → determined as action intent.
[0097] Backend: Map action commands, call the HIS system to complete the number locking, and return "Reservation successful".
[0098] Front-end: Announces "You have successfully booked an appointment with Dr. Wang for tomorrow morning."
[0099] Figure 2 is a flowchart of a speech-driven AI large-scale model intent parsing method for multiple scenarios, as shown in an embodiment of this application. As shown in Figure 2, the speech-driven AI large-scale model intent parsing method for multiple scenarios in this application mainly includes the following steps:
[0100] S210, acquire voice data from the user, convert the voice data into text, and extract the intent entity from the text;
[0101] S220, calculate the intent probability score based on the intent entity and the pre-built intent entity library; and perform intent evaluation based on the intent probability score to obtain an intent evaluation result, wherein the intent evaluation result is used to distinguish whether the user has an inquiry intent, an action intent, or an unclear intent;
[0102] S230, when the intention evaluation result indicates that the user's intention is unclear, convert the intention possibility score into an intention bias, and input the text and the intention bias into a pre-fine-tuned large language model to obtain a guiding text, where the pre-fine-tuned large language model is pre-trained on samples through guiding questions and answers;
[0103] S240, send the guiding text to the user terminal, and when receiving the voice data from the user's feedback, return to the step of converting the voice data into text until the intention evaluation result indicates that the user has an inquiry intention or an action intention;
[0104] S250, when the intention evaluation result indicates that the user has an inquiry intention, output a matching answer text based on the question-and-answer pair matching; when the intention evaluation result indicates that the user has an action intention, map the action intention to an action instruction.
[0105] Figure 3 is a specific implementation flowchart of the intention parsing method of the voice-driven AI large model for multi-scenarios shown in an embodiment of the present application. Please understand the following text in combination with Figure 3. The following is a detailed introduction to the above overall process, which specifically includes:
[0106] S210, obtain the voice data from the user, convert the voice data into text, and extract intention entities from the text;
[0107] For example:
[0108] The user says to the intelligent terminal: "Help me make a reservation."
[0109] The system converts the voice into text through ASR: "Help me make a reservation."
[0110] Perform word segmentation,词性标注, and named entity recognition on the text. The extracted intention entities include:
[0111] Action word: "make a reservation" (indicating the action of making a reservation) <00--00295>Polite word: "help" (auxiliary expression)
[0113] Noun: "reservation" (forming the "make a reservation" action with "make a reservation")
[0114] If the system recognizes "make a reservation" as an overall phrase, the intention entity is "make a reservation". These entities will be used for subsequent intention scoring and intention type judgment.
[0115] S220, calculate the intention possibility score based on the intention entity and a pre-constructed intention entity library; and perform intention evaluation based on the intention possibility score to obtain an intention evaluation result, where the intention evaluation result is used to distinguish whether the user has an inquiry intention, an action intention, or an unclear intention;
[0116] The intent determination in this application relies on a pre-built intent entity library, which includes intent scores for multiple intent entities. The values of these intent scores are used for differentiation. The method for constructing the intent entity library includes:
[0117] (1) Obtain multiple input text samples and perform intent category labeling on the multiple input text samples to obtain the intent category labeling of the multiple input text samples;
[0118] Building an intent entity database first requires high-quality labeled data as a foundation. By collecting user statements from real medical scenarios (such as "I want to register" or "What should I do about my headache"), and manually or semi-automatically labeling each statement with its intent category (question or action), a supervisory signal is provided for subsequent statistical analysis of the correlation between entities and intents.
[0119] This ensures that the entity scores calculated subsequently have a real basis and avoids the bias that may be caused by unsupervised methods; the diversity of labeled data helps to cover more expressions in medical scenarios.
[0120] (2) For each input text sample, perform word segmentation, part-of-speech tagging, and named entity recognition to obtain multiple intent-related entities with target parts of speech;
[0121] Word segmentation divides continuous text into word sequences; part-of-speech tagging determines the part of speech of each word (e.g., verb, noun, interrogative word); named entity recognition (NER) further identifies proper nouns (e.g., personal names, department names, time). By combining this information, "intent-related entities" that contribute to intent judgment can be extracted, such as action verbs, interrogative words, and medical terms.
[0122] For example, after segmenting and tagging the text "I want to book an appointment with Dr. Wang tomorrow", we get:
[0123] Parts of speech: I / pronoun, think / verb, hang / verb, Dr. Wang / personal name, tomorrow / time word, of / particle, number / noun.
[0124] Extract intent-related entities: the verb "hang", the name "Dr. Wang", and the time word "tomorrow" (these entities may carry intent information); while the pronoun "I" and the particle "of" are usually not considered intent entities.
[0125] (3) Aggregate and count the intent-related entities of multiple input text samples to obtain the frequency of occurrence of each intent-related entity; take the intent-related entities whose frequency of occurrence is greater than or equal to the preset frequency threshold as high-frequency entities, and take the intent-related entities whose frequency is less than the preset frequency threshold as low-frequency entities.
[0126] By counting the occurrences of each entity in all samples, we can distinguish between common (high-frequency) and rare (low-frequency) entities. High-frequency entities have more reliable statistics (such as their association with intent) due to sufficient sample size; low-frequency entities, however, may be unstable when directly counted due to data sparsity and require special handling. A preset frequency threshold (e.g., 5 times) is used to classify these two categories.
[0127] High-frequency entities can be directly scored using statistical methods, while low-frequency entities need to be smoothed using semantic similarity to improve the robustness of the overall score.
[0128] (4) Calculate the relevant entities for each intent With Intent Category Point mutual information The point mutual information The mathematical expression is:
[0129]
[0130] In the formula, Representing entities With category The probability of them occurring simultaneously Representing entities The probability of occurrence Indicate category The probability of occurrence;
[0131] Point mutual information (PMI) measures the correlation between two events (entity occurrence and category occurrence). If the entity and category are independent, PMI = 0; if they are positively correlated, PMI > 0; and if they are negatively correlated, PMI < 0. The probability value can be estimated by statistically analyzing the co-occurrence frequency of entities and categories across all samples.
[0132] PMI can quantify the strength of the association between an entity and a specific intention, and can reflect the entity's tendency better than simply counting frequency. For example, "how" may be highly related to the intention to ask, while "hang" is highly related to the intention to do something.
[0133] For example, statistics show that the probability of "hanging" appearing in the action intention sample is much higher than that of questioning intention. The calculated PMI(hanging, action) = 0.8 and PMI(hanging, questioning) = -0.3, indicating that "hanging" is strongly biased towards action intention.
[0134] (5) Mutual information of the points Normalization is performed, and the mutual information of the normalized points is calculated. The normalized point mutual information The mathematical expression is:
[0135]
[0136] The PMI value has an indefinite range (theoretically up to infinity) and is sensitive to low-frequency events. Normalized Point Mutual Information (NPMI) is calculated by dividing by... Compressing the value range to [-1, 1] makes PMI values comparable between different entities.
[0137] (6) Based on the normalized point mutual information Calculate the relevant entity for each intent Initial Intent Score The mathematical expression for the initial intent score is:
[0138]
[0139] In the formula, Indicating the relevant entity For the category of inquiry intent The biased score, Indicating the relevant entity For the category of action intention The biased score;
[0140] To differentiate whether an entity is more inclined towards queries or actions, the NPMI values of the entity for the two categories are subtracted: The resulting rating range is between [-2, 2] (which can be scaled in practice). Positive values indicate a bias towards questions, while negative values indicate a bias towards actions. The larger the absolute value, the stronger the bias.
[0141] A single NPMI value can only reflect the relevance to one class, while the difference can directly reflect the relative bias of an entity, avoiding confusion caused by an entity being related to two classes at the same time (for example, "doctor" may be related to both classes to some extent, but the difference is close to 0, which correctly reflects neutrality).
[0142] For example: for "how", NPMI(how, query) = 0.8, NPMI(how, action) = 0.1, then S(how) = 0.8 - 0.1 = 0.7 (biased towards query); for "hang", NPMI(hang, query) = -0.2, NPMI(hang, action) = 0.9, then S(hang) = -0.2 - 0.9 = -1.1 (biased towards action, negative value).
[0143] (7) For high-frequency entities, the initial intent score will be determined. As the final intent score; for low-frequency entities, the initial intent score of the low-frequency entity is weighted with the intent scores of multiple high-frequency entities to obtain the final intent score of the low-frequency entity.
[0144] Low-frequency entities, due to their limited sample size, may have unreliable initial ratings that are susceptible to random fluctuations. By identifying semantically similar high-frequency entities and using their ratings to "smooth" the low-frequency entity ratings, the statistical stability of high-frequency entities can be leveraged. Specifically, the semantic similarity between low-frequency and high-frequency entities is calculated using word vectors, similar high-frequency entities are selected, and then a weighted average is applied. The calculation process for the intent rating of low-frequency entities includes:
[0145] (7-1) Calculate the cosine similarity between the low-frequency entity and all high-frequency entities;
[0146] (7-2) High-frequency entities with cosine similarity greater than a preset similarity threshold are considered as similar entities to low-frequency entities;
[0147] (7-3) Initial intent scoring for the low-frequency entities Intent scoring with similar high-frequency entities Weighted values are applied to obtain the final intent score for low-frequency entities. The final intent score of the low-frequency entity. The mathematical expression is:
[0148]
[0149]
[0150] In the formula, For weight parameters, Represents a set of similar entities. Represents low-frequency entities Similar entities cosine similarity, The frequency of occurrence of low-frequency entities. This is the weight adjustment parameter.
[0151] In the above calculation formula, for a set of similar entities cosine similarity As weights, score their intentions. A weighted average is applied. Entities with higher similarity contribute more to the final score. Adaptive weighting ensures that low-frequency entities retain their weak signals while leveraging semantic neighbors for stable and reliable estimates, effectively mitigating data sparsity. Low-frequency entities no longer exhibit abnormal fluctuations due to limited samples, and their scores more closely reflect true intent. This allows entities previously unusable due to low frequency to receive reasonable scores, enriching the intent entity database. A semantic-based smoothing mechanism enables the entity database to infer certain aspects of out-of-vocabulary words or variant expressions.
[0152] (8) Based on all intent-related entities The intent scoring constructs an intent entity library.
[0153] Each entity and its final intent score are compiled into a structured database (e.g., key-value pairs or vector indexes) for subsequent querying by the intent recognition module. This database can be updated periodically (recalculated as new samples are added). This creates a reusable intent knowledge resource, enabling online systems to quickly match entities and obtain scores, providing a foundation for real-time intent judgment.
[0154] After constructing the aforementioned intent entity library, an intent probability score is calculated based on the intent entities and the pre-constructed intent entity library; and an intent evaluation is performed based on the intent probability score to obtain the intent evaluation result. The process includes:
[0155] S221, Match the intent entity with a pre-built intent entity library to obtain the intent score of the intent entity, wherein the intent entity library includes intent scores of multiple intent entities;
[0156] The intent entity library stores a large number of entities and their intent scores (typically ranging from -1 to 1, with negative values biased towards actions and positive values biased towards queries) obtained through statistical and semantic smoothing. By precisely matching (or approximately matching) each intent entity extracted from the user's input text against entries in the library, the score for each entity can be quickly obtained. For entities not logged in, a default neutral score (e.g., 0) can be assigned or the entity can be ignored.
[0157] For example, if a user says "I want to cancel my account," we extract the entities "cancele account" (a low-frequency entity, with a smoothed score of -0.85) and "want" (which may not be included in the database or is considered neutral). After matching with the entity library, the score for "cancele account" is -0.85.
[0158] S222, average the intent scores of all intent entities to obtain the intent probability score;
[0159] The overall intent of a user's statement is often a composite reflection of the tendencies of its individual entities. By calculating the arithmetic mean of all extracted entity scores, noise from individual entities can be smoothed out, revealing the overall intent bias of the statement. (Average score) The formula is:
[0160]
[0161] In the formula, Indicates the number of entities. Represents entity rating. This represents an entity index.
[0162] The averaging operation eliminates the influence of the number of entities on the absolute value of the score, making the scores of sentences of different lengths comparable; at the same time, it integrates information from multiple entities, improves the robustness of intent judgment, and avoids being misled by a single extreme entity.
[0163] For example, the extracted entities "how" (0.8) and "register" (-0.9) in a certain sentence have an average value of (0.8-0.9) / 2=-0.05, indicating that the overall intent is neutral and may be ambiguous.
[0164] S223, compare the intent probability score with a preset first threshold and a second threshold. When the intent probability score is less than or equal to the first threshold, determine that the user has an intention to perform an action. When the probability score is greater than or equal to the second threshold, determine that the user has an intention to ask a question. When the probability score is between the first threshold and the second threshold, determine that the user's intention is unclear, wherein the second threshold is greater than the first threshold.
[0165] Specifically, two thresholds are set. (The first threshold, usually a negative value) and (The second threshold, usually a positive value), and Based on average ratings The interval is classified into three categories:
[0166] like This is determined to be an action intent (the user wants to perform an operation);
[0167] like This is determined to be an inquiry intent (the user wants to obtain information).
[0168] like The intention was deemed unclear (the expression was vague and required further guidance).
[0169] The threshold setting can be optimized through a validation set or adjusted according to business needs (e.g., expanding the fuzzy range for a more conservative approach). This enables rapid and clear classification of user intent, allowing the system to handle different intents differently: clear intents directly lead to Q&A or action execution, while fuzzy intents trigger LLM guidance, effectively improving interaction efficiency and accuracy and avoiding poor user experiences caused by misjudgments.
[0170] S230, when the intent assessment result indicates that the user's intent is unclear, the intent probability score is converted into intent bias, and the text and the intent bias are input into a pre-fine-tuned language model to obtain guiding text, wherein the pre-fine-tuned language model is pre-trained on samples through guiding question answering;
[0171] When the intent assessment result determines that the user's intent is unclear (i.e., the average score is not clear) When the user's expression is too vague to be directly determined as a question or an intention to act, it indicates that their expression is too ambiguous to be directly judged as a question or an intention to act. In this case, a Large Language Model (LLM) is needed to generate a guiding statement to help the user clarify their true intention. The core principle of this step is as follows:
[0172] (1) To facilitate LLM's understanding, it is converted into intention bias. It is typically mapped to the [0,1] interval:
[0173]
[0174] (2) Then enter the following information into the pre-tuned LLM:
[0175] The user's current text T: the original input, such as "Dr. Wang".
[0176] Intent bias b: Described in textual form (e.g., "intent is slightly biased towards action") or embedded in numerical form.
[0177] Task instruction: Explicitly require the model to generate a guiding statement to help the user clarify their intent. It should typically include two options: a question and an action.
[0178] Conversation history (optional): Provided if context is available.
[0179] By proactively guiding users, vague expressions are transformed into clear intentions, preventing the system from getting stuck or misjudging due to its inability to determine the meaning. The guidance is presented in a multiple-choice format, reducing the user's cognitive load and making the interaction more natural and efficient. Targeted guidance quickly clarifies intentions, avoiding the waste of time with repeated follow-up questions. Fine-tuning the LLM (Local Management Model) allows it to understand context and subtle semantic differences, generating context-appropriate guidance that is more flexible than fixed rule templates.
[0180] The above process relies on fine-tuning of a general-purpose LLM. Since LLM cannot directly map dialogue to actions, the intent information can be clarified by combining intent analysis with LLM guidance as described in this application, facilitating the subsequent action execution mapping process. Specifically, the LLM fine-tuning process is as follows:
[0181] S1, Obtain guided question-and-answer pairs samples, wherein the guided question-and-answer pairs samples include historical dialogues, current user text, intent bias, task instructions, and expected guidance;
[0182] Fine-tuning large-scale language models requires high-quality, task-specific data. Guided question answering samples are constructed around the core task of "clarifying guidance when intent is unclear," with each sample containing five key elements:
[0183] History of conversations (optional): Records of previous interactions to maintain contextual coherence.
[0184] Current user text: The most recently entered vague statement by the user (e.g., "Dr. Wang").
[0185] Intent bias: A numerical or textual description derived from the system score (e.g., "intent bias 0.5, indicating neutrality") that indicates the tendency of the current user's expression.
[0186] Task instructions: Clearly tell the model the task it needs to complete, such as "Generate a guiding statement to help the user clarify their intent (question or action), which should include two options."
[0187] Expected guiding words: Standard answers, either manually written or extracted from high-quality dialogues, serve as the learning target for the model (e.g., "Do you want to check Dr. Wang's clinic schedule, or do you need me to help you make an appointment?").
[0188] S2, input the guided question-answer pair samples into the language big model to obtain the probability of each word in the actual guided text, and calculate the loss based on the probability of each word in the actual guided text and the pre-constructed loss function;
[0189] The guided question-and-answer pair samples were used as the input context, consisting of "historical dialogue + current user text + intent bias + task instructions". The input is fed into a larger language model awaiting fine-tuning. Based on this context, the model progressively predicts the next word at each position in the output sequence (expected prompt). The loss function uses negative log-likelihood, measuring the difference between the model's predicted probability distribution and the true word.
[0190] The mathematical expression for the loss function is as follows:
[0191]
[0192] In the formula, Indicates loss, Indicates the expected total length of the introductory text. The first introductory phrase indicating expectation One word, Indicates position All the previous words, Additional information comprising intent bias, historical dialogue, and current user text. This represents the model's prediction, given additional information, for the first... The word is The probability of;
[0193] By minimizing the negative log-likelihood, the guiding model assigns high probabilities to words in the true guiding text, thereby learning to generate guiding text that meets expectations. The loss function focuses on the output sequence; the internal representations of the input are not directly involved in the loss calculation, ensuring that the model focuses on learning the generation task.
[0194] S3, Adjust the internal parameters of the large language model based on the loss;
[0195] The backpropagation algorithm calculates the gradient of the loss function with respect to the parameters of each layer of the model, and an optimizer (such as AdamW) updates the parameters along the gradient descent direction. This process allows the model to gradually adjust its internal representation, making it more likely to generate output consistent with the desired prompt given similar contexts.
[0196] S4, and repeat steps S2-S3 until the loss is less than or equal to the preset loss threshold and remains stable, thus completing the fine-tuning of the large language model.
[0197] Fine-tuning is an iterative optimization process. Each time, a batch of training samples (one epoch) is traversed, the average loss is calculated, and the parameters are updated. Through repeated adjustments over multiple epochs, the model gradually converges to the optimal state for the task. Training stops when the loss on the validation set no longer decreases significantly (i.e., it is less than a preset threshold and fluctuates little) to prevent overfitting. Initially, the loss is 2.5. After 10 epochs, it decreases to 0.3, and the change is less than 0.01 for three consecutive epochs. At this point, training stops, resulting in the fine-tuned LLM, which can be used to handle scenarios with unclear intent.
[0198] After obtaining the guidance text, to prevent a poor user experience due to the guidance text's content being unrelated to the user's input text, this application also sets up a relevance verification process for the guidance text, including:
[0199] (1) The guiding text is segmented and irrelevant words are removed to obtain a set of guiding text keywords. The text is then segmented and irrelevant words are removed to obtain a set of text keywords. ;
[0200] Specifically, both the guidance text and the user's original input text may contain a large number of words that contribute little to the relevance assessment, such as modal particles, auxiliary words, and punctuation marks (i.e., "irrelevant words"). The text is segmented into word sequences using word segmentation technology, and then keywords representing the core semantics are extracted based on a predefined stop word list or part-of-speech filtering rules (such as removing pronouns, auxiliary words, and conjunctions). These keywords constitute the semantic skeleton of both texts and are used for subsequent coverage calculations.
[0201] For example:
[0202] User's original text T: "Does Dr. Wang have any appointments tomorrow?"
[0203] Word segmentation: Dr. Wang, will you have an appointment tomorrow?
[0204] After removing irrelevant words (such as "have", "ma"), we get K_T = {"Dr. Wang", "tomorrow", "number"};
[0205] Guiding text G: "Do you want to check Dr. Wang's clinic schedule, or do you need me to help you make an appointment?"
[0206] Word segmentation: Do you / want / to / inquire / about / Dr. Wang's / clinic / or / need / me / to / help / you / make / an appointment / ?
[0207] After removing irrelevant words (pronouns, auxiliary words, punctuation), we get K_G={“Query”,“Dr. Wang”,“Outpatient Information”,“Appointment”,“Registration”}.
[0208] (2) Calculate the set of keywords in the guided text. With the set of text keywords word coverage The word coverage rate The mathematical expression is:
[0209]
[0210] Coverage measures how many of the core keywords from the user's original text are included in the introductory text. The denominator is the size of the intersection of the two sets, i.e., the number of keywords that appear in both texts simultaneously; This is the total number of keywords in the user's original text. This ratio reflects the degree of relevance between the guiding text and the user's input at the lexical level; the higher the ratio, the closer the guiding text is to the user's original intent.
[0211] (3) Compare the word coverage rate with a preset ratio threshold, and when the word coverage rate is greater than or equal to the ratio threshold, perform intent bias verification on the guiding text;
[0212] Set a threshold (e.g., 0.3 or 0.5) to determine whether the guidance text is sufficiently relevant to the user's input at the lexical level. If the coverage is below the threshold, it indicates that the guidance text may deviate from the user's topic, and no further validation is needed; it can be directly regenerated or downgraded. If the threshold is reached, further check whether the intent bias of the guidance text is consistent with the user's current intent bias (i.e., whether it conforms to the current guidance direction).
[0213] (4) When the intent bias of the guiding text is consistent with the intent bias of the text, the subsequent guiding text sending process is entered through the verification of the guiding text.
[0214] The calculation direction of intent bias is explained above and will not be repeated here. Intent bias is the overall tendency of the user's current input (derived from the intent probability score S, such as 0.5 indicating neutrality). The intent bias of the guidance text can also be calculated (e.g., by averaging the scores from the same entity database, or by using a lightweight classification model) to determine whether the guidance is more inclined towards a question or an action. Only when both biases are consistent is the guidance considered to conform to the current guidance direction. For example, if the user input is biased towards neutrality (requiring clarification), the guidance should also remain neutral (providing two options) and should not be biased towards one side.
[0215] This ensures that the guidance is aligned with user needs at the intent level, avoiding the contradiction of "users favoring actions, but the guidance only providing inquiry options," thereby improving the effectiveness of guidance and user experience.
[0216] (5) In one embodiment of this application, when the word coverage is less than the ratio threshold, or when the intention bias of the guiding text is inconsistent with the intention bias of the text, the fine-tuned large model is called again to generate the guiding text, and the guiding text is returned to be segmented and irrelevant words are removed until the guiding text passes the verification.
[0217] When validation fails, it indicates that the currently generated prompt is invalid and needs to be regenerated. When re-invoking the fine-tuning LLM, generation parameters can be adjusted (e.g., increasing the temperature coefficient to enhance diversity), or input prompts can be adjusted based on the reason for failure (e.g., emphasizing the need to include user keywords). The validation process is then repeated in a loop until a valid prompt is generated or the maximum number of attempts is reached.
[0218] (6) If the verification of the guidance text is still not passed after the number of loops exceeds the target number, a preset general guidance template will be sent to the user.
[0219] To prevent infinite loops or long waiting times, a maximum number of attempts, M (e.g., 3 times), is set. If a valid prompt cannot be obtained after M regeneration attempts, the LLM generation method is abandoned, and a preset generic prompt template (e.g., "Do you want to inquire about information or conduct business?") is used instead. These templates are manually designed and, while not personalized, ensure basic relevance and security.
[0220] S240, the guiding text is sent to the user terminal, and when the voice data from the user feedback is received, the process returns to converting the voice data into text until the intent evaluation result indicates that the user has an inquiry intent or an action intent;
[0221] After the guiding text passes verification, the guiding message needs to be fed back to the user, and subsequent responses from the user should be received to form a closed-loop interaction cycle until the user's intent is clearly identified.
[0222] To prevent infinite loops, a maximum number of guidance rounds can be preset (e.g., 3 rounds). If the intention is still unclear after exceeding the number of rounds, the user will be transferred to a live agent or given a friendly prompt (e.g., "Sorry, I cannot understand at the moment. Please consult the help desk later").
[0223] S250, when the intent evaluation result indicates that the user has an inquiry intent, output the matching answer text based on question-answer pair matching; when the intent evaluation result indicates that the user has an action intent, map the action intent into an action instruction.
[0224] After exiting the loop, it means the system has understood the user's intent. At this point, there are two possibilities:
[0225] (1) Inquiry Intent:
[0226] Because generative LLM models are prone to errors in their output (due to corpus complexity), this application employs a question-and-answer database for matching questions in specialized fields. When a user expresses a query intent, the matching answer text is output based on the question-and-answer pair, including:
[0227] (1-1) Perform word segmentation and entity recognition on the text of multi-turn dialogues to construct a sequence of question entities;
[0228] User questions may be scattered across multiple rounds of dialogue (e.g., first asking "How much can medical insurance reimburse?", then adding "I'm from out of town"). By concatenating the text from these multi-turn dialogues, word segmentation and named entity recognition (NER) are performed to extract key entities from the questions (such as "medical insurance," "out of town," and "reimbursement ratio"), and these are organized into a sequence of question entities according to their order or importance. This sequence encapsulates the core information of the user's question, facilitating subsequent vectorization processing.
[0229] (1-2) Vectorize the sequence of problem entities to obtain the problem vector;
[0230] Each entity in the question entity sequence is mapped to a pre-trained word vector (such as Word2Vec or BERT embeddings). Then, these entity vectors are merged into a fixed-length vector, i.e., the question vector, through methods such as averaging, weighted summation, or concatenation. This vector represents the overall meaning of the user's question in the semantic space.
[0231] (1-3) Calculate the similarity between the question vector and the question template vector in the pre-built question-answering library to obtain the similarity between the question vector and multiple question template vectors;
[0232] Each question template in the question-and-answer database (e.g., "What is the local medical insurance reimbursement rate?") also undergoes the same entity extraction and vectorization process to obtain the corresponding question template vector. The user question vector is then calculated. With each template vector Cosine similarity:
[0233]
[0234] (1-4) When there are one or more question template vectors whose similarity to the question vector is greater than or equal to a preset similarity threshold, the answer template of the question template vector with the highest similarity among the one or more question template vectors shall be used as the answer text for data processing;
[0235] Set a similarity threshold (e.g., 0.7). A match is considered valid only when the similarity of a template reaches the threshold. Select the template with the highest similarity from all qualifying templates and return its corresponding answer template as the final answer to the user. If multiple templates qualify, the highest score is used. Ensure the returned answer is sufficiently relevant to the user's question to avoid incorrect answers due to low-quality matches; at the same time, provide some tolerance for errors, allowing multiple candidates.
[0236] (1-5) When there is no question template vector whose similarity to the question vector is greater than or equal to the preset similarity threshold, a general guidance template is output.
[0237] If the similarity of all templates is below the threshold, it means that there are no answers in the question-and-answer database that sufficiently match the user's question. In this case, the system cannot provide an accurate answer and needs to respond using a preset general guiding template (such as "Sorry, I did not understand your question, please try to rephrase it" or "Your question cannot be answered at the moment, we suggest you consult customer service").
[0238] (2) Action intention
[0239] When a user has an intention to perform an action, the intention is mapped to an action command. Figure 4 is a flowchart illustrating the mapping of an intention to perform an action command in one embodiment of this application, as shown in Figure 4, which includes:
[0240] (2-1) Obtain the slot information template corresponding to the action intention, and extract the slot information from the multi-turn dialogue;
[0241] Each action intent (such as registration or payment) corresponds to a predefined slot information template, which lists the parameters required to execute the action.
[0242] For example, a template for a registration intention might include: {Doctor / Department, Appointment Time, Patient Information}. The system extracts the specific values of these slots from current and historical multi-turn dialogues through entity recognition and semantic parsing.
[0243] (2-2) Perform integrity verification on the slot information based on the slot information template;
[0244] Check if the extracted slot set contains all slots marked "required" in the template. If all slots exist and their values are valid, the slot set is complete; otherwise, some slots are missing.
[0245] (2-3) When the slot information is missing, conduct multiple rounds of dialogue guidance based on the missing slot information until the slot information is complete;
[0246] For missing slots, the system generates follow-up questions (such as "Who are you registering for?") to guide the user to provide additional information. The user's response initiates the next round of dialogue, re-extracting and validating slots, repeating this process until all necessary slots are filled or the user cancels the operation.
[0247] For example:
[0248] The system followed up with, "Are you registering for yourself or for someone else?"
[0249] The user replied: "I'm registering my mom for an appointment."
[0250] Extract new slot: Patient = "Mother" (normalization required).
[0251] Double-checked: Doctor, time, and patient are all complete.
[0252] (2-4) When the slot information is complete, determine the action instruction template corresponding to the current action intent based on the pre-built intent-action instruction library; and fill the complete slot information into the action instruction template to obtain the action instruction.
[0253] The intent-action instruction library stores the mapping relationship between each action intent and the backend service interface. For example, the registration intent corresponds to an API call template:
[0254]
[0255] .
[0256] The complete slot value replaces the placeholder in the template, generating specific action instructions, which are then submitted to the action execution module. This achieves automated conversion from natural language to executable instructions, bridging the final link between human-computer interaction and business systems, and truly forming a "what you say is what you get" service loop.
[0257] This application presents a multi-scenario voice-driven AI large-scale model intent parsing method. By constructing an intent entity library containing inquiry and action bias scoring, combined with threshold judgment and intent probability scoring, it can accurately distinguish between patients' inquiry needs and operational needs. When the intent is unclear, a fine-tuned language large-scale model is introduced to generate guiding text, achieving multiple rounds of clarification to ensure the accuracy of intent recognition. After clarifying the inquiry intent, the answer is output by matching the question-and-answer library; after clarifying the action intent, it is mapped to the action instruction library and invoked to the backend business system, truly realizing closed-loop execution from patient language to business action. This method breaks through the traditional one-way "intent-answer" model, fills the gap in action intent recognition and execution, eliminates the semantic gap in doctor-patient interaction, and enables patients to directly complete operations such as registration, payment, and check-in through voice, significantly improving medical efficiency and intelligent service levels, forming a complete "what you say is what you get" service experience.
[0258] As shown in Figure 5, this application also provides a voice-driven AI large-scale model intent parsing and action execution system for multiple scenarios, including:
[0259] The acquisition module is used to acquire voice data from the user, convert the voice data into text, and extract intent entities from the text.
[0260] The intent assessment module is used to match the intent entities with a pre-built intent entity library to obtain an intent probability score; and to perform intent assessment based on the intent probability score to obtain an intent assessment result, wherein the intent assessment result is used to distinguish whether the user has an inquiry intent, an action intent, or an unclear intent;
[0261] The guidance module is used to convert the intent probability score into an intent bias when the intent evaluation result indicates that the user's intent is unclear, and input the text and the intent bias into a pre-fine-tuned language model to obtain guidance text. The pre-fine-tuned language model is pre-trained on samples through guided question answering.
[0262] The loop module is used to send the guidance text to the user terminal, and when it receives voice data from the user feedback, it returns to the process of converting the voice data into text until the intent evaluation result indicates that the user has an inquiry intent or an action intent;
[0263] The action mapping module is used to output the matching answer text based on question-answer pair matching when the intent evaluation result indicates that the user has an inquiry intent; and to map the action intent into an action command when the intent evaluation result indicates that the user has an action intent.
[0264] This application presents a voice-driven AI large-scale model intent parsing and action execution system for multiple scenarios. By constructing an intent entity library containing inquiry and action bias scoring, combined with threshold judgment and intent probability scoring, it can accurately distinguish between patients' inquiry needs and operational needs. When the intent is unclear, a fine-tuned language large-scale model is introduced to generate guiding text, achieving multiple rounds of clarification to ensure the accuracy of intent recognition. After clarifying the inquiry intent, the system matches the answer to the question-and-answer library; after clarifying the action intent, it maps it to the action instruction library and calls the backend business system, truly realizing closed-loop execution from patient language to business action. This method breaks through the traditional one-way "intent-answer" model, fills the gap in action intent recognition and execution, eliminates the semantic gap in doctor-patient interaction, and enables patients to directly complete operations such as registration, payment, and check-in through voice, significantly improving medical efficiency and intelligent service levels, forming a complete "what you say is what you get" service experience.
[0265] This embodiment also provides an electronic terminal, including: a processor and a memory;
[0266] The memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory to cause the terminal to perform any of the methods in this embodiment.
[0267] As will be understood by those skilled in the art, the computer-readable storage medium described in this embodiment allows for the implementation of all or part of the steps in the above method embodiments by computer program-related hardware. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0268] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver, and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication between them. The memory is used to store computer programs, the communication interface is used to perform communication, and the processor and the transceiver are used to run the computer programs, so that the electronic terminal performs the steps of the above method.
[0269] In this embodiment, the memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device.
[0270] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0271] In the above embodiments, although the present application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. The embodiments of the present application are intended to cover all such substitutions, modifications, and variations falling within the broad scope of the appended claims.
[0272] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A method for intent parsing in large-scale voice-driven AI models for multiple scenarios, characterized in that, The process includes the following steps: acquiring voice data from a user, converting the voice data into text, and extracting intent entities from the text; calculating an intent probability score based on the intent entities and a pre-built intent entity library; and performing intent evaluation based on the intent probability score to obtain an intent evaluation result, wherein the intent evaluation result is used to distinguish whether the user has an inquiry intent, an action intent, or an unclear intent; when the intent evaluation result indicates that the user's intent is unclear, converting the intent probability score into an intent bias, and inputting the text and the intent bias into a pre-fine-tuned language model to obtain guiding text, wherein the pre-fine-tuned language model is pre-trained on guided question-and-answer pairs; sending the guiding text to the user's end, and upon receiving voice data from user feedback, returning to the process of converting the voice data into text until the intent evaluation result indicates that the user has an inquiry intent or an action intent; when the intent evaluation result indicates that the user has an inquiry intent, outputting a matching answer text based on question-and-answer pair matching; and when the intent evaluation result indicates that the user has an action intent, mapping the action intent into an action command.
2. The method for intent parsing of large-scale voice-driven AI models for multiple scenarios as described in claim 1, characterized in that, Mapping the action intent to action instructions includes: obtaining a slot information template corresponding to the action intent and extracting slot information from multi-turn dialogues; performing integrity verification on the slot information based on the slot information template; when the slot information is missing, guiding multi-turn dialogues based on the missing slot information until the slot information is complete; when the slot information is complete, determining the action instruction template corresponding to the current action intent based on a pre-built intent-action instruction library; and filling the complete slot information into the action instruction template to obtain the action instruction.
3. The method for intent parsing of large-scale voice-driven AI models for multiple scenarios as described in claim 1, characterized in that, The intent entity library includes intent scores for multiple intent entities. The intent scores are used to distinguish user intents. The method for constructing the intent entity library includes: acquiring multiple input text samples and labeling them with intent categories to obtain intent category labels for the multiple input text samples; performing word segmentation, part-of-speech tagging, and named entity recognition on each input text sample to obtain multiple intent-related entities with target parts of speech; aggregating and statistically analyzing the intent-related entities of the multiple input text samples to obtain the frequency of occurrence of each intent-related entity; classifying intent-related entities with a frequency greater than or equal to a preset frequency threshold as high-frequency entities and intent-related entities with a frequency less than the preset frequency threshold as low-frequency entities; and calculating the frequency of each intent-related entity. With Intent Category Point mutual information The point mutual information The mathematical expression is: In the formula, Representing entities With category The probability of them occurring simultaneously Representing entities The probability of occurrence Indicates category The probability of occurrence; mutual information of the points Normalization is performed, and the mutual information of the normalized points is calculated. The normalized point mutual information The mathematical expression is: Based on the normalized point mutual information Calculate the relevant entities for each intent Initial Intent Score The mathematical expression for the initial intent score is: In the formula, Indicating the relevant entity For the category of inquiry intent The biased score, Indicating the relevant entity For the category of action intention The bias score; for high-frequency entities, the initial intent score. As the final intent score; for low-frequency entities, the initial intent score of the low-frequency entity is weighted with the intent scores of multiple high-frequency entities to obtain the final intent score of the low-frequency entity; based on all intent-related entities The intent scoring constructs an intent entity library.
4. The method for intent parsing of large-scale voice-driven AI models for multiple scenarios as described in claim 3, characterized in that, The initial intent score of the low-frequency entity is weighted with the intent scores of multiple high-frequency entities to obtain the final intent score of the low-frequency entity. This includes: calculating the cosine similarity between the low-frequency entity and all high-frequency entities; identifying high-frequency entities with a cosine similarity greater than a preset similarity threshold as similar entities to the low-frequency entity; and weighting the initial intent score of the low-frequency entity. Intent scoring with similar high-frequency entities Weighted values are applied to obtain the final intent score for low-frequency entities. The final intent score of the low-frequency entity. The mathematical expression is: In the formula, For weight parameters, Represents a set of similar entities. Represents low-frequency entities Similar entities cosine similarity, The frequency of occurrence of low-frequency entities. This is the weight adjustment parameter.
5. The method for intent parsing of large-scale voice-driven AI models for multiple scenarios as described in claim 1, characterized in that, An intent probability score is calculated based on the intent entity and a pre-built intent entity library; The intent is evaluated based on the intent probability score to obtain an intent evaluation result, including: matching the intent entity with a pre-built intent entity library to obtain the intent score of the intent entity, wherein the intent entity library includes the intent scores of multiple intent entities; averaging the intent scores of all intent entities to obtain an intent probability score; comparing the intent probability score with preset first thresholds and second thresholds; determining that the user has an action intent when the intent probability score is less than or equal to the first threshold; determining that the user has an inquiry intent when the intent probability score is greater than or equal to the second threshold; and determining that the user's intent is unclear when the probability score is between the first threshold and the second threshold, wherein the second threshold is greater than the first threshold.
6. The method for intent parsing of large-scale voice-driven AI models for multiple scenarios as described in claim 1, characterized in that, The fine-tuning method of the large language model includes: S1, obtaining guided question-answer pairs, wherein the guided question-answer pairs include historical dialogues, current user text, intent bias, task instructions, and expected guidance; S2, inputting the guided question-answer pairs into the large language model to obtain the probability of each word in the actual guidance, and calculating the loss based on the probability of each word in the actual guidance and a pre-constructed loss function, wherein the mathematical expression of the loss function is: In the formula, Indicates loss, Indicates the expected total length of the introductory text. The first introductory phrase indicating expectation One word, Indicates position All the previous words, Additional information comprising intent bias, historical dialogue, and current user text. This represents the model's prediction, given additional information, for the first... The word is S2, S3, adjust the internal parameters of the language model based on the loss; S4, repeat steps S2-S3 until the loss is less than or equal to the preset loss threshold and remains stable, thus completing the fine-tuning of the language model.
7. The method for intent parsing of large-scale voice-driven AI models for multiple scenarios as described in claim 1, characterized in that, The question-and-answer pair matching method outputs the matched answer text, including: segmenting and recognizing entities from the text of multi-turn dialogues to construct a question entity sequence; vectorizing the question entity sequence to obtain a question vector; calculating the similarity between the question vector and question template vectors in a pre-built question-and-answer database to obtain the similarity between the question vector and multiple question template vectors; when one or more question template vectors have a similarity greater than or equal to a preset similarity threshold with the question vector, the answer template of the question template vector with the highest similarity among the one or more question template vectors is used as the answer text; when no question template vector has a similarity greater than or equal to the preset similarity threshold with the question vector, a general guidance template is output.
8. The method for intent parsing of large-scale voice-driven AI models for multiple scenarios as described in claim 1, characterized in that, Before sending the guidance text to the user, the process further includes: segmenting the guidance text and removing irrelevant words to obtain a set of guidance text keywords. The text is then segmented and irrelevant words are removed to obtain a set of text keywords. ;Calculation of the set of keywords in the guided text With the set of text keywords word coverage The word coverage rate The mathematical expression is: The word coverage rate is compared with a preset ratio threshold. When the word coverage rate is greater than or equal to the ratio threshold, the intention bias of the guiding text is checked. When the intention bias of the guiding text is consistent with the intention bias of the text, the guiding text passes the check and the subsequent guiding text sending process begins.
9. The method for intent parsing of large-scale voice-driven AI models for multiple scenarios as described in claim 8, characterized in that, If the word coverage is less than the ratio threshold, or if the intent bias of the guiding text is inconsistent with the intent bias of the text, the fine-tuned large model is called again to generate the guiding text, and the guiding text is returned to be segmented and irrelevant words are removed until the guiding text passes the verification; if the number of loops exceeds the target number and the guiding text still fails the verification, a preset general guiding template is sent to the user.
10. A voice-driven AI large-scale model intent parsing and action execution system for multiple scenarios, characterized in that: include: The system comprises the following modules: an acquisition module for acquiring voice data from the user, converting the voice data into text, and extracting intent entities from the text; an intent evaluation module for matching the intent entities with a pre-built intent entity library to obtain an intent probability score, and performing intent evaluation based on the intent probability score to obtain an intent evaluation result, wherein the intent evaluation result is used to distinguish whether the user has an inquiry intent, an action intent, or an unclear intent; a guidance module for converting the intent probability score into an intent bias when the intent evaluation result indicates that the user's intent is unclear, and inputting the text and the intent bias into a pre-fine-tuned language model to obtain guidance text, wherein the pre-fine-tuned language model is pre-trained on samples using guided question-and-answer pairs; a looping module for sending the guidance text to the user terminal, and upon receiving voice data feedback from the user, returning to the process of converting the voice data into text until the intent evaluation result indicates that the user has an inquiry intent or an action intent; and an action mapping module for outputting a matching answer text based on question-and-answer pair matching when the intent evaluation result indicates that the user has an inquiry intent, and mapping the action intent into an action command when the intent evaluation result indicates that the user has an action intent.
Citation Information
Patent Citations
Man-machine interaction hospital guide method and system based on global attention intention recognition
CN112507696A
Vehicle man-machine voice interaction method and system and vehicle
CN118968992A
Type 1 diabetes mellitus special disease asking medical big model system
CN120072328A
Voice intention recognition method and device, equipment and medium
CN120526759A
Method and system for quickly recognizing and responding to user intents and questions from natural language input using intelligent hierarchical processing and personalized adaptive semantic interface
US20120296638A1