Medical document regular expression generation method and device based on large language model

Through the method based on the large language model, the regular expressions of medical documents are generated and optimized, which solves the problem of high technical threshold and real-time quality of regular expression writing and maintenance, and realizes that medical engineers independently handle medical documents, improving processing efficiency and accuracy .

CN118709661BActive Publication Date: 2024-12-06JILIN SENYI INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411204040.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-06
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

In the prior art, using regular expressions to perform structured medical documents has high technical barriers to writing and maintaining, manual writing is time-consuming and error-prone, and it is difficult to meet real-time requirements, and requires medical engineers and R&D engineers to cooperate to increase labor costs and communication complexity.

Method used

Using a method based on a large language model, the initial regular expression is generated by obtaining natural language descriptions of medical terms and logical rules, and through iterative optimization process, using natural language annotation and feedback information, optimize the generation of the final regular expression, and reduce writing and reading thresholds to improve processing efficiency and accuracy.

Benefits of technology

It realizes that medical engineers can independently write and optimize regular expressions, significantly improve the accuracy and efficiency of medical documents processing, reduce labor costs, simplify technical thresholds, and is suitable for real-time processing of unstructured medical documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118709661B_ABST
    Figure CN118709661B_ABST
Patent Text Reader

Abstract

A method and device for generating regular expressions for medical documents based on a large language model, belonging to the field of medical information management, particularly to the structured processing of medical documents; the method solves the problem that the writing and reading of regular expressions in the existing process of using regular expressions to structure unstructured medical documents are difficult, and the process of manually writing and optimizing regular expressions is time-consuming and error-prone, difficult to meet real-time requirements, and has high labor costs and high communication complexity; the method includes the following steps: inputting correct matching results, incorrect matching results, content omitted from matching results in actual medical texts, and natural language annotations into a fine-tuned large language model to obtain the regular expression optimized for this iteration. The method and device for generating regular expressions for medical documents based on a large language model are suitable for structured processing of unstructured medical documents.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical information management, and in particular to automated structured processing of medical documents. Background Art

[0002] In modern medical practice, the number of medical documents is huge and the information is complex. Medical documents mainly include case documents and various medical records. These documents are usually in unstructured text form, which brings great challenges to information extraction and processing.

[0003] The processing of unstructured medical documents is a key issue in medical information management because these documents contain a large amount of important medical information, such as diagnosis, treatment plans, medication usage records, etc.

[0004] At present, a common method for structuring unstructured medical documents is to use regular expressions. Regular expressions are a powerful text matching tool that can be used to extract specific terms and information from documents. However, the writing and maintenance of regular expressions has certain technical barriers, especially for medical engineers who often lack a computer science background and find it difficult to write complex regular expressions. In addition, the logical complexity of regular expressions is high, involving issues such as the relationship between multiple terms, range limitation, and negation processing, which makes it difficult to write and read regular expressions. At the same time, the number of medical documents in hospitals is huge, and there are certain requirements for real-time performance. Initial structured processing usually relies on regular expressions for rapid extraction and matching. However, the process of manually writing and optimizing regular expressions is time-consuming and error-prone, which seriously affects work efficiency and the accuracy of document processing. Traditionally, this work usually requires medical engineers to collaborate with a research and development engineer who is familiar with regular expressions, which increases labor costs and communication complexity. Summary of the invention

[0005] The present invention proposes a method and device for generating regular expressions for medical documents based on a large language model, which solves the problems existing in the existing process of using regular expressions to structure unstructured medical documents: the writing and maintenance of regular expressions have certain technical barriers, and it is difficult for medical engineers to write and read them. The process of manually writing and optimizing regular expressions is time-consuming and error-prone, which makes it difficult to meet the real-time requirements of medical document processing. At the same time, it also requires the collaboration of R&D engineers, which increases the labor cost and communication complexity.

[0006] The method for generating a medical document regular expression based on a large language model described in the present invention has the following technical solutions:

[0007] The method comprises the following steps:

[0008] Steps to obtain a fine-tuned large language model;

[0009] A step of obtaining a natural language description of medical terms and logic rules in actual medical texts, and using the natural language description as an input of a fine-tuned large language model to generate an initial regular expression;

[0010] The steps of iteratively optimizing the initial regular expression; each iterative optimization step includes the following steps:

