A medical record data processing method and system based on multi-agent

By applying multi-agent reinforcement learning, graph neural network, generative adversarial network, attention mechanism and federated learning technologies in medical record data processing, the diversity, semantic understanding, redundancy and errors in medical record data processing and cross-hospital sharing are solved, and efficient, accurate and privacy-protected medical record data processing is achieved.

CN119207685BActive Publication Date: 2025-02-28GUANGDONG JIUYUE TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411218522.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2025-02-28
Estimated Expiration
2044-09-02

AI Technical Summary

Technical Problem

The prior art has many challenges in the structured processing of medical record data, including the diversity of medical record information, the complexity of semantic understanding, redundancy and error problems, and the difficulty of multi-hospital sharing and collaborative processing of data.

Method used

The medical record data processing method based on multi-agents is adopted, and cutting-edge artificial intelligence technologies such as multi-agent reinforcement learning, graph neural network, generative adversarial network, attention mechanism and federated learning are combined to realize the automatic classification, structure, enhancement and cross-hospital sharing of medical record data.

Benefits of technology

Through multi-agent reinforcement learning, efficient classification and processing of medical record data is achieved, graph neural networks build and update medical knowledge graphs, generate adversarial networks for data enhancement and repair, attention mechanisms improve the accuracy and efficiency of information extraction, and federated learning realizes cross-hospital data sharing and collaborative processing, significantly improving the efficiency, accuracy and privacy protection of medical record data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present invention proposes a medical record data processing method and system based on multi-agents, the method comprising: collecting medical record data in the hospital information system and preprocessing; designing multiple agents, using a multi-agent reinforcement learning algorithm to train the agents, autonomously learning the optimal strategy for classifying and processing medical record data through mutual cooperation and competition between the agents, introducing an attention mechanism to construct an adaptive pre-training model based on a bidirectional long short-term memory network to intelligently extract medical record data and extract key information; using a generative adversarial network to enhance and repair medical record data and generate enhanced medical record data samples; real-time monitoring of the updated knowledge graph, real-time optimization of the knowledge graph according to the monitoring results, and entry and dynamic update of medical record data. The present invention provides an efficient, accurate and flexible medical record data processing method and system through the combination of multiple cutting-edge artificial intelligence technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of multi-agents, and in particular relates to a medical record data processing method and system based on multi-agents. Background Art

[0002] In the field of medical information technology, the development of electronic medical record (EMR) systems has greatly improved the management and utilization of patient data. However, traditional medical record data processing methods still have many problems and challenges. First, the structured processing of medical record information has been a long-standing problem. Medical record texts are usually recorded in the form of natural language descriptions, with diverse and complex content, including a large number of professional terms and medical entities, which makes the automatic extraction and structured processing of medical record information extremely difficult. Early medical record structuring methods mainly relied on rule-based information extraction technology, which required medical experts to write a large number of rules to cover the writing styles and habits of different doctors. However, the workload of writing and maintaining rules is huge, and it is difficult to fully cover all situations. At the same time, with the continuous updating of medical knowledge, the maintenance of rules has become increasingly difficult. In recent years, with the development of deep learning technology, medical record structuring methods based on sequence annotation models have begun to attract attention. This method automatically identifies medical terms and entities in medical records by training models. Although it reduces the workload of manual annotation to a certain extent, it still requires a large amount of labeled data for model training. For some complex and ambiguous medical record content, the performance of the model is still limited. In addition, the diversity of medical record data and differences in doctors' writing habits also increase the complexity and accuracy challenges of information extraction.

[0003] The current technology still has the following problems:

[0004] First, the structured data dimensions of medical records are limited, making it difficult to fully and accurately represent the complex information in medical records. Different doctors use different templates and recording methods, which leads to the diversity of data entry and the difficulty of standardization, increasing the difficulty of subsequent data integration and processing.

[0005] Second, the complexity of semantic understanding remains a huge challenge. Although natural language processing (NLP) technology has made some progress, the professional terminology and complex logical relationships in the medical field make the accuracy and efficiency of information extraction still unsatisfactory.

[0006] Third, there are redundancy and errors in medical record data. When using existing natural language processing technology to extract information, the extracted information may contain errors or redundancy due to the ambiguity, redundancy or irregularity of the language, which requires further screening and verification.

[0007] Fourth, in general, the existing medical record structuring methods still face many challenges and limitations in practical applications and need further research and improvement. Summary of the invention

[0008] The purpose of this invention is to propose a medical record data processing method and system based on multi-agent. By combining cutting-edge artificial intelligence technologies such as multi-agent reinforcement learning, graph neural network (GNN), generative adversarial network (GAN), attention mechanism and federated learning, it realizes the automatic classification, structuring, enhancement and cross-hospital sharing of medical record data, effectively overcoming the shortcomings of the existing technology and solving the key problems in medical record data processing.

[0009] In order to achieve the above object, the present invention provides a medical record data processing method based on multi-agent, the method comprising:

[0010] Step 1: collect medical record data from the hospital information system, preprocess the medical record data, build an initial knowledge graph based on the graph neural network model based on the preprocessed medical record data, use supervised learning methods to train the graph neural network model, collect real-time medical data and preprocess to update the initial knowledge graph and retrain the graph neural network model, extract features from nodes in the initial knowledge graph using the trained graph neural network model, and then perform reasoning and query of medical knowledge based on the knowledge graph; wherein the medical record data includes electronic medical records, medical literature and clinical guidelines;

[0011] Step 2: Design multiple agents, each of which is responsible for a specific type of medical record data. Then use the multi-agent reinforcement learning algorithm to train the agents. Through mutual cooperation and competition between agents, they can autonomously learn the optimal strategy for classifying and processing medical record data. i It has independent policy network and value network, and takes medical record data as the state S in the environment. t , each agent’s A i The action space includes different classification decisions. At the same time, the reward rules are designed to give rewards according to the classification accuracy and processing efficiency of the agent. The loss function L of the policy network is policy (θ i ) is expressed as follows:

[0012]

[0013] Among them, γ is the discount factor, R t,i For reward, For the policy network in state S t Take action A t,i The probability of, T represents all time, t represents time t, γ t represents the discount factor at time t, Represents the policy network of the i-th agent, and the parameter of the policy network is θ i , express expectations;

[0014] The loss function L of the value network value (φ i ) is expressed as follows:

[0015]

[0016] in, Represents the value network of the i-th agent, and the parameter of the value network is φ i ; Represents a discount reward, Indicates that in state S t The state value estimated by the value network at time express expectations;

[0017] The mutual cooperation and competition between the intelligent agents specifically include:

[0018] Each agent stores its experience (S t ,A t ,R t ,S t+1 ) to experience pool D i In the process, experience is sampled from the experience pool regularly for updating;

[0019] Define the global value function V global , aggregate and optimize the value of all agents, as shown below:

