CN114220536A - Disease analysis method, device, equipment and storage medium based on machine learning - Google Patents

Disease analysis method, device, equipment and storage medium based on machine learning Download PDF

Info

Publication number
CN114220536A
CN114220536A CN202111509656.2A CN202111509656A CN114220536A CN 114220536 A CN114220536 A CN 114220536A CN 202111509656 A CN202111509656 A CN 202111509656A CN 114220536 A CN114220536 A CN 114220536A
Authority
CN
China
Prior art keywords
disease
data
loss value
disease analysis
calculating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111509656.2A
Other languages
Chinese (zh)
Inventor
陈诚
廖晨
杨雨航
吕少领
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Raisound Technology Co ltd
Original Assignee
Shenzhen Raisound Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Raisound Technology Co ltd filed Critical Shenzhen Raisound Technology Co ltd
Priority to CN202111509656.2A priority Critical patent/CN114220536A/en
Publication of CN114220536A publication Critical patent/CN114220536A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/20ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Public Health (AREA)
  • Biomedical Technology (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)

Abstract

The invention relates to an artificial intelligence technology, and discloses a disease analysis method based on machine learning, which comprises the following steps: acquiring training disease data and real disease names and real disease attributes corresponding to the training disease data; constructing a target vector correlation matrix of training disease data, and calculating the target vector correlation matrix by using a disease analysis model to obtain an output result; calculating by using a disease name loss function and an attribute information loss function respectively to obtain a disease name loss value and an attribute information loss value of an output result and a real disease name, calculating by using a joint loss function the disease name loss value and the attribute information loss value to obtain a joint loss value, and optimizing the disease analysis model according to the joint loss value; and calculating the data to be detected by using the optimized disease analysis model to obtain a target disease analysis result. The invention also provides a disease analysis device, equipment and a medium based on machine learning. The invention can improve the accuracy of disease analysis.

Description

