Training method and device of diagnosis suggestion generation model and electronic equipment

By using the evaluation method of multi-evaluation dimensions and medical diagnostic vocabulary in the diagnostic suggestion generation model, the problem of insufficient accuracy in generating Chinese diagnostic suggestions is solved, and high-precision diagnostic suggestions generation is achieved.

CN119649981APending Publication Date: 2025-03-18BEIJING TIANTAN HOSPITAL AFFILIATED TO CAPITAL MEDICAL UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411700047.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing models that automatically generate Chinese diagnostic suggestions are relatively simple when understanding and processing the description and diagnostic suggestions of Chinese image reports, and the inadequate way of measuring the quality of model generation, making it difficult to obtain a high-precision diagnostic suggestions generation model.

Method used

By sorting out multiple medical image reports, dividing the training sample set and the test sample set, using different evaluation dimensions (similarity, text, words, sequence dimensions) and medical diagnostic vocabulary list, a confusion matrix is ​​constructed to determine the first evaluation indicator and the second evaluation indicator of the model, thereby training a high-precision diagnostic suggestions generation model.

Benefits of technology

It realizes accurate generation of diagnostic suggestions on multiple evaluation dimensions, improves the generation quality and accuracy of the model, and can more accurately assist radiologists in writing diagnostic suggestions for medical images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119649981A_ABST
    Figure CN119649981A_ABST
Patent Text Reader

Abstract

The invention provides a training method and device for a diagnosis suggestion generation model and electronic equipment, and the method comprises the steps: training a base model through employing a training sample set, and obtaining a to-be-verified generation model; for each description-diagnosis sample in a test sample set, inputting the description-diagnosis sample into the to-be-verified generative model, and determining a prediction diagnosis suggestion of the description-diagnosis sample; comparing the prediction diagnosis suggestion with the reference diagnosis suggestion of the description-diagnosis sample, and determining a first evaluation index of the description-diagnosis sample; determining a second evaluation index of the description-diagnosis sample in combination with a medical diagnosis word list; and based on the first evaluation index and the second evaluation index of each description-diagnosis sample, determining the total model loss of the to-be-verified generation model, analyzing the total model loss, and training to obtain a diagnosis suggestion generation model. Therefore, by means of the first evaluation index and the second evaluation index on different evaluation dimensions, the diagnosis suggestion generation model with relatively high precision can be obtained through training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a training method, device, and electronic device for a diagnosis suggestion generation model. Background Art

[0002] The diagnostic work of a radiologist generally includes several key steps, such as observing medical images (such as MRI and CT), writing image descriptions, and summarizing diagnostic recommendations. Summarizing diagnostic recommendations based on images and abnormality descriptions is the most complex and important step, and even for radiologists with extensive practical experience, it is difficult to provide relatively accurate diagnostic recommendations. In recent years, with the rapid development of computer technology in the field of natural language processing and the widespread application of deep neural network models, many text generation methods based on medical text data have emerged in the medical field. These methods use deep learning technology to extract feature information from medical text and then use the network to predict the most likely subsequent sentences, thereby automatically generating the required medical text, which can reduce the burden of writing documents for doctors to a certain extent.

[0003] Currently, existing models for automatically generating Chinese diagnostic recommendations are relatively simple in understanding and processing the descriptions and diagnostic recommendation texts in Chinese imaging reports. Moreover, when measuring the trained Chinese diagnostic recommendation model, only the similarity between the predicted diagnostic recommendation and the reference diagnostic recommendation is considered. This method makes it difficult to accurately measure the quality of medical text generation, and thus, it is impossible to obtain a diagnostic recommendation generation model with high generation accuracy. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a training method, device and electronic device for a diagnostic suggestion generation model, which can use the first evaluation indicator and the second evaluation indicator on different evaluation dimensions to train a diagnostic suggestion generation model with higher accuracy, and thus accurately generate diagnostic suggestions for medical images.

[0005] The present invention provides a method for training a diagnostic suggestion generation model, the method comprising:

[0006] By arranging the multiple medical imaging reports obtained, a training sample set for training a base model and a test sample set for verifying the base model are obtained;

[0007] Using the training sample set to train the base model to obtain a generated model to be verified;

[0008] For each description-diagnosis sample in the test sample set, input the description-diagnosis sample into the generation model to be verified to determine a predictive diagnosis suggestion for the description-diagnosis sample;

[0009] Determining a first evaluation index of the description-diagnosis sample by comparing the predictive diagnosis suggestion with a reference diagnosis suggestion of the description-diagnosis sample at different evaluation dimensions;

[0010] Determining a second evaluation metric for the description-diagnosis sample by constructing a confusion matrix between the predicted diagnosis suggestion and the reference diagnosis suggestion in combination with a pre-constructed medical diagnosis vocabulary;

[0011] Based on the first evaluation index and the second evaluation index of each description-diagnosis sample, the total model loss of the generation model to be verified is determined, and by analyzing the total model loss, a diagnosis suggestion generation model is trained.

[0012] In a possible implementation, the division of the obtained medical imaging reports into a training sample set for training a base model and a test sample set for validating the base model includes:

[0013] By collating the data of multiple medical imaging reports and combining them with the planned description-diagnosis template, multiple description-diagnosis samples are generated;

[0014] The multiple description-diagnosis samples are cleaned and divided to obtain a training sample set for training a base model and a test sample set for verifying the base model.

[0015] In a possible implementation, the data of the acquired multiple medical imaging reports is collated and combined with the planned description-diagnosis template to generate multiple description-diagnosis samples, including:

[0016] Reading the plurality of medical imaging reports in a data table format to obtain a medical data table; wherein the medical data table includes a plurality of medical row data and a plurality of medical column data; each medical row data represents a medical imaging report; and each medical column data represents a type of image feature information;

[0017] Determining feature information to be desensitized from the various types of image feature information covered by the medical data table;

[0018] Desensitizing the medical data table by deleting the medical column data in the column where the characteristic information to be desensitized is located, to obtain a desensitized medical data table;

[0019] For each medical row data in the desensitized medical data table, the medical row data is used to fill in the planned description-diagnosis template to generate a description-diagnosis sample of the medical row data, and multiple description-diagnosis samples are obtained.

[0020] In a possible implementation, the cleaning and dividing the plurality of description-diagnosis samples to obtain a training sample set for training a base model and a test sample set for validating the base model includes:

[0021] screening and cleaning the plurality of description-diagnosis samples, filtering out invalid description data in the plurality of description-diagnosis samples, and determining a plurality of description-diagnosis samples after cleaning;

[0022] According to the selected report collection time, the cleaned multiple description-diagnosis samples are divided into a training sample set and a test sample set; wherein the number of description-diagnosis samples included in the training sample set and the number of description-diagnosis samples included in the test sample set meet a preset ratio.

[0023] In one possible implementation, the evaluation dimensions include a similarity dimension, a text dimension, a word dimension, and a sequence dimension; and determining the first evaluation index of the description-diagnosis sample by comparing the predictive diagnosis suggestion with the reference diagnosis suggestion of the description-diagnosis sample on different evaluation dimensions includes:

[0024] In the similarity dimension, determining a similarity evaluation index of the description-diagnosis sample by calculating the similarity between the predicted diagnosis suggestion and the reference diagnosis suggestion;

[0025] In the text dimension, the text overlap degree of the description-diagnosis sample is obtained by determining the degree of repetition between the text appearing in the predicted diagnosis suggestion and the text appearing in the reference diagnosis suggestion;

[0026] In the word dimension, by determining the degree of repetition between the words appearing in the predicted diagnosis suggestion and the words appearing in the reference diagnosis suggestion, the degree of word overlap of the description-diagnosis sample is obtained;

[0027] In the sequence dimension, by determining the longest common subsequence between the predicted diagnosis suggestion and the reference diagnosis suggestion, the degree of sequence overlap of the description-diagnosis sample is obtained;

