Brain tumor diagnosis and treatment plan generation method and system by weighing knowledge base and model results

By constructing a knowledge base and a generative model of diagnosis and treatment plans related to brain tumors, combining BERT model and cosine similarity technology, the accuracy and personalization of brain tumor diagnosis and treatment plans in the existing technology are solved, and efficient and accurate recommendations of diagnosis and treatment plans are achieved.

CN119170189BActive Publication Date: 2025-03-18DIGITAL HEALTH CHINA TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411611277.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-18
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

The prior art is difficult to provide accurate and personalized diagnosis and treatment plans in the diagnosis and treatment of brain tumors. The rules-based expert system has the problem of time-consuming and costly construction and maintenance of rules, while the machine learning model is low in explanatory and trustworthy, and it is difficult for doctors to understand and accept.

Method used

By obtaining textual evidence information related to brain tumors, the BERT model is used for vectorization, a knowledge base is built, and a diagnosis and treatment plan generation model and solution scoring model are constructed. The medical record text information of the target patient is input into the diagnosis and treatment plan generation model, and combined with the text evidence information in the knowledge base, the treatment plan is generated and scored through cosine similarity technology and the scheme scoring model, and the brain tumor diagnosis and treatment plan is finally recommended.

Benefits of technology

We have achieved the trade-off knowledge base and model results to generate accurate and personalized brain tumor diagnosis and treatment plans, improve the accuracy and efficiency of diagnosis and treatment decisions, and provide better decision-making support for medical staff.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119170189B_ABST
    Figure CN119170189B_ABST
Patent Text Reader

Abstract

The present invention relates to the medical field, and in particular to a method and system for generating a diagnosis and treatment plan for a brain tumor by weighing a knowledge base and model results, the method comprising: obtaining text evidence information related to brain tumors; building a knowledge base; building and training a diagnosis and treatment plan generation model; building and training a plan scoring model; obtaining medical record text information of a target patient, and generating a recommended plan for a diagnosis and treatment plan for a brain tumor based on knowledge base matching technology and the model generation results of the diagnosis and treatment plan generation model. The present invention dynamically generates personalized auxiliary diagnosis and treatment plans by weighing an accurate knowledge base and accurate model generation results, and using a recommended plan generation technology, which not only improves the accuracy and efficiency of diagnosis and treatment decisions, but also provides better decision support for medical personnel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the medical field, and in particular to a method and system for generating a brain tumor diagnosis and treatment plan by weighing a knowledge base and model results. Background Art

[0002] In the medical field, formulating accurate and personalized diagnosis and treatment plans for patients is a complex and challenging task. Traditional diagnosis and treatment methods mainly rely on the experience and expertise of doctors, but with the rapid growth of medical knowledge and the increasing complexity of patients' conditions, doctors' knowledge and experience may not cover all situations, thus affecting the accuracy and efficiency of diagnosis and treatment decisions. In order to solve this problem, the prior art has proposed a variety of solutions including rule-based expert systems and data-driven machine learning models, but the above-mentioned public solutions have some shortcomings. For example, for the solution of rule-based expert system, the system can infer possible diagnosis and treatment suggestions from the preset rule base according to the patient's symptoms and signs by encoding medical rules and expert knowledge, but the disadvantage of this type of system is that the construction and maintenance of rules are very time-consuming and expensive, and the coverage of rules is limited; for another example, for the solution of machine learning models, these machine learning models can identify the potential correlation between the condition and the treatment response by learning a large amount of patient data, thereby providing support for diagnosis and treatment decisions, but these machine learning models have low interpretability and reliability, and are difficult for doctors to understand and accept.

[0003] To this end, a method and system for generating brain tumor diagnosis and treatment plans by weighing the knowledge base and model results were proposed. Summary of the invention

[0004] Based on this, it is necessary to provide a method and system for generating brain tumor diagnosis and treatment plans that weigh the knowledge base and model results in response to the above technical issues.

[0005] According to a first aspect of the present invention, a method for generating a diagnosis and treatment plan for a brain tumor by weighing the knowledge base and model results is provided, including: obtaining text evidence information related to brain tumors, and vectorizing the text evidence information through a BERT model to generate a text evidence embedding vector; constructing a knowledge base based on the text evidence information and the text evidence embedding vector; constructing and training a diagnosis and treatment plan generation model to obtain a target diagnosis and treatment plan generation model; constructing and training a plan scoring model to obtain a target plan scoring model; vectorizing the medical record text information of the target patient through a BERT model to generate a medical record text information embedding vector, inputting the medical record text information embedding vector into the target diagnosis and treatment plan generation model to obtain a model output treatment plan information embedding vector, and The cosine similarity technology is used to calculate the similarity of all text evidence embedding vectors in the knowledge base, and the text evidence embedding vector with the first similarity ranking is selected as the matching medical record text information embedding vector, and the medical record text information embedding vector and the model output treatment plan information embedding vector, the medical record text information embedding vector and the matching medical record text information embedding vector are spliced ​​respectively to construct a first spliced ​​text embedding vector and a second spliced ​​text embedding vector, and the first spliced ​​text embedding vector and the second spliced ​​text embedding vector are respectively input into the target plan scoring model, and two target plan scoring scores are output, and the treatment plan information corresponding to the target plan scoring score with the first score ranking is selected as the recommended plan for brain tumor diagnosis and treatment.