[0020]

[0021] Among them, w i represents the weight of the i-th agent;

[0022] Step 3: Introduce the attention mechanism to build an adaptive pre-training model based on a bidirectional long short-term memory network to intelligently extract medical record data and extract key information;

[0023] Step 4: Use a generative adversarial network to enhance and repair the medical record data to generate enhanced medical record data samples;

[0024] Step 5: Input the enhanced medical record data samples into the initial knowledge graph for training to obtain an updated knowledge graph, and monitor the updated knowledge graph in real time. According to the monitoring results, the knowledge graph is optimized in real time, and the medical record data is entered and dynamically updated.

[0025] Preferably, the method further includes step 6, using a federated learning algorithm to share medical record data across hospitals, and updating and synchronizing the medical record data of each hospital in real time across hospitals.

[0026] Preferably, the initial knowledge graph based on the graph neural network model is constructed as follows:

[0027] Define nodes as diseases, symptoms, examination items, and treatment plans, and define edges to represent the relationships between nodes.

[0028] G=(V,E)

[0029] Among them, V represents the node set, E represents the edge set, and G represents the knowledge graph;

[0030] The graph neural network model is used to extract node features and model relationships. The input feature matrix is ​​set to X and the adjacency matrix of the graph is set to A. The propagation rule of the graph neural network model is:

[0031]

[0032] Among them, H (l) represents the node feature matrix of the lth layer; W (l) represents the weight matrix of the lth layer; represents the adjacency matrix with self-loops added, express The degree matrix of ;σ represents the activation function;

[0033] The node feature update rule is:

[0034]

[0035] in, represents the feature of node i at layer l+1; N(i) represents the set of neighboring nodes of node i; d i and d j Represent the degrees of node i and node j respectively;

[0036] Use supervised learning methods to predict labels for nodes and edges, and use cross entropy loss as the loss function. It is expressed as follows:

[0037]

[0038] Among them, y i represents the true label of the i-th node; p i represents the predicted probability of the i-th node.

[0039] Preferably, the weight update rules of the nodes and edges of the initial knowledge graph are expressed as follows:

[0040]

[0041] in, represents the updated weight, represents the original weight, Δw ij It represents the weight increment brought by new data, and α represents the balance coefficient.

[0042] Preferably, the step 3 specifically includes:

[0043] S301, converting medical record text data into word vector representation;

[0044] S302, encoding the word vector sequence through a bidirectional long short-term memory network to generate a context representation of each word;

[0045] S303, using a multi-head attention mechanism to calculate the attention weight of each word, and determining its importance in the sentence by calculating the importance score of each word;

[0046] S304, using the attention weights to perform weighted averaging on the context representations to obtain a context vector of the sentence;

[0047] S305, passing the context vector to the fully connected layer and the classifier for information extraction;

[0048] S306: Use a mixed loss function to train the adaptive pre-training model; wherein the mixed loss function The definition is as follows:

[0049]

[0050] in, represents the classification loss, represents entity recognition loss, λ1 and λ2 represent weight coefficients respectively;

[0051] Among them, the classification loss It is expressed as follows:

[0052]

[0053] The entity recognition loss is expressed as follows:

[0054]

[0055] Among them, y * represents the true label, y represents the predicted result, N is the number of entities, C is the number of categories, is the true label of entity i in category j, p i,j is the predicted probability of entity i in category j.

[0056] Preferably, the S303 specifically includes:

[0057] The attention weight is a i , calculate the attention score e i , which is expressed as follows:

[0058] e i =v T tanh(W h h i +b h )

[0059] Among them, v represents the attention vector, W h represents the weight matrix, b h represents the bias vector;

[0060] Normalize the attention score to get the attention weight a i , a i Indicates the importance of the i-th word, expressed as follows:

[0061]

[0062] Among them, e j represents the attention score of the i-th word;

[0063] The calculation of the multi-head attention mechanism is as follows:

[0064] MultiHead(Q,K,V)=Concat(head1,head2,...,head h )W O

[0065] The calculation for each head is:

[0066]

[0067] Among them, Q, K, and V represent query, key, and value respectively. represents the parameter matrix of each head, W O is the output matrix.

[0068] Preferably, the generative adversarial network includes a generator and a discriminator, wherein the generator is responsible for generating new medical record data samples, and the discriminator is used to distinguish between real data and generated data;

[0069] Among them, the loss function L of the generator G It is expressed as follows:

[0070]

[0071] The loss function L of the discriminator D, which is expressed as follows:

[0072]

[0073] Among them, p z (z) represents the noise distribution, p data (x) represents the real data distribution, z represents the random noise vector, G(z) represents the generated medical record data output by the generator, G represents the generator, D represents the discriminator, D(x or D(G(z)) represents the real probability output by the discriminator, and x represents the medical record data;

[0074] Preferably, the discriminator training comprises the following steps:

[0075] Sample a batch of medical record data {x1,x2,...,x n};

[0076] Sample a batch of noise vectors {z1,z2,...,z n};

[0077] Generate a batch of fake data {G(z1),G(z2),...,G(z n )};

[0078] Update the discriminator parameters θ D , which is expressed as follows

[0079]

[0080] The generator training includes the following steps:

[0081] Sample a batch of noise vectors {z1,z2,...,z n};

[0082] Generate a batch of fake data {G(z1),G(z2),...,G(z n )};

[0083] Update the generator parameters θ G :

[0084]

[0085] Among them, η is the learning rate.

[0086] Preferably, the step S6 specifically includes:

[0087] S601. Standardize the data of different hospitals, unify the data format and fields, and then encrypt the medical record data using the Advanced Encryption Standard;

[0088] S602, using the transport layer security protocol to establish a secure communication channel, sending the encrypted medical record data to the target hospital through the data sharing platform, and storing and processing the data;

[0089] S603. The target hospital uses the decryption function to decrypt the received data to obtain standardized medical record data, and stores the decrypted data in a local database. During the data storage process, differential privacy technology is used to protect patient privacy.

[0090] S604. Use a distributed computing framework to achieve cross-hospital data joint processing, and then use a federated learning model to jointly train a cross-hospital machine learning model;

[0091] S605. Feedback the processing and analysis results to each hospital through an encrypted channel for reference by doctors and researchers. At the same time, based on the feedback results, optimize the federated learning model and update and synchronize the medical record data of each hospital in real time.

[0092] In another aspect of the present invention, a multi-agent-based medical record data processing system is provided, the system comprising:

[0093] A data collection unit is used to collect medical record data in the hospital information system, pre-process the medical record data, construct an initial knowledge graph based on the graph neural network model according to the pre-processed medical record data, train the graph neural network model using a supervised learning method, collect real-time medical data and pre-process it to update the initial knowledge graph and re-train the graph neural network model, extract features from nodes in the initial knowledge graph using the trained graph neural network model, and then perform reasoning and query of medical knowledge based on the knowledge graph; wherein the medical record data includes electronic medical records, medical literature, and clinical guidelines;

[0094] The agent training unit is used to design multiple agents, each of which is responsible for a specific type of medical record data. The agents are then trained using a multi-agent reinforcement learning algorithm. Through mutual cooperation and competition between agents, they autonomously learn the optimal strategy for classifying and processing medical record data. i It has independent policy network and value network, and takes medical record data as the state S in the environment. t , each agent’s A i The action space includes different classification decisions. At the same time, the reward rules are designed to give rewards according to the classification accuracy and processing efficiency of the agent. The loss function L of the policy network is policy (θ i ) is expressed as follows:

[0095]

[0096] Among them, γ is the discount factor, R t,i For reward, For the policy network in state S t Take action A t,i The probability of, T represents all time, t represents time t, γ t represents the discount factor at time t, Represents the policy network of the i-th agent, and the parameter of the policy network is θ i , express expectations;

[0097] The loss function L of the value network value (φ i ) is expressed as follows:

[0098]

[0099] in, Represents the value network of the i-th agent, and the parameter of the value network is φ i ; Represents a discount reward, Indicates that in state S t The state value estimated by the value network at that time, E represents the expectation;

[0100] The mutual cooperation and competition between the intelligent agents specifically include:

[0101] Each agent stores its experience (S t ,A t ,R t ,S t+1 ) to experience pool D i In the process, experience is sampled from the experience pool regularly for updating;

[0102] Define the global value function V global , aggregate and optimize the value of all agents, as shown below:

[0103]

[0104] Among them, w i represents the weight of the i-th agent;

[0105] The key information extraction unit is used to introduce the attention mechanism to build an adaptive pre-training model based on a bidirectional long short-term memory network to intelligently extract medical record data and extract key information;

[0106] An enhanced sample unit is used to enhance and repair medical record data using a generative adversarial network to generate enhanced medical record data samples;

[0107] The medical record data updating unit is used to input the enhanced medical record data samples into the initial knowledge graph for training to obtain an updated knowledge graph, and to monitor the updated knowledge graph in real time, optimize the knowledge graph in real time according to the monitoring results, and enter and dynamically update the medical record data.

[0108] The beneficial technical effects of the present invention are at least as follows:

[0109] (1) The present invention uses graph neural network technology to construct and dynamically update the medical knowledge graph. The graph neural network continuously identifies and updates new medical relationships and entities through training of medical record data, ensuring that the structured processing of medical record information can cover more complex information and improve the accuracy and standardization of the data. Secondly, in order to cope with the complexity of semantic understanding, the present invention introduces natural language processing technology based on the attention mechanism. By designing an attention mechanism model based on the Transformer architecture, it is possible to capture global and local information in medical record data and improve the accuracy and efficiency of information extraction. In addition, in order to solve the problems of redundancy and errors in medical record data, the present invention uses generative adversarial network technology for data enhancement and repair. Generative adversarial networks improve the integrity and consistency of data by generating high-quality medical record data samples, enhancing training data sets, and repairing incomplete or erroneous medical record data.

[0110] (2) The present invention uses multi-agent reinforcement learning technology to achieve automatic classification and processing of medical record data. Multiple intelligent agents collaborate and compete with each other to autonomously learn the optimal classification and processing strategies, thereby improving the efficiency and accuracy of medical record data processing. In order to achieve the sharing and collaborative processing of medical record data across hospitals, the present invention designs a federated learning architecture that allows multiple hospitals to jointly train medical record data processing models without sharing original data. It protects patient privacy through differential privacy and secure multi-party computing technologies, ensuring that data is not leaked during transmission and processing. In short, the present invention provides an efficient, accurate and flexible medical record data processing method and system through the combination of multiple cutting-edge artificial intelligence technologies, which significantly improves the efficiency, accuracy and privacy protection of medical record data processing, and has strong practicality and innovation. BRIEF DESCRIPTION OF THE DRAWINGS

[0111] The present invention is further described using the accompanying drawings, but the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other drawings based on the following drawings without creative work.

[0112] Figure 1 This is a flow chart of a medical record data processing method based on multi-agent according to the present invention.

[0113] Figure 2This is a framework diagram of a medical record data processing system based on multi-agents in the present invention. DETAILED DESCRIPTION

[0114] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0115] like Figure 1 As shown, an embodiment of the present invention provides a multi-agent-based medical record data processing method, the method comprising the following steps:

[0116] Step 1: Collect medical record data from the hospital information system and preprocess the medical record data, build an initial knowledge graph based on the graph neural network model based on the preprocessed medical record data, train the graph neural network model using a supervised learning method, collect real-time medical data and preprocess it to update the initial knowledge graph and retrain the graph neural network model, extract features from nodes in the initial knowledge graph using the trained graph neural network model, and then perform reasoning and query of medical knowledge based on the knowledge graph; wherein the medical record data includes electronic medical records, medical literature, and clinical guidelines;

[0117] Step 2: Design multiple agents, each of which is responsible for a specific type of medical record data. Then use a multi-agent reinforcement learning algorithm to train the agents. Through mutual cooperation and competition between agents, they can autonomously learn the optimal strategy for classifying and processing medical record data.

[0118] Step 3: Introduce the attention mechanism to build an adaptive pre-training model based on a bidirectional long short-term memory network to intelligently extract medical record data and extract key information;

[0119] Step 4: Use a generative adversarial network to enhance and repair the medical record data to generate enhanced medical record data samples;

[0120] Step 5: Input the enhanced medical record data samples into the initial knowledge graph for training to obtain an updated knowledge graph, and monitor the updated knowledge graph in real time. According to the monitoring results, the knowledge graph is optimized in real time, and the medical record data is entered and dynamically updated.

[0121] Step 6: Use a federated learning algorithm to share medical record data across hospitals, and update and synchronize the medical record data of each hospital in real time across hospitals.

[0122] Specifically, the step 1 specifically includes:

[0123] In the medical environment, data sources are diverse and complex. For patent scenarios, we need to process electronic medical records (EMR), medical literature, and clinical guidelines from hospital information systems (such as HIS, LIS, PACS, etc.). The specific preprocessing steps are as follows:

[0124] Remove duplicate records and invalid data, such as incorrect entries or incomplete records. Address common medical terminology typos and ensure terminology consistency;

[0125] Unify text data into lowercase and remove punctuation. Use lemmatization to restore words to their basic form.

[0126] Use standard medical dictionaries (such as UMLS, SNOMEDCT) to map medical terms in the text, convert non-standard terms into standard terms, and use natural language processing (NLP) technology to perform named entity recognition (NER) on medical terms to extract key medical entities (such as diseases, symptoms, treatment plans, etc.).

