Joint reinforcement learning-based staged medical dialogue abstract method and system

Through the phased medical dialogue summary method, the joint reinforcement learning training of dialogue statement selector and abstract generator is used to identify key statements and generate high-quality EHR text, which solves the problems of long context, unlogged words and factual consistency in the prior art, and improves generation efficiency and accuracy.

CN120387461APending Publication Date: 2025-07-29段嘉欣
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510348117.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

Existing medical dialogue abstract methods face long context challenges, unlogged word problems, and factual consistency problems, resulting in low efficiency and poor accuracy in generating EHR texts.

Method used

A staged medical dialogue summary method based on joint reinforcement learning is adopted, and key statements and redundant statements are identified through a pre-constructed dialogue statement selector, and EHR text is generated using the pre-constructed digest generator, including two-stage training of dialogue statement selector and digest generator.

Benefits of technology

It effectively solves the problems of long context, unlogged words and factual consistency, generates high-quality EHR text, and improves the work efficiency of doctors and the accuracy of abstracts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387461A_ABST
    Figure CN120387461A_ABST
Patent Text Reader

Abstract

The invention provides a staged medical dialogue abstract method and system based on joint reinforcement learning, and the method comprises the steps: obtaining a multi-source medical dialogue, carrying out the statement recognition of the medical dialogue through a pre-constructed dialogue statement selector, and obtaining a key statement and a redundant statement; according to the key statements and the redundant statements, the medical dialogue is truncated, the truncated medical dialogue is input into a pre-constructed abstract generator, and a final electronic health record (EHR) text is generated; wherein the pre-constructed dialogue statement selector and the pre-constructed abstract generator are obtained by adopting a two-stage medical dialogue abstract model training method based on joint reinforcement learning. The invention provides a two-stage medical dialogue abstract method based on joint reinforcement learning, a staged medical dialogue abstract model and an end-to-end joint training method of the staged medical dialogue abstract model, and aims to generate a high-quality EHR text according to a doctor-patient dialogue by utilizing an existing pre-training language model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and particularly to a phased medical dialogue summarization method and system based on joint reinforcement learning. Background Art

[0002] With the booming development of digital health, online medical consultation platforms have made remarkable progress in recent years, enabling convenient communication between doctors and patients, providing great convenience for the immediate transmission of diagnosis and treatment suggestions, and benefiting a large number of patients. However, doctors need to write electronic health records (EHRs) for patients after the consultation, which seriously affects their work efficiency in diagnosis. Medical dialogue summarization (MDS) aims to build a computer program that can automatically generate EHRs based on doctor-patient conversations, which can greatly relieve the work burden of doctors. Existing medical dialogue summarization methods generate EHR texts containing independent items such as chief complaints, medical histories, diagnoses, and suggestions by training sequence-to-sequence neural network models. In recent years, with the wide application of pre-trained language models (PLMs) in the field of natural language processing, researchers have achieved remarkable results by expanding the model structure of PLMs or developing specialized fine-tuning frameworks to implement medical dialogue summarization.

[0003] However, due to the unique structure and domain characteristics of medical conversations and EHR texts, methods based on pre-trained language models still face multiple challenges in implementing medical dialogue summarization:

[0004] 1. Long context challenge: Medical conversations often involve dozens of rounds of interactions between doctors and patients, and the average length of the conversation can reach 1000-2000 Chinese characters. However, the typical context length of pre-trained models based on the Transformer architecture is usually set to be between 512 tokens and 1024 tokens, and the length of doctor-patient conversations far exceeds the input limit of conventional PLM models.

[0005] 2. Out-of-vocabulary problem: Medical conversations usually involve a large number of medical terms, but these terms are usually not included in the vocabulary of general pre-trained language models, that is, out-of-vocabulary (OOV) words. The OOV problem severely restricts the application of PLMs in professional fields.

[0006] 3. Problem of factual consistency: The medical dialogue summarization model needs to automatically extract the key clinical information in the dialogue and fill it into the corresponding fields in the EHR text, such as medical history, diagnosis, and suggestions. This is extremely challenging even for non-professional people with a high level of education. However, due to the limited number of training samples, it is difficult for the model to accurately identify and classify this clinical information, resulting in the easy generation of incorrect EHR text. Summary of the Invention

[0007] The purpose of the present invention is to provide a phased medical dialogue summarization method and system based on joint reinforcement learning, aiming to solve the above problems in the prior art.

[0008] An embodiment of the present invention provides a phased medical dialogue summarization method based on joint reinforcement learning, including:

