Search

CN-121981236-A - Model construction method and device, electronic equipment and storage medium

CN121981236ACN 121981236 ACN121981236 ACN 121981236ACN-121981236-A

Abstract

The present disclosure relates to the field of deep learning technologies, and in particular, to a method, an apparatus, an electronic device, and a storage medium for model construction, where the method includes acquiring a training data set, multiple types of spleen and stomach diseases task instructions, and a preset model required by a target model to be generated; based on a pre-constructed knowledge graph, carrying out alignment training on a preset model, injecting structured knowledge in the knowledge graph into a parameter space of the preset model to obtain an intermediate model, wherein the knowledge graph is used for indicating training basis and logic rule corresponding to a training target model and professional decision basis and operation standard of clinical diagnosis and treatment, and based on multi-type spleen and stomach disease task instructions and training data sets, the intermediate model with the graph aligned is adjusted to obtain a target model, and the target model is used for generating a diagnosis and treatment scheme corresponding to a spleen and stomach disease patient. The application can solve the problem that the diagnosis and treatment result of the spleen and stomach diseases is inaccurate and an effective treatment scheme can not be provided for spleen and stomach patients.

Inventors

  • DU YANRU
  • GUO JIANBIN
  • DONG LIFENG
  • YANG QINGFENG
  • CHEN YANZHE
  • LUO YIN
  • WANG LEI

Assignees

  • 北京中科闻歌科技股份有限公司
  • 河北省中医院
  • 国科智医(北京)科技有限公司

Dates

Publication Date
20260505
Application Date
20260408

