A medical auxiliary diagnosis method and system based on time sequence and semantic weighting

By fusing medical record information and clinical guideline fragments using a time-series and semantic weighting method, this approach addresses the issues of unbalanced weighting of medical record information and bias towards long texts in existing technologies, thereby achieving precise matching and authoritative support for personalized diagnosis and treatment.

CN121011339BActive Publication Date: 2026-02-03SHANDONG NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511535190.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-02-03
Estimated Expiration
2045-10-27

AI Technical Summary

Technical Problem

Existing medical auxiliary diagnostic systems struggle to effectively integrate authoritative medical practice guidelines, and the imbalance in the weighting of medical record information and the bias towards long texts in search results result in insufficient accuracy and reliability of diagnostic and treatment recommendations.

Method used

A time- and semantic weighted approach is adopted to fuse medical record information through a time decay function and content relevance weights, and to filter clinical guideline fragments by combining multi-dimensional interaction relationships and metadata to generate final auxiliary diagnosis and treatment information.

Benefits of technology

It achieves precise matching of individualized diagnosis and treatment needs, enhances the authority and reliability of search results, and strengthens the clinical credibility and practicality of diagnosis and treatment recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121011339B_ABST
    Figure CN121011339B_ABST
Patent Text Reader

Abstract

The application provides a medical auxiliary diagnosis method and system based on time sequence and semantic weighting, and belongs to the technical field of medical information processing. The preprocessed current and historical medical record information of a patient is constructed as patient medical record data, which is input into a pre-trained medical language model to generate a preliminary diagnosis result. The patient medical record data vector sequence is calculated by a time decay function and a content correlation weight to obtain a comprehensive weight, and a medical record fusion vector is obtained through fusion. The medical record fusion vector is spliced with the preliminary diagnosis result to obtain a query vector. The query vector is used for searching a candidate segment in a clinical guideline knowledge base. A semantic evidence score and a coverage score are calculated based on the token of the patient medical record data and the candidate segment. The sorting probability of the candidate segment is obtained by combining the metadata prior score of the candidate segment, and a target guideline segment is screened out. The preliminary diagnosis result and the target guideline segment are fused to generate final auxiliary diagnosis and treatment information, so that an auxiliary diagnosis and treatment suggestion with traceability, verifiability and authoritative basis is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical information processing technology, and in particular to a medical auxiliary diagnosis method and system based on temporal and semantic weighting. Background Technology

[0002] In the field of artificial intelligence in healthcare, intelligent assisted diagnosis and treatment systems based on electronic medical record data have been gradually implemented. Mainstream medical big data models rely on structured and unstructured data in electronic health records for training, and often use the International Classification of Diseases (ICD) code as output for disease prediction and classification diagnosis, showing initial value in improving diagnostic and treatment efficiency.

[0003] However, clinical diagnosis and treatment not only require disease coding, but also rely heavily on the detailed diagnostic criteria, treatment pathways, and other content in authoritative medical practice guidelines. However, current technologies struggle to effectively integrate these guidelines into model applications, exhibiting significant limitations that impact practical effectiveness.

[0004] On the one hand, existing models, when integrating medical record data, often use current medical records or simply overlay historical medical records, assuming that more recent historical medical records are more relevant to the current condition. However, they fail to consider potential conflicts between the two, meaning that some recent medical records may have low relevance to the current condition, while some older historical medical records with high semantic matching are more valuable. This crude approach of determining relevance solely by time and ignoring content relevance leads to an imbalance in the weighting of medical record information, resulting in insufficient accuracy in the generated query vectors and difficulty in matching individualized treatment needs. On the other hand, when retrieving guideline fragments, traditional methods rely solely on semantic similarity for preliminary screening, without considering the multi-dimensional and fine-grained interaction relationships of the guideline fragments for ranking. This easily leads to search results biased towards long texts and low evidence-based reliability. At the same time, the "model illusion" phenomenon also reduces the credibility of treatment recommendations, making it difficult to meet the requirements of accuracy and authority in clinical decision-making. Summary of the Invention

[0005] To address the aforementioned issues, this invention proposes a medical auxiliary diagnostic method and system based on temporal and semantic weighting, which provides auxiliary diagnostic and treatment recommendations with traceability, verifiability, and authoritative evidence.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] In a first aspect, the present invention provides a medical auxiliary diagnostic method based on temporal and semantic weighting, comprising:

[0008] The preprocessed current and historical medical record information of the patient is used to construct patient medical record data, which is then input into a pre-trained medical language model to generate preliminary diagnostic results.

[0009] The patient medical record data vector sequence is fused by calculating a comprehensive weight using a time decay function and content relevance weight, and then concatenated with the preliminary diagnosis result to obtain a query vector.

[0010] Based on semantic similarity, candidate segments are retrieved from the clinical guideline knowledge base based on the query vector. Semantic evidence score and coverage score are calculated based on patient medical record data and candidate segment tokens. The prior scores of the candidate segments' metadata are combined and weighted to obtain the ranking probability of the candidate segments, and the target guideline segments are selected.

[0011] By integrating preliminary diagnostic results with fragments of target guidelines, final auxiliary diagnostic and treatment information is generated.

[0012] Secondly, the present invention provides a medical auxiliary diagnostic system based on temporal and semantic weighting, comprising:

[0013] The preliminary diagnosis acquisition module is used to construct patient medical record data from preprocessed current and historical medical record information, input it into a pre-trained medical language model, and generate preliminary diagnosis results.

[0014] The query vector construction module is used to calculate the comprehensive weight of the patient medical record data vector sequence through the time decay function and content relevance weight, and fuse it to obtain the medical record fusion vector, which is then concatenated with the preliminary diagnosis result to form the query vector.

[0015] The target guideline filtering module is used to retrieve candidate segments from the clinical guideline knowledge base based on semantic similarity and query vectors. It calculates semantic evidence scores and coverage scores based on patient medical record data and candidate segment tokens, and performs a weighted summation by combining the prior scores of candidate segment metadata to obtain the ranking probability of candidate segments and filter out target guideline segments.

[0016] The auxiliary information generation module is used to integrate preliminary diagnostic results with target guideline fragments to generate final auxiliary diagnostic and treatment information.

[0017] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the time- and semantically weighted medical auxiliary diagnosis method described in the first aspect.

[0018] Fourthly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the time- and semantically weighted medical auxiliary diagnosis method described in the first aspect.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0020] This invention integrates current and historical medical records to generate a preliminary diagnosis. It combines a time decay function and content relevance weights to obtain a medical record fusion vector, considering both the timeliness of the medical records and the relevance of the content. This results in a more accurate query vector that better matches the individualized treatment needs of patients. Secondly, during clinical guideline knowledge base retrieval, it obtains the interaction attention distribution based on a similarity matrix and an optimal transmission algorithm, and also combines metadata prior scores to rank candidate segments, fully utilizing knowledge base information to improve retrieval accuracy and resource utilization efficiency. Finally, it integrates the preliminary diagnostic results with target guideline segments to generate final auxiliary treatment information. This ensures that treatment suggestions are based on both the model's analysis of the patient's condition and authoritative guideline support, enhancing clinical reliability and practicality, and providing doctors with higher-quality decision support.

[0021] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0022] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute a limitation thereof.

[0023] Figure 1 The main flowchart of a medical auxiliary diagnosis method based on temporal and semantic weighting provided in this embodiment of the invention is shown. Detailed Implementation

[0024] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0025] Example 1

[0026] like Figure 1 As shown, this embodiment discloses a medical auxiliary diagnosis method based on temporal and semantic weighting, including the following steps:

[0027] S1: Construct the patient's current and historical medical record information into patient medical record data after preprocessing, input it into the pre-trained medical language model, and generate preliminary diagnostic results;

[0028] S2: Calculate the comprehensive weight of the patient medical record data vector sequence through the time decay function and content relevance weight, fuse it to obtain the medical record fusion vector, and concatenate it with the preliminary diagnosis result to form the query vector;

[0029] S3: Based on semantic similarity, retrieve candidate segments from the clinical guideline knowledge base based on the query vector, calculate semantic evidence score and coverage score based on patient medical record data and candidate segment tokens, combine the prior scores of candidate segment metadata for weighted summation, obtain the ranking probability of candidate segments, and filter out target guideline segments.

[0030] S4: Integrate preliminary diagnostic results with target guideline fragments to generate final auxiliary diagnostic and treatment information.

[0031] Next, combined Figure 1 This embodiment provides a detailed description of a medical auxiliary diagnosis method based on temporal and semantic weighting.

[0032] In S1, firstly, during the patient's visit, the patient's current medical record information and historical medical record information are collected. The current medical record information is obtained through the doctor's consultation record, while the historical medical record information is past medical records that can be accessed from the hospital information system and electronic medical record system.

[0033] Medical record information includes structured and unstructured data. Structured data includes demographic information, vital signs, and laboratory and examination results, while unstructured data includes chief complaint, present illness, past medical history, discharge summary, and outpatient medical records.

[0034] The current and historical medical record information are linked in chronological order and preprocessed, including word segmentation, noise reduction, format standardization, and medical terminology standardization, to ensure the accuracy of subsequent vectorized encoding and semantic retrieval.

[0035] Next, the preprocessed current and historical medical record information is input into a pre-trained medical language model to generate a preliminary diagnosis related to the patient's condition. This preliminary diagnosis will not only serve as a reference for doctors but will also participate in subsequent query construction.

[0036] It should be understood that the medical language model is built upon a large-scale medical text corpus, such as electronic medical records and medical literature. Through pre-training on these corpora, it learns semantic representations and terminology associations in the medical field, resulting in a model capable of understanding medical knowledge and enabling semantic analysis of medical record information and the generation of preliminary diagnostic results. Those skilled in the art can choose specific models according to actual needs; this embodiment does not impose any limitations.

[0037] In this embodiment, by integrating current and historical data, information on the temporal evolution of the patient's condition can be provided, making the information input into the model more comprehensive and realistic in reflecting the patient's condition. Compared with using only the current medical record, the generated preliminary diagnostic results are more in line with the patient's individual condition, helping to make more accurate diagnosis and treatment decisions.

[0038] In S2, conventional methods rely solely on time decay functions during medical record fusion. While this ensures that recent medical records dominate the weighting and reflects the timeliness of the patient's condition, it has limitations. Some recent medical records have low relevance to the current condition and may not be of practical help to diagnosis and decision-making. On the other hand, some older medical records, although relatively outdated in time, are highly relevant to the current condition at the semantic level. If weighting is done solely by the time dimension, this crucial information will be weakened or even ignored.

[0039] To address this issue, this embodiment incorporates content similarity into the medical record fusion process, working in conjunction with a time decay function to achieve a balance between timeliness and relevance.

[0040] Specifically, the preprocessed current and historical medical record information is constructed into a vector sequence. Let the medical record vector sequence be... ,in This represents the current medical record vector. Indicates the first A vector of historical medical records.

[0041] Furthermore, a time decay function and content relevance weights are introduced, specifically:

[0042] First, define the time decay function. :

[0043] ;

[0044] Where λ>0 is a hyperparameter controlling the decay rate. This represents the order of the medical records (a larger value indicates an older record). This function ensures that medical records closer to the current time have a higher time weight.

[0045] Secondly, define content relevance weights. :

[0046] ;

[0047] in, Represents a vector of historical medical records Compared with the current medical record vector The semantic similarity is measured in the range [0,1]. This function reflects the degree of relevance between historical medical records and the current patient's condition.

[0048] Finally, by combining the time decay function and the content relevance weight, the comprehensive weight of the medical record is obtained. :

[0049] ;

[0050] in, As a balancing parameter, it is used to adjust the weight of time factors and content relevance factors in the overall weighting, where Let be the time decay function. For content relevance weight, Indicates the current medical record. This is a temporary parameter introduced during the weight normalization process to normalize the weights. This represents the time decay function value corresponding to the current medical record i. This represents the time decay function value of the medical record corresponding to the temporary parameter j. This represents the relevance weight of the content of the current medical record i. This represents the content relevance weight of the medical record corresponding to the temporary parameter j.

[0051] Based on the comprehensive weight and historical medical record vectors, the medical record fusion vector is obtained. :

[0052] ;

[0053] Finally, the medical record fusion vector Vector of preliminary diagnostic results generated by the language model Concatenate the vectors to obtain the final query vector. :

[0054] ;

[0055] This weighted fusion strategy not only ensures that medical records closer to the present time have higher weights, but also ensures that historical medical records with higher semantic relevance to the current condition are fully utilized, thereby generating more accurate and personalized query representations when searching the knowledge base.

[0056] In this embodiment, a time decay function and content relevance weights are introduced. On the one hand, the time decay function ensures that the model can dynamically capture the evolution trend of the patient's disease course, avoiding excessive reliance on historical data for diagnosis. On the other hand, content similarity can highlight historical records that are highly consistent with the current condition in the global medical record, allowing them to receive more reasonable weight allocation in the fusion representation. This effectively reduces the interference of recent but irrelevant medical records on diagnosis, while avoiding the information loss problem caused by relying solely on the time dimension. Through the dual-dimensional fusion strategy, the constructed medical record vector not only more accurately reflects the intrinsic relationship between the patient's current condition and past medical history, but also generates more targeted and personalized query representations in downstream medical knowledge retrieval and diagnosis and treatment assistance, thereby improving the relevance and authority of the search results and enhancing the overall reliability and practicality of the system in clinical applications.

[0057] In S3, while medical language models can generate preliminary diagnoses, they may contain errors due to a lack of authority. Therefore, conventional techniques call upon knowledge bases containing guidelines. However, simply ranking knowledge base content based on semantic similarity only focuses on surface textual relationships. It neither fully integrates the metadata of knowledge base fragments nor delves into the fine-grained interactions between medical records and fragments, resulting in insufficient utilization of knowledge base resources and potentially causing the ranking results to deviate from clinically reliable standards.

[0058] Therefore, this embodiment performs multi-dimensional screening of candidate fragments, which can more comprehensively and accurately match patient needs and improve the reference value for diagnosis and treatment.

[0059] Specifically, the generated query vector Searching within the clinical guideline knowledge base, each segment of the clinical guideline knowledge base... They all go through the same embedding model Convert to vector representation:

[0060] .

[0061] The construction process of the clinical guideline knowledge base includes:

[0062] S301: Assist in the manual analysis of medical practice guidelines documents issued by authoritative medical institutions and divide them into chapters;

[0063] S302: Extract knowledge fragments related to disease diagnosis, classification, treatment, monitoring, and medication;

[0064] S303: The knowledge fragment is vectorized to generate a feature vector reflecting its semantics, and stored in a vector database along with the corresponding metadata. The metadata includes the publishing organization, chapter title, publication time, authority of the publishing organization, and level of evidence of the knowledge fragment.

[0065] Then, the query vector is calculated using cosine similarity. With each segment vector Semantic similarity between them:

[0066] ;

[0067] Select the k segments that satisfy the threshold τ and rank them to form a candidate segment set. :

[0068]

[0069] In the formula, This indicates selecting the k parameters with the highest similarity. This refers to a fragment of a medical practice guideline document. This represents a clinical guidelines knowledge base. This represents a query vector constructed using electronic medical record E and diagnosis D, similar to the query vector described above. , This refers to a fragment of a medical practice guideline document. The embedding is represented as a vector. The formula describes the similarity calculation between the query vector and the medical practice guide fragment vector, taking... These are guideline snippets, all sourced from the Clinical Guideline Knowledge Base.

[0070] Furthermore, before reordering the candidate fragments, fine-grained interaction modeling is required based on the token-level representation of the patient's medical records and the candidate fragments.

[0071] Specifically, firstly, patient medical record data and candidate segments are encoded. The patient medical record data is encoded into a sequence matrix medical record representation matrix using a medical language model. ,in, This indicates the number of medical record tokens. For vector dimensions.

[0072] Similarly, each candidate segment is encoded into a sequence matrix segment representation matrix using the same language model. , This represents the total number of tokens for the i-th candidate segment.

[0073] In cross-attention calculation, Each token represents a query, while The tokens, after linear transformation, serve as the Key and Value, respectively, and are used to measure the fine-grained matching relationship between medical records and fragments.

[0074] Furthermore, to characterize the bidirectional semantic relationship between medical records and candidate segments, a scaled dot product similarity matrix is ​​calculated:

[0075] ;

[0076] Where T represents transpose.

[0077] This similarity matrix implicitly contains the interactive attention distribution along both the case-to-segment and segment-to-case directions, representing a bidirectional semantic correspondence. Specifically, softmax normalization is applied to both rows and columns of the similarity matrix to obtain the interactive attention distribution in both directions:

[0078] ;

[0079] ;

[0080] in, This represents the attention distribution of each token in the medical record sequence relative to the candidate segment sequence, used to characterize the matching relationship of medical record information on segment content; This represents the attention distribution of each token in the candidate segment sequence relative to the medical record sequence, used to characterize the matching relationship between segment information and medical record content. The two single-directional attention mechanisms mentioned above together constitute a bidirectional attention mechanism, which can characterize the fine-grained correspondence between medical records and candidate segments in two directions.

[0081] Based on this, a semantic evidence score is calculated to quantify the support strength of candidate fragments for the query. Specifically, for each token in the query sequence, its semantic similarity with all tokens in the candidate fragment is calculated, and the maximum value is taken as the best matching score for that token. Then, the best matching scores of all query tokens are averaged to obtain the overall semantic evidence score of the candidate fragment.

[0082] ;

[0083] In the formula, Indicates the first In the candidate fragment, the first one... The first medical record token and the first Semantic similarity between fragment tokens; Represents the query sequence The total number of tokens included.

[0084] Furthermore, in practical applications, the lengths of candidate segments can vary significantly, easily causing attention to be skewed towards longer texts while ignoring important information in shorter texts. To avoid this problem, a Sinkhorn soft alignment method based on optimal transmission is introduced.

[0085] Specifically, the cost matrix is ​​defined as follows:

[0086] ;

[0087] in, The smaller the value, the more similar the medical record token and the fragment token are.

[0088] Then, solve the entropy-regularized optimal transport problem:

[0089] ;

[0090] in, The marginal distribution of medical records and fragments; This represents the marginal distribution of the query sequence tokens, i.e., the weight of each query token in the matching process. It is usually a probability distribution (each element is non-negative and the sum is 1). Indicates the first The marginal distribution of tokens in each candidate segment is also a probability distribution, representing the weight of each token in the candidate segment. `x` is the regularization parameter, controlling the smoothness of the alignment; `KL` represents the Kullback-Leibler divergence, used to ensure that the solutions are close to each other. This approach allows matching to consider not only local similarity but also the overall probability distribution, resulting in more reasonable matching results. It also makes the optimization problem easier to solve, avoiding overly extreme or inconsistent matching patterns. The Sinkhorn iterative algorithm can efficiently solve for the optimal transfer matrix. The matrix satisfies row and column normalization constraints, meaning that the sum of the matching probabilities of each medical record token and fragment token is 1.

[0091] Based on this definition, coverage score:

[0092] ;

[0093] This score reflects whether the medical record content is sufficiently covered by the fragment, and whether the fragment information can be found in the medical record for interpretation. It establishes a token-level alignment relationship between the medical record and the candidate fragment in two directions. Using this alignment relationship, the strongest match is taken from each direction, and then the average is taken to obtain a scalar used to measure the matching degree of the entire fragment. This scalar is the coverage score.

[0094] In the formula, For each medical record token t, find the fragment token j with the highest matching probability. Then, average the highest matching probabilities for all medical record tokens to reflect the degree to which the medical record content is covered by fragments.

[0095] For each fragment token j, the system finds the fragment token with the highest matching probability among all fragment tokens t, and then averages the highest matching probabilities for all fragment tokens. This reflects the extent to which fragment information can be interpreted in the medical record.

[0096] By averaging the values ​​from these two directions, a scalar coverage score is obtained. This transforms the token matching probability in the optimal transmission matrix into an indicator that measures the overall segment matching strength, thus providing a more intuitive assessment of the semantic matching strength between medical records and candidate segments.

[0097] Furthermore, candidate fragments are usually accompanied by metadata, such as publication time (Time), publishing authority (Auth), and evidence level (EL). After quantifying and normalizing this information, a priori score is obtained.

[0098] ;

[0099] in, The weighting parameter is used to control the contribution ratio of the three elements—evidence level, timeliness, and authority—to the prior score.

[0100] Finally, a linear weighted average is used to fuse semantic similarity, metadata priors, and Sinkhorn coverage scores to obtain the final relevance score:

[0101] ;

[0102] Where α, β, and δ are weighting coefficients, which can be set manually or learned through training.

[0103] Then, normalization is performed to obtain the ranking probability of the candidate segments:

[0104] ;

[0105] Based on this ranking probability, the top n candidate segments are selected as target guide segments.

[0106] This embodiment achieves more granular sorting optimization that meets the requirements of medical scenarios by introducing three improvements: bidirectional collaborative attention, metadata prior factors, and Sinkhorn soft alignment.

[0107] Specifically, bidirectional collaborative attention can simultaneously model the interaction between the "medical record perspective" and the "fragment perspective". That is, it not only focuses on the corresponding position of each information point in the medical record in the candidate fragment, but also ensures that the information points in the candidate fragment can find the corresponding explanation in the medical record, thereby achieving more comprehensive semantic alignment.

[0108] The introduction of metadata prior factors allows the ranking results to not only rely on textual semantic similarity, but also to combine the attributes of the medical guidelines themselves, such as the level of evidence, publication time, and the authority of the publishing institution. This prioritizes the selection of fragments with higher levels of evidence, greater timeliness, and more authoritative sources, thus ensuring the clinical reliability of the results.

[0109] The Sinkhorn soft alignment method addresses the problem of traditional attention mechanisms being biased towards long texts by introducing entropy regularization constraints in optimal transmission. This makes the matching of medical records and fragments more equitable and enables the generation of bidirectional coverage scores, thereby improving the robustness and interpretability of the model.

[0110] By comprehensively considering the above multi-dimensional evidence, this technology can maintain semantic relevance while taking into account the priority and fair coverage of evidence-based medicine, significantly improving the practicality and credibility of search and ranking results in clinical decision support scenarios.

[0111] In S4, preliminary diagnostic results and target guideline fragments are integrated to generate final auxiliary diagnostic and treatment information.

[0112] It should be understood that the fusion method can be selected by those skilled in the art according to the actual situation. For example, rule-based keyword matching fusion, such as extracting the core symptoms in the preliminary diagnosis results and matching them with the corresponding treatment suggestions in the target guide segment; weighted fusion based on semantic similarity, such as integrating information by calculating the similarity of the semantic vectors of the two and assigning different weights; or deep fusion based on pre-trained language models, such as using models such as BERT to encode the two semantic segments and generate a unified diagnosis text, etc. Any method that can combine the two semantic segments can achieve this. This embodiment does not make specific limitations here.

[0113] In terms of medical record data fusion, this specific implementation addresses the shortcomings of existing technologies that determine medical record relevance solely based on time while ignoring content relevance. It innovatively introduces a dual weighting mechanism of time decay and content relevance, dynamically balancing the timeliness of medical records with the relevance to the patient's condition. This solves the problem of unbalanced weight allocation, lays the foundation for constructing accurate query vectors, and breaks through the bottleneck of insufficient capture of personalized medical information.

[0114] In the knowledge base retrieval and filtering process, we abandon the crude mode of simply ranking by semantic similarity. Instead, we combine the optimal transmission algorithm to mine the fine-grained interaction relationship between medical records and guide fragments. At the same time, we integrate metadata prior scores to form a multi-dimensional ranking system, which not only improves the accuracy of retrieval but also fully activates the authoritative resource value of the knowledge base and effectively avoids the risk of model "illusion".

[0115] Overall, a complete chain has been constructed, which integrates accurate medical records, efficiently retrieves guidelines, and integrates authoritative results, achieving closed-loop support from preliminary diagnosis to evidence-based recommendations. This provides a technical paradigm for intelligent assisted diagnosis and treatment systems that balances individualization and authority, and has significant clinical practice value.

[0116] Example 2

[0117] This embodiment provides a medical auxiliary diagnostic system based on temporal and semantic weighting, including:

[0118] The preliminary diagnosis acquisition module is used to construct patient medical record data from preprocessed current and historical medical record information, input it into a pre-trained medical language model, and generate preliminary diagnosis results.

[0119] The query vector construction module is used to calculate the comprehensive weight of the patient medical record data vector sequence through the time decay function and content relevance weight, and fuse it to obtain the medical record fusion vector, which is then concatenated with the preliminary diagnosis result to form the query vector.

[0120] The target guideline filtering module is used to retrieve candidate segments from the clinical guideline knowledge base based on semantic similarity and query vectors. It calculates semantic evidence scores and coverage scores based on patient medical record data and candidate segment tokens, and performs a weighted summation by combining the prior scores of candidate segment metadata to obtain the ranking probability of candidate segments and filter out target guideline segments.

[0121] The auxiliary information generation module is used to integrate preliminary diagnostic results with target guideline fragments to generate final auxiliary diagnostic and treatment information.

[0122] Example 3

[0123] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a time- and semantically weighted medical auxiliary diagnosis method as described in Embodiment 1 above.

[0124] Example 4

[0125] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the time- and semantically weighted medical auxiliary diagnosis method described in Embodiment 1 above.

[0126] The steps or modules involved in Embodiments 2 to 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.

[0127] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A medical auxiliary diagnostic method based on temporal and semantic weighting, characterized in that, include: The preprocessed current and historical medical record information of the patient is used to construct patient medical record data, which is then input into a pre-trained medical language model to generate preliminary diagnostic results. The patient medical record data vector sequence is fused by calculating a comprehensive weight using a time decay function and content relevance weight, and then concatenated with the preliminary diagnosis result to obtain a query vector. Based on semantic similarity, candidate segments are retrieved from the clinical guideline knowledge base based on the query vector. Semantic evidence score and coverage score are calculated based on patient medical record data and candidate segment tokens. The prior scores of the candidate segments' metadata are combined and weighted to obtain the ranking probability of the candidate segments, and the target guideline segments are selected. The calculation of semantic evidence score and coverage score based on patient medical record data and candidate fragment tokens specifically includes: encoding patient medical record data and candidate fragments respectively to obtain a medical record representation matrix and a fragment representation matrix; calculating the scaled dot product similarity between the two to obtain a similarity matrix; constructing a query sequence using each token vector in the medical record representation matrix as a query vector; constructing a key-value sequence using the token vector in the fragment representation matrix as a key-value vector; for each token in the query sequence, calculating its semantic similarity with all tokens in the key-value sequence, taking the maximum value as the best matching score for that token, averaging the best matching scores of all query tokens to obtain the semantic evidence score of the candidate fragment; treating the similarity matrix as a cost matrix, constructing an entropy-regularized optimal transmission model, constraining the matching probability distribution of the query vector and key-value vector to satisfy the edge normalization condition, and solving the optimal transmission matrix using the Sinkhorn iterative algorithm; calculating the coverage score between the query vector and the key-value vector based on the optimal transmission matrix, which reflects the degree to which medical record information is covered by fragments and its semantic matching strength; The step of combining the prior scores of the metadata of candidate segments to obtain the ranking probability of the candidate segments by weighted summation specifically includes: obtaining the metadata information corresponding to each candidate segment, including the authority of the publishing institution, the level of evidence, and the publication time; linearly weighting the metadata information to obtain the prior score of the metadata of the candidate segment; weighted summation of the semantic evidence score, coverage score, and prior score to obtain the comprehensive score of the candidate segment; and normalizing the comprehensive scores of all candidate segments to obtain the ranking probability distribution of the candidate segments. By integrating preliminary diagnostic results with fragments of target guidelines, final auxiliary diagnostic and treatment information is generated.

2. The medical auxiliary diagnostic method based on temporal and semantic weighting as described in claim 1, characterized in that, The patient medical record data includes structured data and unstructured data. The structured data includes demographic information, vital signs, and test and examination results, while the unstructured data includes chief complaint, present illness, past medical history, discharge summary, and outpatient medical record.

3. The medical auxiliary diagnostic method based on temporal and semantic weighting as described in claim 1, characterized in that, The process of calculating a comprehensive weight for the patient medical record data vector sequence using a time decay function and a content relevance weight is as follows: ; ; ; in, As a comprehensive weighting of medical records, λ represents the content relevance weight; λ>0 is a hyperparameter controlling the decay rate. The order of the medical records; Represents a vector of historical medical records Compared with the current medical record vector The semantic similarity is in the range of [0,1]. As a balancing parameter, it is used to adjust the proportion of time factors and content relevance factors in the overall weight; This represents the time decay function value corresponding to the current medical record i. This represents the time decay function value of the medical record corresponding to the temporary parameter j. This represents the relevance weight of the content of the current medical record i. This represents the content relevance weight of the medical record corresponding to the temporary parameter j.

4. The medical auxiliary diagnostic method based on temporal and semantic weighting as described in claim 1, characterized in that, The construction of the clinical guideline knowledge base is specifically as follows: We analyze and break down medical practice guidelines published by authoritative medical institutions into chapters. Extract knowledge fragments related to disease diagnosis, classification, treatment, monitoring, and medication; The knowledge fragments are vectorized to generate feature vectors that reflect their semantics, and then stored in a vector database along with the corresponding metadata to obtain a clinical guideline knowledge base.

5. A medical auxiliary diagnostic method based on temporal and semantic weighting as described in claim 1, characterized in that, The step of retrieving candidate fragments from the clinical guideline knowledge base based on semantic similarity and query vectors specifically includes: Convert knowledge fragments from the clinical guideline knowledge base into fragment vectors; Calculate the semantic similarity between the query vector and each fragment vector using cosine similarity: Select the k segments that meet the preset threshold and rank in the top k to form a candidate segment set. : ; Where τ is a preset threshold, This refers to a fragment of a medical practice guideline document. This represents a clinical guidelines knowledge base. This represents a query vector constructed using electronic medical records (E) and diagnoses (D). This refers to a fragment of a medical practice guideline document. Embedding is represented as a vector; This indicates that the k parameters with the highest similarity are selected.

6. A medical auxiliary diagnostic system based on temporal and semantic weighting, characterized in that, include: The preliminary diagnosis acquisition module is used to construct patient medical record data from preprocessed current and historical medical record information, input it into a pre-trained medical language model, and generate preliminary diagnosis results. The query vector construction module is used to calculate the comprehensive weight of the patient medical record data vector sequence through the time decay function and content relevance weight, and fuse it to obtain the medical record fusion vector, which is then concatenated with the preliminary diagnosis result to form the query vector. The target guideline filtering module is used to retrieve candidate segments from the clinical guideline knowledge base based on semantic similarity and query vectors. It calculates semantic evidence scores and coverage scores based on patient medical record data and candidate segment tokens, and performs a weighted summation by combining the prior scores of candidate segment metadata to obtain the ranking probability of candidate segments and filter out target guideline segments. The calculation of semantic evidence score and coverage score based on patient medical record data and candidate fragment tokens specifically includes: encoding patient medical record data and candidate fragments respectively to obtain a medical record representation matrix and a fragment representation matrix; calculating the scaled dot product similarity between the two to obtain a similarity matrix; constructing a query sequence using each token vector in the medical record representation matrix as a query vector; constructing a key-value sequence using the token vector in the fragment representation matrix as a key-value vector; for each token in the query sequence, calculating its semantic similarity with all tokens in the key-value sequence, taking the maximum value as the best matching score for that token, averaging the best matching scores of all query tokens to obtain the semantic evidence score of the candidate fragment; treating the similarity matrix as a cost matrix, constructing an entropy-regularized optimal transmission model, constraining the matching probability distribution of the query vector and key-value vector to satisfy the edge normalization condition, and solving the optimal transmission matrix using the Sinkhorn iterative algorithm; calculating the coverage score between the query vector and the key-value vector based on the optimal transmission matrix, which reflects the degree to which medical record information is covered by fragments and its semantic matching strength; The step of combining the prior scores of the metadata of candidate segments to obtain the ranking probability of the candidate segments by weighted summation specifically includes: obtaining the metadata information corresponding to each candidate segment, including the authority of the publishing institution, the level of evidence, and the publication time; linearly weighting the metadata information to obtain the prior score of the metadata of the candidate segment; weighted summation of the semantic evidence score, coverage score, and prior score to obtain the comprehensive score of the candidate segment; and normalizing the comprehensive scores of all candidate segments to obtain the ranking probability distribution of the candidate segments. The auxiliary information generation module is used to integrate preliminary diagnostic results with target guideline fragments to generate final auxiliary diagnostic and treatment information.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the medical auxiliary diagnosis method based on temporal and semantic weighting as described in any one of claims 1-5.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the medical auxiliary diagnosis method based on temporal and semantic weighting as described in any one of claims 1-5.

Citation Information

Patent Citations

  • System for assisting disease reasoning and storage medium

    CN114464312A

  • Doctor inquiry auxiliary method and system based on large language model

    CN119361125A