[0009] Obtaining multi-source medical dialogues, and performing sentence recognition on the medical dialogues through a pre-constructed dialogue sentence selector to obtain key sentences and redundant sentences; and

[0010] Truncating the medical dialogue according to the key sentences and redundant sentences, and inputting the truncated medical dialogue into a pre-constructed summary generator to generate the final electronic health record EHR text;

[0011] Among them, the pre-constructed dialogue sentence selector and the pre-constructed summary generator are obtained after adopting a two-stage medical dialogue summarization model training method based on joint reinforcement learning.

[0012] An embodiment of the present invention provides a phased medical dialogue summarization system based on joint reinforcement learning, including:

[0013] A first-stage module, configured to obtain multi-source medical dialogues, and perform sentence recognition on the medical dialogues through a pre-constructed dialogue sentence selector to obtain key sentences and redundant sentences; and

[0014] A second-stage module, configured to truncate the medical dialogue according to the key sentences and redundant sentences, and input the truncated medical dialogue into a pre-constructed summary generator to generate the final electronic health record EHR text;

[0015] Among them, the pre-constructed dialogue sentence selector and the pre-constructed summary generator are obtained after adopting a two-stage medical dialogue summarization model training method based on joint reinforcement learning.

[0016] An embodiment of the present invention further provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, the steps of the above phased medical dialogue summarization method based on joint reinforcement learning are implemented.

[0017] An embodiment of the present invention also provides a computer-readable storage medium, on which an implementation program for information transmission is stored. When the program is executed by a processor, the steps of the above-mentioned phased medical dialogue summarization method based on joint reinforcement learning are implemented.

[0018] The adoption of the embodiment of the present invention may include the following beneficial effects: The embodiment of the present invention proposes a two-stage medical dialogue summarization method based on joint reinforcement learning, and at the same time proposes a phased medical dialogue summarization model and its end-to-end joint training method, aiming to generate high-quality EHR texts according to doctor-patient dialogues by using existing pre-trained language models. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in one or more embodiments of this specification or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0020] Figure 1 is a flowchart of the phased medical dialogue summarization method based on joint reinforcement learning according to the embodiment of the present invention;

[0021] Figure 2 is a structural diagram of the two-stage medical dialogue summarization model according to the embodiment of the present invention;

[0022] Figure 3 is a structural diagram of the dialogue statement selector model according to the embodiment of the present invention;

[0023] Figure 4 is a structural diagram of the summary generator model according to the embodiment of the present invention;

[0024] Figure 5 is a schematic diagram of the joint reinforcement learning algorithm according to the embodiment of the present invention;

[0025] Figure 6 is a schematic diagram of the phased medical dialogue summarization system based on joint reinforcement learning according to the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0026] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will clearly and completely describe the technical solutions in one or more embodiments of this specification in conjunction with the accompanying drawings in one or more embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this document.

[0027] Method Embodiment

[0028] According to an embodiment of the present invention, a phased medical dialogue summarization method based on joint reinforcement learning is provided. Figure 1 It is a flowchart of the phased medical dialogue summarization method based on joint reinforcement learning according to an embodiment of the present invention, as Figure 1 shown. The phased medical dialogue summarization method based on joint reinforcement learning according to an embodiment of the present invention specifically includes:

[0029] Step S101, obtain multi-source medical dialogues, and perform sentence recognition on the medical dialogues through a pre-constructed dialogue sentence selector to obtain key sentences and redundant sentences, specifically including:

[0030] Obtain multi-source medical dialogues, represent the medical dialogues as a sequence of binary tuples, calculate the role embedding and word embedding of the medical dialogue sentences respectively according to the binary tuple sequence, calculate the sentence-level features of the medical dialogue sentences based on the role embedding and word embedding using Formula 1, calculate the context-level features of the medical dialogue sentences using Formula 2 based on the sentence-level features, and perform saliency prediction through the pre-constructed dialogue sentence selector based on the context-level features to obtain the key sentences and redundant sentences in the medical dialogues;

[0031]

[0032] h i = E c (X1,X2,…X n ) i Formula 2;

[0033] Among them, E u (·) is the sentence-level text feature extraction model of the dialogue sentence selector, X i is the semantic feature of the i-th sentence (u i , r i ) in the dialogue, E c (·) is the context-level text feature extraction model of the dialogue sentence selector, h i represents the context-level feature of the i-th sentence in the dialogue, u irepresents the content of the i-th statement in the dialogue, which consists of consecutive tokens; r i is a binary variable representing u i the corresponding speaker; is the k-th token in statement u i where k = 1, 2, …, n; n is the total number of statements in the dialogue, and the subscript i represents the i-th element in the sequence;

[0034] Step S102, truncate the medical dialogue according to the key statements and redundant statements, and input the truncated medical dialogue into a pre-constructed summary generator to generate the final electronic health record EHR text, specifically including:

[0035] Replace the redundant statements with placeholders, obtain the truncated medical dialogue according to the key statements and the placeholders, and input the truncated medical dialogue into a pre-constructed summary generator to generate the final EHR text;

[0036] Among them, the pre-constructed dialogue statement selector and the pre-constructed summary generator are obtained after adopting a two-stage medical dialogue summarization model training method based on joint reinforcement learning, specifically including:

[0037] Define a key statement prediction task based on the greedy algorithm for the dialogue statement selector, iteratively update the initial key statement set, calculate the significance gain of the medical dialogue statements outside the set relative to the current key statement set in each round of iteration using formula 3, add the medical dialogue statement outside the set with the maximum significance gain to the current key statement set, and continuously iterate until the elements in the current key statement set no longer change, and assign heuristic labels 1 or 0 to the medical dialogue statements according to whether the medical dialogue statements are in the current key statement set, and train the dialogue statement selector by minimizing the binary cross-entropy loss function to obtain the initial dialogue statement selector;

[0038] g(u k ) = ROUGE(U t ∪{u k}, y) - ROUGE(U t , y) Formula 3;

[0039] Among them, ROUGE(·) is the ROUGE-1 F1 score, and g(u k ) represents the significance gain of the medical dialogue statement u k outside the set relative to the current key statement set U t , and y represents the manually annotated EHR text;

[0040] Obtain medical entities and construct a medical term dictionary, use the string pattern matching method to compare the manually annotated EHR text with the medical term dictionary, obtain the medical terms in the manually annotated EHR text, replace the medical terms with special marks to obtain the delexicalized EHR text, and train the summary generator according to the medical dialogue through the minimum negative log-likelihood loss function to generate the delexicalized EHR text, and obtain the initial summary generator;

[0041] S61: Construct a comprehensive reward function for joint reinforcement learning as shown in Formula 4;

[0042] r = γ1r1 + γ2r2 + γ3r3 Formula 4;

[0043] Where r represents the comprehensive reward function, r1 represents the global reward for evaluating the overall quality of the generated EHR text, r2 represents the factual reward for evaluating the term correctness of the generated EHR text, r3 represents the length reward for evaluating the margin of the truncated dialogue context relative to the input length limit of the summary generator, γ1, γ2, γ3 are weight factors, and γ1 + γ2 + γ3 = 1;

[0044] S62: Freeze all parameters of the initial summary generator, and use the REINFORCE algorithm to train the initial dialogue statement selector to maximize the comprehensive reward function;

[0045] S63: Freeze all parameters of the initial dialogue statement selector, and use the REINFORCE algorithm to train the initial summary generator to maximize the comprehensive reward function;

[0046] S64: Repeat steps S62 and S63 until the training reaches a predetermined number of rounds or the loss no longer decreases, and stop training to obtain the constructed dialogue statement selector and the constructed summary generator.

[0047] The above technical solutions of the embodiments of the present invention will be described in detail below in combination with the specific situation of the phased medical dialogue summary method based on joint reinforcement learning of the embodiments of the present invention.

[0048] The embodiments of the present invention first provide a two-stage medical dialogue summary model, including two components:

[0049] 1. Dialogue statement selector: Adopt a hierarchical encoding structure. First, use a sentence-level encoder to calculate the independent features of each statement in the doctor-patient dialogue, and then use a dialogue-level encoder to further calculate the context features of each statement;

[0050] 2. Summary Generator: It is constructed based on a pre-trained language model with an autoregressive architecture, and its function is to generate the patient's EHR text according to the truncated doctor-patient dialogue, while ensuring the structural accuracy and factual correctness of the EHR text.

[0051] Furthermore, the model generates the patient's EHR text according to the doctor-patient dialogue in two stages, which specifically include the following steps:

[0052] The first stage: Use the dialogue statement selector to identify the key statements and redundant statements in the doctor-patient dialogue, including:

[0053] Medical dialogue representation: Represent the medical dialogue as a sequence of binary tuples composed of speaker roles (doctor, patient) and dialogue statements where u i represents the content of the i-th statement in the dialogue, which is composed of consecutive tokens; r i is a binary variable used to indicate the speaker of u i ; n is the total number of statements in the dialogue.

[0054] Medical dialogue embedding: Calculate the role embedding g(r i ) and word embedding of the dialogue statements respectively where g(·) and e(·) are the role embedding and word embedding functions respectively, is the k-th token in the statement u i . Further, the sentence-level features of the dialogue statements can be calculated:

[0055]

[0056] where, E u (·) is the sentence-level text feature extraction model of the statement selector, and X i is the semantic feature of the i-th statement (u i , r i ) in the dialogue. Further, the context-level feature of this statement can be calculated:

[0057] h i = E c (X1, X2, … X n ) i

[0058] where, E c (·) is the context-level text feature extraction model of the statement selector, and the subscript i represents the i-th element in the sequence.

[0059] Key dialogue statement selection: Use the dialogue statement selector to perform binary classification on each statement in the doctor-patient dialogue The sentences marked as 1 are regarded as key sentences, and the sentences marked as 0 are redundant sentences. Among them, is the parameter of the sentence selector, and the calculation method of function 1(·) is as follows:

[0060]

[0061] The second stage: truncate the doctor-patient dialogue according to the prediction result of the dialogue sentence selector, and then use the summary generator to generate the EHR text according to the context of the truncated dialogue, including:

[0062] Truncation of dialogue context: Replace the sentences marked as redundant by the selector in the doctor-patient dialogue with the placeholder [PAD], while keeping the content and context order of the remaining sentences unchanged, so as to obtain a dialogue context within the input limit of the PLM;

[0063] Generation of EHR text: Input the truncated dialogue context into the summary generator and obtain the corresponding EHR text.

[0064] The embodiment of the present invention also provides a joint training framework based on reinforcement learning, aiming to train the proposed two-stage medical dialogue summary model in an end-to-end manner, including:

[0065] 1. Pretraining of the selector: Train the dialogue sentence selector to predict the salience of dialogue sentences through a heuristic method, specifically including the following steps:

[0066] Define the "Greedy-based Salient Utterances Prediction" (GSUP) task, and the goal is to train the utterance selector to predict all key sentences in the dialogue in accordance with the greedy search method;

[0067] Furthermore, the GSUP task maintains a set U of key sentences (initially an empty set) for dialogue x, and updates the elements in U in an iterative manner. In the t-th iteration, let the current set of key sentences be Then the out-of-set dialogue sentence relative to U t The salience gain is defined as: adding u k to U t After that, the incremental value of the literal overlap between U t and the manually annotated EHR text y:

[0068] g(u k ) = ROUGE(U t ∪{u k}, y) - ROUGE(U t , y)

[0069] Among them, ROUGE(·) represents the ROUGE score.

[0070] Furthermore, after each round of iteration, the dialogue statement with the largest significance gain score is added to the current set:

[0071]

[0072] Repeat the above iterative process until the elements in U t no longer change. There are the following annotation rules: For If then its label l i = 1, otherwise l i = 0;

[0073] Finally, train the dialogue statement selector to minimize the following binary cross-entropy loss:

[0074]

[0075] Among them, represents the significance prediction result of the selector for the statement x i in the dialogue, ranging from 0 to 1, is the parameter of the statement selector.

[0076] 2. Generator pre-training: The pre-training of the summary generator is achieved by constructing a term-sensitive supervised learning task, which specifically includes the following steps:

[0077] De-tokenization of EHR text: Identify the medical terms in the EHR text y and replace them with the special token [TERM], thereby constructing the pre-training target text y ′ ;

[0078] Supervised training: Train the summary generator to generate de-tokenized EHR text based on the doctor-patient dialogue, which is equivalent to minimizing the following negative log-likelihood loss:

[0079]

[0080] P θ (y′ k |x,y′ <k ) = p g (y′ k ) + m τ p τ (y k )

[0081] Among them, p g is the generation probability on the vocabulary (excluding medical terms), p τ is the probability distribution on the medical term set; m τis a binary variable indicating whether the current target word is a medical term; θ is the parameter of the generator model, and y′ k is the prediction result of the generator at the k-th decoding step.

[0082] 3. Joint training: Use an end-to-end reinforcement learning framework to jointly train the dialogue utterance selector and the summary generator. The specific steps include:

[0083] Reward function design: Construct a global reward r1 to evaluate the overall quality of the generated EHR text, a factual reward r2 to evaluate the term correctness of the generated EHR text, and a length reward r3 to evaluate whether the truncated dialogue context meets the input length limit of the summary generator, so as to construct a complete reward function

[0084] r = γ1r1 + γ2r2 + γ3r3;

[0085] where γ1 to γ3 are weight factors, and γ1 + γ2 + γ3 = 1.

[0086] Selector specialized training: Freeze all the parameters of the summary generator, and use the REINFORCE algorithm to train the dialogue utterance selector to maximize the reward function r;

[0087] Generator specialized training: Freeze all the parameters of the dialogue utterance selector, and use the REINFORCE algorithm to train the summary generator to maximize the reward function r;

[0088] Alternating training: Repeat the selector specialized training and the generator specialized training up to N times, and stop training early when the loss no longer decreases.

[0089] The embodiments of the present invention provide a two-stage medical dialogue summarization method based on joint reinforcement learning to solve the problems of long input challenges, out-of-vocabulary words, and factual consistency faced by existing dialogue summarization technologies based on pre-trained language models. As Figure 2 shown, first, the embodiments of the present invention provide a two-stage medical dialogue summarization method based on a pre-trained language model. The specific steps include:

[0090] Step S201, given a medical dialogue x and its summary (EHR text) y, the medical dialogue can be represented as where n is the number of utterances in the dialogue, and s i is the i-th utterance in the dialogue, and r i ∈(0,1) represents the corresponding speaker (doctor or patient);

[0091] Step S202, the dialogue utterance selector calculates the sentence-level features of the dialogue utterances based on the BERT-base model Among them, e(·) and g(·) are the word embedding layer and the segment embedding layer of the BERT model respectively. In the embodiments of the present invention, the segment embedding of BERT is used as the role embedding of the speaker;

[0092] Step S203, the dialogue utterance selector uses a bidirectional LSTM model (BiLSTM) to calculate the context-level feature h of the dialogue utterance i = BiLSTM(X1, X2, …, X n ; φ) i , where φ is the learnable parameter of the model;

[0093] Step S204, the dialogue utterance selector predicts the salience of each utterance 1(Sigmoid(wh i +b) ≥ 0.5), where w and b are both learnable vectors, and the function 1(·) is defined as follows:

[0094]

[0095] The utterance labeled as 1 is the key utterance, otherwise it is a redundant utterance.

[0096] Further, steps S201 to S204 are the first stage of the medical dialogue summary, as Figure 3 shown, and is formally expressed as c i = P φ (x) i , where φ is the parameter of the dialogue utterance selector, and c i is 1 or 0, respectively indicating whether the utterance x in the dialogue i is a key utterance.

[0097] Step S205, truncate the dialogue context, and use the placeholder [PAD] to replace the redundant utterances whose salience is predicted to be 0. In the embodiments of the present invention, if the length of the truncated dialogue context still exceeds 512 tokens, only the first 512 tokens are retained;

[0098] Step S206, in the embodiments of the present invention, a summary generator is constructed based on the BART model, and the truncated dialogue context is input into the generator, and the patient's EHR text is obtained, where BART(·) represents the forward propagation process of the BART model, and θ is the learnable parameter in the model.

[0099] Further, steps S205 to S206 are the second stage of the medical dialogue summary, as Figure 4 shown, and its purpose is to model the conditional probability of the EHR text y: where y i is a token in y, and m is the length of y.

[0100] As Figure 5 shown, an embodiment of the present invention further provides a two-stage medical dialogue summarization model training method based on joint reinforcement learning. The specific steps include:

[0101] Step S501, pre-training of the dialogue utterance selector. Train the dialogue utterance selector to predict the salience of dialogue utterances through a heuristic method, including:

[0102] (1.1) Define the "Greedy-based Salient Utterances Prediction" task, and train the utterance selector to predict the key utterances in the dialogue in accordance with the greedy search method;

[0103] (1.2) Maintain a set U of key utterances (initially an empty set) for the dialogue x, and update the elements in U in an iterative manner. Specifically, in the t-th iteration, the set of key utterances is Define out-of-set dialogue utterances For U t The salience gain of is the increment of the text overlap degree between U k after adding u t to U t and the reference summary y:

[0104] g(u k ) = ROUGE(U t ∪{u k}, y) - ROUGE(U t , y)

[0105] where ROUGE(·) is the ROUGE-1 F1 score, and add the dialogue utterance with the maximum salience gain score to the set:

[0106]

[0107] (1.3) Repeat step (1.2) until U t can no longer be updated. Assign a heuristic label 0 or 1 to the dialogue utterance u i according to whether it is in the set U. For If u i ∈U, then its label l i = 1, otherwise l i = 0;

[0108] (1.4) Train the dialogue utterance selector to minimize the following binary cross-entropy loss:

[0109]

[0110] Step S502, pre-training of the summary generator, training the summary generator to generate delexicalized EHR texts, including:

[0111] (2.1) Collect medical entities in the Chinese open-source knowledge graph CMeKG and construct a medical term dictionary;

[0112] (2.2) Given an EHR text, identify the medical terms in the text by string pattern matching against the medical dictionary in (2.1) and replace them with a special token [TERM], thereby obtaining a delexicalized EHR text;

[0113] (2.3) Train the summary generator to generate delexicalized EHR texts based on doctor-patient conversations, that is, minimize the following negative log-likelihood loss:

[0114]

[0115] Step S503, joint reinforcement learning of the two-stage medical dialogue summary model, including:

[0116] (3.1) Construction of the reward function:

[0117] Global reward r1: used to evaluate the overall quality of the generated EHR text, which is the literal overlap between the summary generated by the model and the manually annotated summary in the embodiments of the present invention: Among them, is the doctor-patient conversation truncated by the dialogue utterance selector;

[0118] Factual reward r2: used to evaluate the term correctness of the generated EHR text, which is the term overlap between the summary generated by the model and the manually annotated summary in the embodiments of the present invention: Among them, E t (·) represents the set composed of medical terms in the text;

[0119] Length reward r3: used to evaluate the margin of the truncated dialogue context relative to the input length limit of the summary generator, and the calculation method in the embodiments of the present invention is:

[0120]

[0121] Among them, 512 is the input length limit of the summary generator;

[0122] The complete reward function is the weighted sum of the above three rewards: r = γ1r1 + γ2r2 + γ3r3. In the embodiments of the present invention, the values of the weight factors γ1, γ2, and γ3 are 0.4, 0.3, and 0.3 respectively;

[0123] (3.2) Special training of the dialogue statement extractor: Freeze all the parameters of the summary generator, and use the REINFORCE algorithm to train the dialogue statement selector to maximize the reward function r. In the embodiment of the present invention, it is implemented by minimizing the policy gradient loss of the training dialogue statement extractor:

[0124]

[0125] where (x, y) represents a pair of (dialogue, summary) samples in the training set, E represents the expectation operation, b is the baseline value of the reward, which is set to 0.6 in the embodiment of the present invention, represents the gradient of the function with respect to the parameter θ;

[0126] (3.3) Special training of the summary generator: Adopt a method similar to step (3.2), freeze all the parameters of the dialogue statement extractor, and train the summary generator to minimize the following policy gradient loss:

[0127]

[0128] (3.4) Joint training of the two-stage medical dialogue summary model: Alternately execute step (3.2) and step (3.3) up to 10 times, or terminate the training process in advance when the loss does not change significantly after more than 500 steps.

[0129] System embodiment

[0130] According to the embodiment of the present invention, a phased medical dialogue summary system based on joint reinforcement learning is provided. Figure 6 It is a schematic diagram of the phased medical dialogue summary system based on joint reinforcement learning according to the embodiment of the present invention, as Figure 6 shown. The phased medical dialogue summary system based on joint reinforcement learning according to the embodiment of the present invention specifically includes:

[0131] The first-stage module 60 is used to obtain multi-source medical dialogues, perform sentence recognition on the medical dialogues through a pre-constructed dialogue statement selector, and obtain key sentences and redundant sentences. Specifically, it is used for:

[0132] Obtain multi-source medical dialogues, represent the medical dialogues as a sequence of binary tuples, calculate the role embedding and word embedding of the medical dialogue sentences respectively according to the binary tuple sequence, calculate the sentence-level features of the medical dialogue sentences based on the role embedding and word embedding using formula 1, calculate the context-level features of the medical dialogue sentences using formula 2 based on the sentence-level features, and perform saliency prediction through the pre-constructed dialogue statement selector based on the context-level features to obtain key sentences and redundant sentences in the medical dialogues;

[0133]

[0134] h i = E c (X1, X2, … X n ) i Formula 2;

[0135] Wherein, E u (·) is the sentence-level text feature extraction model of the dialogue statement selector, and X i is the semantic feature of the i-th statement (u i , r i ) in the dialogue. E c (·) is the context-level text feature extraction model of the dialogue statement selector, and h i represents the context-level feature of the i-th statement in the dialogue. u i represents the content of the i-th statement in the dialogue, which consists of consecutive tokens; r i is a binary variable representing the speaker corresponding to u i ; is the k-th token in the statement u i , where k = 1, 2, …, n; n is the total number of statements in the dialogue, and the subscript i represents the i-th element in the sequence;

[0136] The second-stage module 62 is used to truncate the medical dialogue according to the key statement and the redundant statement, and input the truncated medical dialogue into a pre-constructed summary generator to generate the final electronic health record EHR text;

[0137] Wherein, the pre-constructed dialogue statement selector and the pre-constructed summary generator are obtained by using the two-stage medical dialogue summary model training method based on joint reinforcement learning.

[0138] The embodiment of the present invention is a system embodiment corresponding to the above method embodiment. The specific operations of each module can be understood with reference to the description of the method embodiment, and will not be elaborated here.

[0139] Device Embodiment 1

[0140] The embodiment of the present invention provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, the steps described in the method embodiment are implemented.

[0141] Device Embodiment 2

[0142] The embodiment of the present invention provides a computer-readable storage medium, on which an information transmission implementation program is stored. When the program is executed by a processor, the steps described in the method embodiment are implemented.

[0143] The computer-readable storage medium described in this embodiment includes, but is not limited to, ROM, RAM, magnetic disk, optical disc, etc.

[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A phased medical dialogue summarization method based on joint reinforcement learning, characterized in that Including: Obtain multi-source medical conversations, perform sentence recognition on the medical conversations through a pre-constructed conversation sentence selector to obtain key sentences and redundant sentences; And Truncate the medical conversations according to the key sentences and redundant sentences, and input the truncated medical conversations into a pre-constructed summary generator to generate the final electronic health record EHR text; Among them, the pre-constructed conversation sentence selector and the pre-constructed summary generator are obtained after adopting a two-stage medical conversation summary model training method based on joint reinforcement learning.

2. The method according to claim 1, characterized in that, Obtain multi-source medical conversations, perform sentence recognition on the medical conversations through a pre-constructed conversation sentence selector to obtain key sentences and redundant sentences, specifically including: Obtain multi-source medical conversations, represent the medical conversations as a sequence of binary tuples, calculate the role embedding and word embedding of medical conversation sentences respectively according to the binary tuple sequence, calculate the sentence-level features of medical conversation sentences using formula 1 based on the role embedding and word embedding, calculate the context-level features of medical conversation sentences using formula 2 based on the sentence-level features, and perform saliency prediction through the pre-constructed conversation sentence selector based on the context-level features to obtain the key sentences and redundant sentences in the medical conversations; h i = E c (X1, X2, … X n ) i Formula 2; Among them, E u (·) is the sentence-level text feature extraction model of the dialogue statement selector, X i is the semantic feature of the i-th statement (u i , r i ) in the dialogue, E c (·) is the context-level text feature extraction model of the dialogue statement selector, h i represents the context-level feature of the i-th statement in the dialogue, u i represents the content of the i-th statement in the dialogue, which consists of consecutive tokens; r i is a binary variable, indicating the speaker corresponding to u i ; is the k-th token in the statement u i , where k = 1, 2,..., n; n is the total number of statements in the dialogue, and the subscript i represents the i-th element in the sequence.

3. The method according to claim 1, wherein Truncate the medical conversations according to the key sentences and redundant sentences, and input the truncated medical conversations into a pre-constructed summary generator to generate the final electronic health record EHR text, specifically including: Replace the redundant sentences with placeholders, obtain the truncated medical conversations according to the key sentences and the placeholders, and input the truncated medical conversations into a pre-constructed summary generator to generate the final EHR text.

4. The method according to claim 1, characterized in that, The pre-constructed conversation sentence selector and the pre-constructed summary generator are obtained after adopting a two-stage medical conversation summary model training method based on joint reinforcement learning, specifically including: Define a key sentence prediction task based on the greedy algorithm for the conversation sentence selector, iteratively update the initial key sentence set, calculate the saliency gain of the medical conversation sentences outside the set relative to the current key sentence set in each iteration using formula 3, add the medical conversation sentence with the largest saliency gain outside the set to the current key sentence set, continuously iterate until the elements in the current key sentence set no longer change, and assign heuristic labels 1 or 0 to the medical conversation sentences according to whether the medical conversation sentences are in the current key sentence set, and train the conversation sentence selector by minimizing the binary cross-entropy loss function to obtain the initial conversation sentence selector; g(u k ) = ROUGE(U t ∪ {u k}, y) - ROUGE(U t , y) Formula 3; where ROUGE(·) is the ROUGE-1 F1 score, and g(u k ) represents the medical dialogue statement u outside the set k with respect to the current key statement set U t and the significant gain, and y represents the manually annotated EHR text.

5. The method according to claim 4, characterized in that The pre-constructed conversation sentence selector and the pre-constructed summary generator are obtained after adopting a two-stage medical conversation summary model training method based on joint reinforcement learning, specifically including: Obtain medical entities and construct a medical term dictionary. Use the string pattern matching method to compare the manually annotated EHR text with the medical term dictionary to obtain the medical terms in the manually annotated EHR text. Replace the medical terms with special markers to obtain the delexicalized EHR text. Train a summary generator according to the medical dialogue through the minimum negative log-likelihood loss function to generate the delexicalized EHR text, and obtain an initial summary generator.

6. The method according to claim 5, wherein The pre-constructed dialogue statement selector and the pre-constructed summary generator are obtained after adopting a two-stage medical dialogue summary model training method based on joint reinforcement learning, specifically including: S61: Construct a comprehensive reward function for joint reinforcement learning as shown in Formula 4; r = γ1r1 + γ2r2 + γ3r3 Formula 4; where r represents the comprehensive reward function, r1 represents the global reward for evaluating the overall quality of the generated EHR text, r2 represents the factual reward for evaluating the term correctness of the generated EHR text, r3 represents the length reward for evaluating the margin of the truncated dialogue context relative to the input length limit of the summary generator, γ1, γ2, γ3 are weight factors, and γ1 + γ2 + γ3 = 1; S62: Freeze all parameters of the initial summary generator, and use the REINFORCE algorithm to train the initial dialogue statement selector to maximize the comprehensive reward function; S63: Freeze all parameters of the initial dialogue statement selector, and use the REINFORCE algorithm to train the initial summary generator to maximize the comprehensive reward function; S64: Repeat steps S62 and S63 until reaching a predetermined number of training rounds or the loss no longer decreases, and then stop training to obtain a constructed dialogue statement selector and a constructed summary generator.

7. A phased medical dialogue summarization system based on joint reinforcement learning, characterized in that Including: A first-stage module for obtaining multi-source medical dialogues, performing statement recognition on the medical dialogues through a pre-constructed dialogue statement selector to obtain key statements and redundant statements; And A second-stage module for truncating the medical dialogue according to the key statements and redundant statements, and inputting the truncated medical dialogue into a pre-constructed summary generator to generate a final electronic health record EHR text; where the pre-constructed dialogue statement selector and the pre-constructed summary generator are obtained after adopting a two-stage medical dialogue summary model training method based on joint reinforcement learning.

8. The system according to claim 7, wherein The first-stage module is specifically used for: Obtain multi-source medical dialogues, represent the medical dialogues as a sequence of binary tuples, calculate the role embedding and word embedding of the medical dialogue statements respectively according to the binary tuple sequence, calculate the sentence-level features of the medical dialogue statements based on the role embedding and word embedding using Formula 1, calculate the context-level features of the medical dialogue statements using Formula 2 based on the sentence-level features, and perform saliency prediction through a pre-constructed dialogue statement selector based on the context-level features to obtain key statements and redundant statements in the medical dialogue; h i = E c (X1, X2, … X n ) i Formula 2; Among them, E u (·) is the sentence-level text feature extraction model of the dialogue statement selector, X i is the semantic feature of the i-th statement (u i , r i ) in the dialogue, E c (·) is the context-level text feature extraction model of the dialogue statement selector, h i represents the context-level feature of the i-th statement in the dialogue, u i represents the content of the i-th statement in the dialogue, which is composed of consecutive tokens; r i is a binary variable, indicating the speaker corresponding to u i ; is the k-th token in the statement u i , k = 1, 2,..., n; n is the total number of statements in the dialogue, and the subscript i represents the i-th element in the sequence.

9. An electronic device, characterized in that, Including: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the method for staged medical dialogue summarization based on joint reinforcement learning according to any one of claims 1-6 are implemented.

10. A computer-readable storage medium, characterized in that, An implementation program for information transmission is stored on the computer-readable storage medium, and when the program is executed by a processor, the steps of the method for staged medical dialogue summarization based on joint reinforcement learning according to any one of claims 1-6 are implemented.