Claims (10)

  1. 1. A method of model construction, the method comprising: Acquiring a training data set required by a target model to be generated, a plurality of spleen and stomach disease task instructions and a preset model, wherein each type of spleen and stomach disease task instruction is used for indicating a training task required to be learned by the spleen and stomach disease diagnosis and treatment model to be generated, the preset model has basic Chinese and Western medicine knowledge corresponding to spleen and stomach diseases and the capability of extracting tongue image characteristics, and the training data set is determined based on the spleen and stomach disease data, western medicine examination report data of spleen and stomach disease patients and Chinese medicine diagnosis data; Based on a pre-constructed knowledge graph, carrying out alignment training on the preset model, and injecting structured knowledge in the knowledge graph into a parameter space of the preset model to obtain an intermediate model, wherein the knowledge graph is used for indicating training basis and logic rule corresponding to the training target model and professional decision basis and operation specification of clinical diagnosis and treatment; based on the spleen and stomach diseases task instructions and the training data set, the intermediate model with the completed map alignment is adjusted to obtain a target model, and the target model is used for generating a diagnosis and treatment scheme corresponding to the spleen and stomach diseases.
  2. 2. The method according to claim 1, wherein the acquiring the training data set required for the object model to be generated comprises: Acquiring information data of spleen and stomach diseases, western medicine inspection report data and traditional Chinese medicine diagnosis data of each sample spleen and stomach disease patient in different sample spleen and stomach disease patients, wherein the western medicine inspection report data comprises a plurality of tongue image data and western medicine diagnosis data; Responding to entity labeling and relation labeling of the traditional Chinese medicine diagnosis data and the Western medicine diagnosis data at a client by an expert to obtain a traditional Chinese medicine and Western medicine data set corresponding to the spleen and stomach diseases, wherein the traditional Chinese medicine and Western medicine data set comprises symptom signs, syndrome elements, syndrome type, prescriptions, traditional Chinese medicines, western medicine terms, a symptom-syndrome element attribution relation, a syndrome-core pathogenesis relation and a prescription-adaptation syndrome relation; responding to the expert to annotate a plurality of tongue image data at the client, and acquiring a plurality of tongue image feature vectors corresponding to the tongue image data; and determining the training data set according to the Chinese and Western medicine data set and the tongue image feature vectors aiming at each sample spleen and stomach patient.
  3. 3. The method according to claim 1, wherein said adjusting the intermediate model for achieving atlas alignment based on the plurality of classes of spleen and stomach disease task orders and the training dataset, to obtain a target model, comprises: Based on the spleen and stomach diseases task instructions and the instruction fine adjustment training set, adjusting the intermediate model with the completed atlas alignment to obtain an adjusted adjustment model; And verifying and iteratively updating the adjustment model to obtain the target model.
  4. 4. A method according to claim 3, wherein said adjusting the intermediate model for achieving atlas alignment based on the multiple classes of spleen and stomach disease task orders and the order fine tuning training set, comprises: Generating a plurality of sample pairs from a plurality of types of spleen and stomach disease task instructions according to an input-output sample pair format, and labeling task type labels of each sample pair, wherein each sample pair comprises input data, output data, and a mapping relation between the input data and the output data; Based on a plurality of sample pairs, generating a likelihood function by using a maximized sequence as a fine tuning target, and performing spleen and stomach disease exclusive instruction fine tuning on the intermediate model subjected to map alignment training by adopting a supervision fine tuning and quantization low-rank adaptation strategy to obtain the adjustment model, wherein the maximized sequence generates the likelihood function for guiding the intermediate model to learn the mapping relation of the spleen and stomach disease diagnosis and treatment scene.
  5. 5. The method of claim 3, wherein the training data set comprises a validation set and a test set, wherein validating and iteratively updating the adjustment model to obtain the target model comprises: evaluating the multi-dimensional index based on the verification set to obtain an evaluation result, wherein the multi-dimensional index comprises syndrome element identification accuracy, syndrome reasoning conformity, prescription compatibility compliance and multi-mode fusion judgment consistency; Performing edge scene verification on the adjustment model based on the test set to obtain a verification result; And determining parameters to be adjusted corresponding to the adjustment model according to the evaluation result and the verification result, supplementing task instructions and training data of a scene corresponding to the parameters to be adjusted aiming at the parameters to be adjusted, finely adjusting the adjustment model again, correcting the content which does not accord with the diagnosis and treatment guide in the output of the adjustment model, and iterating the parameters of the adjustment model to obtain the target model.
  6. 6. The method according to any one of claims 1-5, wherein said adjusting said intermediate model to achieve atlas alignment based on a plurality of said spleen-stomach disease task orders and said training dataset, after obtaining a target model, further comprises: and packaging the target model into a callable diagnosis and treatment engine based on a preset development micro-service framework, and testing the packaged target model until the target model has the function of generating a diagnosis and treatment scheme of the spleen and stomach diseases.
  7. 7. The method according to any one of claims 1-5, wherein the training of alignment is performed on the preset model based on a pre-constructed knowledge graph, and the structured knowledge in the knowledge graph is injected into a parameter space of the preset model, so as to obtain an intermediate model, and before the method further comprises: Acquiring data of a Chinese and Western medicine mixed medical corpus and tongue image database corresponding to the spleen and stomach diseases; Based on the Chinese and Western medicine mixed medical corpus data, performing incremental pre-training on an initial model to obtain a first model, wherein the first model has basic Chinese and Western medicine knowledge corresponding to the spleen and stomach diseases; Training the first model based on a tongue image analysis network architecture, a preset loss function and the tongue image database data to obtain the preset model.
  8. 8. A model building apparatus, characterized in that the model building apparatus comprises: The acquisition module is used for acquiring a training data set required by a target model to be generated, a plurality of spleen and stomach disease task instructions and a preset model, wherein each type of spleen and stomach disease task instruction is used for indicating a training task required to be learned by the spleen and stomach disease diagnosis and treatment model to be generated, the preset model has basic Chinese and Western medicine knowledge corresponding to spleen and stomach diseases and the capability of extracting tongue image characteristics, and the training data set is determined based on the data of the spleen and stomach diseases, western medicine inspection report data of spleen and stomach disease patients and Chinese medicine diagnosis data; the training module is used for carrying out alignment training on the preset model based on a pre-constructed knowledge graph, injecting structured knowledge in the knowledge graph into a parameter space of the preset model to obtain an intermediate model, and the knowledge graph is used for indicating training basis and logic rule corresponding to the target model and professional decision basis and operation specification of clinical diagnosis and treatment; The adjusting module is used for adjusting the intermediate model with the completed map alignment based on the spleen and stomach disease task instructions and the training data set to obtain a target model, and the target model is used for generating a diagnosis and treatment scheme corresponding to the spleen and stomach disease patients.
  9. 9. An electronic device, comprising: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the model building method of any of claims 1 to 7.
  10. 10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon computer instructions for causing a computer to execute the model building method according to any one of claims 1 to 7.