[0028] The similarity degree, the text overlap degree, the word overlap degree and the sequence overlap degree are determined as first evaluation indicators of the description-diagnosis sample.

[0029] In one possible implementation, the medical diagnosis vocabulary includes a medical structure vocabulary and a medical disease vocabulary; and determining the second evaluation metric for the description-diagnosis sample by combining the pre-constructed medical diagnosis vocabulary and constructing a confusion matrix between the predicted diagnosis suggestion and the reference diagnosis suggestion includes:

[0030] determining, according to the medical structure vocabulary, a predicted structure one-hot vector of the predicted diagnosis suggestion and a reference structure one-hot vector of the reference diagnosis suggestion;

[0031] Determining, according to the medical disease vocabulary, a predicted disease one-hot vector of the predicted diagnosis suggestion and a reference disease one-hot vector of the reference diagnosis suggestion;

[0032] determining a confusion matrix between the predicted diagnostic suggestion and the reference diagnostic suggestion based on the predicted structure one-hot vector, the predicted disease one-hot vector, the reference structure one-hot vector, and the reference disease one-hot vector;

[0033] Determining a plurality of measurement indicators for describing and diagnosing the sample based on the confusion matrix;

[0034] The plurality of measurement indicators are used to determine a second evaluation indicator of the description-diagnosis sample; wherein the second evaluation indicator includes precision, recall and F1 indicator.

[0035] In one possible implementation, determining the total model loss of the generative model to be verified based on the first evaluation indicator and the second evaluation indicator of each description-diagnosis sample includes:

[0036] Obtaining a first model loss of the generated model to be verified by determining an average value among a plurality of first evaluation indicators;

[0037] Obtaining a second model loss of the generated model to be verified by determining an average value among a plurality of second evaluation indicators;

[0038] Based on the first model loss and the second model loss, a total model loss of the generated model to be verified is determined.

[0039] The present application also provides a training device for a diagnostic suggestion generation model, the training device comprising:

[0040] A report segmentation module is used to sort out multiple acquired medical imaging reports and segment them into a training sample set for training a base model and a test sample set for validating the base model;

[0041] A model training module, configured to train the base model using the training sample set to obtain a generated model to be verified;

[0042] A suggestion prediction module is used to input each description-diagnosis sample in the test sample set into the generation model to be verified, and determine a predicted diagnosis suggestion for the description-diagnosis sample;

[0043] A first indicator generating module is configured to determine a first evaluation indicator of the description-diagnosis sample by comparing the predictive diagnosis suggestion with a reference diagnosis suggestion of the description-diagnosis sample in different evaluation dimensions;

[0044] A second indicator generation module is used to determine a second evaluation indicator of the description-diagnosis sample by constructing a confusion matrix between the predicted diagnosis suggestion and the reference diagnosis suggestion in combination with a pre-constructed medical diagnosis vocabulary;

[0045] The model measurement module is used to determine the total model loss of the generation model to be verified based on the first evaluation index and the second evaluation index of each description-diagnosis sample, and to train a diagnosis suggestion generation model by analyzing the total model loss.

[0046] In a possible implementation, when the report segmentation module is used to sort the acquired medical imaging reports and segment them into a training sample set for training the base model and a test sample set for validating the base model, the report segmentation module is used to:

[0047] By collating the data of multiple medical imaging reports and combining them with the planned description-diagnosis template, multiple description-diagnosis samples are generated;

[0048] The multiple description-diagnosis samples are cleaned and divided to obtain a training sample set for training a base model and a test sample set for verifying the base model.

[0049] In a possible implementation, when the report segmentation module is used to organize data from multiple acquired medical imaging reports and generate multiple description-diagnosis samples in combination with a planned description-diagnosis template, the report segmentation module is used to:

[0050] Reading the plurality of medical imaging reports in a data table format to obtain a medical data table; wherein the medical data table includes a plurality of medical row data and a plurality of medical column data; each medical row data represents a medical imaging report; and each medical column data represents a type of image feature information;

[0051] Determining feature information to be desensitized from the various types of image feature information covered by the medical data table;

[0052] Desensitizing the medical data table by deleting the medical column data in the column where the characteristic information to be desensitized is located, to obtain a desensitized medical data table;

[0053] For each medical row data in the desensitized medical data table, the medical row data is used to fill in the planned description-diagnosis template to generate a description-diagnosis sample of the medical row data, and multiple description-diagnosis samples are obtained.

[0054] In a possible implementation, when the report segmentation module is used to clean and segment the multiple description-diagnosis samples to obtain a training sample set for training a base model and a test sample set for validating the base model, the report segmentation module is used to:

[0055] screening and cleaning the plurality of description-diagnosis samples, filtering out invalid description data in the plurality of description-diagnosis samples, and determining a plurality of description-diagnosis samples after cleaning;

[0056] According to the selected report collection time, the cleaned multiple description-diagnosis samples are divided into a training sample set and a test sample set; wherein the number of description-diagnosis samples included in the training sample set and the number of description-diagnosis samples included in the test sample set meet a preset ratio.

[0057] In one possible implementation, the evaluation dimensions include a similarity dimension, a text dimension, a word dimension, and a sequence dimension; when the first indicator generation module is used to determine the first evaluation indicator of the description-diagnosis sample by comparing the predictive diagnosis suggestion with the reference diagnosis suggestion of the description-diagnosis sample on different evaluation dimensions, the first indicator generation module is used to:

[0058] In the similarity dimension, determining a similarity evaluation index of the description-diagnosis sample by calculating the similarity between the predicted diagnosis suggestion and the reference diagnosis suggestion;

[0059] In the text dimension, the text overlap degree of the description-diagnosis sample is obtained by determining the degree of repetition between the text appearing in the predicted diagnosis suggestion and the text appearing in the reference diagnosis suggestion;

[0060] In the word dimension, by determining the degree of repetition between the words appearing in the predicted diagnosis suggestion and the words appearing in the reference diagnosis suggestion, the degree of word overlap of the description-diagnosis sample is obtained;

[0061] In the sequence dimension, by determining the longest common subsequence between the predicted diagnosis suggestion and the reference diagnosis suggestion, the degree of sequence overlap of the description-diagnosis sample is obtained;

[0062] The similarity degree, the text overlap degree, the word overlap degree and the sequence overlap degree are determined as first evaluation indicators of the description-diagnosis sample.

[0063] In one possible implementation, the medical diagnosis vocabulary includes a medical structure vocabulary and a medical disease vocabulary; when the second indicator generation module is used to determine the second evaluation indicator of the description-diagnosis sample by combining the pre-constructed medical diagnosis vocabulary and constructing a confusion matrix between the predicted diagnosis suggestion and the reference diagnosis suggestion, the second indicator generation module is used to:

[0064] determining, according to the medical structure vocabulary, a predicted structure one-hot vector of the predicted diagnosis suggestion and a reference structure one-hot vector of the reference diagnosis suggestion;

[0065] Determining, according to the medical disease vocabulary, a predicted disease one-hot vector of the predicted diagnosis suggestion and a reference disease one-hot vector of the reference diagnosis suggestion;

[0066] determining a confusion matrix between the predicted diagnostic suggestion and the reference diagnostic suggestion based on the predicted structure one-hot vector, the predicted disease one-hot vector, the reference structure one-hot vector, and the reference disease one-hot vector;

[0067] Determining a plurality of measurement indicators for describing and diagnosing the sample based on the confusion matrix;

[0068] The plurality of measurement indicators are used to determine a second evaluation indicator of the description-diagnosis sample; wherein the second evaluation indicator includes precision, recall and F1 indicator.

[0069] In one possible implementation, when the model measurement module is used to determine the total model loss of the generative model to be verified based on the first evaluation indicator and the second evaluation indicator of each description-diagnosis sample, the model measurement module is used to:

[0070] Obtaining a first model loss of the generated model to be verified by determining an average value among a plurality of first evaluation indicators;

[0071] Obtaining a second model loss of the generated model to be verified by determining an average value among a plurality of second evaluation indicators;

[0072] Based on the first model loss and the second model loss, a total model loss of the generated model to be verified is determined.

[0073] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the training method for the diagnostic suggestion generation model as described above are performed.

[0074] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the training method for the diagnosis suggestion generation model as described above are executed.

[0075] The training method, device, and electronic device for a diagnostic suggestion generation model provided in an embodiment of the present application, by sorting and obtaining multiple medical imaging reports, divide the obtained data into a training sample set for training a base model and a test sample set for verifying the base model; use the training sample set to train the base model to obtain a generation model to be verified; for each description-diagnosis sample in the test sample set, input the description-diagnosis sample into the generation model to be verified to determine a predicted diagnostic suggestion for the description-diagnosis sample; determine a first evaluation index for the description-diagnosis sample by comparing the predicted diagnostic suggestion with a reference diagnostic suggestion for the description-diagnosis sample on different evaluation dimensions; determine a second evaluation index for the description-diagnosis sample by constructing a confusion matrix between the predicted diagnostic suggestion and the reference diagnostic suggestion based on a pre-constructed medical diagnostic vocabulary; determine the total model loss of the generation model to be verified based on the first and second evaluation indicators of each description-diagnosis sample, and train a diagnostic suggestion generation model by analyzing the total model loss. In this way, a diagnostic suggestion generation model with high accuracy can be trained with the help of the first and second evaluation indicators on different evaluation dimensions, thereby accurately generating diagnostic suggestions for medical images.

[0076] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0078] Figure 1 A flowchart of a method for training a diagnostic suggestion generation model provided in an embodiment of the present application;

[0079] Figure 2 A schematic diagram of a medical imaging report processing process provided in an embodiment of the present application;

[0080] Figure 3 A schematic diagram of the structure of a training device for a diagnostic suggestion generation model provided in an embodiment of the present application;

[0081] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0082] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for which protection is claimed, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work falls within the scope of protection of the present application.

[0083] Research has found that the diagnostic work of radiologists generally includes several key steps, such as observing medical images (such as MRI and CT), writing image descriptions, and summarizing diagnostic recommendations. Among these steps, summarizing diagnostic recommendations based on images and abnormality descriptions is the most complex and important step. Even for radiologists with extensive practical experience, it is difficult to provide relatively accurate diagnostic recommendations. In recent years, with the rapid development of computer technology in the field of natural language processing and the widespread application of deep neural network models, many text generation methods based on medical text data have emerged in the medical field. These methods use deep learning technology to extract feature information from medical text and then use the network to predict the most likely subsequent sentences, thereby automatically generating the required medical text. This can, to a certain extent, reduce the burden of writing documents for doctors.

[0084] However, due to the high cost of collecting real medical imaging report text data and the involvement of patient privacy information, the size of the in-domain training dataset for most medical language models is limited to a sample size of around a thousand cases. This makes it difficult for many text generation methods based on medical text data to fully extract effective feature information from medical text. In particular, many current text generation models for English imaging reports have difficulty handling the large number of complex terms in Chinese medical corpus. In addition, how to evaluate the quality of medical text generation is also a difficult problem to be solved. For radiology documents, the deviation of a few words in the text may not have much impact on traditional text generation indicators, but the location of the abnormal description and the possible disease diagnosis will change dramatically. Therefore, traditional text generation evaluation indicators are difficult to comprehensively evaluate the quality of medical text generation.

[0085] Currently, existing models for automatically generating Chinese diagnostic recommendations are relatively simple in understanding and processing the descriptions and diagnostic recommendation text in Chinese imaging reports. Furthermore, when evaluating the trained Chinese diagnostic recommendation model, they only consider the similarity between the predicted and reference diagnostic recommendations. This approach makes it difficult to accurately measure the quality of medical text generation, and consequently, it is impossible to obtain a diagnostic recommendation generation model with high generation accuracy.

[0086] Furthermore, there is a medical imaging report generation system fine-tuned from a low-parameter generative large language model. However, because this system requires training on a dataset of CT imaging reports of specific areas, its generalization is low, making it difficult to truly apply to the clinical scenarios in which radiologists write complex reports. Therefore, there is no truly applicable method for automatically generating diagnostic recommendations for Chinese radiology imaging reports that can assist radiologists in writing imaging reports.

[0087] Based on this, the embodiments of the present application provide a training method, device and electronic device method for a diagnostic suggestion generation model, which can use the first evaluation indicator and the second evaluation indicator on different evaluation dimensions to train a diagnostic suggestion generation model with higher accuracy, and thus can accurately generate diagnostic suggestions for medical images.

[0088] See also Figure 1 , Figure 1 This is a flow chart of a method for training a diagnostic suggestion generation model provided in an embodiment of the present application. Figure 1 As shown in , the training method of the diagnostic suggestion generation model provided in the embodiment of the present application includes:

[0089] S101. Arrange multiple acquired medical imaging reports to obtain a training sample set for training a base model and a test sample set for verifying the base model.

[0090] S102: Use the training sample set to train the base model to obtain a generated model to be verified.

[0091] S103 : For each description-diagnosis sample in the test sample set, input the description-diagnosis sample into the generation model to be verified to determine a predictive diagnosis suggestion for the description-diagnosis sample.

[0092] S104 : Determine a first evaluation index of the description-diagnosis sample by comparing the predicted diagnosis suggestion with the reference diagnosis suggestion of the description-diagnosis sample in different evaluation dimensions.

[0093] S105 , determining a second evaluation index of the description-diagnosis sample by constructing a confusion matrix between the predicted diagnosis suggestion and the reference diagnosis suggestion in combination with a pre-constructed medical diagnosis vocabulary.

[0094] S106. Determine the total model loss of the generation model to be verified based on the first evaluation index and the second evaluation index of each description-diagnosis sample, and train a diagnosis suggestion generation model by analyzing the total model loss.

[0095] A training method for a diagnostic suggestion generation model provided in an embodiment of the present application can utilize different evaluation dimensions and medical diagnostic vocabulary in the process of training a base model. By determining the first evaluation index and the second evaluation index of each description-diagnosis sample in the test sample set, the model parameters involved in the base model can be fine-tuned. In this way, the trained diagnostic suggestion generation model can generate diagnostic suggestions with a high accuracy in multiple aspects such as text, words, sequence, similarity, and degree of confusion. In this way, the suggestion generation quality of the trained diagnostic suggestion generation model can be improved, assisting radiologists in writing medical reports.

[0096] Considering the lack of high-quality clinical real data in the Chinese medical field, a large number of radiology medical imaging reports were collected. On this basis, considering the training needs of the model, the obtained medical imaging reports were reasonably divided into training sample sets and test sample sets to ensure that the medical imaging reports included in the training sample set can cover multiple parts such as the brain, spinal cord, chest, as well as various neurological diseases such as tumors and inflammation. In this way, the trained diagnostic recommendation generation model is guaranteed to be highly generalized.

[0097] In step S101, it is considered that the obtained medical imaging report contains the patient's private medical data (for example, the patient's name, ID number, etc.), invalid data (for example, report data of surgical-specific imaging), etc.; therefore, in order to protect the patient's privacy and reduce the amount of data processing during the training process, after obtaining multiple medical imaging reports, the obtained multiple medical imaging reports are sorted out, and the obtained multiple medical imaging reports are formatted, data desensitized, data sorted, data cleaned, and sample divided, etc., to obtain a training sample set for training the base model and a test sample set for verifying the base model, so as to avoid disclosing the patient's private information in the sample and reduce the image data that is meaningless to the training process.

[0098] In one embodiment, see Figure 2 , Figure 2 This is a schematic diagram of a medical imaging report processing process provided by an embodiment of the present application. Figure 2 As shown in , step S101 includes:

[0099] S1011. By collating data from multiple acquired medical imaging reports and combining them with the planned description-diagnosis template, multiple description-diagnosis samples are generated.

[0100] In this step, in order to convert multiple medical imaging reports into a format that can be recognized by computers, the acquired medical imaging reports need to be sorted to achieve format conversion and desensitization of the medical imaging reports during the data sorting process; and combined with the planned description-diagnosis template, the medical imaging reports are converted into description-diagnosis samples that can be recognized by computers.

[0101] In one embodiment, step S1011 includes:

[0102] S10111. Read the plurality of medical imaging reports in a data table format to obtain a medical data table.

[0103] In this step, each medical imaging report is read one by one in the form of a data table (Dataframe) to convert multiple medical imaging reports into the form of a medical table, thereby obtaining a medical data table consisting of multiple medical imaging reports; specifically, each medical imaging report is read as a row in the medical table; the same image feature information in multiple medical imaging reports is used as a column in the medical table, thereby generating a medical data table.

[0104] The medical data table includes a plurality of medical row data and a plurality of medical column data; each medical row data represents a medical imaging report; and each medical column data represents a type of imaging feature information.

[0105] S10112. Determine the feature information to be desensitized from the various types of image feature information covered by the medical data table.

[0106] In this step, the feature information to be desensitized involving the patient's privacy information (for example, the patient's name, ID number, etc.) is determined from the various image feature information recorded in the medical data table, so as to filter out the key image feature information required for training the base model (for example, "age", "gender", "image description" and "image diagnosis", etc.); that is, from the multiple columns of image feature information included in the medical data table, the column where the feature information to be desensitized is located is determined.

[0107] S10113. Desensitize the medical data table by deleting the medical column data in the column where the characteristic information to be desensitized is located, and obtain a desensitized medical data table.

[0108] In this step, the medical column data in the column where the feature information to be desensitized is located in the medical data table is deleted to complete the desensitization processing of the medical data table, and then, a medical data table is obtained that only retains the key image feature information that can be used to train the base model, thereby obtaining the desensitized medical data table.

[0109] S10114. For each medical row data in the desensitized medical data table, use the medical row data to fill in the planned description-diagnosis template to generate a description-diagnosis sample of the medical row data, and obtain multiple description-diagnosis samples.

[0110] In this step, based on the obtained desensitized medical data table, each medical line data in the desensitized medical data table is converted into a description-diagnosis sample one by one; specifically, for each medical line data in the desensitized medical data table, each remaining key imaging feature information in the medical line data is used to fill in the planned description-diagnosis template to generate a description-diagnosis sample of the medical line data, and obtain multiple description-diagnosis samples; that is, the description-diagnosis sample of the medical imaging report represented by the medical line data is obtained.

[0111] For example, the key image feature information including "age", "gender", "image description" and "image diagnosis" is used as an example for explanation. The JSON format template of each medical row data is as follows:

[0112] {

[0113] "instruction":"This is the description field of a patient's [Image Type] imaging report: [Image Description]\nThe patient's gender is [Patient Gender] and age is [Patient Age]. Assuming you are an experienced radiologist with sufficient relevant medical expertise, please generate the diagnosis content of this patient's [Image Type] imaging report based on the above description so that other doctors and the patient can understand the key information in this [Image Type] image."

[0114] "output":"[Diagnosis suggestion]"

[0115] }

[0116] Among them, [Image Type] is the image type corresponding to the medical imaging report represented by the medical line data, for example, "MRI", "CT", "X-ray" and other types; [Image Description] is the information involved in the image description part of the medical imaging report represented by the medical line data, [Patient Gender] is the "Gender" information of the patient to whom the medical imaging report represented by the medical line data belongs, [Patient Age] is the "Age" information of the patient to whom the medical imaging report represented by the medical line data belongs, and [Diagnosis Recommendation] is the information involved in the image diagnosis part of the medical imaging report represented by the medical line data.

[0117] S1012: Clean and divide the multiple description-diagnosis samples to obtain a training sample set for training a base model and a test sample set for verifying the base model.

[0118] In this step, it is taken into account that the description-diagnosis samples also include invalid data, specific dates, and surgical-specific images, which are meaningless to the base model training process; therefore, after obtaining multiple description-diagnosis samples, it is necessary to further delete the data that are meaningless to the base model training process; specifically, each description-diagnosis sample is cleaned one by one to filter out the data in each description-diagnosis sample that are meaningless to the base model training process; and the description-diagnosis samples obtained after cleaning are divided to obtain a training sample set that can be used to train the base model and a test sample set that can be used to verify the base model.

[0119] Here, in order to ensure that the divided training sample set and test sample set comply with the forward-looking principle, the training sample set and test sample set can be divided according to the report collection time of the medical imaging report.

[0120] In one embodiment, step S1012 includes:

[0121] S10121. Screen and clean the multiple description-diagnosis samples, filter out invalid description data in the multiple description-diagnosis samples, and determine multiple description-diagnosis samples after cleaning.

[0122] In this step, each description-diagnosis sample is screened and cleaned one by one to filter out invalid description data such as specific dates and surgical imaging reports included in each description-diagnosis sample, thereby obtaining multiple cleaned description-diagnosis samples.

[0123] Specifically, the following code can be used to clean invalid description data:

[0124] #Do data cleaning

[0125] #1. Remove Duplicates

[0126] duplicated_rows = df.duplicated(subset = ['Description', 'Diagnosis'], keep = False)

[0127] df = df[~duplicated_rows]

[0128] #2. Deletion check failed

[0129] df = df[~df['diagnosis'].str.contains('check failed')]

[0130] df = df[~df['diagnosis'].str.contains('unfinished')]

[0131] df = df[~df['diagnosis'].str.contains('uncooperative')]

[0132] df = df[~df['Diagnosis'].str.contains('wrong',case=False)]

[0133] df=df[~df['diagnosis'].str.contains('unfinished',case=False)]

[0134] df = df[~df['Diagnosis'].str.contains('nan',case=False)]

[0135] #3. Delete the specific date (compared to 2010.1.1...)

[0136] df = df[~df['Diagnosis'].str.contains('199')]

[0137] df = df[~df['Diagnosis'].str.contains('200')]

[0138] df = df[~df['Diagnosis'].str.contains('201')]

[0139] df = df[~df['Diagnosis'].str.contains('202')]

[0140] #4. Delete the diagnosis that only contains “postoperative changes”

[0141] df = df[~df['diagnosis'].str.endswith('postoperative changes')]

[0142] df = df[~df['diagnosis'].str.endswith('postoperative changes.')]

[0143] #5. Delete the diagnosis that contains "Navigation / EP / Gamma Knife Positioning"

[0144] df = df[~df['diagnosis'].str.contains('location')]

[0145] #6. Delete the diagnosis containing "DTI"

[0146] df = df[~df['Diagnosis'].str.contains('DTI', case = False)]

[0147] S10122. Divide the cleaned description-diagnosis samples into a training sample set and a test sample set according to the selected report collection time.

[0148] In this step, the data set of multiple description-diagnosis samples is divided into a training sample set and a test sample set based on the report collection time of the medical imaging report represented by each description-diagnosis sample, wherein the number of description-diagnosis samples included in the training sample set and the number of description-diagnosis samples included in the test sample set meet a preset ratio.

[0149] It should be noted here that although invalid descriptive data such as specific dates are filtered out during the data cleaning process, time information still exists in the file name of each medical imaging report. At this time, the report collection time indicated by the file name of the medical imaging report can be used to divide the data set of multiple description-diagnosis samples.

[0150] The MRI image report dataset used in the embodiments of this application contains 1,095,809 medical image reports, of which 917,106 are medical image reports after cleaning, covering more than ten parts of the body such as the brain, spinal cord, and chest, and hundreds of neurological diseases such as tumors and inflammation, ensuring that the trained diagnostic suggestion generation model has a high degree of generalization.

[0151] In step S102, the "description" part of each description-diagnosis sample included in the training sample set is used as the input feature, and the "diagnosis suggestion" part of each description-diagnosis sample included in the training sample set is used as the output feature to train the pre-constructed base model to obtain the generated model to be verified.

[0152] Among them, the Baichuan2-13B large language model, which has performed well in text generation tasks in the Chinese medical field, can be selected as the base model.

[0153] In step S103, each description-diagnosis sample included in the test sample set is used to verify the suggestion generation effect of the trained generation model to be verified; specifically, the "description" part of each description-diagnosis sample included in the test sample set is input into the generation model to be verified, and the predictive diagnostic suggestion of the description-diagnosis sample is determined by the generation model to be verified.

[0154] Here, in order to verify the suggestion generation effect of the generation model to be verified from different evaluation dimensions, the predictive diagnosis suggestion and reference diagnosis suggestion of each description-diagnosis sample are used to determine the evaluation index of each description-diagnosis sample in each evaluation dimension, so as to use the evaluation index to measure the quality of the predictive diagnosis suggestion generated by the generation model to be verified. At the same time, in order to be able to fine-tune the parameters involved in the base model, the embodiment of the present application selects the LoRA (Low-Rank Adaptation) method to fine-tune the parameters of the generation model to be verified and measure the quality.

[0155] In step S104, the first evaluation index of the description-diagnosis sample in each evaluation dimension is determined by comparing the predicted diagnosis suggestion with the reference diagnosis suggestion of the description-diagnosis sample in different evaluation dimensions.

[0156] The evaluation dimensions include similarity dimension, text dimension, word dimension and sequence dimension.

[0157] In one embodiment, step S104 includes:

[0158] S1041. Determine a similarity evaluation index of the description-diagnosis sample by calculating the degree of similarity between the predicted diagnosis suggestion and the reference diagnosis suggestion in the similarity dimension.

[0159] In this step, when the evaluation dimension is the similarity dimension, the similarity evaluation index BLEU of the description-diagnosis sample in the similarity dimension is determined by calculating the similarity between the predicted diagnosis suggestion and the reference diagnosis suggestion.

[0160] Among them, the similarity evaluation index BLEU is an improved form of accuracy, which is used to evaluate the similarity between the generated predicted diagnosis suggestions and the reference diagnosis suggestions.

[0161] S1042 : In the text dimension, determine the degree of repetition between the text appearing in the predicted diagnosis suggestion and the text appearing in the reference diagnosis suggestion to obtain a degree of text overlap of the description-diagnosis sample.

[0162] In this step, when the evaluation dimension is the text dimension, the text overlap degree Rouge-1 (R-1) of the description-diagnosis sample in the text dimension is determined by determining the degree of repetition between the text appearing in the predicted diagnosis suggestion and the text appearing in the reference diagnosis suggestion; that is, each text appearing in the predicted diagnosis suggestion and the reference diagnosis suggestion is compared one by one, and the text overlap degree of the description-diagnosis sample is obtained by determining the repetition rate of the text between the predicted diagnosis suggestion and the reference diagnosis suggestion.

[0163] S1043. In the word dimension, determine the degree of repetition between the words appearing in the predicted diagnosis suggestion and the words appearing in the reference diagnosis suggestion to obtain the degree of word overlap of the description-diagnosis sample.

[0164] In this step, when the evaluation dimension is the word dimension, the word overlap degree Rouge-2 (R-2) of the description-diagnosis sample in the word dimension is determined by determining the degree of repetition between the words appearing in the predicted diagnostic suggestion and the words appearing in the reference diagnostic suggestion; that is, each word appearing in the predicted diagnostic suggestion and the reference diagnostic suggestion is compared one by one, and the word overlap degree of the description-diagnosis sample is obtained by determining the repetition rate of the words between the predicted diagnostic suggestion and the reference diagnostic suggestion.

[0165] S1044. In the sequence dimension, obtain the degree of sequence overlap of the description-diagnosis sample by determining the longest common subsequence between the predicted diagnosis suggestion and the reference diagnosis suggestion.

[0166] In this step, when the evaluation dimension is the sequence dimension, the sequence overlap degree Rouge-L (RL) of the description-diagnosis sample in the sequence dimension is determined by determining the longest common subsequence between the predicted diagnostic suggestion and the reference diagnostic suggestion; that is, the sequence overlap degree of the description-diagnosis sample is obtained by determining the longest common subsequence of words between the predicted diagnostic suggestion and the reference diagnostic suggestion.

[0167] S1045: Determine the similarity degree, the text overlap degree, the word overlap degree, and the sequence overlap degree as the first evaluation index of the description-diagnosis sample.

[0168] Here, in order to measure whether the predictive diagnostic suggestions output by the generative model to be verified contain the medical structure vocabulary and medical disease vocabulary that radiology experts believe should appear, this application pre-constructs a medical structure vocabulary list and a medical disease vocabulary list to measure the professionalism of the predictive diagnostic suggestions through the above two vocabulary lists.

[0169] In step S105, in combination with the pre-constructed medical diagnostic vocabulary, the medical diagnostic vocabulary is compared with the predicted diagnostic suggestions and the reference diagnostic suggestions respectively to construct a confusion matrix between the predicted diagnostic suggestions and the reference diagnostic suggestions, and determine the second evaluation index of the description-diagnosis sample.

[0170] In one embodiment, the medical diagnosis vocabulary includes a medical structure vocabulary and a medical disease vocabulary; step S105 includes:

[0171] S1051 . Determine, according to the medical structure vocabulary, a predicted structure one-hot vector of the predicted diagnosis suggestion and a reference structure one-hot vector of the reference diagnosis suggestion.

[0172] In this step, the predicted diagnosis suggestion is compared with the medical structure vocabulary to determine the predicted structure one-hot vector of the predicted diagnosis suggestion. The predicted structure one-hot vector consists of two elements, "0" and "1". "1" indicates that the structure vocabulary mentioned at a certain position in the medical structure vocabulary appears in the predicted diagnosis suggestion; "0" indicates that the structure vocabulary mentioned at a certain position in the medical structure vocabulary does not appear in the predicted diagnosis suggestion.

[0173] The reference diagnosis suggestion is compared with the medical structure vocabulary to determine the reference structure one-hot vector of the reference diagnosis suggestion. The reference structure one-hot vector consists of two elements, "0" and "1". "1" indicates that the structure vocabulary mentioned at a certain position in the medical structure vocabulary appears in the reference diagnosis suggestion; "0" indicates that the structure vocabulary mentioned at a certain position in the medical structure vocabulary does not appear in the reference diagnosis suggestion.

[0174] Exemplarily, the medical structure vocabulary includes {structure vocabulary 1, structure vocabulary 2, structure vocabulary 3}; when the predicted structure one-hot vector is [1, 0, 0], it means that "structure vocabulary 1" appears in the predicted diagnosis suggestion; when the reference structure one-hot vector is [1, 1, 0], it means that "structure vocabulary 1" and "structure vocabulary 2" appear in the reference diagnosis suggestion.

[0175] S1052: Determine, based on the medical disease vocabulary, the predicted disease one-hot vector of the predicted diagnosis suggestion and the reference disease one-hot vector of the reference diagnosis suggestion.

[0176] In this step, the predicted diagnosis suggestion is compared with the medical disease vocabulary to determine the predicted disease one-hot vector of the predicted diagnosis suggestion. The predicted disease one-hot vector consists of two elements, "0" and "1". "1" indicates that the disease word mentioned at a certain position in the medical disease vocabulary appears in the predicted diagnosis suggestion; "0" indicates that the disease word mentioned at a certain position in the medical disease vocabulary does not appear in the predicted diagnosis suggestion.

[0177] The reference diagnosis suggestion is compared with the medical disease vocabulary to determine the reference disease one-hot vector of the reference diagnosis suggestion; wherein, the reference disease one-hot vector consists of two elements, "0" and "1"; "1" indicates that the disease vocabulary mentioned at a certain position in the medical disease vocabulary appears in the reference diagnosis suggestion; "0" indicates that the disease vocabulary mentioned at a certain position in the medical disease vocabulary does not appear in the reference diagnosis suggestion.

[0178] Exemplarily, the medical disease vocabulary includes {disease vocabulary 1, disease vocabulary 2, disease vocabulary 3}; when the predicted disease one-hot vector is [1, 0, 0], it means that "disease vocabulary 1" appears in the predicted diagnosis suggestion; when the reference disease one-hot vector is [1, 1, 0], it means that "disease vocabulary 1" and "disease vocabulary 2" appear in the reference diagnosis suggestion.

[0179] S1053. Determine a confusion matrix between the predicted diagnostic suggestion and the reference diagnostic suggestion based on the predicted structure one-hot vector, the predicted disease one-hot vector, the reference structure one-hot vector, and the reference disease one-hot vector.

[0180] In this step, a confusion matrix between the predicted diagnosis suggestion and the reference diagnosis suggestion can be generated by combining the predicted structure one-hot vector, the predicted disease one-hot vector, the reference structure one-hot vector, and the reference disease one-hot vector.

[0181] S1054: Based on the confusion matrix, determine multiple measurement indicators for describing and diagnosing the sample.

[0182] In this step, the confusion matrix between the predicted diagnostic suggestions and the reference diagnostic suggestions is used to determine multiple measurement indicators of the description-diagnosis sample; wherein the multiple measurement indicators include true positive rate (TP), false negative rate (FN), false positive rate (FP), and true negative rate (TN).

[0183] S1055: Determine a second evaluation index for the description-diagnosis sample using the multiple measurement indexes.

[0184] The second evaluation index includes precision, recall and F1 index.

[0185] Specifically, a higher precision indicates that the structures / disease words appearing in the predicted diagnostic suggestions generated by the diagnostic suggestion generation model are more likely to be actual structures / disease words; a higher recall indicates that the structures / disease words appearing in the medical diagnostic vocabulary are more likely to appear in the predicted diagnostic suggestions generated by the diagnostic suggestion generation model; a higher F1 index indicates that the structures / disease words appearing in the predicted diagnostic suggestions generated by the diagnostic suggestion generation model are more consistent with the radiologist's prediction.

[0186] In step S106, based on the first evaluation index and the second evaluation index of each description-diagnosis sample, the total model loss of the generation model to be verified is determined, and the quality of the predictive diagnostic suggestion generated by the generation model to be verified is measured using the total model loss; by analyzing the total model loss, it is determined whether a diagnostic suggestion generation model with higher generation quality is obtained.

[0187] In one embodiment, step S106 includes:

[0188] S1061. Obtain a first model loss of the generated model to be verified by determining an average value among multiple first evaluation indicators.

[0189] In this step, for a description-diagnosis sample, the first model loss of the generated model to be verified can be obtained by determining the average value of multiple first evaluation indicators. Specifically, the first model loss is determined by the following formula:

[0190] L1(y^,y)=(BLEU-4(y^,y)+Rouge-1(y^,y)+Rouge-2(y^,y)+Rouge-L(y^,y)) / 4;

[0191] Where y^ is the predicted diagnosis suggestion and y is the reference diagnosis suggestion.

[0192] S1062. Obtain a second model loss of the generated model to be verified by determining an average value among multiple second evaluation indicators.

[0193] In this step, for a description-diagnosis sample, the second model loss of the generated model to be verified can be obtained by determining the average value of multiple second evaluation indicators. Specifically, the second model loss is determined by the following formula:

[0194] L2(y^,y)=(F1(p^,p)+Precision(p^,p)+Recall(p^,p)) / 3+(F1(d^,d)+Precision(d

[0195] ^,d)+Recall(d^,d)) / 3;

[0196] Among them, y^ is the predicted diagnosis suggestion, y is the reference diagnosis suggestion, p^ is the predicted structure one-hot vector of the predicted diagnosis suggestion, p is the reference structure one-hot vector of the reference diagnosis suggestion, d^ is the predicted disease one-hot vector of the predicted diagnosis suggestion, and d is the reference disease one-hot vector of the reference diagnosis suggestion.

[0197] S1063. Determine the total model loss of the generated model to be verified based on the first model loss and the second model loss.

[0198] Specifically, the total model loss Loss of the generated model to be verified is determined by the following formula:

[0199] Loss = L1 + L2;

[0200] Here, it is also taken into account that the writing of imaging report descriptions and diagnostic recommendations is highly subjective, and any purely machine evaluation method is difficult to comprehensively evaluate a generated diagnostic recommendation. Therefore, the above-mentioned evaluation indicators can also be provided to radiologists to enable radiologists to conduct manual evaluations, and comprehensively evaluate each predictive diagnostic recommendation from four dimensions: readability, comprehensiveness, priority, and potential harm, so that the predictive diagnostic recommendations output by the obtained diagnostic recommendation generation model have higher reliability.

[0201] In order to verify the predictive effect of the diagnostic suggestion generation model obtained in this application, it was verified on the task of automatically generating diagnostic suggestions for magnetic resonance imaging reports.

[0202] The specific performance is shown in Tables 1, 2, and 3; it can be seen from Tables 1 and 2 that the diagnostic suggestion generation model trained by this application has achieved good performance in the "traditional text generation indicators" (for example, BLEU and Rouge) in the MRI imaging report diagnostic suggestion generation task, indicating that the predictive diagnostic suggestions output by the diagnostic suggestion generation model are fluent and readable and are well matched with the true values ​​written by radiologists from the perspective of natural language text; and, the diagnostic suggestion generation model performs well in the prediction consistency indicators of medical structures (for example, brain structures) and medical diseases (for example, neurological diseases), especially in the prediction accuracy of brain structure and neurological diseases, and has achieved very high scores; it can be seen that in this diagnostic suggestion generation task, the test results of other models are significantly lower than the diagnostic suggestion generation model designed by this application.

[0203] As can be seen from Table 3, the radiology experts gave extremely high evaluations to the diagnostic suggestion generation model proposed in the embodiment of the present application in terms of readability, comprehensiveness, priority order and potential harm. Although the evaluation results of each dimension of the external hospital data are slightly lower than those of the Tiantan data, this is also in line with expectations.

[0204] Table 1 Model performance on traditional indicators

[0205]

[0206] Table 2 Performance of the model in predicting consistency between structure and disease

[0207]

[0208]

[0209] Table 3 Evaluation of model output by radiologists

[0210]

[0211] The training method of the diagnostic suggestion generation model provided in the embodiment of the present application is as follows: by sorting and obtaining multiple medical imaging reports, a training sample set for training a base model and a test sample set for verifying the base model are obtained; the base model is trained using the training sample set to obtain a generation model to be verified; for each description-diagnosis sample in the test sample set, the description-diagnosis sample is input into the generation model to be verified to determine a predicted diagnostic suggestion for the description-diagnosis sample; a first evaluation index of the description-diagnosis sample is determined by comparing the predicted diagnostic suggestion with a reference diagnostic suggestion of the description-diagnosis sample on different evaluation dimensions; a second evaluation index of the description-diagnosis sample is determined by constructing a confusion matrix between the predicted diagnostic suggestion and the reference diagnostic suggestion in combination with a pre-constructed medical diagnostic vocabulary; based on the first evaluation index and the second evaluation index of each description-diagnosis sample, the total model loss of the generation model to be verified is determined, and by analyzing the total model loss, a diagnostic suggestion generation model is trained. In this way, a diagnostic suggestion generation model with high accuracy can be trained with the help of the first evaluation index and the second evaluation index on different evaluation dimensions, and thus, diagnostic suggestions for medical images can be accurately generated.