[0011] The regular expression optimized in the previous iteration is used to match the medical terms and logic rules in the actual medical text to obtain a matching result; wherein the regular expression optimized in the previous iteration of the first iteration optimization is the step of the initial regular expression;

[0012] According to the actual medical text and the matching results, the correct matching results, the incorrect matching results and the contents omitted from the matching results in the actual medical text are identified, and a natural language annotation step is adopted;

[0013] The step of inputting the correct matching results, the incorrect matching results, the content omitted from the matching results in the actual medical text, and the natural language annotations as feedback information into the fine-tuned large language model to obtain the regular expression optimized in this iteration;

[0014] According to the regular expression after this iteration optimization, the steps to determine whether the conditions for ending the iteration optimization are met are as follows:

[0015] If the iterative optimization end condition is met, the regular expression after this iterative optimization is used as the final regular expression generated, and the fine-tuned large language model after the last iterative optimization is used as the final large language model step;

[0016] Otherwise, continue to the next iterative optimization step.

[0017] Furthermore, a preferred implementation is provided, wherein the correct matching results, incorrect matching results, missing contents in the matching results of the actual medical text, and natural language annotations are input as feedback information into the fine-tuned large language model, and the steps of obtaining the regular expression after this iteration optimization are as follows:

[0018] The correct matching results, incorrect matching results, content omitted from the matching results in the actual medical text, and natural language annotations are added to the context of generating the regular expression through prompt words as feedback information, and input into the fine-tuned large language model;

[0019] The fine-tuned large language model optimizes the generated regular expression according to the feedback information to obtain the regular expression optimized in this iteration.

[0020] Further, a preferred implementation is provided, wherein the iterative optimization termination condition is:

[0021] The regular expressions optimized in this iteration were used to match medical terms and logical rules in actual medical texts, and the evaluation values ​​of the accuracy and completeness of the matching results obtained reached the given thresholds.

[0022] Furthermore, a preferred embodiment is provided, wherein the method further comprises the following steps: using the final large language model to parse the final generated regular expression to obtain its natural language description.

[0023] Furthermore, a preferred embodiment is provided, wherein the method further comprises the following steps: forming a natural language description document according to the natural language description of the regular expression finally generated.

[0024] Furthermore, a preferred embodiment is provided, wherein the fine-tuned large language model is obtained by the following method:

[0025] S1. Obtain original medical texts;

[0026] S2. Perform data cleaning on the original medical text to remove sensitive information and irrelevant content, and obtain the medical text after data cleaning;

[0027] S3, annotate the medical text after data cleaning, identify key medical terms, relevant logical relationships and their contexts, and obtain the annotated medical text;

[0028] S4. Select a general large language model as the basic model and use general data to perform preliminary training on the basic model;

[0029] S5. Use the annotated medical text as input and fine-tune the basic model to enable it to understand and process medical terms and their logical relationships, and obtain a fine-tuned large language model.

[0030] Further, a preferred embodiment is provided, which further includes the following steps after step S5:

[0031] S6. Use medical texts that have not participated in fine-tuning training to verify the fine-tuned large language model and evaluate its performance in tasks such as regular expression generation and logical relationship processing;

[0032] S7. Based on the evaluation results, further optimize and adjust the fine-tuned large language model.

[0033] The present invention also proposes a medical document regular expression generation device based on a large language model, and its technical solution is as follows:

[0034] The device comprises the following modules:

[0035] Get the module of the fine-tuned large language model;

[0036] A module for obtaining natural language descriptions of medical terms and logic rules in actual medical texts, and using the natural language descriptions as inputs to a fine-tuned large language model to generate an initial regular expression;

[0037] A module that iteratively optimizes the initial regular expression; each iterative optimization module includes the following submodules:

[0038] The regular expression optimized in the previous iteration is used to match the medical terms and logic rules in the actual medical text to obtain a matching result; wherein the regular expression optimized in the previous iteration of the first iteration optimization is a submodule of the initial regular expression;

[0039] According to the actual medical text and matching results, the correct matching results, incorrect matching results and the content omitted in the matching results of the actual medical text are identified, and a submodule of natural language annotation is used;

[0040] The correct matching results, incorrect matching results, missing contents in the matching results of the actual medical text, and natural language annotations are input into the fine-tuned large language model as feedback information to obtain the sub-module of the regular expression optimized in this iteration;

[0041] According to the regular expression after this iteration optimization, determine whether the sub-module meets the conditions for ending the iteration optimization:

[0042] If the iterative optimization end conditions are met, the regular expression after this iterative optimization is used as the final regular expression generated, and the fine-tuned large language model after the last iterative optimization is used as the submodule of the final large language model;

[0043] Otherwise, continue to the next iterative optimization of the submodule.

[0044] The present invention also proposes a computer program product, and its technical solution is as follows:

[0045] A computer program product includes: a processor and a memory, wherein the memory is used to store executable instructions of the processor, and the processor is configured to execute the above-mentioned method for generating medical document regular expressions based on a large language model by executing the executable instructions.

[0046] The present invention also proposes a computer storage medium, and its technical solution is as follows:

[0047] A computer storage medium stores a computer program, and when the computer program is run, the method for generating a medical document regular expression based on a large language model is executed.

[0048] The present invention has the following beneficial effects:

[0049] 1. The method for generating regular expressions for medical documents based on a large language model described in the present invention fine-tunes the general large language model to enable it to have the ability to understand and process medical professional terms and logical relationships. Medical engineers can directly generate regular expressions through natural language descriptions; at the same time, it also provides a parsing function for existing regular expressions to help medical engineers better understand and optimize these expressions.

[0050] 2. The medical document regular expression generation method based on the large language model described in the present invention, by fine-tuning the trained large language model to write and optimize regular expressions, realizes that when unstructured medical documents are structured, regular expressions can be efficiently and quickly written using natural language, and the regular expressions have medical business connotations. At the same time, the regular expressions can be parsed into natural language, which greatly reduces the technical threshold for writing, optimizing and reading regular expressions, so that medical engineers can write and read regular expressions alone, reducing labor costs, significantly improving the accuracy and efficiency of medical document processing, and providing strong technical support for the information management system of medical institutions.

[0051] The method and device for generating a medical document regular expression based on a large language model described in the present invention are suitable for structuring unstructured medical documents. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0053] Figure 1 A schematic diagram of a process for generating a medical document regular expression based on a large language model in one embodiment of the present invention;

[0054] Figure 2 A schematic diagram of a process for obtaining a fine-tuned large language model in one embodiment of the present invention;

[0055] Figure 3 The figure is a schematic diagram of a human-computer interaction interface of a medical document regular expression generation device based on a large language model in one embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the technical solutions and advantages of the present invention more clearly described, the specific implementation methods of the present invention will be further described in detail and completely in conjunction with the accompanying drawings. The various implementation methods described below are only part of the preferred solutions of the present invention, rather than all implementation methods; the various implementation methods described below are intended to explain the present invention and cannot be understood as limitations on the present invention; the reasonable combination of technical features defined in the various implementation methods of the present invention, and all other implementation methods obtained by ordinary technicians in the field without creative work based on the implementation methods of the present invention, are within the scope of protection of the present invention.

[0057] Implementation Method 1: Combination Figures 1 to 3 This embodiment describes a method for generating a medical document regular expression based on a large language model. The specific implementation contents are as follows:

[0058] The method comprises the following steps:

[0059] Steps to obtain a fine-tuned large language model;

[0060] A step of obtaining a natural language description of medical terms and logic rules in actual medical texts, and using the natural language description as an input of a fine-tuned large language model to generate an initial regular expression;

[0061] The steps of iteratively optimizing the initial regular expression; each iterative optimization step includes the following steps:

[0062] The regular expression optimized in the previous iteration is used to match the medical terms and logic rules in the actual medical text to obtain a matching result; wherein the regular expression optimized in the previous iteration of the first iteration optimization is the step of the initial regular expression;

[0063] According to the actual medical text and the matching results, the correct matching results, the incorrect matching results and the contents omitted from the matching results in the actual medical text are identified, and a natural language annotation step is adopted;

[0064] The step of inputting the correct matching results, the incorrect matching results, the content omitted from the matching results in the actual medical text, and the natural language annotations as feedback information into the fine-tuned large language model to obtain the regular expression optimized in this iteration;

[0065] According to the regular expression after this iteration optimization, the steps to determine whether the conditions for ending the iteration optimization are met are as follows:

[0066] If the iterative optimization end condition is met, the regular expression after this iterative optimization is used as the final regular expression generated, and the fine-tuned large language model after the last iterative optimization is used as the final large language model step;

[0067] Otherwise, continue to the next iterative optimization step.

[0068] Furthermore, a preferred implementation is provided, which identifies correct matching results and incorrect matching results by highlighting them for easy viewing.

[0069] Furthermore, a preferred implementation is provided, wherein the correct matching results, incorrect matching results, content omitted from the matching results in the actual medical text, and natural language annotations are input as feedback information into the fine-tuned large language model to obtain the regular expression after this iteration optimization, and the specific steps are as follows:

[0070] The correct matching results, incorrect matching results, content omitted from the matching results in the actual medical text, and natural language annotations are added to the context of generating the regular expression through prompt words as feedback information, and input into the fine-tuned large language model;

[0071] The fine-tuned large language model optimizes the generated regular expression according to the feedback information to obtain the regular expression optimized in this iteration.

[0072] In this implementation, examples of prompt words are as follows:

[0073] ###SYSTEM

[0074] You are a regular expression output tool, USER will input the regular expression requirements. You need to return the result in the following JSON format. `{"regex":"{result}"}`

[0075] USER will then return the incorrect matching results and missing matching results to you in the following format {

[0076] "review": [

[0077] {

[0078] "type":0|1, / / The result is 0 if it is an error and 1 if it is missing

[0079] "raw":"", / / incorrectly matched text or missing text

[0080] "comment":"", / / Comments on errors or missing results

[0081] } ]

[0083] }

[0084] Extract the symptoms and the number of days following the symptoms of USER's cough, abdominal pain, fever, and diarrhea respectively

[0085] ASSISTANT

[0086] { "regex": "(Cough|Abdominal pain|Fever|Diarrhea)( \\d+) days "}

[0087] USER

[0088] (This part of the input is automatically generated)

[0089] {

[0090] "review":

[0091] {

[0092] "type":1,

[0093] "raw":"Cough for three days",

[0094] "comment":"No matching text like XX days was found",

[0095] }

[0097] }

[0098] ASSISTANT

[0099] { "regex": "(Cough|Abdominal pain|Fever|Diarrhea)( \\d+)(day | days)"}

[0100] Through the above technical solutions, the process of medical engineers writing and optimizing regular expressions can be significantly simplified, the efficiency and accuracy of structured processing of medical documents can be improved, and strong technical support can be provided for medical information management.

[0101] Furthermore, a preferred implementation is provided, and the end condition for iterative optimization is as follows:

[0102] Using the regular expression after this iterative optimization to match medical terms and logical rules in actual medical texts, the evaluation values of the accuracy and integrity of the obtained matching results both reach a given threshold.

[0103] ​Furthermore, a preferred embodiment is provided, wherein the method further comprises the following steps: using the final large language model to parse the final generated regular expression to obtain its natural language description, so as to help medical engineers understand the logic and matching rules of the regular expression.

[0104] Furthermore, a preferred implementation is provided, which forms a natural language description document based on the natural language description of the regular expression finally generated, so as to facilitate subsequent viewing and maintenance.

[0105] In this implementation, the large language model technology is used to simplify the writing and parsing process of regular expressions, which greatly reduces the technical threshold for medical engineers and improves the efficiency and accuracy of medical document processing, so that medical engineers can independently develop and optimize regular expressions without relying on the assistance of R&D engineers. This method is not only suitable for existing medical document processing needs, but also provides strong technical support for more complex medical information management in the future.

[0106] Implementation Method 2: Combination Figures 1 to 3 This embodiment is described. This embodiment is a further limitation of the method for generating a medical document regular expression based on a large language model described in the first embodiment. The specific implementation contents are as follows:

[0107] The fine-tuned large language model is obtained by the following method:

[0108] S1. Obtain original medical texts;

[0109] S2. Perform data cleaning on the original medical text to remove sensitive information and irrelevant content, and obtain the medical text after data cleaning;

[0110] S3, annotate the medical text after data cleaning, identify key medical terms, relevant logical relationships and their contexts, and obtain the annotated medical text;

[0111] S4. Select a general large language model as the basic model and use general data to perform preliminary training on the basic model;

[0112] S5. Use the annotated medical text as input and fine-tune the basic model to enable it to understand and process medical terms and their logical relationships, and obtain a fine-tuned large language model.

[0113] In this implementation, a general large language model, such as LLAMA, is used.

[0114] In this implementation, in order to enable the general large language model to accurately understand and process medical terms and their logical relationships, it is necessary to perform fine-tuning training on the general large language model in the medical field.

[0115] In this embodiment, the original medical text is a large amount of medical case documents collected from the hospital's medical system, including case records, diagnosis reports, treatment plans, drug records, etc.

[0116] In this implementation, data quality can be ensured through data cleaning.

[0117] In this implementation, during the fine-tuning training of the general large language model, emphasis is placed on improving the general large language model's capabilities in medical term extraction, logical relationship recognition, and negation processing.

[0118] Further, a preferred embodiment is provided, which further comprises the following steps after step S5:

[0119] S6. Use medical texts that have not participated in fine-tuning training to verify the fine-tuned large language model and evaluate its performance in tasks such as regular expression generation and logical relationship processing;

[0120] S7. Based on the evaluation results, further optimize and adjust the fine-tuned large language model.

[0121] In this implementation, by verifying and evaluating the fine-tuned large language model, its accuracy and reliability in practical applications are further ensured.

[0122] Implementation Method 3: Combination Figures 1 to 3 This embodiment describes a medical document regular expression generation device based on a large language model. The specific implementation contents are as follows:

[0123] The device comprises the following modules:

[0124] Get the module of the fine-tuned large language model;

[0125] A module for obtaining natural language descriptions of medical terms and logic rules in actual medical texts, and using the natural language descriptions as inputs to a fine-tuned large language model to generate an initial regular expression;

[0126] A module that iteratively optimizes the initial regular expression; each iterative optimization module includes the following submodules:

[0127] The regular expression optimized in the previous iteration is used to match the medical terms and logic rules in the actual medical text to obtain a matching result; wherein the regular expression optimized in the previous iteration of the first iteration optimization is a submodule of the initial regular expression;

[0128] According to the actual medical text and matching results, the correct matching results, incorrect matching results and the content omitted in the matching results of the actual medical text are identified, and a submodule of natural language annotation is used;

[0129] The correct matching results, incorrect matching results, missing contents in the matching results of the actual medical text, and natural language annotations are input into the fine-tuned large language model as feedback information to obtain the sub-module of the regular expression optimized in this iteration;

[0130] According to the regular expression after this iteration optimization, determine whether the sub-module meets the conditions for ending the iteration optimization:

[0131] If the iterative optimization end conditions are met, the regular expression after this iterative optimization is used as the final regular expression generated, and the fine-tuned large language model after the last iterative optimization is used as the submodule of the final large language model;

[0132] Otherwise, continue to the next iterative optimization of the submodule.

[0133] In this embodiment, the medical document regular expression generation device based on a large language model is used to implement the above-mentioned medical document regular expression generation method based on a large language model.

[0134] In this embodiment, if Figure 3 As shown, the medical document regular expression generation device based on the large language model also has a human-computer interaction interface.

[0135] The technical solution provided by the present invention is further described in detail above through several specific implementation modes in order to highlight the advantages and benefits of the technical solution provided by the present invention. However, the several specific implementation modes described above are not intended to be used as limitations on the present invention. Any reasonable changes and improvements to the present invention, reasonable combinations of implementation modes and equivalent substitutions based on the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for generating regular expressions for medical documents based on a large language model. It is characterized in that The method comprises the following steps: Steps to obtain a fine-tuned large language model; A step of obtaining a natural language description of medical terms and logic rules in actual medical texts, and using the natural language description as an input of a fine-tuned large language model to generate an initial regular expression; The steps of iteratively optimizing the initial regular expression; each iterative optimization step includes the following steps: The regular expression optimized in the previous iteration is used to match the medical terms and logic rules in the actual medical text to obtain a matching result; wherein the regular expression optimized in the previous iteration of the first iteration optimization is the step of the initial regular expression; According to the actual medical text and the matching results, the correct matching results, the incorrect matching results and the contents omitted from the matching results in the actual medical text are identified, and a natural language annotation step is adopted; The step of inputting the correct matching results, the incorrect matching results, the content omitted from the matching results in the actual medical text, and the natural language annotations as feedback information into the fine-tuned large language model to obtain the regular expression optimized in this iteration; According to the regular expression after this iteration optimization, the steps to determine whether the conditions for ending the iteration optimization are met are as follows: If the iterative optimization end condition is met, the regular expression after this iterative optimization is used as the final regular expression generated, and the fine-tuned large language model after the last iterative optimization is used as the final large language model step; Otherwise, continue to the next iterative optimization step; The method further comprises the following steps: using the final large language model to parse the final generated regular expression to obtain its natural language description; The method further comprises the following steps: forming a natural language description document according to the natural language description of the regular expression finally generated.

2. The method for generating a medical document regular expression based on a large language model according to claim 1, It is characterized in that The steps of inputting the correct matching results, the incorrect matching results, the content omitted from the matching results in the actual medical text, and the natural language annotations as feedback information into the fine-tuned large language model to obtain the regular expression after this iteration optimization are as follows: The correct matching results, incorrect matching results, content omitted from the matching results in the actual medical text, and natural language annotations are added to the context of generating the regular expression through prompt words as feedback information, and input into the fine-tuned large language model; The fine-tuned large language model optimizes the generated regular expression according to the feedback information to obtain the regular expression optimized in this iteration.

3. The method for generating a medical document regular expression based on a large language model according to claim 1, It is characterized in that The iterative optimization end condition is: The regular expressions optimized in this iteration were used to match medical terms and logical rules in actual medical texts, and the evaluation values ​​of the accuracy and completeness of the matching results obtained reached the given thresholds.

4. The method for generating a medical document regular expression based on a large language model according to claim 1, It is characterized in that The fine-tuned large language model is obtained by the following method: S1. Obtain original medical texts; S2. Perform data cleaning on the original medical text to remove sensitive information and irrelevant content, and obtain the medical text after data cleaning; S3, annotate the medical text after data cleaning, identify key medical terms, relevant logical relationships and their contexts, and obtain the annotated medical text; S4. Select a general large language model as the basic model and use general data to perform preliminary training on the basic model; S5. Use the annotated medical text as input and fine-tune the basic model to enable it to understand and process medical terms and their logical relationships, and obtain a fine-tuned large language model.

5. The method for generating a medical document regular expression based on a large language model according to claim 4, It is characterized in that After step S5, the method further includes the following steps: S6. Use medical texts that have not participated in fine-tuning training to verify the fine-tuned large language model and evaluate its performance in tasks such as regular expression generation and logical relationship processing; S7. Based on the evaluation results, further optimize and adjust the fine-tuned large language model.

6. Medical document regular expression generation device based on large language model, It is characterized in that The device comprises the following modules: Get the module of the fine-tuned large language model; A module for obtaining natural language descriptions of medical terms and logic rules in actual medical texts, and using the natural language descriptions as inputs to a fine-tuned large language model to generate an initial regular expression; A module that iteratively optimizes the initial regular expression; each iterative optimization module includes the following submodules: The regular expression optimized in the previous iteration is used to match the medical terms and logic rules in the actual medical text to obtain a matching result; wherein the regular expression optimized in the previous iteration of the first iteration optimization is a submodule of the initial regular expression; According to the actual medical text and matching results, the correct matching results, incorrect matching results and the content omitted in the matching results of the actual medical text are identified, and a submodule of natural language annotation is used; The correct matching results, incorrect matching results, missing contents in the matching results of the actual medical text, and natural language annotations are input into the fine-tuned large language model as feedback information to obtain the sub-module of the regular expression optimized in this iteration; According to the regular expression after this iteration optimization, determine whether the sub-module meets the conditions for ending the iteration optimization: If the iterative optimization end conditions are met, the regular expression after this iterative optimization is used as the final regular expression generated, and the fine-tuned large language model after the last iterative optimization is used as the submodule of the final large language model; Otherwise, continue with the next iterative optimization of the submodule; The device also includes the following modules: a module for parsing the finally generated regular expression using the final large language model to obtain its natural language description; The device also includes the following module: a module for forming a natural language description document according to the natural language description of the regular expression finally generated.

7. A computer program product, include: A processor and a memory, characterized in that the memory is used to store executable instructions of the processor, and the processor is configured to execute the method for generating medical document regular expressions based on a large language model as described in any one of claims 1 to 5 by executing the executable instructions.

8. A computer storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is run, the method for generating a medical document regular expression based on a large language model as described in any one of claims 1 to 5 is executed.

Citation Information

Patent Citations

  • Text classification method of regular expression generated based on large language model

    CN117556049A