Anxiety intelligent decision method and system based on knowledge retrieval enhancement
By semantic parsing and fusion of multi-source medical data, combined with contextual learning and knowledge retrieval enhancement, efficient, accurate and interpretable intelligent decision-making for the diagnosis and treatment of anxiety disorders has been achieved. This solves the problems of data fragmentation and static strategies in existing systems, and improves the efficiency and accuracy of diagnosis and treatment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU SEVENTH PEOPLES HOSPITAL
- Filing Date
- 2026-05-14
- Publication Date
- 2026-06-12
AI Technical Summary
Existing intelligent decision support systems for the diagnosis and treatment of anxiety disorders suffer from problems such as data fragmentation, reliance on manual integration for decision-making, lack of evidence-based constraints on generated results, and difficulty in dynamically updating strategies, which limit the efficiency and accuracy of diagnosis and treatment.
By semantic parsing and fusion of multi-source medical data, a unified patient dataset is constructed. Combined with a context learning strategy, patient context representation vectors are generated. The knowledge retrieval enhancement module is used to perform semantic similarity retrieval and credibility screening, optimize treatment strategies in real time, and realize dynamic context modeling and consistency verification.
It improves the efficiency, accuracy, and interpretability of diagnosis and treatment of complex anxiety cases, ensures the individualization and real-time nature of decision-making outcomes, reduces the information processing burden on physicians, and enhances clinical understandability and traceability.
Smart Images