[0006] Optionally, the text evidence information includes general medical knowledge text information related to brain tumors and initial completed medical record text information of brain tumor patients, and the general medical knowledge text information related to brain tumors includes medical diagnosis and treatment guideline text information related to brain tumors, diagnostic standard text information related to brain tumors, diagnosis and treatment plan text information related to brain tumors, expert consensus text information related to brain tumors, textbook text information related to brain tumors, and paper text information related to brain tumors.

[0007] Optionally, before the step of vectorizing the text evidence information through the BERT model, it also includes: desensitizing the initial completed medical record text information of brain tumor patients to obtain desensitized completed medical record text information; clustering the desensitized completed medical record text information using a mean shift algorithm to obtain medical record sets of different categories; inputting the desensitized completed medical record text information in the medical record sets of different categories into a preset first large model, outputting a medical record quality score, and screening out seed completed medical record text information based on a predefined scoring threshold; based on predefined manual evaluation standards, manually reviewing the seed completed medical record text information, and screening out the retained completed medical record text information, wherein the retained completed medical record text information includes medical history information, symptom description information, examination result information, diagnosis information and treatment plan information of the original medical record.

[0008] Optionally, the text evidence embedding vector includes a general medical knowledge embedding vector related to brain tumors and a retained completed medical record embedding vector, and the retained completed medical record embedding vector includes a medical history information embedding vector, a symptom description information embedding vector, an examination result information embedding vector, a diagnosis information embedding vector and a treatment plan embedding vector of the original medical record.

[0009] Optionally, the construction and training of the diagnosis and treatment plan generation model to obtain the target diagnosis and treatment plan generation model includes: constructing an initial diagnosis and treatment plan generation model based on the Transformer model; recording the medical history information embedding vector as Ep∈R|p|×h, the symptom description information embedding vector as Es∈R|s|×h, the examination result information embedding vector as Ee∈R|e|×h, and the diagnosis information embedding vector as Ed∈R|d|×h; wherein h represents the dimension of the generated embedding vector, h is a hyperparameter, R|p|, R|s|, R|e| and R|d| respectively represent a real vector space with a length of |p|, a real vector space with a length of |s|, and a real vector space with a length of |e| A real vector space, a real vector space with a length of |d|, |p|, |s|, |e| and |d| represent the length of medical history information, the length of symptom description information, the length of examination result information and the length of diagnosis information respectively, Ep, Es, Ee and Ed represent a real matrix of |p|×h dimension, a real matrix of |s|×h dimension, a real matrix of |e|×h dimension and a real matrix of |d|×h dimension respectively; the medical history information embedding vector, the symptom description information embedding vector, the examination result information embedding vector and the diagnosis information embedding vector are concatenated to construct the first type of training data; the first type of training data is recorded as X(0)∈R|n|×h, where |n|= |p+s+e+d|, |n| represents the length of the concatenated embedding vector, R|n| represents a real vector space with a length of |n|, and X(0) represents a real matrix of |n|×h dimensions; the treatment plan embedding vector of the original medical record is used as the first type of test data; the first type of test data is recorded as Et∈R|t|×h, where |t| represents the length of the treatment plan information of the original medical record, R|t| represents a real vector space with a length of |t|, and Et represents a real matrix of |t|×h dimensions; the initial diagnosis and treatment plan generation model is trained and optimized according to the first type of training data and the first type of test data, and the target diagnosis and treatment plan generation model is output.

[0010] Optionally, the construction and training of the solution scoring model to obtain the target solution scoring model includes: constructing an initial solution scoring model based on the Transformer model; constructing an input text segment A based on medical history information, symptom description information, examination result information and diagnosis information, constructing an input text segment B based on the treatment plan information of the original medical record or the treatment plan information output by the preset first large model, splicing the input text segment A and the input text segment B according to a preset splicing input text format to construct a spliced ​​input text, vectorizing the spliced ​​input text through the BERT model to generate a spliced ​​input text embedding vector, and splitting the spliced ​​input text embedding vector into a second type of training data and a second type of test data, training and optimizing the initial solution scoring model according to the second type of training data and the second type of test data, and outputting the target solution scoring model.

[0011] Optionally, the target patient's medical record text information includes the target patient's medical history information, the target patient's symptom description information, the target patient's examination result information and the target patient's diagnosis information.

