Medical record generation method and related device, electronic equipment and storage medium

By constructing symptom time-series chains and spatial maps through speech recognition and feature extraction, the problem of lack of dynamic information on symptoms in traditional medical record generation is solved, and dynamic information expression of spatiotemporal evolution in medical records is realized.

CN121528409APending Publication Date: 2026-02-13THE FIRST AFFILIATED HOSPITAL OF ANHUI MEDICAL UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511346986.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Traditional medical record generation processes cannot effectively reflect the dynamic information of symptoms, resulting in a lack of spatiotemporal evolution logic in the information listing.

Method used

By using speech recognition to analyze doctor-patient dialogue text, time and space information elements are extracted to construct a symptom evolution time sequence chain and spatial map. Combined with feature extraction, electronic medical record text is generated, and spatiotemporal features are integrated to express the dynamic evolution of the disease.

Benefits of technology

Preserving the spatiotemporal evolution dynamics of symptoms during medical record generation improves the logic and readability of medical records and enhances their ability to express dynamic information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121528409A_ABST
    Figure CN121528409A_ABST
Patent Text Reader

Abstract

The invention discloses a medical record generation method, a related device, electronic equipment and a storage medium, and the method comprises the steps: carrying out the voice recognition based on the doctor-patient conversation voice in an inquiry process, and obtaining a doctor-patient conversation text; performing information extraction based on the doctor-patient dialogue text to obtain a time information element, a medical event corresponding to a time interval and a spatial information element; constructing a symptom evolution time sequence chain based on the time information element and the medical event corresponding to the time interval, and constructing a symptom spatial map based on the spatial information element; performing feature extraction based on the symptom evolution time sequence chain to obtain a first feature, performing feature extraction based on the symptom space map to obtain a second feature, and performing feature extraction based on the doctor-patient dialogue text to obtain a third feature; and generating an electronic medical record text based on a fusion feature of the first feature, the second feature and the third feature. According to the scheme, dynamic information of disease evolution can be reflected in medical record generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart healthcare technology, and in particular to a method for generating medical records and related devices, electronic equipment and storage media. Background Technology

[0002] In modern medical practice, patient history taking is the cornerstone of diagnosis and treatment. Within a limited time, doctors need to quickly and accurately collect key information such as medical history and present illness through communication with patients, while also conducting physical examinations and interpreting images, in order to make final surgical decisions or provide postoperative rehabilitation guidance.

[0003] Traditional medical record generation processes, whether manually written by doctors or using rudimentary voice transcription tools, are essentially static listings of information points, exhibiting a limitation of "seeing the trees but not the forest." Therefore, how to incorporate dynamic information about disease progression into medical record generation has become an urgent problem to be solved. Summary of the Invention

[0004] The main technical problem addressed by this application is to provide a method for generating medical records, as well as related devices, electronic devices, and storage media, which can reflect dynamic information about the evolution of symptoms during the generation of medical records.

[0005] To address the aforementioned technical problems, the first aspect of this application provides a method for generating medical records, comprising: performing speech recognition based on doctor-patient dialogue during a consultation to obtain doctor-patient dialogue text; extracting information from the doctor-patient dialogue text to obtain time information elements, medical events corresponding to time intervals, and spatial information elements; wherein the time information elements include onset time, duration, and change time, and the spatial information elements include anatomical location and migration direction; constructing a symptom evolution time-series chain based on the time information elements and medical events corresponding to time intervals, and constructing a symptom spatial atlas based on the spatial information elements; extracting features based on the symptom evolution time-series chain to obtain a first feature, extracting features based on the symptom spatial atlas to obtain a second feature, and extracting features based on the doctor-patient dialogue text to obtain a third feature; and generating an electronic medical record text based on the fusion of the first, second, and third features.

[0006] To address the aforementioned technical problems, a second aspect of this application provides a medical record generation device, comprising: a speech recognition module, an information extraction module, a data construction module, a feature extraction module, and a text generation module. The speech recognition module is used to perform speech recognition based on doctor-patient dialogue during a consultation process to obtain doctor-patient dialogue text. The information extraction module is used to extract information based on the doctor-patient dialogue text to obtain time information elements, medical events corresponding to time intervals, and spatial information elements. The time information elements include onset time, duration, and change time; the spatial information elements include anatomical location and migration direction. The data construction module is used to construct a symptom evolution time-series chain based on the time information elements and medical events corresponding to time intervals, and to construct a symptom spatial map based on the spatial information elements. The feature extraction module is used to extract features based on the symptom evolution time-series chain to obtain a first feature, extract features based on the symptom spatial map to obtain a second feature, and extract features based on the doctor-patient dialogue text to obtain a third feature. The text generation module is used to generate electronic medical record text based on the fusion features of the first, second, and third features.

[0007] To address the aforementioned technical problems, a third aspect of this application provides an electronic device comprising at least a memory and a processor coupled to each other, wherein the memory stores at least program instructions, and the processor executes the program instructions to implement the medical record generation method of the first aspect.

[0008] To address the aforementioned technical problems, a fourth aspect of this application provides a computer-readable storage medium storing program instructions executable by a processor, the program instructions being used to implement the medical record generation method of the first aspect described above.

[0009] The above scheme performs speech recognition based on the doctor-patient dialogue during the consultation process to obtain the doctor-patient dialogue text. Based on the doctor-patient dialogue text, information is extracted to obtain time information elements, medical events corresponding to time intervals, and spatial information elements. The time information elements include the onset time, duration, and change time, and the spatial information elements include the anatomical location and migration direction. Based on the time information elements and the medical events corresponding to the time intervals, a symptom evolution time sequence chain is constructed, and based on the spatial information elements, a symptom spatial map is constructed. Feature extraction is then performed based on the symptom evolution time sequence chain to obtain the first feature, based on the symptom spatial map to obtain the second feature, and based on the doctor-patient dialogue text to obtain the third feature. Finally, based on the fusion of the first, second, and third features, an electronic medical record text is generated. On the one hand, after extracting temporal information elements and the medical events corresponding to the time intervals, a symptom evolution time-series chain can be constructed to express the evolutionary logic of symptoms in the time dimension. On the other hand, after extracting spatial information elements, a symptom spatial map can be constructed to express the dynamic migration of symptoms in the spatial dimension. Therefore, by combining the fusion features of the first feature extracted from the symptom evolution time-series chain, the second feature extracted from the symptom spatial map, and the third feature extracted from the doctor-patient dialogue text to generate electronic medical record text, the dynamic information of spatiotemporal evolution can be preserved as much as possible during the medical record generation process. Thus, the dynamic information of disease evolution can be reflected in the medical record generation. Attached Figure Description