[0127] Furthermore, based on the preprocessed data, the initial medical knowledge graph is constructed using the Graph Neural Network (GNN). The specific steps are as follows:

[0128] Define nodes and edges:

[0129] Nodes: including diseases (D), symptoms (S), examination items (T), treatment plans (R), etc.

[0130] Edge: represents the relationship (Relation, R) between nodes, such as "disease-symptom", "disease-examination item", "examination item-result", "disease-treatment plan", etc.

[0131] G=(V,E) (1)

[0132] Among them, V represents the node set; E represents the edge set.

[0133] As you can understand, we use Graph Convolutional Network (GCN) to extract node features and model relationships. Let the input feature matrix be X and the adjacency matrix of the graph be A.

[0134] H (l) represents the node feature matrix of the lth layer; W (l) represents the weight matrix of the lth layer; represents the adjacency matrix with self-loops added, express The degree matrix of ; σ represents the activation function.

[0135] Then the propagation rule of GCN is:

[0136]

[0137] Node feature update formula:

[0138]

[0139] in, is the feature of node i at layer l+1; is the set of neighbor nodes of node i; d i and d j are the degrees of node i and node j respectively.

[0140] Furthermore, supervised learning methods are used to predict labels for nodes and edges. The loss function is cross entropy loss:

[0141] The loss function formula is:

[0142]

[0143] Among them, y i represents the true label of the i-th node, p i represents the predicted probability of the i-th node.

[0144] Furthermore, in order to ensure the timeliness and accuracy of the knowledge graph, a dynamic update mechanism is designed. The specific steps are as follows:

[0145] Regularly collect new medical data and perform data preprocessing;

[0146] Use new data to update the knowledge graph, including adding new nodes and edges, and updating the weights of existing nodes and edges. Use incremental learning methods to update the GCN model to ensure that the model can adapt to new data.

[0147] Define the weight update formula:

[0148]

[0149] in: is the updated weight; is the original weight; Δw ij is the weight increment brought by the new data; α is the balance coefficient.

[0150] Retrain the GCN model based on the new data to ensure that the model can accurately reflect the latest medical knowledge. The loss function and training method are the same as the previous steps;

[0151] Using the trained GCN model, we extract features from the nodes in the knowledge graph and generate the node embedding vector hi , using the node embedding vector, calculate the similarity between nodes. The similarity calculation formula is:

[0152]

[0153] Among them, h i represents the embedding vector of node i, h j represents the embedding vector of node j, sim(h i ,h j ) represents the similarity between node i and node j;

[0154] Reasoning and querying of medical knowledge based on knowledge graphs, using the relationships between nodes and edges to perform complex queries and reasoning operations, such as "inferring possible diseases given symptoms" and "recommending examination items given a disease".

[0155] Specifically, the step 2 specifically includes:

[0156] In the initialization phase, multiple agents are created, each of which is responsible for processing different types of medical record data (such as diagnosis information, treatment plans, examination results, etc.). i It has independent policy network and value network for decision making and value estimation.

[0157] Among them, A i : the i-th agent; The policy network of the i-th agent, with parameters θ i ; The value network of the i-th agent, parameterized by φ i .

[0158] Furthermore, we define the environment and state space of the multi-agent. The medical record data is used as the state S in the environment. t , including structured medical record information (such as symptoms, diagnosis, treatment plan, etc.).

[0159] Among them, S t : The environmental state at time t, i.e., the medical record data currently being processed; A t,i : the action of the ith agent at time t; R t,i : The reward of the ith agent at time t.

[0160] The action space of each agent includes different classification decisions (such as classifying a medical record into a certain disease, recommending a certain treatment plan, etc.). Define a reward mechanism to reward the agent based on its classification accuracy and processing efficiency.

[0161] Among them, A t,i ∈{a1,a2,…,a k}: The action space of the ith agent. R t,i =f(accuracy,efficiency): Reward function that calculates the reward based on classification accuracy and processing efficiency.

[0162] Furthermore, the policy network and value network of each agent are trained using the Multi-Agent Reinforcement Learning (MARL) algorithm. The policy network is used to generate actions, and the value network is used to estimate the value of the current state.

[0163] Policy loss function:

[0164]

[0165] Among them, γ is the discount factor, R t,i For reward, For the policy network in state S t Take action A t,i probability.

[0166] Value loss function:

[0167]

[0168] in, For discount rewards, The estimated state value for the value network.

[0169] It is understandable that agents share information with each other through cooperation and competition mechanisms to improve the classification accuracy and processing efficiency of the overall system. Each agent regularly exchanges experience and optimizes on the global value function.

[0170] Each agent stores its experience (S t ,A t ,R t ,S t+1 ) to experience pool D i In the process, experience is sampled from the experience pool regularly to update the network.

[0171] Furthermore, we define the global value function V global , aggregate and optimize the value of all agents:

[0172]

[0173] Among them, w i is the weight of the ith agent.

[0174] Furthermore, the trained multi-agent model is deployed to the medical record data processing system for online learning and real-time updating. New input medical record data is processed in real time, and the model is optimized based on feedback.

[0175] Receive newly input medical record data S new , each agent follows the strategy network Make classification decisions. Calculate the immediate reward R based on the treatment results and doctor feedback new , update the policy network and value network online.

[0176] The classification and processing of medical record data is realized through a multi-agent system. Each agent uses a reinforcement learning algorithm to autonomously learn classification strategies and optimizes overall performance through collaboration and competition mechanisms. Combined with the training of the strategy network and the value network, efficient classification and processing of medical record data is realized. This step relies on the medical knowledge graph constructed in step 1 to provide standardized medical knowledge support for the agent and provide clear classification data for subsequent information extraction and data enhancement.

[0177] Specifically, the step 3 specifically includes:

[0178] Convert medical record text data into word vector representation. Assume that the input text is X = {x1, x2, ..., x n}, where x i Represents the i-th word. Use an adaptive pre-trained model (such as BERT, RoBERTa) to transform each word x i Convert to the corresponding word vector e i .

[0179] E BERT =BERT(X) (10)

[0180] Among them, E BERT is a sequence of context-dependent embedding vectors.

[0181] The word vector sequence is encoded through a bidirectional long short-term memory network (BiLSTM) to generate the context representation of each word. BiLSTM contains a forward LSTM and a backward LSTM. The hidden state of the forward LSTM is The hidden state of the backward LSTM is

[0182]

[0183] Among them, h i is the context representation of the i-th word, and [·;·] represents the vector concatenation operation.

[0184] The attention mechanism calculates the importance score of each word to determine its importance in the sentence. Assume that the attention weight is a i , the attention score e is calculated by the following formula i :

[0185] e i =v T tanh(W h h i +b h ) (14)

[0186] Among them, v is the attention vector, W h is the weight matrix, b h are bias vectors, which are all trainable parameters.