[0212] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of a training device for a diagnostic suggestion generation model provided in an embodiment of the present application. Figure 3 As shown in FIG, the training device 300 includes:

[0213] A report segmentation module 310 is configured to segment the obtained multiple medical imaging reports into a training sample set for training a base model and a test sample set for validating the base model;

[0214] A model training module 320 is configured to train the base model using the training sample set to obtain a generated model to be verified;

[0215] A suggestion prediction module 330 is configured to input each description-diagnosis sample in the test sample set into the generation model to be verified, and determine a predicted diagnosis suggestion for the description-diagnosis sample;

[0216] A first indicator generating module 340 is configured to determine a first evaluation indicator for the description-diagnosis sample by comparing the predicted diagnosis suggestion with a reference diagnosis suggestion for the description-diagnosis sample in different evaluation dimensions;

[0217] A second indicator generating module 350 is configured to determine a second evaluation indicator for the description-diagnosis sample by constructing a confusion matrix between the predicted diagnosis suggestion and the reference diagnosis suggestion in combination with a pre-constructed medical diagnosis vocabulary;

[0218] The model measurement module 360 ​​is used to determine the total model loss of the generation model to be verified based on the first evaluation index and the second evaluation index of each description-diagnosis sample, and train a diagnosis suggestion generation model by analyzing the total model loss.

[0219] Furthermore, when the report segmentation module 310 is used to segment the acquired medical imaging reports into a training sample set for training the base model and a test sample set for verifying the base model, the report segmentation module 310 is used to:

[0220] By collating the data of multiple medical imaging reports and combining them with the planned description-diagnosis template, multiple description-diagnosis samples are generated;

[0221] The multiple description-diagnosis samples are cleaned and divided to obtain a training sample set for training a base model and a test sample set for verifying the base model.

[0222] Furthermore, when the report segmentation module 310 is used to generate multiple description-diagnosis samples by arranging data from multiple acquired medical imaging reports and combining them with the planned description-diagnosis template, the report segmentation module 310 is used to:

[0223] Reading the plurality of medical imaging reports in a data table format to obtain a medical data table; wherein the medical data table includes a plurality of medical row data and a plurality of medical column data; each medical row data represents a medical imaging report; and each medical column data represents a type of image feature information;

[0224] Determining feature information to be desensitized from the various types of image feature information covered by the medical data table;

[0225] Desensitizing the medical data table by deleting the medical column data in the column where the characteristic information to be desensitized is located, to obtain a desensitized medical data table;

[0226] For each medical row data in the desensitized medical data table, the medical row data is used to fill in the planned description-diagnosis template to generate a description-diagnosis sample of the medical row data, and multiple description-diagnosis samples are obtained.

[0227] Furthermore, when the report segmentation module 310 is used to clean and segment the multiple description-diagnosis samples to obtain a training sample set for training a base model and a test sample set for validating the base model, the report segmentation module 310 is used to:

[0228] screening and cleaning the plurality of description-diagnosis samples, filtering out invalid description data in the plurality of description-diagnosis samples, and determining a plurality of description-diagnosis samples after cleaning;

[0229] According to the selected report collection time, the cleaned multiple description-diagnosis samples are divided into a training sample set and a test sample set; wherein the number of description-diagnosis samples included in the training sample set and the number of description-diagnosis samples included in the test sample set meet a preset ratio.

[0230] Furthermore, the evaluation dimensions include a similarity dimension, a text dimension, a word dimension, and a sequence dimension. When the first indicator generation module 340 is used to determine the first evaluation indicator of the description-diagnosis sample by comparing the predictive diagnosis suggestion with the reference diagnosis suggestion of the description-diagnosis sample on different evaluation dimensions, the first indicator generation module 340 is used to:

[0231] In the similarity dimension, determining a similarity evaluation index of the description-diagnosis sample by calculating the similarity between the predicted diagnosis suggestion and the reference diagnosis suggestion;

[0232] In the text dimension, the text overlap degree of the description-diagnosis sample is obtained by determining the degree of repetition between the text appearing in the predicted diagnosis suggestion and the text appearing in the reference diagnosis suggestion;

[0233] In the word dimension, by determining the degree of repetition between the words appearing in the predicted diagnosis suggestion and the words appearing in the reference diagnosis suggestion, the degree of word overlap of the description-diagnosis sample is obtained;

[0234] In the sequence dimension, by determining the longest common subsequence between the predicted diagnosis suggestion and the reference diagnosis suggestion, the degree of sequence overlap of the description-diagnosis sample is obtained;

[0235] The similarity degree, the text overlap degree, the word overlap degree and the sequence overlap degree are determined as first evaluation indicators of the description-diagnosis sample.

[0236] Furthermore, the medical diagnosis vocabulary includes a medical structure vocabulary and a medical disease vocabulary; when the second indicator generation module 350 is used to determine the second evaluation indicator of the description-diagnosis sample by combining the pre-constructed medical diagnosis vocabulary and constructing a confusion matrix between the predicted diagnosis suggestion and the reference diagnosis suggestion, the second indicator generation module 350 is used to:

[0237] determining, according to the medical structure vocabulary, a predicted structure one-hot vector of the predicted diagnosis suggestion and a reference structure one-hot vector of the reference diagnosis suggestion;

[0238] Determining, according to the medical disease vocabulary, a predicted disease one-hot vector of the predicted diagnosis suggestion and a reference disease one-hot vector of the reference diagnosis suggestion;

[0239] determining a confusion matrix between the predicted diagnostic suggestion and the reference diagnostic suggestion based on the predicted structure one-hot vector, the predicted disease one-hot vector, the reference structure one-hot vector, and the reference disease one-hot vector;

[0240] Determining a plurality of measurement indicators for describing and diagnosing the sample based on the confusion matrix;

[0241] The plurality of measurement indicators are used to determine a second evaluation indicator of the description-diagnosis sample; wherein the second evaluation indicator includes precision, recall and F1 indicator.

[0242] Furthermore, when the model measurement module 360 ​​is used to determine the total model loss of the generated model to be verified based on the first evaluation index and the second evaluation index of each description-diagnosis sample, the model measurement module 360 ​​is used to:

[0243] Obtaining a first model loss of the generated model to be verified by determining an average value among a plurality of first evaluation indicators;

[0244] Obtaining a second model loss of the generated model to be verified by determining an average value among a plurality of second evaluation indicators;

[0245] Based on the first model loss and the second model loss, a total model loss of the generated model to be verified is determined.

[0246] The training device for the diagnostic suggestion generation model provided in the embodiment of the present application organizes multiple acquired medical imaging reports to obtain a training sample set for training a base model and a test sample set for verifying the base model; the base model is trained using the training sample set to obtain a generation model to be verified; for each description-diagnosis sample in the test sample set, the description-diagnosis sample is input into the generation model to be verified to determine a predicted diagnostic suggestion for the description-diagnosis sample; a first evaluation index for the description-diagnosis sample is determined by comparing the predicted diagnostic suggestion with a reference diagnostic suggestion for the description-diagnosis sample on different evaluation dimensions; a second evaluation index for the description-diagnosis sample is determined by constructing a confusion matrix between the predicted diagnostic suggestion and the reference diagnostic suggestion based on a pre-constructed medical diagnostic vocabulary; the total model loss of the generation model to be verified is determined based on the first evaluation index and the second evaluation index of each description-diagnosis sample, and the total model loss is trained to obtain a diagnostic suggestion generation model by analyzing the total model loss. In this way, a diagnostic suggestion generation model with high accuracy can be trained with the help of the first evaluation index and the second evaluation index on different evaluation dimensions, thereby accurately generating diagnostic suggestions for medical images.

[0247] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown in FIG, the electronic device 400 includes a processor 410 , a memory 420 and a bus 430 .

[0248] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, the above-mentioned Figure 1 The steps of the training method of the diagnosis suggestion generation model in the method embodiment shown are specifically implemented in accordance with the method embodiment and will not be described in detail here.

[0249] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 The steps of the training method of the diagnosis suggestion generation model in the method embodiment shown are specifically implemented in accordance with the method embodiment and will not be described in detail here.

[0250] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0251] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. There may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interface, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.

[0252] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0253] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0254] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0255] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The scope of protection of the present application is not limited thereto. Although the present application has been described in detail with reference to the above-mentioned embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-mentioned embodiments within the technical scope disclosed in the present application, or perform equivalent replacements for some of the technical features thereof. These modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for training a diagnostic suggestion generation model, characterized in that: The training method comprises: By sorting out the multiple medical imaging reports obtained, a training sample set for training a base model and a test sample set for verifying the base model are obtained; Using the training sample set to train the base model to obtain a generated model to be verified; For each description-diagnosis sample in the test sample set, input the description-diagnosis sample into the generation model to be verified to determine a predictive diagnosis suggestion for the description-diagnosis sample; Determining a first evaluation index of the description-diagnosis sample by comparing the predictive diagnosis suggestion with a reference diagnosis suggestion of the description-diagnosis sample at different evaluation dimensions; In combination with a pre-constructed medical diagnosis vocabulary, a second evaluation index of the description-diagnosis sample is determined by constructing a confusion matrix between the predicted diagnosis suggestion and the reference diagnosis suggestion; Based on the first evaluation index and the second evaluation index of each description-diagnosis sample, the total model loss of the generation model to be verified is determined, and by analyzing the total model loss, a diagnosis suggestion generation model is trained.

2. The training method according to claim 1, characterized in that: The medical imaging reports obtained by sorting out are divided into a training sample set for training the base model and a test sample set for verifying the base model, including: By collating the data of multiple medical imaging reports obtained and combining them with the planned description-diagnosis template, multiple description-diagnosis samples are generated; The multiple description-diagnosis samples are cleaned and divided to obtain a training sample set for training a base model and a test sample set for verifying the base model.

3. The training method according to claim 2, characterized in that: The method generates multiple description-diagnosis samples by collating the data of multiple medical imaging reports obtained and combining them with the planned description-diagnosis template, including: Read the plurality of medical imaging reports in a data table format to obtain a medical data table; wherein the medical data table includes a plurality of medical row data and a plurality of medical column data; each medical row data represents a medical imaging report; and each medical column data represents a type of imaging feature information; Determining feature information to be desensitized from a variety of image feature information covered by the medical data table; Desensitizing the medical data table by deleting the medical column data in the column where the characteristic information to be desensitized is located, to obtain a desensitized medical data table; For each medical row data in the desensitized medical data table, the medical row data is used to fill in the planned description-diagnosis template to generate a description-diagnosis sample of the medical row data, and a plurality of description-diagnosis samples are obtained.

4. The training method according to claim 2, characterized in that: The cleaning and dividing of the plurality of description-diagnosis samples to obtain a training sample set for training a base model and a test sample set for verifying the base model includes: Screening and cleaning the multiple description-diagnosis samples, filtering out invalid description data in the multiple description-diagnosis samples, and determining multiple description-diagnosis samples after cleaning; According to the selected report collection time, the cleaned multiple description-diagnosis samples are divided into a training sample set and a test sample set; wherein the number of description-diagnosis samples included in the training sample set and the number of description-diagnosis samples included in the test sample set satisfy a preset ratio.

5. The training method according to claim 1, characterized in that: The evaluation dimensions include a similarity dimension, a text dimension, a word dimension, and a sequence dimension; the first evaluation index of the description-diagnosis sample is determined by comparing the predicted diagnosis suggestion with the reference diagnosis suggestion of the description-diagnosis sample on different evaluation dimensions, including: In the similarity dimension, by calculating the similarity between the predicted diagnosis suggestion and the reference diagnosis suggestion, a similarity evaluation index of the description-diagnosis sample is determined; In the text dimension, by determining the degree of repetition between the text appearing in the predicted diagnosis suggestion and the text appearing in the reference diagnosis suggestion, the degree of text overlap of the description-diagnosis sample is obtained; In the word dimension, by determining the degree of repetition between the words appearing in the predicted diagnosis suggestion and the words appearing in the reference diagnosis suggestion, the degree of word overlap of the description-diagnosis sample is obtained; In the sequence dimension, by determining the longest common subsequence between the predicted diagnosis suggestion and the reference diagnosis suggestion, the degree of sequence overlap of the description-diagnosis sample is obtained; The similarity degree, the text overlap degree, the word overlap degree and the sequence overlap degree are determined as the first evaluation index of the description-diagnosis sample.

6. The training method according to claim 1, characterized in that: The medical diagnosis vocabulary includes a medical structure vocabulary and a medical disease vocabulary; the second evaluation index of the description-diagnosis sample is determined by constructing a confusion matrix between the predicted diagnosis suggestion and the reference diagnosis suggestion in combination with the pre-constructed medical diagnosis vocabulary, including: Determining, according to the medical structure vocabulary, a predicted structure one-hot vector of the predicted diagnosis suggestion and a reference structure one-hot vector of the reference diagnosis suggestion; Determining, according to the medical disease vocabulary, a predicted disease one-hot vector of the predicted diagnosis suggestion and a reference disease one-hot vector of the reference diagnosis suggestion; determining a confusion matrix between the predicted diagnostic suggestion and the reference diagnostic suggestion based on the predicted structural one-hot vector, the predicted disease one-hot vector, the reference structural one-hot vector, and the reference disease one-hot vector; Based on the confusion matrix, determining a plurality of measurement indicators for the description-diagnosis sample; The plurality of measurement indicators are used to determine a second evaluation indicator of the description-diagnosis sample; wherein the second evaluation indicator includes precision, recall and F1 indicator.

7. The training method according to claim 1, characterized in that: The determining of the total model loss of the generated model to be verified based on the first evaluation index and the second evaluation index of each description-diagnosis sample includes: Obtaining a first model loss of the generated model to be verified by determining an average value among a plurality of first evaluation indicators; Obtaining a second model loss of the generated model to be verified by determining an average value among a plurality of second evaluation indicators; Based on the first model loss and the second model loss, a total model loss of the generated model to be verified is determined.

8. A training device for a diagnostic suggestion generation model, characterized in that: The training device comprises: A report division module, used to divide the obtained multiple medical imaging reports into a training sample set for training the base model and a test sample set for verifying the base model; A model training module, used to train the base model using the training sample set to obtain a generated model to be verified; A suggestion prediction module, for each description-diagnosis sample in the test sample set, inputting the description-diagnosis sample into the generation model to be verified, and determining a prediction diagnosis suggestion for the description-diagnosis sample; A first indicator generating module, configured to determine a first evaluation indicator of the description-diagnosis sample by comparing the predictive diagnosis suggestion with a reference diagnosis suggestion of the description-diagnosis sample in different evaluation dimensions; A second indicator generation module is used to determine a second evaluation indicator of the description-diagnosis sample by constructing a confusion matrix between the predicted diagnosis suggestion and the reference diagnosis suggestion in combination with a pre-constructed medical diagnosis vocabulary; The model measurement module is used to determine the total model loss of the generation model to be verified based on the first evaluation index and the second evaluation index of each description-diagnosis sample, and train a diagnosis suggestion generation model by analyzing the total model loss.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and the machine-readable instructions are executed by the processor to perform the steps of the training method of the diagnostic suggestion generation model as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for training a diagnosis suggestion generation model according to any one of claims 1 to 7 are executed.