[0012] According to a second aspect of the present invention, a brain tumor diagnosis and treatment plan generation system that weighs knowledge bases and model results is provided, including: a data acquisition module for acquiring text evidence information related to brain tumors; a data processing module for vectorizing the text evidence information through a BERT model to generate a text evidence embedding vector; a knowledge base construction module for constructing a knowledge base based on the text evidence information and the text evidence embedding vector; a first model construction and training module for constructing and training a diagnosis and treatment plan generation model to obtain a target diagnosis and treatment plan generation model; a second model construction and training module for constructing and training a plan scoring model to obtain a target plan scoring model; a brain tumor diagnosis and treatment plan recommendation module for vectorizing the medical record text information of the target patient through a BERT model to generate a medical record text information embedding vector, and inputting the medical record text information embedding vector into the medical record text information embedding vector; The target diagnosis and treatment plan generation model is input to obtain the model output treatment plan information embedding vector, and based on the medical record text information embedding vector, the cosine similarity technology is used to calculate the similarity of all text evidence embedding vectors in the knowledge base, and the text evidence embedding vector with the first similarity ranking is selected as the matching medical record text information embedding vector, and the medical record text information embedding vector and the model output treatment plan information embedding vector, the medical record text information embedding vector and the matching medical record text information embedding vector are spliced ​​respectively to construct a first spliced ​​text embedding vector and a second spliced ​​text embedding vector, and the first spliced ​​text embedding vector and the second spliced ​​text embedding vector are respectively input into the target plan scoring model, and two target plan scoring scores are output, and the treatment plan information corresponding to the target plan scoring score with the first score ranking is selected as the recommended plan for brain tumor diagnosis and treatment.

[0013] According to a third aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method when executing the computer program.

[0014] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the steps of the method when executed by a processor.

[0015] The advantages and beneficial effects of the present invention are as follows: the method and system for generating a diagnosis and treatment plan for a brain tumor by weighing the knowledge base and the model results provided by the present invention, the method constructs a knowledge base related to brain tumors and covering a wide range of knowledge by acquiring text evidence information related to brain tumors and performing vectorization processing on the text evidence information, and by setting a diagnosis and treatment plan generation model, inputs the medical record text information of the target patient into the diagnosis and treatment plan generation model, provides a first recommended plan according to the prediction result in the diagnosis and treatment plan generation model, and uses the cosine similarity technology to screen out the text evidence information with the highest similarity to the medical record text information of the target patient from the knowledge base as the second recommended plan The recommended plan is created by concatenating and vectorizing the target patient's medical record text information and the first recommended plan, the target patient's medical record text information and the second recommended plan, and inputting them into the plan scoring model. The two target plan scores output by the plan scoring model are compared, and the treatment plan information corresponding to the highest target plan score is selected as the recommended plan for brain tumor diagnosis and treatment. The recommended plan balances the precise knowledge base and accurate model generation results. At the same time, the recommended plan generation technology is used to dynamically generate personalized auxiliary diagnosis and treatment plans, which not only improves the accuracy and efficiency of diagnosis and treatment decisions, but also provides better decision-making support for medical staff. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is the overall flow chart of the present invention.

[0017] Figure 2 It is a system principle block diagram of the present invention.

[0018] Figure 3 A schematic diagram of an electronic device. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below through specific implementation methods in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0020] Embodiment 1

[0021] Figure 1 This is a flowchart of a method for generating a brain tumor diagnosis and treatment plan by weighing the knowledge base and model results provided in Example 1 of the present invention.

[0022] Reference Figure 1 , the method comprises the following steps.

[0023] S1. Obtain text evidence information related to brain tumors, and vectorize the text evidence information through the BERT model to generate a text evidence embedding vector.

[0024] In this embodiment, the text evidence information includes general medical knowledge text information related to brain tumors and initial completed medical record text information of brain tumor patients; the general medical knowledge text information related to brain tumors includes medical diagnosis and treatment guideline text information related to brain tumors, diagnostic standard text information related to brain tumors, diagnosis and treatment plan text information related to brain tumors, expert consensus text information related to brain tumors, textbook text information related to brain tumors, and paper text information related to brain tumors.

[0025] In this embodiment, due to the similarity and large number of patient medical records, as well as the different writing habits of different doctors, it is necessary to screen the text information of the initial completed medical records of brain tumor patients so that the screened retained completed medical record text information can be stored in the knowledge base. To this end, this application also includes pre-processing the text information of the initial completed medical records of brain tumor patients before vectorizing the text evidence information through the BERT model.

[0026] In this embodiment, the initial completed medical record text information of the brain tumor patient is preprocessed, including: (1) desensitizing the initial completed medical record text information of the brain tumor patient to obtain desensitized completed medical record text information; for example, the patient name and doctor name contained in the initial completed medical record text information of the brain tumor patient are randomly replaced, such as replacing them with "Zhang San" to ensure that the former and latter names of the same person are consistent; the " (1) The word "hospital" is replaced with "hospital"; the date contained in the text information of the initial completed medical records of brain tumor patients is processed, such as converting the original date into the date format of x year x month x day; the mobile phone number, public account number and other information contained in the text information of the initial completed medical records of brain tumor patients are deleted; (2) the mean shift algorithm is used to cluster the desensitized completed medical record text information to obtain medical record sets of different categories, among which the desensitized completed medical record text information is clustered according to the clustering principle of retaining 1 / 100 of each category and retaining all articles if less than 100 articles; (3) the desensitized completed medical record text information in the medical record sets of different categories is input into the preset first large model, and the medical record quality score is output. According to the predefined scoring threshold, the seed completed medical record text information is screened out; for example, the desensitized completed medical record text information is sent to the locally deployed large model (such as Tongyi Qianwen (4) Based on the predefined manual evaluation criteria, the seed completed medical record text information is manually reviewed, and the retained completed medical record text information is selected; wherein, for the seed completed medical record text information, during the manual review, the predefined manual evaluation criteria are that the seed completed medical record text information contains patient information, and the patient information includes but is not limited to the chief complaint information, current medical history information, past medical history information, physical examination information, auxiliary examination information, laboratory examination information, imaging examination information, etc., and at least one data in the auxiliary examination information or laboratory examination information is complete. If the seed completed medical record text information meets the predefined manual evaluation criteria, it is retained, and the retained completed medical record text information is selected.