[0187] Normalize the attention score to get the attention weight a i :

[0188]

[0189] Attention weight a i Indicates the importance of the i-th word.

[0190] The calculation of the multi-head attention mechanism is as follows:

[0191] MultiHead(Q,K,V)=Concat(head1,head2,...,head h )W O (16)

[0192] The calculation for each head is:

[0193]

[0194] Q, K, and V represent query, key, and value, respectively. is the parameter matrix for each head, W O is the output matrix.

[0195] Furthermore, the context representation is weighted averaged using the attention weights to obtain the context vector c of the sentence:

[0196]

[0197] Among them, c is the context vector of the sentence.

[0198] Furthermore, the context vector c is passed to the fully connected layer and the classifier for information extraction. Assume that the weight matrix of the fully connected layer is W c , with a bias of b c, the output is y, and the classifier is the softmax function:

[0199] y=softmax(W c c+b c ) (19)

[0200] Among them, y is the extraction result, which represents the key information contained in the sentence.

[0201] Furthermore, the model is trained using a hybrid loss function. The classification loss and entity recognition loss are combined to improve the overall performance of the model. Assume that the true label is y * , the prediction result is y, and the mixed loss function is defined as:

[0202]

[0203] in, is the classification loss, is the entity recognition loss, λ1 and λ2 are weight coefficients. The specific forms of classification loss and entity recognition loss are as follows:

[0204]

[0205] Where N is the number of entities, C is the number of categories, is the true label of entity i in category j, p i,j is the predicted probability of entity i in category j.

[0206] The step 4 uses a generative adversarial network (GAN) to enhance and repair medical record data. The specific goal is to generate high-quality medical record data samples and repair incomplete or erroneous medical record data to improve the overall performance of the medical record data processing system. Specifically, it includes:

[0207] Generative Adversarial Network (GAN) consists of a generator (G) and a discriminator (D). The generator is responsible for generating new medical record data samples, while the discriminator is used to distinguish between real data and generated data.

[0208] Among them, the generator G(z; θ G ): Input noise z, output generated medical record data G(z), parameter is θ G .

[0209] Discriminator D(x;θ D ): Input medical record data x, output data is the true probability D(x), parameter is θ D .

[0210] It can be understood that the medical record data processed and classified in steps 1 and 2 are used as the training data set X = {x1, x2, ..., x m}. X: real medical record data set. z: random noise vector, sampled from uniform distribution U(-1,1) or normal distribution N(0,1).

[0211] The generator G uses a multi-layer perceptron (MLP) or a convolutional neural network (CNN) to generate new medical record data samples. The input is a random noise vector z, and the output is the generated medical record data G(z).

[0212] The discriminator D uses a multi-layer perceptron (MLP) or a convolutional neural network (CNN) to distinguish between real medical record data and generated medical record data. The input is the medical record data x or the generated data G(z), and the output is the probability D(x) or D(G(z)) that the data is real.

[0213] Furthermore, the training goal of the generative adversarial network is to make the data generated by the generator as real as possible through adversarial training, while the discriminator distinguishes between real data and generated data as accurately as possible. The loss functions of the generator and the discriminator are:

[0214] The loss function L of the generator G :

[0215]

[0216] The loss function L of the discriminator D :

[0217]

[0218] Among them, p z (z) is the noise distribution, p data (x) is the real data distribution.

[0219] Furthermore, the generator and discriminator are trained alternately using stochastic gradient descent (SGD) or Adam optimizer. The specific steps are as follows:

[0220] Discriminator training:

[0221] Sample a batch of medical record data {x1,x2,...,x n}.

[0222] Sample a batch of noise vectors {z1,z2,...,z n}.

[0223] Generate a batch of fake data {G(z1),G(z2),...,G(z n )}.

[0224] Update the discriminator parameters θ D :

[0225]

[0226] Generator training:

[0227] Sample a batch of noise vectors {z1,z2,...,z n}.

[0228] Generate a batch of fake data {G(z1),G(z2),...,G(z n )}.

[0229] Update the generator parameters θ G :

[0230]

[0231] Among them, η is the learning rate.

[0232] Furthermore, the trained generator G is used to generate a large number of high-quality medical record data samples to enhance the diversity and coverage of the training data set. Generate new medical record data samples:

[0233]

[0234] Among them, k is the number of generated data samples.

[0235] For incomplete medical record data, use generator G to fill in the missing parts. For example, suppose the incomplete medical record data is x incomplete , generate the repaired medical record data through the generator:

[0236] x repaired =G(z|x incomplete ) (28)

[0237] Where z is the input noise of the generator.

[0238] For medical record data containing errors, use the generator G to correct them. Suppose the medical record data containing errors is x erroneous , generate corrected medical record data through the generator:

[0239] x corrected =G(z|x erroneous ) (29)

[0240] Through the above steps, the use of generative adversarial networks (GANs) to enhance and repair medical record data can generate high-quality medical record data samples and repair incomplete or erroneous medical record data, thereby improving the overall performance of the medical record data processing system. This solution combines the advantages of generative adversarial networks to ensure the authenticity and diversity of generated data, and improves the integrity and consistency of medical record data through data enhancement and repair.

[0241] The step 5 specifically includes:

[0242] Data entry involves entering the newly generated or repaired medical record data (the output of step 4) into the knowledge graph and ensuring the consistency and accuracy of the data.

[0243] Furthermore, the new data is standardized to ensure the consistency of all data fields, including time format, unit conversion, terminology, etc.

[0244] Assume that the medical record data is x new , after normalization, it is x standardized .

[0245] Furthermore, new data is validated using rule engines or machine learning models to ensure data integrity and accuracy.

[0246] For example, verify whether the diagnosis information matches the symptoms, whether the treatment plan complies with clinical guidelines, etc. Let the verification function be f validate , the verification result is r validate :

[0247] r validate =f validate (x standardized ) (30)

[0248] If r validate = True, the data passes the verification, otherwise further manual review is required.

[0249] Furthermore, the verified data is entered into the knowledge graph, and the node and edge information is updated. Assume that the knowledge graph is represented by a graph G = (V, E), where V is the node set and E is the edge set.

[0250] For new data x standardized , the updated graph is G':

[0251] G'=G∪x standardized (31)

[0252] Furthermore, the feedback mechanism is used to monitor and optimize the knowledge graph in real time to ensure its accuracy and timeliness. The following steps are included:

[0253] Set monitoring rules to detect abnormal situations in the knowledge graph, for example, detecting frequent updates of nodes, abnormal changes in relationships, etc.

[0254] Let the monitoring function be f monitor The monitoring result is r monitor :