Disease analysis method, device, equipment and storage medium based on machine learning
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a disease analysis method and device based on machine learning, electronic equipment and a computer readable storage medium.
Background
With the development of artificial intelligence, related applications relate to various aspects of life, but the status of diseases in daily life of people is not small, and diseases are not only important research subjects in biomedicine, but also frequently appear in the task of natural language processing in biomedicine, and the artificial intelligence is used for assisting medical diagnosis, analyzing diseases and the like, which is an important research direction at present. However, at present, the efficiency is low and a large amount of manpower is consumed by utilizing manual work to diagnose and identify diseases; the machine learning is used for disease diagnosis, and the model identification precision is not high due to large training data quantity, so that the accuracy of disease analysis is low.
Disclosure of Invention
The invention provides a disease analysis method and device based on machine learning and a computer readable storage medium, and mainly aims to solve the problem of low disease analysis accuracy.
In order to achieve the above object, the present invention provides a disease analysis method based on machine learning, including:
acquiring training disease data and real disease names and real disease attributes corresponding to the training disease data;
constructing a target vector correlation matrix of the training disease data, and inputting the target vector correlation matrix into a pre-constructed disease analysis model to obtain an output result of the disease analysis model;
calculating by using a preset disease name loss function to obtain a disease name loss value of the output result and the real disease name, calculating by using a preset attribute information loss function to obtain an attribute information loss value of the output result and the real disease attribute, calculating by using a preset joint loss function to obtain a joint loss value, and optimizing the disease analysis model according to the joint loss value to obtain a standard disease analysis model, wherein the joint loss function is a linear product of the disease name loss function and the attribute information loss function;
and obtaining data to be detected, and calculating the data to be detected by using the standard disease analysis model to obtain a target disease analysis result.
Optionally, the constructing a target vector correlation matrix of the training disease data includes:
performing mask operation and coding operation on the training disease data to obtain a positioning vector set;
and performing matrix conversion on the positioning vector set, and calculating according to a matrix conversion result and the positioning vector set to obtain a target vector correlation matrix.
Optionally, the performing a masking operation and an encoding operation on the training disease data to obtain a location vector set includes:
extracting data to be masked from the training disease data, and performing masking operation on the data to be masked to obtain masked data;
and performing vector conversion on all data in the masked data to obtain a vector set, and performing position coding on the vector set to obtain a positioning vector set.
Optionally, the performing matrix conversion on the set of location vectors, and calculating according to a result of the matrix conversion and the set of location vectors to obtain a target vector correlation matrix includes:
converting the positioning vector set into a positioning vector matrix, and generating a classification iteration conversion matrix according to the dimension of the positioning vector matrix;
calculating to obtain an original vector correlation matrix corresponding to the positioning word vector set by utilizing a pre-constructed index normalization function, the positioning vector matrix and the classification iteration conversion matrix;
and adjusting an iteration weight factor in a pre-constructed feedforward neural network by using the original vector correlation matrix and the positioning vector matrix to obtain a target vector correlation matrix.
Optionally, the calculating, by using a joint loss function, the disease name loss value and the attribute information loss value to obtain a joint loss value includes:
calculating the attribute information loss value and a weight coefficient corresponding to the attribute information loss value by using an exponential function;
and multiplying the calculated result by the disease name loss value to obtain a combined loss value.
Optionally, said optimizing said disease analysis model according to said joint loss value comprises:
judging whether the joint loss value is smaller than a preset loss threshold value or not;
when the combined loss value is greater than or equal to a preset loss threshold value, updating the hyper-parameters of the disease analysis model by using a gradient descent algorithm;
and when the combined loss value is smaller than a preset loss threshold value, obtaining an iterated standard disease analysis model.
Optionally, the data to be detected is calculated by using the standard disease analysis model to obtain a target disease analysis result, and the method further includes:
capturing corresponding answers from a network or a database according to the data to be detected, and storing the answers into an answer list;
inputting the data to be detected into the standard disease analysis model to obtain an identification answer;
calculating the association degree of the recognition answer and each answer in the answer list;
and sorting the answers in the answer list according to the relevance degree to obtain a target list.
In order to solve the above problem, the present invention also provides a disease analysis apparatus based on machine learning, the apparatus including:
the training data acquisition module is used for acquiring training disease data and real disease names and real disease attributes corresponding to the disease data;
the disease analysis model training module is used for constructing a target vector correlation matrix of the training disease data, inputting the target vector correlation matrix into a pre-constructed disease analysis model for iteration, and obtaining an output result of the disease analysis model;
the disease analysis model optimization module is used for calculating by using a preset disease name loss function to obtain a disease name loss value of the output result and the real disease name, calculating by using a preset attribute information loss function to obtain an attribute information loss value of the output result and the real disease attribute, calculating by using a preset joint loss function the disease name loss value and the attribute information loss value to obtain a joint loss value, and optimizing the disease analysis model according to the joint loss value to obtain a standard disease analysis model, wherein the joint loss function is a linear product of the disease name loss function and the attribute information loss function;
and the disease analysis module is used for obtaining data to be detected and calculating the data to be detected by using the standard disease analysis model to obtain a target disease analysis result.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the machine learning-based disease analysis method described above.
In order to solve the above problem, the present invention also provides a computer-readable storage medium having at least one computer program stored therein, the at least one computer program being executed by a processor in an electronic device to implement the machine learning-based disease analysis method described above.
According to the embodiment of the invention, the training disease data is processed to obtain the positioning vector set, the target vector correlation matrix of the training disease data is constructed, the disease analysis model is analyzed through the target vector correlation matrix, the output result after training is calculated by using three loss functions, namely a disease name loss function, an attribute information loss function and a joint loss function, so as to obtain the joint loss value, and the disease analysis model is updated through the joint loss value, so that the optimized standard disease analysis model is more accurate, and the efficiency and the accuracy of identifying the data to be detected are improved. Therefore, the disease analysis method based on machine learning provided by the embodiment of the invention can solve the problem of low disease analysis accuracy.
Drawings
Fig. 1 is a schematic flow chart of a disease analysis method based on machine learning according to an embodiment of the present invention;
FIG. 2 is a schematic flowchart of constructing a target vector correlation matrix of the training disease data according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of optimizing the disease analysis model according to an embodiment of the present invention;
FIG. 4 is a functional block diagram of a disease analysis apparatus based on machine learning according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing the disease analysis method based on machine learning according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a disease analysis method based on machine learning. The executing subject of the disease analysis method based on machine learning includes, but is not limited to, at least one of the electronic devices that can be configured to execute the method provided by the embodiments of the present application, such as a server, a terminal, and the like. In other words, the disease analysis method based on machine learning may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Fig. 1 is a schematic flow chart of a disease analysis method based on machine learning according to an embodiment of the present invention. In this embodiment, the disease analysis method based on machine learning includes:
s1, acquiring training disease data and real disease names and real disease attributes corresponding to the training disease data.
In this embodiment of the present invention, the training disease data may be information related to a disease captured from a network or a database (e.g., MeSH, wikipedia, WebMD, NHS categories, etc.) by using a crawler technology, and the training disease data corresponds to a name and attributes of the disease, where the disease attributes include: attribute information such as disease information, etiology information, symptom information, diagnosis information, treatment information, prevention information, pathophysiology information, and the like. For example, suppose the disease data is that the liver is comparatively painful and the liver palms appear, the corresponding disease name is hepatitis, and the disease attribute is symptom information: yellow staining of the sclera or skin, fever, dull pain of the liver area, hepatomegaly, tenderness, spider nevus and liver palms may appear.
In another embodiment of this embodiment, a regular expression is used to perform data filtering on the collected original data, and then the filtered data is stored. By data filtering, interference data such as meaningless punctuation marks, escape characters, etc. can be reduced.
S2, constructing a target vector correlation matrix of the training disease data, and inputting the target vector correlation matrix into a pre-constructed disease analysis model to obtain an output result of the disease analysis model.
In the embodiment of the invention, the training disease data can be preprocessed through the neural network.
In the embodiment of the present invention, the disease analysis model is a pre-training language model, including but not limited to BERT model (Bidirectional Encoder Representations from transforms), LSTM model (Long-Short Term Memory model).
The Disease analysis model in the embodiment of the invention comprises the semantic relation between the Disease name and the Disease attribute, can identify the input target vector correlation matrix, successfully captures syntax, semantics and some common sense, and can identify the semantic relation between the Disease description text and the corresponding Disease (Disease) and attribute (attribute).
In an embodiment of the present invention, please refer to fig. 2, the constructing of the target vector correlation matrix of the training disease data includes:
s21, performing masking operation and coding operation on the training disease data to obtain a positioning vector set;
and S22, performing matrix conversion on the positioning vector set, and calculating according to the result of the matrix conversion and the positioning vector set to obtain a target vector correlation matrix.
Specifically, in the embodiment of the present invention, the performing a masking operation and a coding operation on the training disease data to obtain a location vector set includes:
extracting data to be masked from the training disease data, and performing masking operation on the data to be masked to obtain masked data;
and performing vector conversion on all data in the masked data to obtain a vector set, and performing position coding on the vector set to obtain a positioning vector set.
Specifically, the performing a masking operation on the data to be masked to obtain masked data includes:
extracting keywords from the data to be masked according to a preset mask probability, and performing a mask operation on the keywords to obtain masked words;
and in the data to be masked, replacing the key words with the masked words to obtain the masked data.
In detail, the preset mask probability refers to a ratio of the number of words of the keyword randomly selected in the training disease data to the total number of words of the training disease data, and the mask probability may be set to 25%. For example: the training disease data is one hundred words, and if masking is carried out according to the probability of 25%, masking is carried out on twenty-five keywords in the training disease data randomly; the MASK includes, but is not limited to, MASK, which refers to masking the key with MASK symbols, random MASK, which refers to masking the key with other words.
In the embodiment of the invention, a Word2vec algorithm can be adopted to perform vector conversion on all data in the masked data.
Further, said performing position encoding on said set of vectors comprises:
extracting vectors corresponding to the masked words in the vector set, and taking the positions of the vectors corresponding to the masked words as coordinate origins;
and establishing a position vector of each vector in the vector set according to the coordinate origin, and performing position coding on the vector set by using the position vector.
In the embodiment of the present invention, the farther a vector is from a vector corresponding to the coded word, the larger the modulus of a position vector corresponding to the vector is.
In the embodiment of the present invention, the performing matrix conversion on the set of location vectors, and calculating according to a result of the matrix conversion and the set of location vectors to obtain a target vector correlation matrix includes:
converting the positioning vector set into a positioning vector matrix, and generating a classification iteration conversion matrix according to the dimension of the positioning vector matrix;
calculating by using a pre-constructed index normalization function, the positioning vector matrix and the classification iteration conversion matrix to obtain an original vector correlation matrix corresponding to the positioning word vector set;
and adjusting an iteration weight factor in a pre-constructed feedforward neural network by using the original vector correlation matrix and the positioning vector matrix to obtain a target vector correlation matrix.
In the embodiment of the present invention, the classification iteration transformation matrix is the same as the dimension of the positioning vector matrix, for example, if the dimension of the positioning vector matrix is mxn, the dimension of the generated classification iteration matrix is mxn.
Specifically, the obtaining an original vector correlation matrix corresponding to the positioning word vector set by using the pre-constructed exponential normalization function, the positioning vector matrix, and the classification iterative transformation matrix includes:
splitting the classification iteration conversion matrix into a center conversion matrix, an association conversion matrix and a weight conversion matrix;
performing point multiplication on the positioning vector matrix and the central transformation matrix, the association transformation matrix and the weight transformation matrix respectively to obtain a central vector matrix, an association vector matrix and a weight vector matrix;
and calculating to obtain the original vector correlation matrix by taking the central vector matrix, the associated vector matrix and the weight vector matrix as input parameters of the index normalization function.
In this embodiment of the present invention, the exponential normalization function may be a Softmax function.
In the embodiment of the invention, the classification iteration conversion matrix is divided into the central conversion matrix, the association conversion matrix and the weight conversion matrix by using the dimension of the classification iteration conversion matrix, and the division can be executed according to mxs, sxt and txn if the classification iteration conversion matrix is mxn, so that the central conversion matrix of mxs dimension, the association conversion matrix of sxt dimension and the weight conversion matrix of txn dimension are respectively obtained.
In the embodiment of the present invention, the calculation process of the original vector correlation matrix is as follows:
Figure BDA0003405273470000081
wherein Q is the central transformation matrix, KTIs said associative transition matrix, dkThe dimension of the correlation transformation matrix is referred to, V is the weight transformation matrix, and Z is the original vector correlation matrix.
Further, the adjusting the iteration weight factor in the pre-constructed feedforward neural network by using the original vector correlation matrix and the positioning vector matrix to obtain the target vector correlation matrix includes:
summing and normalizing the original vector correlation matrix and the positioning vector matrix to obtain a normalized vector correlation matrix;
and inputting the normalized vector correlation matrix into a pre-constructed feedforward neural network, and performing weight adjustment on the normalized vector correlation matrix by using an iteration weight factor in the feedforward neural network to obtain the target vector correlation matrix.
In the embodiment of the invention, the summation normalization is to superpose the original vector correlation matrix and the positioning vector matrix, to perform normalization processing on the superposed vector matrix, and to map the numerical values in the vector matrix to the interval of 0-1, so as to facilitate the adjustment of the feedforward neural network.
In the embodiment of the invention, the Normalization vector correlation matrix is obtained by summing the original vector correlation matrix and the positioning vector matrix and then normalizing, and the Normalization operation can be performed by adopting a Layer Normalization function.
In the embodiment of the invention, the calculation results of the disease attribute and the disease name are obtained through convolution, pooling and full connection operation of the disease analysis model on the input vector matrix, and the training results of the disease analysis model can be determined by comparing the calculation results with the real disease name and disease attribute.
S3, calculating by using a preset disease name loss function to obtain a disease name loss value of the output result and the real disease name, calculating by using a preset attribute information loss function to obtain an attribute information loss value of the output result and the real disease attribute, calculating by using a preset joint loss function to obtain a joint loss value, optimizing the disease analysis model according to the joint loss value to obtain a standard disease analysis model, wherein the joint loss function is a linear product of the disease name loss function and the attribute information loss function;
in an embodiment of the present invention, calculating the disease name loss value through the disease name loss function may be represented by the following formula:
Figure BDA0003405273470000091
wherein N is the number of disease names, xnIs the nth disease name, p (x)n| passage) is xnConditional probability on the target paragraph, β is a predetermined balance coefficient, Sn=w*yn+ b, where w is a predetermined weight, ynIs xnOutputting a result of the layer after embedding of the disease analysis model, wherein b represents a preset deviation;
the attribute information loss value calculated by the attribute information loss function can be represented by the following formula:
Figure BDA0003405273470000092
wherein M is the number of disease attributes, TiLna taking 0 or 1 as the label value of the ith disease attributeiIs the ith disease attribute aiLog of output values obtained after passing through the activation layer of the disease analysis model.
In an embodiment of the present invention, the calculating the disease name loss value and the attribute information loss value by using a joint loss function to obtain a joint loss value includes:
calculating the attribute information loss value and a weight coefficient corresponding to the attribute information loss value by using an exponential function;
and multiplying the calculated result by the disease name loss value to obtain a combined loss value.
Further, the learning rate of the joint loss function in the embodiment of the present invention may be selected as e-5The combined LOSS function is combined with the disease name LOSS function LOSSdiseaseAnd attribute information LOSS function LOSSattributionConsidered simultaneously, the specific formula is as follows:
LOSS=LOSSdisease*exp(λLOSSattribution)
wherein λ is a preset weight coefficient, the value range is (0, 1), and exp is an exponential function with a natural number e as a base.
The output result is calculated through the disease name loss function, the attribute information loss function and the combined loss function, so that the influence of the disease attribute on the calculated combined loss value is larger, and the model optimized through changing the loss value can more effectively play a diagnosis role when being applied to the professional field.
In an embodiment of the present invention, referring to fig. 3, the optimizing the disease analysis model according to the joint loss value includes:
s31, judging whether the joint loss value is smaller than a preset loss threshold value;
when the combined loss value is greater than or equal to a preset loss threshold value, executing S32, and updating the hyper-parameters of the disease analysis model by using a gradient descent algorithm;
and when the combined loss value is smaller than a preset loss threshold value, executing S33 to obtain an iterated standard disease analysis model.
In the embodiment of the invention, after each iteration, the combined loss value of the output result of the disease analysis model, the real disease name corresponding to the disease data and the real disease attribute is calculated by using the loss function, and then the hyper-parameters of the disease analysis model are updated according to the combined loss value. The hyper-parameters may include, for example, a learning rate decay rule, an optimization method selection, a loss function selection, and the like, and the purpose of updating the hyper-parameters is to select a suitable set of parameters to optimize the performance of the disease analysis model.
Further, the gradient descent algorithm includes, but is not limited to, a batch gradient descent algorithm, a random gradient descent algorithm, a small batch gradient descent algorithm.
Preferably, the embodiment of the present invention may update the hyper-parameter by using a small batch gradient descent algorithm. The small-batch gradient descent algorithm can reduce the change of the super-parameter during updating and improve the stability of the super-parameter during convergence.
According to the embodiment of the invention, Adam can be selected as an optimizer, and an automatic backward propagation process is constructed for a forward propagation process constructed by adopting backward propagation optimization to optimize a disease analysis model, optimize relevant model parameters and reduce a disease name loss value, so that the recognition capability of the model for disease names is improved; and the loss value of the attribute information is reduced to improve the recognition capability of the model on the disease attribute, so that the semantic association between the disease and the attribute thereof is better inferred.
And S4, obtaining data to be detected, and calculating the data to be detected by using the standard disease analysis model to obtain a target disease analysis result.
In the embodiment of the invention, the data to be detected can be an inquiry sheet, a medical record, a disease consultation problem and the like.
For example, if the data to be detected is "yellow sclera or skin, fever, dull pain of liver region, hepatomegaly, and tenderness", the data to be detected is input into the standard disease analysis model, and the identification information corresponding to the output result is obtained and includes a disease name "hepatitis", and the target identification result is "hepatitis".
In the embodiment of the present invention, the calculating the data to be detected by using the standard disease analysis model to obtain the target disease analysis result includes:
capturing corresponding answers from a network or a database according to the data to be detected, and storing the answers into an answer list;
inputting the data to be detected into the standard disease analysis model to obtain an identification answer;
calculating the association degree of the recognition answer and each answer in the answer list;
and sorting the answers in the answer list according to the relevance to obtain a target list and determining the target list as a result of target disease analysis.
In the implementation of the present invention, the target list includes a plurality of answers corresponding to the data to be detected, i.e., a plurality of disease analysis results.
For example, assuming that the data to be detected is 'sclera or skin yellow stain, liver region dull pain, and tenderness', capturing answers corresponding to the data to be detected through a browser search and other ways, and storing the answers into an answer list, wherein the confidence degree, the association degree and the like of the answers in the answer list are randomly distributed; inputting the description information into the standard disease analysis model to obtain an output result, namely a target disease analysis answer (comprising one or more recognition results and different probabilities of different recognition results); and calculating the relevance degree of the answers in the answer list and the target disease analysis answers, so that the relevance degree of the answers in the answer list can be obtained, and the answers in the answer list are reordered according to the relevance degree, so that the answer list with a confidence sequence, namely the target disease analysis result with the confidence sequence, can be obtained.
The embodiment of the invention obtains the positioning vector set by processing the training disease data, obtains the target vector correlation matrix by performing matrix conversion and calculation on the positioning vector set, realizes the screening of vectors in the positioning vector set, and improves the accuracy of disease analysis by subsequently utilizing the target vector correlation matrix; the disease analysis model is trained through the disease data, the output result after training is calculated through the three loss functions of the disease name loss function, the attribute information loss function and the joint loss function to obtain the joint loss value, and the disease analysis model is updated through the joint loss value, so that the standard disease analysis model obtained through optimization is more accurate, and the efficiency and the accuracy of identifying the data to be detected are improved. Therefore, the disease analysis method based on machine learning provided by the embodiment of the invention can solve the problem of low disease analysis accuracy.
Fig. 4 is a functional block diagram of a disease analysis apparatus based on machine learning according to an embodiment of the present invention.
The disease analysis apparatus 100 according to the present invention may be installed in an electronic device. According to the realized functions, the disease analysis apparatus 100 based on machine learning may include a training data acquisition module 101, a disease analysis model training module 102, a disease analysis model optimization module 103, and a disease analysis module 104. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the training data acquisition module 101 is configured to acquire training disease data and a real disease name and a real disease attribute corresponding to the disease data;
the disease analysis model training module 102 is configured to construct a target vector correlation matrix of the training disease data, and input the target vector correlation matrix into a pre-constructed disease analysis model for iteration to obtain an output result of the disease analysis model;
the disease analysis model optimization module 103 is configured to calculate a disease name loss value of the output result and the real disease name by using a preset disease name loss function, calculate an attribute information loss value of the output result and the real disease attribute by using a preset attribute information loss function, calculate the disease name loss value and the attribute information loss value by using a preset joint loss function to obtain a joint loss value, and optimize the disease analysis model according to the joint loss value to obtain a standard disease analysis model, where the joint loss function is a linear product of the disease name loss function and the attribute information loss function;
the disease analysis module 104 is configured to obtain data to be detected, and calculate the data to be detected by using the standard disease analysis model to obtain a target disease analysis result.
In detail, when the modules in the disease analysis apparatus 100 based on machine learning according to the embodiment of the present invention are used, the same technical means as the disease analysis method based on machine learning described in fig. 1 to 3 are adopted, and the same technical effects can be produced, which is not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device for implementing a disease analysis method based on machine learning according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as a machine learning based disease analysis program, stored in the memory 11 and executable on the processor 10.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules stored in the memory 11 (for example, executing a machine learning-based disease analysis program, etc.), and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of a disease analysis program based on machine learning, etc., but also to temporarily store data that has been output or is to be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Only electronic devices having components are shown, and those skilled in the art will appreciate that the structures shown in the figures do not constitute limitations on the electronic devices, and may include fewer or more components than shown, or some components in combination, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The memory 11 in the electronic device 1 stores a machine learning based disease analysis program that is a combination of instructions that, when executed in the processor 10, may implement:
acquiring training disease data and real disease names and real disease attributes corresponding to the training disease data;
constructing a target vector correlation matrix of the training disease data, and inputting the target vector correlation matrix into a pre-constructed disease analysis model to obtain an output result of the disease analysis model;
calculating by using a preset disease name loss function to obtain a disease name loss value of the output result and the real disease name, calculating by using a preset attribute information loss function to obtain an attribute information loss value of the output result and the real disease attribute, calculating by using a preset joint loss function to obtain a joint loss value, and optimizing the disease analysis model according to the joint loss value to obtain a standard disease analysis model, wherein the joint loss function is a linear product of the disease name loss function and the attribute information loss function;
and obtaining data to be detected, and calculating the data to be detected by using the standard disease analysis model to obtain a target disease analysis result.
Specifically, the specific implementation method of the instruction by the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to the drawings, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
acquiring training disease data and real disease names and real disease attributes corresponding to the training disease data;
constructing a target vector correlation matrix of the training disease data, and inputting the target vector correlation matrix into a pre-constructed disease analysis model to obtain an output result of the disease analysis model;
calculating by using a preset disease name loss function to obtain a disease name loss value of the output result and the real disease name, calculating by using a preset attribute information loss function to obtain an attribute information loss value of the output result and the real disease attribute, calculating by using a preset joint loss function to obtain a joint loss value, and optimizing the disease analysis model according to the joint loss value to obtain a standard disease analysis model, wherein the joint loss function is a linear product of the disease name loss function and the attribute information loss function;
and obtaining data to be detected, and calculating the data to be detected by using the standard disease analysis model to obtain a target disease analysis result.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for machine learning-based disease analysis, the method comprising:
acquiring training disease data and real disease names and real disease attributes corresponding to the training disease data;
constructing a target vector correlation matrix of the training disease data, and inputting the target vector correlation matrix into a pre-constructed disease analysis model to obtain an output result of the disease analysis model;
calculating by using a preset disease name loss function to obtain a disease name loss value of the output result and the real disease name, calculating by using a preset attribute information loss function to obtain an attribute information loss value of the output result and the real disease attribute, calculating by using a preset joint loss function to obtain a joint loss value, and optimizing the disease analysis model according to the joint loss value to obtain a standard disease analysis model, wherein the joint loss function is a linear product of the disease name loss function and the attribute information loss function;
and obtaining data to be detected, and calculating the data to be detected by using the standard disease analysis model to obtain a target disease analysis result.
2. The machine learning-based disease analysis method of claim 1, wherein the constructing the target vector correlation matrix of the training disease data comprises:
performing mask operation and coding operation on the training disease data to obtain a positioning vector set;
and performing matrix conversion on the positioning vector set, and calculating according to a matrix conversion result and the positioning vector set to obtain a target vector correlation matrix.
3. The machine learning-based disease analysis method of claim 2, wherein the masking and encoding the training disease data to obtain a set of localization vectors comprises:
extracting data to be masked from the training disease data, and performing masking operation on the data to be masked to obtain masked data;
and performing vector conversion on all data in the masked data to obtain a vector set, and performing position coding on the vector set to obtain a positioning vector set.
4. The machine learning-based disease analysis method of claim 2, wherein the matrix-converting the set of localization vectors and calculating according to the result of the matrix-converting and the set of localization vectors to obtain a target vector correlation matrix comprises:
converting the positioning vector set into a positioning vector matrix, and generating a classification iteration conversion matrix according to the dimension of the positioning vector matrix;
calculating by using a pre-constructed index normalization function, the positioning vector matrix and the classification iteration conversion matrix to obtain an original vector correlation matrix corresponding to the positioning word vector set;
and adjusting an iteration weight factor in a pre-constructed feedforward neural network by using the original vector correlation matrix and the positioning vector matrix to obtain a target vector correlation matrix.
5. The machine learning-based disease analysis method of claim 1, wherein the calculating the disease name loss value and the attribute information loss value using a joint loss function to obtain a joint loss value comprises:
calculating the attribute information loss value and a weight coefficient corresponding to the attribute information loss value by using an exponential function;
and multiplying the calculated result by the disease name loss value to obtain a combined loss value.
6. The machine learning-based disease analysis method of claim 5, wherein the optimizing the disease analysis model according to the joint loss value comprises:
judging whether the joint loss value is smaller than a preset loss threshold value or not;
when the combined loss value is greater than or equal to a preset loss threshold value, updating the hyper-parameters of the disease analysis model by using a gradient descent algorithm;
and when the combined loss value is smaller than a preset loss threshold value, obtaining an iterated standard disease analysis model.
7. The disease analysis method based on machine learning according to any one of claims 1 to 6, wherein the calculating the data to be detected by using the standard disease analysis model to obtain the target disease analysis result comprises:
capturing corresponding answers from a network or a database according to the data to be detected, and storing the answers into an answer list;
inputting the data to be detected into the standard disease analysis model to obtain an identification answer;
calculating the association degree of the recognition answer and each answer in the answer list;
and sorting the answers in the answer list according to the relevance to obtain a target list and determining the target list as a result of target disease analysis.
8. A machine learning-based disease analysis apparatus, the apparatus comprising:
the training data acquisition module is used for acquiring training disease data and real disease names and real disease attributes corresponding to the disease data;
the disease analysis model training module is used for constructing a target vector correlation matrix of the training disease data, inputting the target vector correlation matrix into a pre-constructed disease analysis model for iteration, and obtaining an output result of the disease analysis model;
the disease analysis model optimization module is used for calculating by using a preset disease name loss function to obtain a disease name loss value of the output result and the real disease name, calculating by using a preset attribute information loss function to obtain an attribute information loss value of the output result and the real disease attribute, calculating by using a preset joint loss function the disease name loss value and the attribute information loss value to obtain a joint loss value, and optimizing the disease analysis model according to the joint loss value to obtain a standard disease analysis model, wherein the joint loss function is a linear product of the disease name loss function and the attribute information loss function;
and the disease analysis module is used for obtaining data to be detected and calculating the data to be detected by using the standard disease analysis model to obtain a target disease analysis result.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the machine learning-based disease analysis method of any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the machine learning-based disease analysis method according to any one of claims 1 to 7.
CN202111509656.2A 2021-12-10 2021-12-10 Disease analysis method, device, equipment and storage medium based on machine learning Pending CN114220536A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111509656.2A CN114220536A (en) 2021-12-10 2021-12-10 Disease analysis method, device, equipment and storage medium based on machine learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111509656.2A CN114220536A (en) 2021-12-10 2021-12-10 Disease analysis method, device, equipment and storage medium based on machine learning