[0027] In this embodiment, based on the BERT model, the general medical knowledge text information related to brain tumors and the retained completed medical record text information are vectorized to generate general medical knowledge embedding vectors related to brain tumors and retained completed medical record embedding vectors, wherein the retained completed medical record embedding vectors include but are not limited to medical history information embedding vectors, symptom description information embedding vectors, examination result information embedding vectors, diagnosis information embedding vectors, and treatment plan embedding vectors of the original medical records, etc.

[0028] S2. Build a knowledge base based on text evidence information and text evidence embedding vectors.

[0029] S3. Build and train a diagnosis and treatment plan generation model to obtain a target diagnosis and treatment plan generation model.

[0030] In this embodiment, a diagnosis and treatment plan generation model is constructed and trained to obtain a target diagnosis and treatment plan generation model, including: constructing an initial diagnosis and treatment plan generation model based on the Transformer model; recording the medical history information embedding vector as Ep∈R|p|×h, the symptom description information embedding vector as Es∈R|s|×h, the examination result information embedding vector as Ee∈R|e|×h, and the diagnosis information embedding vector as Ed∈R|d|×h; wherein h represents the dimension of the generated embedding vector, h is a hyperparameter, and R|p|, R|s|, R|e|, and R|d| respectively represent a real vector space with a length of |p|, a real vector space with a length of |s|, and a real vector space with a length of |e|. A real vector space, a real vector space with a length of |d|, |p|, |s|, |e| and |d| represent the length of medical history information, the length of symptom description information, the length of examination result information and the length of diagnosis information respectively, Ep, Es, Ee and Ed represent a real matrix of |p|×h dimension, a real matrix of |s|×h dimension, a real matrix of |e|×h dimension and a real matrix of |d|×h dimension respectively; the medical history information embedding vector, the symptom description information embedding vector, the examination result information embedding vector and the diagnosis information embedding vector are concatenated to construct the first type of training data; the first type of training data is recorded as X(0)∈R|n|×h, where |n|= |p+s+e+d|, |n| represents the length of the concatenated embedding vector, R|n| represents a real vector space with a length of |n|, and X(0) represents a real matrix of |n|×h dimensions; the treatment plan embedding vector of the original medical record is used as the first type of test data; the first type of test data is recorded as Et∈R|t|×h, where |t| represents the length of the treatment plan information of the original medical record, R|t| represents a real vector space with a length of |t|, and Et represents a real matrix of |t|×h dimensions; the initial diagnosis and treatment plan generation model is trained and optimized according to the first type of training data and the first type of test data, and the target diagnosis and treatment plan generation model is output.

[0031] In this embodiment, the present application adopts the Transformer model to construct an initial solution scoring model. By splicing multiple information sources to better extract patient characteristics, the specific process of training the initial solution scoring model includes: first, obtaining the patient's medical history information embedding vector, symptom description information embedding vector, examination result information embedding vector and diagnosis information embedding vector from the knowledge base; wherein the medical history information corresponding to the medical history information embedding vector includes but is not limited to the patient's basic information, past medical history, family medical history and other information. The medical history information embedding vector is denoted as Ep∈R|p|×h, |p| represents the length of the medical history information, and R|p| represents a length of |p |, Ep represents a real number matrix of dimension |p|×h; the symptom description information corresponding to the symptom description information embedding vector includes but is not limited to the patient's main symptoms and discomfort, etc., the symptom description information embedding vector is denoted as Es∈R|s|×h, |s| represents the length of the symptom description information, R|s| represents a real number vector space of length |s|, Es represents a real number matrix of dimension |s|×h; the examination result information corresponding to the examination result information embedding vector includes but is not limited to auxiliary examinations, laboratory examinations, imaging examinations, etc., the examination result information embedding vector is denoted as Ee∈R|e|×h, |e| represents the examination result The length of the information, R|e| represents a real vector space with a length of |e|, and Ee represents a real matrix with a dimension of |e|×h. The diagnostic information corresponding to the diagnostic information embedding vector includes but is not limited to preliminary diagnosis, suspected diagnosis and other information. The diagnostic information embedding vector is recorded as Ed∈R|d|×h, |d| represents the length of the examination result information, R|d| represents a real vector space with a length of |d|, and Ed represents a real matrix with a dimension of |d|×h. In the above four embedding vectors, h represents the dimension of the generated embedding vector, and h is a hyperparameter. It should be noted that if the length of the text information (such as the length of the medical history information) exceeds the parameter m, ax_length (the longest text length), it needs to be truncated, that is, the maximum does not exceed max_length, which is usually set to 512; secondly, the above four embedding vectors are concatenated to construct the first type of training data; the first type of training data is recorded as X(0)∈R|n|×h, where |n|=|p+s+e+d|, |n| represents the length of the concatenated embedding vector, R|n| represents a real vector space with a length of |n|, and X(0) represents a real matrix of |n|×h dimensions; then, the treatment plan embedding vector of the original medical record is used as the first type of test data;Among them, the treatment plan corresponding to the first type of test data includes but is not limited to drug treatment, surgical treatment, rehabilitation plan and other information. The first type of test data is recorded as Et∈R|t|×h, where |t| represents the length of the treatment plan information of the original case, R|t| represents a real vector space with a length of |t|, and Et represents a real matrix of |t|×h dimensions; again, the initial diagnosis and treatment plan generation model is trained and optimized using the first type of training data and the first type of test data, and the target diagnosis and treatment plan generation model is output. It should be understood that the output result of the trained target diagnosis and treatment plan generation model is the treatment plan embedding vector. In the process of training and optimizing the initial diagnosis and treatment plan generation model, the treatment plan embedding vector of the original case will be used as the training target for fitting. The training method is to calculate the loss (such as cross entropy loss) of the treatment plan information embedding vector generated by the model and the treatment plan embedding vector of the original case, in order to continuously reduce the loss until the loss between the two is minimized, and the target diagnosis and treatment plan generation model is obtained. ;

[0032] S4. Build and train a solution scoring model to obtain a target solution scoring model.

[0033] In this embodiment, a scheme scoring model is constructed and trained to obtain a target scheme scoring model, including: constructing an initial scheme scoring model based on a Transformer model; constructing an input text segment A based on medical history information, symptom description information, examination result information and diagnosis information, constructing an input text segment B based on the treatment scheme information of the original medical record or the treatment scheme information output by a preset first large model, concatenating the input text segment A and the input text segment B according to a preset concatenated input text format to construct a concatenated input text, vectorizing the concatenated input text through a BERT model to generate a concatenated input text embedding vector, and splitting the concatenated input text embedding vector into a second type of training data and a second type of test data, training and optimizing the initial scheme scoring model according to the second type of training data and the second type of test data, and outputting a target scheme scoring model.

[0034] In this embodiment, the present application also uses the Transformer model to construct an initial solution scoring model, and the input part of the model is the result of splicing two parts, wherein the input text segment A is the patient's medical history information, symptom description information, examination result information and diagnosis information in the database, and the input text segment B is the treatment plan information of the patient's original medical record or the treatment plan information output by the preset first large model. Subsequently, the input text segment A and the input text segment B are spliced ​​according to a predefined splicing input text format, for example: a splicing input text format of input text segment A[SEP] input text segment B is constructed, wherein the [SEP] symbol is used to separate the two input texts The fragment is then vectorized through the BERT model to obtain the concatenated input text embedding vector; the concatenated input text embedding vector is split into the second type of training data and the second type of test data, the second type of training data is used to perform deep learning on the initial solution scoring model, the second type of test data is used to test the initial solution scoring model, the model parameters are optimized according to the test results, and the target solution scoring model is output; it should be understood that the output result of the trained target solution scoring model is a numerical score in the range of 0 to 1, and the output part of the solution scoring model is a fully connected layer with a dimension of 1, which gives a score through softmax normalization. When training the initial solution scoring model, each input pair If the input text segment B comes from the knowledge base, the output score is 1. If the input text segment B comes from the treatment plan information output by the preset first model (such as the Tongyi Qianwen model), the second model needs to be replaced to score the treatment plan information output by the first model. Among them, the second model adopts the GPT4 model to avoid being the same as the preset first model, to prevent self-questioning and self-answering, and to prevent unreliable results. The score of the second model is between 0 and 1, with 1 point for complete compliance and 0 point for complete non-compliance. In this way, the training process of the initial plan scoring model is realized; it should be noted that if the input text segment B comes from the preset first model (such as the Tongyi Qianwen model), The treatment plan information output by the first model (such as the GPT4 model) can be obtained by asking questions in the second model (such as the GPT4 model), such as "You are a doctor. Based on the input text fragment A, you need to score the treatment plan of the input text fragment B. The result is required to be between 0 and 1 points. If the basis of the treatment plan comes from the input text fragment A, and the nursing method is related to the patient's condition and has good logic, then 1 point is output. If the answer cannot find a basis in the input text fragment A, the nursing method is irrelevant to the patient's condition, and the logic is very poor, then 1 point is output. The answer in between will be scored according to the actual situation". The scoring result can be obtained through the second model (such as the GPT4 model) and used as the score of the treatment plan generated by the first model.

[0035] S5. Vectorize the target patient's medical record text information through the BERT model to generate a medical record text information embedding vector, input the medical record text information embedding vector into the target diagnosis and treatment plan generation model to obtain the model output treatment plan information embedding vector, and based on the medical record text information embedding vector, use the cosine similarity technology to calculate the similarity of all text evidence embedding vectors in the knowledge base, and select the text evidence embedding vector with the first similarity ranking as the matching medical record text information embedding vector, concatenate the medical record text information embedding vector and the model output treatment plan information embedding vector, the medical record text information embedding vector and the matching medical record text information embedding vector, respectively, to construct a first concatenated text embedding vector and a second concatenated text embedding vector, and input the first concatenated text embedding vector and the second concatenated text embedding vector into the target plan scoring model respectively, output two target plan scoring scores, and select the treatment plan information corresponding to the target plan scoring score with the first score ranking as the recommended plan for brain tumor diagnosis and treatment.

[0036] In this embodiment, the medical record text information of the target patient includes the medical history information of the target patient, the symptom description information of the target patient, the examination result information of the target patient and the diagnosis information of the target patient.

[0037] In this embodiment, in order to balance the optimal solution of the prediction results of the diagnosis and treatment plan generation model and the matching results of the knowledge base, so as to obtain a recommended brain tumor diagnosis and treatment plan, first, it is necessary to obtain the medical record text information a of the target patient, wherein the medical record text information includes the medical history information of the target patient, the symptom description information of the target patient, the examination result information of the target patient and the diagnosis information of the target patient; secondly, the medical record text information is vectorized by using the BERT model to obtain the model output treatment plan information embedding vector, and the vectorization result is input into the target diagnosis and treatment plan generation model to generate a model-predicted treatment plan b1 (i.e., the model output treatment plan information embedding vector); at the same time, the model output treatment plan information embedding vector is embedded with all the text evidence in the knowledge base using the cosine similarity technology. The vector similarity is calculated to obtain the cosine similarity of each text evidence embedding vector, and the cosine similarity of each text evidence embedding vector is sorted from high to low, and the text evidence embedding vector with the first cosine similarity is selected as the matching medical record text information embedding vector b2; then, the medical record text information a and the model output treatment plan information embedding vector b1, the medical record text information a and the matching medical record text information embedding vector b2 are spliced ​​respectively to obtain the medical record text information a[SEP] model output treatment plan information embedding vector b1, the medical record text information a[SEP] matching medical record text information embedding vector b2, and input them into the target plan scoring model, output the corresponding scores s1 and s2, and select the corresponding treatment plan information with the higher score in s1 and s2 as the recommended plan for brain tumor diagnosis and treatment plan and output it.

[0038] Embodiment 2

[0039] Based on the above-mentioned embodiment 1, this embodiment provides a brain tumor diagnosis and treatment plan generation system 200 that weighs the knowledge base and model results. Figure 2 , implementing the method for generating a brain tumor diagnosis and treatment plan by weighing the knowledge base and model results as described in Example 1, the system includes a data acquisition module 210, a data processing module 220, a knowledge base construction module 230, a first model construction and training module 240, a second model construction and training module 250 and a brain tumor diagnosis and treatment plan recommendation module 260.

[0040] In this embodiment, the data acquisition module 210 is used to acquire text evidence information related to brain tumors.

[0041] In this embodiment, the data processing module 220 is used to vectorize the text evidence information through the BERT model to generate a text evidence embedding vector.

[0042] In this embodiment, the knowledge base construction module 230 is used to construct a knowledge base based on text evidence information and text evidence embedding vectors.

[0043] In this embodiment, the first model building and training module 240 is used to build and train a diagnosis and treatment plan generation model to obtain a target diagnosis and treatment plan generation model.

[0044] In this embodiment, the second model building and training module 250 is used to build and train a solution scoring model to obtain a target solution scoring model.

[0045] In this embodiment, the brain tumor diagnosis and treatment plan recommendation module 260 is used to vectorize the medical record text information of the target patient through the BERT model to generate a medical record text information embedding vector, input the medical record text information embedding vector into the target diagnosis and treatment plan generation model, obtain the model output treatment plan information embedding vector, and based on the medical record text information embedding vector, use the cosine similarity technology to calculate the similarity of all text evidence embedding vectors in the knowledge base, and select the text evidence embedding vector with the first similarity ranking as the matching medical record text information embedding vector, and splice the medical record text information embedding vector and the model output treatment plan information embedding vector, the medical record text information embedding vector and the matching medical record text information embedding vector respectively to construct a first spliced ​​text embedding vector and a second spliced ​​text embedding vector, and input the first spliced ​​text embedding vector and the second spliced ​​text embedding vector respectively into the target plan scoring model, output two target plan scoring scores, and select the treatment plan information corresponding to the target plan scoring score with the first score ranking as the recommended plan for brain tumor diagnosis and treatment plan.

[0046] Embodiment 3

[0047] This embodiment further provides an electronic device based on the above embodiment 1. Figure 3 , Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0048] like Figure 3 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 to a random access memory (RAM) 303. Various programs and data required for the operation of the electronic device are also stored in the RAM 303. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0049] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, etc., an output device 307 including, for example, a liquid crystal display (LCD), a speaker, etc., a storage device 308 including, for example, a magnetic tape, a hard disk, etc., and a communication device 309. The communication device 309 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Figure 3 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0050] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0051] Embodiment 4

[0052] Based on the above-mentioned embodiment 1, this embodiment further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned method are implemented.

[0053] It should be noted that the computer-readable medium mentioned above in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0054] In this embodiment, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperTextTransferProtocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an adhoc peer-to-peer network), as well as any currently known or future developed network.

[0055] The computer-readable medium may be included in the device, or may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains training data, converts the training data into initial data; determines an initial rule base based on the initial data, and optimizes the parameters of the initial rule base to obtain a target rule base; calculates the rules in the target rule base according to a preset activation weight calculation formula to obtain activation weights; determines abnormal information according to the test data and the activation weights.

[0056] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0057] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0058] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The units described may also be provided in a processor, for example, may be described as: a processor including a data acquisition unit, a rule determination unit, a weight calculation unit, and an anomaly determination unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the data acquisition unit may also be described as a "unit for acquiring training data".

[0059] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that may be used include, without limitation, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), etc.

[0060] Obviously, it should be understood by those skilled in the art that the above-mentioned various steps of the present invention can be performed in a manner different from the present invention, and the simulation method and experimental equipment include but are not limited to the above description. The above-mentioned various steps of the present invention can be performed in an order different from that here in some cases, and the steps shown or described above can be performed separately. Therefore, the present invention is not limited to any specific combination of hardware and software.

[0061] The above contents are further detailed descriptions of the present invention in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the scope of protection of the present invention.

Claims

1. A method for generating a brain tumor diagnosis and treatment plan by weighing the knowledge base and model results, characterized in that: include: Obtain text evidence information related to brain tumors, and vectorize the text evidence information through the BERT model to generate a text evidence embedding vector; The text evidence embedding vector includes a general medical knowledge embedding vector related to brain tumors and a retained completed medical record embedding vector, wherein the retained completed medical record embedding vector includes a medical history information embedding vector, a symptom description information embedding vector, an examination result information embedding vector, a diagnosis information embedding vector, and a treatment plan embedding vector of the original medical record; Build a knowledge base based on text evidence information and text evidence embedding vectors; Construct and train a diagnosis and treatment plan generation model to obtain a target diagnosis and treatment plan generation model, including: constructing an initial diagnosis and treatment plan generation model based on the Transformer model; embedding the medical history information as Ep∈R|p|×h, embedding the symptom description information as Es∈R|s|×h, embedding the examination result information as Ee∈R|e|×h, and embedding the diagnosis information as Ed∈R|d|×h; where h represents the dimension of the generated embedding vector, h is a hyperparameter, and R|p|, R|s|, R|e|, and R|d| represent a real vector space with a length of |p| and a real vector space with a length of |s|, respectively. space, a real vector space with a length of |e|, and a real vector space with a length of |d|. |p|, |s|, |e|, and |d| represent the length of medical history information, the length of symptom description information, the length of examination result information, and the length of diagnosis information, respectively. Ep, Es, Ee, and Ed represent a real matrix of |p|×h dimensions, a real matrix of |s|×h dimensions, a real matrix of |e|×h dimensions, and a real matrix of |d|×h dimensions, respectively. The above four embedding vectors are concatenated to construct the first type of training data. The first type of training data is denoted as X(0)∈R|n|×h, where |n|= |p+s+e+d|, |n| represents the length of the concatenated embedding vector, R|n| represents a real vector space with a length of |n|, and X(0) represents a real matrix with dimensions of |n|×h. The treatment plan embedding vector of the original medical record is used as the first type of test data, denoted as Et∈R|t|×h, where |t| represents the length of the treatment plan information of the original medical record, R|t| represents a real vector space with a length of |t|, and Et represents a real matrix with dimensions of |t|×h. The initial diagnosis and treatment plan generation model is trained and optimized based on these two types of data, and the target diagnosis and treatment plan generation model is output. Constructing and training a scheme scoring model to obtain a target scheme scoring model, including: constructing an initial scheme scoring model based on a Transformer model; constructing an input text segment A based on medical history information, symptom description information, examination result information, and diagnosis information, constructing an input text segment B based on the treatment scheme information of the original medical record or the treatment scheme information output by the preset first model, concatenating the input text segment A and the input text segment B according to a preset concatenated input text format to construct a concatenated input text, vectorizing the concatenated input text through a BERT model to generate a concatenated input text embedding vector, and splitting it into a second type of training data and a second type of test data, training and optimizing the initial scheme scoring model based on these two types of data, and outputting a target scheme scoring model; The target patient's medical record text information is vectorized through the BERT model to generate a medical record text information embedding vector, which is input into the target diagnosis and treatment plan generation model to obtain the model output treatment plan information embedding vector. Based on the medical record text information embedding vector, the cosine similarity technology is used to calculate the similarity of all text evidence embedding vectors in the knowledge base, and the text evidence embedding vector with the first similarity ranking is selected as the matching medical record text information embedding vector. The medical record text information embedding vector and the model output treatment plan information embedding vector, the medical record text information embedding vector and the matching medical record text information embedding vector are spliced ​​respectively to construct the first spliced ​​text embedding vector and the second spliced ​​text embedding vector. These two types of embedding vectors are respectively input into the target plan scoring model to output two target plan scoring scores, and the treatment plan information corresponding to the target plan scoring score with the first score ranking is selected as the recommended plan for brain tumor diagnosis and treatment.

2. The method for generating a brain tumor diagnosis and treatment plan by weighing the knowledge base and model results according to claim 1, characterized in that: The text evidence information includes general medical knowledge text information related to brain tumors and initial completed medical record text information of brain tumor patients. The general medical knowledge text information related to brain tumors includes medical diagnosis and treatment guideline text information related to brain tumors, diagnostic standard text information related to brain tumors, diagnosis and treatment plan text information related to brain tumors, expert consensus text information related to brain tumors, textbook text information related to brain tumors, and paper text information related to brain tumors.

3. The method for generating a brain tumor diagnosis and treatment plan by weighing the knowledge base and model results according to claim 2, characterized in that: Before the step of vectorizing the text evidence information through the BERT model, the method further includes: Desensitizing the text information of the initial completed medical records of patients with brain tumors to obtain desensitized completed medical record text information; The mean shift algorithm was used to cluster the text information of the desensitized medical records to obtain medical record sets of different categories. Input the desensitized completed medical record text information in different categories of medical record sets into the preset first model, output the medical record quality score, and filter out the seed completed medical record text information according to the predefined score threshold; Based on the predefined manual evaluation criteria, the text information of the seed completed medical records is manually reviewed, and the text information of the completed medical records is selected and retained; The retained completed medical record text information includes medical history information, symptom description information, examination result information, diagnosis information and treatment plan information of the original medical record.

4. The method for generating a brain tumor diagnosis and treatment plan by weighing the knowledge base and model results according to claim 1, characterized in that: The target patient's medical record text information includes the target patient's medical history information, the target patient's symptom description information, the target patient's examination result information and the target patient's diagnosis information.

5. A brain tumor diagnosis and treatment plan generation system that weighs the knowledge base and model results, characterized in that: include: A data acquisition module, used to acquire text evidence information related to brain tumors; The data processing module is used to vectorize the text evidence information through the BERT model to generate text evidence embedding vectors; The text evidence embedding vector includes a general medical knowledge embedding vector related to brain tumors and a retained completed medical record embedding vector, wherein the retained completed medical record embedding vector includes a medical history information embedding vector, a symptom description information embedding vector, an examination result information embedding vector, a diagnosis information embedding vector, and a treatment plan embedding vector of the original medical record; A knowledge base construction module is used to construct a knowledge base based on text evidence information and text evidence embedding vectors; The first model construction and training module is used to construct and train a diagnosis and treatment plan generation model to obtain a target diagnosis and treatment plan generation model, including: constructing an initial diagnosis and treatment plan generation model based on a Transformer model; recording the medical history information embedding vector as Ep∈R|p|×h, the symptom description information embedding vector as Es∈R|s|×h, the examination result information embedding vector as Ee∈R|e|×h, and the diagnosis information embedding vector as Ed∈R|d|×h; wherein h represents the dimension of the generated embedding vector, h is a hyperparameter, and R|p|, R|s|, R|e|, and R|d| respectively represent a real vector space with a length of |p|, a real vector space with a length of | s|, a real vector space with a length of |e|, and a real vector space with a length of |d|. |p|, |s|, |e|, and |d| represent the length of medical history information, the length of symptom description information, the length of examination result information, and the length of diagnosis information, respectively. Ep, Es, Ee, and Ed represent a real matrix of |p|×h dimensions, a real matrix of |s|×h dimensions, a real matrix of |e|×h dimensions, and a real matrix of |d|×h dimensions, respectively. The above four embedding vectors are concatenated to construct the first type of training data. The first type of training data is denoted as X(0)∈R|n|×h, where |n|= |p+s+e+d|, |n| represents the length of the concatenated embedding vector, R|n| represents a real vector space with a length of |n|, and X(0) represents a real matrix with dimensions of |n|×h. The treatment plan embedding vector of the original medical record is used as the first type of test data, denoted as Et∈R|t|×h, where |t| represents the length of the treatment plan information of the original medical record, R|t| represents a real vector space with a length of |t|, and Et represents a real matrix with dimensions of |t|×h. The initial diagnosis and treatment plan generation model is trained and optimized based on these two types of data, and the target diagnosis and treatment plan generation model is output. The second model construction and training module is used to construct and train a scheme scoring model to obtain a target scheme scoring model, including: constructing an initial scheme scoring model based on a Transformer model; constructing an input text segment A based on medical history information, symptom description information, examination result information, and diagnosis information; constructing an input text segment B based on the treatment scheme information of the original medical record or the treatment scheme information output by the preset first large model; concatenating the input text segment A and the input text segment B according to a preset concatenated input text format to construct a concatenated input text; vectorizing the concatenated input text through a BERT model to generate a concatenated input text embedding vector, and splitting it into a second type of training data and a second type of test data; training and optimizing the initial scheme scoring model based on these two types of data, and outputting a target scheme scoring model; The brain tumor diagnosis and treatment plan recommendation module is used to vectorize the target patient's medical record text information through the BERT model, generate a medical record text information embedding vector, and input it into the target diagnosis and treatment plan generation model to obtain the model output treatment plan information embedding vector, and based on the medical record text information embedding vector, use the cosine similarity technology to calculate the similarity of all text evidence embedding vectors in the knowledge base, and select the text evidence embedding vector with the first similarity ranking as the matching medical record text information embedding vector, and splice the medical record text information embedding vector and the model output treatment plan information embedding vector, the medical record text information embedding vector and the matching medical record text information embedding vector, respectively, to construct a first spliced ​​text embedding vector and a second spliced ​​text embedding vector, and input these two types of embedding vectors into the target plan scoring model respectively, output two target plan scoring scores, and select the treatment plan information corresponding to the target plan scoring score with the first score ranking as the recommended plan for brain tumor diagnosis and treatment plans.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Medical record text similarity retrieval method and system and computer equipment

    CN111949759A

  • Medical scheme recommendation method and device, equipment and storage medium

    CN116612849A