[0010] Figure 1 This is a flowchart illustrating an embodiment of the medical record generation method of this application; Figure 2 This is a schematic diagram of a process of an embodiment of the medical record generation method of this application; Figure 3 This is a schematic diagram of the framework of an embodiment of the medical record generation device of this application; Figure 4 This is a schematic diagram of the framework of an embodiment of the electronic device of this application; Figure 5 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. Detailed Implementation

[0011] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0012] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.

[0013] In this paper, the terms "system" and "network" are often used interchangeably. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the slash " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this paper indicates two or more objects.

[0014] Please refer to the following: Figure 1 and Figure 2 , Figure 1 This is a flowchart illustrating an embodiment of the medical record generation method of this application. Figure 2 This is a schematic diagram illustrating a process of one embodiment of the medical record generation method of this application. It should be noted that the process steps in this embodiment can be executed by an electronic device with computing capabilities, such as, but not limited to, servers, microcomputers, etc. The specific type of electronic device is not limited here. Specifically, this embodiment may include the following steps: Step S11: Perform speech recognition based on the doctor-patient dialogue during the consultation process to obtain the doctor-patient dialogue text.

[0015] In one implementation scenario, as a possible example of practical application, the outpatient clinic could be a gastrointestinal surgery clinic. This disclosure also uses gastrointestinal surgery as an example for explanation when specific examples are given. However, this does not mean that the process steps in this disclosure are only applicable to gastrointestinal surgery. In practical applications, they can be applied to other outpatient clinics according to actual needs, and other outpatient clinics will not be listed here.

[0016] In one implementation scenario, real-time audio capture of doctor-patient dialogue can be performed to obtain the voice recordings of the consultation process. For example, a high-fidelity microphone array can be used to capture the two-way voice stream between the doctor and patient. Furthermore, to facilitate subsequent speech recognition of the doctor-patient dialogue, signal preprocessing can be performed beforehand. For example, signal preprocessing can include, but is not limited to, noise suppression, echo cancellation, and channel separation, to ensure that the input data for speech recognition is as clear and parsable as possible.

[0017] In one implementation scenario, as a possible approach, a speech recognition model can be used to perform speech recognition on doctor-patient dialogue. For example, the speech recognition model may include, but is not limited to, recurrent neural networks, long short-term memory networks, etc., and the model structure is not limited here. Alternatively, as another possible approach, a large language model can be used to perform speech recognition on doctor-patient dialogue. For example, the large language model may include, but is not limited to, open-source large models such as Llama; or, the large language model may be obtained by fine-tuning an open-source large model based on a specific corpus; or, the large language model may be a custom large model, and the specific source of the large language model is not limited here.

[0018] In one implementation scenario, the doctor-patient dialogue text can specifically be text carrying a timestamp. For example, the doctor-patient dialogue text can be expressed in ways including but not limited to the following: {[Recognized Text 1](Year XX Month XX Day XX Hour XX Minute XX Second), [Recognized Text 2](Year XX Month XX Day XX Hour XX Minute XX Second), [Recognized Text 3](Year XX Month XX Day XX Hour XX Minute XX Second)……}. It should be noted that the above examples are merely one possible way to express the doctor-patient dialogue text in practical applications. Other possible ways to express the doctor-patient dialogue text are not limited here, nor will they be listed one by one.

[0019] In one implementation scenario, after obtaining the doctor-patient dialogue text and before extracting information from it, the doctor-patient dialogue text can be processed by sentence segmentation, punctuation restoration, medical word segmentation, and noise word removal to obtain standardized text input suitable for information extraction.

[0020] In one implementation scenario, before the consultation begins, structured or unstructured data of the current patient can be retrieved from the medical institution's HIS (Hospital Information System), EMR (Electronic Medical Record System), or patient archive. This data includes basic information, past medical history, allergy history, family history, medication history, historical medical records, examination and test reports, etc. (hereinafter, electronic data containing at least one of the above will be referred to as patient archives). This data is used to provide background support and personalization adjustments for subsequent medical record generation. For details, please refer to the relevant descriptions below, which will not be elaborated here.

[0021] Step S12: Extract information based on the doctor-patient dialogue text to obtain time information elements, medical events corresponding to time intervals, and spatial information elements.

[0022] In this embodiment of the disclosure, the time information element includes the onset time, duration, and change time, and the spatial information element includes the anatomical location and migration direction. For example, the onset time may include, but is not limited to, "started at XX hour on XX day," the duration may include, but is not limited to, "pain for XX hours," and the change time may include, but is not limited to, "worsened at XX hour on XX day." Furthermore, the anatomical location may include, but is not limited to, "periumbilical region," "right lower abdomen," etc., and the migration direction may include, but is not limited to, "shifting from the upper abdomen to the right lower abdomen," etc. It should be noted that the above examples are merely a few possible examples of the time and spatial information elements; other possible scenarios are not limited here, nor will they be listed one by one.

[0023] In one implementation scenario, as a possible approach, consistency correction can be performed on different expressions with the same meaning in the doctor-patient dialogue text based on the contextual information of the text. Then, based on the consistency-corrected dialogue text, identification can be performed to obtain a first information element in the time dimension and a second information element in the spatial dimension. Finally, based on the first information element, at least one of relative time parsing or multi-source time alignment can be performed to determine the time information element and the corresponding medical time for the time interval. Then, based on the hierarchical anatomical ontology, the second information element is mapped to a standard anatomical node to obtain the spatial information element. This method, through consistency correction, information element identification, and alignment mapping, can ensure the standardized representation of time and spatial information elements as much as possible while identifying them.

[0024] In a specific implementation scenario, during multi-turn question-and-answer sessions, there may be conflicts or omissions in the timing and context of different statements. In such cases, contextual information and alignment algorithms can be used to automatically integrate them into a unique and reliable version. Furthermore, to facilitate subsequent traceability, version change records can be retained.

[0025] In a specific implementation scenario, relative time parsing refers to converting relative expressions such as "last night" and "today" into specific date and time stamps, which will not be listed here.

[0026] In a specific implementation scenario, multi-source time alignment refers to correcting time expressions by combining information such as surgery date and examination date in the patient's file. For example, based on the patient's file, expressions such as "examination day" and "surgery day" are corrected to examination date and surgery day, respectively. Examples will not be listed here.

[0027] In a specific implementation scenario, after performing relative time parsing and multi-source time alignment, standard time information elements can be obtained. Based on these standard time information elements, the medical event corresponding to the time interval can be determined. It should be noted that the time interval can be calculated by sorting the standard time information elements in sequence and then calculating the difference between adjacent time information elements. Furthermore, medical events can include, but are not limited to, symptoms, surgeries, examinations, etc.

