Perioperative period medical question and answer data synthesis method and system

Through medical record combination and large-model self-dialogue strategy, the problem of insufficient diversity and reliability in the generation of existing medical big model data is solved, and high-quality medical Q&A data is generated, which improves the performance of medical big model.

CN119005334AInactive Publication Date: 2024-11-22YUNNAN UNITED VISION TECH CO LTD

Patent Information

Application Number
CN202411116374.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing medical big model data generation methods lack high-quality data, resulting in insufficient diversity and reliability and low data quality.

Method used

Through medical record combination, data de-privacy, attribute extraction, attribute combination, rule cleaning, diversified prompt word construction and data generation methods based on big model self-dialogue, provide real and diverse medical Q&A data to ensure the diversity and reliability of the data .

Benefits of technology

The generated medical Q&A data is of high quality, the trained medical big models have better performance, and significantly improved diversity and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005334A_ABST
    Figure CN119005334A_ABST
Patent Text Reader

Abstract

The invention relates to a perioperative period medical question and answer data synthesis method and system, and belongs to the technical field of medical data processing. The method comprises the steps that medical records are combined, and real and diversified medical record data are provided; comprising the steps of data privacy removal, attribute extraction, attribute combination and rule cleaning. Performing data synthesis to synthesize medical question and answer data; comprising two steps of diversified cue word construction and large model self-dialogue-based data generation. The synthesized medical question and answer data has good diversity and reliability, and the data quality is high; the large medical model trained by using the data synthesized by the method has better performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a perioperative medical question-and-answer data synthesis method and system, belonging to the technical field of medical data processing. Background Art

[0002] With its powerful understanding, generation and logical reasoning capabilities, large language models have shown great potential in processing massive medical data. With the continuous development of large language model technology, research on large models in the medical field has made important progress. For example, Med-PLM and Med-PLM2 can give more professional answers to medical-related questions, and Bianque and HuatuoGPT also have extremely powerful performance in medical question answering. However, there are still difficulties in the research of medical large models. A key problem is the lack of high-quality data.

[0003] The training of large medical models requires a large amount of high-quality data, but existing data generation methods only generate data based on limited examples and do not consider real medical scenarios, resulting in insufficient diversity and reliability, leading to lower data quality.

[0004] There are many large models that can generate data, such as OpenAI's ChatGPT, Anthropic's Claude, Baidu's Wenxing Yiyan, etc. A common method is to manually write instruction data, but this method is costly and may not be practical for large language models that require a lot of data for fine-tuning. Another method is to use more powerful and mature large language models to automatically synthesize instruction data, such as Self-Instruct. However, without a large amount of high-quality medical knowledge to build a seed set, Self-Instruct may not be able to generate reliable medical data. In the medical field, many research works have been improved based on Self-Instruct. For example, in the research work of the Huatuo large model, researchers used data from a professional medical knowledge base to construct prompt words to guide ChatGPT to generate medical-related instruction data. In the research work of the Baize large model, researchers used the MedQuAD dataset as a seed set to guide large language models to generate usable medical data. However, the diversity and reliability of the data generated by these research works need to be improved. Summary of the invention

[0005] The present invention provides a method and system for synthesizing perioperative medical question and answer data, so as to solve the problem that the existing data generation method only generates data with reference to limited examples and does not consider the actual medical scenarios, resulting in insufficient diversity and reliability and low data quality. The medical question and answer data synthesized by the present invention has good diversity and reliability and high data quality; and the medical big model trained with the synthesized data has better performance.

[0006] The technical solution of the present invention is: according to the first aspect of the present invention, a method for synthesizing perioperative medical question-and-answer data, the specific steps of the method are as follows:

[0007] Step 1: Combine medical records to provide real and diverse medical record data; including data privacy removal, attribute extraction, attribute combination, and rule cleaning.

[0008] Step 2: Perform data synthesis to synthesize medical question and answer data; this includes two steps: constructing diversified prompt words and generating data based on large model self-dialogue.

[0009] The data deprivacy includes:

[0010] Remove private information from electronic medical record data, including name, address, birthday, and ID number, to prevent privacy leakage of patients or doctors.

[0011] The attribute extraction includes: extracting and saving attributes related to perioperative medical care, including patient diagnosis information, treatment information, past medical history, physical examination results, laboratory test results, and special circumstances; when extracting attributes, patient diagnosis information and treatment information are bound together to prevent the generation of a large amount of erroneous information; in addition, for text description attributes, including past medical history, only specific description information needs to be extracted and saved; and for numeric attributes, including physical examination results and laboratory test results, a value range is set, and numerical values ​​are randomly generated based on this range for storage.

[0012] The attribute combination includes: when performing attribute combination, randomly extracting corresponding values ​​from previously randomly extracted and saved attributes for combination; in particular, for attributes that may or may not exist, such as past medical history, first set a random number generator to randomly generate 0 or 1 to determine whether there is a medical history; if the generated random number is 0, it means that there is no medical history; if the generated random number is 1, one or more medical histories are randomly extracted from the saved medical history.

[0013] The rule cleaning includes: setting column rules to filter out erroneous data; specifically, these rules include rules based on medical common sense, including whether the patient's age and gender conflict with the diagnosis results and treatment methods, and whether the patient's physiological characteristics are beyond the normal range; and expert consensus rules, including contraindications to treatment methods.

[0014] The construction of diversified prompt words in Step 2 includes: manually collecting medical-related topics and real medical conversations as seed sets, combining medical records, and constructing diversified prompt words.

[0015] The data generation based on the large model self-dialogue in Step 2 includes: using ChatGPT to generate questions from the patient's perspective based on the constructed diverse prompt words; secondly, constructing prompt words based on the generated questions, and using ChatGPT to generate corresponding answers.

[0016] According to a second aspect of the present invention, a perioperative medical question-and-answer data synthesis system is provided, comprising:

[0017] The medical record combination module is used to combine medical records and provide real and diverse medical record data; it includes several processes for data privacy removal, attribute extraction, attribute combination, and rule cleaning;

[0018] The data synthesis module is used to synthesize medical question and answer data. It includes two steps: constructing diversified prompt words and generating data based on large model self-dialogue.

[0019] According to a third aspect of the present invention, a processor is provided, wherein the processor is used to run a program, wherein the program, when running, executes any one of the above-mentioned perioperative medical question and answer data synthesis methods.

[0020] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium comprising a stored program, wherein when the program is run, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned perioperative medical question and answer data synthesis methods.

[0021] The beneficial effects of the present invention are:

[0022] 1. The present invention proposes a medical record combination algorithm to increase the diversity of medical records while ensuring reliability.

[0023] 2. The present invention proposes a data synthesis algorithm based on a large model self-dialogue strategy to ensure the quality of the synthesized question and answer data.

[0024] 3. The present invention proposes to synthesize anesthesia data based on combined medical records, thereby improving the diversity of synthesized data while ensuring reliability.

[0025] 4. The present invention proposes to construct diversified prompt words based on high-quality seed sets and medical-related topics in combination with combined medical records to improve the diversity and rationality of question and answer data synthesis.

[0026] 5. The medical question-and-answer data synthesized by this method has good diversity and reliability, and the data quality is high;

[0027] 6. The medical big model trained using the data synthesized by this method has better performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0029] Example 1: Figure 1 The overall process of the present invention is shown. According to the first aspect of an embodiment of the present invention, a method for synthesizing perioperative medical question-and-answer data is provided. The specific steps of the method are as follows:

[0030] Step 1: Combine medical records to provide real and diverse medical record data; including data privacy removal, attribute extraction, attribute combination, and rule cleaning.

[0031] Step 2: Perform data synthesis to synthesize medical question and answer data; this includes two steps: constructing diversified prompt words and generating data based on large model self-dialogue.

[0032] Optionally, the data deprivacy includes:

[0033] Before using electronic medical record data, if there is private information in the medical record, the private information needs to be removed, such as name, address, birthday, ID number, etc., to prevent the privacy of patients or doctors from being leaked.

[0034] Optionally, the attribute extraction includes: extracting and saving attributes related to perioperative medical care, including patient diagnosis information, treatment information, past medical history, physical examination results, laboratory test results, special circumstances, etc.; when extracting attributes, the patient diagnosis information and treatment information are bound together to prevent the generation of a large amount of erroneous information; in addition, for text description attributes, including past medical history, only specific description information needs to be extracted and saved; and for numerical attributes, including physical examination results and laboratory test results, a value range is set, and numerical values ​​are randomly generated based on this range for storage.

[0035] Optionally, the attribute combination includes: when performing attribute combination, randomly extracting corresponding values ​​from previously randomly extracted and saved attributes for combination; in particular, for attributes that may or may not exist, such as past medical history, first setting a random number generator to randomly generate 0 or 1 to determine whether a medical history exists; if the generated random number is 0, it means that there is no medical history; if the generated random number is 1, one or more medical histories are randomly extracted from the saved medical history.

[0036] Alternatively, the medical record combination method can increase diversity to a certain extent, but it will introduce a large amount of erroneous data. In order to filter out erroneous data and ensure data availability, we consulted relevant materials and consulted professional doctors. The rule cleaning includes: setting column rules to filter out erroneous data; specifically, these rules include rules based on medical common sense, including whether the patient's age and gender conflict with the diagnosis and treatment methods, whether the patient's physiological characteristics such as heart rate and blood pressure are beyond the normal range; and expert consensus rules, including contraindications to treatment methods.

[0037] Optionally, the construction of diversified prompt words in Step 2 includes: to further improve the diversity and reliability of generated data, manually collecting medical-related topics and real medical conversations as seed sets, combining medical records, and constructing diversified prompt words.

[0038] Optionally, the data generation based on the large model self-dialogue in Step 2 includes: using ChatGPT to generate questions from the patient's perspective based on the constructed diverse prompt words; secondly, constructing prompt words based on the generated questions, and using ChatGPT to generate corresponding answers.

[0039] According to a second aspect of the present invention, a perioperative medical question-and-answer data synthesis system is provided, comprising:

[0040] The medical record combination module is used to combine medical records and provide real and diverse medical record data; it includes several processes for data privacy removal, attribute extraction, attribute combination, and rule cleaning;

[0041] The purpose of medical record combination is to provide real and diverse medical record data as a reference for question-answer data synthesis, thereby improving the reliability and diversity of the synthesized data. The process of the medical record combination module is as follows: Figure 1 As shown in the upper part of the figure, in order to ensure the authenticity and reliability of the generated data, it is proposed to generate question-and-answer data based on real perioperative electronic medical records. However, the original medical record data is unevenly distributed. In order to further expand the diversity of case data and provide more usable case data, it is necessary to combine the medical record data;

[0042] Specifically, first, we de-identify the real medical record data to protect the privacy of doctors and patients; next, we extract all the attribute values ​​​​according to the fields in the original medical records, and then randomly shuffle and combine them to form new medical records to expand diversity; finally, we set a series of rules to filter out available medical records to ensure availability.

[0043] The data synthesis module is used to perform data synthesis, synthesize medical question and answer data, and specifically generate diverse and reliable perioperative medical question and answer data; it includes two steps: constructing diversified prompt words and generating data based on large model self-dialogue.

[0044] The data synthesis module process is as follows Figure 1 As shown in the lower part of the figure, first, we will collect good perioperative medical related topics and high-quality seed sets, combine them with medical records, and build diversified prompt words. Secondly, we use ChatGPT to generate questions from the patient's perspective based on the prompt words built in the previous step, and then build answer generation prompt words based on the generated questions, and use ChatGPT to generate answers from the perspective of professional doctors.

[0045] According to a third aspect of an embodiment of the present invention, a processor is provided, wherein the processor is used to run a program, wherein the program, when running, executes any one of the above-mentioned perioperative medical question and answer data synthesis methods.

[0046] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is run, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned perioperative medical question and answer data synthesis methods.

[0047] In order to collect more high-quality perioperative medical data, the present invention proposes a perioperative question-and-answer data generation method based on combined cases and large model self-dialogue strategy. It is divided into two parts, the medical record combination part and the data generation part. In the medical record combination part, in order to improve the authenticity of the synthesized data, it is proposed to use real perioperative electronic medical record data to guide the large model to synthesize medical text data. In the present invention, ChatGPT is used to synthesize medical text data. In order to improve the diversity of synthesized data, a series of rules are set to recombine the electronic medical record data to provide more diverse electronic medical record data. Among them, in order to ensure the correctness of the combined medical record data, a large number of perioperative-related medical rules are set to filter out erroneous data. In the data generation part, a large model self-dialogue generation strategy based on combined conditions is proposed. Specifically, on the one hand, we manually collected high-quality real perioperative medical conversation data as seed sets, and multiple perioperative topics as themes, and combined the two with the above-mentioned combined medical record data to construct diverse prompt words; on the other hand, we divided data synthesis into two stages. The first stage uses ChatGPT to synthesize questions based on the above-mentioned prompt words, and the second stage uses ChatGPT to synthesize answers based on the questions synthesized in the previous stage.

[0048] 110,075 pieces of perioperative medical question and answer data were generated using this method. The perioperative medical question and answer data generated using this method can be used for perioperative medical large model training.

[0049] In order to illustrate the effect of the present invention, a large anesthesia medical model was trained using the data generated by the present invention, and a large number of experiments were set up to verify the effectiveness of the present invention. The present invention uses the anesthesia basic knowledge test set disclosed by Hypnos and the self-collected anesthesia case analysis question and answer data set as the test set, wherein the test set disclosed by Hypnos has a total of 555 single-round question and answer data, and the self-collected test set covers three scenarios before, during and after surgery, with 30 question and answer data for each scenario. The present invention is compared with newer open source large models, including medical fields and general fields, specifically: Qwen1.5-7B-Chat (2024), Baichuan2-7B-Base (2023), Baichuan2-7B-Chat (2023), HuatuoGPT-2-7B (2023), DISC-MedLLM (2023), Bianque2.0 (2023), Hypnos (2024). Among them, for Hypnos, in its training data set, the same amount of training data as the present invention is extracted to reproduce the model. The present invention uses commonly used natural language processing evaluation indicators to evaluate the performance of the model, including BLEU, ROUGE, DISTINCT, and GLEU. Among them, the BLEU series and ROUGE series indicators evaluate the accuracy by calculating the similarity between the output and the label, and the Distinct series indicators and GLEU indicators are used to measure the diversity and fluency of the model response. The experimental results are shown in Tables 1 and 2.

[0050] Table 1 Results of the anesthesia basic knowledge question-answering test set

[0051]

[0052] Table 2 Results of the anesthesia case analysis question answering test set

[0053]

[0054]

[0055] As can be seen from Table 1, in the anesthesia basic knowledge question-answering test set, our model is higher than other models in several indicators such as BLEU, BLEU-2, BLEU-3, ROUGE-2, and GLEU, proving that the model trained using the present invention has excellent anesthesia knowledge understanding ability.

[0056] As can be seen from Table 2, our model is significantly better than other models in both intraoperative and postoperative scenarios, which proves that the model trained using the present invention has excellent case analysis capabilities.

[0057] The specific implementation modes of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.

Claims

1. A method for synthesizing perioperative medical question-and-answer data, characterized in that: The specific steps of the method are as follows: Step 1: Combine medical records to provide real and diverse medical record data; including data privacy removal, attribute extraction, attribute combination, and rule cleaning. Step 2: Perform data synthesis to synthesize medical question and answer data; It includes two steps: constructing diversified prompt words and generating data based on large model self-dialogue.

2. The method for synthesizing perioperative medical question-and-answer data according to claim 1, characterized in that: The data deprivacy includes: Remove private information from electronic medical record data, including name, address, birthday, and ID number, to prevent privacy leakage of patients or doctors.

3. The method for synthesizing perioperative medical question-and-answer data according to claim 1, characterized in that: The attribute extraction includes: extracting and saving attributes related to perioperative medical care, including patient diagnosis information, treatment information, past medical history, physical examination results, laboratory test results, and special circumstances; when extracting attributes, patient diagnosis information and treatment information are bound together to prevent the generation of a large amount of erroneous information; in addition, for text description attributes, including past medical history, only specific description information needs to be extracted and saved; and for numeric attributes, including physical examination results and laboratory test results, a value range is set, and numerical values ​​are randomly generated based on this range for storage.

4. The perioperative medical question-and-answer data synthesis method according to claim 1, characterized in that: The attribute combination includes: when performing attribute combination, randomly extracting corresponding values ​​from previously randomly extracted and saved attributes for combination; in particular, for attributes that may or may not exist, such as past medical history, first set a random number generator to randomly generate 0 or 1 to determine whether there is a medical history; if the generated random number is 0, it means that there is no medical history; if the generated random number is 1, one or more medical histories are randomly extracted from the saved medical history.

5. The perioperative medical question-and-answer data synthesis method according to claim 1, characterized in that: The rule cleaning includes: setting column rules to filter out erroneous data; specifically, these rules include rules based on medical common sense, including whether the patient's age and gender conflict with the diagnosis results and treatment methods, and whether the patient's physiological characteristics are beyond the normal range; and expert consensus rules, including contraindications to treatment methods.

6. The perioperative medical question-and-answer data synthesis method according to claim 1, characterized in that: The construction of diversified prompt words in Step 2 includes: manually collecting medical-related topics and real medical conversations as seed sets, combining medical records, and constructing diversified prompt words.

7. The perioperative medical question-and-answer data synthesis method according to claim 1, characterized in that: The data generation based on the large model self-dialogue in Step 2 includes: using ChatGPT to generate questions from the patient's perspective based on the constructed diverse prompt words; secondly, constructing prompt words based on the generated questions, and using ChatGPT to generate corresponding answers.

8. A perioperative medical question-and-answer data synthesis system, characterized in that: include: Medical record combination module, used to combine medical records and provide real and diverse medical record data; It includes several processes for data privacy removal, attribute extraction, attribute combination, and rule cleaning; The data synthesis module is used to synthesize medical question and answer data. It includes two steps: constructing diversified prompt words and generating data based on large model self-dialogue.

9. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes the perioperative medical question and answer data synthesis method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the perioperative medical question-and-answer data synthesis method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Large language model medical question-answering system based on medical record knowledge graph

    CN117056493A

  • Multi-modal model generation method, multi-modal processing method and equipment

    CN117216202A

  • Method and system for improving performance of vertical domain language model

    CN117312545A

  • Medical large model question answering system based on medical records

    CN118016324A

  • Instruction fine tuning data set processing method and device, storage medium and electronic equipment

    CN118151899A

Cited By

  • Rehabilitation and diagnosis data generation method and equipment for training large medical model

    CN120561221A