Publications (1)

Publication Number Publication Date
CN114220536A true CN114220536A (en) 2022-03-22

Family

ID=80700908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111509656.2A Pending CN114220536A (en) 2021-12-10 2021-12-10 Disease analysis method, device, equipment and storage medium based on machine learning

Country Status (1)

Country Link
CN (1) CN114220536A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114742238A (en) * 2022-06-14 2022-07-12 四川省郫县豆瓣股份有限公司 Method, device, equipment and medium for screening raw materials of thick broad-bean sauce
CN116110597A (en) * 2023-01-30 2023-05-12 深圳市平行维度科技有限公司 Digital twinning-based intelligent analysis method and device for patient disease categories

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107798621A (en) * 2017-08-30 2018-03-13 平安科技(深圳)有限公司 Medical diagnosis on disease signal auditing method and device
CN108021553A (en) * 2017-09-30 2018-05-11 北京颐圣智能科技有限公司 Word treatment method, device and the computer equipment of disease term
CN112232449A (en) * 2020-12-14 2021-01-15 浙江大华技术股份有限公司 Neural network training method, electronic device, and storage medium
CN113095081A (en) * 2021-06-11 2021-07-09 深圳市北科瑞声科技股份有限公司 Disease identification method and device, storage medium and electronic device
CN113420546A (en) * 2021-06-24 2021-09-21 平安国际智慧城市科技股份有限公司 Text error correction method and device, electronic equipment and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107798621A (en) * 2017-08-30 2018-03-13 平安科技(深圳)有限公司 Medical diagnosis on disease signal auditing method and device
CN108021553A (en) * 2017-09-30 2018-05-11 北京颐圣智能科技有限公司 Word treatment method, device and the computer equipment of disease term
CN112232449A (en) * 2020-12-14 2021-01-15 浙江大华技术股份有限公司 Neural network training method, electronic device, and storage medium
CN113095081A (en) * 2021-06-11 2021-07-09 深圳市北科瑞声科技股份有限公司 Disease identification method and device, storage medium and electronic device
CN113420546A (en) * 2021-06-24 2021-09-21 平安国际智慧城市科技股份有限公司 Text error correction method and device, electronic equipment and readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114742238A (en) * 2022-06-14 2022-07-12 四川省郫县豆瓣股份有限公司 Method, device, equipment and medium for screening raw materials of thick broad-bean sauce
CN116110597A (en) * 2023-01-30 2023-05-12 深圳市平行维度科技有限公司 Digital twinning-based intelligent analysis method and device for patient disease categories
CN116110597B (en) * 2023-01-30 2024-03-22 深圳市平行维度科技有限公司 Digital twinning-based intelligent analysis method and device for patient disease categories

