Agent-triggered methods and systems based on big health intent recognition and context

By using an agent-triggered method based on big health intent recognition and context, and leveraging a medical-specific intent recognition model and hierarchical decision-making mechanism, the problems of false triggering and missed triggering in existing health agent-triggered technologies are solved, achieving more accurate and efficient health services.

CN123072686APending Publication Date: 2026-11-10BEIJING FAT REDUCTION TIMES TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611408801.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing health agent triggering methods rely on single keyword matching or general intent recognition models, which make it difficult to accurately capture users' implicit health needs and do not make full use of the contextual information and relevant medical knowledge in multi-turn dialogues, resulting in false triggering or missed triggering.

Method used

Based on the big health intent recognition and context-based agent triggering method, this method trains a medical-specific intent recognition model using multi-turn user dialogues. It combines an initial query vector, a structured context summary vector, and a structured knowledge summary vector, and generates correction factors through cosine similarity and urgency indices to perform intent recognition and decision-making. A hierarchical decision-making mechanism is then used to trigger the health agent.

Benefits of technology

It improves the adaptability and accuracy of health agents, reduces false triggers and missed triggers, enhances the rationality of trigger decisions and the efficiency of health services, and adapts to diverse big health service scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123072686A_ABST
    Figure CN123072686A_ABST
Patent Text Reader

Abstract

This invention proposes an Agent triggering method and system based on big health intent recognition and context. The Agent triggering method includes: training a pre-constructed medical domain-specific intent recognition model using the user's most recent dialogue content to obtain a trained medical domain-specific intent recognition model; real-time detection of the user's current dialogue information, obtaining the corresponding initial query vector, structured context summary vector, and structured knowledge summary vector based on the user's current dialogue information, and obtaining the intent recognition result; determining whether to trigger a health Agent based on the intent recognition result, and if it is determined that the health Agent needs to be triggered, triggering the health Agent according to a hierarchical decision-making mechanism. The system includes modules corresponding to the steps of the method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention proposes an agent triggering method and system based on big health intent recognition and context, belonging to the field of big health intelligent agent triggering control technology. Background Technology

[0002] With the deep penetration of artificial intelligence technology into the field of big health, health agents, as the core carrier of intelligent health services, have been widely used in scenarios such as health consultation, chronic disease management, and diagnosis and treatment assistance. Users first conduct consultations and dialogues with intelligent terminals that are deployed with intent recognition models. Then, the intelligent terminal obtains the user's basic information and consultation content based on the dialogue content and judges the user's intent. Subsequently, it makes alarm judgments based on the user's intent and triggers alarm reminders when necessary. The accuracy and timeliness of its triggering directly determine the quality of health services and user experience. Currently, most existing health agent triggering methods rely on single keyword matching or general intent recognition models, which have significant limitations: general intent recognition models are not optimized for the characteristics of the medical field, making it difficult to accurately capture users' implicit health needs and easily leading to false or missed triggers; at the same time, most methods do not make full use of the contextual information and relevant medical knowledge of multi-turn dialogues, but only judge the triggering time based on the content of a single user dialogue, ignoring the coherence of the dialogue and the relevance of intent, resulting in an irrational triggering decision. Summary of the Invention

[0003] This invention provides an Agent-triggered method and system based on big health intent recognition and context, to solve the technical problems existing in the prior art. The technical solution adopted is as follows: An Agent-triggered method based on big health intent recognition and context includes: The medical domain-specific intent recognition model is trained using the content of the user's most recent dialogues to obtain the trained medical domain-specific intent recognition model. The system detects the user's current dialogue information in real time, obtains the corresponding initial query vector, structured context summary vector, and structured knowledge summary vector based on the user's current dialogue information, and inputs the initial query vector, structured context summary vector, and structured knowledge summary vector corresponding to the user's current dialogue information into a medical-specific intent recognition model to obtain intent recognition results. Only when the intent recognition result is a healthy intent result, and when the intent clarity score is not lower than the preset intent score threshold, is it determined that the healthy agent is triggered; Once it is determined that a health agent needs to be triggered, the comparison between the confidence score output by the intent recognition result and the dynamic threshold, combined with the knowledge support verification rules, is used to determine whether the conditions for triggering a health agent are met. Based on the judgment result and combined with the hierarchical decision-making mechanism, the health agent is triggered.

[0004] Furthermore, the previously constructed medical domain-specific intent recognition model is trained using the content of the user's most recent dialogues, resulting in a fully trained medical domain-specific intent recognition model, including: The user's historical dialogues are encoded into a 768-dimensional temporal semantic vector using a Bi-Encoder architecture. The user's health profile is converted into a structured vector through a feature embedding layer. The temporal semantic vector and the structured vector are dynamically weighted using an attention mechanism to generate a contextual semantic vector. The contextual semantic vector is optimized and corrected by generating a correction factor using the current input semantic similarity and urgency index. The corrected contextual semantic vector is then obtained. Using a vectorized medical knowledge base and retrieval matching strategies, medical knowledge fragments corresponding to the user's questions are retrieved from the constructed medical knowledge vector base. The constructed intent recognition model is trained using the context semantic vector, medical knowledge fragments, and user questions to obtain a trained medical-specific intent recognition model.

[0005] Furthermore, a correction factor is generated using the current input semantic similarity and urgency index to optimize and correct the context semantic vector, obtaining the corrected context semantic vector, including: Detects the user's current conversation information and user health record in real time; Obtain the current context semantic vector using real-time current dialogue information and user health profile; Retrieve the context semantic vectors corresponding to the user's historical dialogues and determine the semantic similarity between the context semantic vectors corresponding to the historical dialogues and the current context semantic vectors; A dynamic context correction factor is generated by using the semantic similarity between the context semantic vector corresponding to the historical dialogue and the current context semantic vector. The dynamic context correction factor is then used to optimize and correct the context semantic vector corresponding to the historical dialogue, thereby obtaining the corrected context semantic vector.

[0006] Furthermore, the system detects the user's current dialogue information in real time, obtains the corresponding initial query vector, structured context summary vector, and structured knowledge summary vector based on the user's current dialogue information, and inputs these vectors into a medical-specific intent recognition model to obtain intent recognition results, including: Real-time detection of the user's current dialogue information, and extraction of text and image data from the user's current dialogue information; Identify entity information in text and image data, and use the entity information to generate an initial query vector V_query; The structured context summary vector C_context and the structured knowledge summary vector K_knowledge, corresponding to the user's current dialogue information, are obtained through a multi-source information parallel retrieval method. The initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge corresponding to the user's current dialogue information are integrated to generate enhanced prompts that can be understood by a medical-specific intent recognition model. The enhanced prompts are input into a medical domain-specific intent recognition model. The intent recognition result is obtained through the consideration factors output by the medical domain-specific intent recognition model. The consideration factors output by the medical domain-specific intent recognition model include an intent clarity score for trigger threshold judgment, an urgency level label for trigger priority, a dependency list for trigger timing control, and a confidence level for trigger reliability assessment. Furthermore, the intent clarity score corresponds to a score range for the intent type. When the intent clarity score is within the score range corresponding to the intent type, it indicates that the intent recognition result belongs to that intent type. The intent types include health intent results and other general intent results.

[0007] Furthermore, the initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge corresponding to the user's current dialogue information are integrated to generate enhanced prompts that are understood by a medical-specific intent recognition model, including: Retrieve the initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge; The cosine similarity between the initial query vector V_query and the structured context summary vector C_context, and the cosine similarity between the initial query vector V_query and the structured knowledge summary vector K_knowledge are obtained using the cosine similarity method. The dynamic weight values ​​corresponding to the initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge are obtained by using the cosine similarity between the initial query vector V_query and the structured context summary vector C_context and the structured knowledge summary vector K_knowledge. The initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge, along with their corresponding dynamic weight values, are weighted and fused to generate enhanced prompts that can be understood by a medical-specific intent recognition model.

[0008] Furthermore, after determining that a health agent needs to be triggered, the system compares the confidence score output by the intent recognition result with the dynamic threshold, and combines this with knowledge support verification rules to determine whether the conditions for triggering the health agent are met. Based on the determination result and a hierarchical decision-making mechanism, the system performs the following triggering operations on the health agent: Once it is determined that a health agent needs to be triggered, the confidence level in the intent recognition result is compared with the dynamic threshold. Based on the comparison result between the confidence level and the dynamic threshold, the triggering condition of the health agent is verified in conjunction with the knowledge support verification rules, and the verification result is obtained. Based on the verification results and the hierarchical decision-making mechanism, the types of intelligent agents contained in the health agent that need to be triggered are determined, and the triggering operation is performed on the types of intelligent agents that need to be triggered. The hierarchical decision-making mechanism includes an emergency intent layer, a professional intent layer, and a fuzzy intent layer; the types of intelligent agents contained in the health agent include professional agents, emergency medical agents, first aid guidance agents, and medical treatment coordination agents.

