Patient portrait generation method under medical knowledge constraint based on large model

By adopting a large model-based medical knowledge constraint method in patient portrait generation, the problem of insufficient generalization and generalizability of patient portrait generation in the existing technology is solved, and high-accuracy and low-cost patient portrait generation is achieved.

CN119361057APending Publication Date: 2025-01-24WONDERS INFORMATION +2

Patent Information

Application Number
CN202411484271.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing patient portrait generation methods have insufficient generalization and generalization capabilities, and require a lot of manpower to invest, making it difficult to ensure the accuracy and authenticity of the results.

Method used

A patient portrait generation method under the constraints of medical knowledge based on a large model is adopted. By preprocessing patient diagnosis and treatment files and medical knowledge data, a patient portrait label system is established, and the large model is used for label matching judgment and compliance verification to ensure the accuracy of the results. accuracy.

Benefits of technology

Effectively suppressed the illusion of the prediction of the large model, improved the accuracy and authenticity of the patient's portrait, reduced costs, and improved the flexibility of operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119361057A_ABST
    Figure CN119361057A_ABST
Patent Text Reader

Abstract

The invention discloses a patient portrait generation method under medical knowledge constraint based on a large model, and the method employs a large model technology to generate a patient portrait based on an existing patient document and medical knowledge data. The invention provides a method for constraining the output of the large model by adding a conformity verification basis, so that the illusion problem in the large model prediction process is effectively inhibited; according to the method provided by the invention, the original base large model is directly used, the portrait process is completed by constructing instructions of different tasks, the model does not need to be trained, the labeling process with extremely high cost is avoided, the use cost is low, and the operation is flexible and simple.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for generating patient portraits under medical knowledge constraints based on a large model, and belongs to the field of medical data information processing. Background Art

[0002] With the development of medical information technology, digital medical records have become an important part of the medical industry. Medical records contain patients' basic information, medical history, diagnosis results, treatment plans, doctors' observations and suggestions, etc. With the continuous growth of medical record data, how to effectively use the record data to generate accurate patient portraits has become a challenge.

[0003] Most existing patient portrait generation methods directly extract key entities from patient file information. For example, the Chinese invention patent application with publication number CN115775609A discloses a patient portrait system based on artificial intelligence technology, which uses a bidirectional LSTM model to perform named entity recognition on medical record information, generates entities such as the patient's disease and symptoms, and then constructs a patient portrait. The Chinese invention patent application with publication number CN117116407A uses an Encoder-Decoder model for information extraction, extracts multiple entity information and relationship information groups in the electronic medical record, and integrates them according to time sequence to obtain a user portrait. The above methods extract information based on rules or artificial intelligence algorithm models. These methods are only highly accurate in specific fields, and their generalization and scalability are average, and they require a large amount of manpower.

[0004] In recent years, with the rapid development of big models, the language understanding ability of big models is expected to solve some tasks related to simplifying medical natural language processing and provide more efficient tools for the construction of patient portraits. However, the illusion problem of big models in application restricts its application in serious fields. When constructing patient portraits, it is particularly important to ensure the accuracy and authenticity of the patient portrait content. Summary of the invention

[0005] The purpose of this invention is to provide a method that can utilize the powerful language understanding ability of a large model and constrain its output to ensure that the results are true to the facts, so as to accurately construct a high-quality patient portrait.

[0006] In order to achieve the above-mentioned purpose, the technical solution of the present invention provides a method for generating a patient portrait under medical knowledge constraints based on a large model, which generates a patient portrait based on existing patient documents and medical knowledge data using a large model technology, and is characterized in that it includes the following steps:

[0007] Step 1: Preprocess the patient's medical records and medical knowledge data, where a text block vector set C = {c1, c2, ..., c n}, c n is the nth patient diagnosis and treatment text block vector, and the knowledge block vector set R = {r1, r2, ..., r n}, r n is the nth medical knowledge block vector;

[0008] Step 2: Establish a patient portrait label system, set all structured labels and label definitions in the system, and obtain the label set D = {d1, d2, ..., d n} and the label definition set F = {f1,f2,...,f n}, where d n is the nth structured tag, f n is the structured tag d n Tag definition for:

[0009] Step 3: Take a specific structured tag in the tag system as the current processing tag, search for patient documents, obtain the patient document retrieval results related to the current processing tag, and use the big model to preliminarily determine whether the patient matches the current processing tag. Specifically, the following steps are included:

[0010] Step 3-1: Take a specific structured label d from the label set D i As the current processing tag, for the current processing tag d i And the corresponding label definition f i , construct retrieval conditions for patient document-related content;

[0011] Step 3-2: Input the retrieval conditions of the patient document related content into the word vector model to obtain the vectorized representation v of the retrieval conditions;

[0012] Step 3-3: Calculate the vectorized representation v and each patient diagnosis text block vector c in the text block vector set C i By sorting the similarities, a group of patient diagnosis and treatment text blocks with the highest similarity are obtained and used as the patient file with the current processing label d i Related patient file related contentk;

[0013] Step 3-4: Based on the patient file related content k queried in the above step, use the large model to determine whether the patient file related content k is consistent with the current processing label d i Whether it matches;

[0014] Step 3-5: Use the large model to execute the prompt and generate the label matching judgment result s. The label matching judgment result s only contains whether it matches or not. The generation probability of the corresponding content is used as the classification judgment condition to obtain the patient file related content k in the generated result and the current processing label d i The generation probability P corresponding to the match s , if the generation probability P s Above the preset threshold θ s , then the current patient and the current treatment label d are identified i Match;

[0015] Step 4: Retrieve medical knowledge data and obtain the label d i Relevant medical knowledge, establish the basis for label compliance verification, including the following steps:

[0016] Step 4-1: For the current processing label d i And the corresponding label definition f i , construct retrieval conditions for medical knowledge related content;

[0017] Step 4-2: Input the medical knowledge related content search conditions into the word vector model to obtain the vectorized representation u;

[0018] Step 4-3: Calculate the vector u and each medical knowledge block vector r in the knowledge block vector set R i , find the set of knowledge blocks with the highest similarity and use it as the medical knowledge data with the current processing label d i Related medical knowledge related contentq;

[0019] Step 4-4: Based on the medical knowledge related content q, combined with the current processing label d i And the tag definition f i Construct label compliance verification basis t;

[0020] Step 5: Based on the preliminary labeling in step 3, add the label conformity verification basis t obtained in step 4 to limit the large model hallucination, and use the large model to further verify whether the label judgment result of step 3 is accurate, which specifically includes the following steps:

[0021] Step 5-1: Based on the patient file related content k obtained in step 3 and the label conformity verification basis t obtained in step 4, use the large model to verify whether the label matching judgment result s obtained in step 3 is accurate;

[0022] Step 5-2: Use the large model to execute the prompt and generate the label conformity verification result e. The label conformity verification result e only contains whether it is accurate. The label conformity verification result e is the generation probability P corresponding to the inaccurate label matching judgment result s. e, if the generation probability P e Above the preset threshold θ e , then the current label matching judgment result s is considered accurate;

[0023] Step 6: Traverse the entire label system and repeat steps 3 to 5 to determine whether the patient and the label match, and verify the accuracy of the label matching through the label compliance verification basis to finally build a complete portrait of the patient.

[0024] Preferably, the step 1 comprises:

[0025] Step 1-1: Process the patient medical records in blocks. For each patient medical record, the extracted text is segmented according to a fixed number of characters and sentences to form text blocks of appropriate size;

[0026] Step 1-2: Input the text blocks obtained after block processing into the word vector model to obtain the patient diagnosis and treatment text block vectors, and store these patient diagnosis and treatment text block vectors as a text block vector set C = {c1, c2, ..., c n};

[0027] Step 1-3: For medical knowledge data, segment the medical knowledge data according to a fixed number of characters or sentences, input the segmented knowledge blocks into the word vector model, obtain the medical knowledge block vectors, and store these medical knowledge block vectors as a knowledge block vector set R = {r1, r2, ..., r n}.

[0028] Preferably, in step 3-3, the similarity calculation formula is:

[0029] Preferably, in step 4-3, the similarity calculation formula is:

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] 1. The present invention provides a method for constraining the output of a large model by adding a conformity verification basis, thereby effectively suppressing the hallucination problem in the large model prediction process;

[0032] 2. The method provided by the present invention directly uses the original base large model and completes the portrait process by constructing instructions for different tasks. There is no need to train the model, thus avoiding the extremely costly labeling process. It has low use cost and is flexible and simple to operate. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 The overall flow chart of the patient portrait generation method based on the patient diagnosis and treatment files and medical knowledge constraints of the present invention;

