Medical information processing method, medical information processing device, equipment and medium
By obtaining medical-related information and preset text, using large language models to generate processing prompt information, combining decision-making paths and structured data, the problems of low efficiency and instability in medical information processing are solved, and the flexibility and accuracy of medical information are achieved Scientificity and consistency of processing and decision-making.
Patent Information
- Application Number
- CN202411047475.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-27
AI Technical Summary
In the medical field, it is difficult for the prior art to effectively use artificial intelligence to assist medical personnel in processing medical information, resulting in low processing efficiency and unstable results.
By obtaining medical-related information and preset text of the target organ, a large language model is used to generate processing prompt information that meets the restrictions, combining medical decision-making paths and structured data, a processing solution for the target organ is generated, reducing the randomness of model generation and Improve the specificity of the output.
It realizes flexible and accurate processing of medical information, improves the efficiency and consistency of medical decisions, complies with medical guidelines, and weakens the instability and lack of consistency of large-scale model output.
Smart Images

Figure CN119207699A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence processing, and in particular to a medical information processing method, medical information processing apparatus, equipment and medium. Background Art
[0002] In the medical field, a lot of medical information is generated during the patient's medical process, such as pathology reports, imaging examination reports, etc. Medical workers need to process the patient's medical information. Reasonable and effective auxiliary processing tools are of great significance to improving the level of medical care.
[0003] With the development of artificial intelligence technology, it has shown its application potential in the medical field. How to use artificial intelligence technology to assist medical personnel in processing medical information has become a problem that needs to be solved. Summary of the invention
[0004] The present application at least provides a medical information processing method, a medical information processing apparatus, a device and a medium.
[0005] The present application provides a medical information processing method, including: obtaining first medical-related information corresponding to a target organ of a target object; using the first medical-related information and a first preset text to form first prompt information; the first prompt information includes a restriction condition, and the first prompt information is used to instruct a first large language model to generate processing prompt information that meets the restriction condition; using the first large language model to generate processing prompt information for the target organ based on the first prompt information.
[0006] Therefore, the first large language model is used to generate the first medical-related information and the first preset text to obtain processing prompt information for the target organ, and the processing prompt information is generated using a generative method. The large language model is used to flexibly generate the processing prompt information to assist medical personnel in processing medical information.
[0007] The restriction condition includes that the processing prompt information must include a processing solution and a plurality of processing solution candidates, and the plurality of processing solution candidates are used to select one as the processing solution included in the processing prompt information.
[0008] Therefore, by limiting the content of the generated result through the first prompt information, the large language model can obtain a result that meets the restriction conditions, thereby reducing the randomness of model generation.
[0009] Among them, at least one processing solution candidate is a target solution candidate, and the restriction condition also includes at least one attribute candidate corresponding to each attribute of each target solution candidate; if the target solution candidate is used as the processing solution included in the processing prompt information, at least one attribute candidate is used to select one as the attribute of the target solution candidate included in the processing prompt information.
[0010] Therefore, corresponding attributes and attribute candidates are set for the target solution candidates to further limit the output of the large model so that the large model can obtain more specific processing prompt information.
[0011] The first medical-related information includes the first medical report text and medical decision path of the target object, or the first medical-related information includes the first medical report text, medical decision path and first medical structured data related to the target object, wherein at least part of the first medical structured data is extracted based on the first medical report text.
[0012] Therefore, using the first medical report text and the medical decision path as inputs of the large language model enables the large language model to utilize information related to the target organ therein to obtain information about treatment prompts.
[0013] Wherein, the target organ includes at least one of the stomach and the intestine.
[0014] Therefore, generation of treatment prompt information for at least one of the stomach and the intestine is achieved.
[0015] Among them, the first medical-related information includes a medical decision path, which is composed of multiple decision nodes connected in sequence, and the sub-nodes of each decision node in the medical decision path are determined in sequence by the first large language model; obtaining the first medical-related information includes: determining the first decision node of the sub-node to be determined at present; obtaining the second medical-related information related to the first decision node, the second medical-related information includes the second medical report text of the target object and several sub-node candidates corresponding to the first decision node, and when the first decision node is not the first decision node in the medical decision path, the second medical-related information also includes at least one second decision node of the currently determined sub-node; using the second medical-related information and the second preset text to form the second prompt information; using the first large language model based on the second prompt information, selecting the sub-node of the first decision node from several sub-node candidates; in response to the sub-node of the first decision node not meeting the preset condition, updating the sub-node of the first decision node to the first decision node, and re-executing the acquisition of the second medical-related information related to the first decision node and subsequent steps.
[0016] Therefore, the first language model is used to determine sub-nodes for each decision node in turn to generate a medical decision path, which is used as the first medical-related information to generate processing prompt information.
[0017] The preset condition is that the category of the child node of the first decision node is a preset category.
[0018] Therefore, it is determined whether it is necessary to generate more sub-nodes according to the category of the selected sub-node to obtain a complete medical decision path.
[0019] The second medical-related information also includes second medical structured data related to the target object, wherein at least part of the second medical structured data is extracted based on the second medical report text.
[0020] Therefore, combining the second medical structured data as the second medical related information can enrich the information used by the large language model and improve the accuracy of generation.
[0021] Among them, the first decision node in the medical decision path is the root node of the target medical decision tree, and several child node candidates are determined based on the child nodes of the first decision node in the target medical decision tree.
[0022] Therefore, the nodes in the medical decision path are determined according to the target medical decision tree. The decision tree reasoning is implemented using a large model, which can directly obtain information from medical-related information without being limited to structured data, thereby improving flexibility. In addition, the reasoning process follows the decision tree and meets the requirements of medical guidelines. Due to the limitations of the decision path, the generated processing prompt information is more in line with the actual processing information, reducing the instability and lack of consistency of the large model output.
[0023] Before using the first largest language model to generate processing prompt information for the target organ based on the first prompt information, the method also includes: using the second largest language model to generate corresponding target annotation data for the original medical record; verifying the target annotation data generated by the second largest language model; and constructing a fine-tuning data set based on the verified target annotation data and the original medical record, and the fine-tuning data set is used to fine-tune the first largest language model.
[0024] Therefore, the second largest language model is used to generate target annotated data, and the generated target annotated data is verified to construct a fine-tuning dataset and improve the accuracy of the labels in the fine-tuning dataset.
[0025] Among them, before verifying the target annotation data generated by the second largest language model, the method also includes: using a regular expression to extract reference annotation data from the original medical record, there is at least one overlapping data item between the reference annotation data and the target annotation data; verifying the target annotation data generated by the second largest language model includes: comparing the data corresponding to each overlapping data item in the reference annotation data and the target annotation data, and obtaining a comparison result corresponding to each overlapping data item, the comparison result is consistent or inconsistent; in response to the existence of an inconsistent comparison result corresponding to at least one overlapping data item, re-executing the steps of generating corresponding target annotation data for the original medical record using the second largest language model and verifying the target annotation data generated by the second largest language model.
[0026] Therefore, regular expressions are used to extract reference annotation data, and the reference annotation data is compared with the target annotation data. Since the data extracted by regular expressions has high accuracy, the target annotation data can be verified to improve the quality of the fine-tuning dataset.
[0027] The present application provides a medical information processing device, including an acquisition module, a composition module and a generation module, wherein the acquisition module is used to acquire first medical-related information corresponding to a target organ of a target object; the composition module is used to use the first medical-related information and a first preset text to form first prompt information; the first prompt information includes a restriction condition, and the first prompt information is used to instruct a first large language model to generate processing prompt information that meets the restriction condition; the generation module is used to use the first large language model to generate processing prompt information for the target organ based on the first prompt information.
[0028] The present application provides an electronic device, including a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement any of the above-mentioned medical information processing methods.
[0029] The present application provides a computer-readable storage medium having program instructions stored thereon, which implement any of the above-mentioned medical information processing methods when the program instructions are executed by a processor.
[0030] In the above scheme, the first large language model is used to generate processing prompt information for the target organ based on the first medical-related information and the first preset text, and the large language model is used to realize flexible generation of processing prompt information. The processing prompt information is provided to medical personnel for reference to assist medical personnel in processing medical information.
[0031] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0033] Figure 1 It is a flowchart of an embodiment of the medical information processing method of the present application;
[0034] Figure 2 is a flowchart of another embodiment of step S110 of the present application;
[0035] Figure 3 It is a schematic diagram of the framework of an embodiment of the medical information processing device of the present application;
[0036] Figure 4 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;
[0037] Figure 5 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0038] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0039] In the following description, for the purpose of explanation rather than limitation, specific details such as specific subsystem structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0040] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0041] See also Figure 1 , Figure 1 This is a flow chart of an embodiment of a medical information processing method of the present application. Specifically, the method may include:
[0042] Step S110: Acquire first medical-related information corresponding to the target organ of the target object.
[0043] The first medical related information is information related to the medical treatment of a target organ of a target object. The target object may be any patient. Exemplarily, the target organ may include a stomach, an intestinal tract, and the like.
[0044] In a specific application scenario, the first medical-related information may include examination results related to a target organ of the target object, etc.
[0045] In some embodiments, the first medical-related information may include a first medical report text and a medical decision path of the target subject.
[0046] In some embodiments, the first medical-related information may include a first medical report text of the target object, a medical decision path, and first medical structured data related to the target object.
[0047] The first medical related information may be information in text form. The medical decision path may be obtained based on a guideline decision tree. The first medical structured data may be structured data related to the medical treatment of the target object.
[0048] Furthermore, at least part of the first medical structured data may be extracted from the first medical report text.
[0049] Exemplarily, the first medical report text may include an imaging examination report text, a pathology report text, etc. Of course, the first medical report text may not be limited to the aforementioned examples and may be adjusted according to actual application needs.
[0050] In a specific application scenario, the first medical report text may be a preprocessed text, and the preprocessing may be set according to user needs. For example, it may include removing duplicate content, unifying the format, unifying punctuation, completing missing content, and correcting time tags.
[0051] In a specific application scenario, the first medical structured data related to the target object may include age, gender, etc.
[0052] Step S120: compose a first prompt message using the first medical-related information and the first preset text.
[0053] The first prompt information includes a restriction condition, and the first prompt information can be used to instruct the first large language model to generate processing prompt information that satisfies the restriction condition.
[0054] Step S130: Generate processing prompt information for the target organ based on the first prompt information using the first large language model.
[0055] Among them, the first language model can be a generative model, which can generate output results according to the information of the input model.
[0056] Among them, the information input into the first large language model includes first medical-related information and a first preset text, the first medical-related information is information related to the medical treatment of the target organ of the target object, the first prompt information input into the model is used to indicate the generation of the model, the first large language model can generate processing prompt information according to the indication, the processing prompt information can be processing prompt information about the target organ of the target object, which is used for reference by medical personnel to assist medical personnel in processing medical information. Specifically, the first large language model can generate processing prompt information in text form.
[0057] In some embodiments, the first preset text may include restriction conditions on the processing prompt information, so as to specifically instruct the first large language model to generate the processing prompt information that meets the restriction conditions.
[0058] Further, the restriction condition includes that the processing prompt information must include a processing solution and multiple processing solution candidates. The multiple processing solution candidates are used to select one as the processing solution included in the processing prompt information. On the one hand, the restriction condition indicates that the result generated by the large language model needs to include the processing solution data item, and on the other hand, the data corresponding to the data item can be obtained by selecting one from the multiple processing solution candidates.
[0059] In one implementation scenario, the plurality of processing solution candidates may include a first solution candidate, a second solution candidate, and a third solution candidate.
[0060] In a specific application scenario, the constraints may include: answering what processing operations the target object needs to perform next, <treatment>The candidates are ["First option candidate", "Second option candidate", "Third option candidate"].
[0061] In some embodiments, at least one of all the processing solution candidates can be used as a target solution candidate, and the restriction condition can also include that if the target solution candidate is used as a processing solution included in the processing prompt information, then the processing prompt information also needs to include at least one attribute corresponding to the target solution candidate. And the restriction condition can also include at least one attribute candidate corresponding to each attribute of each target solution candidate.
[0062] In an implementation scenario, if the target solution candidate is used as the processing solution included in the processing prompt information, then the processing prompt information also needs to include at least one attribute corresponding to the target solution candidate. One attribute corresponds to several attribute candidates, and when the processing prompt information needs to include the attribute, one of the corresponding attribute candidates is selected as the corresponding attribute included in the processing prompt information.
[0063] In a specific application scenario, the multiple processing solution candidates may include a first solution candidate, a second solution candidate, and a third solution candidate, wherein both the first solution candidate and the second solution candidate may be used as target solution candidates.
[0064] In a specific application scenario, the restriction condition may include that if the processing solution includes a first solution candidate, then the processing prompt information also needs to include at least one attribute corresponding to the first solution candidate.
[0065] In a specific application scenario, the target organ may include at least one of the stomach and the intestine. The processing prompt information may be provided to medical personnel as a reference for processing.
[0066] Furthermore, the restriction condition may also include at least one attribute candidate corresponding to each attribute of each target solution candidate. For example, for the first solution candidate, there is a first attribute and a second attribute, and the restriction condition may include attribute candidates corresponding to the first attribute and the second attribute respectively.
[0067] The attribute candidate items are used to select one of the attribute candidates as the attribute included in the processing prompt information when the processing prompt information needs to include the attribute.
[0068] In some embodiments, the restriction conditions may also include setting corresponding default candidates for some attributes.
[0069] In a specific application scenario, the target organ has a condition to be treated, such as a tumor. Multiple treatment plan candidates include surgery, chemotherapy, and observation. The surgery is a target plan candidate, and the corresponding attributes of the surgery include at least one of the type of surgery, the surgical method, the range of resection, the range of lymph node dissection, and the digestive tract reconstruction method. Chemotherapy is a target plan candidate, and the corresponding attributes of chemotherapy include at least one of the chemotherapy plan, chemotherapy drugs, targeted drugs, and immune drugs.
[0070] In a specific application scenario, the first preset text includes: You are a professional gastrointestinal oncologist. Please answer the patient's next treatment based on all the patient's examination report documents, the patient's status data summarized in JSON format, and the decision path obtained according to the guidelines. Answer requirements and format:
[0071]
[0072]
[0073] 3. When <treatment>For chemotherapy, the format is:
[0074]
[0075]
[0076] 4. When <treatment>For observation, the format is:
[0077] {
[0078] "treatment": "observation"
[0079] }
[0080] Patient examination report: [Here is the original text of all examination reports], patient status data: [Here is the patient's structured data], patient's decision path according to the guidelines: [Here is the patient's medical decision path].
[0081] When using existing machine learning or deep learning algorithms to process medical information, they are all treated as simple classification problems for prediction. In the above solution, a generative model is used to process medical information to obtain processing prompt information, which can provide more specific processing prompt information.
[0082] See also Figure 2 , Figure 2 It is a flowchart of another embodiment of step S110 of the present application.
[0083] In this embodiment, the first medical-related information includes a medical decision path, which is formed by sequentially connecting a plurality of decision nodes, and the child nodes of each decision node in the medical decision path are sequentially determined by the first language model. The medical decision path may be in text form.
[0084] It should be noted that the first medical-related information may also include the first medical report text, and in some cases, may also include the first medical structured data, wherein the first medical structured data may be extracted from the first medical report text.
[0085] Specifically, step S110 may include the following steps to obtain a medical decision path:
[0086] Step S211: Determine the first decision node of the current to-be-determined child node.
[0087] It is understandable that the first language model can be used to determine child nodes for a decision node. The first decision node in the medical decision path can be predetermined, and the first language model is used to determine child nodes for the current last decision node in turn, thereby finally obtaining a plurality of sequentially connected decision nodes, that is, obtaining a medical decision path.
[0088] Step S212: Obtain second medical-related information related to the first decision node.
[0089] The second medical related information related to the first decision node includes a second medical report text of the target object and a plurality of subnode candidates corresponding to the first decision node. The second medical report text may be the same as the first medical report text, or there may be differences between the second medical report text and the first medical report text.
[0090] In the case where the first decision node is the first decision node in the medical decision path, the second medical related information related to the first decision node includes the second medical report text of the target object and several child node candidates corresponding to the first decision node. In the case where the first decision node is not the first decision node in the medical decision path, the second medical related information related to the first decision node includes at least one second decision node with currently determined child nodes, several child node candidates corresponding to the first decision node, and the second medical report text.
[0091] In an implementation scenario, when the first decision node is not the first decision node, the first decision node is connected to a plurality of decision nodes, namely, the second decision node whose child nodes have been determined.
[0092] In some implementation scenarios, the second medical-related information may also include second medical structured data related to the target object. Furthermore, at least part of the second medical structured data may be extracted from the second medical report text. Of course, the second medical structured data may also be obtained in other ways, for example, obtaining data pre-filled by the user, etc. The second medical structured data may be the same as the first medical structured data, or there may be differences between the second medical structured data and the first medical structured data.
[0093] Step S213: Utilize the second medical-related information and the second preset text to form the second prompt information.
[0094] Among them, the second prompt information is used to instruct the first language model to select a sub-node of the first decision node from a number of sub-node candidates. Further, it can be used to instruct to select a sub-node of the first decision node from a number of sub-node candidates based on the second medical-related information.
[0095] In a specific application scenario, the second preset text may include: Please judge which sub-option the next patient is most suitable for based on all the examination report documents of the following patients, according to the decision path you have taken and the given candidate sub-node options.
[0096] In a specific application scenario, the second preset text may include: Please judge which sub-option the patient is most suitable for according to all the examination report documents of the patient below and the patient status data summarized in json format, according to the decision path taken and the given candidate sub-node options. It can be understood that the examination report document and the patient status data are the second medical report text and the second medical structured data respectively.
[0097] It is understandable that the status data may be structured data related to the patient, for example, may include the patient's age, gender, etc.
[0098] In a specific application scenario, the target organs include the stomach and intestines, and the second preset text may include: You are a professional gastroenterologist. Please judge which sub-option the patient is most suitable for based on all the examination report documents of the patient below and the patient status data summarized in json format, and follow the decision path and the given candidate sub-node options.
[0099] In some embodiments, the second prompt information may also be used to limit the generation result of the first large language model, for example, to limit the format of the generation result, or to limit the content of the generation result.
[0100] Step S214: using the first large language model based on the second prompt information, selecting a sub-node of the first decision node from a plurality of sub-node candidates.
[0101] The second prompt information is input to the first language model, and the first language model generates an output result based on the second prompt information. The output result includes one selected from a number of child node candidates as a child node of the first decision node, thereby realizing the use of the first language model to make a decision on the child node according to the input.
[0102] In some embodiments, the medical decision path may be determined based on a medical decision tree, which may be a decision tree in a guideline. Further, the first decision node in the medical decision path may be predetermined, and may be the root node of the target medical decision tree, and the child node candidates of each decision node may also be determined based on its child nodes in the target medical decision tree.
[0103] For example, in the target medical decision tree, node A is connected to three child nodes, namely B, C, and D. Then when A is the first decision node, B, C, and D can be the child node candidates corresponding to A.
[0104] Step S215: Detect whether the child nodes of the first decision node meet the preset conditions.
[0105] After completing one generation, a test can be performed based on the generated result to detect whether the child nodes of the selected first decision node meet the preset conditions. If not, step S216 is executed, and step S212 and subsequent steps are returned to be re-executed to generate again. If satisfied, the generation is terminated.
[0106] Among them, satisfying the preset condition indicates that the child node is the last node in the path, and there is no need to make a child node decision for it, and no need to generate it again. Failure to meet the preset condition may indicate that the child node is not the last node in the path, and a child node decision needs to be made for it, so that it can be updated to the first decision node and regenerated.
[0107] Step S216: Update the child node of the first decision node to the first decision node.
[0108] It is understandable that after the first decision node is updated, the child node candidate corresponding to the first decision node is also updated accordingly. In a specific application scenario, the child node candidate can be updated based on the target medical decision tree.
[0109] In some embodiments, the preset condition is that the category of the child node of the first decision node is a preset category. According to the category of the child node, it can be determined whether the child node is the last node in the path.
[0110] In a specific application scenario, the node categories in the target medical decision tree include diagnosis nodes, evaluation nodes, and processing nodes. The processing node can be used as a preset category. If the generated child node is a processing node, then there is no need to generate it again, and the complete medical decision path is obtained, which can be used as the first medical related information to generate processing prompt information.
[0111] In the above scheme, the method of using a large model plus a decision tree ensures that the ability of the large model can be utilized to obtain information from the original report without being limited to structured data, while also ensuring that the reasoning process follows the decision tree, meets the requirements of medical guidelines, and is closer to the real scene. And because of the limitation of the decision path, the generated treatment plan is more in line with the actual treatment plan, reducing the instability and lack of consistency of the large model output.
[0112] In a specific application scenario, the first language model can be used to obtain decision paths and process prompt information to assist medical treatment, greatly improve efficiency when making medical decisions, and improve the scientificity and objectivity of decisions. Because its reasoning process follows the decision tree and meets the requirements of medical guidelines, it has high interpretability and credibility, and can help young doctors learn and refer to it.
[0113] It should be noted that the first large language model is obtained by fine-tuning the pre-trained large language model. Specifically, it can be obtained by fine-tuning the pre-trained large language model using a pre-built fine-tuning dataset.
[0114] In one implementation scenario, the first large language model may be used to perform a task of generating processing prompt information, and fine-tuning the first large language model may include fine-tuning for the task of generating processing prompt information.
[0115] In one implementation scenario, the first large language model may also be used to generate child nodes, and fine-tuning the first large language model may also include fine-tuning for the task of generating child nodes.
[0116] Furthermore, the fine-tuning data contained in the fine-tuning data set may correspond to real labels. For example, the data for the task of generating processing prompt information may correspond to real processing prompt information, and the data for the task of generating child nodes may correspond to real child nodes.
[0117] In a specific application scenario, the actual processing prompt information for the target object may include that the processing solution is a first solution, and a plurality of attributes related to the first solution.
[0118] In a specific application scenario, the target object may correspond to a real decision path, which includes multiple decision nodes. The first language model is generated each time to determine the child node for the first decision node. Then, any child node on the real decision path can be used as the real child node corresponding to its parent node.
[0119] Furthermore, the true labels of at least part of the fine-tuning data in the fine-tuning dataset may be generated using the second largest language model.
[0120] In some embodiments, before using the first large language model for reasoning, the method may further include: using the second large language model to generate corresponding target annotation data for the original medical record, verifying the target annotation data generated by the second large language model, and constructing a fine-tuning data set based on the verified target annotation data and the corresponding original medical record. The fine-tuning data set can be used to fine-tune the first large language model, and after the fine-tuning is completed, the first large language model can be used for reasoning.
[0121] Among them, the original medical records contain medical information about the sample objects, which can be used to extract labeled data, and the verified target labeled data can be used to construct the true labels of the fine-tuning data.
[0122] In some embodiments, before verifying the target annotation data, a regular expression may be used to extract reference annotation data from the original medical record, and the reference annotation data is used to verify the target annotation data.
[0123] It can be understood that both the target annotation data and the reference annotation data are based on the original medical records. The target annotation data obtained by the generation method contains richer data items, and the data contained in the reference annotation data extracted by regular expressions can be considered correct. Therefore, the reference annotation data can be used to verify whether the target annotation data is generated accurately.
[0124] In an implementation scenario, the target annotation data includes multiple data items, and there is at least one overlapping data item between the reference annotation data and the target annotation data, that is, a data item included in both the reference annotation data and the target annotation data. Verifying the target annotation data may include: for each overlapping data item, comparing the corresponding data in the reference annotation data with the corresponding data in the target annotation data, obtaining a comparison result of each overlapping data item, and the comparison result is consistent or inconsistent.
[0125] In a specific application scenario, there are overlapping data items gender and age between the reference annotation data and the target annotation data. The gender data in the reference annotation data is compared with the gender data in the target annotation data to obtain a comparison result. Exemplarily, if both are male, then the comparison result is consistent. The age data in the reference annotation data is compared with the age data in the target annotation data. Exemplarily, if one is 21 years old and the other is 22 years old, then the comparison result is inconsistent.
[0126] If the comparison results corresponding to each overlapping data item are consistent, the target annotated data can be considered to have passed the verification. If the comparison result corresponding to at least one overlapping data item is inconsistent, the steps of using the second largest language model to generate the corresponding target annotated data for the original medical record and verifying the target annotated data are re-executed.
[0127] Since data annotation in the medical field involves complex medical knowledge and clinical experience, the annotation cost is very high. The above solution can generate corresponding target annotation data based on the original medical data using a large model for building real labels. The generated data is verified by regular expressions, and unqualified data is regenerated, so that high-quality annotation data can be obtained, reducing the cost of data annotation.
[0128] In one implementation scenario, the processing of the sample object can be divided into multiple stages according to the time sequence, and the data of each stage can be used to construct fine-tuning data. Specifically, multiple stages can be divided according to the processing scheme used, and each stage corresponds to a processing scheme. Exemplarily, the first processing scheme and the second processing scheme are successively adopted for the sample object, then the time period corresponding to the first processing scheme can be regarded as the first stage, and the time period from the end of the first processing scheme to the end of the second processing scheme can be regarded as the second stage. A piece of fine-tuning data can be constructed using the data of the first stage, and the corresponding real processing prompt information can be the first processing scheme and related attributes. A piece of fine-tuning data can be constructed using the data of the second stage, and the corresponding real processing prompt information can be the second processing scheme and related attributes, which is used to fine-tune the first large language model for the task of generating processing prompt information.
[0129] It can be understood that in the aforementioned embodiment, the reasoning on the target object is also for one stage, wherein the first medical-related information and the second medical-related information may be the medical information of the target object in one stage.
[0130] It is understandable that the original medical record may include records of multiple stages. According to the original medical record, target annotation data can be extracted, and the target annotation data can represent the actual treatment means taken for the sample object, and can be used to construct the actual treatment prompt information of each stage as the actual label. Exemplarily, the original medical record includes two first treatment plan records, and the corresponding extracted target annotation data can be used to construct the corresponding two stages of actual treatment prompt information.
[0131] In a specific application scenario, the original medical record may include a first treatment plan record of the sample object. The first treatment plan record is extracted and verified using the second language model to obtain target annotation data about the first treatment plan, which can be used as the real treatment prompt information of the corresponding stage.
[0132] In a specific application scenario, the original medical records include surgery records and chemotherapy records.
[0133] In some embodiments, some types of treatment plan records are relatively standardized, for example, chemotherapy records, and target annotation data about the treatment plan can be directly extracted from them according to preset rules and formats to serve as real treatment prompt information for the corresponding stage.
[0134] In a specific application scenario, the sample medical information of the sample object includes medical-related information of the sample object at each stage. The sample medical information is divided into several stages according to the processing scheme used. Fine-tuning data is constructed using the sample medical information of each stage. Specifically, a piece of fine-tuning data about generating processing prompt information can be constructed for each stage, and multiple pieces of fine-tuning data about generating sub-nodes can also be constructed for each stage. Among them, the sample medical information may include admission records, medical record report texts, imaging examination report texts, etc. The sample medical information may include surgical records. The target annotation data about the surgery can be extracted from the surgical records using the first language model and regular expressions, which can be used as the real processing prompt information for the corresponding stage. The sample medical information may include chemotherapy records, from which the target annotation data about chemotherapy is extracted according to preset rules and formats, which can be used as the real processing prompt information for the corresponding stage. It should be noted that the real medical path adopted by the sample object in the corresponding stage can be deduced based on the target annotation data about the surgery and the target annotation data about the chemotherapy, which can be used to obtain the real label of the task of generating the sub-node.
[0135] The sample medical information may also be preprocessed. The specific steps of the preprocessing may be set according to the actual application needs. For example, it may include preliminary cleaning, removing redundant and repeated content, unifying punctuation, completing missing content, correcting time tags, etc., and finally sorting according to the timeline. At least part of the preprocessing steps may be implemented using a large language model.
[0136] In one implementation scenario, the original medical record includes a first treatment plan record, and a preset prompt text and the first treatment plan record can be combined as the input of the second largest language model to prompt the second largest language model to extract target annotation data corresponding to the first treatment plan record.
[0137] In one implementation scenario, the preset prompt text can be used to limit the data items that the target annotation data needs to include, and to limit each data item to be selected from the corresponding candidate items. In some cases, the preset prompt text can also limit the default values of some data items. In some cases, the preset prompt text can also be used to limit that if a certain data item is a specific candidate item, the data items related to the data item can be omitted. In some cases, the preset prompt text can also include some relevant knowledge.
[0138] In a specific application scenario, the preset prompt text corresponding to the second largest language model can be: Please answer according to the given surgical record content in the following format, mainly referring to the name of the surgery. When the name of the surgery does not mention relevant content, refer to the content of the surgery. Think carefully, verify and ponder repeatedly, and only answer json:
[0139]
[0140] Please first determine whether it is a gastric cancer surgery or a colorectal cancer surgery, and then follow the following restrictions: <Surgery type> can only be selected from the candidate options ["radical", "extended radical", "palliative", "exploratory", "other"]. <Surgical method> can only be selected from the candidate options ["open", "laparoscopic", "da Vinci robot-assisted", "combined thoracoabdominal"]. <Resection range> can only be selected from the candidate options ["whole stomach", "distal stomach", "proximal stomach", "rectum", "sigmoid colon", "left colon", "right colon", "whole colon", "ileocecal", "small intestine"]. <Lymph node dissection range> can only be selected from the candidate options ["D1", "D1+", "D2", "D3"], and the default value is "D2". <Digestive tract reconstruction method> can only be selected from the candidate options ["Bi I", "Bi II", "Bi II+Braun", "Roux-en-Y", "Uncut Roux-en-Y", "Dual channel"], and the default value is "Bi I". If <Surgery category> is "Exploration" or "Other", you do not need to answer <Extent of resection>, <Extent of lymph node dissection> and <Digestive tract reconstruction method>. If it is a colorectal cancer surgery, you do not need to answer <Extent of lymph node dissection> and <Digestive tract reconstruction method>. Knowledge: Proximal gastrectomy is defined as the removal of part of the stomach including the cardia, and the pylorus must be retained. The distal stomach refers to the lower or distal part of the stomach, usually including the gastric antrum, pylorus, and distal gastric wall. Operation record: [Here is the original operation record text].
[0141] See also Figure 3 , Figure 3 It is a schematic diagram of the framework of an embodiment of the medical information processing device of the present application.
[0142] In this embodiment, the medical information processing device 30 includes an acquisition module 31, a composition module 32, and a generation module 33. The acquisition module 31 is used to acquire the first medical related information corresponding to the target organ of the target object, and the composition module 32 is used to use the first medical related information and the first preset text to form the first prompt information; the first prompt information includes a restriction condition, and the first prompt information is used to instruct the first large language model to generate processing prompt information that meets the restriction condition; the generation module 33 is used to use the first large language model to generate processing prompt information for the target organ based on the first prompt information.
[0143] See also Figure 4 , Figure 4 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application.
[0144] In this embodiment, the electronic device 40 includes a memory 41 and a processor 42, and the processor 42 is used to execute the program instructions stored in the memory 41 to implement the steps in any of the above-mentioned medical information processing method embodiments. In a specific implementation scenario, the electronic device 40 may include, but is not limited to: computer equipment, electrical equipment, microcomputers, desktop computers, servers, and in addition, the electronic device 40 may also include mobile devices such as laptops and tablet computers, which are not limited here.
[0145] Specifically, the processor 42 is used to control itself and the memory 41 to implement the steps in any of the above-mentioned medical information processing method embodiments. The processor 42 can also be called a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip with signal processing capabilities. The processor 42 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 42 can be implemented by an integrated circuit chip.
[0146] See also Figure 5 , Figure 5 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application.
[0147] The computer-readable storage medium 50 provided in this embodiment stores program instructions 51 that can be executed by a processor. When the program instructions 51 are executed by the processor, they are used to implement any of the above-mentioned medical information processing methods.
[0148] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0149] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another subsystem, 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, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0150] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit 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 is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.< / treatment> < / treatment> < / treatment>
Claims
1. A medical information processing method, characterized in that: The method comprises: Acquire first medical-related information corresponding to a target organ of a target object; The first prompt information is composed of the first medical related information and the first preset text; the first prompt information includes a restriction condition, and the first prompt information is used to instruct the first large language model to generate processing prompt information that satisfies the restriction condition; The first large language model is used to generate processing prompt information for the target organ based on the first prompt information.
2. The method according to claim 1, characterized in that The restriction condition includes that the processing prompt information must include a processing solution and a plurality of processing solution candidates, and the plurality of processing solution candidates are used to select one as the processing solution included in the processing prompt information.
3. The method according to claim 2, characterized in that At least one of the processing solution candidates is a target solution candidate, and the restriction condition further includes at least one attribute candidate corresponding to each attribute of each of the target solution candidates; If the target solution candidate is used as the processing solution included in the processing prompt information, the at least one attribute candidate is used to select one as the attribute of the target solution candidate included in the processing prompt information.
4. The method according to any one of claims 1 to 3, characterized in that The first medical related information includes a first medical report text and a medical decision path of the target object, or the first medical related information includes a first medical report text, a medical decision path and first medical structured data related to the target object, wherein at least part of the first medical structured data is extracted based on the first medical report text; and / or, The target organ includes at least one of the stomach and the intestine.
5. The method according to any one of claims 1 to 4, characterized in that The first medical related information includes a medical decision path, which is formed by sequentially connecting a plurality of decision nodes, and the child nodes of each decision node in the medical decision path are sequentially determined by the first large language model; the first medical related information corresponding to the target organ of the target object is obtained including: Determine the first decision node of the current to-be-determined child node; Acquire second medical related information related to the first decision node, the second medical related information including a second medical report text of the target object and a plurality of child node candidates corresponding to the first decision node, and in the case where the first decision node is not the first decision node in the medical decision path, the second medical related information also includes at least one second decision node with currently determined child nodes; Using the second medical related information and the second preset text to form a second prompt information; Selecting a subnode of the first decision node from the plurality of subnode candidates using the first large language model based on the second prompt information; In response to the child node of the first decision node not satisfying the preset condition, the child node of the first decision node is updated to the first decision node, and the step of obtaining the second medical-related information related to the first decision node and subsequent steps are re-executed.
6. The method according to claim 5, characterized in that The preset condition is that the category of the child node of the first decision node is a preset category; and / or, The second medical-related information further includes second medical structured data related to the target object, wherein at least part of the second medical structured data is extracted based on the second medical report text; and / or, The first decision node in the medical decision path is the root node of the target medical decision tree, and the plurality of child node candidates are determined based on the child nodes of the first decision node in the target medical decision tree.
7. The method according to any one of claims 1 to 6, characterized in that Before generating processing prompt information for the target organ based on the first prompt information using the first large language model, the method further includes: Use the second language model to generate corresponding target annotation data for the original medical records; Verifying the target annotated data generated by the second largest language model; A fine-tuning dataset is constructed based on the verified target annotated data and the original medical records, and the fine-tuning dataset is used to fine-tune the first large language model.
8. The method according to claim 7, characterized in that Before verifying the target annotated data generated by the second largest language model, the method further includes: extracting reference annotation data from the original medical record using a regular expression, wherein there is at least one overlapping data item between the reference annotation data and the target annotation data; The verifying the target annotated data generated by the second largest language model includes: Compare the data corresponding to each of the overlapping data items in the reference labeled data and the target labeled data to obtain a comparison result corresponding to each of the overlapping data items, wherein the comparison result is consistent or inconsistent; In response to the fact that the comparison result corresponding to at least one of the overlapping data items is inconsistent, the steps of generating corresponding target annotation data for the original medical record using the second largest language model and verifying the target annotation data generated by the second largest language model are re-executed.
9. A medical information processing device, characterized in that: The device comprises: An acquisition module, configured to acquire first medical-related information corresponding to a target organ of a target object; A composition module, configured to use the first medical-related information and a first preset text to compose first prompt information, wherein the first prompt information includes a restriction condition, and the first prompt information is used to instruct the first large language model to generate processing prompt information that satisfies the restriction condition; A generation module is used to generate processing prompt information for the target organ based on the first prompt information by using the first large language model.
10. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores program instructions, and when the program instructions are executed by the processor, the method according to any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