[0009] Furthermore, the triggering conditions and decision rules corresponding to the emergency intent layer, professional intent layer, and ambiguous intent layer are as follows: The triggering conditions and decision rules corresponding to the emergency intent layer are as follows: When the triggering condition is a combination of symptoms marked with urgency_level="red" in the urgency level flag and "seek immediate medical attention" in the knowledge base, the corresponding decision rule is to ignore the regular threshold limit and forcibly trigger the emergency medical agent; at the same time, the first aid guidance agent and the medical coordination agent are also triggered. The triggering conditions and decision rules corresponding to the professional intent layer are as follows: When the triggering condition is that all verifications are passed, or the urgency level is marked as "yellow" or "green", the corresponding decision rule is to map the intent type to the corresponding professional agent. If there are multiple valid auxiliary intents, they are triggered sequentially according to priority. At the same time, when the load of the healthy agents is unbalanced, the healthy agents with the shortest response time to the longest are prioritized for triggering. Alternatively, the triggering priority of each healthy agent is determined according to the response load intensity and intent intensity of the healthy agent. Then, a snapshot of the triggering context is recorded for subsequent effect evaluation. The triggering conditions and decision rules corresponding to the fuzzy intent layer are as follows: When the triggering condition is that the confidence level (primary_confidence) is between the threshold of 0.5 and the dynamic threshold (Threshold_t); or, there is no emergency marker; or, the knowledge support level is medium support, the corresponding decision rule is to trigger the "intent clarification agent" to generate targeted clarification questions; at the same time, the number of consecutive clarifications is limited to ≤3 times to avoid the dialogue from getting stuck in a loop; and if the clarification is still uncertain, it is downgraded to providing general health knowledge.

[0010] Furthermore, the triggering priority of each health agent is determined according to the response load intensity and intent intensity corresponding to the health agent, including: Retrieve the knowledge confidence and intent type from the current intent recognition result; The matching coefficient between the intent type and each health agent in the current intent recognition result is obtained by using a dual-index lookup table method combined with the completed intent matching table; The intent strength between each health agent and intent type is obtained by combining the matching coefficient between the intent type and each health agent in the current intent recognition result with the urgency flag parameter and knowledge confidence. Response priority parameters for each health agent are generated using the response load intensity and intent intensity corresponding to each health agent; The trigger priority of each health agent is re-determined according to the response priority parameter from high to low, and the health agents are triggered sequentially according to their trigger priorities.

[0011] Furthermore, response priority parameters for each health agent are generated using the response load intensity and intent intensity corresponding to each health agent, including: Retrieve the precision weight corresponding to each health agent, with a value range of [0.5, 1.5]. Retrieve the timeliness weight corresponding to each health agent, with a value range of [0.5, 1.5]; Calculate the percentage of tasks currently being processed by each health agent relative to the total number of tasks. The response load intensity of each healthy agent is obtained by combining the accuracy weight and timeliness weight corresponding to each healthy agent with the percentage of the number of tasks currently being processed by each healthy agent relative to the total number of tasks; The intent strength between each health agent and intent type is retrieved, and the response priority parameter corresponding to each health agent is generated using the response load strength and intent strength corresponding to each health agent.

[0012] An Agent-triggered system based on big health intent recognition and context, the Agent-triggered system includes: The model training module is used to train the already constructed medical domain-specific intent recognition model using the content of the user's most recent dialogues, and to obtain the trained medical domain-specific intent recognition model. The intent recognition module is used to detect the user's current dialogue information in real time, obtain the corresponding initial query vector, structured context summary vector, and structured knowledge summary vector based on the user's current dialogue information, and input the initial query vector, structured context summary vector, and structured knowledge summary vector corresponding to the user's current dialogue information into a medical-specific intent recognition model to obtain intent recognition results. The Agent trigger judgment module is used to determine that a healthy Agent is triggered only when the intent recognition result is a healthy intent result and when the intent clarity score is not lower than a preset intent score threshold. The Agent execution module is used to trigger the health agent after determining that it needs to be triggered. It compares the confidence level output by the intent recognition result with the dynamic threshold and combines the knowledge support verification rules to determine whether the conditions for triggering the health agent are met. Based on the judgment result and the hierarchical decision-making mechanism, it performs the triggering operation on the health agent.

[0013] Beneficial effects of this invention: The Agent triggering method and system based on big health intent recognition and context proposed in this invention, after being trained by the user through multiple rounds of dialogue using a medical-specific intent recognition model, has stronger adaptability and can accurately identify the user's big health intent, reducing false triggering and missed triggering issues. At the same time, it integrates three types of vectors, making full use of the contextual coherence of dialogue and the relevance of medical knowledge to improve the rationality of triggering decisions. The hierarchical decision-making mechanism can adapt to diverse big health service scenarios, improve the efficiency of health agent services, and promote the upgrading of big health services towards a more intelligent and precise direction. Attached Figure Description

[0014] Figure 1 This is a flowchart of the method described in this invention; Figure 2 This is a system block diagram of the system described in this invention. Detailed Implementation

[0015] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0016] This invention proposes an Agent-triggered method based on big health intent recognition and context, such as... Figure 1 As shown, the Agent triggering method includes: The medical domain-specific intent recognition model is trained using the content of the user's most recent dialogues to obtain the trained medical domain-specific intent recognition model. The system detects the user's current dialogue information in real time, obtains the corresponding initial query vector, structured context summary vector, and structured knowledge summary vector based on the user's current dialogue information, and inputs the initial query vector, structured context summary vector, and structured knowledge summary vector corresponding to the user's current dialogue information into a medical-specific intent recognition model to obtain intent recognition results. Only when the intent recognition result is a healthy intent result, and when the intent clarity score is not lower than the preset intent score threshold, is it determined that the healthy agent is triggered; Once it is determined that a health agent needs to be triggered, the comparison between the confidence score output by the intent recognition result and the dynamic threshold, combined with the knowledge support verification rules, is used to determine whether the conditions for triggering a health agent are met. Based on the judgment result and combined with the hierarchical decision-making mechanism, the health agent is triggered.

[0017] This embodiment is based on a pre-built medical-specific intent recognition model. It is first trained using the content of the user's most recent dialogues. The user's current dialogue information is detected in real time, and the initial query vector, structured context summary vector, and structured knowledge summary vector corresponding to the information are extracted and generated. The three types of vectors are input into the trained intent recognition model to obtain the intent recognition result. Based on the result, it is determined whether to trigger the health agent. If it needs to be triggered, the health agent triggering operation is executed through a hierarchical decision-making mechanism.

[0018] This embodiment utilizes a medical-specific intent recognition model trained through multiple rounds of user dialogue, resulting in enhanced adaptability and accurate identification of users' health-related intents, reducing false triggers and missed triggers. Simultaneously, by integrating three types of vectors, it fully leverages the coherence of the dialogue context and the relevance of medical knowledge to improve the rationality of trigger decisions. The hierarchical decision-making mechanism is adaptable to diverse health service scenarios, enhancing the efficiency of health agent services and driving the upgrading of health services towards greater intelligence and precision.

[0019] One embodiment of the present invention involves training a pre-constructed medical domain-specific intent recognition model using the content of the user's most recent dialogue rounds, to obtain a fully trained medical domain-specific intent recognition model, including: The user's most recent five rounds of historical dialogue are encoded into a 768-dimensional temporal semantic vector using a Bi-Encoder architecture. The user's health profile is converted into a structured vector through a feature embedding layer. An attention mechanism is used to dynamically weight and fuse the temporal semantic vector and the structured vector to generate a contextual semantic vector. A correction factor is generated using the current input semantic similarity and urgency indicators to optimize and correct the contextual semantic vector, obtaining the corrected contextual semantic vector. This provides standardized data for subsequent context association. The information contained in the user's health profile includes, but is not limited to, age, gender, and chronic disease history. The process of vectorizing the user's historical dialogue to generate the contextual semantic vector is as follows: Historical dialogue encoding: The content of the most recent N rounds (usually N=5) of dialogue is converted into a 768-dimensional semantic vector through the Bi-Encoder architecture, preserving the temporal features of the medical dialogue; the order of each dialogue is determined by preserving the temporal features of the medical dialogue. User profile embedding: Convert user health records (age, gender, history of chronic diseases, history of allergies, etc.) into structured vectors through a feature embedding layer; Meanwhile, the process of aggregating semantic vectors from different context sources to form context semantic vectors is as follows: Different context sources are dynamically weighted through an attention mechanism: where context sources refer to the semantic vectors with temporal features from the user's most recent 5 rounds of historical dialogue and the structured vectors from the user's health profile. context_vector=Σ(attention_weight_i×context_source_i_vector) attention_weight_i=softmax(W_a·[current_input_vector;context_source_i_vector]+b_a) The parameters are defined as follows: `context_vector` represents the generated context semantic vector; `Σ` represents the summation operation; `attention_weight_i` represents the attention weight of the i-th context source, calculated using the softmax function; `context_source_i_vector` represents the vector representation of the i-th context source, including historical dialogue vectors and user profile vectors; `W_a` represents the weight matrix of the attention mechanism, used to learn the importance of different context sources; `b_a` represents the bias term of the attention mechanism; `current_input_vector` represents the semantic vector of the current user input; and `softmax` represents the normalization exponential function, used to normalize the weights to the [0,1] interval and sum to 1. This attention mechanism can dynamically adjust the weights of different historical dialogues and user profile information based on the current input, making the context semantic vector more focused on historical information related to the current question.

[0020] The system utilizes a vectorized medical knowledge base and retrieval matching strategies to retrieve medical knowledge fragments corresponding to user questions from a pre-constructed medical knowledge vector base. Specifically, it integrates multi-source structured and unstructured data such as clinical guidelines, drug instructions, and disease encyclopedias, and uses a medical pre-trained embedding model to encode the knowledge fragments, forming a unified medical knowledge vector base. Simultaneously, a medical terminology mapping database (15,000+ terms corresponding to everyday expressions) is established to ensure the professionalism and accuracy of subsequent intent recognition and knowledge retrieval. The construction process of the medical knowledge vector base is as follows: First, structured and unstructured medical data, such as clinical guidelines, drug instructions, and disease encyclopedias, are collected and processed through data cleaning, deduplication, standardization, and medical terminology normalization. Then, the processed medical data undergoes multi-source knowledge fusion and fragmentation to form a set of medical knowledge fragments. Next, a medical pre-trained embedding model is used to encode these medical knowledge fragments, generating corresponding medical knowledge vectors. Finally, each medical knowledge vector, along with its corresponding knowledge fragment, source, authority level, and other metadata, is associated and stored to form a medical knowledge vector library.

[0021] The medical knowledge vector base and retrieval matching strategy are as follows: Dynamic retrieval: After performing medical entity recognition on the input text, the entities are concatenated with the surrounding context to form a query vector; Multi-granularity matching: The query vector is matched with the candidate knowledge fragment vectors recalled in the medical knowledge vector library at multiple granularities to generate a matching degree score between the query vector and the candidate knowledge fragment vectors. Candidate knowledge fragments with matching degree scores exceeding a preset score threshold are taken as medical knowledge fragments that match the user's query content.

[0022] knowledge_support=0.5×max_cosine(entity_vectors,knowledge_vectors)+0.3×avg_cosine(context_window_vectors,guideline_vectors)+0.2×relational_score(entity_relationships,knowledge_graph_relations) The parameters are defined as follows: knowledge_support represents the knowledge support score, which is the overall matching score between the query content and the medical knowledge fragments; entity_vectors represents the set of medical entity vectors identified from the user input text; knowledge_vectors represents the knowledge fragment vectors in the medical knowledge vector library; context_window_vectors represents the semantic vectors of the context window around the entity; guideline_vectors represents the vector representation of authoritative medical knowledge fragments or clinical guidelines; entity_relationships represents the relationships between medical entities; knowledge_graph_relations represents the relationships in the medical knowledge graph; max_cosine represents the maximum cosine similarity; avg_cosine represents the average cosine similarity; and relational_score represents the relationship matching score.

[0023] The above-mentioned multi-granularity matching process breaks through the limitations of single-dimensional (such as entity matching only) retrieval, and matches user input text and medical knowledge vector database from multiple granular levels such as entity, context and relationship, thereby improving the relevance of retrieval results; In medical question answering, simply identifying entities (such as "diabetes") is insufficient for accurate knowledge matching. It is necessary to combine entity context (such as "side effects of metformin for diabetic patients") and relationships between entities (such as "metformin - diabetes - blood sugar lowering"). Multi-granularity matching can cover these dimensions and avoid search results deviating from the actual needs of medical scenarios. By calculating a unified knowledge_support score through weighted calculation, a quantifiable matching basis is provided for subsequent medical intent recognition, knowledge recommendation and other stages.

[0024] The constructed intent recognition model is trained using the aforementioned contextual semantic vectors, medical knowledge fragments, and user questions to obtain a fully trained medical-domain-specific intent recognition model. Specifically, the medical-domain-specific intent recognition model with the qwen3-vl-8b model structure is fine-tuned for the medical domain, using over 200,000 labeled samples (covering scenarios such as diseases, symptoms, and drugs) and multimodal data (text + images of rashes, wounds, etc.). During training, ICD-11 and SNOMEDCT medical ontology knowledge, as well as NCCN and WHO clinical guidelines, are injected, and a drug interaction database is integrated to ensure that the model has medical knowledge reasoning capabilities and avoid overfitting.

[0025] This embodiment encodes the user's most recent 5 rounds of historical dialogue into a 768-dimensional temporal semantic vector using a Bi-Encoder architecture. The user's health profile (including age, gender, chronic disease history, etc.) is converted into a structured vector through a feature embedding layer. An attention mechanism is used to dynamically weight and fuse the two types of vectors. Then, a correction factor generated from the current input semantic similarity and urgency index is used to optimize and correct the fused vector, resulting in a standardized contextual semantic vector, providing data support for subsequent associations. Multi-source structured and unstructured data, including clinical guidelines, drug instructions, and disease encyclopedias, are integrated. A medical pre-trained embedding model is used to encode knowledge fragments. Simultaneously, a medical terminology mapping library containing over 15,000 terms and their corresponding everyday expressions is established, forming a unified and professional medical knowledge vector library. Medical entity recognition is performed on the user's input text. Entities are concatenated with their surrounding context to form a query vector. A multi-granularity matching strategy (combining cosine similarity and relationship scoring) is used to retrieve medical knowledge fragments corresponding to the user's question from the medical knowledge vector library. By utilizing the generated contextual semantic vectors, retrieved medical knowledge fragments, and user questions, combined with over 200,000 labeled samples and multimodal data, a medical-specific intent recognition model is fine-tuned. During training, ICD-11 and SNOMEDCT medical ontology knowledge, relevant clinical guidelines and rules, and drug interaction databases are injected to ensure the model's medical reasoning ability and avoid overfitting, ultimately resulting in a fully trained model.

[0026] By employing the aforementioned methods and preserving dialogue temporal features through a Bi-Encoder architecture, and combining attention mechanisms and correction factors to optimize vectors, the contextual semantic vectors are made more closely aligned with actual user needs, providing high-quality data support for subsequent intent recognition. Simultaneously, multi-source knowledge fusion and medical pre-trained encoding ensure knowledge integrity, a professional terminology mapping library addresses the adaptation issue between medical terminology and everyday expressions, and multi-granularity matching strategies improve the accuracy of knowledge retrieval. Targeted fine-tuning in the medical field, training with massive labeled samples and multimodal data, combined with the injection of various medical ontology knowledge and guideline rules, endow the model with professional medical reasoning capabilities, avoiding overfitting and improving the accuracy of subsequent intent recognition. The trained dedicated model can accurately capture users' health-related intentions, laying a solid foundation for subsequent Agent-triggered judgments and hierarchical triggering operations based on intent recognition results, enhancing the feasibility and professionalism of the overall technical solution.

[0027] One embodiment of the present invention utilizes the current input semantic similarity and urgency index to generate a correction factor to optimize and correct the context semantic vector, thereby obtaining the corrected context semantic vector, including: Detects the user's current conversation information and user health record in real time; Obtain the current context semantic vector using real-time current dialogue information and user health profile; Retrieve the context semantic vectors corresponding to the user's historical dialogues and determine the semantic similarity between the context semantic vectors corresponding to the historical dialogues and the current context semantic vectors; A dynamically generated context correction factor is generated using the semantic similarity between the context semantic vector corresponding to the historical dialogue and the current context semantic vector. This dynamically generated context correction factor is then used to optimize and correct the context semantic vector corresponding to the historical dialogue, resulting in a corrected context semantic vector. Specifically, the semantic similarity is obtained in the following way: Calculate the semantic similarity between the context semantic vector of the current user input dialogue information and the context semantic vector corresponding to the user's historical dialogues: context_similarity=cosine(current_input_vector,context_vector) Dynamically generate the context correction factor: context_factor = tanh(β × context_similarity + γ × urgency_indicator) Application correction: corrected_probs = base_probs × (1 + α × context_factor), where α is adaptively adjusted according to the dialogue stage.