[0028] In a specific implementation scenario, as mentioned above, spatial information elements may include, but are not limited to, the anatomical location involved in the symptoms, the direction of migration, etc.

[0029] In a specific implementation scenario, to further ensure the standardized representation of time and spatial information elements, after obtaining the time and spatial information elements through the aforementioned methods, they can be further transformed into medical terminology. Specifically, a medical knowledge base can be used to transform time and spatial information elements into medical terminology. For example, "stomach ache" can be transformed into "abdominal pain".

[0030] In another implementation scenario, as another possible approach, to achieve standardized and efficient processing of doctor-patient dialogue texts, spatiotemporal information elements can be extracted and standardized and aligned from unstructured texts such as doctor-patient dialogue texts based on Large Language Model (LLM) and Named Entity Recognition (NER) technologies. For example, in this process, colloquial and vague descriptions (such as "stomach ache, from the middle to the right") can be automatically converted into medically compliant terminology (such as "abdominal pain for 24 hours, initially diffuse periumbilical pain, which became fixed and localized to the McBurney's point area in the right lower abdomen after 12 hours"). This improves the professionalism and readability of medical record texts while providing standardized information elements for spatiotemporal modeling.

[0031] Step S13: Based on the time information elements and the medical events corresponding to the time intervals, construct the symptom evolution time sequence chain, and based on the spatial information elements, construct the symptom spatial map.

[0032] In one implementation scenario, after obtaining the time information elements and the medical events corresponding to the time intervals, the medical events at multiple time nodes can be linked together according to causal logic and temporal order, with the time axis as the core, to obtain a symptom evolution time sequence chain. Each time information element corresponds to a different time node to model the temporal progression of the patient's symptoms (e.g., onset, aggravation, relief, etc.). For example, the symptom evolution time sequence chain can specifically include the following: start time, duration interval, medical events at different time intervals (medication, surgery, examination, etc.), influencing factors (eating, changes in body position), symptom changes (aggravation, relief, migration), etc.

