Search

CN-116168279-B - Expiratory gas identification method, expiratory gas identification device, computer equipment and storage medium

CN116168279BCN 116168279 BCN116168279 BCN 116168279BCN-116168279-B

Abstract

The invention relates to the technical field of medical treatment in artificial intelligence, and discloses an expired gas identification method, an expired gas identification device, computer equipment and a storage medium. The method comprises the steps of obtaining teacher coding parameter information of a target teacher model, obtaining an expiration data set, inputting the expiration data set and the teacher coding parameter information to an encoder module of a student model to obtain student coding results, inputting the student coding results to a decoder module of the student model to obtain first losses, inputting the expiration data set to the target teacher model to encode to obtain teacher coding results, calculating to obtain second losses according to the teacher coding results and the student coding results, performing iterative training on the student model according to the first losses and the second losses to obtain a target student model, obtaining expiration gas data to be identified, and inputting the expiration gas data to be identified to the target student model to obtain identification results. The embodiment of the invention can improve the accuracy of the identification of the expired gas.

Inventors

  • PAN XIAOFANG
  • CHEN JIEBIN
  • JING JUNHU
  • WEN XIAOLIN

Assignees

  • 深圳大学

Dates

Publication Date
20260508
Application Date
20230223

Claims (8)

  1. 1. An expired gas recognition method, characterized in that it is applied to a constructed expired gas recognition model, the expired gas recognition model including a teacher model and a student model, the method comprising: Obtaining teacher coding parameter information of a target teacher model, wherein the target teacher model is obtained by training the teacher model by utilizing a training data set; Acquiring an expiration data set, and inputting the expiration data set and the teacher coding parameter information to an encoder module of the student model to obtain a student coding result; Inputting the student coding result to a decoder module of the student model to obtain a first loss, wherein the first loss is a classification loss between a real label and a prediction label; Inputting the expiration data set into the target teacher model for coding to obtain a teacher coding result, and calculating according to the teacher coding result and the student coding result to obtain a second loss, wherein the second loss is a distribution difference between the output of the encoder module of the student model and the output of the encoder module of the teacher model; performing iterative training on the student model according to the first loss and the second loss to obtain a target student model; Acquiring expiration gas data to be identified, and inputting the expiration gas data to be identified into the target student model for identification to obtain an identification result; The encoder module of the student model comprises a student-gated cyclic neural network and a student attention module, and the encoder module for inputting the expiration data set and the teacher coding parameter information into the student model to obtain a student coding result comprises the following steps: Inputting the expiration data set and the teacher coding parameter information into the student gating cyclic neural network for operation to obtain a student hidden state; inputting the student hidden state into the student attention module for operation to obtain a student background vector; carrying out operation on the student background vector and the student hidden state to obtain a student coding result; the student hiding state comprises a plurality of student hiding states with different time steps, the student attention module comprises two full-connection layers, the student hiding state is input into the student attention module to be operated to obtain a student background vector, and the student hiding state comprises: and inputting the hidden states of the students in a plurality of different time steps into two full-connection layers to be weighted and combined to obtain hidden weights, wherein the two full-connection layers comprise a first connection layer and a second connection layer, and the calculation formula of the first full-connection layer is as follows: Wherein W h*h1 represents a projection matrix of the hidden state H t*h projected to the dimension H 1 , b 1 represents a bias of the hidden state H t*h on the new dimension H 1 , and x represents a dot product operation, and the calculation formula of the second fully connected layer is as follows: Wherein W h1*1 represents the projection matrix of the first full connection layer output L 1 , b 2 represents the offset of L 1 in the new dimension h 1 , and L 2 is the hidden weight; converting and operating the hidden weight through a softmax function to obtain a weight coefficient; and calculating the weight coefficient and the hidden state of the student to obtain a student background vector.
  2. 2. The method of claim 1, wherein the inputting the student encoding results to the decoder module of the student model results in a first penalty comprising: inputting the student coding result into a decoder module of the student model to decode the student coding result to obtain a prediction label; and acquiring the real label in the expiration data set, and performing cross entropy operation on the real label and the prediction label to obtain a first loss.
  3. 3. The method of claim 2, wherein the encoder module of the target teacher model includes a teaching master's homegate control loop neural network and a teacher attention module, wherein inputting the exhalation dataset into the target teacher model for encoding results of teacher encoding, and calculating a second loss according to the results of teacher encoding and the results of student encoding, comprises: inputting the expiration data set into the teacher-gated circulating neural network for operation to obtain a hidden state of the teacher; inputting the hidden state of the teacher into the teacher attention module to operate so as to obtain a teacher background vector; calculating the teacher background vector and the hidden state of the teacher to obtain a teacher coding result; and carrying out mean square error operation on the teacher coding result and the student coding result to obtain a second loss.
  4. 4. A method according to claim 3, wherein the iterative training of the student model according to the first and second losses to obtain a target student model comprises: calculating according to the first loss and the second loss to obtain a final loss; Training the student model according to the final loss until the final loss tends to be stable, so as to obtain a target student model.
  5. 5. The method of claim 1, wherein training the teacher model with the training data set to obtain a target teacher model comprises: obtaining simulated expiration gas data in a training data set, and inputting the simulated expiration gas data into the teacher model for training to obtain gas concentration information; if the gas concentration information does not accord with the gas concentration information in the training data set, returning to execute the step of acquiring the simulated expiration gas data in the training data set; and if the gas concentration information accords with the gas concentration information in the training data set, taking the trained teacher model as a target teacher model.
  6. 6. An expired gas recognition device applied to a constructed expired gas recognition model, the expired gas recognition model comprising a teacher model and a student model, the device comprising: The first acquisition unit is used for acquiring teacher coding parameter information of a target teacher model, wherein the target teacher model is obtained by training the teacher model by utilizing a training data set; The second acquisition unit is used for acquiring an expiration data set and inputting the expiration data set and the teacher coding parameter information into an encoder module of the student model to obtain a student coding result; The first input unit is used for inputting the student coding result to a decoder module of the student model to obtain a first loss, wherein the first loss is a classification loss between a real label and a prediction label; The second input unit is used for inputting the expiration data set into the target teacher model to encode to obtain a teacher encoding result, and calculating to obtain a second loss according to the teacher encoding result and the student encoding result, wherein the second loss is the distribution difference between the output of the encoder module of the student model and the output of the encoder module of the teacher model; The training unit is used for carrying out iterative training on the student model according to the first loss and the second loss to obtain a target student model; the recognition unit is used for acquiring the expiration gas data to be recognized, and inputting the expiration gas data to be recognized into the target student model for recognition so as to obtain a recognition result; The encoder module of the student model comprises a student gate control cyclic neural network and a student attention module, and the second acquisition unit comprises: the first input subunit is used for inputting the expiration data set and the teacher coding parameter information into the student gating cyclic neural network for operation to obtain a student hidden state; the second input subunit is used for inputting the hidden state of the student into the student attention module to perform operation so as to obtain a student background vector; The first calculating subunit is used for calculating the student background vector and the student hidden state to obtain a student coding result; the student hidden state comprises a plurality of student hidden states of different time steps, the student attention module comprises two fully connected layers, and the second input subunit comprises: The third input subunit is configured to perform weighted combination on the two fully-connected layers for inputting the hidden states of the students in a plurality of different time steps to obtain a hidden weight, where the two fully-connected layers include a first connection layer and a second connection layer, and a calculation formula of the first fully-connected layer is as follows: Wherein W h*h1 represents a projection matrix of the hidden state H t*h projected to the dimension H 1 , b 1 represents a bias of the hidden state H t*h on the new dimension H 1 , and x represents a dot product operation, and the calculation formula of the second fully connected layer is as follows: Wherein W h1*1 represents the projection matrix of the first full connection layer output L 1 , b 2 represents the offset of L 1 in the new dimension h 1 , and L 2 is the hidden weight; The second calculation subunit is used for converting and operating the hidden weight through a softmax function to obtain a weight coefficient; and the third calculation subunit is used for calculating the weight coefficient and the student hidden state to obtain a student background vector.
  7. 7. A computer device, characterized in that it comprises a memory and a processor, on which a computer program is stored, which processor implements the method according to any of claims 1-5 when executing the computer program.
  8. 8. A computer readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method according to any of claims 1-5.

Description

Expiratory gas identification method, expiratory gas identification device, computer equipment and storage medium Technical Field The embodiment of the invention relates to the technical field of medical treatment in artificial intelligence, in particular to an expired gas identification method, an expired gas identification device, computer equipment and a storage medium. Background Lung cancer is one of malignant tumors with the fastest growth of morbidity and mortality and the greatest threat to life and health of people, and can be discovered and effectively treated as early as possible, so that the survival probability of patients can be effectively improved. The existing lung cancer identification method generally utilizes the combination of feature extraction and a traditional machine learning method to identify the expiratory gas of a patient, but because the feature extraction process needs manual intervention and manual extraction, the manual extraction process can cause data information loss and influence the identification performance; the traditional machine learning method has high lazy property on the sample size, so that the problem of over-fitting easily exists when the sample data size is small, generalization capability is weak when complex sample data is faced, and finally, the recognition accuracy is low. Disclosure of Invention The embodiment of the invention provides an expired gas identification method, an expired gas identification device, computer equipment and a storage medium, and aims to solve the problems that the existing expired gas identification method is high in sample dependence and low in identification accuracy. In a first aspect, an embodiment of the present invention provides an expiratory gas recognition method applied to a constructed expiratory gas recognition model, where the expiratory gas recognition model includes a teacher model and a student model, and the expiratory gas recognition method includes: Obtaining teacher coding parameter information of a target teacher model, wherein the target teacher model is obtained by training the teacher model by using a training data set; Acquiring an expiration data set, and inputting the expiration data set and the teacher coding parameter information to an encoder module of the student model to obtain a student coding result; inputting the student coding result to a decoder module of the student model to obtain a first loss; inputting the expiration data set into the target teacher model for coding to obtain a teacher coding result, and calculating according to the teacher coding result and the student coding result to obtain a second loss; performing iterative training on the student model according to the first loss and the second loss to obtain a target student model; And acquiring the expiration gas data to be identified, and inputting the expiration gas data to be identified into the target student model for identification to obtain an identification result. In a second aspect, an embodiment of the present invention further provides an expiratory gas recognition device, applied to a constructed expiratory gas recognition model, where the expiratory gas recognition model includes a teacher model and a student model, and includes: the first acquisition unit is used for acquiring teacher coding parameter information of a target teacher model, wherein the target teacher model is obtained by training the teacher model by utilizing a training data set; The second acquisition unit is used for acquiring an expiration data set and inputting the expiration data set and the teacher coding parameter information into an encoder module of the student model to obtain a student coding result; the first input unit is used for inputting the student coding result to a decoder module of the student model to obtain a first loss; The second input unit is used for inputting the expiration data set into the target teacher model for coding to obtain a teacher coding result, and calculating according to the teacher coding result and the student coding result to obtain a second loss; The training unit is used for carrying out iterative training on the student model according to the first loss and the second loss to obtain a target student model; the recognition unit is used for acquiring the expiration gas data to be recognized, and inputting the expiration gas data to be recognized into the target student model for recognition so as to obtain a recognition result. In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the method when executing the computer program. In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the above method. The embodiment of the invention