[0028] The parameters are defined as follows: context_similarity represents semantic similarity; current_input_vector represents the context semantic vector of the current user input; context_vector represents the context semantic vector of the historical dialogue; cosine represents the cosine similarity calculation function; β represents the semantic similarity weight coefficient, with a value of 0.6; γ represents the urgency weight coefficient, with a value of 0.4; urgency_indicator represents the urgency indicator variable, which takes a value of 1 when an urgent symptom is detected, and 0 otherwise; tanh represents the hyperbolic tangent function, used to normalize the correction factor to the interval [-1,1]; α represents the correction intensity coefficient, which is dynamically adjusted according to the dialogue stage, with an initial value of 0.3, gradually decreasing to 0.1 as the dialogue progresses; base_probs represents the basic intent recognition probability distribution; and corrected_probs represents the corrected intent recognition probability distribution.

[0029] This embodiment achieves dynamic optimization of context semantic vectors through the above technical solutions: A correction factor is generated based on the semantic association between real-time and historical dialogues, enabling the corrected context semantic vectors to adapt to changes in user dialogue intent in real time, improving the timeliness and adaptability of the vectors; simultaneously, the cosine similarity formula is used to quantify the correlation between historical and current contexts, providing objective and accurate numerical support for the generation of correction factors and ensuring the scientific nature of the correction logic; an urgency index is introduced to participate in the generation of correction factors, and the α parameter is adaptively adjusted according to the dialogue stage, enabling the correction operation to adapt to different dialogue scenarios, balancing semantic coherence and demand priority; the corrected context semantic vectors have a higher degree of standardization and stronger semantic association, providing high-quality data for the accurate recognition of subsequent medical-specific intent recognition models, further reducing the probability of misjudgment.

[0030] In one embodiment of the present invention, the current dialogue information of a user is detected in real time, and an initial query vector, a structured context summary vector, and a structured knowledge summary vector are obtained based on the current dialogue information. These vectors are then input into a medical-specific intent recognition model to obtain intent recognition results, including: Real-time detection of the user's current dialogue information, and extraction of text and image data from the user's current dialogue information; Identify entity information in text and image data, and use the entity information to generate an initial query vector V_query; wherein, the entity information is not limited to symptoms, drugs, and examination items, etc. The structured context summary vector C_context and the structured knowledge summary vector K_knowledge, corresponding to the user's current dialogue information, are obtained through a multi-source information parallel retrieval method. The initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge corresponding to the user's current dialogue information are integrated to generate enhanced prompts that can be understood by a medical-specific intent recognition model. The enhanced prompts are input into a medical domain-specific intent recognition model. The intent recognition result is obtained through the consideration factors output by the medical domain-specific intent recognition model. The consideration factors output by the medical domain-specific intent recognition model include an intent clarity score for trigger threshold judgment, an urgency level label for trigger priority, a dependency list for trigger timing control, and a confidence level for trigger reliability assessment. Furthermore, the intent clarity score corresponds to a score range for the intent type. When the intent clarity score is within the score range corresponding to the intent type, it indicates that the intent recognition result belongs to that intent type. The intent types include health intent results and other general intent results.

[0031] Specifically, the enhanced prompts are input into a medical-specific intent recognition model: A medical-specific intent recognition model simultaneously processes text semantics, image features, and structured context; The medical-specific intent recognition model automatically weights the importance of different information sources through its internal attention mechanism. The model's layered structure includes the following layers: an input embedding layer, which converts text and image data into vector representations; text embeddings using pre-trained medical terms, and images using a visual feature extractor; a multimodal fusion layer, which fuses text vectors, image features, and structured contextual information, employing a cross-attention mechanism to achieve intermodal information interaction; a knowledge fusion layer, which integrates ICD-11 (International Classification of Diseases, 11th Revision), SNOMEDCT (Systematic Terminology in Medicine) medical ontology knowledge, and NCCN (National Comprehensive Cancer Network) and WHO (World Health Organization) clinical guidelines, enhancing the model's medical reasoning capabilities through knowledge injection; a multi-layer Transformer encoding layer, consisting of 24 layers, each containing a multi-head self-attention sublayer and a feedforward neural network sublayer, for deep semantic understanding and intent feature extraction; and an intent recognition output layer, which generates structured intent recognition results, including intent type, confidence level, urgency level markers, dependency list, and knowledge references. The model has a total of approximately 8 billion parameters, and is trained using over 200,000 labeled samples and multimodal data during fine-tuning in the medical field.

[0032] Meanwhile, the medical-specific intent recognition model integrates medical expertise through a domain-fine-tuned knowledge fusion layer; The intent recognition model specifically designed for the medical field performs multi-step reasoning internally, rather than simple matching. The multi-step reasoning process is as follows: 1. First, identify the surface intent (the user's directly expressed needs); 2. Then, infer the deeper intent (the user's unspoken but implied health concerns); 3. Combine the user's intent with contextual information to assess the urgency (based on symptom descriptions, physiological data, and medical knowledge); 4. Verify the intent. Figure 1 Consistency (checking for consistency with user's historical behavior); 5. Structured intent output: Standardized intent recognition results are directly generated using a medical-specific intent recognition model, for example: { "primary_intent":"acute_chest_pain_assessment", "primary_confidence":0.95, "secondary_intents":[ {"intent":"cardiac_risk_evaluation","confidence":0.87}, {"intent":"medication_interaction_check","confidence":0.68} ], "urgency level flag":"red", "required_dependencies":["baseline_vitals_collection"], "knowledge_references":["ACC_ACS_Guideline_2023","ESC_ChestPain_Pathway"], "reasoning_trace": "The user described chest pain radiating to the left arm, combined with an abnormal heart rate (118 bpm) and a history of hypertension, consistent with the characteristics of acute coronary syndrome..." } This embodiment detects the user's current dialogue information in real time, extracting text and image data to provide foundational data for subsequent vector generation and intent recognition. It identifies entity information (including symptoms, medications, examination items, etc.) in the extracted text and image data, generating an initial query vector V_query based on this entity information. Using a multi-source information parallel retrieval method, it retrieves and obtains a structured context summary vector C_context and a structured knowledge summary vector K_knowledge corresponding to the user's current dialogue information. It integrates the initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge to generate an enhanced prompt understandable by a medical-specific intent recognition model. The enhanced prompt is input into the medical-specific intent recognition model, which simultaneously processes text semantics, image features, and structured context. Through an internal attention mechanism, it automatically weights the importance of different information sources and integrates medical expertise using a domain-fine-tuned knowledge fusion layer to conduct multi-step reasoning (identifying surface intent, inferring deeper intent, assessing urgency, and verifying intent). Figure 1 (Consistency) Finally, a standardized intent recognition result is generated, which includes core information such as intent clarity score, urgency level label, dependency list, and knowledge confidence.

[0033] Extract entity information from text and image data to overcome the limitations of single text input and improve the comprehensiveness of initial query vectors and subsequent intent recognition; This embodiment overcomes the limitations of single text input by extracting entity information from text and image data, improving the comprehensiveness of the initial query vector and subsequent intent recognition. Simultaneously, it utilizes three types of vectors (initial query, structured context summary, and structured knowledge summary) to accurately correspond to user needs, dialogue context, and medical knowledge, providing high-quality data support for model inference. Furthermore, the model uses an attention mechanism to weight information sources and a knowledge fusion layer to integrate professional knowledge, combined with a multi-step inference process, to accurately capture both surface and deep health intents of users, avoiding misjudgments caused by simple matching. The generated intent recognition results contain multi-dimensional core information, clearly defining key parameters such as intent score and urgency level, providing a clear and reliable decision-making basis for subsequent judgments on whether to trigger the health agent and tiered triggering operations. This effectively improves the triggering accuracy of the health agent and reduces the false trigger rate. Finally, by verifying the consistency between intent and user's historical behavior and associating with the medical knowledge base, the reliability of the intent recognition results is improved, further optimizing the rationality of subsequent health agent triggering.

[0034] In one embodiment of the present invention, the initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge corresponding to the user's current dialogue information are integrated to generate enhanced prompts that can be understood by a medical domain-specific intent recognition model, including: Retrieve the initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge; The cosine similarity between the initial query vector V_query and the structured context summary vector C_context, and the cosine similarity between the initial query vector V_query and the structured knowledge summary vector K_knowledge are obtained using the cosine similarity method. The dynamic weight values ​​corresponding to the initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge are obtained by using the cosine similarity between the initial query vector V_query and the structured context summary vector C_context and the structured knowledge summary vector K_knowledge. The initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge, along with their corresponding dynamic weight values, are weighted and fused to generate enhanced prompts that can be understood by a medical-specific intent recognition model.