[0255] r monitor =f monitor (G') (32)

[0256] If r monitor If the display is abnormal, the feedback mechanism will be triggered.

[0257] According to the monitoring results, the corresponding feedback mechanism is triggered to update and optimize the knowledge graph, for example, adding new medical knowledge, correcting erroneous relationships, etc.

[0258] Assume the feedback function is f feedback , the updated graph after feedback is G″:

[0259] G″=f feedback (G') (33)

[0260] Through the feedback mechanism, new data is used to continuously optimize models and algorithms to improve the overall performance of the knowledge graph.

[0261] Use the incremental learning method to dynamically update the model to ensure that the model can adapt to new data. Assume that the incremental learning algorithm is f incremental , the updated model parameters are θ':

[0262] θ'=f incremental (θ,x new ) (34)

[0263] Understandable. In combination with patent scenarios, innovative improvements are made especially for the complexity and heterogeneity of medical record data:

[0264] In practical applications, knowledge graphs are used in scenarios such as clinical decision support and medical record query. For example, doctors can quickly query the diagnosis and treatment plan of a disease through knowledge graphs.

[0265] Assume the query function is f query , the query result is r query :

[0266] r query =f query (G″,query) (35)

[0267] Establish a closed-loop feedback mechanism to ensure that the entire process from data entry to feedback is traceable and monitorable. For example, record each data entry and feedback update through monitoring logs.

[0268] Let the monitoring log be L monitor , record each monitoring result:

[0269] L monitor =L monitor ∪{r monitor} (36)

[0270] Through the above steps, the data entry and knowledge graph feedback mechanism can realize the efficient entry and dynamic update of medical record data, ensuring the consistency and accuracy of the data. At the same time, the feedback mechanism monitors and optimizes the knowledge graph in real time to improve its accuracy and timeliness. This step relies on the data generated and processed in the previous steps to ensure the high quality of the data and provide a solid foundation for the application of the knowledge graph. The solution is specially optimized for the complexity and heterogeneity of medical record data, so that it can better adapt to the challenges in practical applications, thereby improving the efficiency and effectiveness of medical record data processing.

[0271] The step 6 specifically includes:

[0272] Before data can be shared, it needs to be standardized and its security must be ensured during transmission.

[0273] First, standardize the data of different hospitals and unify the data format and fields. For example, time format, unit conversion, terminology, etc. Suppose the medical record data is x hospital , after normalization, it is x standardized .

[0274] In view of the complexity of heterogeneous data, automated data mapping and conversion technology is used. Let the fusion function be f fusion , the fused data is x fused :

[0275] x fused =f fusion (x standardized ) (37)

[0276] Among them, AutoMap represents automated data mapping and conversion operations.

[0277] Secondly, the Advanced Encryption Standard (AES) is used to encrypt the medical record data to ensure the security of the data during transmission. Let the encryption function be f encrypt , the encrypted data is x encrypted :

[0278] f encrypt(x) = AES encrypt (x,K AES ) (38)

[0279] x encrypted =f encrypt (x fused ) (39)

[0280] Among them, AES encrypt Indicates AES encryption operation, K AES Is the encryption key.

[0281] The encrypted data is then transmitted and shared between hospitals through a secure channel.

[0282] Specifically, the Transport Layer Security (TLS) protocol is used to establish a secure communication channel to ensure that data is not stolen or tampered with during transmission.

[0283] Through the data sharing platform, the encrypted data x encrypted Sent to the target hospital for data storage and processing.

[0284] Furthermore, after receiving the encrypted data, the target hospital needs to decrypt the data and store it in a local database.

[0285] Use the decryption function f decrypt Decrypt the received data to obtain the standardized medical record data x standardized :

[0286] f decrypt (x) = AES decrypt (x,K AES ) (40)

[0287] x standardized =f decrypt (x encrypted ) (41)

[0288] Among them, AES decrypt Indicates the AES decryption operation, K AES is the decryption key.

[0289] Furthermore, the decrypted data is stored in a local database for subsequent processing and analysis.

[0290] In the data storage process, differential privacy technology is used to protect patient privacy. Let the differential privacy protection function be f privacy , the protected data is x privacy :

[0291] f privacy (x) = DiffPrivacy(x,∈) (42)

[0292] x privacy =f privacy (x standardized ) (43)

[0293] Among them, DiffPrivacy represents the differential privacy operation, and ∈ is the privacy budget parameter.

[0294] Furthermore, through a distributed computing framework, joint processing and analysis of medical record data across hospitals can be achieved.

[0295] The distributed computing framework uses ApacheSpark or Flink to realize cross-hospital data joint processing. Let the data processing function be f process The result after processing is r process :

[0296] r process =f process (x privacy ) (44)

[0297] f process (x) = Spark / Flink process (x) (45)

[0298] Furthermore, we use the Federated Learning technology to jointly train machine learning models across hospitals to ensure data privacy. federated , the model parameters after joint training are θ federated :

[0299]

[0300]

[0301] Among them, FedAvg is the federated average algorithm, θ i are the model parameters trained locally for each hospital, and n is the number of participating hospitals.

[0302] Finally, the results of the joint processing and analysis are fed back to each hospital, and the model and data are optimized. process The information is fed back to various hospitals through encrypted channels for reference by doctors and researchers.

[0303] Assume the feedback function is f feedback , the feedback result is r feedback :

[0304] r feedback =f feedback (r process) (48)

[0305] It is understandable that according to the feedback results, the federated learning model is optimized to improve the generalization ability and accuracy of the model. Assume that the optimization function is f optimize , the optimized model parameters are θ optimized :

[0306]

[0307] θ optimized =f optimize (θ federated ,r feedback ) (50)

[0308] Among them, GradUpdate represents the gradient update operation, is the gradient of the loss function.

[0309] Furthermore, the medical record data of each hospital is updated and synchronized in real time to ensure the timeliness and consistency of the data. Suppose the data update function is f update , the updated data is x updated :

[0310] f update (x fused ,x new )=StreamUpdate(x fused ,x new ) (51)

[0311] x updated =f update (x fused ,x new ) (52)

[0312] Among them, StreamUpdate represents the data stream update operation.

[0313] Through the above steps, the cross-hospital medical record data sharing and collaborative processing solution can realize the sharing and joint processing of medical record data among multiple hospitals, and improve the utilization efficiency of medical resources and the diagnosis and treatment effect. The solution combines technologies such as data standardization, encrypted transmission, distributed computing and federated learning to ensure the security and privacy of data during transmission and processing. At the same time, through joint processing and analysis, more comprehensive and accurate medical decision support is provided. This step relies on the data generated and processed in the previous steps to ensure the high quality of the data and provide a solid foundation for cross-hospital data sharing and collaborative processing. Combined with the patent scenario, the solution is specially optimized for the complexity and heterogeneity of medical record data, so that it can better adapt to the challenges in practical applications, thereby improving the efficiency and effectiveness of medical record data processing.

[0314] like Figure 2 As shown, another embodiment of the present invention is provided in another aspect, a medical record data processing system based on multi-agent, the system comprising:

[0315] The data collection unit 101 is used to collect medical record data in the hospital information system, pre-process the medical record data, construct an initial knowledge graph based on the graph neural network model according to the pre-processed medical record data, train the graph neural network model using a supervised learning method, collect real-time medical data and pre-process to update the initial knowledge graph and re-train the graph neural network model, extract features from nodes in the initial knowledge graph using the trained graph neural network model, and then perform reasoning and query of medical knowledge based on the knowledge graph; wherein the medical record data includes electronic medical records, medical literature and clinical guidelines;

[0316] The agent training unit 102 is used to design multiple agents, each of which is responsible for a specific type of medical record data, and then use a multi-agent reinforcement learning algorithm to train the agents. Through mutual cooperation and competition between the agents, they autonomously learn the optimal strategy for classifying and processing medical record data; wherein each agent A i It has independent policy network and value network, and takes medical record data as the state S in the environment. t , each agent’s A i The action space includes different classification decisions. At the same time, the reward rules are designed to give rewards according to the classification accuracy and processing efficiency of the agent. The loss function L of the policy network is policy (θ i ) is expressed as follows:

[0317]

[0318] Among them, γ is the discount factor, R t,i For reward, For the policy network in state S t Take action A t,i The probability of, T represents all time, t represents time t, γ t represents the discount factor at time t, Represents the policy network of the i-th agent, and the parameter of the policy network is θ i , express expectations;

[0319] The loss function L of the value network value (φ i ) is expressed as follows:

[0320]

[0321] in, Represents the value network of the i-th agent, and the parameter of the value network is φ i ; Represents a discount reward, Indicates that in state S t The state value estimated by the value network at time express expectations;

[0322] The mutual cooperation and competition between the intelligent agents specifically include:

[0323] Each agent stores its experience (S t ,A t ,R t ,S t+1 ) to experience pool D i In the process, experience is sampled from the experience pool regularly for updating;

[0324] Define the global value function V global , aggregate and optimize the value of all agents, as shown below:

[0325]

[0326] Among them, w i represents the weight of the i-th agent;

[0327] The key information extraction unit 103 is used to introduce an attention mechanism to construct an adaptive pre-training model based on a bidirectional long short-term memory network to intelligently extract the medical record data and extract key information;

[0328] The enhanced sample unit 104 is used to enhance and repair the medical record data using a generative adversarial network to generate an enhanced medical record data sample;

[0329] The medical record data updating unit 105 is used to input the enhanced medical record data samples into the initial knowledge graph for training to obtain an updated knowledge graph, and to monitor the updated knowledge graph in real time, optimize the knowledge graph in real time according to the monitoring results, and enter and dynamically update the medical record data.

[0330] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.

[0331] In addition, for technical details that are not described in detail in this embodiment, reference can be made to the parameter operation method provided in any embodiment of the present invention, and will not be repeated here.

[0332] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0333] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0334] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0335] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A medical record data processing method based on multi-agent, characterized in that: The method comprises: Step 1: collect medical record data from the hospital information system, preprocess the medical record data, build an initial knowledge graph based on the graph neural network model based on the preprocessed medical record data, use supervised learning methods to train the graph neural network model, collect real-time medical data and preprocess to update the initial knowledge graph and retrain the graph neural network model, extract features from nodes in the initial knowledge graph using the trained graph neural network model, and then perform reasoning and query of medical knowledge based on the knowledge graph; wherein the medical record data includes electronic medical records, medical literature and clinical guidelines; Step 2: Design multiple agents, each of which is responsible for a specific type of medical record data. Then use the multi-agent reinforcement learning algorithm to train the agents. Through mutual cooperation and competition between agents, they can autonomously learn the optimal strategy for classifying and processing medical record data. i It has independent policy network and value network, and takes medical record data as the state S in the environment. t , each agent’s A i The action space includes different classification decisions. At the same time, the reward rules are designed to give rewards according to the classification accuracy and processing efficiency of the agent. The loss function L of the policy network is policy (θ i ) is expressed as follows: Among them, γ is the discount factor, R t,i For reward, For the policy network in state S t Take action A t,i The probability of, T represents all time, t represents time t, γ t represents the discount factor at time t, Represents the policy network of the i-th agent, and the parameter of the policy network is θ i , express expectations; The loss function L of the value network value (φ i ) is expressed as follows: in, Represents the value network of the i-th agent, and the parameter of the value network is φ i ; Represents a discount reward, Indicates that in state S t The state value estimated by the value network at time express expectations; The mutual cooperation and competition between the intelligent agents specifically include: Each agent stores its experience (S t ,A t ,R t ,S t+1 ) to experience pool D i In the process, experience is sampled from the experience pool regularly for updating; Define the global value function V global , aggregate and optimize the value of all agents, as shown below: Among them, w i represents the weight of the i-th agent; Step 3: Introduce the attention mechanism to build an adaptive pre-training model based on a bidirectional long short-term memory network to intelligently extract medical record data and extract key information; Step 4: Use a generative adversarial network to enhance and repair the medical record data to generate enhanced medical record data samples; Step 5: Input the enhanced medical record data samples into the initial knowledge graph for training to obtain an updated knowledge graph, and monitor the updated knowledge graph in real time. According to the monitoring results, the knowledge graph is optimized in real time, and the medical record data is entered and dynamically updated.