Figure CN122201651A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the fields of smart healthcare and artificial intelligence technology. More specifically, this application relates to an anxiety-based intelligent decision-making method and system based on knowledge retrieval enhancement. Background Technology
[0002] Anxiety disorders, as a common type of mental illness, are characterized by diverse symptoms, complex triggering factors, and significant fluctuations in course. Clinical diagnosis and treatment often require a comprehensive assessment based on multiple sources of data, including the patient's medical history, scale assessment results, chief complaints, and follow-up feedback. However, in real-world medical settings, this multi-source medical data is typically stored in different systems, exhibiting heterogeneous data structures and inconsistent semantic expressions. This forces doctors to spend considerable time integrating and manually comparing information during diagnosis and treatment, thus limiting decision-making efficiency.
[0003] Meanwhile, existing intelligent decision support systems mostly employ fixed rules or single-model reasoning, lacking the ability to model dynamic changes in patient situations and struggling to effectively integrate evidence-based medicine knowledge with individualized situational characteristics. In complex anxiety cases, when patient symptoms fluctuate over time or treatment responses change, traditional systems often fail to adaptively adjust strategies based on real-time data, easily leading to decision lags or inaccurate recommendations. Furthermore, while some generative decision support systems based on large models can provide natural language suggestions, they suffer from insufficient knowledge traceability and difficulty in ensuring consistency between generated content and authoritative guidelines.
[0004] Therefore, there is an urgent need for an intelligent anxiety decision-making method that can integrate multi-source medical data, construct dynamic contextual representations, combine knowledge retrieval enhancement mechanisms, and achieve closed-loop consistency verification, in order to improve the efficiency, accuracy, and interpretability of diagnosis and treatment of complex anxiety cases. Summary of the Invention
[0005] The summary section introduces a series of simplified concepts, which will be further explained in detail in the detailed description section. This summary section is not intended to limit the key and essential technical features of the claimed technical solution, nor is it intended to determine the scope of protection of the claimed technical solution.
[0006] Firstly, this application proposes an anxiety-based intelligent decision-making method based on knowledge retrieval enhancement, comprising: Acquire multi-source medical data of the target patient, and use natural language processing technology to perform semantic parsing, information fusion and standardization processing on the multi-source medical data to construct a unified patient dataset. The multi-source medical data includes electronic medical record data, scale assessment data, patient complaint text data and follow-up feedback data. Contextual learning strategy is used to perform contextual modeling on the above unified patient dataset to generate patient contextual representation vectors. The contextual representation vectors include semantic relationships and timeliness data of anxiety symptom entities, triggering factor entities, medication entities, and efficacy feedback entities. Based on the aforementioned patient context representation vector, the knowledge retrieval enhancement module is invoked to perform semantic similarity retrieval in the anxiety diagnosis and treatment knowledge base, obtain candidate knowledge fragments that match the aforementioned patient context representation vector, and perform credibility weighting and timeliness filtering on the aforementioned candidate knowledge fragments to obtain the filtered knowledge fragments. The selected knowledge fragments and the patient context representation vectors are fused and reasoned together. The treatment strategy is optimized in real time using the instruction tuning strategy to generate structured decision results, which include treatment plan recommendations, risk level assessments, and intervention priority rankings. The structured decision results are checked for consistency with the real-time updated multi-source medical data. When the changes in key context features exceed the preset threshold, the knowledge retrieval enhancement module is called again and the treatment strategy is updated to output the real-time optimized anxiety intelligent decision results.
[0007] In one feasible implementation, the above-mentioned acquisition of multi-source medical data of the target patient, and the semantic parsing, information fusion, and standardization processing of the multi-source medical data through natural language processing technology, to construct a unified patient dataset, including: Named entity recognition, medical terminology standard mapping, and relation extraction are performed on the above-mentioned electronic medical record data, the above-mentioned scale assessment data, the above-mentioned patient chief complaint text data, and the above-mentioned follow-up feedback data to generate a multi-source medical entity set with semantic labels. A cross-modal semantic alignment model is constructed to perform time-axis alignment and semantic association matching on the above multi-source medical entity set, forming a unified semantic index graph. The unified semantic index graph records the causal relationship strength and source confidence between entities. A conflict resolution function based on time decay factor and source authority level is established to recalculate the confidence of conflicting entities in the above unified semantic index graph and obtain entity fusion weights. Based on the aforementioned entity fusion weights, the above multi-source medical entity set is weighted and fused and its fields are standardized and mapped to generate a unified patient dataset with consistent field structure and semantics, and with confidence weight labels.
[0008] In one feasible implementation, the aforementioned conflict resolution function, based on a time decay factor and source authority level, is used to recalculate the confidence of conflicting entities in the unified semantic index graph to obtain entity fusion weights, including: Identify conflicting entity pairs in the unified semantic index graph above that have the same semantic labels but inconsistent attribute values, and construct a set of conflicting entities. Assign a source authority coefficient and a time decay coefficient to each conflicting entity in the aforementioned set of conflicting entities, wherein the source authority coefficient is determined based on the data source level and the time decay coefficient is calculated based on the data generation time. A conflict resolution scoring function is constructed, which weights and fuses the source authority coefficient, the time decay coefficient, and the entity semantic matching degree to obtain the confidence score of each conflicting entity. Based on the confidence scores mentioned above, the conflicting entities are normalized, and the entity fusion weights used for data fusion are output.
[0009] In one feasible implementation, the above-mentioned context-based learning strategy is used to perform context modeling on the unified patient dataset to generate patient context representation vectors, including: The unified patient dataset was processed by time-series segmentation to extract symptom intensity change sequences, medication response change sequences, and mood fluctuation change sequences, and a multi-dimensional contextual basic feature matrix was constructed. A scenario evolution prediction model is trained based on a historical anxiety case sample database. The trend of the above multidimensional scenario basic feature matrix is predicted, the scenario deviation between the current scenario state and the predicted scenario state is calculated, and the above scenario deviation is used as a dynamic adjustment factor. A context fusion function is constructed, which includes symptom dimension weights, triggering factor dimension weights, and time decay coefficients. The above-mentioned multi-dimensional context basic feature matrix and the above-mentioned dynamic adjustment factors are weighted and encoded to generate a context embedding vector. The above context embedding vectors are normalized and projected into the semantic space to output a patient context representation vector that includes semantic relationship strength and time-sensitive identifiers.
[0010] In one feasible implementation, the aforementioned training of the situation evolution prediction model based on a historical anxiety case sample database, trend prediction of the aforementioned multidimensional situational basic feature matrix, calculation of the situational deviation between the current situational state and the predicted situational state, and use the aforementioned situational deviation as a dynamic adjustment factor, including: The situational feature sequences in the above-mentioned historical anxiety case sample database were labeled and classified to establish a training sample set containing symptom evolution paths and treatment response paths; The scenario evolution prediction model is trained based on the above training sample set, and the above multi-dimensional scenario basic feature matrix is input into the scenario evolution prediction model to obtain the predicted scenario state vector. Calculate the difference between the predicted scenario state vector and the current scenario state vector. The difference is the scenario deviation. The above-mentioned situational deviation is normalized, and the normalized situational deviation is embedded into the situational weight adjustment function to form a dynamic adjustment factor for subsequent situational fusion coding.
[0011] In one feasible implementation, the knowledge retrieval enhancement module, based on the aforementioned patient context representation vector, performs semantic similarity retrieval in the anxiety diagnosis and treatment knowledge base to obtain candidate knowledge fragments matching the aforementioned patient context representation vector. The candidate knowledge fragments are then weighted by credibility and timeliness to obtain the filtered knowledge fragments, including: The core symptom dimension weights and risk level weights in the patient context representation vector above are analyzed. Based on the core symptom dimension weights, the knowledge subspace of the anxiety diagnosis and treatment knowledge base above is pruned to construct a context-related knowledge subgraph. Vectorized semantic similarity calculation is performed within the aforementioned context-related knowledge subgraph to obtain an initial set of candidate knowledge fragments, and a semantic matching score is generated for each knowledge fragment in the aforementioned initial set of candidate knowledge fragments. A joint credibility assessment model was constructed, which integrates the semantic matching score with the authority level of the knowledge source, the level of evidence-based medicine, and the decay coefficient of publication time to obtain a comprehensive score; Based on the comprehensive score, the initial set of candidate knowledge fragments is sorted and threshold-filtered, and the filtered knowledge fragments that have the highest matching degree with the patient context representation vector and meet the requirements of credibility and timeliness are output.
[0012] In one feasible implementation, the above-mentioned filtered knowledge fragments and the above-mentioned patient context representation vector are fused and reasoned, and the treatment strategy is optimized in real time using an instruction tuning strategy to generate structured decision results, including: The knowledge fragments selected above are reconstructed into evidence chains to form a knowledge reasoning subgraph that includes intervention measure nodes, applicable condition nodes, and efficacy expectation nodes. The knowledge reasoning subgraph is then structurally encoded. The patient context representation vector is mapped to a context control vector. The context control vector is then input together with the knowledge reasoning subgraph encoded by the structure. A context constraint generation instruction template is constructed through an instruction tuning strategy to limit the generation process to only be carried out within the coverage of the knowledge reasoning subgraph. Under the control of the above-mentioned context constraint generation instruction template, fusion reasoning is performed, and the output includes an intermediate decision representation including treatment plan field, risk level field, and intervention priority field; The above intermediate decision representations are subjected to field normalization mapping and consistency verification to generate structured decision results that meet the structure definition specifications.
[0013] In one feasible implementation, the patient context representation vector is mapped to a context control vector, the context control vector is jointly input with the structured knowledge reasoning subgraph, and a context constraint generation instruction template is constructed through an instruction tuning strategy to restrict the generation process to only within the coverage of the knowledge reasoning subgraph, including: The patient context representation vector above is decomposed into dimensions, and the weights of high-risk symptom dimensions and treatment sensitivity weights are extracted to generate a set of context control parameters. The above set of situation control parameters is embedded into a preset instruction framework to form a draft instruction structure that includes treatment scope constraints and evidence citation constraints. The above-mentioned instruction structure draft is subjected to semantic consistency verification and field boundary restriction processing to ensure that the generated content can only call the intervention measure node and applicable condition node in the above-mentioned knowledge reasoning subgraph. Output the context constraint generation instruction template for use in the fusion reasoning phase.
[0014] In one feasible implementation, the structured decision-making results are compared with the real-time updated multi-source medical data for consistency verification. When a change in key contextual features is detected to exceed a preset threshold, the knowledge retrieval enhancement module is invoked again, and the treatment strategy is updated to output a real-time optimized anxiety intelligent decision-making result, including: Incremental semantic encoding is performed on the aforementioned real-time updated multi-source medical data to generate a gradient of change compared to the previous round of patient context representation vector, where the gradient of change represents the degree of dynamic change in the patient's state. Based on the aforementioned change gradient, the affected context feature dimensions are identified, and local re-inference is performed on the knowledge subspace corresponding to that dimension to obtain the local re-inference results. Based on the above results of local re-reasoning, the above structured decision results are re-evaluated and updated; The consistency verification module performs multi-dimensional verification of the updated structured decision results to ensure that the real-time optimized decision results meet the individualized needs of patients and the latest clinical guidelines, and outputs the final real-time optimized anxiety intelligent decision results.
[0015] Secondly, this application proposes an anxiety-enhancing intelligent decision-making system based on knowledge retrieval enhancement, used to execute the anxiety-enhancing intelligent decision-making method based on knowledge retrieval enhancement described in the first aspect, comprising: The acquisition unit is used to acquire multi-source medical data of the target patient and to perform semantic parsing, information fusion and standardization processing on the multi-source medical data through natural language processing technology to construct a unified patient dataset. The multi-source medical data includes electronic medical record data, scale assessment data, patient complaint text data and follow-up feedback data. The generation unit is used to perform context modeling on the unified patient dataset based on the context learning strategy and generate patient context representation vectors, wherein the context representation vectors include semantic relationships and timeliness data of anxiety symptom entities, triggering factor entities, medication entities and efficacy feedback entities; The filtering unit is used to call the knowledge retrieval enhancement module based on the above patient context representation vector, perform semantic similarity retrieval in the anxiety diagnosis and treatment knowledge base, obtain candidate knowledge fragments that match the above patient context representation vector, and perform credibility weighting and timeliness filtering on the above candidate knowledge fragments to obtain the filtered knowledge fragments. The reasoning unit is used to fuse and reason with the above-screened knowledge fragments and the above-mentioned patient context representation vector, optimize the treatment strategy in real time using the instruction tuning strategy, and generate structured decision results, wherein the above-mentioned structured decision results include treatment plan suggestions, risk level assessment and intervention priority ranking. The output unit is used to verify the consistency between the structured decision results and the real-time updated multi-source medical data. When the changes in key context features exceed the preset threshold, the knowledge retrieval enhancement module is called again and the treatment strategy is updated to output the real-time optimized anxiety intelligent decision results.
[0016] Compared to related technologies, which suffer from problems such as data fragmentation, reliance on manual integration for decision-making, lack of evidence-based constraints on generated results, and difficulty in dynamically updating strategies, this invention constructs a unified patient dataset through semantic fusion of multi-source medical data, achieving a structured and computable high-quality input foundation. A contextual learning strategy generates patient contextual representation vectors, enabling dynamic perception and trend judgment capabilities in decision-making. A knowledge retrieval enhancement mechanism performs semantic matching and credibility screening of anxiety diagnosis and treatment knowledge, ensuring the generation process is evidence-based and timely. An instruction optimization strategy enables constrained generation, outputting structured decision results and improving clinical understandability. Furthermore, a dynamic closed-loop update process is constructed through consistency verification and local re-reasoning mechanisms, achieving real-time response to changes in patient status. Overall, this invention significantly improves the efficiency, accuracy, and interpretability of auxiliary diagnosis and treatment for complex anxiety cases.
[0017] The anxiety-based intelligent decision-making method based on knowledge retrieval enhancement proposed in this application, along with other advantages, objectives, and features of this application, will be partly apparent from the following description and partly understood by those skilled in the art through research and practice of this application. Attached Figure Description
[0018] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit this specification. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating an anxiety-based intelligent decision-making method based on knowledge retrieval enhancement, provided for an embodiment of this application; Figure 2 This is a flowchart illustrating a method for constructing a unified patient dataset, as provided in an embodiment of this application. Figure 3 This is a flowchart illustrating a method for obtaining entity fusion weights, as provided in an embodiment of this application. Figure 4 This is a flowchart illustrating a method for generating patient context representation vectors provided in an embodiment of this application. Figure 5 This is a flowchart illustrating a method for determining a dynamic adjustment factor, as provided in an embodiment of this application. Figure 6 This is a flowchart illustrating a method for obtaining filtered knowledge fragments, provided in an embodiment of this application. Figure 7 This is a flowchart illustrating a method for generating structured decision results, provided in an embodiment of this application. Figure 8 This application provides a flowchart illustrating a method for generating instruction templates by constructing contextual constraints through instruction tuning strategies. Figure 9 This application provides a flowchart illustrating a method for outputting real-time optimized intelligent decision-making results for anxiety, as provided in an embodiment of the present application. Figure 10 This is a structural diagram of an anxiety-enhancing intelligent decision-making system based on knowledge retrieval enhancement, provided as an embodiment of this application. Detailed Implementation
[0019] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus. The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.
[0020] Please see Figure 1 This is a flowchart illustrating an anxiety-based intelligent decision-making method based on knowledge retrieval enhancement, provided in an embodiment of this application. Specifically, it may include: S110. Obtain multi-source medical data of the target patient, and perform semantic parsing, information fusion and standardization processing on the multi-source medical data through natural language processing technology to construct a unified patient dataset. The multi-source medical data includes electronic medical record data, scale assessment data, patient complaint text data and follow-up feedback data. S120. Based on the context learning strategy, perform context modeling on the above unified patient dataset to generate patient context representation vectors, wherein the above context representation vectors include semantic relationships and timeliness data of anxiety symptom entities, triggering factor entities, medication entities and efficacy feedback entities. S130. Based on the above patient context representation vector, call the knowledge retrieval enhancement module to perform semantic similarity retrieval in the anxiety diagnosis and treatment knowledge base, obtain candidate knowledge fragments that match the above patient context representation vector, and perform credibility weighting and timeliness filtering on the above candidate knowledge fragments to obtain the filtered knowledge fragments. S140. The above-screened knowledge fragments and the above-mentioned patient context representation vectors are fused and reasoned. The treatment strategy is optimized in real time using the instruction tuning strategy to generate structured decision results. The above-mentioned structured decision results include treatment plan suggestions, risk level assessment and intervention priority ranking. S150. The structured decision results are checked for consistency with the real-time updated multi-source medical data. When the changes in key context features exceed the preset threshold, the knowledge retrieval enhancement module is called again and the treatment strategy is updated to output the real-time optimized anxiety intelligent decision results.
[0021] For example, this embodiment proposes an anxiety intelligent decision-making method based on knowledge retrieval enhancement, applicable to auxiliary diagnosis and treatment decision-making scenarios for complex anxiety cases. The method first acquires multi-source medical data of the target patient in step S110. This multi-source medical data includes electronic medical record data, scale assessment data, patient complaint text data, and follow-up feedback data. Natural language processing technology is used to perform named entity recognition, medical terminology standard mapping, semantic relation extraction, and temporal information alignment on the aforementioned multi-source medical data. This achieves semantic fusion and field unification between different data sources, thereby constructing a unified patient dataset with consistent structure, standardized semantics, and computability, providing a high-quality input foundation for subsequent modeling.
[0022] In step S120, context modeling is performed on the unified patient dataset based on a context learning strategy. Specifically, by constructing symptom change sequences, medication response sequences, and emotion fluctuation sequences, and combining time decay factors and risk weight coefficients, a patient context representation vector is generated that includes semantic relationships between anxiety symptom entities, triggering factor entities, medication entities, and efficacy feedback entities. This context representation vector not only reflects the patient's current state but also characterizes its state evolution trend, enabling the decision-making process to have dynamic perception capabilities.
[0023] In step S130, the knowledge retrieval enhancement module is invoked based on the aforementioned patient context representation vector to perform semantic similarity retrieval in the anxiety diagnosis and treatment knowledge base. First, candidate knowledge fragments are filtered through vectorized matching. Then, credibility-weighted and timeliness-based filtering is performed by combining the authority level of the knowledge source, the level of evidence-based medicine, and the publication time decay coefficient. This yields filtered knowledge fragments that highly match the patient context and possess clinical reliability, thereby preventing unfounded inferences from the generated model.
[0024] In step S140, the filtered knowledge fragments are fused and reasoned with the patient context representation vector, and the generation process is constrained and controlled using an instruction tuning strategy, so that the model generates treatment strategies within a limited knowledge scope. The final output is a structured decision result, which includes treatment plan recommendations, risk level assessments, and intervention priority rankings, making it easy for clinicians to understand and adopt.
[0025] In step S150, the structured decision results are compared with the real-time updated multi-source medical data for consistency verification. When a change in key contextual features exceeds a preset threshold, the system automatically calls the knowledge retrieval enhancement module again, updates the treatment strategy, and re-infers only the affected contextual dimensions, outputting the real-time optimized anxiety intelligent decision results, thereby forming a dynamic closed-loop optimization mechanism.
[0026] In summary, this embodiment addresses the issues of heterogeneous data formats, inconsistent terminology, and broken semantic connections between different systems by performing unified semantic parsing, information fusion, and standardization on electronic medical record data, scale assessment data, patient complaint text data, and follow-up feedback data. Compared to traditional methods relying on manual integration, this embodiment can automatically align and fuse multi-source medical data at the semantic level, significantly reducing the information processing burden on doctors and improving the efficiency of diagnosing and treating complex anxiety cases. This embodiment constructs patient context representation vectors through a contextual learning strategy, incorporating symptom evolution trends, changes in medication response, and emotional fluctuations into a unified modeling framework. This allows decisions to be based on dynamically evolving contextual states, rather than static snapshots. Compared to systems lacking dynamic modeling capabilities in the prior art, this embodiment can accurately capture trends in patient state changes, thereby improving the individualization and foresight of treatment recommendations. This embodiment introduces a knowledge retrieval enhancement mechanism. Before generating treatment strategies, it performs semantic similarity retrieval on the anxiety diagnosis and treatment knowledge base, and combines source authority level, evidence-based medicine evidence level, and publication time decay coefficient to screen for credibility and timeliness, thereby ensuring that the knowledge fragments entering the reasoning stage have reliable basis and clinical validity. Compared with the method of relying solely on large models for free generation, this embodiment can significantly reduce the risk of unfounded inference and improve the interpretability and safety of decision results. This embodiment uses an instruction tuning strategy to control the generation process with contextual constraints, so that the model only generates structured decision results within the coverage of the screened knowledge fragments, thereby achieving evidence-constrained generation. The structured decision results are output in the form of treatment plan suggestions, risk level assessments, and intervention priority ranking fields, which are easy for doctors to understand, compare, and adopt, improving the efficiency of clinical implementation. This embodiment constructs a dynamic closed-loop optimization process through consistency verification and local re-reasoning mechanisms. When the key contextual features of the patient change, knowledge re-retrieval and strategy updates are triggered only for the affected dimensions, which not only ensures the real-time nature of decision-making, but also avoids computational redundancy and strategy fluctuations caused by global recalculation. Compared to systems in the prior art that cannot dynamically adjust recommendations based on real-time data, this embodiment can continuously output intelligent anxiety decision-making results that match the patient's latest state, achieving efficient, stable, and traceable auxiliary diagnostic and treatment support. In summary, this embodiment can significantly improve the efficiency, accuracy, and interpretability of diagnostic and treatment decisions for complex anxiety cases, and has good clinical application value and prospects for widespread application.
[0027] In one feasible implementation, such as Figure 2 As shown, step S110 above acquires multi-source medical data of the target patient, and uses natural language processing technology to perform semantic parsing, information fusion, and standardization processing on the multi-source medical data to construct a unified patient dataset, including: S1101. Named entity recognition, medical terminology standard mapping and relation extraction are performed on the above-mentioned electronic medical record data, the above-mentioned scale assessment data, the above-mentioned patient chief complaint text data and the above-mentioned follow-up feedback data respectively to generate a multi-source medical entity set with semantic labels. S1102. Construct a cross-modal semantic alignment model to perform time axis alignment and semantic association matching on the above multi-source medical entity set to form a unified semantic index graph, wherein the above unified semantic index graph records the causal relationship strength and source confidence between entities; S1103. Establish a conflict resolution function based on time decay factor and source authority level, recalculate the confidence of conflicting entities in the above unified semantic index graph, and obtain entity fusion weight. S1104. Based on the above entity fusion weights, perform weighted fusion and field standardization mapping on the above multi-source medical entity set to generate a unified patient dataset with uniform field structure, consistent semantics, and confidence weight labels.
[0028] In one feasible implementation, such as Figure 3 As shown, step S1103 above establishes a conflict resolution function based on the time decay factor and source authority level, recalculates the confidence of conflicting entities in the unified semantic index graph, and obtains entity fusion weights, including: S11031. Identify conflicting entity pairs in the unified semantic index graph above that have the same semantic labels but inconsistent attribute values, and construct a set of conflicting entities. S11032. Assign a source authority coefficient and a time decay coefficient to each conflicting entity in the above set of conflicting entities, wherein the source authority coefficient is determined based on the data source level and the time decay coefficient is calculated based on the data generation time. S11033. Construct a conflict resolution scoring function, and perform weighted fusion calculation of the above source authority coefficient, the above time decay coefficient and entity semantic matching degree to obtain the confidence score of each conflicting entity. S11034. Normalize the conflicting entities based on the confidence scores and output the entity fusion weights for data fusion.
[0029] For example, step S110 constructs a unified patient dataset based on multi-source medical data of the target patient. Its core lies in first extracting, then aligning, then dissolving, and then fusing, thereby transforming heterogeneous information from electronic medical records, scale assessments, patient complaints, and follow-up feedback into a unified semantic representation that is calculable, traceable, and has confidence level identifiers.
[0030] Specifically, in step S1101, named entity recognition, medical terminology standard mapping, and relation extraction are performed on the above-mentioned electronic medical record data, the above-mentioned scale assessment data, the above-mentioned patient complaint text data, and the above-mentioned follow-up feedback data, respectively, to obtain a multi-source medical entity set with semantic labels, so that key entities such as anxiety symptoms, inducing factors, medication regimens, and efficacy feedback and their relationships can be represented in a structured way.
[0031] In step S1102, a cross-modal semantic alignment model is constructed, which aligns the above-mentioned multi-source medical entity set on the time axis and performs semantic association matching to form a unified semantic index graph. This index graph not only records the co-occurrence and association paths of entities, but also further records the causal relationship strength and source confidence between entities, providing a quantifiable basis for subsequent conflict resolution.
[0032] In step S1103, for conflicting entities in the unified semantic index graph that have the same semantic labels but inconsistent attribute values, a conflict resolution function based on the time decay factor and the source authority level is established to recalculate the confidence of the conflicting entities and obtain the entity fusion weight.
[0033] Finally, in step S1104, weighted fusion and field standardization mapping are performed on the multi-source medical entity set according to the above entity fusion weights to generate a unified patient dataset with uniform field structure, consistent semantics and confidence weight labels, so that subsequent contextual learning and knowledge retrieval enhancement can run stably in the same semantic space.
[0034] Furthermore, in one feasible implementation, in step S11031, conflicting entity pairs are identified and a conflicting entity set is constructed. Let the conflicting entity set be... Each conflict group Corresponding to the same semantic tag The following is a set of values for several candidate entities from different sources. In step S11032, for each candidate value... Assign a source authority coefficient and a time decay coefficient, where the source authority coefficient can be provided by a hierarchy table or configuration library, denoted as... The time decay coefficient is determined by the time difference between the generation time of this value and the current time, denoted as . Building upon this, this embodiment presents a creative conflict resolution scoring function, which transforms conflict resolution from a linear weighted approach into a joint form incorporating credibility gating, semantic consistency correction, and graph causal support. (1) in, Indicates the candidate value Confidence score; The Sigmoid function is used to map synthesized evidence to a confidence level with probabilistic significance. For bias terms, These are learnable or configurable weight coefficients; The logarithm of the aforementioned source authority coefficients is used to suppress the "single-point dominance" of extreme authority values on the ratings. The above time decay coefficient is used to take the logarithm so that time freshness participates in the form of diminishing returns; The entity semantic matching score is used to measure the semantic matching degree between the candidate value and the semantic label of the conflict group. And the consistency of contextual evidence; The strength of causal support is used to measure the degree of causal support for a candidate value in the unified semantic index graph.
[0035] Among them, semantic matching degree A two-way coupling approach, combining label consistency and context consistency, can be used to avoid semantic drift caused by relying solely on vector similarity. For example: (2) in, For candidate values The semantic vector representation; semantic tags for conflict groups The label vector representation; The contextual evidence vector for the conflict group can be obtained by aggregating the symptom entities, medication entities, and efficacy feedback entities adjacent to the conflict group in the neighborhood of the unified semantic index graph. Cosine similarity; This is the coupling coefficient, used to balance label consistency with context consistency.
[0036] Graph of causal support strength This is used to demonstrate whether the value is supported by more causal edges and high-confidence sources, thereby introducing structural evidence. The unified semantic index graph can be represented as follows: Each edge Having causal strength confidence level of the source Then the candidate values The graph support strength can be defined as the combined strength of its incoming and outgoing edges: (3) in, Represents nodes The set of connected adjacent edges; The strength of the causal relationship; The source confidence level; The time span of the evidence corresponding to this edge; This is a time penalty coefficient used to automatically decay outdated causal support.
[0037] In step S11033, each conflict group can be processed using equations (1) to (3). Confidence scores are calculated for the candidate values within the range to obtain... Subsequently, in step S11034, to satisfy the computability and interpretability of the fusion, the confidence score is normalized into entity fusion weights. This is achieved through a temperature-controlled soft normalization method to avoid excessively sharp weights that could lead to information loss. (4) in, The entity fusion weights are the output. For temperature coefficient, when Larger weights result in smoother textures and better preservation of multi-source information. When the weight is smaller, the weight is sharper and it is easier to select the best option quickly.
[0038] Step S11034 can output the entity fusion weights for data fusion, which serve as direct inputs for weighted fusion and field standardization mapping. This allows the fused values and fusion confidence weights to be retained simultaneously in the unified patient dataset, thus realizing a traceable data foundation for clinical decision-making.
[0039] Through the above mechanism, this embodiment introduces interpretable multi-evidence joint scoring and temperature-controlled fusion in the conflict resolution stage, making the unified patient dataset more stable, traceable and clinically reliable, thus providing a solid data foundation for subsequent contextual learning and knowledge retrieval enhancement.
[0040] In one feasible implementation, such as Figure 4 As shown, step S120 above performs context modeling on the unified patient dataset based on a context learning strategy, generating patient context representation vectors, including: S1201. Perform time-series segmentation on the above unified patient dataset, extract symptom intensity change sequence, medication response change sequence and emotion fluctuation change sequence, and construct a multi-dimensional contextual basic feature matrix. S1202. Based on the historical anxiety case sample database, train the situation evolution prediction model, perform trend prediction on the above multi-dimensional situation basic feature matrix, calculate the situation deviation between the current situation state and the predicted situation state, and use the above situation deviation as a dynamic adjustment factor. S1203. Construct a context fusion function that includes symptom dimension weights, triggering factor dimension weights, and time decay coefficients. Encode the above multidimensional context basic feature matrix and the above dynamic adjustment factors with weights to generate a context embedding vector. S1204. Normalize and map the above context embedding vectors and project them into the semantic space to output a patient context representation vector that includes semantic relationship strength and time-sensitive identifiers.
[0041] In one feasible implementation, such as Figure 5 As shown, step S1202 above trains a situation evolution prediction model based on a historical anxiety case sample database, performs trend prediction on the multi-dimensional situation basic feature matrix, calculates the situation deviation between the current situation state and the predicted situation state, and uses the situation deviation as a dynamic adjustment factor, including: S12021. Label and classify the situational feature sequences in the above-mentioned historical anxiety case sample database, and establish a training sample set containing symptom evolution paths and treatment response paths; S12022. Train the scenario evolution prediction model based on the above training sample set, and input the above multi-dimensional scenario basic feature matrix into the scenario evolution prediction model to obtain the predicted scenario state vector. S12023. Calculate the difference between the predicted scenario state vector and the current scenario state vector. The difference is the scenario deviation. S12024. Normalize the above-mentioned situational deviation and embed the normalized situational deviation into the situational weight adjustment function to form a dynamic adjustment factor for subsequent situational fusion coding.
[0042] For example, step S120 constructs a patient context representation vector that can evolve over time and be understood by the knowledge retrieval enhancement module for a unified patient dataset. The key is to organize symptoms, triggering factors, medication response and efficacy feedback on the time axis, and to explicitly quantify whether the current situation is abnormal and how abnormal it is through a prediction deviation mechanism as a dynamic adjustment factor, so that the subsequent fusion reasoning stage has stronger individualization and stability.
[0043] Specifically, in step S1201, the unified patient dataset is first processed by time-series segmentation. The text, scales, and medication records of patients during continuous follow-up or hospitalization are divided into multiple time slices according to fixed windows or event-triggered windows. Within each time slice, symptom intensity change sequences, medication response change sequences, and mood fluctuation change sequences are extracted and aligned to construct a multi-dimensional contextual feature matrix. This allows different modal features within the same time slice to be jointly modeled at the same index position. Let the number of time slices be... The feature dimension is Then the multidimensional contextual basic feature matrix can be denoted as: (5) in, Indicates the first Context feature vectors for each time slice, It can be composed of sub-characteristics such as symptom intensity, intensity of triggering factors, changes in medication dosage, compliance, sleep quality, and emotional polarity of the complainant.
[0044] In step S1202, a situation evolution prediction model is trained based on a historical anxiety case sample database. Trend prediction is performed on the aforementioned multidimensional situational feature matrix, and the situational deviation between the current situational state and the predicted situational state is calculated. This deviation is then used as a dynamic adjustment factor for subsequent situational fusion encoding. To ensure that the deviation reflects not only numerical differences but also differences in clinical importance, this embodiment proposes a creative definition of situational deviation that incorporates risk sensitivity, temporal consistency, and uncertainty correction.
[0045] First, in step S12021, the situational feature sequences in the historical anxiety case sample database are labeled and classified to form a training sample set. ,in This can represent a combination of symptom evolution path labels and treatment response path labels; in step S12022, the context evolution prediction model is trained. and based on the current patients The input is used to obtain the predicted situational state vector. or its multi-step prediction In one implementation, the model output can simultaneously include the predicted mean and the predicted uncertainty, i.e.: (6) in, To check the window length, For the first The predicted context state vector for each time slice, This is a prediction uncertainty vector used to characterize the reliability of predictions across various dimensions.
[0046] In step S12023, the difference between the predicted situational state vector and the current situational state vector is calculated to obtain the situational deviation. To enhance creativity and clinical suitability, this embodiment defines the deviation as "risk-sensitive Mahalanobis normalized difference" and introduces an interaction term between the precipitating factor and the medication response, such that the deviation is amplified when "the precipitating factor increases but the medication response worsens," as follows: (7) in, For the first Contextual deviation of each time slice; This is a risk-sensitive weighting matrix used to assign higher weights to clinically critical dimensions. This indicates element-wise division. It is a numerically stable term; It is a 2-norm; This is the interactive amplification factor; Represents the sub-vectors related to inducing factors. This represents a subvector related to the medication response. The inner product is used to characterize the coupling effect of changes in the same or conflicting directions of the two variables. This is achieved through an uncertainty normalization term. This can prevent the model from being overly sensitive to differences when its prediction uncertainty is high, thereby improving the robustness and interpretability of the deviation.
[0047] In step S12024, the aforementioned situational deviation is normalized, and the normalized situational deviation is embedded into the situational weight adjustment function to form a dynamic adjustment factor for subsequent situational fusion encoding. To simultaneously reflect that recent events are more important and that greater deviations should be given more attention, this embodiment provides a method for constructing the dynamic adjustment factor, which combines deviation with time decay gating: (8) in, For the first Dynamic adjustment factor for each time slice; To The value after Min-Max or Z-Score normalization; This is the adjustment coefficient; The decay rate over time; Used to apply higher gating strength to time slices that are closer to the present; The Sigmoid function is used to restrict the gate value to between 0 and 1, making it easier to use as weights for subsequent fusion.
[0048] Subsequently, in step S1203, a context fusion function is constructed, including symptom dimension weights, triggering factor dimension weights, and time decay coefficients. This function weights and encodes the multidimensional contextual feature matrix and dynamic adjustment factors to generate a context embedding vector. To enhance attentional focus on deviation-driven factors, this embodiment proposes a deviation-gated weighted fusion encoding method: (9) in, Embed the vector for context; The linear projection matrix projects the original features onto the context embedding space dimension. Content-based temporal attention weights are used to reflect the differences in the contribution of different time slices to the context; This is the attention parameter vector; The dynamic adjustment factor obtained from equation (8) is, and it is related to... Multiplication emphasizes time slices that are both important and off-target, thereby increasing sensitivity to sudden exacerbations or treatment failures.
[0049] Finally, in step S1204, the context embedding vector is normalized and projected into the semantic space, outputting a patient context representation vector containing semantic relation strength and time-sensitive identifiers. The final vector can be represented as... (10) in, The output is a patient context representation vector; This is the semantic space projection matrix, used to map the embedding vectors to a semantic space dimension isomorphic to the knowledge base vectors. ts is the normalization operator; ts is the time-sensitive identifier, which can be used to characterize the effective time center of contextual interest, so that subsequent retrieval and reasoning stages can explicitly perceive recent changes or long-term trends.
[0050] Through the modeling chain of prediction deviation, gating adjustment, attention fusion, and spatial projection described above, this embodiment not only achieves interpretable vectorized representation of anxiety situations, but also makes the situation representation more sensitive and stable to sudden changes in the condition and abnormal treatment response, laying a solid foundation for subsequent knowledge retrieval enhancement and instruction optimization reasoning.
[0051] In one feasible implementation, such as Figure 6 As shown, step S130 above calls the knowledge retrieval enhancement module based on the aforementioned patient context representation vector to perform semantic similarity retrieval in the anxiety diagnosis and treatment knowledge base, obtains candidate knowledge fragments that match the aforementioned patient context representation vector, and performs credibility weighting and timeliness filtering on the aforementioned candidate knowledge fragments to obtain the filtered knowledge fragments, including: S1301. Analyze the core symptom dimension weights and risk level weights in the above patient context representation vector. Based on the above core symptom dimension weights, perform knowledge subspace pruning on the above anxiety diagnosis and treatment knowledge base and construct a context-related knowledge subgraph. S1302. Perform vectorized semantic similarity calculation within the above context-related knowledge subgraph to obtain an initial candidate knowledge fragment set, and generate a semantic matching score for each knowledge fragment in the above initial candidate knowledge fragment set. S1303. Construct a joint credibility assessment model, and integrate the above semantic matching score with the authority level of the knowledge source, the level of evidence-based medicine, and the decay coefficient of publication time to obtain a comprehensive score. S1304. Based on the above comprehensive score, sort and threshold-filter the above initial candidate knowledge fragment set, and output the filtered knowledge fragment that has the highest matching degree with the above patient context representation vector and meets the requirements of credibility and timeliness.
[0052] For example, step S130 constructs a knowledge retrieval enhancement process based on reliable knowledge acquisition for the current patient context. Its core idea is not to perform a generalized retrieval of the entire anxiety diagnosis and treatment knowledge base, but to first use the core symptom dimension weights and risk level weights carried in the patient context representation vector to prune the knowledge space, thereby converging the retrieval scope to a knowledge subspace that is strongly related to the current context. Then, vectorized semantic similarity retrieval is performed in this subspace to obtain candidate knowledge fragments. Subsequently, a joint credibility assessment model is used to couple and fuse semantic matching evidence with source authority, evidence-based evidence level, and time freshness, and finally outputs a filtered knowledge fragment that is relevant, credible, and not outdated, providing a traceable evidence basis for subsequent fusion reasoning and instruction optimization generation.
[0053] Specifically, in step S1301, the core symptom dimension weights and risk level weights in the patient context representation vector are first analyzed, and based on this, the knowledge subspace of the anxiety diagnosis and treatment knowledge base is pruned to construct a context-related knowledge subgraph. Let the patient context representation vector be... The core symptom weight vector can be obtained by decoupling. and risk level weights Anxiety diagnosis and treatment knowledge base can be represented as a graph consisting of knowledge fragment nodes and relation edges. Each knowledge fragment node With symptom label set with vector representation To achieve controllability with higher risk and more focused pruning, this embodiment provides a pruning gating function to calculate the retention probability of knowledge fragment nodes: (11) in, For knowledge fragment nodes The probability of retention; For the Sigmoid function; Indicates symptoms Corresponding core symptom dimension weights; Used to characterize the matching strength between knowledge fragments and the highest-weighted symptom labels; Risk level weighting; This is the adjustment coefficient; This is the pruning bias threshold. Based on this retention probability, a context-relevant knowledge subgraph can be further generated. ,in The threshold is used to achieve dynamic convergence of the knowledge space.
[0054] In step S1302, vectorized semantic similarity calculation is performed within the context-related knowledge subgraph to obtain an initial set of candidate knowledge fragments, and a semantic matching score is generated for each knowledge fragment. To avoid the problem that simple cosine similarity may result in semantic similarity but clinical mismatch in a medical context, this embodiment introduces symptom-weighted alignment similarity, explicitly modulating the matching process between context vectors and knowledge vectors by the core symptom weights: (12) in, For knowledge fragments semantic matching score; Cosine similarity; This is a weighting amplification factor used to strengthen the ranking of knowledge fragments that match high-weight symptom labels within the candidate set. Therefore, Top-... initial candidate knowledge fragment set .
[0055] In step S1303, a joint credibility assessment model is constructed, which integrates the semantic matching score with the authority level of the knowledge source, the level of evidence-based medicine, and the publication time decay coefficient to obtain a comprehensive score. To enhance creativity and interpretability, this embodiment models credibility as a multiplicative structure of evidence strength gating, source authority correction, and time decay penalty, so that a weaker dimension can significantly reduce the comprehensive score, thereby avoiding the misselection of knowledge fragments with high similarity but low evidence. The comprehensive score can be defined as: (13) in, For knowledge fragments Overall score; The semantic matching score obtained from equation (12); A numerical result representing the authority level of the knowledge source; This represents the numerical result of the evidence level in evidence-based medicine. For credibility gating parameters; The time span between the publication time of the knowledge fragment and the current time; This is the time decay coefficient. This form causes the gating item to tend to have a smaller value when the source authority or the level of evidence is low, thus lowering the overall score, even if... Higher scores are less likely to be included in the final screening results, thus hindering clinical usability and safety.
[0056] In step S1304, the initial set of candidate knowledge fragments is sorted and threshold-filtered based on the comprehensive score, and the filtered knowledge fragments with the highest matching degree with the patient context representation vector and meeting the requirements of credibility and timeliness are output. To simultaneously satisfy the constraints of at least covering the core symptom dimension and having a sufficiently high comprehensive score, this embodiment proposes a creative dual-threshold filtering mechanism: on the one hand, a global threshold is set for the comprehensive score. On the other hand, a coverage threshold is set for the coverage of core symptoms. The coverage of core symptoms can be defined as follows: (14) in, To filter the result set; A collection of core symptoms; This is an indicator function. The final output can be obtained as follows: first press... Sort in descending order, then add candidate fragments from top to bottom to form... until both conditions are met simultaneously. and This results in a set of filtered knowledge fragments, thus taking into account relevance, credibility, timeliness, and completeness of symptom coverage.
[0057] This embodiment can significantly improve the clinical reliability and timeliness of search results while ensuring the relevance of the search, and provide a stable and traceable evidence-based basis for subsequent instruction optimization and generation.
[0058] In one feasible implementation, such as Figure 7 As shown, step S140 above fuses and infers the filtered knowledge fragments and the patient context representation vector, optimizes the treatment strategy in real time using an instruction tuning strategy, and generates structured decision results, including: S1401. Reconstruct the evidence chain of the above-screened knowledge fragments to form a knowledge reasoning subgraph including intervention measure nodes, applicable condition nodes, and efficacy expectation nodes, and encode the above knowledge reasoning subgraph structurally. S1402. Map the above patient situation representation vector to a situation control vector, input the above situation control vector and the above structure-encoded knowledge reasoning subgraph together, and construct a situation constraint generation instruction template through an instruction tuning strategy to restrict the generation process to only be carried out within the coverage of the above knowledge reasoning subgraph. S1403. Execute fusion reasoning under the control of the above-mentioned situation constraint generation instruction template, and output an intermediate decision representation including treatment plan field, risk level field and intervention priority field; S1404. Perform field normalization mapping and consistency verification on the above intermediate decision representation to generate a structured decision result that meets the structure definition specification.
[0059] In one feasible implementation, such as Figure 8 As shown, step S1402 maps the patient context representation vector to a context control vector, inputs the context control vector and the structured knowledge reasoning subgraph together, and constructs a context constraint generation instruction template through an instruction tuning strategy to restrict the generation process to only unfold within the coverage of the knowledge reasoning subgraph, including: S14021. Perform dimensional decomposition on the above patient context representation vector, extract the weights of high-risk symptom dimensions and treatment sensitivity weights, and generate a set of context control parameters. S14022. Embed the above-mentioned set of situation control parameters into a preset instruction framework to form a draft instruction structure that includes treatment scope constraints and evidence citation constraints. S14023. Perform semantic consistency verification and field boundary restriction processing on the above-mentioned instruction structure draft to ensure that the generated content can only call the intervention measure node and applicable condition node in the above-mentioned knowledge reasoning subgraph. S14024. Output the context constraint generation instruction template for use in the fusion reasoning stage.
[0060] For example, step S140 fuses the selected knowledge fragments with the patient context representation vector for reasoning, and introduces strong constraints during the generation process using an instruction tuning strategy, so that the output results are both evidence-based and can directly serve the clinical workflow in the form of structured fields. The key innovation of this embodiment is that it reconstructs the scattered knowledge fragments into a reasonable knowledge reasoning subgraph, transforms the patient context vector into a controllable context control signal, and locks the generation boundary within the evidence-based range of the knowledge reasoning subgraph through a "context constraint generation instruction template," thereby significantly reducing the risk of hallucination and improving decision consistency.
[0061] Specifically, in step S1401, the evidence chain of the selected knowledge fragments is reconstructed to form a knowledge reasoning subgraph containing intervention measure nodes, applicable condition nodes, and efficacy expectation nodes, and the knowledge reasoning subgraph is structurally encoded. Let the set of selected knowledge fragments be... Knowledge reasoning subgraphs are obtained through entity standardization and relation merging. , where the set of nodes Including the set of intervention measures nodes Applicable condition node set With expected therapeutic effect node set edge set This is used to represent relationships such as condition fulfillment-intervention adoption, intervention-expected efficacy, and intervention-risk / contraindications. To facilitate model generation and consumption, this subgraph can be encoded as a graph structure vector representation. Graph encoding can be based on the following formula: (15) in, The structure encoding vector for the knowledge reasoning subgraph; For nodes The semantic representation (which can be obtained from fragment vectors or node text encoding); Embedded by node type to distinguish between three types of nodes: intervention measures, applicable conditions, and expected efficacy; This indicates vector concatenation; For attention parameters; Type-aware attention weights; This is a non-linear mapping function. Through this encoding, the system can automatically highlight the node types and content that are more critical to the current decision, making subsequent reasoning more "structure-oriented" interpretable.
[0062] In step S1402, the patient context representation vector is mapped to a context control vector, and the context control vector is jointly input with the structured knowledge reasoning subgraph. Simultaneously, a context constraint generation instruction template is constructed using an instruction tuning strategy to restrict the generation process to only within the coverage area of the knowledge reasoning subgraph. Let the patient context representation vector be... Then it can be mapped to a situation control vector. This not only retains the weights of high-risk symptom dimensions but also characterizes treatment sensitivity. It can be achieved through a risk-sensitivity dual-channel gating mapping: (16) in, This is the context control vector; For risk channel projection matrix; The sensitivity channel projection matrix; This indicates element-wise multiplication; Sigmoid gate; This is a normalization operator. This form amplifies the control dimension when certain symptoms are high-risk and sensitive to treatment, thus prioritizing the driving of strategies that should be addressed more urgently during the generation phase.
[0063] Furthermore, to ensure that the knowledge reasoning subgraph is generated only within its coverage area, this embodiment transforms the knowledge reasoning subgraph into a verifiable set of constraints. The constraint strength is adaptively adjusted by the situation control vector. Let... , representing the set of interventions that are allowed to be referenced, respectively. The set of applicable conditions and the set of expected efficacy can then be used to define a constraint strength coefficient for situational modulation: (17) in, This is the constraint strength coefficient; The norm of the control vector is used to characterize the overall risk / sensitivity. and To adjust parameters. The higher the risk, The larger the value, the tighter the generation boundary, thus reducing the space for free generation of evidence that deviates from the objective.
[0064] In step S1403, fusion reasoning is performed under the control of the context constraint generation instruction template, outputting an intermediate decision representation containing treatment plan fields, risk level fields, and intervention priority fields. This embodiment provides a controlled reasoning objective of evidence consistency penalty, enabling the generative model to simultaneously optimize context matching and evidence consistency when generating candidate decisions. Let the generated intermediate decision representation be... It contains a set of fields. Then, a controlled generation target can be defined: (18) in, To generate the conditional probability of the model under the instruction template constraints; Generate instruction templates for context constraints; This is an out-of-bounds penalty term used to penalize intermediate decision representations that reference elements not belonging to the constraint set. Intervention measures, applicable conditions, or expected efficacy; The constraint strength coefficient is given by equation (17). Through this objective function, the system can generate more controllable and evidence-based intermediate decision representations under the mechanism of stronger constraints for higher risks.
[0065] In step S1404, the intermediate decision representation undergoes field normalization mapping and consistency verification to generate a structured decision result that meets the structure definition specifications. Field normalization can be understood as mapping natural language or semi-structured output to a fixed set of fields and an enumerable value range. For example, the risk level field is mapped to {low, medium, high}, the intervention priority is mapped to a sorted list, and an evidence index is attached to each field. The following innovative field consistency verification function is used to ensure logical consistency between different fields. For example, high-risk should correspond to higher priority, and the corresponding intervention should not be recommended when contraindications exist. (19) in, For consistent default degree; For a set of field rules; For the first The penalty for breach of this rule is greater for larger breaches. Only when... The final structured decision result is only output when the value is below a preset threshold, thereby improving the stability and feasibility of the structured result.
[0066] Furthermore, in a feasible implementation, the process of constructing the context constraint generation instruction template in step S1402 can be refined into S14021 to S14024. Specifically, in step S14021, the patient context representation vector is dimensionally decomposed, and the weights of high-risk symptom dimensions and treatment sensitivity weights are extracted to generate a set of context control parameters. Let the set of high-risk symptom dimensions be... Then, we can define the high-risk weighted aggregation and the sensitivity aggregation: (20) in, As the weight of the symptom dimension, For the context control vector dimension value, To control the vector dimension. Together with the core symptom label set and the contraindication condition label set, it forms a set of situational control parameters.
[0067] In step S14022, the set of situation control parameters is embedded into a preset instruction framework to form a draft instruction structure containing treatment scope constraints and evidence citation constraints. The instruction framework can consist of three segments: a task segment, an evidence segment, and an output segment, with the allowed citations explicitly written in the evidence segment. And requirements for the format of evidence citation.
[0068] In step S14023, the draft instruction structure undergoes semantic consistency verification and field boundary restriction processing to ensure that the generated content can only call intervention measure nodes and applicable condition nodes in the knowledge reasoning subgraph. To this end, this embodiment can construct a node whitelist validator, whose core constraints can be formalized as follows: (twenty one) in, The set of entities extracted from the generated results; For indicator functions. When When this happens, a template tightening strategy is triggered, such as reducing the allowed set or increasing the threshold. Or request additional evidence to be cited.
[0069] In step S14024, a context constraint generation instruction template for use in the fusion reasoning stage is output, thereby enabling the fusion reasoning process to have an executable and verifiable strong constraint entry point.
[0070] This embodiment can generate more reliable, interpretable, and directly applicable structured decision-making results in complex anxiety case scenarios.
[0071] In one feasible implementation, such as Figure 9As shown, step S150 verifies the consistency between the structured decision-making results and the real-time updated multi-source medical data. When a change in key contextual features exceeds a preset threshold, the knowledge retrieval enhancement module is invoked again, and the treatment strategy is updated to output a real-time optimized anxiety intelligent decision-making result, including: S1501. Incremental semantic encoding is performed on the above-mentioned real-time updated multi-source medical data to generate a gradient of change with the previous round of the patient context representation vector, wherein the gradient of change represents the degree of dynamic change in the patient's state. S1502. Based on the above change gradient, identify the affected context feature dimensions, and perform local re-inference on the knowledge subspace corresponding to the dimension to obtain the local re-inference result. S1503. Based on the above local re-reasoning results, re-evaluate and update the above structured decision results; S1504. The updated structured decision results are verified in multiple dimensions through the consistency verification module to ensure that the real-time optimized decision results meet the individualized needs of patients and the latest clinical guidelines, and the final real-time optimized anxiety intelligent decision results are output.
[0072] For example, step S150 constructs a policy update mechanism for achieving rapid, local, and interpretable updates when the patient's state changes. Unlike the traditional approach of re-running the model from scratch, this embodiment uses the change gradient obtained from incremental semantic encoding as the driving signal, triggering local knowledge subspace re-retrieval and local fusion inference only for the affected contextual feature dimensions. This reduces computational overhead and policy jitter while ensuring evidence consistency, and makes the update basis traceable to specific change features and evidence fragments.
[0073] Specifically, in step S1501, incremental semantic encoding is performed on the real-time updated multi-source medical data to generate a gradient of change compared to the patient context representation vector from the previous round. Let the patient context representation vector from the previous round be... After real-time updates and re-encoding, the current context representation vector is obtained as follows: Then the gradient of change can be defined as: (twenty two) in, The gradient vector represents the direction and magnitude of changes in patient state within the semantic space. To enhance sensitivity to key clinical changes, this embodiment further introduces a risk-weighted intensity of change index, amplifying changes in dimensions associated with high-risk symptoms. (twenty three) in, Indicator of intensity of change; This is a risk weight diagonal matrix. It can be obtained by mapping the weights of the core symptom dimensions to the weights of the risk level; The first norm is used to aggregate the intensity of changes. Equation (23) can be used to distinguish between large but non-critical perturbations and small but clinically significant changes in key dimensions.
[0074] In step S1502, the affected contextual feature dimensions are identified based on the change gradient, and local re-inference is performed on the knowledge subspace corresponding to that dimension to obtain the local re-inference result. To achieve modification only of the necessary parts, this embodiment proposes a threshold-sparse gating dimension selection mechanism: first, the normalized change contribution of each dimension is calculated: (twenty four) in, For the first The contribution of changes in each context dimension For the changing gradient vector One portion, For stable terms. Then construct the gated set. (25) in, For the set of affected context dimensions, The contribution threshold is used. Based on the set of affected dimensions, the knowledge base is cropped from the entire knowledge space to a local knowledge subspace. And only within this subspace, re-retrieval and re-inference are performed. To reflect that the more concentrated the dimensions of change, the more focused the retrieval, this embodiment defines an adaptive Top-K strategy for local retrieval: (26) in, This represents the number of candidates in this round of local retrieval; These are the upper and lower bounds; when fewer dimensions are affected, Closer To enhance recall and avoid missed detections; when many dimensions are affected, Closer To prevent information overload and maintain real-time performance, the following results are obtained from local re-inference. It can contain updated candidate evidence fragments, policy candidate sets, and key rule triggers.
[0075] In step S1503, the structured decision result is re-evaluated and updated based on the local re-inference result. To avoid policy twitching caused by frequent updates, this embodiment introduces a "stability-constrained incremental update" mechanism, accepting updates only when the new benefit is sufficiently large. Let the previous round's structured decision result be... The candidate updates obtained based on local re-inference are Then the update criterion can be defined as: (27) in, For the updated structured decision results, To assign a value to the revenue, this embodiment presents a creative revenue function that couples three components: context matching improvement, evidence-based credibility improvement, and policy change penalty. (28) in, This represents the incremental match between the updated policy and the current context, and can be represented by the policy field and the set of affected dimensions. Consistency score calculation; Cred represents the increase in the credibility of evidence, which can be calculated by the increase in the average score of the updated evidence fragments; Shift represents the magnitude of strategy changes, such as the number of changes in treatment plan fields, the number of priority order swaps, etc. Let be the jitter penalty coefficient. Through equations (27) and (28), the system can maintain policy stability while ensuring response changes.
[0076] In step S1504, the updated structured decision-making results are validated from multiple dimensions by a consistency verification module to ensure that the real-time optimized decision-making results meet the individualized needs of patients and the latest clinical guidelines, ultimately outputting the real-time optimized anxiety intelligent decision-making results. To make the validation quantifiable, this embodiment defines multi-dimensional validation as a joint constraint of rule consistency, guideline consistency, and evidence coverage consistency, and provides a creative total default function: (29) in, Total default rate; It indicates the degree of compliance with field rules, and is used to constrain high-risk rules to correspond to high priority and prohibit the recommendation of corresponding interventions if there are taboo conditions; This indicates the degree of breach of guideline consistency, used to constrain whether recommended interventions comply with the latest guideline provisions and evidence level thresholds; This indicates the degree of consistency in evidence coverage, used to constrain whether the decision-making outcome covers the evidence corresponding to the core symptoms and key triggering factors. These are the weighting coefficients. When The system outputs the final, real-time optimized intelligent decision-making result for anxiety; otherwise, it triggers a re-retrieval or template tightening strategy to correct the result, ensuring that the output is usable, reliable, and auditable.
[0077] This embodiment can continuously output real-time optimized intelligent anxiety decision-making results during the dynamic evolution of complex anxiety cases, and achieve a balance between efficiency, stability and evidence-based reliability.
[0078] The second aspect, such as Figure 10 As shown, this application proposes an anxiety-enhancing intelligent decision-making system 10 based on knowledge retrieval enhancement, used to execute the anxiety-enhancing intelligent decision-making method based on knowledge retrieval enhancement described in the first aspect, comprising: The acquisition unit 101 is used to acquire multi-source medical data of the target patient and perform semantic parsing, information fusion and standardization processing on the multi-source medical data through natural language processing technology to construct a unified patient dataset. The multi-source medical data includes electronic medical record data, scale assessment data, patient complaint text data and follow-up feedback data. The generation unit 102 is used to perform context modeling on the above unified patient dataset based on the context learning strategy and generate patient context representation vectors, wherein the above context representation vectors include semantic relationships and timeliness data of anxiety symptom entities, triggering factor entities, medication entities and efficacy feedback entities; The filtering unit 103 is used to call the knowledge retrieval enhancement module based on the above patient context representation vector, perform semantic similarity retrieval in the anxiety diagnosis and treatment knowledge base, obtain candidate knowledge fragments that match the above patient context representation vector, and perform credibility weighting and timeliness filtering on the above candidate knowledge fragments to obtain the filtered knowledge fragments. The reasoning unit 104 is used to fuse and reason with the above-screened knowledge fragments and the above-mentioned patient context representation vector, optimize the treatment strategy in real time using the instruction tuning strategy, and generate structured decision results, wherein the above-mentioned structured decision results include treatment plan suggestions, risk level assessment and intervention priority ranking. The output unit 105 is used to perform consistency verification between the above structured decision results and the above multi-source medical data updated in real time. When the key situation feature changes are detected to exceed the preset threshold, the above knowledge retrieval enhancement module is called again and the treatment strategy is updated to output the real-time optimized anxiety intelligent decision results.
[0079] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. An anxiety-based intelligent decision-making method based on knowledge retrieval enhancement, characterized in that, include: Acquire multi-source medical data of the target patient, and use natural language processing technology to perform semantic parsing, information fusion and standardization processing on the multi-source medical data to construct a unified patient dataset. The multi-source medical data includes electronic medical record data, scale assessment data, patient complaint text data and follow-up feedback data. The unified patient dataset is modeled based on a context learning strategy to generate patient context representation vectors, wherein the context representation vectors include semantic relationships and timeliness data of anxiety symptom entities, triggering factor entities, medication entities, and efficacy feedback entities. Based on the patient context representation vector, the knowledge retrieval enhancement module is invoked to perform semantic similarity retrieval in the anxiety diagnosis and treatment knowledge base, obtain candidate knowledge fragments that match the patient context representation vector, and perform credibility weighting and timeliness filtering on the candidate knowledge fragments to obtain the filtered knowledge fragments. The selected knowledge fragments and the patient context representation vector are fused and reasoned, and the treatment strategy is optimized in real time using an instruction tuning strategy to generate structured decision results, wherein the structured decision results include treatment plan recommendations, risk level assessments, and intervention priority rankings. The structured decision results are checked for consistency with the real-time updated multi-source medical data. When the changes in key contextual features exceed a preset threshold, the knowledge retrieval enhancement module is invoked again, and the treatment strategy is updated to output the real-time optimized anxiety intelligent decision results.
2. The anxiety-based intelligent decision-making method based on knowledge retrieval enhancement according to claim 1, characterized in that, The process involves acquiring multi-source medical data of the target patient and using natural language processing technology to perform semantic analysis, information fusion, and standardization on the multi-source medical data to construct a unified patient dataset, including: The electronic medical record data, the scale assessment data, the patient's chief complaint text data, and the follow-up feedback data are respectively processed by named entity recognition, medical terminology standard mapping, and relation extraction to generate a multi-source medical entity set with semantic tags. A cross-modal semantic alignment model is constructed to perform time-axis alignment and semantic association matching on the multi-source medical entity set, forming a unified semantic index graph, wherein the unified semantic index graph records the causal relationship strength and source confidence between entities; A conflict resolution function based on time decay factor and source authority level is established to recalculate the confidence of conflicting entities in the unified semantic index graph and obtain entity fusion weights. Based on the entity fusion weights, the multi-source medical entity set is weighted and fused and its fields are standardized and mapped to generate a unified patient dataset with consistent field structure and semantics and confidence weights.
3. The anxiety-based intelligent decision-making method based on knowledge retrieval enhancement according to claim 2, characterized in that, The establishment of a conflict resolution function based on time decay factor and source authority level, and the recalculation of confidence scores for conflicting entities in the unified semantic index graph to obtain entity fusion weights, includes: Identify conflicting entity pairs in the unified semantic index graph that have the same semantic labels but inconsistent attribute values, and construct a set of conflicting entities. Assign a source authority coefficient and a time decay coefficient to each conflicting entity in the set of conflicting entities, wherein the source authority coefficient is determined based on the data source level and the time decay coefficient is calculated based on the data generation time; A conflict resolution scoring function is constructed, which weights and fuses the source authority coefficient, the time decay coefficient, and the entity semantic matching degree to obtain the confidence score of each conflicting entity. The conflicting entities are normalized based on the confidence score, and entity fusion weights are output for data fusion.
4. The anxiety-based intelligent decision-making method based on knowledge retrieval enhancement according to claim 1, characterized in that, The context-based learning strategy performs context modeling on the unified patient dataset to generate patient context representation vectors, including: The unified patient dataset is processed by time-series segmentation to extract symptom intensity change sequences, medication response change sequences, and mood fluctuation change sequences, and a multi-dimensional contextual basic feature matrix is constructed. A scenario evolution prediction model is trained based on a historical anxiety case sample database. The trend of the multidimensional scenario basic feature matrix is predicted, the scenario deviation between the current scenario state and the predicted scenario state is calculated, and the scenario deviation is used as a dynamic adjustment factor. A context fusion function is constructed, which includes symptom dimension weights, triggering factor dimension weights, and time decay coefficients. The multidimensional context basic feature matrix and the dynamic adjustment factor are weighted and encoded to generate a context embedding vector. The context embedding vector is normalized and projected into the semantic space to output a patient context representation vector that includes semantic relationship strength and time-sensitive identifiers.
5. The anxiety-based intelligent decision-making method based on knowledge retrieval enhancement according to claim 1, characterized in that, The scenario evolution prediction model trained based on a historical anxiety case sample database predicts trends in the multidimensional scenario feature matrix, calculates the scenario deviation between the current scenario state and the predicted scenario state, and uses the scenario deviation as a dynamic adjustment factor, including: The situational feature sequences in the historical anxiety case sample database are labeled and classified to establish a training sample set containing symptom evolution paths and treatment response paths; The scenario evolution prediction model is trained based on the training sample set, and the multidimensional scenario basic feature matrix is input into the scenario evolution prediction model to obtain the predicted scenario state vector. Calculate the difference between the predicted situation state vector and the current situation state vector, where the difference is the situation deviation. The context deviation is normalized, and the normalized context deviation is embedded into the context weight adjustment function to form a dynamic adjustment factor for subsequent context fusion coding.
6. The anxiety-based intelligent decision-making method based on knowledge retrieval enhancement according to claim 1, characterized in that, The knowledge retrieval enhancement module, invoked based on the patient context representation vector, performs semantic similarity retrieval in the anxiety diagnosis and treatment knowledge base to obtain candidate knowledge fragments matching the patient context representation vector, and performs credibility weighting and timeliness filtering on the candidate knowledge fragments to obtain the filtered knowledge fragments, including: The core symptom dimension weights and risk level weights in the patient context representation vector are analyzed, and the knowledge subspace of the anxiety diagnosis and treatment knowledge base is pruned according to the core symptom dimension weights to construct a context-related knowledge subgraph. Vectorized semantic similarity calculation is performed within the context-related knowledge subgraph to obtain an initial set of candidate knowledge fragments, and a semantic matching score is generated for each knowledge fragment in the initial set of candidate knowledge fragments. A joint credibility assessment model is constructed, which integrates the semantic matching score with the authority level of the knowledge source, the level of evidence-based medicine, and the decay coefficient of publication time to obtain a comprehensive score; The initial set of candidate knowledge fragments is sorted and threshold-filtered based on the comprehensive score, and the filtered knowledge fragments that have the highest matching degree with the patient context representation vector and meet the requirements of credibility and timeliness are output.
7. The anxiety-based intelligent decision-making method based on knowledge retrieval enhancement according to claim 1, characterized in that, The process of fusing and reasoning the selected knowledge fragments and the patient context representation vector, and using an instruction tuning strategy to optimize the treatment strategy in real time to generate structured decision results includes: The filtered knowledge fragments are reconstructed into evidence chains to form a knowledge reasoning subgraph that includes intervention measure nodes, applicable condition nodes, and efficacy expectation nodes, and the knowledge reasoning subgraph is structurally encoded. The patient context representation vector is mapped to a context control vector. The context control vector is then jointly input with the structured knowledge reasoning subgraph. A context constraint generation instruction template is constructed through an instruction tuning strategy to restrict the generation process to only be carried out within the coverage area of the knowledge reasoning subgraph. Under the control of the scenario constraint generation instruction template, fusion reasoning is performed, and the output is an intermediate decision representation including treatment plan field, risk level field and intervention priority field; The intermediate decision representation is subjected to field normalization mapping and consistency verification to generate a structured decision result that meets the structure definition specification.
8. The anxiety-based intelligent decision-making method based on knowledge retrieval enhancement according to claim 1, characterized in that, The process of mapping the patient context representation vector to a context control vector, jointly inputting the context control vector with the structured knowledge reasoning subgraph, and constructing a context constraint generation instruction template through an instruction tuning strategy to restrict the generation process to only within the coverage area of the knowledge reasoning subgraph includes: The patient context representation vector is decomposed into dimensions, and the weights of high-risk symptom dimensions and treatment sensitivity weights are extracted to generate a set of context control parameters. The set of situation control parameters is embedded into a preset instruction framework to form a draft instruction structure that includes treatment scope constraints and evidence citation constraints. The draft instruction structure is subjected to semantic consistency verification and field boundary restriction processing to ensure that the generated content can only call the intervention measure node and applicable condition node in the knowledge reasoning subgraph. Output the context constraint generation instruction template for use in the fusion reasoning phase.
9. The anxiety-based intelligent decision-making method based on knowledge retrieval enhancement according to claim 1, characterized in that, The process of verifying the consistency between the structured decision results and the real-time updated multi-source medical data, and when a change in key contextual features exceeds a preset threshold, re-invoking the knowledge retrieval enhancement module and updating the treatment strategy to output a real-time optimized anxiety intelligent decision result, includes: Incremental semantic encoding is performed on the real-time updated multi-source medical data to generate a gradient of change from the previous round of patient context representation vector, wherein the gradient of change represents the degree of dynamic change in the patient's state. Based on the change gradient, the affected context feature dimensions are identified, and local re-inference is performed on the knowledge subspace corresponding to the dimension to obtain the local re-inference result. Based on the results of the local re-inference, the structured decision results are re-evaluated and updated; The updated structured decision results are verified in multiple dimensions by the consistency verification module to ensure that the real-time optimized decision results meet the individualized needs of patients and the latest clinical guidelines, and output the final real-time optimized anxiety intelligent decision results.
10. An anxiety-enhancing intelligent decision-making system based on knowledge retrieval enhancement, used in the anxiety-enhancing intelligent decision-making method based on knowledge retrieval enhancement as described in any one of claims 1 to 9, characterized in that, include: The acquisition unit is used to acquire multi-source medical data of the target patient, and to perform semantic parsing, information fusion and standardization processing on the multi-source medical data through natural language processing technology to construct a unified patient dataset. The multi-source medical data includes electronic medical record data, scale assessment data, patient complaint text data and follow-up feedback data. The generation unit is used to perform context modeling on the unified patient dataset based on the context learning strategy and generate patient context representation vectors, wherein the context representation vectors include semantic relationships and timeliness data of anxiety symptom entities, triggering factor entities, medication entities and efficacy feedback entities; The filtering unit is used to call the knowledge retrieval enhancement module based on the patient context representation vector, perform semantic similarity retrieval in the anxiety diagnosis and treatment knowledge base, obtain candidate knowledge fragments that match the patient context representation vector, and perform credibility weighting and timeliness filtering on the candidate knowledge fragments to obtain the filtered knowledge fragments. The reasoning unit is used to fuse and reason with the filtered knowledge fragments and the patient context representation vector, optimize the treatment strategy in real time using the instruction tuning strategy, and generate structured decision results, wherein the structured decision results include treatment plan suggestions, risk level assessment and intervention priority ranking. The output unit is used to verify the consistency between the structured decision results and the real-time updated multi-source medical data. When the key context feature changes are detected to exceed a preset threshold, the knowledge retrieval enhancement module is called again and the treatment strategy is updated to output the real-time optimized anxiety intelligent decision results.