Description

Model construction method and device, electronic equipment and storage medium Technical Field The disclosure relates to the technical field of deep learning, and in particular relates to a model building method, a device, electronic equipment and a storage medium. Background Modern medical diagnosis and treatment are based on biochemical indexes such as endoscope, imaging examination, tissue biopsy, pepsinogen and the like, and are objectively and definitely defined. The traditional Chinese medicine relies on looking at and inquiring about four diagnosis and parameters, emphasizes overall observation and diagnosis and treatment, accumulates rich theories and prescription experiences of 'spleen and stomach theory', and has unique diagnosis and treatment advantages. In the two modes, the Western medicine has the problems of invasive examination, high cost, insufficient sensitivity to early functional diseases and the like in the treatment of the spleen and stomach diseases, and the traditional Chinese medicine has the problems of implicit knowledge and dependence on individual experience in differentiation of symptoms. Both can lead to inaccurate diagnosis and treatment results of spleen and stomach diseases, and can not provide an effective treatment scheme for spleen and stomach patients. Disclosure of Invention In order to solve the technical problems, the disclosure provides a model construction method, a device, electronic equipment and a storage medium, so as to solve the problem that the diagnosis and treatment result of spleen and stomach diseases is inaccurate and an effective treatment scheme cannot be provided for spleen and stomach patients. According to the method, a training data set required by a target model to be generated, multiple types of spleen and stomach disease task instructions and a preset model are obtained, each type of spleen and stomach disease task instruction is used for indicating training tasks required to be learned by the spleen and stomach disease diagnosis and treatment model to be generated, the preset model is provided with basic Chinese and Western medical knowledge corresponding to spleen and stomach diseases and the capability of extracting tongue image features, the training data set is determined based on spleen and stomach disease data, western medical examination report data of spleen and stomach patients and traditional Chinese medical diagnosis data, the preset model is subjected to alignment training based on a pre-built knowledge map, structured knowledge in the knowledge map is injected into a parameter space of the preset model to obtain an intermediate model, the knowledge map is used for indicating training basis corresponding to the training target model, logic rules and professional decision basis and operation specifications of clinical diagnosis and treatment, the intermediate model which is aligned is completed is adjusted based on the multiple types of the spleen and stomach disease task instructions and the training data set, and the target map is used for generating a spleen and stomach corresponding diagnosis and treatment scheme. In some optional embodiments, the training data set required by the target model to be generated is obtained, wherein the training data set comprises information data of spleen and stomach diseases, western medicine inspection report data and traditional Chinese medicine diagnosis data of each sample spleen and stomach patient in different sample spleen and stomach patients, the western medicine inspection report data comprises a plurality of tongue image data and western medicine diagnosis data, an expert performs entity labeling and relationship labeling on the traditional Chinese medicine diagnosis data and the western medicine diagnosis data at a client, a traditional Chinese and western medicine data set corresponding to the spleen and stomach diseases is obtained, the traditional Chinese and western medicine data set comprises symptom, syndrome elements, syndrome type, prescription, traditional Chinese medicine, western medicine terms, symptom-syndrome element attribution relation, syndrome-core disease relation and prescription-indication relation, the expert performs labeling on the tongue image data at the client, a plurality of tongue image feature vectors corresponding to the tongue image data are obtained, and the training data set is determined according to the traditional Chinese and western medicine data set and the tongue image feature vector for each sample patient. In some alternative embodiments, the intermediate model for completing the map alignment is adjusted based on the multi-type spleen and stomach disease task instructions and the training data set to obtain a target model, and the method comprises the steps of adjusting the intermediate model for completing the map alignment based on the multi-type spleen and stomach disease task instructions and the instruction fine adjustment training set t