Similar Documents

Publication Publication Date Title
CN112732915A (en) Emotion classification method and device, electronic equipment and storage medium
CN112446025A (en) Federal learning defense method and device, electronic equipment and storage medium
CN110033018B (en) Graph similarity judging method and device and computer readable storage medium
CN113707303A (en) Method, device, equipment and medium for solving medical problems based on knowledge graph
CN112581227A (en) Product recommendation method and device, electronic equipment and storage medium
CN114220536A (en) Disease analysis method, device, equipment and storage medium based on machine learning
CN113111162A (en) Department recommendation method and device, electronic equipment and storage medium
CN114461777A (en) Intelligent question and answer method, device, equipment and storage medium
CN114416939A (en) Intelligent question and answer method, device, equipment and storage medium
CN112632264A (en) Intelligent question and answer method and device, electronic equipment and storage medium
CN113886708A (en) Product recommendation method, device, equipment and storage medium based on user information
CN114398557A (en) Information recommendation method and device based on double portraits, electronic equipment and storage medium
CN115510188A (en) Text keyword association method, device, equipment and storage medium
CN115238670A (en) Information text extraction method, device, equipment and storage medium
CN114840684A (en) Map construction method, device and equipment based on medical entity and storage medium
CN114706985A (en) Text classification method and device, electronic equipment and storage medium
CN114756669A (en) Intelligent analysis method and device for problem intention, electronic equipment and storage medium
CN113505117A (en) Data quality evaluation method, device, equipment and medium based on data indexes
CN112632260A (en) Intelligent question and answer method and device, electronic equipment and computer readable storage medium
CN112052310A (en) Information acquisition method, device, equipment and storage medium based on big data
CN116741358A (en) Inquiry registration recommendation method, inquiry registration recommendation device, inquiry registration recommendation equipment and storage medium
CN116340537A (en) Character relation extraction method and device, electronic equipment and storage medium
CN116705345A (en) Medical entity labeling method, device, equipment and storage medium
CN116739001A (en) Text relation extraction method, device, equipment and medium based on contrast learning
CN114610854A (en) Intelligent question and answer method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination