Medical text optimization method and system, terminal, medium and program product
By applying text optimization methods based on medical rules and large models in the field of medicine, the problem of inaccurate text generation of models is solved, the accuracy and reliability of text are improved, and the model performance is continuously improved through dynamic optimization mechanisms.
Patent Information
- Application Number
- CN202411342000.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-02-14
AI Technical Summary
The text generated by large pre-trained language models in the medical field is not accurate and logical enough, which may lead to misleading information and affecting patient health.
Using medical text optimization methods based on medical rules and large models, we collect and preprocess original text data in the medical field, select suitable pretrained models for fine-tuning, and establish a medical rule system to evaluate and optimize the generated text.
It significantly improves the accuracy and reliability of the model's text generation in the medical field, reduces the generation of error information, and continuously improves the model's performance.
Smart Images

Figure CN119443054A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of natural language processing and artificial intelligence technology, and in particular to a medical text optimization method, system, terminal, medium and program product. Background Art
[0002] In today's technology, large pre-trained language models have attracted widespread attention for their excellent text generation capabilities. These models can quickly generate fluent and coherent text, but they can also produce inaccurate or misleading information in certain contexts.
[0003] In the field of medicine, which has extremely high requirements for information accuracy and reliability, any tiny error may have an irreversible impact on the patient's health. Therefore, it is particularly urgent and important to develop a mechanism to ensure that the text content generated by these models in the medical field is both accurate and logical. This mechanism will help improve the quality and credibility of medical texts and provide more reliable and accurate information support for patients and medical professionals. Summary of the invention
[0004] In view of the shortcomings of the prior art described above, the purpose of the present application is to provide a medical text optimization method, system, terminal, medium and program product to solve the technical problem of how to improve the text content generated by the model in the medical field to be more accurate and logical.
[0005] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present application provides a medical text optimization method based on medical rules and large models, including: collecting and preprocessing original text data in the medical field, selecting a large pre-trained model suitable for text generation tasks; using the pre-processed original text data in the medical field to fine-tune the large pre-trained model so that the large pre-trained model outputs accurate medical text that complies with medical standards; establishing a medical rule system, which includes at least one medical rule; inputting the medical text output by the large pre-trained model into the medical rule system for evaluation, and feeding back the evaluation results to the large pre-trained model for model optimization.
[0006] In some embodiments of the first aspect of the present application, the raw text data in the medical field is collected and preprocessed, and a large pre-trained model suitable for the text generation task is selected; the pre-processed raw text data in the medical field is used to fine-tune the large pre-trained model, which includes: collecting raw text data in the medical field, the raw text data includes medical questions and answers, case records, medical literature, and clinical public databases; pre-processing the collected raw text data, and the pre-processing method includes any one of the following methods or a combination of multiple methods: data cleaning, text normalization, word segmentation and part-of-speech tagging, expansion of terms and abbreviations, removal of stop words, stem extraction or word form restoration, annotation and classification, construction of vocabulary, data enhancement, data balance and privacy processing; using the pre-processed raw text data in the medical field to fine-tune the large pre-trained model to output medical text that conforms to medical facts and rules. It should be understood here that fine-tuning is a further training for a specific task based on the pre-trained model, with the aim of making the model better adapt to the new task. Here, it refers to adjusting the pre-trained model to a model that can output medical text that conforms to medical facts and rules. Specifically, model fine-tuning can be achieved by adjusting model parameters, such as adjusting the model's learning rate, batch size, training rounds, weights, optimizer, etc.
[0007] In some embodiments of the first aspect of the present application, the large pre-trained model includes an encoder and a decoder; the encoder processes the preprocessed text to extract feature vectors, and the decoder gradually generates text based on the feature vectors output by the encoder, and the words generated at each step depend on the previous words and the context of the encoder; the text output by the decoder is post-processed to generate medical text that conforms to medical standards.
[0008] In some embodiments of the first aspect of the present application, the process of establishing a medical rule system includes: determining the goals of the medical rule system and collecting relevant medical knowledge as the basis for the rules; defining each medical rule according to the format of condition-action pairs; converting the defined medical rules into a format that can be understood and executed by a computer system; integrating a rule engine and a user interface; deploying the system to the target medical environment, and performing continuous maintenance and updates after deployment to adapt to the continuous changes in medical knowledge.
[0009] In some embodiments of the first aspect of the present application, the evaluation results fed back by the medical rule system to the large pre-trained model include: any one of the accuracy evaluation results, completeness evaluation results, logic evaluation results, safety evaluation results, and operability evaluation results, or a combination of multiple evaluation results.
[0010] In some embodiments of the first aspect of the present application, the method of optimizing the large pre-trained model based on the evaluation results fed back by the medical rule system includes any one or more combinations of the following: model parameter adjustment, training data update, multi-task learning, transfer learning, reinforcement learning, model architecture optimization, user interface and interaction optimization.
[0011] To achieve the above-mentioned purpose and other related purposes, the second aspect of the present application provides a medical text optimization system based on medical rules and large models, including: a large model module, used to collect and preprocess original text data in the medical field, and select a large pre-trained model suitable for text generation tasks; use the pre-processed original text data in the medical field to fine-tune the large pre-trained model so that the large pre-trained model outputs accurate medical text that complies with medical standards; and, after receiving the evaluation results sent from the medical rule system, perform model optimization; a medical rule module, used to establish a medical rule system, and the medical rule system includes at least one medical rule.
[0012] To achieve the above-mentioned purpose and other related purposes, the third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the medical text optimization method based on medical rules and large models is implemented.
[0013] To achieve the above-mentioned purpose and other related purposes, the fourth aspect of the present application provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer implements the medical text optimization method based on medical rules and large models.
[0014] To achieve the above-mentioned purpose and other related purposes, the fifth aspect of the present application provides a computer device, including a memory, a processor and a computer program stored in the memory; the processor executes the computer program to implement the medical text optimization method based on medical rules and large models.
[0015] As described above, the medical text optimization method, system, terminal, medium and program product of the present application have the following beneficial effects.
[0016] (1) Improving text accuracy: Utilizing the feedback from the medical rule system can significantly improve the accuracy of text generated by large language models in the medical field and reduce the generation of erroneous information.
[0017] (2) Enhance text reliability: The medical rule system is based on medical knowledge and clinical experience, ensuring that the generated text content conforms to medical facts and rules, thereby improving the reliability of the text.
[0018] (3) Dynamic optimization: Through the feedback optimization mechanism, large language models can be continuously improved and optimized, making their performance in the medical field better and better.
[0019] Therefore, the present invention provides a method for optimizing large-scale model text generation by utilizing feedback from a medical rule system, which solves the problem of inaccurate text generation by large-scale models in the medical field, improves the accuracy and reliability of the text, and is of great significance to text generation in the medical field. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 Shown is an architecture diagram of a medical text optimization method based on medical rules and large models in one embodiment of the present application.
[0021] Figure 2 Shown is a flowchart of a medical text optimization method based on medical rules and large models in one embodiment of the present application.
[0022] Figure 3 Shown is a schematic diagram of the process of fine-tuning a large pre-trained model in one embodiment of the present application.
[0023] Figure 4 Shown is a flowchart of establishing a medical rule system in one embodiment of the present application.
[0024] Figure 5 Shown is a structural schematic diagram of a medical text optimization system based on medical rules and large models in one embodiment of the present application.
[0025] Figure 6 Shown is a schematic diagram of the structure of a computer device in one embodiment of the present application.
[0026] Figure 7 Shown is a schematic diagram of the structure of a computer-readable storage medium in one embodiment of the present application. DETAILED DESCRIPTION
[0027] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0028] First, some terms involved in this application are explained.
[0029] Medical rules refer to a set of standardized guiding principles and operating specifications applied in medical practice. These rules are usually based on medical research, clinical trials and professional consensus, and are intended to ensure the safety, effectiveness and consistency of medical practices. Medical rules can include diagnostic criteria, treatment plans, drug use guidelines, surgical procedures, etc.
[0030] Large models refer to machine learning models with a large number of parameters, such as deep learning networks. These models are able to process and learn large amounts of data due to their large size and complex structure, thus performing well on a variety of tasks. Large models are widely used in natural language processing, image recognition, speech recognition and other fields.
[0031] The GPT-4 model refers to a large pre-trained language model developed by OpenAI. The GPT-4 model is able to understand and generate natural language by pre-training on a large amount of text data, and is widely used in tasks such as text generation, language understanding, and machine translation. The parameter scale and complexity of the GPT-4 model enable it to perform well in processing complex language tasks, but it also requires a lot of computing resources and data to train and run.
[0032] Encoder: The main function is to convert the input sequence (such as text) into a continuous vector representation. This process usually involves converting each word or token in the text into a vector through an embedding layer, and then further processing it through self-attention layers and feed-forward networks. The encoder usually consists of multiple layers, each of which contains a self-attention mechanism and a feed-forward network. The self-attention mechanism allows the model to consider the entire input sequence when processing each word, thereby capturing the dependencies and contextual information between words.
[0033] Decoder: The main function is to generate output sequences (such as text). In text generation tasks, the decoder usually needs to generate text based on the representation of the input sequence provided by the encoder. The decoder also contains self-attention layers and feedforward networks, but it also introduces a special attention mechanism called "masked self-attention" to ensure that only the generated words can be seen when generating text, and future words cannot be "peeked". Each layer of the decoder receives the output of the encoder and the previously generated words as input, and generates a probability distribution for the next word, thereby gradually building an output sequence.
[0034] Secondly, the application scenarios involved in this application are explained.
[0035] The technical solutions of the embodiments of the present application can be applied to various medical scenarios, including but not limited to: clinical decision support, medical research, drug discovery, case report generation, medical question-and-answer systems, medical education and training, medical record summaries, personalized treatment plans, medical data analysis, medical equipment operating manuals, etc.
[0036] Exemplarily, in clinical decision support, the technical solution of the present invention can assist doctors in making more accurate decisions during diagnosis and treatment. In medical research, a large amount of medical literature can be analyzed to extract key information. In drug development, by analyzing medical data and literature, target identification and compound screening in the drug development process are assisted. In case report generation, information is automatically extracted from electronic health records to generate standardized case reports. In the medical question-and-answer system, instant medical consultation is provided to answer questions from patients or medical professionals. In medical education and training, teaching materials and case studies are generated for the education and continuing education of medical students and medical professionals. In the medical record summary, a summary of the patient's medical record is automatically generated for quick review and communication. In the personalized treatment plan, personalized treatment recommendations and health management plans are generated according to the patient's specific situation. In medical data analysis, medical data is analyzed, patterns and trends are identified, and support is provided for medical management and public health decision-making. In the medical equipment operation manual, user manuals and operation guides for medical equipment are generated to ensure the correct use of the equipment.
[0037] Figure 1 The following is a diagram showing an architecture of a medical text optimization method based on medical rules and a large model in an embodiment of the present invention, including the following: First, use large pre-trained models to generate text content related to the medical field, such as diagnostic reports, medical advice, etc.
[0038] Second, a medical rule system is established, which aims to evaluate the accuracy and rationality of the generated text based on medical knowledge and clinical experience.
[0039] The medical rule system contains multiple medical rules (such as medical rule 1, medical rule 2...medical rule n). Each medical rule is a series of standards and guidelines that medical practitioners must follow in clinical practice. These medical rules include but are not limited to: drug use rules, antibiotic prescription rules, vaccination rules, surgical safety rules, infection control rules, patient care rules, emergency medical response rules, medical accident reporting and analysis rules, medical equipment use and maintenance rules, diabetes management rules, hypertension treatment rules, heart disease risk assessment rules, pain management rules, patient discharge rules, nutrition advice rules, pregnancy management rules, mental health assessment rules, etc., which are not listed here one by one.
[0040] Finally, the medical text generated by the large pre-trained model is input into the medical rule system for evaluation. The medical rule system checks the content of the medical text according to the corresponding medical rules and feeds back to the large pre-trained model for optimization and adjustment, thereby generating text that is more in line with medical facts and rules.
[0041] Figure 2 A flowchart of a medical text optimization method based on medical rules and a large model in an embodiment of the present invention is shown. The steps of the method include the following: Step S21: Collect and preprocess original text data in the medical field, select a large pre-trained model suitable for the text generation task; use the pre-processed original text data in the medical field to fine-tune the large pre-trained model so that the large pre-trained model outputs accurate medical text that complies with medical standards.
[0042] Combination Figure 3 The specific execution process of step S21 is described accordingly: First, we collect original text data in the medical field, including medical questions and answers, case records, medical literature, clinical public databases (such as NHANES, CHNS, KNHANES and other databases), etc., to ensure the quality and diversity of the data.
[0043] Secondly, the collected raw text data is preprocessed. The preprocessing methods include but are not limited to: data cleaning, text normalization, word segmentation and part-of-speech tagging, expansion of terms and abbreviations, removal of stop words, stemming or word form restoration, annotation and classification, vocabulary construction, data enhancement, data balancing, privacy processing, etc.
[0044] Specifically, data cleaning refers to removing errors, duplicates, or irrelevant information in the text, such as formatting errors, irrelevant comments, or noisy data. Text normalization means converting the text into a unified format, such as standardizing date and time formats, and standardizing medical terms. Word segmentation and part-of-speech tagging refer to segmenting the text into individual words or phrases and then tagging the part of speech of the segmented results to identify parts of speech such as nouns and verbs. Expansion of terms and abbreviations means expanding abbreviations in the medical field into full names to improve the model's understanding of the text. Removal of stop words refers to removing common words that contribute little to the meaning of the text, such as "de" (of), "he" (and), etc. Stemming or lemmatization means reducing the variants of words to their basic forms to facilitate model processing. Annotation and classification refer to annotating the text, such as distinguishing different types like diagnostic reports and case records, and classifying the text according to its content (such as by disease type or treatment method, etc.). Building a vocabulary means constructing a professional vocabulary in the medical field based on the collected data for the model to learn and reference. Data augmentation means increasing data diversity through methods such as synonym replacement and sentence restructuring to improve the model's generalization ability. Data balancing means ensuring the balance of various types of medical text data to prevent the model from being biased towards certain categories. Privacy protection means removing or anonymizing patients' personal information to protect patients' privacy.
[0045] Finally, the preprocessed original text data in the medical field is used to fine-tune a large pre-trained model, so as to output medical texts that conform to medical facts and rules.
[0046] Specifically, a large pre-trained model can be a large model suitable for text generation, usually referring to a deep learning model pre-trained with a vast amount of data. By training on a large amount of text data, they learn the patterns and structures of the language, and thus can perform various language tasks, which include but are not limited to text generation, translation, summarization, question answering, etc.
[0047] The large pre-trained models in the embodiments of the present invention may be: GPT (Generative Pre-trained Transformer) model, BERT (Bidirectional Encoder Representations from Transformers) model, T5 (Text-to-Text Transfer Transformer) model, LLaMA (Large Language Model Meta AI) model. Among them, the GPT model includes GPT-3, GPT-4, etc. The BERT model is mainly used for language understanding tasks and can also be used to generate text. The T5 model is a pre-trained text-to-text conversion model that can be used for text generation and understanding tasks. The LLaMA model focuses on providing high-quality text generation and understanding capabilities.
[0048] Furthermore, the structure of large pre-trained models usually includes an encoder and a decoder. The encoder processes the pre-processed text to extract feature vectors, and the decoder generates text step by step based on the feature vectors output by the encoder. The words generated at each step depend on the previous words and the context of the encoder. The text output by the decoder needs to be post-processed, such as format adjustment, terminology standardization, and removal of redundant information, to ensure that the output text meets medical standards.
[0049] The encoder receives the raw text data as input and converts it into a format that the model can understand, such as a word embedding vector. The encoder contains multiple Transformer layers, each of which consists of a self-attention mechanism and a feedforward neural network. The self-attention mechanism allows the model to capture long-distance dependencies in the input text. In order for the model to understand the position of words in the text, position encoding can be used, which helps the model understand word order and sentence structure. In addition, each Transformer layer can contain multiple attention heads, allowing the model to focus on different aspects of the input at the same time, such as grammatical structure, semantic information, etc.
[0050] The decoder predicts the next word based on the encoder's output and the previously generated word sequence. When generating text, the decoder usually uses a causal mask to avoid leakage of future information. The decoder uses an autoregressive mechanism, that is, when generating each new word, it depends on the previously generated words. When generating text, the decoder takes into account the contextual information provided by the encoder and the previously generated word sequence to generate coherent and semantically reasonable text.
[0051] Step S22: Establishing a medical rule system, wherein the medical rule system includes at least one medical rule.
[0052] Exemplarily, the process of establishing a medical rule system includes: Figure 4 The various steps in .
[0053] Step S221: Determine the goal of the medical rule system and collect relevant medical knowledge as the basis for the rules.
[0054] Exemplarily, the goals of the medical rule system include the medical problems to be solved, the expected users, and the functions that the system should have. In other words, when determining the goals of the medical rule system, it is necessary to consider specific medical scenarios, user needs, and the possibility of technical implementation. For example, for medical diagnosis rules, the medical problem to be solved is to improve the accuracy and efficiency of diagnosis. The expected users are primary care doctors, specialists, etc. The system functions include providing a list of possible diseases and examination suggestions by analyzing symptoms, signs, and examination results. For example, for antibiotic prescription rules, the medical problem to be solved is to reduce the abuse of antibiotics and control the development of drug resistance. The expected users are doctors, pharmacists, infection control experts, etc. The system functions include monitoring antibiotic prescription patterns, providing alternative treatment options and analysis reports on drug resistance trends. For example, for chronic disease self-management rules, the medical problem to be solved is to improve the self-management ability of chronic disease patients. The expected users are chronic disease patients and family doctors. The system functions include providing personalized health education, monitoring patients' daily activities and physiological indicators, etc. For another example, for medical image analysis rules, the medical problem to be solved is to improve the efficiency and accuracy of medical image analysis. The expected users are radiologists and imaging technicians. The system functions include automatically identifying abnormal areas in images, assisting doctors in diagnosis and providing quantitative analysis of lesions. The above examples show that different medical rules correspond to medical problems, expected users, and system functions. Since medical rules are relatively rich, they are not listed here one by one.
[0055] Exemplarily, relevant medical knowledge is collected as the basis for rules, including clinical guidelines, treatment protocols, diagnostic criteria, etc., which will serve as the basis for the medical rule system.
[0056] Step S222: Define each medical rule according to the format of condition-action pairs.
[0057] Defining medical rules in the format of IF-THEN rules is an effective way to express clinical policy logic. For example, for the diabetes management rule, the condition-action pair is "If the patient's fasting blood glucose level is greater than or equal to 126 mg / dL (7.0 mmol / L), diagnose diabetes." For example, for the antibiotic prescription rule, the condition-action pair is "If the patient has an upper respiratory tract infection and the pathogen detected is streptococcus, prescribe penicillin antibiotics." For example, for the hypertension treatment rule, the condition-action pair is "If the adult patient's blood pressure is continuously greater than or equal to 140 / 90 mmHg, start antihypertensive medication." For example, for the pain management rule, the condition-action pair is "If the patient reports a pain level of 7 or above (using a pain scale of 0-10), consider using opioid analgesics." For another example, for the pre-operative preparation rule, the condition-action pair is "If the patient is scheduled for major surgery, blood coagulation function tests are required." For another example, for a nutrition advice rule, the condition-action pair is "If the patient is diagnosed with malnutrition, provide high-protein and high-calorie diet advice." For another example, for a pregnancy management rule, the condition-action pair is "If a pregnant woman develops gestational hypertension, she needs to be closely monitored and may need medication." The above examples show how to define various medical rules according to the format of condition-action pairs. Since medical rules are relatively rich, they are not listed here one by one.
[0058] Step S223: Convert each defined medical rule into a format that can be understood and executed by a computer system.
[0059] It should be understood that the process of converting medical rules into a computer executable format mainly includes selecting a rule language, defining a data structure, coding rules, integrating a rule engine, testing and maintenance, and designing a user interface to ensure the accuracy and adaptability of the rules. For example, if there is a rule that "if the patient is over 65 years old and the blood pressure is higher than 140 / 90 mmHg, then hypertension treatment is recommended", this rule can be encoded as an IF-THEN statement and executed in the rule engine. When the input patient data meets the conditions, the system will automatically recommend the corresponding treatment plan.
[0060] Step S224: Integrate the rule engine and the user interface.
[0061] It should be understood that integrating the rule engine and the user interface is a key step in building a medical rule system, which ensures that the system can receive medical data input, process this data through the rule engine and trigger the corresponding rules, and then feed back the results of the rule execution to medical professionals through the user interface. This process not only improves the efficiency of medical decision-making, but also enhances the accuracy and transparency of decision-making, allowing medical professionals to quickly understand the reasons behind the decision and make more informed clinical decisions accordingly.
[0062] Step S225: Deploy the system to the target medical environment, and perform continuous maintenance and updates after deployment to adapt to the continuous changes in medical knowledge.
[0063] It should be understood that the medical rule system provided in the embodiments of the present application can be deployed in a variety of target medical environments to ensure its deep integration with medical practice and improve the quality and efficiency of medical services. The above-mentioned target medical environments include but are not limited to hospital environments, clinics and doctors' offices, nursing and sanatoriums, emergency service locations, outpatient treatment locations, clinical laboratories, home health care environments, etc., and the embodiments of the present application do not limit this.
[0064] Step S23: input the medical text output by the large pre-trained model into the medical rule system for evaluation, and feed the evaluation result back to the large pre-trained model for model optimization.
[0065] It should be understood that submitting text generated by large models to medical rule systems for evaluation and optimizing based on feedback is an iterative process aimed at improving the accuracy and reliability of text generation.
[0066] In one possible application scenario, a large pre-trained model generates a medical text containing a description of a specific drug interaction and submits the generated medical text to a medical rule system that has built-in clinical guidelines and rules for drug interactions. The medical rule system evaluates whether the drug interactions in the text are consistent with current medical knowledge and identifies any potential errors or omissions. The medical rule system feeds the evaluation results back to the large pre-trained model, which adjusts the training data and algorithm parameters of the language model based on the system's feedback to strengthen the model's understanding of drug interaction rules. Subsequently, the text is regenerated using the optimized model and submitted to the rule system for evaluation again to verify the optimization effect.
[0067] In another possible application scenario, a large pre-trained model generates a personalized treatment recommendation report based on the patient's specific medical records and test results. This treatment recommendation report is then submitted to the medical rule system, which evaluates it based on the latest clinical pathways and treatment guidelines. The medical rule system analyzes the medical recommendations in the report, evaluates whether there are any violations of medical rules or clinical guidelines, and provides detailed feedback. Based on the feedback from the medical rule system, the large model is fine-tuned, including adjusting the model's decision logic or expanding the medical cases in the training data. After the model is optimized, the treatment recommendation report is generated again and submitted to the rule system for review to ensure that the generated text is more accurate and personalized.
[0068] Preferably, the evaluation results fed back by the medical rule system to the large pre-trained model include but are not limited to: accuracy evaluation results, completeness evaluation results, logic evaluation results, safety evaluation results, operability evaluation results, etc.
[0069] It should be understood that the accuracy assessment results are intended to point out where the information in the text is inconsistent with known medical facts or clinical guidelines. For example, if the text generated by the large model recommends the use of a certain antibiotic to treat a viral infection, the rule system will point out this error because antibiotics are only applicable to bacterial infections. The consistency assessment results are intended to point out the key information or suggestions that are indeed in the text. For example, if the generated diagnostic report does not contain necessary patient history information or test results, the rule system will remind you to supplement this information. The logic assessment results are intended to identify logical errors or unreasonable conclusions in the text. For example, if the recommendations in the text are based on incorrect premises or causal relationships, the rule system will point out the logical inconsistency. The safety assessment results are intended to alert risks or errors that may pose a threat to patient safety. For example, if the drug dosage in the text exceeds the safe range, the rule system will warn of this potential medical accident. The operability assessment results are intended to evaluate whether the recommendations in the text are specific, clear, and easy for medical professionals to implement. For example, if the treatment recommendations are too vague and there are no specific operating steps or parameters, the rule system will require more detailed guidance.
[0070] Preferably, the large pre-trained model is optimized according to the evaluation results sent by the medical rule system. Model optimization methods include but are not limited to: model parameter adjustment, training data update, multi-task learning, transfer learning, reinforcement learning, model architecture optimization, user interface and interaction optimization, etc.
[0071] Model parameter adjustment, including adjusting the model's learning rate, batch size, number of training rounds and other hyperparameters to improve the model's learning efficiency and performance. Training data update, including adding errors and deficiencies identified by the medical rule system as new data to the training set to enhance the model's accuracy in these areas. Multi-task learning refers to training models to perform multiple related tasks simultaneously, such as text classification, entity recognition, and text generation, to improve their understanding of medical text. Transfer learning refers to the use of transfer learning technology to apply models pre-trained on large data sets to specific medical field data for fine-tuning. Model architecture optimization refers to adjusting the model architecture according to the characteristics of medical text, such as adding specific layers or changing the attention mechanism to better capture medical information. User interface and interaction optimization refers to optimizing the user interface to provide a more intuitive way of interaction so that medical professionals can more easily provide feedback.
[0072] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first XX and the second XX are only used to distinguish different XXs, and do not limit their order. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0073] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" represent examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0074] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, ab, ac, bc or abc, where a, b, c can be single or multiple.
[0075] Figure 5The schematic diagram of the structure of a medical text optimization system based on medical rules and large models in an embodiment of the present invention is shown. The system includes a large model module 51 and a medical rule module 52.
[0076] The large model module 51 is used to collect and preprocess original text data in the medical field, select a large pre-trained model suitable for the text generation task; use the pre-processed original text data in the medical field to fine-tune the large pre-trained model so that the large pre-trained model outputs accurate medical text that complies with medical standards; and optimize the model after receiving the evaluation results sent from the medical rule system.
[0077] The medical rule module 52 is used to establish a medical rule system, wherein the medical rule system includes at least one medical rule.
[0078] It should be understood that the specific process of each module executing the above corresponding steps has been described in detail in the above method embodiment, and for the sake of brevity, it will not be repeated here. Figure 5 In the structure shown, the big model module 51 and the medical rule module 52 can be deployed on a single computing device, or deployed in a computing device cluster, for example, computing device A deploys the big model module 51 and computing device A deploys the medical rule module 52.
[0079] It should also be understood that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0080] Figure 6 is a schematic block diagram of a computer device provided in an embodiment of the present application. Figure 6 As shown in FIG. 6 , the computer device includes: at least one processor 601, a memory 602, at least one network interface 603, and a user interface 605. The various components in the device are coupled together through a bus system 604. It can be understood that the bus system 604 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 604 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 604 is not described in detail. Figure 6 In the specification, various buses are labeled as bus systems.
[0081] The user interface 605 may include a display, a keyboard, a mouse, a trackball, a click gun, keys, buttons, a touch pad or a touch screen.
[0082] It is understood that the memory 602 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM). The memory described in the embodiments of the present invention is intended to include but is not limited to these and any other suitable categories of memory.
[0083] The memory 602 in the embodiment of the present invention is used to store various types of data to support the operation of the electronic terminal 600. Examples of these data include: any executable program used to operate on the electronic terminal 600, such as an operating system 6021 and an application 6022; the operating system 6021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application 6022 can include various applications, such as a media player (Media Player), a browser (Browser), etc., for implementing various application services. The XX method provided by the embodiment of the present invention can be included in the application 6022.
[0084] The method disclosed in the above embodiment of the present invention can be applied to the processor 601, or implemented by the processor 601. The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 601 or the instruction in the form of software. The above processor 601 may be a general processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 601 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present invention. The general processor 601 may be a microprocessor or any conventional processor, etc. In combination with the steps of the accessory optimization method provided in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0085] In an exemplary embodiment, the electronic terminal 600 may be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD) to execute the aforementioned method.
[0086] After introducing the method and apparatus of the exemplary embodiment of the present application, next, referring to Figure 6 For a description of the computer-readable storage medium of the exemplary embodiment of the present application, please refer to Figure 6 The computer-readable storage medium shown is a CD 60 on which a computer program (ie, a program product) is stored. When the computer program is executed by the processor, the steps recorded in the above method implementation will be implemented, which will not be repeated here.
[0087] The present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes the medical text optimization method based on medical rules and large models in any one of the above embodiments.
[0088] The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process, a processor, an object, an executable file, an execution thread, a program and / or a computer running on a processor. By way of illustration, both applications and computing devices running on a computing device can be components. One or more components may reside in a process and / or an execution thread, and a component may be located on a computer and / or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. Components may, for example, communicate through local and / or remote processes according to signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system and / or a network, such as the Internet interacting with other systems through signals).
[0089] Those of ordinary skill in the art will appreciate that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0090] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0091] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0092] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0093] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0094] In the above embodiments, the functions of each functional unit can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. Available media may be magnetic media (e.g., floppy disks, hard disks, tapes), optical media (e.g., high-density digital video discs (DVDs), or semiconductor media (e.g., solid state disks (SSDs)).
[0095] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0096] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0097] In summary, the present application provides a medical text optimization method, system, terminal, medium and program product, which solves the problem of inaccurate text generation by large models in the medical field, improves the accuracy and reliability of the text, and is of great significance to text generation in the medical field. Therefore, the present application effectively overcomes various shortcomings in the prior art and has a high industrial utilization value.
[0098] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A medical text optimization method based on medical rules and large models, characterized in that: include: Collect and preprocess raw text data in the medical field and select large pre-trained models suitable for text generation tasks; Using the preprocessed raw text data in the medical field to fine-tune the large pre-trained model, so that the large pre-trained model outputs accurate medical text that complies with medical standards; Establishing a medical rule system, wherein the medical rule system includes at least one medical rule; The medical text output by the large pre-trained model is input into the medical rule system for evaluation, and the evaluation result is fed back to the large pre-trained model for model optimization.
2. The medical text optimization method based on medical rules and large models according to claim 1 is characterized in that: The collecting and preprocessing of raw text data in the medical field and the selection of a large pre-trained model suitable for text generation tasks; Fine-tune the large pre-trained model using the pre-processed raw text data in the medical field, which includes: Collecting original text data in the medical field, the original text data includes medical questions and answers, case records, medical literature, and clinical public databases; Preprocess the collected raw text data. The preprocessing methods include any one or a combination of the following methods: data cleaning, text normalization, word segmentation and part-of-speech tagging, term and abbreviation expansion, stop word removal, stemming or word form restoration, annotation and classification, vocabulary building, data enhancement, data balancing and privacy processing; The large pre-trained model is fine-tuned using pre-processed raw text data in the medical field to output medical text that conforms to medical facts and rules.
3. The medical text optimization method based on medical rules and large models according to claim 1 or 2, characterized in that: The large pre-trained model includes an encoder and a decoder; the encoder processes the pre-processed text to extract feature vectors, and the decoder gradually generates text according to the feature vectors output by the encoder, and the words generated in each step depend on the previous words and the context of the encoder; the text output by the decoder is post-processed to generate medical text that meets medical standards.
4. The medical text optimization method based on medical rules and large models according to claim 1 is characterized in that: The process of establishing the medical rule system includes: Determine the goals of the medical rule system and collect relevant medical knowledge as the basis for the rules; Each medical rule is defined according to the format of condition-action pairs; Convert the defined medical rules into a format that can be understood and executed by computer systems; Integrate rules engine and user interface; Deploy the system to the target medical environment and perform continuous maintenance and updates after deployment to adapt to the continuous changes in medical knowledge.
5. The medical text optimization method based on medical rules and large models according to claim 1 is characterized in that: The evaluation results fed back by the medical rule system to the large pre-trained model include: any one of the accuracy evaluation results, integrity evaluation results, logic evaluation results, safety evaluation results, and operability evaluation results, or a combination of multiple evaluation results.
6. The medical text optimization method based on medical rules and large models according to claim 1 is characterized in that: Methods for optimizing large pre-trained models based on the evaluation results fed back by the medical rule system include any one or more combinations of the following: model parameter adjustment, training data update, multi-task learning, transfer learning, reinforcement learning, model architecture optimization, user interface and interaction optimization.
7. A medical text optimization system based on medical rules and large models, characterized in that: include: The large model module is used to collect and preprocess raw text data in the medical field and select large pre-trained models suitable for text generation tasks; Using the preprocessed raw text data in the medical field to fine-tune the large pre-trained model, so that the large pre-trained model outputs accurate medical text that complies with medical standards; and, performing model optimization after receiving evaluation results sent from the medical rule system; The medical rule module is used to establish a medical rule system, wherein the medical rule system includes at least one medical rule.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the medical text optimization method based on medical rules and large models described in any one of claims 1 to 6 is implemented.
9. A computer program product, characterized in that The computer program product includes computer program code, and when the computer program code is executed on a computer, the computer implements the medical text optimization method based on medical rules and large models as described in any one of claims 1 to 6.
10. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the medical text optimization method based on medical rules and large models as described in any one of claims 1 to 6.