An electronic medical record accurate retrieval method and system based on a knowledge graph
By combining knowledge graphs and neural controlled differential equations, a dual-control path input structure is constructed, which solves the shortcomings of existing electronic medical record retrieval methods in continuous time trajectory modeling. This enables accurate retrieval of electronic medical records with temporal continuity and medical consistency, improving the accuracy and reliability of retrieval results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN JIAHE MEIKANG INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2026-02-27
- Publication Date
- 2026-05-29
AI Technical Summary
Existing electronic medical record retrieval methods struggle to model the consistency and stability of clinical state trajectories over continuous time under the constraints of medical knowledge. They are unable to effectively depict the dynamic evolution of clinical states from history to the present, resulting in insufficient retrieval results in terms of medical rationality, temporal continuity, and stability.
By combining knowledge graphs and neural controlled differential equations, a dual-control path input structure is generated by constructing a medical knowledge graph and a continuous-time clinical observation control path. Continuous-time state evolution calculations are performed, and a medical reachability domain determination and reachability domain projection mechanism is introduced to achieve reverse time integral solving and trajectory stability evaluation.
It improves the temporal continuity and medical consistency of electronic medical record retrieval, ensures the medical rationality and stability of retrieval results, enhances retrieval accuracy and interpretability, and strengthens clinical application value.
Smart Images

Figure CN122117450A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart healthcare technology, and in particular to a method and system for accurate retrieval of electronic medical records based on knowledge graphs. Background Technology
[0002] With the continuous improvement of medical informatization, electronic medical record (EMR) systems have been widely applied in clinical diagnosis and treatment, medical management, and medical research. Retrieval technology based on EMR data has gradually become an important research direction in the field of smart healthcare. Existing EMR retrieval methods mostly rely on keyword matching, semantic similarity calculation, or relational queries based on medical knowledge graphs to locate medical record information. Some technologies combine deep learning models to vectorize medical record text to improve the semantic relevance and accuracy of retrieval. However, overall, they still mainly focus on discrete-time data processing and static feature matching, lacking the ability to systematically characterize the continuous evolution of clinical states over time.
[0003] Under the aforementioned technical approach, existing methods struggle to model the consistency and stability of the continuous-time clinical state trajectory corresponding to electronic medical records under the constraints of medical knowledge. They are unable to effectively depict the dynamic evolution of clinical states from history to the present, nor can they reverse-infer the matching historical medical record trajectory based on the target clinical state. This results in deficiencies in the medical rationality, temporal continuity, and stability of the search results, thereby affecting the reliability and application value of accurate electronic medical record retrieval.
[0004] Therefore, how to provide a precise electronic medical record retrieval method based on knowledge graphs is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] One objective of this invention is to propose a precise electronic medical record retrieval method based on knowledge graphs. This invention combines knowledge graphs and neural controlled differential equations to achieve precise electronic medical record retrieval with temporal continuity and stability.
[0006] A method for precise retrieval of electronic medical records based on knowledge graphs according to an embodiment of the present invention includes the following steps: Acquire electronic medical record data generated by the target medical institution within a preset time range, perform preprocessing on the electronic medical record data, and form a clinical observation time series data sequence; A medical knowledge graph is constructed based on the time-series data of clinical observations, and a medical knowledge control path is generated based on the medical knowledge graph. A continuous-time clinical observation control path is constructed based on the clinical observation time series data sequence, and a dual control path input structure is formed; By inputting the dual-control path input structure into the improved neural controlled differential equation, and driving the continuous-time state evolution calculation through dual-path coupling, the continuous trajectory of the initial clinical state of the corresponding electronic medical record is obtained. Perform reachability domain projection operation to obtain the continuous trajectory of the target clinical state that satisfies medical constraints; Upon receiving a retrieval request, it is parsed as the target clinical state termination constraint, and a reverse time integral solution process is constructed based on the improved neural controlled differential equation. The reverse continuous time integral calculation is performed to obtain the set of continuous trajectories of candidate historical clinical states. Based on the results of the accompanying sensitivity calculation, the perturbation response intensity and state evolution stability index corresponding to the continuous trajectory of each candidate historical clinical state are determined, and the trajectory stability evaluation value is calculated. The candidate historical clinical status continuous trajectory set is sorted, the target historical clinical status continuous trajectory is determined, and the electronic medical record retrieval results are output.
[0007] Optionally, the electronic medical record data includes symptom records, physical sign records, examination results, diagnostic conclusions, treatment measures, and corresponding timestamp information. Preprocessing includes time alignment processing and semantic standardization processing to form a clinical observation time series data sequence arranged according to a unified time index.
[0008] Optionally, the formation of the medical knowledge control path includes: Based on medical terminology standards, standardized mapping processing is performed on the medical record text information in the clinical observation time series data to obtain standardized text information; At each time index, entity recognition processing is performed on the standardized text information to obtain a set of entity recognition results, which are then arranged in the order of the time index to form a time series set of entity recognition. Based on entity relationship rules, the entity identification time series set is processed to extract relationships, generate entity relationship sets, and form relationship time series sets according to time index order; Attribute association processing is performed on the structured fields in the clinical observation time series data sequence, binding the field identifier, field value and field timestamp to the corresponding entity identifier, generating an entity attribute mapping set, and forming an attribute time series set according to the time index order; A medical knowledge graph is constructed based on the entity recognition time series set, the relation time series set, and the attribute time series set. Generate medical knowledge control paths based on medical knowledge graphs.
[0009] Optionally, the formation of the dual control path input structure includes: Based on the clinical observation time series data sequence, the clinical observation feature set at each time index is extracted in order of time index, and the clinical observation feature set is numerically encoded to form a clinical observation feature sequence that corresponds one-to-one with the time index. Continuous-time interpolation is performed on the clinical observation feature sequences to obtain the continuous-time clinical observation control path; Obtain the medical knowledge control path corresponding to the continuous-time clinical observation control path, and perform time synchronization processing on the continuous-time clinical observation control path and the medical knowledge control path using a unified time benchmark to form a time-aligned result. Based on the time alignment results, feature dimension alignment processing is performed on the continuous time clinical observation control path and medical knowledge control path. By determining the mapping relationship between the clinical observation control dimension and the medical knowledge control dimension, dimension expansion processing or dimension compression processing is performed on the medical knowledge control path to form a dual control path input structure.
[0010] Optionally, the formation of the initial clinical state continuous trajectory includes: Obtain the dual control path input structure, and determine the initial values of the clinical state based on the control values of the dual control path input structure at the initial time point; At any consecutive time point, a continuous time-driven value is generated based on the dual control path input structure, and a continuous time state change constraint relationship is constructed based on the continuous time-driven value and the current clinical state value. A continuous-time integral recursive structure is constructed based on the constraint relationship of continuous-time state changes, and the integration step size is determined according to the time interval between adjacent time points. The clinical state value is updated stepwise by integration at each continuous time point. The clinical status values obtained recursively at each consecutive time point are arranged in chronological order to form a sequence of clinical status values. Based on the arrangement relationship of the clinical status value sequence in the continuous time domain, an initial continuous trajectory of clinical status is generated, thus obtaining the initial continuous trajectory of clinical status of the corresponding electronic medical record.
[0011] Optionally, the generation of the continuous trajectory of the target clinical state satisfying medical constraints includes: During the continuous-time state evolution calculation, the clinical state values corresponding to each time step are obtained, and the medical reachability domain is determined according to the medical reachability domain definition rules. For each time step, the clinical state value is used to determine the medical reachability domain, calculate the deviation from the medical reachability domain, and compare the deviation with the medical reachability conditions to obtain the medical reachability domain determination result. The deviation from the medical reachability domain is the minimum distance from the clinical state value to the boundary of the medical reachability domain. When the medical reachability domain determination result shows that the deviation of the medical reachability domain meets the medical reachability condition, the clinical state value of the corresponding time step is determined as the effective clinical state value and written into the candidate target clinical state sequence. When the medical reachability domain determination result indicates that the deviation of the medical reachability domain does not meet the medical reachability condition, the reachability domain projection operation is performed on the clinical state value at the corresponding time step to obtain the projected clinical state value, and the projected clinical state value is written into the candidate target clinical state sequence as a valid clinical state value. The candidate target clinical state sequences are arranged in time step order to form a continuous trajectory of the target clinical state, thus obtaining a continuous trajectory of the target clinical state that meets medical constraints.
[0012] Optionally, the generation of the candidate historical clinical state continuous trajectory set includes: Upon receiving a search request, the search request is parsed to generate termination constraints for the target clinical state. The termination time point is determined based on the termination constraints of the target clinical state, and a reverse time integral time step sequence is constructed before the termination time point; A reverse time integral solution process is constructed based on the improved neural controlled differential equation, and the termination constraint of the target clinical state is used as the termination boundary constraint of the reverse time integral solution process. Perform reverse continuous time integration calculation on the reverse time integration time step sequence to obtain the reverse clinical state continuous trajectory, and calculate the termination constraint deviation of the reverse clinical state continuous trajectory at the termination time point. Based on the termination constraint deviation, continuous trajectories of reverse clinical states that meet the termination constraint deviation conditions are selected, and the selected continuous trajectories of reverse clinical states are aggregated to form a set of candidate continuous trajectories of historical clinical states, thus obtaining a set of candidate continuous trajectories of historical clinical states corresponding to the search request.
[0013] Optionally, the generation of the trajectory stability evaluation value includes: Obtain a set of candidate historical clinical state continuous trajectories, and for each candidate historical clinical state continuous trajectory in the set, obtain the accompanying sensitivity calculation results based on the improved neural controlled differential equation. The state disturbance value sequence is determined based on the accompanying sensitivity calculation results, and the disturbance response intensity is obtained based on the time-step product relationship between the accompanying sensitivity calculation results and the state disturbance value sequence. The change amplitude sequence is determined based on the change amplitude of the accompanying sensitivity calculation results between adjacent time steps, and the change amplitude sequence is subjected to continuous time averaging to obtain the state evolution stability index. The trajectory stability evaluation value is obtained by performing a weighted summation calculation based on the disturbance response intensity and the state evolution stability index. Output the trajectory stability evaluation value corresponding to the continuous trajectory of each candidate historical clinical state.
[0014] Optionally, the generation of the electronic medical record retrieval results includes: Obtain the trajectory stability evaluation value corresponding to each candidate historical clinical state continuous trajectory in the candidate historical clinical state continuous trajectory set, and sort the candidate historical clinical state continuous trajectory set according to the trajectory stability evaluation value to form a sorted sequence arranged according to the size of the trajectory stability evaluation value; In the sorted sequence, candidate historical clinical state continuous trajectories that meet the criteria for trajectory stability evaluation value are identified, and the candidate historical clinical state continuous trajectories that meet the criteria are identified as candidate historical clinical state continuous trajectories that match the retrieval request. Output the electronic medical record retrieval results corresponding to the continuous trajectory of the candidate historical clinical status, and complete the accurate electronic medical record retrieval.
[0015] According to an embodiment of the present invention, an electronic medical record precision retrieval system based on a knowledge graph includes: The electronic medical record data processing module is used to perform time alignment and semantic standardization processing on electronic medical record data to form a clinical observation time series data sequence. The medical knowledge graph construction module is used to perform entity recognition, relation extraction and attribute association processing, construct medical knowledge graph and generate medical knowledge control paths; The dual control path generation module is used to construct a continuous-time clinical observation control path and synchronize it with the medical knowledge control path in time and align it with the feature dimensions to form a dual control path input structure. The continuous-time state evolution module is used to input the dual-control path input structure into the improved neural controlled differential equation to obtain the continuous trajectory of the initial clinical state; The medical reachability constraint module is used to perform medical reachability determination and reachability projection calculation on the clinical state to obtain the continuous trajectory of the target clinical state; The reverse time integration retrieval module is used to perform reverse continuous time integration calculations based on the retrieval request to obtain a set of candidate historical clinical state continuous trajectories. The trajectory stability evaluation module is used to calculate the trajectory stability evaluation value based on the accompanying sensitivity calculation results. The search results output module is used to sort and output the electronic medical record search results based on the trajectory stability evaluation value.
[0016] The beneficial effects of this invention are: This invention addresses the shortcomings of existing electronic medical record (EMR) retrieval methods, which primarily rely on discrete-time feature matching, struggle to characterize the continuous evolution of clinical states, and lack medical consistency constraints. It proposes a precise EMR retrieval method based on knowledge graphs and improved neural controlled differential equations. By performing time alignment and semantic standardization on EMR data, a medical knowledge graph is constructed, generating medical knowledge control paths. Simultaneously, a continuous-time clinical observation control path is constructed, forming a dual-control path input structure that jointly drives the continuous-time state evolution calculation, thereby obtaining an initial continuous trajectory of clinical states with temporal continuity and medical semantic consistency. Furthermore, a medical reachability domain determination and reachability domain projection mechanism is introduced to constrain the range of clinical state changes in real time during continuous-time evolution, ensuring that the generated target clinical state continuous trajectory always meets medical rationality requirements, effectively improving the reliability and interpretability of clinical state modeling.
[0017] Furthermore, this invention transforms the retrieval request into a termination constraint for the target clinical state. Based on an improved neural controlled differential equation, a reverse time integral solution process is constructed. Through reverse continuous time integral calculation, a set of continuous trajectories of candidate historical clinical states is obtained, enabling a computable inverse retrieval from the target state to the historical medical record trajectory. Simultaneously, the perturbation response intensity and state evolution stability index are determined using the accompanying sensitivity calculation results, and a trajectory stability evaluation value is formed accordingly. The continuous trajectories of candidate historical clinical states are then sorted and matched, ultimately outputting electronic medical record retrieval results with temporal continuity, medical consistency, and evolutionary stability. Therefore, this invention improves the accuracy of electronic medical record retrieval while enhancing the medical rationality, dynamic consistency, and stable reliability of the retrieval results, demonstrating good clinical application value and promising prospects for wider application. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of a knowledge graph-based method for precise retrieval of electronic medical records proposed in this invention. Figure 2 This is a schematic diagram of the medical knowledge graph and medical knowledge control path generation structure in the precise electronic medical record retrieval method based on knowledge graph proposed in this invention. Figure 3 This is a schematic diagram of the historical clinical state trajectory inversion retrieval structure based on inverse time integration in the electronic medical record accurate retrieval method based on knowledge graph proposed in this invention. Detailed Implementation
[0019] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0020] refer to Figures 1-3 A knowledge graph-based method for precise retrieval of electronic medical records includes the following steps: Acquire electronic medical record data generated by the target medical institution within a preset time range, perform preprocessing on the electronic medical record data, and form a clinical observation time series data sequence; Based on medical terminology standards and entity relationship rules, entity recognition, relation extraction, and attribute association processing are performed on clinical observation time-series data sequences to construct a medical knowledge graph, and medical knowledge control paths are generated based on the medical knowledge graph. A continuous-time clinical observation control path is constructed based on the clinical observation time series data sequence. The clinical observation control path and the medical knowledge control path are then synchronized in execution time and aligned in feature dimensions to form a dual control path input structure. By inputting the dual-control path input structure into the improved neural controlled differential equation, and driving the continuous-time state evolution calculation through dual-path coupling, the continuous trajectory of the initial clinical state of the corresponding electronic medical record is obtained. During the continuous-time state evolution calculation, the clinical state obtained at each time step is judged by medical reachability domain determination. When the judgment result does not meet the preset medical reachability conditions, the reachability domain projection operation is performed on the clinical state to obtain the continuous trajectory of the target clinical state that meets the medical constraints. Upon receiving a retrieval request, the retrieval request is parsed into a target clinical state termination constraint. Based on the improved neural controlled differential equation, a reverse time integral solution process is constructed. The reverse continuous time integral calculation is performed on the target clinical state termination constraint to obtain a set of candidate historical clinical state continuous trajectories corresponding to the retrieval request. Based on the calculation results of the accompanying sensitivity of the improved neural controlled differential equation, the perturbation response intensity and state evolution stability index corresponding to the continuous trajectory of each candidate historical clinical state are determined, and the trajectory stability evaluation value is calculated based on the perturbation response intensity and state evolution stability index. The candidate historical clinical state continuous trajectory set is sorted according to the trajectory stability evaluation value, the target historical clinical state continuous trajectory that matches the retrieval request is determined, and the electronic medical record retrieval results corresponding to the target historical clinical state continuous trajectory are output.
[0021] In this embodiment, the electronic medical record data includes symptom records, physical sign records, examination results, diagnostic conclusions, treatment measures, and corresponding timestamp information. Preprocessing includes time alignment processing and semantic standardization processing to form a sequence of clinical observation time-series data arranged according to a unified time index.
[0022] In this embodiment, the formation of the medical knowledge control path includes: Based on the medical terminology standardization, the medical record text information in the clinical observation time series data sequence is standardized and mapped so that medical terms in different forms of expression correspond to a preset medical terminology set, resulting in standardized text information that is consistent with the time index of the clinical observation time series data sequence. At each time index, entity recognition processing is performed on the standardized text information. Through standardized medical terminology, entity recognition, and time alignment, medical entities in the medical record text are extracted, and structured representations of these entities are generated through graphs to obtain a set of entity recognition results. The entity recognition time sequence set is formed according to the time index order. Each entity record in the entity recognition result set includes entity type, entity value, and the entity's position mark in the standardized text information. Based on entity relationship rules, the entity identification time series set is processed to extract relationships, generating an entity relationship set. The relationship time series set is formed according to the time index order. Each relationship record in the entity relationship set includes the relationship type, the relationship start entity identifier, and the relationship end entity identifier. The specific process of performing relation extraction includes: constructing candidate entity relation pairs based on identified medical entities in the clinical observation time series data sequence, and filtering out effective candidate entity relation pairs according to entity type combination rules and semantic proximity, performing relation type determination on each candidate entity relation pair according to medical relation rules, determining the medical association between entities and generating corresponding relation types and relation confidence, performing time alignment processing on entity relations according to the time index corresponding to the entity, quantifying the activation intensity of entity relations by combining relation confidence, frequency of occurrence and time interval, and changing the relation activation intensity in the continuous time direction through time decay, arranging the entity relations that have completed time positioning and intensity quantification in chronological order to form a continuous time relation time series structure; Attribute association processing is performed on the structured fields in the clinical observation time series data sequence, binding the field identifier, field value and field timestamp to the corresponding entity identifier, generating an entity attribute mapping set, and forming an attribute time series set according to the time index order; A medical knowledge graph is constructed based on the entity recognition time series set, the relation time series set, and the attribute time series set. This enables medical entity nodes to establish connections through entity relation edges, and records the attribute value changes of medical entity nodes at each time index through the entity attribute mapping set. The medical knowledge control path is generated based on the medical knowledge graph. The medical knowledge control path includes a relation activation sequence and an attribute activation sequence at each time index. The relation activation sequence is calculated based on the frequency of relation occurrence in the relation time series set and the time decay coefficient. The time decay coefficient is calculated based on the time interval corresponding to the relation and the preset decay factor. The attribute activation sequence is determined based on the attribute type and attribute value in the attribute time series set.
[0023] In this embodiment, the formation of the dual control path input structure includes: Based on the clinical observation time series data sequence, the clinical observation feature set at each time index is extracted in order of time index, and the clinical observation feature set is numerically encoded to form a clinical observation feature sequence that corresponds one-to-one with the time index. Continuous-time interpolation is performed on the clinical observation feature sequence to ensure that each continuous time point corresponds to a unique clinical observation feature value. The interpolation weight is calculated based on the time interval between adjacent time indices and the proportion of the time distance from the target continuous time point to the adjacent time index, thus obtaining the continuous-time clinical observation control path. Obtain the medical knowledge control path corresponding to the continuous-time clinical observation control path, and perform time synchronization processing on the continuous-time clinical observation control path and the medical knowledge control path with a unified time benchmark, so that the continuous-time clinical observation control path and the medical knowledge control path form a time alignment result on the same time index set. Based on the time alignment results, feature dimension alignment processing is performed on the continuous-time clinical observation control path and the medical knowledge control path. By determining the mapping relationship between the clinical observation control dimension and the medical knowledge control dimension, dimension expansion processing or dimension compression processing is performed on the medical knowledge control path. By adjusting the feature dimensions between the clinical observation control path and the medical knowledge control path, consistency between them at each time point is ensured so that the subsequent coupling calculation of the dual control path can be carried out stably, thereby driving the continuous-time state evolution and making the continuous-time clinical observation control path and the medical knowledge control path at each time index have a consistent feature dimension structure, forming a dual control path input structure.
[0024] In this embodiment, the formation of the initial clinical state continuous trajectory includes: Obtain the dual control path input structure, and determine the initial value of the clinical state based on the control value of the dual control path input structure at the initial time point, so that the initial value of the clinical state is used as the starting state for continuous time state evolution calculation; At any consecutive time point, a continuous time-driven value is generated based on the dual control path input structure, and a continuous time state change constraint relationship is constructed based on the continuous time-driven value and the current clinical state value, so that the amount of clinical state change per unit time is jointly determined by the dual control path input structure and the current clinical state value. Based on the constraint relationship of continuous time state change, a continuous time integral recursive structure is constructed. In the continuous time state evolution calculation, according to the clinical state value at the current time point and the driving value of the dual control path at that time point, a continuous time state change expression describing the relationship of clinical state change with time is constructed. The numerical solution framework of this continuous change process is realized by stepwise integration update at discrete time steps. The integration step size is determined according to the time interval between adjacent time points. Stepwise integration update calculation is performed on the clinical state value at each continuous time point, so that the updated clinical state value is continuously constrained by the dual control path input structure. The clinical status values obtained recursively at each consecutive time point are arranged in chronological order to form a sequence of clinical status values. Based on the arrangement relationship of the clinical status value sequence in the continuous time domain, an initial continuous trajectory of clinical status is generated, thus obtaining the initial continuous trajectory of clinical status of the corresponding electronic medical record.
[0025] In this embodiment, the generation of the continuous trajectory of the target clinical state that satisfies medical constraints includes: In the continuous-time state evolution calculation, the clinical state values corresponding to each time step are obtained, and the medical reachability domain is determined according to the medical reachability domain definition rules. The medical reachability domain is a computable state region in the continuous-time clinical state space, which is formed by the multidimensional value boundary, the consistency of medical relationships and the time change restriction, so that the medical reachability domain corresponds to the state space range that allows the existence of clinical state values. For each time step, the clinical state value is used to determine the medical reachability domain, calculate the deviation from the medical reachability domain, and compare the deviation with the medical reachability conditions to obtain the medical reachability domain determination result. The deviation from the medical reachability domain is the minimum distance from the clinical state value to the boundary of the medical reachability domain. The calculation of the deviation from the medical reachability domain specifically includes: after obtaining the clinical state value and the expression of the medical reachability domain boundary, the expression of the medical reachability domain boundary is represented as a set of boundary constraints composed of multiple boundary constraints. For each boundary constraint in the boundary constraint set, the distance value from the clinical state value to the corresponding boundary position of the boundary constraint is calculated. The distance value is determined by the Euclidean distance between the clinical state value and the nearest boundary point corresponding to the boundary constraint. The minimum distance value is selected from the distance values corresponding to each boundary constraint, and the minimum distance value is determined as the deviation from the medical reachability domain. The minimum distance from the clinical state value to the boundary of the medical reachability domain is obtained as the deviation from the medical reachability domain. When the medical reachability domain determination result shows that the deviation of the medical reachability domain meets the medical reachability condition, the clinical state value of the corresponding time step is determined as the effective clinical state value and written into the candidate target clinical state sequence. When the medical reachability domain determination result indicates that the deviation of the medical reachability domain does not meet the medical reachability condition, the reachability domain projection operation is performed on the clinical state value at the corresponding time step to obtain the projected clinical state value, and the projected clinical state value is written into the candidate target clinical state sequence as a valid clinical state value. The candidate target clinical state sequences are arranged in time step order to form a continuous trajectory of the target clinical state, thus obtaining a continuous trajectory of the target clinical state that meets medical constraints.
[0026] In this embodiment, the generation of the candidate historical clinical state continuous trajectory set includes: Upon receiving a search request, the search request is parsed to generate termination constraints for the target clinical state. The termination time point is determined based on the termination constraints of the target clinical state, and a reverse time integration time step sequence is constructed before the termination time point so that the reverse time integration time step sequence is arranged in time from the termination time point to the historical time direction. The reverse time integral solution process is constructed based on the improved neural controlled differential equation, and the target clinical state termination constraint is used as the termination boundary constraint of the reverse time integral solution process, so that the reverse continuous time integral calculation satisfies the target clinical state termination constraint at the termination time point. The specific steps of constructing the reverse time integration solution process include: determining the termination time point based on the termination constraint of the target clinical state, determining the reverse time integration time step sequence before the termination time point, loading the termination constraint of the target clinical state as the termination boundary constraint of the reverse time integration solution process at the termination time point of the reverse time integration time step sequence, and taking the terminated clinical state value that satisfies the termination boundary constraint as the starting state for the reverse continuous time integration calculation, determining the continuous time state change relationship of the clinical state value with time based on the improved neural controlled differential equation, and converting the continuous time state change relationship into a reverse integration update relationship, so that the reverse integration update relationship is used to recursively update the clinical state value between adjacent reverse time steps, determining the reverse integration step size based on the time interval between adjacent reverse time steps, and performing stepwise integration update of the clinical state value at each reverse time step according to the reverse integration update relationship and the reverse integration step size, thereby obtaining the continuous trajectory of the reverse clinical state advancing along the reverse time direction, thus forming the reverse time integration solution process. Perform reverse continuous time integration calculation on the reverse time integration time step sequence to obtain the reverse clinical state continuous trajectory, and calculate the termination constraint deviation of the reverse clinical state continuous trajectory at the termination time point. The specific steps of performing reverse continuous-time integration calculation include: obtaining the termination clinical state value that satisfies the termination constraint of the target clinical state at the termination time point, and using the termination clinical state value as the starting clinical state value for reverse continuous-time integration calculation; obtaining the reverse-time integration time step sequence; selecting adjacent reverse time steps sequentially from the termination time point to the historical time direction in the reverse-time integration time step sequence; determining the change in clinical state within the time interval between each adjacent reverse time step based on the reverse integration update relationship corresponding to the improved neural controlled differential equation; determining the reverse integration step size based on the time interval between adjacent reverse time steps; performing integral accumulation and update on the change in clinical state based on the reverse integration step size to obtain the clinical state value corresponding to the next reverse time step; repeating the above integral update process for adjacent reverse time steps to obtain a sequence of clinical state values arranged in the reverse time direction; and generating a reverse clinical state continuous trajectory based on the clinical state value sequence to complete the reverse continuous-time integration calculation. Based on the termination constraint deviation, continuous trajectories of reverse clinical states that meet the termination constraint deviation conditions are selected, and the selected continuous trajectories of reverse clinical states are aggregated to form a set of candidate continuous trajectories of historical clinical states, thus obtaining a set of candidate continuous trajectories of historical clinical states corresponding to the search request.
[0027] In this embodiment, the generation of trajectory stability evaluation values includes: Obtain a set of candidate historical clinical state continuous trajectories, and for each candidate historical clinical state continuous trajectory in the set, obtain the accompanying sensitivity calculation results based on the improved neural controlled differential equation. Based on the results of the accompanying sensitivity calculation, the state perturbation value sequence is determined. Then, based on the time-step product relationship between the accompanying sensitivity calculation results and the state perturbation value sequence, the absolute value processing of the product results at each time step is performed and the results are accumulated to obtain the perturbation response intensity. The perturbation response intensity characterizes the overall response degree of the candidate historical clinical state continuous trajectory to the state perturbation. Based on the change amplitude of the accompanying sensitivity calculation results between adjacent time steps, the change amplitude sequence is determined, and continuous time averaging is performed on the change amplitude sequence to obtain the state evolution stability index. The state evolution stability index characterizes the stability of the continuous trajectory of the candidate historical clinical state in the continuous time state evolution process. A weighted summation calculation is performed based on the disturbance response intensity and the state evolution stability index. The weighted summation calculation is to multiply the disturbance response intensity by the first preset weight, multiply the state evolution stability index by the second preset weight, and sum the two product results to obtain the trajectory stability evaluation value. Output the trajectory stability evaluation value corresponding to the continuous trajectory of each candidate historical clinical state.
[0028] In this embodiment, the generation of electronic medical record retrieval results includes: Obtain the trajectory stability evaluation value corresponding to each candidate historical clinical state continuous trajectory in the candidate historical clinical state continuous trajectory set, and sort the candidate historical clinical state continuous trajectory set according to the trajectory stability evaluation value to form a sorted sequence arranged according to the size of the trajectory stability evaluation value; In the sorted sequence, candidate historical clinical state continuous trajectories that meet the criteria for trajectory stability evaluation value are identified, and the candidate historical clinical state continuous trajectories that meet the criteria are identified as candidate historical clinical state continuous trajectories that match the retrieval request. Output the electronic medical record retrieval results corresponding to the continuous trajectory of the candidate historical clinical status, and complete the accurate electronic medical record retrieval.
[0029] A knowledge graph-based electronic medical record retrieval system includes: The electronic medical record data processing module is used to perform time alignment and semantic standardization processing on electronic medical record data to form a clinical observation time series data sequence. The medical knowledge graph construction module is used to perform entity recognition, relation extraction and attribute association processing, construct medical knowledge graph and generate medical knowledge control paths; The dual control path generation module is used to construct a continuous-time clinical observation control path and synchronize it with the medical knowledge control path in time and align it with the feature dimensions to form a dual control path input structure. The continuous-time state evolution module is used to input the dual-control path input structure into the improved neural controlled differential equation to obtain the continuous trajectory of the initial clinical state; The medical reachability constraint module is used to perform medical reachability determination and reachability projection calculation on the clinical state to obtain the continuous trajectory of the target clinical state; The reverse time integration retrieval module is used to perform reverse continuous time integration calculations based on the retrieval request to obtain a set of candidate historical clinical state continuous trajectories. The trajectory stability evaluation module is used to calculate the trajectory stability evaluation value based on the accompanying sensitivity calculation results. The search results output module is used to sort and output the electronic medical record search results based on the trajectory stability evaluation value.
[0030] Example 1: To verify the feasibility of this invention in practice, it was applied to the electronic medical record management and clinical decision support system of a tertiary general hospital. Over long-term operation, the hospital has accumulated a large amount of clinical data, including symptom records, changes in vital signs, examination results, diagnostic information, and treatment plans. This data is managed and stored through the electronic medical record system. With the deepening of medical informatization, how to quickly and accurately extract valuable historical case information from the massive medical record data has become a key issue for the hospital to improve clinical diagnostic efficiency and decision support capabilities. However, existing electronic medical record retrieval methods mainly rely on keyword matching or static retrieval based on similarity, which suffers from weak correlation between medical semantics and temporal evolution, and insufficient medical rationality of retrieval results, making it difficult to cope with the needs of reviewing complex disease courses and matching the temporal continuity between cases.
[0031] In this medical environment, the method of this invention has been effectively applied. First, the hospital's electronic medical record data undergoes time alignment and semantic standardization, integrating clinical information from different sources and formats under a unified time index to form a standardized clinical observation time-series data sequence. Next, a medical knowledge graph is constructed using medical terminology standardization and entity relationship rules, and medical knowledge control paths are generated through entity recognition, relationship extraction, and attribute association. In this way, all clinical data not only forms structured data with temporal continuity but also provides semantic support for retrieval through the medical knowledge graph.
[0032] Next, this invention synchronizes the constructed continuous-time clinical observation control path with the medical knowledge control path in terms of time and aligns their feature dimensions, forming a dual-control path input structure. This dual-control path input structure is input into an improved neural controlled differential equation model to drive continuous-time state evolution calculations and generate an initial continuous trajectory of clinical states. By introducing a medical reachability domain determination mechanism and reachability domain projection operations, it is ensured that the generated target clinical state trajectory always meets medical rationality constraints, i.e., conforms to the semantic rules and clinical evolution laws in the medical knowledge graph. When a retrieval request is received, the system parses the retrieval request as a target clinical state termination constraint and calculates the historical clinical state trajectory based on the reverse time integral solution process. Finally, the system selects a set of candidate historical clinical state continuous trajectories that meet the medical constraints through trajectory stability evaluation based on perturbation response strength and state evolution stability, and outputs accurate electronic medical record retrieval results.
[0033] During the operation of this system, hospital clinicians can accurately review patients' medical histories using this technology. Especially in complex cases involving multiple visits or disease evolution, the reverse engineering of historical medical records provides strong support for clinical decision-making. Compared to traditional retrieval methods, the method of this invention demonstrates significant advantages in processing complex medical history data. First, based on the combination of medical knowledge graphs and continuous-time modeling, the system effectively avoids retrieval results based solely on surface similarity, ensuring the medical rationality and clinical relevance of the results. Second, by employing reverse-time integration and trajectory stability evaluation mechanisms, the system can accurately infer historical medical history trajectories based on the current disease state, allowing clinicians to review historical treatment paths that align with the actual disease progression. Finally, medical reachability constraints and reachability projection operations enable the system to correct and optimize medical history trajectories during the retrieval of complex cases while maintaining medical rationality, greatly improving the accuracy and reliability of the retrieval results.
[0034] Through application in real-world clinical settings, the electronic medical record (EMR) retrieval method of this invention has demonstrated advantages in improving the efficiency and accuracy of medical record retrieval. Particularly in cases involving patients with multiple visits or complex disease courses, the system can fully consider the continuity of clinical status and medical rationality during reverse engineering, providing clinicians with more accurate reference information. Furthermore, by introducing continuous-time modeling and medical reachability domain determination, this invention effectively overcomes the limitations of traditional methods in terms of temporal continuity and medical relevance, optimizes the utilization efficiency of EMRs, and provides strong technical support for the subsequent realization of smart healthcare and personalized treatment. The application of this technology not only enhances hospitals' capabilities in clinical decision support but also opens new avenues for the in-depth mining and utilization of EMR data.
[0035] Table 1. Performance Comparison of Three Types of Electronic Medical Record Retrieval Methods
[0036] Based on the data in Table 1, it can be seen that the method of this invention exhibits systematic advantages in accuracy, medical consistency, and efficiency in retrieving complex disease courses. Regarding retrieval accuracy, the keyword matching method achieves 75.2%, the semantic vector retrieval method achieves 84.1%, and the method of this invention reaches 92.0%, representing a 7.9 percentage point improvement over the semantic vector retrieval method. This improvement is related to the fact that this invention uses a medical knowledge graph to generate medical knowledge control paths and forms a dual-control path input structure with the continuous-time clinical observation control path, enabling retrieval matching to no longer rely solely on text similarity but simultaneously constrain clinical semantic relationships and temporal evolution structures.
[0037] In terms of response time, the semantic vector retrieval method averages 8.1 seconds per attempt, while the method of this invention averages 6.5 seconds per attempt, a reduction of 1.6 seconds. Regarding multi-disease course retrieval time, the semantic vector retrieval method averages 10.4 seconds per attempt, while the method of this invention averages 8.3 seconds per attempt, a reduction of 2.1 seconds. This indicates that this invention, through continuous-time state evolution calculation and inverse-time integration, transforms the computational mode of "repeated matching by discrete time slices" into "one-time solution and filtering within the continuous time trajectory space," reducing the overhead of repeated traversal during long-span disease course retrieval.
[0038] Regarding the medical rationality matching rate, the keyword matching method achieved 70.0%, the semantic vector retrieval method achieved 82.3%, and the method of this invention achieved 90.0%, representing an improvement of 7.7 percentage points compared to the semantic vector retrieval method. This result directly corresponds to the medical reachability domain constraint mechanism: during the continuous time state evolution process, this invention performs medical reachability domain determination and reachability domain projection correction on the clinical state, ensuring that the continuous trajectory of the output target clinical state falls within the medically permissible range, thereby reducing the number of retrieval hits that are semantically similar but have inconsistent medical logic.
[0039] In terms of historical disease progression matching accuracy, the semantic vector retrieval method achieved 76.9%, while the method of this invention achieved 85.0%, an improvement of 8.1 percentage points. This improvement mainly comes from the reverse time integral retrieval structure: after parsing the retrieval request into the termination constraint of the target clinical state, a set of continuous trajectories of candidate historical clinical states is obtained through reverse continuous time integral calculation. Then, the perturbation response intensity and state evolution stability index obtained by accompanying sensitivity are combined for ranking, thus making it easier to find historical trajectories that match the current clinical state in terms of evolutionary mechanism.
[0040] In summary, the simultaneous improvement in accuracy, medical rationality matching rate, and historical disease progression matching degree shown in Table 1 indicates that the present invention not only improves retrieval hit rate but also enhances the medical interpretability consistency of the hit results. At the same time, the reduction in response time and multi-disease retrieval time indicates that the present invention has better computational efficiency and scalability within the continuous-time solution framework.
[0041] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for precise retrieval of electronic medical records based on knowledge graphs, characterized in that, Includes the following steps: Acquire electronic medical record data generated by the target medical institution within a preset time range, perform preprocessing on the electronic medical record data, and form a clinical observation time series data sequence; A medical knowledge graph is constructed based on the time-series data of clinical observations, and a medical knowledge control path is generated based on the medical knowledge graph. A continuous-time clinical observation control path is constructed based on the clinical observation time series data sequence, and a dual control path input structure is formed; By inputting the dual-control path input structure into the improved neural controlled differential equation, and driving the continuous-time state evolution calculation through dual-path coupling, the continuous trajectory of the initial clinical state of the corresponding electronic medical record is obtained. Perform reachability domain projection operation to obtain the continuous trajectory of the target clinical state that satisfies medical constraints; Upon receiving a retrieval request, it is parsed as the target clinical state termination constraint, and a reverse time integral solution process is constructed based on the improved neural controlled differential equation. The reverse continuous time integral calculation is performed to obtain the set of continuous trajectories of candidate historical clinical states. Based on the results of the accompanying sensitivity calculation, the perturbation response intensity and state evolution stability index corresponding to the continuous trajectory of each candidate historical clinical state are determined, and the trajectory stability evaluation value is calculated. The candidate historical clinical status continuous trajectory set is sorted, the target historical clinical status continuous trajectory is determined, and the electronic medical record retrieval results are output.
2. The method for accurate electronic medical record retrieval based on knowledge graphs according to claim 1, characterized in that, The electronic medical record data includes symptom records, physical signs records, examination results, diagnostic conclusions, treatment measures, and corresponding timestamp information. Preprocessing includes time alignment processing and semantic standardization processing to form a clinical observation time series data sequence arranged according to a unified time index.
3. The method for accurate electronic medical record retrieval based on knowledge graphs according to claim 1, characterized in that, The formation of the medical knowledge control pathway includes: Based on medical terminology standards, standardized mapping processing is performed on the medical record text information in the clinical observation time series data to obtain standardized text information; At each time index, entity recognition processing is performed on the standardized text information to obtain a set of entity recognition results, which are then arranged in the order of the time index to form a time series set of entity recognition. Based on entity relationship rules, the entity identification time series set is processed to extract relationships, generate entity relationship sets, and form relationship time series sets according to time index order; Attribute association processing is performed on the structured fields in the clinical observation time series data sequence, binding the field identifier, field value and field timestamp to the corresponding entity identifier, generating an entity attribute mapping set, and forming an attribute time series set according to the time index order; A medical knowledge graph is constructed based on the entity recognition time series set, the relation time series set, and the attribute time series set. Generate medical knowledge control paths based on medical knowledge graphs.
4. The method for accurate electronic medical record retrieval based on knowledge graphs according to claim 1, characterized in that, The formation of the dual control path input structure includes: Based on the clinical observation time series data sequence, the clinical observation feature set at each time index is extracted in order of time index, and the clinical observation feature set is numerically encoded to form a clinical observation feature sequence that corresponds one-to-one with the time index. Continuous-time interpolation is performed on the clinical observation feature sequences to obtain the continuous-time clinical observation control path; Obtain the medical knowledge control path corresponding to the continuous-time clinical observation control path, and perform time synchronization processing on the continuous-time clinical observation control path and the medical knowledge control path using a unified time benchmark to form a time-aligned result. Based on the time alignment results, feature dimension alignment processing is performed on the continuous time clinical observation control path and medical knowledge control path. By determining the mapping relationship between the clinical observation control dimension and the medical knowledge control dimension, dimension expansion processing or dimension compression processing is performed on the medical knowledge control path to form a dual control path input structure.
5. The method for accurate electronic medical record retrieval based on knowledge graphs according to claim 1, characterized in that, The formation of the initial clinical state continuous trajectory includes: Obtain the dual control path input structure, and determine the initial values of the clinical state based on the control values of the dual control path input structure at the initial time point; At any consecutive time point, a continuous time-driven value is generated based on the dual control path input structure, and a continuous time state change constraint relationship is constructed based on the continuous time-driven value and the current clinical state value. A continuous-time integral recursive structure is constructed based on the constraint relationship of continuous-time state changes, and the integration step size is determined according to the time interval between adjacent time points. The clinical state value is updated stepwise by integration at each continuous time point. The clinical status values obtained recursively at each consecutive time point are arranged in chronological order to form a sequence of clinical status values. Based on the arrangement relationship of the clinical status value sequence in the continuous time domain, an initial continuous trajectory of clinical status is generated, thus obtaining the initial continuous trajectory of clinical status of the corresponding electronic medical record.
6. The method for precise retrieval of electronic medical records based on knowledge graphs according to claim 1, characterized in that, The generation of the continuous trajectory of the target clinical state that satisfies medical constraints includes: During the continuous-time state evolution calculation, the clinical state values corresponding to each time step are obtained, and the medical reachability domain is determined according to the medical reachability domain definition rules. For each time step, the clinical state value is used to determine the medical reachability domain, calculate the deviation from the medical reachability domain, and compare the deviation with the medical reachability conditions to obtain the medical reachability domain determination result. The deviation from the medical reachability domain is the minimum distance from the clinical state value to the boundary of the medical reachability domain. When the medical reachability domain determination result shows that the deviation of the medical reachability domain meets the medical reachability condition, the clinical state value of the corresponding time step is determined as the effective clinical state value and written into the candidate target clinical state sequence. When the medical reachability domain determination result indicates that the deviation of the medical reachability domain does not meet the medical reachability condition, the reachability domain projection operation is performed on the clinical state value at the corresponding time step to obtain the projected clinical state value, and the projected clinical state value is written into the candidate target clinical state sequence as a valid clinical state value. The candidate target clinical state sequences are arranged in time step order to form a continuous trajectory of the target clinical state, thus obtaining a continuous trajectory of the target clinical state that meets medical constraints.
7. The method for precise retrieval of electronic medical records based on knowledge graphs according to claim 1, characterized in that, The generation of the candidate historical clinical state continuous trajectory set includes: Upon receiving a search request, the search request is parsed to generate termination constraints for the target clinical state. The termination time point is determined based on the termination constraints of the target clinical state, and a reverse time integral time step sequence is constructed before the termination time point; A reverse time integral solution process is constructed based on the improved neural controlled differential equation, and the termination constraint of the target clinical state is used as the termination boundary constraint of the reverse time integral solution process. Perform reverse continuous time integration calculation on the reverse time integration time step sequence to obtain the reverse clinical state continuous trajectory, and calculate the termination constraint deviation of the reverse clinical state continuous trajectory at the termination time point. Based on the termination constraint deviation, continuous trajectories of reverse clinical states that meet the termination constraint deviation conditions are selected, and the selected continuous trajectories of reverse clinical states are aggregated to form a set of candidate continuous trajectories of historical clinical states, thus obtaining a set of candidate continuous trajectories of historical clinical states corresponding to the search request.
8. The method for accurate electronic medical record retrieval based on knowledge graphs according to claim 1, characterized in that, The generation of the trajectory stability evaluation value includes: Obtain a set of candidate historical clinical state continuous trajectories, and for each candidate historical clinical state continuous trajectory in the set, obtain the accompanying sensitivity calculation results based on the improved neural controlled differential equation. The state disturbance value sequence is determined based on the accompanying sensitivity calculation results, and the disturbance response intensity is obtained based on the time-step product relationship between the accompanying sensitivity calculation results and the state disturbance value sequence. The change amplitude sequence is determined based on the change amplitude of the accompanying sensitivity calculation results between adjacent time steps, and the change amplitude sequence is subjected to continuous time averaging to obtain the state evolution stability index. The trajectory stability evaluation value is obtained by performing a weighted summation calculation based on the disturbance response intensity and the state evolution stability index. Output the trajectory stability evaluation value corresponding to the continuous trajectory of each candidate historical clinical state.
9. The method for precise retrieval of electronic medical records based on knowledge graphs according to claim 1, characterized in that, The generation of the electronic medical record retrieval results includes: Obtain the trajectory stability evaluation value corresponding to each candidate historical clinical state continuous trajectory in the candidate historical clinical state continuous trajectory set, and sort the candidate historical clinical state continuous trajectory set according to the trajectory stability evaluation value to form a sorted sequence arranged according to the size of the trajectory stability evaluation value; In the sorted sequence, candidate historical clinical state continuous trajectories that meet the criteria for trajectory stability evaluation value are identified, and the candidate historical clinical state continuous trajectories that meet the criteria are identified as candidate historical clinical state continuous trajectories that match the retrieval request. Output the electronic medical record retrieval results corresponding to the continuous trajectory of the candidate historical clinical status, and complete the accurate electronic medical record retrieval.
10. A knowledge graph-based electronic medical record precise retrieval system, executing the knowledge graph-based electronic medical record precise retrieval method according to any one of claims 1 to 9, characterized in that, include: The electronic medical record data processing module is used to perform time alignment and semantic standardization processing on electronic medical record data to form a clinical observation time series data sequence. The medical knowledge graph construction module is used to perform entity recognition, relation extraction and attribute association processing, construct medical knowledge graph and generate medical knowledge control paths; The dual control path generation module is used to construct a continuous-time clinical observation control path and synchronize it with the medical knowledge control path in time and align it with the feature dimensions to form a dual control path input structure. The continuous-time state evolution module is used to input the dual-control path input structure into the improved neural controlled differential equation to obtain the continuous trajectory of the initial clinical state; The medical reachability constraint module is used to perform medical reachability determination and reachability projection calculation on the clinical state to obtain the continuous trajectory of the target clinical state; The reverse time integration retrieval module is used to perform reverse continuous time integration calculations based on the retrieval request to obtain a set of candidate historical clinical state continuous trajectories. The trajectory stability evaluation module is used to calculate the trajectory stability evaluation value based on the accompanying sensitivity calculation results. The search results output module is used to sort and output the electronic medical record search results based on the trajectory stability evaluation value.