[0035] Wherein, the dynamic weight Sq=u+(1-Svc) corresponds to the initial query vector V_query; The dynamic weight Sc = Svc × (1 - u / 2) corresponds to the structured context summary vector C_context; The dynamic weight Sk = Svk × (1 / 2 + u / 2) corresponds to the structured knowledge summary vector K_knowledge; Where u represents the urgency metric value corresponding to the user, which is the proportion of the urgency level marker "urgency_level="red" corresponding to the user's historical dialogue information. If the user is performing intent reasoning for the first time, then u=0; Svc represents the cosine similarity between the initial query vector V_query and the structured context summary vector C_context; Svk represents the cosine similarity between the initial query vector V_query and the structured knowledge summary vector K_knowledge.

[0036] This embodiment combines semantic similarity with a user urgency metric to calculate dynamic weights, enabling weight allocation to match user dialogue intent and priority of needs in real time, thus improving the targeting of enhanced prompts. Simultaneously, by quantifying the semantic correlation of the three types of vectors through cosine similarity, objective data support is provided for weight allocation, ensuring that the fused enhanced prompts accurately relate to user needs, dialogue context, and medical knowledge. Introducing a user urgency metric u allows enhanced prompts to prioritize core needs in emergency situations, optimizing the model's efficiency and accuracy in recognizing urgent health intents. Furthermore, the weighted fusion method aligns with the input requirements of dedicated intent recognition models in the medical field, ensuring that the generated enhanced prompts are directly understood by the model, laying the foundation for the accuracy of subsequent intent recognition and further enhancing the feasibility and professionalism of the overall technical solution. Moreover, by dynamically weighting and rationally allocating the importance of the three types of vectors, interference from invalid information is avoided, fully leveraging the core value of each type of vector, and improving the information density and effectiveness of the enhanced prompts.

[0037] In one embodiment of the present invention, after determining that a health agent needs to be triggered, the method compares the confidence level output by the intent recognition result with the dynamic threshold, and combines this with knowledge support verification rules to determine whether the conditions for triggering the health agent are met; based on the determination result and a hierarchical decision-making mechanism, the method triggers the health agent, including: Once it is determined that a health agent needs to be triggered, the confidence level in the intent recognition result is compared with the dynamic threshold. Based on the comparison result between the confidence level and the dynamic threshold, and combined with the knowledge support verification rules, the triggering condition of the health agent is verified, and the verification result is obtained. Specifically, the dynamic threshold is obtained using the following formula: Threshold_t=0.65×(1+0.05×min(dialogue_round,10))×(1+0.15×knowledge_support) Herein, the meanings of each parameter are as follows: Threshold_t denotes the dynamic threshold, which is used to judge whether the intent clarity is sufficient to trigger the health Agent; 0.65 denotes the base threshold, which is an empirically set initial trigger threshold; dialogue_round denotes the current dialogue turn count, which is used to adjust the threshold according to the dialogue depth; min(dialogue_round, 10) denotes taking the smaller value between the dialogue turn count and 10, to limit the upper limit of threshold growth; knowledge_support denotes the knowledge support degree, which reflects the support degree of the medical knowledge base for the current intent, with a value range of [0, 1], and a larger value indicates more sufficient knowledge support; 0.05 denotes the dialogue turn adjustment coefficient, which controls the influence degree of the dialogue depth on the threshold; 0.15 denotes the knowledge support degree adjustment coefficient, which controls the influence degree of knowledge support on the threshold. As the number of dialogue turns increases and the knowledge support degree rises, the dynamic threshold will increase accordingly, making the trigger judgment more stringent.

[0038] The verification rules corresponding to intent confidence verification are as follows: If primary_confidence (confidence) ≥ Threshold_t (dynamic threshold): the confidence verification is passed, and the professional Agent is triggered; If primary_confidence (confidence) < Threshold_t (dynamic threshold) but the urgency level mark urgency_level = "red": enter the emergency review process; the urgency level mark urgency_level represents the urgency degree, where red has the highest priority, yellow is the second, and green has the lowest priority; The emergency review process includes the following specific steps: First step, secondary confirmation of emergency symptoms: the system re-analyzes the user input text and image data, calls the medical knowledge base to verify the urgency of the symptom description, and confirms whether there is a life-threatening situation; Second step, context consistency check: retrieve the user's historical dialogue records and health files, and judge whether there is contradiction or abnormality between the current symptom description and the historical health data; Third step, knowledge base authority verification: retrieve authoritative medical guidelines and clinical paths to verify whether the current symptom combination meets the emergency medical standards; Fourth step, manual intervention decision-making: if the system cannot determine the urgency, automatically trigger the manual customer service intervention mechanism, and the professional medical and nursing personnel make the final judgment; Fifth step, emergency response triggering: after the review confirms that it is an emergency situation, immediately trigger the emergency medical Agent, first-aid guidance Agent and medical treatment coordination Agent, and push emergency handling suggestions to the user at the same time; Sixth step, recording and feedback: completely record the review process and decision-making basis for subsequent model optimization and effect evaluation.

[0039] If primary_confidence < Threshold_t and there is no emergency tag: downgrade to general consultation, and the professional Agent is not triggered; The downgrade processing includes three levels: the first level is a professional Agent triggering level, which triggers the corresponding professional Agent to provide specialized health services when primary_confidence ≥ Threshold_t and the knowledge support verification is passed; the second level is a general consultation level, which does not trigger the professional Agent but switches to providing general health consultation services based on a medical knowledge base to answer users' basic health questions when primary_confidence < Threshold_t and there is no emergency tag; the third level is an intent clarification level, which triggers an intent clarification Agent to guide the user to clearly express their demands through targeted questions when primary_confidence is between 0.5 and Threshold_t. The downgrade mechanism dynamically adjusts the service level according to the confidence degree and emergency degree of the intent recognition result, ensuring that appropriate health support can still be provided to the user when specialized services cannot be provided.

[0040] The verification rules corresponding to the knowledge support verification are as follows: If knowledge_references is not empty and the authority level ≥ 2 (clinical guideline level): the verification is passed, and the professional Agent is triggered; If there is no clear knowledge reference but primary_confidence > 0.85: the downgrade verification is passed; If the knowledge support degree is low (the authority of the reference source < 1.5) and the confidence degree < 0.8: the triggering is blocked, and the user is requested for clarification.

[0041] The type of intelligent agent included in the health Agent that needs to be triggered is determined according to the verification result combined with a hierarchical decision-making mechanism, and a triggering operation is performed on the type of intelligent agent that needs to be triggered, wherein the hierarchical decision-making mechanism includes an emergency intent layer, a professional intent layer and a fuzzy intent layer; the types of intelligent agents included in the health Agent include a professional Agent, an emergency medical Agent, a first-aid guidance Agent and a medical treatment coordination Agent. The emergency intent layer, the professional intent layer and the fuzzy intent layer refer to the classification of three situations of the user's intent: the emergency intent layer means that the user's dialogue description indicates that the user is in an emergency medical or health emergency abnormal state; the professional intent layer means that the user's dialogue description indicates that the user needs to consult and understand professional medical and health information; the fuzzy intent layer means that the user's dialogue description indicates that the specific medical and health demand to be expressed is not clear.

[0042] This embodiment uses the aforementioned dynamic threshold formula, combined with dialogue rounds and knowledge support, to adjust the threshold, making the trigger judgment adaptable to different dialogue scenarios and improving the accuracy of the judgment. Simultaneously, by combining dual verification (intent confidence + knowledge support) with explicit verification rules, it balances intent reliability and knowledge authority, reducing false triggers, missed triggers, and invalid triggers. Furthermore, through emergency marking judgment and emergency review processes, it prioritizes adaptation to urgent health needs, ensuring the timeliness of Agent triggering in emergency scenarios and improving service security. In addition, the hierarchical decision-making mechanism matches multiple types of health Agents, accurately matching Agents of different levels and types based on verification results to adapt to diverse health service needs. Moreover, through rules such as downgraded verification and trigger blocking, it avoids unreasonable triggering, and supplements key information through a user clarification mechanism, further improving the reliability of trigger decisions and enhancing the practicality of the overall technical solution.

