Tear mode identification method based on convolutional attention neural network

The rapid and accurate identification of tearing modes through the convolutional attention neural network model solves the problems of inefficiency and pattern confusion in traditional methods, and realizes real-time identification and simplification of tearing modes.

CN120387372APending Publication Date: 2025-07-29UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510512167.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

Traditional tear mode recognition methods are inefficient, difficult to quickly identify massive experimental data in real time, and are easily confused with other plasma operating modes.

Method used

The method based on convolutional attention neural network is adopted to train the convolutional neural network model through electronic temperature data, including the convolutional layer, global pooling layer and attention mechanism, and output the recognition results of the tear mode.

Benefits of technology

It realizes fast and accurate identification of tear modes, simplifies the identification process, avoids signal phase difference and pattern confusion problems, and the model responds quickly and is suitable for real-time monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387372A_ABST
    Figure CN120387372A_ABST
Patent Text Reader

Abstract

The invention discloses a tear mode identification method based on a convolutional attention neural network. The method comprises the following steps: selecting the shot number of a tear mode generated in a plasma during an experiment on an east toroidal EAST device as a data set; the electronic temperature data are used as characteristic signals, the electronic temperature data from different positions of the plasma are subjected to one-dimension processing and are divided into segments with different time lengths, and then the data of each channel is subjected to standardization processing; a convolutional neural network model is built, the convolutional neural network model comprises a convolutional layer and a global pooling layer, an attention mechanism is added, and a final output layer is composed of two neurons and used for outputting an identification result of a tearing mode; and training the constructed convolutional neural network model to obtain an identification result of the tearing mode. According to the method, the problems that in traditional programming recognition, it is difficult to distinguish the phase difference between the signals, judgment needs to be conducted through ECE or SRX signal oscillation amplitude, and confusion with other plasma operation modes is likely to happen are solved, and accurate recognition of the tearing mode is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of tearing mode, and particularly to a method for identifying tearing mode based on convolutional attention neural network. Background Art

[0002] Plasma tearing mode is a kind of magnetohydrodynamic instability caused by resistive effect in magnetic confinement fusion, which will lead to the destruction of the magnetic field structure and the formation of magnetic islands, seriously affecting the plasma confinement performance and the operation stability of the fusion device. Traditional tearing mode identification usually requires users to personally write corresponding data processing programs to process various diagnostic signals and identify them manually. It is very difficult to achieve automatic identification of tearing mode through programming. And the manual identification method requires users to be very familiar with the measurement principle and spatial distribution of the complex diagnostic system of tokamak, which results in low efficiency. Moreover, due to the huge amount of experimental data, it is difficult to achieve real-time and rapid identification by manual methods when facing a large amount of experimental data.

[0003] Therefore, it is necessary to develop a solution that can utilize the powerful non-linear mapping ability of the network to achieve automatic identification of tearing mode. Summary of the Invention

[0004] The purpose of the present invention is to provide a method for identifying tearing mode based on convolutional attention neural network, which overcomes the problems in traditional programming identification that it is difficult to distinguish the phase difference between signals, and it is necessary to judge by the oscillation amplitude of ECE or SRX signals, and it is easy to be confused with other plasma operation modes, and realizes accurate identification of tearing mode.

[0005] The purpose of the present invention is realized through the following technical solutions:

[0006] A method for identifying tearing mode based on convolutional attention neural network, the method includes:

[0007] Step 1, select the gun numbers that generate tearing mode in the plasma during the experiment on the Experimental Advanced Superconducting Tokamak (EAST) device as the data set, and divide the training set, test set and validation set according to different gun numbers;

[0008] Step 2, use the electron temperature data as the feature signal, one-dimensionalize the electron temperature data from different positions of the plasma and split them into segments with different time lengths, then standardize the data of each channel and label them;

[0009] Step 3, build a convolutional neural network model CNN-AM, including a convolutional layer and a global pooling layer, plus an attention mechanism, and finally the output layer is composed of two neurons, which are used to output the identification result of the tearing mode;

[0010] Step 4: Train the constructed convolutional neural network model to obtain all weight and bias parameters, and combine the weight and bias parameters with the data input into the model to obtain the recognition result of the tearing mode.

[0011] An electronic device includes a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method.

[0012] A computer storage medium stores multiple instructions, and the instructions are adapted to be loaded and executed by a processor to execute the method.

[0013] As can be seen from the technical solution provided by the present invention above, the above method overcomes the problems in traditional programming recognition that it is difficult to distinguish the phase difference between signals and it is easy to be confused with other plasma operation modes, and realizes the fast and accurate recognition of the tearing mode. Description of the Drawings

[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0015] Figure 1 It is a schematic flow chart of the tearing mode recognition method based on a convolutional attention neural network provided by an embodiment of the present invention;

[0016] Figure 2 It is a schematic structural diagram of the convolutional neural network model described in an embodiment of the present invention;

[0017] Figure 3 It is a schematic diagram of the recognition result of 86,502 guns in the test set described in an embodiment of the present invention. Detailed Embodiments

[0018] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments, which do not constitute a limitation to the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present invention.

[0019] As Figure 1 shown, it is a schematic flow chart of the tearing mode recognition method based on a convolutional attention neural network provided by an embodiment of the present invention, and the method includes:

[0020] Step 1: Select the shots that produce tearing modes in the plasma during the experiment on the EAST (Experimental Advanced Superconducting Tokamak) device as the data set, and divide it into training set, test set and validation set according to the number of shots;

[0021] In this step, the EAST device is a fully superconducting tokamak nuclear fusion experimental device, using a fully superconducting magnet system that can achieve long-pulse steady-state operation. A "shot" is an experimental term, corresponding to the English word "shot," and refers to a complete plasma discharge experiment.

[0022] Specifically, 68 guns with tearing modes were selected as the data set. In order to avoid information leakage during training, the training set, test set, and validation set were separated according to the number of guns. 16 guns were used as the test set, and 6 guns were randomly selected from the remaining 52 guns as the validation set, and the remaining 46 guns were used as the training set.

[0023] For example, the data with tearing modes in the 61042th to 86559th discharge experiments on the EAST device, that is, 16 shots from 61042-86559 shots were designated as the test set, and 6 shots from 91364-103486 shots were randomly selected as the validation set for tuning parameters during the training process; the remaining 46 shots were used as the training set; the data set consists of a total of 11362×11×20002 samples, and the label indicates the presence (label 1) or absence (label 0) of the tearing mode;

[0024] The labels are derived from results confirmed by various experimental diagnostic systems, such as Mirnov probes, ECE diagnostics, and SXR diagnostics. These diagnostics also confirm the spectrum of tearing patterns; the labels in the dataset correspond to the presence or absence of tearing patterns. They are manually curated and carefully selected for each individual shot, and each label is determined through a thorough inspection of the experimental data, ensuring high accuracy.

[0025] Step 2: Using the electron temperature data as a characteristic signal, the electron temperature data from different locations in the plasma are converted into one dimension and split into segments of different time lengths. The data of each channel is then normalized and labeled.

[0026] In this step, 11 channels of 1 MHz electron temperature data (i.e., electron cyclotron emission (ECE) signals) covering the plasma boundary to the core are read from the EAST database of the fusion device under multiple discharge configurations as the original characteristic signals.

[0027] Noise reduction is performed on the original feature signal. By moving average noise reduction, the smoothing window k is selected to be 50, and data with high noise is smoothed to improve the training effect of the model. The formula is as follows:

[0028]

[0029] Formula (1) achieves noise reduction by taking the average of k points before and after position i: y i represents the output value at position i after noise reduction; x j represents the input value at position j in the original data; k represents the window radius, controlling the neighborhood range, and the total window width is 2k + 1;

[0030] Standardization is performed on the noise-reduced electronic temperature data to accelerate model training and improve performance, and eliminate the influence of different gun discharge parameters on recognition. Specifically, Z-score standardization is adopted, that is:

[0031]

[0032] In the Z-score standardization formula (2), z i represents the standardized value; x i is the original data point; μ is the mean of the data; σ is the standard deviation;

[0033] This formula converts the data into a distribution with a mean of 0 and a standard deviation of 1 by subtracting the mean and dividing by the standard deviation;

[0034] The input to the model is the Z-score standardized electronic temperature data, which is segmented into time slices of different lengths from 0.005s to 0.02s. The short time slices are padded with 0s to ensure that the matrix sizes are the same while not carrying information;

[0035] The data is processed for 3D storage. Specifically, the shape of the stored data is n * 12 * 20002. The first row stores the labels, and the remaining 11 rows are the electronic temperature data of 11 channels. n is the number of time segments formed by the slices. This data serves as the input layer data at the start of the convolutional neural network.

[0036] Step 3: Build a convolutional neural network model CNN-AM, including a convolutional layer and a global pooling layer, plus an attention mechanism. The final output layer consists of two neurons, which are used to output the recognition results of the tearing mode;

[0037] In this step, as Figure 2 shown is the structural schematic diagram of the convolutional neural network model described in the embodiment of the present invention. The built convolutional neural network contains a total of 36 layers of structure, where:

[0038] The first 32 layers are convolutional layers used for feature extraction. The convolutional layers are supported by batch normalization layers, maximum pooling layers, and dropout layers. Activation layers are used between convolutional layers. Figure 2 As shown, the activation layers are 16Conv1d, 16, 16BatchNorm1d, 16Conv1d, 16, 16BatchNorm1d, 2MaxPool1d, 0.3Dropout, 8Conv1d, 64, 64BatchNorm1d, 8Conv1d, 64, 64BatchNorm1d, 2MaxPool1d, 0.3Dropout, 4Conv1d, 128, 128BatchNorm1d, 4Conv1d, 128, 128BatchNorm1d, 2MaxPool1d, 0.3Dropout, 2Conv1d, 256, 256BatchNorm1d, 2Conv1d, 256, 256BatchNorm1d, 2MaxPool1d, 0.3Dropout;

[0039] The convolution layer uses one-dimensional convolution to extract local features of the data. The formula is as follows:

[0040]

[0041] xi is the i-th element of the input sequence; wj is the j-th weight of the convolution kernel; K is the size of the convolution kernel; b is the bias term; yi is the output result after multiplying the input by the weight and adding the bias;

[0042] After using one-dimensional convolution for feature extraction, the adaptive pooling layer AdaptiveAvgPool1d(2) is used for processing to compress the data volume;

[0043] The adaptive pooling layer is followed by the attention layer Dot-Product Attention, which is used to extract key information from the features. The calculation formula is as follows:

[0044] Attention(Q,K,V)=Softmax(QK T )V (4)

[0045] Where Q(Query) is the query matrix, which is used to match the target position; K(Key) is the key matrix, which is used to match the query; V(Value) is the value matrix, which is used to store the actual feature information; QK T Used to calculate the similarity between the query and the key; Softmax is normalized to the attention weight, and finally the weighted sum with V is used to obtain the context representation;

[0046] Finally, there are two fully connected layers, and the latter layer serves as the output layer. The output layer uses the Softmax function as the activation function to activate neurons to output the tearing pattern recognition results.

[0047] Step 4: Train the constructed convolutional neural network model to obtain all weight and bias parameters, combine the weight and bias parameters with the data of the input model, and obtain the recognition result of the tearing mold.

[0048] In this step, the process of training the built convolutional neural network model includes:

[0049] Cross entropy loss function: This function is one of the most commonly used loss functions in classification tasks. It is used to measure the difference between the predicted probability distribution and the true distribution. The binary cross entropy loss function used is defined as:

[0050]

[0051] Among them, y is the true label, which takes the value of 0 or 1; is the probability predicted by the model, ranging from 0 to 1; L is the calculated model prediction error;

[0052] Optimizer: Adopts the Adam optimizer, using momentum estimation of first-order gradients and RMS estimation of second-order gradients to accelerate convergence and reduce oscillations. In the early training stage, bias correction is performed on momentum estimation and RMS estimation to make the estimation more accurate.

[0053] In the tth iteration, g t is the binary cross entropy loss function with respect to the parameter θ t-1 The gradient of , where:

[0054] First moment estimate: m t =β1m t-1 +(1-β1) g t;

[0055] Second moment estimate:

[0056] Deviation correction:

[0057] Parameter update:

[0058] Among them, β1 controls the decay rate of the first-order moment (momentum) and affects the degree of retention of historical gradients; m t is the first-order exponential moving average of the gradient; β2 controls the decay rate of the second-order moment (square gradient), affecting the smoothness of the adaptive learning rate; v tis the second-order exponential moving average of the squared gradient; η is the global learning rate, which determines the step size of parameter update; ε is a numerical stability term to prevent division-by-zero errors; θ t are the model parameters after the t-th step update;

[0059] Learning rate scheduler: Set the initial learning rate to 0.0005. To train the best model, set the learning rate decay mechanism. In 10 consecutive training rounds, if the loss function does not decrease, reduce the learning rate to 10% of the original value and continue training;

[0060] Early stopping mechanism: If the loss function of the model still does not decrease after reducing the learning rate, trigger early stopping and terminate the training; among them, set the maximum number of training rounds to 100. If the loss function does not decrease in 20 consecutive training rounds, it is considered that the model has been trained to the best state, and the training is terminated in advance to avoid wasting computing resources due to excessive training rounds and overfitting of the model caused by too many training rounds;

[0061] In the training stage, the convolutional neural network model receives the data after noise reduction and normalization. In each round of training, the model with the smallest loss function and the highest accuracy is saved as the best model. When early stopping is triggered or the training reaches the maximum number of rounds, the saved best model will be output. After inputting the data, this best model can automatically determine whether there is a tearing mode and obtain the recognition result of the tearing mode.

[0062] In specific implementation, the method further includes:

[0063] Optimize the convolutional neural network model. After training, the model can output the prediction probability of the recognition result. Optimize the decision threshold of the recognition result on the test set according to the accuracy to improve the accuracy of the model; among them, the decision threshold is the critical value that divides the prediction probability into positive or negative classes in the classification model. By adjusting the decision threshold, the sensitivity and specificity of the model can be balanced. In the original setting, 0.5 is used by default for decision classification, which can be modified through code.

[0064] For example, first evaluate the accuracy of the model. After 100 rounds of training, the accuracy of the model in the present invention reaches 91.94%, the recall (the proportion of positive example samples correctly recognized by the model among all real positive example samples) reaches 91.94%, and the F1 (the harmonic mean of accuracy and recall) reaches 94.05%;

[0065] As Figure 3 shown is the schematic diagram of the recognition result of the 86502 guns in the test set described in the embodiment of the present invention, Figure 3(a) is the probability of the model identifying the presence of a tearing mode. The triangular points are the parts where the probability of the tearing mode is less than 0.02, the circular points are the parts where the probability of the tearing mode is greater than 0.98, and the rest are square points. The horizontal line area above is the time period for verifying the presence of the tearing mode; Figure 3 (b) is the ECE spectrum corresponding to the core. The tearing mode characteristics can be clearly seen. It can be seen that at the time when the rotation characteristics of the tearing mode magnetic island are obvious, the model described in the embodiment of the present invention accurately identifies the presence of the tearing mode.

[0066] From Figure 3 (a), it can be seen that the prediction probability of the convolutional neural network model reaches stable recognition in the time region from 6.5 s to 8.5 s. This corresponds to the phase when the tearing mode develops a stable and wide enough magnetic island, making the reversal surface and related signal characteristics more obvious and the model easier to identify. To optimize the model, by setting a decision threshold of 0.217, the accuracy of the final model on the test set reaches 92.41%, an increase of 0.46%.

[0067] It should be noted that the content not described in detail in the embodiments of the present invention belongs to the prior art well-known to those skilled in the art.

[0068] The embodiment of the present invention also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method.

[0069] The embodiment of the present invention also provides a computer storage medium. The computer storage medium stores multiple instructions, and the instructions are suitable for being loaded and executed by the processor to execute the method.

[0070] In summary, the method described in the embodiment of the present invention has the following advantages:

[0071] (1) The present invention overcomes the problem in traditional programming recognition that it is difficult to distinguish the phase difference between signals, and it is necessary to judge by the oscillation amplitude of ECE or SRX signals, which is easily confused with other plasma operation modes. This is solved by the multi-layer non-linear mapping of the neural network, achieving accurate identification of the tearing mode;

[0072] (2) The present invention uses a small amount of data. Only the data measured by ECE in the tokamak is used. After simple preprocessing of the data, the neural network model can be used for judgment, simplifying the required process for identification and avoiding the problem that multiple diagnostic signals need to be repeatedly confirmed to identify the tearing mode in traditional means;

[0073] (3) The present invention can customize the usage scenario according to the user's usage requirements. The model is tested with data used for a minimum of 5 ms. After the formation of the tearing die, the model can be used for judgment in a very short time. Moreover, the model has a fast response and can monitor in real time the presence of the reaction tearing mode. It can also be used for establishing a database of tearing dies and become an effective tool for establishing a big data model.

[0074] In addition, those of ordinary skill in the art can understand that all or part of the steps in implementing the above-described embodiment methods can be completed by instructing relevant hardware through a program, and the corresponding program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disk, or the like.

[0075] As described above, the above are only the preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims. The information disclosed in the background art part of this article is only intended to deepen the understanding of the overall background art of the present invention, and should not be regarded as an admission or any form of suggestion that this information constitutes the prior art already known to those skilled in the art.

Claims

1. A tearing mode recognition method based on a convolutional attention neural network, characterized in that, The method includes the following steps: Step 1: Select the shot numbers that generate tearing modes in the plasma during experiments on the Experimental Advanced Superconducting Tokamak (EAST) device as the dataset, and divide the training set, test set, and validation set according to different shot numbers; Step 2: Use the electron temperature data as the feature signal. One-dimensionalize the electron temperature data from different positions of the plasma and split them into segments of different time lengths. Then, standardize the data of each channel and label them; Step 3: Build a convolutional neural network model CNN-AM, including a convolutional layer and a global pooling layer, with an additional attention mechanism. The final output layer consists of two neurons, which are used to output the recognition results of tearing modes; Step 4: Train the built convolutional neural network model to obtain all weight and bias parameters. Combine the weight and bias parameters with the data input into the model to obtain the recognition results of tearing modes.

2. The tearing mode recognition method based on a convolutional attention neural network according to claim 1, characterized in that In Step 1, specifically, select the shot numbers of 68 shots with tearing modes as the dataset. Separate the training set, test set, and validation set according to different shot numbers. Use 16 shots as the test set, randomly select 6 shots from the remaining 52 shots as the validation set, and the remaining 46 shots as the training set.

3. The tearing mode recognition method based on a convolutional attention neural network according to claim 1, characterized in that In Step 2, from the EAST database of the fusion device, read the electron temperature data of 11 channels at 1 mHz covering the plasma boundary to the core under multiple discharge configurations as the original feature signal; Perform noise reduction processing on the original feature signal. Use moving average to reduce noise. Select the smoothing window k as 50 to smooth the data with high noise, which improves the training effect of the model. The formula is as follows: Formula (1) realizes noise reduction by taking the average of k points before and after position i: y i represents the output value at position i after noise reduction; x j represents the input value at position j in the original data; k represents the window radius, controlling the neighborhood range, and the total window width is 2k + 1; Perform standardization processing on the noise-reduced electron temperature data to accelerate model training and improve performance, and eliminate the influence of discharge parameters of different shots on recognition. Specifically, use Z-score standardization, that is: In the Z-score normalization formula (2), z i represents the value after normalization; x i is the original data point; μ is the mean of the data; σ is the standard deviation; This formula converts the data into a distribution with a mean of 0 and a standard deviation of 1 by subtracting the mean and dividing by the standard deviation; The input to the model is the electron temperature data after Z-score standardization, which is segmented into time slices of different lengths from 0.005 s to 0.02 s. The short-time slices are filled with 0 to ensure that the matrix size is the same while not carrying information; Process the data into 3D storage. Specifically, the shape of the stored data is n * 12 * 20002. The first row stores the labels, and the remaining 11 rows are the electron temperature data of 11 channels. n is the number of time segments formed by the slices. This data serves as the input layer data at the beginning of the convolutional neural network.

4. The tearing mode recognition method based on a convolutional attention neural network according to claim 1, characterized in that In Step 3, the built convolutional neural network has a total of 36 layers of structure, among which: The first 32 layers are convolutional layer structures for feature extraction. The convolutional layers are accompanied by batch normalization layers, max pooling layers, and Dropout layers. Activation layers are used between convolutional layers. One-dimensional convolution is used in the convolutional layers to extract local features of the data. The formula is as follows: xi is the i-th element of the input sequence; wj is the j-th weight of the convolutional kernel; K is the size of the convolutional kernel; b is the bias term; yi is the output result after multiplying the input by the weight and adding the bias; After using one-dimensional convolution for feature extraction, use the AdaptiveAvgPool1d layer for processing to compress the data volume; After the adaptive pooling layer is the attention layer Dot-Product Attention, which is used to extract key information in the features. The calculation formula is as follows: Attention(O, K, V) = Softmax(QK T )V (4) Among them, Q is the query matrix for matching the target position; K is the key matrix for being queried and matched; V is the value matrix for storing actual feature information; QK T is used to calculate the similarity between the query and the key; Softmax normalizes to the attention weights, and finally weighted summation with V is performed to obtain the context representation; Finally, there is a two-layer fully connected layer. The latter layer serves as the output layer, and the output layer uses the Softmax function as the activation function to activate neurons to output the tearing mode recognition result.

5. The tearing mode recognition method based on a convolutional attention neural network according to claim 1, characterized in that In the process of training the constructed convolutional neural network model in step 4, it includes: Cross-entropy loss function: It is used to measure the difference between the predicted probability distribution and the true distribution. The binary cross-entropy loss function used is defined as: where y is the true label, taking values 0 or 1; is the probability predicted by the model, taking values between 0 and 1; L is the calculated prediction error of the model; Optimizer: The Adam optimizer is adopted, which uses the first-order gradient momentum estimation and the second-order gradient RMS estimation, and can accelerate convergence and reduce oscillations; At the t-th iteration, g t is the gradient of the binary cross-entropy loss function with respect to the parameter θ t-1 where: First moment estimate: m t = β1m t-1 + (1 - β1)g t ; Second moment estimation: Deviation correction: Parameter update: Among them, β1 is the decay rate for controlling the first moment, which affects the degree of retention of historical gradients; m t is the first-order exponential moving average of the gradients; β2 is the decay rate for controlling the second moment, which affects the smoothness of the adaptive learning rate; v t is the second-order exponential moving average of the squared gradients; η is the global learning rate, which determines the step size of parameter updates; ε is a numerical stability term to prevent division-by-zero errors; θ t are the model parameters after the t-th update; Learning rate scheduler: The initial learning rate is set to 0.0005. In order to train the best model, a learning rate decay mechanism is set. If the loss function does not decrease in 10 consecutive training rounds, the learning rate will be reduced to 10% of the original value and continue training; Early stopping mechanism: If the loss function of the model still does not decrease after reducing the learning rate, early stopping is triggered to terminate the training; among them, the maximum number of training rounds is set to 100. If the loss function does not decrease in 20 consecutive training rounds, it is considered that the model has been trained to the best state and the training is terminated in advance; In the training stage, the convolutional neural network model receives the data after denoising and normalization processing. In each round of training, the model with the smallest loss function and the highest accuracy is saved as the best model. When early stopping is triggered or the training reaches the maximum number of rounds, the saved best model will be output. After the input data, this best model can automatically determine whether the tearing mode exists and obtain the recognition result of the tearing mode.

6. The tearing mode recognition method based on a convolutional attention neural network according to claim 1, characterized in that The method further includes: Optimizing the convolutional neural network model. After training, the model can output the accuracy of the recognition result. According to the accuracy, the decision threshold for optimizing the recognition result on the test set is adjusted to improve the accuracy of the model; Among them, the decision threshold is the critical value that divides the predicted probability into positive or negative classes in the classification model. By adjusting the decision threshold, the sensitivity and specificity of the model can be balanced.

7. An electronic device, comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is set to run the computer program to execute the method according to any one of claims 1 to 6.

8. A computer storage medium, characterized in that, The computer storage medium stores multiple instructions, and the instructions are suitable for being loaded and executed by the processor to execute the method according to any one of claims 1 to 6.