[0033] In one implementation scenario, after obtaining spatial information elements, a spatial map representing hierarchical locations (e.g., abdomen—right lower abdomen—McBurney's point) and their adjacency relationships can be acquired. Then, directed edges are formed in the spatial map based on the spatial information elements, creating dynamic component migration trajectories as a symptom spatial map to model the spatial migration of symptoms (e.g., periumbilical—right lower abdomen). Furthermore, as a possible example, each spatial node (i.e., anatomical node) in the symptom spatial map can also store related common diseases (e.g., the "right lower abdomen" node can be associated with appendicitis, ileocecal diseases, etc.) to provide spatial constraints for subsequent reasoning.

[0034] In one implementation scenario, after obtaining the symptom space map, and before extracting features from it, it's possible to first detect whether the symptom space map physically supports transfer. That is, it's possible to detect whether the symptom space map contains physically impossible transfer paths (e.g., "left upper abdomen—right lower leg," etc.). Based on this, if the symptom space map physically does not support transfer, it can be marked as abnormal, and a notification message can be output during the consultation to remind the doctor of the abnormality, along with obtaining a corrected symptom space map (e.g., based on the doctor's modification instructions). Based on this, feature extraction can continue based on the corrected symptom space map to obtain a second feature. Alternatively, if the symptom space map physically supports transfer, feature extraction can be performed directly based on it to obtain the second feature. It should be noted that the process of extracting the second feature can be found in the following description of feature extraction based on the symptom space map, and will not be elaborated here. The above method detects whether the symptom space map is physically transferable. In response to the symptom space map being physically transferable, it marks the symptom space map as abnormal and outputs a prompt message to remind the doctor of the abnormality during the consultation process. It also obtains the corrected symptom space map and performs feature extraction based on the corrected symptom space map to obtain the second feature. Therefore, it can ensure as much as possible that the symptom space map used for subsequent feature extraction is physically transferable, which helps to extract the feature information representing the evolution of the symptom space as accurately as possible.

[0035] Step S14: Extract features based on the symptom evolution time sequence chain to obtain the first feature, extract features based on the symptom spatial map to obtain the second feature, and extract features based on the doctor-patient dialogue text to obtain the third feature.

[0036] In one implementation scenario, after obtaining the symptom evolution time-series chain, feature extraction can be performed to obtain the first feature. Specifically, time-series modeling can be performed based on the symptom evolution time-series chain to obtain the hidden state features of each time node in the symptom evolution time-series chain. Each time node is then selected as the first node. Based on the hidden state features of any given time node and the hidden state features of the first node, the first weight of the corresponding time node relative to the first node can be obtained. Then, the hidden state features of each time node can be weighted according to the first weight of each time node relative to the first node to obtain the weighted state features of the first node. Thus, the first feature is obtained based on the weighted state features of each time node. In this method, each time node references its own first weight to weight its hidden state features. Finally, the weighted state features of each time node are combined to characterize the first feature of the symptom evolution time-series chain, which can reflect the characteristic information of the symptom time-series evolution.

[0037] In a specific implementation scenario, a temporal modeling network such as GRU (Gated Recurrent Unit) can be used to model the symptom evolution time series chain, obtaining the hidden state features of each time node in the symptom evolution time series chain. For ease of description, taking the t-th time node in the symptom evolution time series chain as an example, its medical event vector can be represented as x. t The hidden state feature of its previous time node t-1 can be denoted as h. t-1 Then, at time node t, the reset gate vector r of the medical event t It can be represented as:

[0038] In the above formula, W r This represents the weight parameter matrix, || represents the concatenation operation, and b r Let z represent the bias parameter vector, and σ represent the sigmoid activation function. Additionally, the gate vector z is updated at time t. t It can be represented as:

[0039] In the above formula, W z This represents the weight parameter matrix, || represents the concatenation operation, and b z Let represent the bias parameter vector, and σ represent the sigmoid activation function. Based on this, the candidate hidden state features at time point t can be obtained:

[0040] In the above formula, Let W represent the candidate hidden state features at time node t, tanh represent the hyperbolic tangent activation function, and W represent the hidden state features at time node t. h This represents the weight parameter matrix, || represents the concatenation operation, and b n This represents the bias parameter vector. Based on this, the hidden state features h from the previous time point t-1 can be combined. t-1 Update the hidden state feature h of time node t. t :

[0041] In the above formula, This indicates element-wise multiplication. It should be noted that, although the aforementioned W... r W z W h Each of these represents a weight parameter matrix, but their specific values ​​are not necessarily the same; they are obtained through optimization and adjustment based on actual training. Similarly, although b r b z b n Each of these represents a bias parameter vector, but their specific values ​​are not necessarily the same; they are obtained through optimization and adjustment based on actual training. Furthermore, the training process can be found in the relevant descriptions below, which will not be elaborated upon here.

[0042] In a specific implementation scenario, after obtaining the hidden state features of each time node through temporal modeling, the relative first weights of any two time nodes can be obtained. For ease of understanding, taking the i-th time node as the first node as an example, for the j-th time node, the attention score can be calculated first based on the hidden state features of both nodes: e ij =f(h i ,h j ) In the above formula, f can represent the multilayer perceptron function. Based on this, the attention scores between each time point and the first node can be normalized to obtain the first weight α of the j-th node relative to the j-th node. ij :

[0043] In the above formula, the denominator represents the summation of the attention scores between each time point and the i-th time point, with the natural constant e as the base and each score as a power of the power. The numerator represents the summation of the attention scores between the j-th and i-th time points, with the natural constant e as the base and each score as a power of the power. The superscript T indicates the total number of time points. Based on this, the hidden state features of each time point can be weighted according to the first weight of each time point relative to the i-th time point to obtain the weighted state feature c of the first time point.i :

[0044] In the above formula, the upper limit T of the summation symbol represents the total number of time nodes in the symptom evolution time sequence chain.

[0045] In a specific implementation scenario, after obtaining the weighted state features at each time point, the weighted state features at each time point can be fused through summation, averaging, or other operations to obtain the first feature of the symptom evolution time-series chain. Taking summation as an example of fusion operation, the first feature V of the symptom evolution time-series chain... T It can be represented as:

[0046] In the above formula, the upper limit T of the summation symbol represents the total number of time nodes in the symptom evolution timeline, c i This represents the weighted state feature at the i-th time point.

[0047] In a specific implementation scenario, as mentioned earlier, the first feature can be obtained by a first feature extraction model, which includes a temporal modeling network such as GRU, extracting features from the symptom evolution time-series chain. Before using the first feature extraction model for feature extraction, the first feature extraction model can be trained and optimized. Specifically, referring to the aforementioned description of obtaining the symptom evolution time-series chain, a sample symptom evolution time-series chain can be obtained, and the sample symptom evolution time-series chain can be labeled with a reference diagnosis category. Based on this, the first feature extraction model can extract features from the sample symptom evolution time-series chain to obtain the first sample feature (the specific process can be referred to the aforementioned first feature extraction process, which will not be repeated here). Then, based on the first sample feature, a prediction is made to obtain the predicted diagnosis category. In this way, the difference between the reference diagnosis category and the predicted diagnosis category can be measured based on a loss function such as cross-entropy, resulting in the first training loss. Furthermore, the network parameters of the first feature extraction model can be adjusted based on the first training loss.

[0048] In one implementation scenario, after obtaining the symptom space map, features can be extracted to obtain the second feature. Specifically, feature initialization can be performed based on the symptom space map to obtain the initial node features of each spatial node in the symptom space map. Then, each spatial node is selected as the second node, and each neighborhood node of the second node is selected as the reference node. Based on the first score predicted by the concatenated features of the initial node features of the reference node and the initial node features of the second node, and the second score predicted by the concatenated features of the initial node features of each neighborhood node and the initial node features of the second node, a second weight of the reference node relative to the second node can be obtained. Then, based on the second weight of each neighborhood node relative to the second node, the initial node features of each neighborhood node can be weighted to obtain the weighted node features of the second node. In this way, the second feature can be obtained based on the weighted node features of each spatial node. In the above method, for any spatial node, the weighted node features of the spatial node are obtained by weighting the second weight of its neighboring nodes relative to this spatial node and the initial node features of the neighboring nodes. This allows the feature information of each neighboring node to be aggregated, and then combined with the weighted node features of each spatial node to obtain the second feature. This helps to reflect the feature information of the spatial evolution of symptoms through the second feature.

[0049] In a specific implementation scenario, the initial node features can be represented by an M-dimensional multi-hot vector. For example, for M types of department-related diseases, if a spatial node contains a corresponding disease, the value of the corresponding dimension can be set to 1; otherwise, it can be set to 0. For ease of description, the initial node features of the i-th spatial node can be denoted as... In other words, the initial node features can be represented as an M-dimensional vector. It should be noted that the above example is only one possible way to obtain the initial node features in practical applications. Other possible methods are not limited here, nor will they be listed one by one.

[0050] In a specific implementation scenario, the above weighting process can be iterated multiple times. In each iteration, the weighted node features of the second node can be used as the new initial node features of the second node. For ease of understanding, taking the Lth iteration as an example, if the i-th spatial node is chosen as the second node, the set of all neighboring nodes of the second node can be denoted as N. i The initial node features of the i-th spatial node during L iterations can be denoted as: The set of its neighboring nodes N i The initial node features of the j-th neighboring node in the Lth iteration can be denoted as: It should be noted that when L is 0, the initial node features can be initialized using the aforementioned M-dimensional multi-hot vector; when L is 1, the initial node features can be the weighted node features obtained after the first weighting, and so on for other cases, which will not be listed here. Based on this, the second weight of the reference node (i.e., the j-th spatial node mentioned above) relative to the second node (i.e., the i-th spatial node mentioned above) is... It can be represented as:

[0051] In the above formula, LeakyReLU represents the leakage linear rectified function, and 'a' represents the weight vector. Let W represent the transpose of the weight vector, || represent the concatenation operation, and S represent the total number of spatial nodes. Furthermore, in the above formula, the numerator represents the first score mentioned above, and the denominator represents the second score mentioned above. After obtaining the second weight, a weighting operation can be performed accordingly. For ease of description, let's take the i-th spatial node as the second node as an example. The weighted node features of the second node... It can be represented as:

[0052] In the above formula, W represents the weight matrix. Let represent the initial node features of the j-th neighboring node in the set during the L-th iteration, and σ represent the sogmoid activation function. Furthermore, as a possible example, in practical applications, to avoid excessive smoothing due to too many iterations, which could lead to a lack of discriminative power in the spatial node features, the total number of iterations can be set to 2.

[0053] In a specific implementation scenario, after obtaining the final weighted node features of each spatial node, the final weighted node features of each spatial node can be fused through addition, weighting, and other operations to obtain the second feature. For ease of description, taking a total number of iterations of 2 as an example, the weighted node features obtained through the aforementioned formula can be... The second feature V of the symptom spatial map was obtained. s .

[0054] In a specific implementation scenario, to improve the extraction efficiency of the second feature, the second feature can be obtained by extracting features from the symptom space map using a second feature extraction model that includes a graph attention network. Before using the second feature extraction model for feature extraction, the model can be trained and optimized. Specifically, referring to the aforementioned description of obtaining the symptom space map, a sample symptom space map can be obtained, and the sample symptom space map can be labeled with a reference diagnosis category. Based on this, the second feature extraction model can extract features from the sample symptom space map to obtain the second sample features (the specific process can be referred to the aforementioned second feature extraction process, which will not be repeated here). Then, based on the second sample features, a prediction is made to obtain the predicted diagnosis category. In this way, the difference between the reference diagnosis category and the predicted diagnosis category can be measured based on a loss function such as cross-entropy, resulting in a second training loss. The network parameters of the second feature extraction model can then be adjusted based on the second training loss.

[0055] In one implementation scenario, the doctor-patient dialogue text can be feature-extracted using a semantic feature extraction model, such as one incorporating a Transformer, to obtain a third feature. As a possible example, as mentioned earlier, patient records can serve as supporting evidence; therefore, the doctor-patient dialogue text and patient records can be used together by a semantic feature extraction model to obtain the third feature. For ease of description, the third feature can be denoted as V. P .

[0056] Step S15: Generate the electronic medical record text based on the fusion features of the first feature, the second feature, and the third feature.

[0057] In one implementation scenario, as a possible example, after obtaining the first feature, the second feature, and the third feature, the three can be directly summed, averaged, or otherwise merged to obtain the merged feature.

[0058] In another implementation scenario, differing from the aforementioned implementation, as another possible example, after obtaining the first feature, second feature, and third feature, a first factor of the first feature can be obtained based on the cosine similarity between the first feature and the third feature, and a second factor of the second feature can be obtained based on the cosine similarity between the second feature and the third feature. Based on this, a fused feature can be obtained by summing the weighted features of the first feature by the first factor, the weighted features of the second feature by the second factor, and the third feature. For ease of description, as mentioned above, the first feature can be denoted as V. T The second feature is denoted as V. S The third feature is denoted as V. P Then the first factor α of the first characteristic TP It can be represented as:

[0059] In the above formula, <> represents the vector dot product, and ||.||2 represents the 2-norm of the vector. Similarly, the second factor of the second feature can be calculated, which can be denoted as α for ease of description. SP Based on this, the fusion characteristics can be obtained:

[0060] In the above formula, V F This represents the fusion feature. The above method uses the cosine similarity between the first feature, the second feature, and the third feature to obtain the first factor of the first feature and the second factor of the second feature. Based on this, the first and second features are weighted and then summed with the third feature to obtain the fusion feature. This fully emphasizes the information closely related to doctor-patient dialogue in the temporal evolution of symptoms and the spatial evolution of symptoms, helping to highlight the dynamic migration of symptom temporal and spatial evolution in the generated medical records.

[0061] In one implementation scenario, after obtaining the fused features, content can be generated based on these features to obtain the electronic medical record text. For example, content generation based on the fused features can be performed using neural network models such as large language models and Transformer-based decoders to obtain the electronic medical record text. For details on the technical details of network structures such as large language models and Transformer-based decoders, please refer to the relevant documentation; these details will not be elaborated upon here.

[0062] In one implementation scenario, after obtaining the fused features, various candidate diseases can be predicted based on these features. These candidate diseases are then retrieved from a disease knowledge base to obtain their knowledge text. Finally, the confidence level of each candidate disease is analyzed based on the electronic medical record text and the knowledge text of each candidate disease. It should be noted that the method for retrieving the knowledge text can be found in the technical details of Retrieval Augmented Generation (RAG), which will not be elaborated here. This approach, by predicting candidate diseases through fused features and combining them with a disease knowledge base for retrieval, and then analyzing the confidence level of candidate diseases by combining their knowledge text and electronic medical record text, helps drive intelligent optimization of medical record content.

[0063] In a specific implementation scenario, a disease prediction network containing layers such as fully connected layers and softmax can be used to predict fused features and obtain various candidate diseases that may be present. For example, taking a gastrointestinal surgery clinic as an example, several preset diseases can be pre-set. Based on the aforementioned disease prediction network, the fused features can be predicted to obtain the probability value of each preset disease. If the probability value of having a preset disease is higher than a probability threshold (or not lower than the probability threshold), then the preset disease can be selected as a candidate disease that may be present.

[0064] In a specific implementation scenario, taking a gastrointestinal surgery outpatient clinic as an example, as mentioned earlier, several preset diseases for the gastrointestinal surgery outpatient clinic can be pre-set. The disease knowledge base can then contain knowledge texts of various preset diseases (such as knowledge texts of preset diseases that can be extracted from relevant medical guidelines, academic journals, etc.). Based on this, for each candidate disease, knowledge texts related to the candidate disease can be extracted from the disease knowledge base.

[0065] In a specific implementation scenario, for each candidate disease, the knowledge text of the candidate disease can be compared and analyzed with the electronic medical record text. If there are conflicts between the knowledge text of the candidate disease and the electronic medical record text, the confidence level of the candidate disease can be reduced (the initial value of the confidence level can be set to the aforementioned probability value, or it can be set to other values ​​that are positively correlated with the aforementioned probability value). The more and more serious the conflicts between the knowledge text of the candidate disease and the electronic medical record text, the greater the reduction in the confidence level of the candidate disease can be. Conversely, if there are no conflicts between the knowledge text of the candidate disease and the electronic medical record text, the confidence level of the candidate disease can be maintained.

[0066] In a specific implementation scenario, after obtaining the confidence levels of each candidate disease, they can be sorted in descending order of confidence. Furthermore, as a possible implementation example, the electronic medical record text can be updated and optimized based on the sorted candidate diseases. Alternatively, as another possible implementation example, the electronic medical record text, candidate diseases, and knowledge base rules (e.g., "3 days post-surgery + fever + right lower quadrant tenderness" indicates a high risk of anastomotic leakage) can be combined to obtain a risk rating and treatment plan recommendations, which can then be further updated in the electronic medical record text.

[0067] In a specific implementation scenario, the aforementioned electronic medical record text and candidate diseases can be predicted by the relevant network model (see the aforementioned relevant description for details) based on the fusion features. Therefore, model training can be performed before application. For example, the mean squared error loss between the fusion features of the generation task and the answer text features, as well as the multi-class cross-entropy loss of the diagnostic prediction, can be jointly optimized by multiple tasks to complete model training.

[0068] In an implementation scenario, such as Figure 2 As shown, as one possible implementation example, after obtaining the optimized electronic medical record text, template constraints, terminology dictionaries, and logical rules can be used to limit the scope and format of the content generated by the large model, in order to ensure medical standardization as much as possible. As another possible implementation example, after obtaining the optimized electronic medical record text, terminology consistency checks can be performed to ensure that the same entity is consistently expressed throughout the text (e.g., "ileocecal region" should not be used interchangeably with "cecum"). As yet another possible implementation example, after obtaining the optimized electronic medical record text, logical consistency checks can be performed. Specifically, this can be done by combining the attention parameter weights during the calculation of temporal features (such as the first feature mentioned above), spatial features (such as the second feature mentioned above), and the attention parameter values ​​between features during feature fusion, to automatically check the internal logic of the medical record (temporal evolution chains, spatial structural relationships, etc., that have a significant impact on the generated content). As another possible implementation example, after obtaining the optimized electronic medical record text, hallucination risk warnings can be provided. Specifically, the generated content can be traced back to its source. For medical record content that cannot be effectively traced back to the speech-to-text, past records, temporal structure, and spatial structure, hallucination risk warnings can be provided, allowing doctors to modify the data or the model to regenerate it. As yet another possible implementation example, after obtaining the electronic medical record text, interpretability annotations can be applied. Specifically, source tags (e.g., "inference from dialogue + knowledge base matching") can be added to conclusions derived from reasoning in the medical record, increasing doctors' trust in the automatically generated results.

[0069] The above scheme performs speech recognition based on the doctor-patient dialogue during the consultation process to obtain the doctor-patient dialogue text. Based on the doctor-patient dialogue text, information is extracted to obtain time information elements, medical events corresponding to time intervals, and spatial information elements. The time information elements include the onset time, duration, and change time, and the spatial information elements include the anatomical location and migration direction. Based on the time information elements and the medical events corresponding to the time intervals, a symptom evolution time sequence chain is constructed, and based on the spatial information elements, a symptom spatial map is constructed. Feature extraction is then performed based on the symptom evolution time sequence chain to obtain the first feature, based on the symptom spatial map to obtain the second feature, and based on the doctor-patient dialogue text to obtain the third feature. Finally, based on the fusion of the first, second, and third features, an electronic medical record text is generated. On the one hand, after extracting temporal information elements and the medical events corresponding to the time intervals, a symptom evolution time-series chain can be constructed to express the evolutionary logic of symptoms in the time dimension. On the other hand, after extracting spatial information elements, a symptom spatial map can be constructed to express the dynamic migration of symptoms in the spatial dimension. Therefore, by combining the fusion features of the first feature extracted from the symptom evolution time-series chain, the second feature extracted from the symptom spatial map, and the third feature extracted from the doctor-patient dialogue text to generate electronic medical record text, the dynamic information of spatiotemporal evolution can be preserved as much as possible during the medical record generation process. Thus, the dynamic information of disease evolution can be reflected in the medical record generation.

[0070] Please see Figure 3 , Figure 3 This is a schematic diagram of a framework of an embodiment of the medical record generation device of this application. The medical record generation device 30 includes: a speech recognition module 31, an information extraction module 32, a data construction module 33, a feature extraction module 34, and a text generation module 35. The speech recognition module 31 performs speech recognition based on the doctor-patient dialogue during the consultation process to obtain the doctor-patient dialogue text. The information extraction module 32 extracts information from the doctor-patient dialogue text to obtain time information elements, medical events corresponding to time intervals, and spatial information elements. The time information elements include onset time, duration, and change time; the spatial information elements include anatomical location and migration direction. The data construction module 33 constructs a symptom evolution time-series chain based on the time information elements and medical events corresponding to time intervals, and constructs a symptom spatial map based on the spatial information elements. The feature extraction module 34 extracts features based on the symptom evolution time-series chain to obtain a first feature, extracts features based on the symptom spatial map to obtain a second feature, and extracts features based on the doctor-patient dialogue text to obtain a third feature. The text generation module 35 generates electronic medical record text based on the fusion of the first, second, and third features.

[0071] In the above scheme, the medical record generation device 30 performs speech recognition based on the doctor-patient dialogue during the consultation process to obtain the doctor-patient dialogue text. Based on the doctor-patient dialogue text, information is extracted to obtain time information elements, medical events corresponding to time intervals, and spatial information elements. The time information elements include the onset time, duration, and change time, and the spatial information elements include the anatomical location and migration direction. Based on the time information elements and the medical events corresponding to the time intervals, a symptom evolution time sequence chain is constructed, and based on the spatial information elements, a symptom spatial map is constructed. Feature extraction is then performed based on the symptom evolution time sequence chain to obtain the first feature, and feature extraction is performed based on the symptom spatial map to obtain the second feature. Feature extraction is also performed based on the doctor-patient dialogue text to obtain the third feature. Finally, based on the fusion of the first, second, and third features, an electronic medical record text is generated. On the one hand, after extracting temporal information elements and the medical events corresponding to the time intervals, a symptom evolution time-series chain can be constructed to express the evolutionary logic of symptoms in the time dimension. On the other hand, after extracting spatial information elements, a symptom spatial map can be constructed to express the dynamic migration of symptoms in the spatial dimension. Therefore, by combining the fusion features of the first feature extracted from the symptom evolution time-series chain, the second feature extracted from the symptom spatial map, and the third feature extracted from the doctor-patient dialogue text to generate electronic medical record text, the dynamic information of spatiotemporal evolution can be preserved as much as possible during the medical record generation process. Thus, the dynamic information of disease evolution can be reflected in the medical record generation.

[0072] In some disclosed embodiments, the information extraction module 32 includes a correction submodule, used to perform consistency correction on different expressions with the same meaning in the doctor-patient dialogue text based on the context information of the doctor-patient dialogue text; the information extraction module 32 includes an identification submodule, used to identify the doctor-patient dialogue text after consistency correction to obtain a first information element in the time dimension and a second information element in the spatial dimension; the information extraction module 32 includes a determination submodule, used to determine the obtained time information element and the medical event corresponding to the time interval based on at least one of relative time parsing and multi-source time alignment based on the first information element; the information extraction module 32 includes a mapping submodule, used to map the second information element to standard anatomical nodes based on the hierarchical anatomical ontology to obtain the spatial information element.

[0073] In some publicly disclosed embodiments, the data construction module 33 includes a time-series submodule, which is used to connect medical events at multiple time nodes in a timeline according to causal logic and time sequence to obtain a symptom evolution time-series chain; wherein each time information element corresponds to a different time node.

[0074] In some disclosed embodiments, the data construction module 33 includes a spatial submodule for acquiring a spatial map of locations representing hierarchical locations and their adjacency relationships; and forming directed edges in the spatial map of locations based on spatial information elements to form a dynamic spatial migration trajectory as a symptom spatial map.

[0075] In some disclosed embodiments, the feature extraction module 34 includes a temporal modeling submodule, used to perform temporal modeling based on the symptom evolution temporal chain to obtain the hidden state features of each time node in the symptom evolution temporal chain; the feature extraction module 34 includes a first selection submodule, used to select each time node as a first node; the feature extraction module 34 includes a first weighting submodule, used to obtain a first weight of the corresponding time node relative to the first node based on the hidden state features of any time node and the hidden state features of the first node; the feature extraction module 34 includes a first weighting submodule, used to weight the hidden state features of each time node based on the first weight of each time node relative to the first node to obtain the weighted state features of the first node; the feature extraction module 34 includes a first acquisition submodule, used to obtain a first feature based on the weighted state features of each time node.

[0076] In some disclosed embodiments, the feature extraction module 34 includes a feature initialization submodule, used to initialize features based on the symptom space map to obtain initial node features of each spatial node in the symptom space map; the feature extraction module 34 includes a second selection submodule, used to select each spatial node as a second node and select each neighboring node of the second node as a reference node; the feature extraction module 34 includes a second weighting submodule, used to compare the first score predicted by the concatenation feature of the initial node features of the reference node and the initial node features of the second node with the sum of the second scores predicted by the concatenation feature of the initial node features of each neighboring node and the initial node features of the second node to obtain a second weight of the reference node relative to the second node; the feature extraction module 34 includes a second weighting submodule, used to weight the initial node features of each neighboring node based on the second weight of each neighboring node relative to the second node to obtain weighted node features of the second node; the feature extraction module 34 includes a second acquisition submodule, used to obtain the second feature based on the weighted node features of each spatial node.

[0077] In some disclosed embodiments, the medical record generation device 30 includes a migration detection module for detecting whether the symptom space map physically supports migration; the medical record generation device 30 includes a marking and prompting module for marking the symptom space map as abnormal in response to the symptom space map not physically supporting migration, and outputting a prompting message to remind the doctor of the abnormality during the consultation process, as well as obtaining the corrected symptom space map; the feature extraction module 34 is specifically used to perform feature extraction based on the corrected symptom space map to obtain a second feature.

[0078] In some disclosed embodiments, the medical record generation device 30 includes a disease prediction module for predicting various candidate diseases that the patient may have based on fusion features; the medical record generation device 30 includes a knowledge detection module for retrieving candidate diseases based on a disease knowledge base to obtain knowledge text of the candidate diseases; and the medical record generation device 30 includes a confidence measurement module for analyzing and obtaining the confidence level of each candidate disease based on the electronic medical record text and the knowledge text of each candidate disease.

[0079] In some disclosed embodiments, the text generation module 35 includes a factor measurement submodule, used to obtain a first factor of the first feature based on the cosine similarity between the first feature and the third feature, and to obtain a second factor of the second feature based on the cosine similarity between the second feature and the third feature; the text generation module 35 includes a feature summation submodule, used to obtain a fused feature based on the sum of the weighted features of the first feature by the first factor, the weighted features of the second feature by the second factor, and the third feature.

[0080] Please see Figure 4 , Figure 4 This is a schematic diagram of a framework of an embodiment of the electronic device of this application. The electronic device 40 includes at least a memory 41 and a processor 42 coupled to each other. The memory 41 stores at least program instructions, and the processor 42 is used to execute the program instructions to implement the steps in any of the above-described embodiments of the medical record generation method. For details, please refer to the foregoing disclosed embodiments, which will not be repeated here. The electronic device 40 may include, but is not limited to, servers, microcomputers, etc., and the specific type of the electronic device 40 is not limited here.

[0081] Specifically, processor 42 controls itself and memory 41 to implement the steps in any of the above-described embodiments of the medical record generation method. Processor 42 can also be referred to as a CPU (Central Processing Unit). Processor 42 may be an integrated circuit chip with signal processing capabilities. Processor 42 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 42 can be implemented using integrated circuit chips.

[0082] In the above scheme, the electronic device 40 performs speech recognition based on the doctor-patient dialogue during the consultation process to obtain the doctor-patient dialogue text. Based on the doctor-patient dialogue text, information is extracted to obtain time information elements, medical events corresponding to time intervals, and spatial information elements. The time information elements include the onset time, duration, and change time, and the spatial information elements include the anatomical location and migration direction. Based on the time information elements and the medical events corresponding to the time intervals, a symptom evolution time sequence chain is constructed, and based on the spatial information elements, a symptom spatial map is constructed. Feature extraction is then performed based on the symptom evolution time sequence chain to obtain the first feature, and feature extraction is performed based on the symptom spatial map to obtain the second feature. Feature extraction is also performed based on the doctor-patient dialogue text to obtain the third feature. Finally, based on the fusion of the first, second, and third features, an electronic medical record text is generated. On the one hand, after extracting temporal information elements and the medical events corresponding to the time intervals, a symptom evolution time-series chain can be constructed to express the evolutionary logic of symptoms in the time dimension. On the other hand, after extracting spatial information elements, a symptom spatial map can be constructed to express the dynamic migration of symptoms in the spatial dimension. Therefore, by combining the fusion features of the first feature extracted from the symptom evolution time-series chain, the second feature extracted from the symptom spatial map, and the third feature extracted from the doctor-patient dialogue text to generate electronic medical record text, the dynamic information of spatiotemporal evolution can be preserved as much as possible during the medical record generation process. Thus, the dynamic information of disease evolution can be reflected in the medical record generation.

[0083] Please see Figure 5 , Figure 5This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. The computer-readable storage medium 50 stores program instructions 51 that can be executed by a processor. The program instructions 51 are used to implement the steps in any of the above embodiments of the medical record generation method.

[0084] In the above scheme, the computer-readable storage medium 50 performs speech recognition based on the doctor-patient dialogue during the consultation process to obtain the doctor-patient dialogue text. Based on the doctor-patient dialogue text, information is extracted to obtain time information elements, medical events corresponding to time intervals, and spatial information elements. The time information elements include the onset time, duration, and change time, and the spatial information elements include the anatomical location and migration direction. Based on the time information elements and the medical events corresponding to the time intervals, a symptom evolution time sequence chain is constructed, and based on the spatial information elements, a symptom spatial map is constructed. Feature extraction is then performed based on the symptom evolution time sequence chain to obtain the first feature, and feature extraction is performed based on the symptom spatial map to obtain the second feature. Feature extraction is also performed based on the doctor-patient dialogue text to obtain the third feature. Finally, based on the fusion of the first, second, and third features, an electronic medical record text is generated. On the one hand, after extracting temporal information elements and the medical events corresponding to the time intervals, a symptom evolution time-series chain can be constructed to express the evolutionary logic of symptoms in the time dimension. On the other hand, after extracting spatial information elements, a symptom spatial map can be constructed to express the dynamic migration of symptoms in the spatial dimension. Therefore, by combining the fusion features of the first feature extracted from the symptom evolution time-series chain, the second feature extracted from the symptom spatial map, and the third feature extracted from the doctor-patient dialogue text to generate electronic medical record text, the dynamic information of spatiotemporal evolution can be preserved as much as possible during the medical record generation process. Thus, the dynamic information of disease evolution can be reflected in the medical record generation.

[0085] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0086] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0087] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0088] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0089] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0090] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0091] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.