[0043] In one embodiment of the present invention, the triggering conditions and decision rules corresponding to the emergency intent layer, the professional intent layer, and the ambiguous intent layer are as follows: The triggering conditions and decision rules corresponding to the emergency intent layer are as follows: When the triggering condition is a combination of symptoms marked with urgency_level="red" in the urgency level flag and "seek immediate medical attention" in the knowledge base, the corresponding decision rule is to ignore the regular threshold limit and forcibly trigger the emergency medical agent; at the same time, the first aid guidance agent and the medical coordination agent are also triggered. The triggering conditions and decision rules corresponding to the professional intent layer are as follows: When the triggering condition is passing all verifications, or when the urgency level is marked as "yellow" or "green", the corresponding decision rule is to map the intent type to the corresponding professional agent. If multiple valid auxiliary intents exist, they are triggered sequentially according to priority. Simultaneously, when the load on the healthy agents is uneven, they are prioritized for triggering based on the selected healthy agents with the shortest to longest response times; alternatively, the triggering priority of each healthy agent is determined according to the response load intensity and intent intensity of the healthy agent. Then, a snapshot of the triggering context is recorded for subsequent effect evaluation. Details are as follows: Intent types are mapped to corresponding professional agents. Specifically, the mapping relationships between intent types and professional agents are as follows: Symptom consultation intent is mapped to a symptom analysis agent, used to analyze user-described symptoms and provide preliminary assessments; Disease diagnosis intent is mapped to a diagnostic assistance agent, used to provide diagnostic suggestions by combining medical knowledge base and contextual information; Medication guidance intent is mapped to a drug consultation agent, used to provide drug usage instructions, dosage recommendations, and interaction checks; Examination interpretation intent is mapped to a report analysis agent, used to interpret medical examination reports and imaging data; Chronic disease management intent is mapped to a chronic disease follow-up agent, used to develop personalized chronic disease management plans and conduct regular follow-ups; Rehabilitation guidance intent is mapped to a rehabilitation planning agent, used to develop rehabilitation training plans and track progress; Nutritional advice intent is mapped to a nutritional assessment agent, used to provide personalized dietary advice and nutritional plans; Mental health intent is mapped to a mental health support agent, used to provide mental health assessments and emotional support. These mapping relationships are stored in an intent matching table and support dynamic updates and expansion.

[0044] The specific mapping relationship is as follows: Symptom consultation intent corresponds to symptom analysis agent; disease diagnosis intent corresponds to diagnostic assistance agent; medication guidance intent corresponds to medication consultation agent; examination interpretation intent corresponds to report analysis agent; chronic disease management intent corresponds to chronic disease follow-up agent; rehabilitation guidance intent corresponds to rehabilitation plan agent; nutrition advice intent corresponds to nutrition assessment agent; mental health intent corresponds to psychological support agent.

[0045] If multiple valid auxiliary intentions exist, they are triggered sequentially according to priority. Specifically, a valid auxiliary intention refers to a secondary intention associated with the main graph and with a confidence level exceeding the auxiliary intention threshold (default set to 0.6), used to supplement and expand the service scope of the main graph. The criteria for determining a valid auxiliary intention include: the confidence level of the auxiliary intention ≥ 0.6; semantic correlation between the auxiliary intention and the main graph, calculated using cosine similarity with a threshold of 0.5; no functional conflict between the health agent corresponding to the auxiliary intention and the main graph agent; and current system resources allowing multiple agents to be launched simultaneously. The relationship between valid auxiliary intentions and the launch of health agents is as follows: when a valid auxiliary intention is detected, the system sorts the auxiliary intentions from highest to lowest confidence level and triggers the corresponding health agents sequentially, forming a multi-agent service mode where the main agent and auxiliary agents work together to provide users with more comprehensive and accurate health services. For example, when the main graph is "chest pain consultation," valid auxiliary intentions may include "cardiac risk assessment" and "drug interaction check," and the system will simultaneously launch the symptom analysis agent, diagnostic assistance agent, and drug consultation agent.

[0046] A valid auxiliary intent refers to a secondary intent that is associated with the main intent graph and has a confidence level ≥ 0.6. The criteria for its determination are: confidence level ≥ 0.6, semantic relevance ≥ 0.5, no functional conflict between multiple valid auxiliary intents, and system resources allow it. The activation mode between valid auxiliary intents and agents is a multi-agent collaborative service mode formed by triggering them sequentially in descending order of confidence level.

[0047] When the load of the health agents is unbalanced, the health agents with the shortest response time to the longest response time are selected for priority triggering; or, the triggering priority of each health agent is determined according to the response load intensity and intent intensity of the corresponding health agent. Record a snapshot of the triggering context for subsequent effect evaluation; The triggering conditions and decision rules corresponding to the fuzzy intent layer are as follows: The triggering condition is when the confidence level (primary_confidence) is between the threshold (0.5) and the dynamic threshold (Threshold_t); or, there is no urgent flag; or, the knowledge support level is medium support. Specifically, knowledge support is a quantitative indicator used to measure the degree to which a medical knowledge base supports a user's current health intent or query content. The calculation dimensions of knowledge support include entity matching, context matching, and relation matching, with entity matching having a weight of 0.5, context matching having a weight of 0.3, and relation matching having a weight of 0.2. The knowledge support score is obtained through a weighted summation. Furthermore, a knowledge support score within the range of [0.8, 1.0] indicates high support; within [0.6, 0.8] indicates medium support; and within [0, 0.6] indicates low support.

[0048] The corresponding decision rule is to trigger the "Intent Clarification Agent" to generate targeted clarification questions; at the same time, the number of consecutive clarifications is limited to ≤3 times to avoid the dialogue getting stuck in a loop; if the clarification is still uncertain, the knowledge support level is downgraded to providing general health knowledge.

[0049] In this embodiment, the emergency intent layer ignores conventional threshold restrictions and forcibly triggers multiple emergency-related agents to ensure timely response to urgent health needs and maximize user health and safety. Simultaneously, the professional intent layer accurately maps professional agents according to intent type, adjusts trigger priorities using load balancing strategies, and records context snapshots, balancing trigger targeting, response efficiency, and subsequent effect tracking. The fuzzy intent layer supplements key information through an intent clarification mechanism, limits the number of clarifications to avoid dialogue loops, balances user experience and intent recognition accuracy, and reduces invalid triggers in low-confidence scenarios. Through these three intent layers corresponding to clear trigger conditions and decision rules, scenarios with different priorities and confidence levels are covered, achieving accurate matching and efficient triggering of health agents and improving the practicality and adaptability of the overall technical solution.

[0050] One embodiment of the present invention determines the triggering priority of each health agent according to the response load intensity and intent intensity corresponding to the health agent, including: Retrieve the knowledge confidence and intent type from the current intent recognition result; The matching coefficient M(Ai, I) = Table[index(I)][index(Ai)] is obtained by combining the double-index lookup table with the completed intent matching table to obtain the matching coefficient between the intent type and each health agent in the current intent recognition result; where index(I) represents the row index corresponding to the intent type I in the completed intent matching table; and index(Ai) represents the column index corresponding to each health agent in the completed intent matching table. The intent strength R = C × M(Ai, I) × (1 + α × F) between each health agent and intent type is obtained by combining the matching coefficient between the intent type and each health agent in the current intent recognition result with the urgency flag parameter and knowledge confidence. Here, C represents the knowledge confidence; M(Ai, I) represents the matching coefficient between the intent type and each health agent in the current intent recognition result; α represents the urgency enhancement coefficient, which ranges from 0.3 to 0.6 and is used to amplify the importance of the matching degree in emergency situations; F represents the urgency flag parameter in the intent recognition result. When the urgency level flag corresponding to the intent type is "red", F = 1; otherwise, F = 0. Response priority parameters for each health agent are generated using the response load intensity and intent intensity corresponding to each health agent; The trigger priority of each health agent is re-determined according to the response priority parameter from high to low, and the health agents are triggered sequentially according to their trigger priorities.

[0051] In this embodiment, firstly, the core parameters of the current intent recognition result are retrieved, including knowledge confidence (an indicator of the reliability of the intent recognition result) and intent type (the intent classification corresponding to the user's needs). Then, based on the dual-index lookup table method, the intent type is mapped to the row index [index(I)] of the intent matching table, and each healthy agent is mapped to the column index [index(Ai)]. The matching coefficient M(Ai,I) between the intent type and each healthy agent is directly obtained through a two-dimensional lookup table. This coefficient represents the degree of adaptation between the intent and the agent's function. By introducing an urgency control mechanism, the intent intensity quantification formula R=C×M(Ai,I)×(1+α×F) is constructed. Among them, the knowledge confidence C assigns a reliability weight to the recognition result; the urgency flag parameter F is linked to the enhancement coefficient α. Only when the intent urgency is at the highest level (urgency level flag urgency_level="red"), the amplification effect of the matching coefficient is triggered, strengthening the agent's response weight in emergency scenarios. By integrating the response load intensity of each healthy agent with the calculated intent intensity, a response priority parameter is generated, achieving a three-dimensional balance of adaptability, urgency, and load capacity. Finally, the healthy agents are sorted in descending order according to the response priority parameter, the triggering order is determined, and the triggering operations are executed sequentially.

[0052] This embodiment uses a dual-index lookup table method to directly obtain matching coefficients, avoiding complex calculation errors and ensuring accurate mapping between intent types and the functional compatibility of health agents. An urgency enhancement mechanism is introduced to increase the intent strength of the corresponding agent for high-urgency intents, ensuring that urgent health needs receive priority responses. Knowledge confidence is incorporated as a weighting factor into the intent strength calculation, making the agent triggering priority positively correlated with the reliability of intent recognition results, reducing the probability of false triggering. Priority parameters are generated by combining the response load intensity of health agents to avoid over-triggering of high-load agents, improving the stability and efficiency of multi-agent collaborative responses. The triggering order is determined by priority sorting, achieving orderly invocation of health agents, reducing ineffective scheduling, and improving overall response speed.

[0053] One embodiment of the present invention generates a response priority parameter for each health agent using the response load intensity and intent intensity corresponding to each health agent, including: Retrieve the precision weight corresponding to each health agent, with a value range of [0.5, 1.5]. Specifically, the precision weight is used to reflect the professional depth of the agent, and is set as follows: Professional Agent = 1.5, First Aid Guidance Agent = 1.2, Emergency Medical Agent = 1.0, Medical Coordination Agent = 0.8. The timeliness weight corresponding to each health agent is retrieved, with a value range of [0.5, 1.5]. Specifically, the timeliness weight is used to describe the clinical importance of the agent's response speed, and is set as follows: Emergency Medical Agent = 1.5, First Aid Guidance Agent = 1.3, Medical Treatment Coordination Agent = 1.0, and Professional Agent = 0.7. Calculate the percentage of tasks currently being processed by each health agent relative to the total number of tasks. The response load intensity E=(Q+T) / [L(Ai)+λ] is obtained by combining the accuracy weight and timeliness weight corresponding to each health agent with the percentage of tasks currently being processed by each health agent relative to the total number of tasks; where Q represents the accuracy weight corresponding to each health agent; F represents the timeliness weight corresponding to each health agent; L(Ai) represents the percentage of tasks currently being processed by each health agent relative to the total number of tasks; and λ represents the load smoothing constant, with a value of 0.5, used to prevent the denominator from being zero when the load is 0, and to smooth out the impact of load differences. The intent strength between each health agent and intent type is retrieved, and the response priority parameter P=R×E is generated for each health agent using the response load strength and intent strength corresponding to each health agent; where R represents the intent strength between each health agent and intent type; and E represents the response load strength corresponding to each health agent.

[0054] This embodiment retrieves two types of core attribute weights for each health agent: First, a precision weight Q, ranging from 0.5 to 1.5, configured differently based on the agent's professional depth, with the highest weight for professional agents and the lowest for medical coordination agents; second, a timeliness weight T, also ranging from 0.5 to 1.5, configured differently based on the clinical importance of the agent's response speed, with the highest weight for emergency medical agents and the lowest for professional agents. The number of tasks currently being processed by each health agent is counted, and the percentage of each task relative to the total number of tasks is calculated to obtain the load percentage parameter L(Ai), representing the current task load status of each agent. A load intensity calculation formula E=(Q+T) / [L(Ai)+λ] is constructed, where λ is a load smoothing constant of 0.5, which avoids the problem of a zero denominator when L(Ai) is 0 and smooths the load differences between different agents. By fusing the sum of the precision and timeliness weights, the load percentage, and the smoothing constant, a quantitative assessment of the agent's overall load capacity is achieved. The calculated intent intensity R of each Agent is retrieved and multiplied by the response load intensity E to obtain the final response priority parameter P=R×E, thus completing the fusion of multi-dimensional parameters such as intent fit, urgency, Agent attributes and load status.

[0055] This embodiment differentiates the core attribute value of different types of healthy agents by introducing precision weights and timeliness weights, avoiding homogenization in agent priority assessment. The setting of the load smoothing constant λ addresses the calculation anomaly issue of zero load and weakens the interference of extreme load percentages on the assessment results, improving the robustness of load intensity calculation. Priority is calculated by combining intent intensity with the agent's own attributes and current load status, allowing the priority parameter to simultaneously reflect intent suitability, agent professional value, and carrying capacity, thus improving the scientific nature of decision-making. The quantified result of the priority parameter P provides a precise basis for subsequent agent triggering and ranking, ensuring that highly adaptable, high-value, and low-load agents respond first, improving overall service efficiency.

[0056] This invention proposes an Agent-triggered system based on big health intent recognition and context, such as... Figure 2 As shown, the Agent triggering system includes: The model training module is used to train the already constructed medical domain-specific intent recognition model using the content of the user's most recent dialogues, and to obtain the trained medical domain-specific intent recognition model. The intent recognition module is used to detect the user's current dialogue information in real time, obtain the corresponding initial query vector, structured context summary vector, and structured knowledge summary vector based on the user's current dialogue information, and input the initial query vector, structured context summary vector, and structured knowledge summary vector corresponding to the user's current dialogue information into a medical-specific intent recognition model to obtain intent recognition results. The Agent trigger judgment module is used to determine that a healthy Agent is triggered only when the intent recognition result is a healthy intent result and when the intent clarity score is not lower than a preset intent score threshold. The Agent execution module is used to trigger the health agent after determining that it needs to be triggered. It compares the confidence level output by the intent recognition result with the dynamic threshold and combines the knowledge support verification rules to determine whether the conditions for triggering the health agent are met. Based on the judgment result and the hierarchical decision-making mechanism, it performs the triggering operation on the health agent.

[0057] This embodiment is based on a pre-built medical-specific intent recognition model. It is first trained using the content of the user's most recent dialogues. The user's current dialogue information is detected in real time, and the initial query vector, structured context summary vector, and structured knowledge summary vector corresponding to the information are extracted and generated. The three types of vectors are input into the trained intent recognition model to obtain the intent recognition result. Based on the result, it is determined whether to trigger the health agent. If it needs to be triggered, the health agent triggering operation is executed through a hierarchical decision-making mechanism.

[0058] This embodiment utilizes a medical-specific intent recognition model trained through multiple rounds of user dialogue, resulting in enhanced adaptability and accurate identification of users' health-related intents, reducing false triggers and missed triggers. Simultaneously, by integrating three types of vectors, it fully leverages the coherence of the dialogue context and the relevance of medical knowledge to improve the rationality of trigger decisions. The hierarchical decision-making mechanism is adaptable to diverse health service scenarios, enhancing the efficiency of health agent services and driving the upgrading of health services towards greater intelligence and precision.

[0059] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. An agent-triggered method based on big health intent recognition and context, characterized in that, The Agent triggering method includes: The medical domain-specific intent recognition model is trained using the content of the user's most recent dialogues to obtain the trained medical domain-specific intent recognition model. The system detects the user's current dialogue information in real time, obtains the corresponding initial query vector, structured context summary vector, and structured knowledge summary vector based on the user's current dialogue information, and inputs the initial query vector, structured context summary vector, and structured knowledge summary vector corresponding to the user's current dialogue information into a medical-specific intent recognition model to obtain intent recognition results, which include health intent results and other general intent results. Only when the intent recognition result is a healthy intent result, and when the intent clarity score is not lower than the preset intent score threshold, is it determined that the healthy agent is triggered; Once it is determined that a health agent needs to be triggered, the comparison between the confidence score output by the intent recognition result and the dynamic threshold, combined with the knowledge support verification rules, is used to determine whether the conditions for triggering a health agent are met. Based on the judgment result and combined with the hierarchical decision-making mechanism, the health agent is triggered.

2. The Agent triggering method according to claim 1, characterized in that, The pre-built medical domain-specific intent recognition model is trained using the user's most recent dialogue content, resulting in a fully trained medical domain-specific intent recognition model, including: The user's historical dialogues are encoded into a 768-dimensional temporal semantic vector using a Bi-Encoder architecture. The user's health profile is converted into a structured vector through a feature embedding layer. The temporal semantic vector and the structured vector are dynamically weighted using an attention mechanism to generate a contextual semantic vector. The contextual semantic vector is optimized and corrected by generating a correction factor using the current input semantic similarity and urgency index. The corrected contextual semantic vector is then obtained. Using a vectorized medical knowledge base and retrieval matching strategies, medical knowledge fragments corresponding to the user's questions are retrieved from the constructed medical knowledge vector base. The constructed intent recognition model is trained using the context semantic vector, medical knowledge fragments, and user questions to obtain a trained medical-specific intent recognition model.

3. The Agent triggering method according to claim 2, characterized in that, The context semantic vector is optimized and corrected by generating a correction factor using the current input semantic similarity and urgency index, resulting in the corrected context semantic vector, including: Detects the user's current conversation information and user health record in real time; Obtain the current context semantic vector using real-time current dialogue information and user health profile; Retrieve the context semantic vectors corresponding to the user's historical dialogues and determine the semantic similarity between the context semantic vectors corresponding to the historical dialogues and the current context semantic vectors; A dynamic context correction factor is generated by using the semantic similarity between the context semantic vector corresponding to the historical dialogue and the current context semantic vector. The dynamic context correction factor is then used to optimize and correct the context semantic vector corresponding to the historical dialogue, thereby obtaining the corrected context semantic vector.

4. The Agent triggering method according to claim 1, characterized in that, The system detects the user's current dialogue information in real time, obtains the corresponding initial query vector, structured context summary vector, and structured knowledge summary vector based on the user's current dialogue information, and inputs these vectors into a medical-specific intent recognition model to obtain intent recognition results, including: Real-time detection of the user's current dialogue information, and extraction of text and image data from the user's current dialogue information; Identify entity information in text and image data, and use the entity information to generate an initial query vector V_query; The structured context summary vector C_context and the structured knowledge summary vector K_knowledge, corresponding to the user's current dialogue information, are obtained through a multi-source information parallel retrieval method. The initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge corresponding to the user's current dialogue information are integrated to generate enhanced prompts that can be understood by a medical-specific intent recognition model. The enhanced prompts are input into a medical domain-specific intent recognition model. The intent recognition result is obtained through the consideration factors output by the medical domain-specific intent recognition model. The consideration factors output by the medical domain-specific intent recognition model include an intent clarity score for trigger threshold judgment, an urgency level label for trigger priority, a dependency list for trigger timing control, and a confidence level for trigger reliability assessment. Furthermore, the intent clarity score corresponds to a score range for the intent type. When the intent clarity score is within the score range corresponding to the intent type, it indicates that the intent recognition result belongs to that intent type. The intent types include health intent results and other general intent results.

5. The Agent triggering method according to claim 4, characterized in that, The initial query vector V_query, structured context summary vector C_context, and structured knowledge summary vector K_knowledge corresponding to the user's current dialogue information are integrated to generate enhanced prompts that are understood by a medical-specific intent recognition model, including: Retrieve the initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge; The cosine similarity between the initial query vector V_query and the structured context summary vector C_context, and the cosine similarity between the initial query vector V_query and the structured knowledge summary vector K_knowledge are obtained using the cosine similarity method. The dynamic weight values ​​corresponding to the initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge are obtained by using the cosine similarity between the initial query vector V_query and the structured context summary vector C_context and the structured knowledge summary vector K_knowledge. The initial query vector V_query, the structured context summary vector C_context, and the structured knowledge summary vector K_knowledge, along with their corresponding dynamic weight values, are weighted and fused to generate enhanced prompts that can be understood by a medical-specific intent recognition model.

6. The Agent triggering method according to claim 1, characterized in that, Once it is determined that the health agent needs to be triggered, the comparison between the confidence score output by the intent recognition result and the dynamic threshold, combined with the knowledge support verification rules, is used to determine whether the conditions for triggering the health agent are met. Based on the judgment results and a hierarchical decision-making mechanism, actions are triggered on the health agent, including: Once it is determined that a health agent needs to be triggered, the confidence level in the intent recognition result is compared with a dynamic threshold. Based on the comparison result between the confidence level and the dynamic threshold, and combined with the knowledge support verification rules, the triggering conditions of the health agent are verified, and the verification result is obtained. Based on the verification results and the hierarchical decision-making mechanism, the types of intelligent agents contained in the health agent that need to be triggered are determined, and the triggering operation is performed on the types of intelligent agents that need to be triggered. The hierarchical decision-making mechanism includes an emergency intent layer, a professional intent layer, and a fuzzy intent layer; the types of intelligent agents contained in the health agent include professional agents, emergency medical agents, first aid guidance agents, and medical treatment coordination agents.

7. The Agent triggering method according to claim 6, characterized in that, The triggering conditions and decision rules corresponding to the emergency intent layer, professional intent layer, and ambiguous intent layer are as follows: The triggering conditions and decision rules corresponding to the emergency intent layer are as follows: When the triggering condition is a combination of symptoms marked with urgency_level="red" in the urgency level flag and "seek immediate medical attention" in the knowledge base, the corresponding decision rule is to ignore the regular threshold limit and forcibly trigger the emergency medical agent; at the same time, the first aid guidance agent and the medical coordination agent are also triggered. The triggering conditions and decision rules corresponding to the professional intent layer are as follows: When the triggering condition is that all verifications are passed, or the urgency level is marked as "yellow" or "green", the corresponding decision rule is to map the intent type to the corresponding professional agent. If there are multiple valid auxiliary intents, they are triggered sequentially according to priority. At the same time, when the load of the healthy agents is unbalanced, the healthy agents with the shortest response time to the longest are prioritized for triggering. Alternatively, the triggering priority of each healthy agent is determined according to the response load intensity and intent intensity of the healthy agent. Then, a snapshot of the triggering context is recorded for subsequent effect evaluation. The triggering conditions and decision rules corresponding to the fuzzy intent layer are as follows: When the triggering condition is that the confidence level (primary_confidence) is between the threshold of 0.5 and the dynamic threshold (Threshold_t); or, there is no emergency marker; or, the knowledge support level is medium support, the corresponding decision rule is to trigger the "intent clarification agent" to generate targeted clarification questions; at the same time, the number of consecutive clarifications is limited to ≤3 times to avoid the dialogue from getting stuck in a loop; and if the clarification is still uncertain, it is downgraded to providing general health knowledge.

8. The Agent triggering method according to claim 7, characterized in that, The triggering priority for each health agent is determined based on the response load intensity and intent intensity corresponding to the health agent, including: Retrieve the knowledge confidence and intent type from the current intent recognition result; The matching coefficient between the intent type and each health agent in the current intent recognition result is obtained by using a dual-index lookup table method combined with the completed intent matching table; The intent strength between each health agent and intent type is obtained by combining the matching coefficient between the intent type and each health agent in the current intent recognition result with the urgency flag parameter and knowledge confidence. Response priority parameters for each health agent are generated using the response load intensity and intent intensity corresponding to each health agent; The trigger priority of each health agent is re-determined according to the response priority parameter from high to low, and the health agents are triggered sequentially according to their trigger priorities.

9. The Agent triggering method according to claim 8, characterized in that, The response priority parameters for each health agent are generated using the response load intensity and intent intensity corresponding to each health agent, including: Retrieve the precision weight corresponding to each health agent, with a value range of [0.5, 1.5]. Retrieve the timeliness weight corresponding to each health agent, with a value range of [0.5, 1.5]; Calculate the percentage of tasks currently being processed by each health agent relative to the total number of tasks. The response load intensity of each healthy agent is obtained by combining the accuracy weight and timeliness weight corresponding to each healthy agent with the percentage of the number of tasks currently being processed by each healthy agent relative to the total number of tasks; The intent strength between each health agent and intent type is retrieved, and the response priority parameter corresponding to each health agent is generated using the response load strength and intent strength corresponding to each health agent.

10. An Agent-triggered system based on big health intent recognition and context, characterized in that, The Agent triggering system includes: The model training module is used to train the already constructed medical domain-specific intent recognition model using the content of the user's most recent dialogues, and to obtain the trained medical domain-specific intent recognition model. The intent recognition module is used to detect the user's current dialogue information in real time, obtain the corresponding initial query vector, structured context summary vector, and structured knowledge summary vector based on the user's current dialogue information, and input the initial query vector, structured context summary vector, and structured knowledge summary vector corresponding to the user's current dialogue information into a medical-specific intent recognition model to obtain intent recognition results. The Agent trigger judgment module is used to determine that a healthy Agent is triggered only when the intent recognition result is a healthy intent result and when the intent clarity score is not lower than a preset intent score threshold. The Agent execution module is used to trigger the health agent after determining that it needs to be triggered. It compares the confidence level output by the intent recognition result with the dynamic threshold and combines the knowledge support verification rules to determine whether the conditions for triggering the health agent are met. Based on the judgment result and the hierarchical decision-making mechanism, it performs the triggering operation on the health agent.