[0034] Figure 2 A flow chart of a method for preprocessing patient diagnosis and treatment files and medical knowledge data according to the present invention;

[0035] Figure 3 A flowchart of a method for taking a specific tag in the tag system as the current processing tag, searching patient documents, obtaining patient document search results related to the current processing tag, and using a large model to preliminarily determine whether the patient matches the current processing tag;

[0036] Figure 4 A flowchart of a method for retrieving medical knowledge data, obtaining medical knowledge related to the currently processed label, and establishing a label compliance verification basis for the present invention;

[0037] Figure 5 This is a flowchart of a method for further verifying whether the label judgment result of step 3 is accurate by adding a basis for verifying the label conformity obtained in step 4 to the preliminary labeling in step 3 of the present invention, limiting the illusion of a large model, and using the large model to further verify whether the label judgment result of step 3 is accurate. DETAILED DESCRIPTION

[0038] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.

[0039] The method for generating a patient portrait under medical knowledge constraints based on a large model disclosed in an embodiment of the present invention is based on existing patient documents and medical knowledge data, and uses large model technology to generate patient portraits. Figure 1 As shown, the specific steps include:

[0040] Step 1: Preprocess the patient medical records and medical knowledge data.

[0041] like Figure 2 As shown, in the embodiment of the present invention, step 1 specifically includes the following steps:

[0042] Step 1-1: Block processing of patient medical records, including basic patient information, admission and discharge records, medical history records, disease manifestations, examination and test results, various diagnostic reports, treatment methods, etc. For each patient medical record, the extracted text is segmented according to a fixed number of characters and sentences to form text blocks of appropriate size.

[0043] Step 1-2: Input the text blocks obtained after block processing into the word vector model, obtain their vectors (defined as "text block vectors"), and store these text block vectors as a text block vector set C = {c1, c2, ..., c n This step further embeds the text block into a vector, realizing the vectorized storage of the patient's medical record data, which is convenient for subsequent use.

[0044] Step 1-3: For data containing medical knowledge content such as medical guidelines, literature, and textbooks, the medical literature text is also segmented according to a fixed number of characters or sentences, and the segmented knowledge blocks are input into the word vector model to obtain their vectors (defined as "knowledge block vectors"), and these knowledge block vectors are stored as a knowledge block vector set R = {r1, r2, ..., r n}. In this step, the medical knowledge text is converted into vectors to realize the vectorized storage of medical knowledge data.

[0045] In the embodiment of the present invention, the word vector model used in steps 1-2 and 1-3 is the bge Chinese-English word vector model.

[0046] Step 2: Establish a patient portrait label system and set all structured labels and label definitions within the system.

[0047] In the embodiment of the present invention, step 2 specifically includes the following steps:

[0048] Step 2-1: Determine all structured labels, such as "previous positive skin test", "history of smoking", "history of surgery", and improve the definition of each structured label to build a patient portrait label system.

[0049] Step 2-2: Construct a label set D = {d1, d2, ..., d n}, and the label definition set F = {f1,f2,...,f n}, d n is the nth structured tag, f n is the structured tag d n The tag definition.

[0050] Step 3: Take a specific structured tag in the tag system as the current processing tag, retrieve the patient document, obtain the patient document retrieval results related to the current processing tag, and use the large model to preliminarily determine whether the patient matches the current processing tag.

[0051] like Figure 3 As shown, in the embodiment of the present invention, step 3 specifically includes the following steps:

[0052] Step 3-1: Take a specific structured tag d from the tag set D in the tag system iAs the current processing tag, for the current processing tag d i And the corresponding label definition f i , construct retrieval conditions for patient document related content.

[0053] Step 3-2: Input the retrieval conditions of the patient document related content in the above step into the word vector model to obtain the vectorized representation v of the retrieval conditions.

[0054] Step 3-3: Calculate the vectorized representation v and each text block vector c in the text block vector set C in step 1-2 i The similarity is calculated as follows:

[0055]

[0056] By sorting the similarities, a group of text blocks with the highest similarity are obtained and used as the text blocks in the patient file with the current processing label d i Related content of k.

[0057] Step 3-4: Based on the patient file related content k queried in the above step, use the large model to determine whether the related content k is related to the current processing label d i Whether it matches. Combine the patient file related content k queried in step 3-3 and the current processing label d i and the corresponding label definition f i Generate judgment prompts, such as "Is the relevant content k related to label d?" i Match? Answer only yes or no. i The definition of f i ”.

[0058] Step 3-5: Use the large model to execute the prompt and generate the label matching judgment result s. Since the label matching judgment result s only contains "yes" and "no", the generation probability of the corresponding content can be used as the classification judgment condition to obtain the generation probability P corresponding to "yes" in the generation result. s , if the generation probability P s Above the preset threshold θ s , then the current patient and the current treatment label d are identified i In the embodiment of the present invention, the threshold value θ s Set to 0.8.

[0059] Step 4: Retrieve medical knowledge data, obtain medical knowledge related to the current processing label, and establish a basis for label compliance verification.

[0060] like Figure 4 As shown, in the embodiment of the present invention, step 4 specifically includes the following steps:

[0061] Step 4-1: For the current processing label d i And the corresponding label definition f i , construct search conditions for medical knowledge related content.

[0062] Step 4-2: Input the medical knowledge-related content retrieval conditions in the above steps into the word vector model to obtain the vectorized representation u.

[0063] Step 4-3: Calculate the vector u and each knowledge block vector r in the medical knowledge block vector set R in step 1-3 i The similarity is as follows:

[0064]

[0065] Find a group of knowledge blocks with the highest similarity and use them as the medical knowledge data with the current processing label d i Medical knowledge related content q.

[0066] Step 4-4: Based on the medical knowledge related content q queried in step 4-3 above, combined with the current processing label d i And the tag definition f i Construct tag compliance check basis t.

[0067] Step 5: Based on the preliminary labeling in step 3, add the label conformity verification basis t obtained in step 4 to limit the large model hallucination, and use the large model to further verify whether the label judgment result of step 3 is accurate.

[0068] like Figure 5 As shown, in the embodiment of the present invention, step 5 specifically includes the following steps:

[0069] Step 5-1: Based on the patient file related content k obtained in step 3 and the label conformity verification basis t obtained in step 4, use the large model to verify whether the label judgment result in step 3 is accurate. Combine the patient file related content k queried in step 3, the label matching judgment result s in step 3, the label conformity verification basis t obtained in step 4, and the current processing label d i and the corresponding label definition f i Generate a prompt to check whether the label matching result s obtained in step 3 is accurate, such as "It is known that the current processing label d i The definition of f i , patient file related content k and current processing label d i The matching relationship is the label matching judgment result s. Under the constraint of the conformity verification basis t, it is determined whether the label matching judgment result s is correct, and the answer is only yes or no. "

[0070] Step 5-2: Use the large model to execute the prompt and generate the label conformity verification result e. Since the label conformity verification result e only contains "yes" and "no", the generation probability of the corresponding content can be used as the classification judgment condition to obtain the generation probability P corresponding to "yes" in the generation result. e , if the generation probability P e Above the preset threshold θ e , then the current label judgment result is considered accurate. In this embodiment of the present invention, the threshold θ e Set to 0.8.

[0071] Step 6: For all labels in the portrait label system, loop through steps 3 to 5 to generate a complete patient portrait, specifically:

[0072] Traverse the entire label system, repeat steps 3 to 5, determine whether the patient and the label match, and verify the accuracy of the label matching through the label compliance verification basis, and finally build a complete portrait of the patient.

Claims

1. A method for generating patient portraits under medical knowledge constraints based on a large model, based on existing patient documents and medical knowledge data, using large model technology to generate patient portraits, characterized in that: The following steps are involved: Step 1: Preprocess the patient's medical records and medical knowledge data, where a text block vector set C = {c1, c2, ..., c n }, c n is the nth patient diagnosis and treatment text block vector, and the knowledge block vector set R = {r1, r2, ..., r n }, r n is the nth medical knowledge block vector; Step 2: Establish a patient portrait label system, set all structured labels and label definitions in the system, and obtain the label set D = {d1, d2, ..., d n } and the label definition set F = {f1,f2,...,f n }, where d n is the nth structured tag, f n is the structured tag d n Tag definition for: Step 3: Take a specific structured tag in the tag system as the current processing tag, search for patient documents, obtain the patient document retrieval results related to the current processing tag, and use the big model to preliminarily determine whether the patient matches the current processing tag. Specifically, the following steps are included: Step 3-1: Take a specific structured label d from the label set D i As the current processing tag, for the current processing tag d i And the corresponding label definition f i , construct retrieval conditions for patient document-related content; Step 3-2: Input the retrieval conditions of the patient document related content into the word vector model to obtain the vectorized representation v of the retrieval conditions; Step 3-3: Calculate the vectorized representation v and each patient diagnosis text block vector c in the text block vector set C i By sorting the similarities, a group of patient diagnosis and treatment text blocks with the highest similarity are obtained and used as the patient file with the current processing label d i Related patient file related contentk; Step 3-4: Based on the patient file related content k queried in the above step, use the large model to determine whether the patient file related content k is consistent with the current processing label d i Whether it matches; Step 3-5: Use the large model to execute the prompt and generate the label matching judgment result s. The label matching judgment result s only contains whether it matches or not. The generation probability of the corresponding content is used as the classification judgment condition to obtain the patient file related content k in the generated result and the current processing label d i The generation probability P corresponding to the match s , if the generation probability P s Above the preset threshold θ s , then the current patient and the current treatment label d are identified i Match; Step 4: Retrieve medical knowledge data and obtain the label d corresponding to the current processing i Relevant medical knowledge, establish the basis for label compliance verification, including the following steps: Step 4-1: For the current processing label d i And the corresponding label definition f i , construct retrieval conditions for medical knowledge related content; Step 4-2: Input the medical knowledge related content search conditions into the word vector model to obtain the vectorized representation u; Step 4-3: Calculate the vector u and each medical knowledge block vector r in the knowledge block vector set R i , find the set of knowledge blocks with the highest similarity and use it as the medical knowledge data with the current processing label d i Related medical knowledge related contentq; Step 4-4: Based on the medical knowledge related content q, combined with the current processing label d i And the tag definition f i Construct label compliance verification basis t; Step 5: Based on the preliminary labeling in step 3, add the label conformity verification basis t obtained in step 4 to limit the large model hallucination, and use the large model to further verify whether the label judgment result of step 3 is accurate, which specifically includes the following steps: Step 5-1: Based on the patient file related content k obtained in step 3 and the label conformity verification basis t obtained in step 4, use the large model to verify whether the label matching judgment result s obtained in step 3 is accurate; Step 5-2: Use the large model to execute the prompt and generate the label conformity verification result e. The label conformity verification result e only contains whether it is accurate. The label conformity verification result e is the generation probability P corresponding to the inaccurate label matching judgment result s. e , if the generation probability P e Above the preset threshold θ e , then the current label matching judgment result s is considered accurate; Step 6: Traverse the entire label system and repeat steps 3 to 5 to determine whether the patient and the label match, and verify the accuracy of the label matching through the label compliance verification basis to finally build a complete portrait of the patient.

2. A method for generating a patient portrait under medical knowledge constraints based on a large model as claimed in claim 1, characterized in that: The step 1 comprises: Step 1-1: Process the patient medical records in blocks. For each patient medical record, the extracted text is segmented according to a fixed number of characters and sentences to form text blocks of appropriate size; Step 1-2: Input the text blocks obtained after block processing into the word vector model to obtain the patient diagnosis and treatment text block vectors, and store these patient diagnosis and treatment text block vectors as a text block vector set C = {c1, c2, ..., c n }; Step 1-3: For medical knowledge data, segment the medical knowledge data according to a fixed number of characters or sentences, input the segmented knowledge blocks into the word vector model, obtain the medical knowledge block vectors, and store these medical knowledge block vectors as a knowledge block vector set R = {r1, r2, ..., r n }.

3. A method for generating a patient portrait under medical knowledge constraints based on a large model as claimed in claim 1, characterized in that: In step 3-3, the similarity calculation formula is:

4. A method for generating a patient portrait under medical knowledge constraints based on a large model as claimed in claim 1, characterized in that: In step 4-3, the similarity calculation formula is:

Citation Information

Patent Citations

  • Patient portrait system based on artificial intelligence

    CN115775609A

  • Patient portrait generation method and device based on electronic medical record and storage medium

    CN117116407A

Cited By

  • Three-high patient portrait generation method based on large medical model

    CN120954600A

  • Patient portrait generation method fusing multi-source traffic

    CN121790024A