Claims

1. A method for generating medical records, characterized in that, include: Speech recognition is performed on the doctor-patient dialogue during the consultation process to obtain the doctor-patient dialogue text. Information is extracted from the doctor-patient dialogue text to obtain time information elements, medical events corresponding to time intervals, and spatial information elements; wherein, the time information elements include onset time, duration, and change time, and the spatial information elements include anatomical location and migration direction; Based on the time information elements and the medical events corresponding to the time intervals, a symptom evolution time sequence chain is constructed, and based on the spatial information elements, a symptom spatial map is constructed. Feature extraction is performed based on the symptom evolution time sequence chain to obtain the first feature, feature extraction is performed based on the symptom spatial atlas to obtain the second feature, and feature extraction is performed based on the doctor-patient dialogue text to obtain the third feature; Based on the fusion features of the first feature, the second feature, and the third feature, an electronic medical record text is generated.

2. The method according to claim 1, characterized in that, The process of extracting information from the doctor-patient dialogue text to obtain time information elements, medical events corresponding to time intervals, and spatial information elements includes: Based on the contextual information of the doctor-patient dialogue text, consistency correction is performed on different expressions with the same meaning in the doctor-patient dialogue text; Based on the doctor-patient dialogue text after the consistency correction is performed, the first information element in the time dimension and the second information element in the spatial dimension are obtained; Based on the first information element, at least one of relative time parsing and multi-source time alignment is performed to determine the time information element and the medical event corresponding to the time interval. Based on the hierarchical anatomical ontology, the second information element is mapped to the standard anatomical node to obtain the spatial information element.

3. The method according to claim 1, characterized in that, The symptom evolution time-series chain is constructed based on the medical events corresponding to the time information elements and the time intervals, including: Using a timeline as the core, medical events at multiple time points are linked together according to causal logic and chronological order to obtain the symptom evolution time sequence chain; wherein, each of the time information elements corresponds to a different time point.

4. The method according to claim 1, characterized in that, The process of constructing a symptom spatial atlas based on the spatial information elements includes: Obtain a spatial map of the hierarchical regions and their adjacency relationships; Based on the spatial information elements, directed edges are formed in the spatial map of the affected area, forming a dynamic spatial migration trajectory as the symptom spatial map.

5. The method according to claim 1, characterized in that, The feature extraction based on the symptom evolution time-series chain yields the first feature, including: Temporal modeling is performed based on the symptom evolution time series chain to obtain the hidden state features of each time node in the symptom evolution time series chain; Each of the aforementioned time points is selected as the first node; Based on the hidden state features of any of the time nodes and the hidden state features of the first node, a first weight of the corresponding time node relative to the first node is obtained. The hidden state features of each time node are weighted according to the first weight of each time node relative to the first node to obtain the weighted state features of the first node. The first feature is obtained based on the weighted state features of each of the aforementioned time nodes.

6. The method according to claim 1, characterized in that, The feature extraction based on the symptom spatial atlas to obtain the second feature includes: Based on the symptom space map, feature initialization is performed to obtain the initial node features of each spatial node in the symptom space map; Each of the aforementioned spatial nodes is selected as a second node, and each of the neighboring nodes of the second node is selected as a reference node. The second weight of the reference node relative to the second node is obtained by comparing the first score predicted by the concatenation feature of the initial node features of the reference node and the initial node features of the second node, and the second score predicted by the concatenation feature of the initial node features of each of the neighboring nodes and the initial node features of the second node. The initial node features of each of the neighboring nodes are weighted according to the second weight of each neighboring node relative to the second node to obtain the weighted node features of the second node. The second feature is obtained based on the weighted node features of each of the spatial nodes.

7. The method according to claim 1, characterized in that, After constructing the symptom spatial map based on the spatial information elements, and before performing feature extraction based on the symptom spatial map to obtain the second feature, the method further includes: Detect whether the symptom spatial map physically supports migration; In response to the fact that the symptom space map does not physically support migration, the symptom space map is marked as abnormal, and a prompt message is output during the consultation to remind the doctor of the abnormality, and the corrected symptom space map is obtained; The feature extraction based on the symptom spatial atlas to obtain the second feature includes: The second feature is obtained by extracting features from the modified symptom space map.

8. The method according to claim 1, characterized in that, The method further includes: Based on the fusion features, various candidate diseases that the patient may have are predicted. The candidate diseases are retrieved based on a disease knowledge base to obtain the knowledge text of the candidate diseases; Based on the electronic medical record text and the knowledge text of each of the candidate diseases, the confidence level of each of the candidate diseases is analyzed.

9. The method according to claim 1, characterized in that, The fusion step of the first feature, the second feature, and the third feature includes: Based on the cosine similarity between the first feature and the third feature, a first factor of the first feature is obtained, and based on the cosine similarity between the second feature and the third feature, a second factor of the second feature is obtained. The fused feature is obtained by summing the weighted features of the first feature by the first factor, the weighted features of the second feature by the second factor, and the third feature.

10. A medical record generation device, characterized in that, include: The speech recognition module is used to perform speech recognition based on the doctor-patient dialogue during the consultation process to obtain the doctor-patient dialogue text. The information extraction module is used to extract information based on the doctor-patient dialogue text to obtain time information elements, medical events corresponding to time intervals, and spatial information elements; wherein, the time information elements include onset time, duration, and change time, and the spatial information elements include anatomical location and migration direction; The data construction module is used to construct a symptom evolution time sequence chain based on the time information elements and the medical events corresponding to the time intervals, and to construct a symptom spatial map based on the spatial information elements. The feature extraction module is used to extract features based on the symptom evolution time sequence chain to obtain a first feature, extract features based on the symptom spatial atlas to obtain a second feature, and extract features based on the doctor-patient dialogue text to obtain a third feature. The text generation module is used to generate electronic medical record text based on the fusion features of the first feature, the second feature, and the third feature.

11. An electronic device, characterized in that, The method includes at least a memory and a processor coupled to each other, wherein the memory stores at least program instructions, and the processor executes the program instructions to implement the medical record generation method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The system stores program instructions that can be executed by a processor, the program instructions being used to implement the medical record generation method according to any one of claims 1 to 9.