2. A multi-agent based medical record data processing method according to claim 1, characterized in that: The method also includes step 6, using a federated learning algorithm to share medical record data across hospitals, and updating and synchronizing the medical record data of each hospital in real time across hospitals.

3. A multi-agent based medical record data processing method according to claim 1, characterized in that: The initial knowledge graph based on the graph neural network model is constructed as follows: Define nodes as diseases, symptoms, examination items, and treatment plans, and define edges to represent the relationships between nodes. G=(V,E) Among them, V represents the node set, E represents the edge set, and G represents the knowledge graph; The graph neural network model is used to extract node features and model relationships. The input feature matrix is ​​set to X and the adjacency matrix of the graph is set to A. The propagation rule of the graph neural network model is: Among them, H (l) represents the node feature matrix of the lth layer; W (l) represents the weight matrix of the lth layer; represents the adjacency matrix with self-loops added, express The degree matrix of ;σ represents the activation function; The node feature update rule is: in, represents the feature of node i at layer l+1; N(i) represents the set of neighboring nodes of node i; d i and d j Represent the degrees of node i and node j respectively; Use supervised learning methods to predict labels for nodes and edges, and use cross entropy loss as the loss function. It is expressed as follows: Among them, y i represents the true label of the i-th node; p i represents the predicted probability of the i-th node.

4. A multi-agent based medical record data processing method according to claim 3, characterized in that: The weight update rules of the nodes and edges of the initial knowledge graph are expressed as follows: in, represents the updated weight, represents the original weight, Δw ij It represents the weight increment brought by new data, and α represents the balance coefficient.

5. The multi-agent-based medical record data processing method according to claim 1, characterized in that: The step 3 specifically includes: S301, converting medical record text data into word vector representation; S302, encoding the word vector sequence through a bidirectional long short-term memory network to generate a context representation of each word; S303, using a multi-head attention mechanism to calculate the attention weight of each word, and determining its importance in the sentence by calculating the importance score of each word; S304, using the attention weights to perform weighted averaging on the context representations to obtain a context vector of the sentence; S305, passing the context vector to the fully connected layer and the classifier for information extraction; S306: Use a mixed loss function to train the adaptive pre-training model; wherein the mixed loss function The definition is as follows: in, represents the classification loss, represents entity recognition loss, λ1 and λ2 represent weight coefficients respectively; Among them, the classification loss It is expressed as follows: The entity recognition loss is expressed as follows: Among them, y * represents the true label, y represents the predicted result, N is the number of entities, C is the number of categories, is the true label of entity i in category j, p i,j is the predicted probability of entity i in category j.

6. A multi-agent based medical record data processing method according to claim 5, characterized in that: The S303 specifically includes: The attention weight is a i , calculate the attention score e i , which is expressed as follows: e i =v T tanh(W h h i +b h ) Among them, v represents the attention vector, W h represents the weight matrix, b h represents the bias vector; Normalize the attention score to get the attention weight a i , a i Indicates the importance of the i-th word, expressed as follows: Among them, e j represents the attention score of the i-th word; The calculation of the multi-head attention mechanism is as follows: MultiHead(Q,K,V)=Concat(head1,head2,...,head h )W O The calculation for each head is: Among them, Q, K, and V represent query, key, and value respectively. represents the parameter matrix of each head, W O is the output matrix.

7. A multi-agent based medical record data processing method according to claim 1, characterized in that: The generative adversarial network includes a generator and a discriminator, wherein the generator is responsible for generating new medical record data samples, and the discriminator is used to distinguish between real data and generated data; Among them, the loss function L of the generator G It is expressed as follows: The loss function L of the discriminator D , which is expressed as follows: Among them, p z (z) represents the noise distribution, p data (x) represents the true data distribution, z represents the random noise vector, G(z) represents the generated medical record data output by the generator, G represents the generator, D represents the discriminator, D(x) or D(G(z)) represents the true probability output by the discriminator, and x represents the medical record data.

8. A multi-agent based medical record data processing method according to claim 7, characterized in that: The discriminator training comprises the following steps: Sample a batch of medical record data {x1,x2,...,x n }; Sample a batch of noise vectors {z1,z2,...,z n }; Generate a batch of fake data {G(z1),G(z2),...,G(z n )}; Update the discriminator parameters θ D , which is expressed as follows The generator training includes the following steps: Sample a batch of noise vectors {z1,z2,...,z n }; Generate a batch of fake data {G(z1),G(z2),...,G(z n )}; Update the generator parameters θ G : Among them, η is the learning rate.

9. The multi-agent-based medical record data processing method according to claim 2, characterized in that: The step S6 specifically includes: S601. Standardize the data of different hospitals, unify the data format and fields, and then encrypt the medical record data using the Advanced Encryption Standard; S602, using the transport layer security protocol to establish a secure communication channel, sending the encrypted medical record data to the target hospital through the data sharing platform, and storing and processing the data; S603. The target hospital uses the decryption function to decrypt the received data to obtain standardized medical record data, and stores the decrypted data in a local database. During the data storage process, differential privacy technology is used to protect patient privacy. S604. Use a distributed computing framework to achieve cross-hospital data joint processing, and then use a federated learning model to jointly train a cross-hospital machine learning model; S605. Feedback the processing and analysis results to each hospital through an encrypted channel for reference by doctors and researchers. At the same time, based on the feedback results, optimize the federated learning model and update and synchronize the medical record data of each hospital in real time.

10. A medical record data processing system based on multi-agent, characterized in that: The system comprises: A data collection unit is used to collect medical record data in the hospital information system, pre-process the medical record data, construct an initial knowledge graph based on the graph neural network model according to the pre-processed medical record data, train the graph neural network model using a supervised learning method, collect real-time medical data and pre-process it to update the initial knowledge graph and re-train the graph neural network model, extract features from nodes in the initial knowledge graph using the trained graph neural network model, and then perform reasoning and query of medical knowledge based on the knowledge graph; wherein the medical record data includes electronic medical records, medical literature, and clinical guidelines; The agent training unit is used to design multiple agents, each of which is responsible for a specific type of medical record data. The agents are then trained using a multi-agent reinforcement learning algorithm. Through mutual cooperation and competition between agents, they autonomously learn the optimal strategy for classifying and processing medical record data. i It has independent policy network and value network, and takes medical record data as the state S in the environment. t , each agent’s A i The action space includes different classification decisions. At the same time, the reward rules are designed to give rewards according to the classification accuracy and processing efficiency of the agent. The loss function L of the policy network is policy (θ i ) is expressed as follows: Among them, γ is the discount factor, R t,i For reward, For the policy network in state S t Take action A t,i The probability of, T represents all time, t represents time t, γ t represents the discount factor at time t, Represents the policy network of the i-th agent, and the parameter of the policy network is θ i , express expectations; The loss function L of the value network value (φ i ) is expressed as follows: in, Represents the value network of the i-th agent, and the parameter of the value network is φ i ; Represents a discount reward, Indicates that in state S t The state value estimated by the value network at time express expectations; The mutual cooperation and competition between the intelligent agents specifically include: Each agent stores its experience (S t ,A t ,R t ,S t+1 ) to experience pool D i In the process, experience is sampled from the experience pool regularly for updating; Define the global value function V global , aggregate and optimize the value of all agents, as shown below: Among them, w i represents the weight of the i-th agent; The key information extraction unit is used to introduce the attention mechanism to build an adaptive pre-training model based on a bidirectional long short-term memory network to intelligently extract medical record data and extract key information; An enhanced sample unit is used to enhance and repair medical record data using a generative adversarial network to generate enhanced medical record data samples; The medical record data updating unit is used to input the enhanced medical record data samples into the initial knowledge graph for training to obtain an updated knowledge graph, and to monitor the updated knowledge graph in real time, optimize the knowledge graph in real time according to the monitoring results, and enter and dynamically update the medical record data.

Citation Information

Patent Citations

  • Mammary gland medical record entity recognition labeling enhancement system based on multi-agent reinforcement learning

    CN111312354A

  • Knowledge graph multi-hop reasoning method for diabetes text

    CN116610822A

Cited By

  • A multi-agent collaborative medical risk prediction model evaluation automation system

    CN122929596A