Acoustic emission signal classification method, system, device and medium based on contrast learning

By constructing tuple samples and employing a hierarchical tuple contrast loss function, the constraint strength of the loss function is dynamically adjusted, thus solving the problems of sample imbalance and insufficient class discrimination in acoustic emission signal classification and improving the accuracy and generalization ability of acoustic emission signal classification.

CN121234165BActive Publication Date: 2026-02-13INSPUR ENTERPRISE CLOUD TECHNOLOGY (SHANDONG) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511795657.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-02-13
Estimated Expiration
2045-12-02

AI Technical Summary

Technical Problem

In existing technologies, acoustic emission signal classification methods based on deep learning suffer from sample imbalance, resulting in low recognition accuracy of minority class samples. Furthermore, the traditional triplet construction method of contrastive learning cannot fully constrain the ability of deep learning models to distinguish features from multiple classes, and the loss function has a single constraint, making it difficult to improve classification accuracy and generalization ability.

Method used

We construct tuple samples, enhance minority class samples through physical perturbation, and use a hierarchical tuple contrastive loss function to dynamically adjust the constraint strength of the loss function. We also combine cosine similarity to calculate the distance between the anchor point and the contrast sample, thereby optimizing the feature extraction and classification of the deep learning model.

Benefits of technology

This study improved the accuracy and generalization ability of acoustic emission signal classification, solved the problems of sample imbalance and insufficient class discrimination, and enhanced the classification accuracy and generalization performance of deep learning models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121234165B_ABST
    Figure CN121234165B_ABST
Patent Text Reader

Abstract

The application discloses a contrast learning-based acoustic emission signal classification method, system, device and medium, and belongs to the technical field of deep learning and signal processing. The technical problem to be solved by the application is how to improve the precision and generalization ability of acoustic emission signal classification. The technical scheme adopted is as follows: constructing a multivariate group sample: collecting original acoustic emission signals with grade labels and preprocessing the collected original acoustic emission signals with grade labels to obtain a feature vector, and setting a sample quantity threshold value, and performing physical reasonable disturbance enhancement on minority class samples with a sample quantity lower than the set threshold value; and regarding each sample as an anchor point, and constructing 1+N multivariate group samples covering all classes for each anchor point; wherein N is the total number of classes obtained according to the grade labels; hierarchical multivariate group contrast loss calculation: performing feature extraction on the multivariate group samples through a deep learning model to obtain a feature embedding vector; and deep learning model training and classification.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of deep learning and signal processing, in particular to a contrast learning-based acoustic emission signal classification method, system, device and medium. BACKGROUND

[0002] Acoustic emission signal is the stress wave signal released by material or structure in the process of stress deformation and damage evolution, and its characteristic analysis is one of the key technologies of structural health monitoring. The acoustic emission signal classification method based on deep learning relies on a large number of labeled samples to train a deep learning model, but in actual application, there is often a sample imbalance problem, which leads to low recognition accuracy of the deep learning model for minority class samples.

[0003] Contrast learning constructs similar sample pairs (positive samples) and dissimilar sample pairs (negative samples) to guide the deep learning model to learn a discriminative feature representation, and has been applied to the limited sample scenario. Traditional contrast learning adopts a three-tuple (anchor, 1 positive sample, 1 negative sample) construction method, which has the following shortcomings:

[0004] ① The sample pair is not comprehensive: only a single negative sample is selected, without considering the difference degree between different categories, which cannot comprehensively constrain the discriminative ability of the deep learning model for multi-category features, resulting in limited generalization performance;

[0005] ② The loss function constraint is single: a fixed interval distance is used, without dynamically adjusting the constraint strength combined with the actual difference between categories, which either under-constrains similar categories or over-constrains different categories, making it difficult to break through the classification accuracy.

[0006] Therefore, how to improve the accuracy and generalization ability of acoustic emission signal classification is a technical problem to be solved at present. SUMMARY

[0007] The technical task of the present application is to provide a contrast learning-based acoustic emission signal classification method, system, device and medium to solve the problem of how to improve the accuracy and generalization ability of acoustic emission signal classification.

[0008] The technical task of the present application is achieved in the following manner: a contrast learning-based acoustic emission signal classification method, which is as follows:

[0009] Constructing a multi-tuple sample: collecting original acoustic emission signals with level labels and preprocessing the collected original acoustic emission signals with level labels to obtain a feature vector, while setting a sample number threshold to enhance the minority class samples with a sample number lower than the set threshold; and regarding each sample as an anchor point, constructing a 1+N multi-tuple sample covering all categories for each anchor point; wherein N is the total number of categories obtained according to the level label;

[0010] Hierarchical multi-group contrast loss calculation: feature extraction of multi-group samples is performed by a deep learning model to obtain a feature embedding vector, and the cosine distance between the anchor point and each contrast sample is calculated based on the cosine similarity, the hierarchical interval is dynamically set according to the category difference, and then the loss value is calculated according to the preset logic;

[0011] Deep learning model training and classification: the hierarchical multi-group contrast loss function is used as the optimization target to train the deep learning model, the feature embedding vector of the to-be-classified acoustic emission signal is extracted by the trained deep learning model, and the cosine distance is calculated with the pre-generated support set feature embedding vector, and the class with the smallest average cosine distance is determined as the classification result.

[0012] As preferred, the multi-group sample is constructed as follows:

[0013] Data preprocessing: original acoustic emission signals with grade labels are collected, and the collected original acoustic emission signals with grade labels are converted into fixed-length feature vectors through the Pytorch framework; the dimension of the feature vector is determined according to the time domain and frequency domain feature extraction results of the acoustic emission signal;

[0014] Minority class sample enhancement: random disturbance within ±5% range is applied to each dimension of the feature vector to ensure that the enhanced sample retains the physical characteristics and loss signal of the original acoustic emission signal, and avoid the introduction of invalid noise; at the same time, consistency constraint is applied to the feature disturbance, that is, the feature direction offset of each dimension is consistent, and the maximum disturbance change deviation of two dimensions does not exceed 10%, the feature consistency constraint and the random disturbance form double constraints, which not only ensure the sample diversity, but also force to retain the damage characteristics and physical logic of the original acoustic emission signal;

[0015] Multi-group sampling: one contrast sample is randomly sampled from all categories according to the original acoustic emission signal label to form a 1+N multi-group of one anchor sample plus N contrast samples; wherein, when sampling from the category to which the anchor point belongs, the anchor sample itself is excluded to avoid the influence of repeated samples on the contrast effect.

[0016] As preferred, the hierarchical multi-group contrast loss calculation is as follows:

[0017] Feature embedding: feature extraction of multi-group samples is performed by a deep learning model to obtain a feature embedding vector X of each anchor sample;

[0018] Cosine distance calculation: the cosine distance between the anchor sample and each contrast sample is calculated based on the cosine similarity, and the formula is:

[0019] wherein, represents the distance between the anchor sample and each contrast sample in the cosine space, and the calculated cosine distance ranges from 0 to 1.​ a feature embedding vector representing the anchor sample; a feature embedding vector representing the kth contrast sample; k a feature embedding vector representing the kth contrast sample;

[0020] Dynamic hierarchical interval setting: quantitatively represent the category difference between the anchor sample and the contrast sample, that is, based on the characteristic that the inter-category difference is in an increasing distribution, the category difference is quantified by the absolute value difference |k-y| of the category numbers to which the two belong, and then according to the quantified category difference, the constraint interval is dynamically adjusted according to the preset basic interval value m sim (the basic interval is a hyperparameter, and an example is three categories, which is set to 0.2 according to artificial experience), and the constraint interval is dynamically adjusted The formula is as follows:

[0021] , ;

[0022] wherein k represents the category of the contrast sample; y represents the category of the anchor sample;

[0023] Loss calculation: make the cosine distance between the anchor and the same category sample as low as possible, and the cosine distance between the anchor and the different category sample as high as possible (the degree depends on the category difference); take the similarity between the anchor sample and the same category sample as the "benchmark" to constrain the cosine distance between the anchor sample and the different category sample to be greater than the constraint interval , for the sample with a preset basic interval of and a label of y , the loss function formula is as follows:

[0024] ;

[0025] ;

[0026] wherein N represents the total number of categories of the acoustic emission signal, and the inter-category difference is in an increasing distribution (that is, the distance between the 3rd category and the 1st category is greater than the distance between the 2nd category and the 1st category), and respectively represent the cosine distance between the anchor sample and the same category sample, and the cosine distance between the anchor sample and the different category sample; represents the constraint interval between the anchor sample and the kth category sample.

[0027] More preferably, a deep learning model is used to extract features from multiple sets of samples to obtain a feature embedding vector X of each anchor sample, which is specifically as follows:

[0028] An anchor sample-full category contrast sample collaborative extraction method is adopted, and a multiple set input of 1 anchor + N full category samples is processed in parallel;

[0029] In the feature extraction process by the feature extraction layer, a class global correlation matrix is introduced to synchronously capture the relative difference features of the anchor sample and each class comparison sample, instead of only focusing on the isolated features of a single sample.

[0030] After embedding the vector by the feature final embedding layer, the cosine space is optimized for distribution, and all sample embeddings are ensured to be in the cosine space by L2 normalization, and the class difference degree is accurately reflected by the cosine distance.

[0031] More preferably, the feature extraction layer extracts high-order features layer by layer through two linear transformations of linear layer one and linear layer two; both linear layer one and linear layer two have a Relu activation function.

[0032] The feature final embedding layer generates the final embedding vector through a third linear transformation.

[0033] As preferred, the deep learning model training and classification are as follows:

[0034] Taking the hierarchical multi-element set comparison loss function as the optimization objective, using multi-element set samples as the input of the deep learning model, the deep learning model is trained for multiple rounds, and the deep learning model weights are continuously updated through the back propagation algorithm;

[0035] After the deep learning model is trained, the support set (at least one acoustic emission data of each class) is obtained by randomly sampling each class of acoustic emission data in the training data, and the feature embedding of the support set is extracted using the trained deep learning model as the reference benchmark for classification;

[0036] For the acoustic emission signal to be classified, the feature embedding of the acoustic emission signal to be classified is extracted using the trained deep learning model, and the cosine distance between the feature embedding of the acoustic emission signal to be classified and the feature embedding of each class of the support set is calculated. The lower the cosine distance value, the closer the acoustic emission signal to be classified and the corresponding class data of the support set in the cosine space; finally, the cosine distances of all classes are compared, and the class with the smallest cosine distance is determined as the classification result of the new acoustic emission signal, as follows:

[0037] ;

[0038] wherein, represents the feature embedding of the acoustic emission signal to be classified; represents the pre-generated support set feature embedding, which contains all classes corresponding to the training phase; represents the feature embedding corresponding to the i-th class.

[0039] More preferably, the hierarchical multi-group contrast loss function is used as the optimization objective, the multi-group sample is used as the input of the deep learning model, the deep learning model is trained for multiple rounds, and the weights of the deep learning model are continuously updated through the back propagation algorithm as follows:

[0040] Forward propagation: input the multi-group training data, calculate through the network layer of the deep learning model according to the current weight parameters, and finally output the feature weight;

[0041] Loss calculation: quantize the prediction error, and calculate the loss value through the loss function;

[0042] Back propagation: solve the gradient direction, based on the loss value, deduce reversely through the chain rule, calculate the partial derivative of each weight parameter of the loss function, that is, the gradient;

[0043] Weight update: update the weights of the deep learning model according to the gradient direction through the gradient descent;

[0044] Iterative optimization: repeat the process of “forward propagation - loss calculation - back propagation - weight update” until the training is completed; wherein the number of cycles is determined according to the preset training period.

[0045] A contrast learning-based acoustic emission signal classification system, which is used to implement the contrast learning-based acoustic emission signal classification method as described above; the system comprises:

[0046] A multi-group sample construction module for collecting original acoustic emission signals with level labels and preprocessing the collected original acoustic emission signals with level labels to obtain feature vectors, while setting a sample quantity threshold and physically disturbing and enhancing the minority class samples with a sample quantity lower than the set threshold; and regarding each sample as an anchor point, constructing 1+N multi-group samples covering all classes for each anchor point; wherein N is the total number of classes obtained according to the level labels;

[0047] A contrast loss calculation module for extracting features from the multi-group samples through a deep learning model, obtaining feature embedding vectors, calculating the cosine distance between the anchor point and each contrast sample based on the cosine similarity, dynamically setting the hierarchical interval according to the class difference, and then calculating the loss value according to the preset logic;

[0048] A model training and classification module for training a deep learning model with a hierarchical multi-group contrast loss function as the optimization objective, extracting the feature embedding vectors of the acoustic emission signals to be classified through the trained deep learning model, and calculating the cosine distance with the pre-generated support set feature embedding vectors, and determining the class with the smallest average cosine distance as the classification result.

[0049] An electronic device comprising a memory and at least one processor;

[0050] The computer program is stored on the memory.

[0051] The at least one processor executes the computer program stored in the memory, so that the at least one processor executes the contrast learning-based acoustic emission signal classification method as described above.

[0052] A computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program can be executed by a processor to implement the contrast learning-based acoustic emission signal classification method as described above.

[0053] The contrast learning-based acoustic emission signal classification method, system, device and medium of the application have the following advantages:

[0054] (I) For the core pain points of sample imbalance and insufficient class distinction in acoustic emission signal classification, the application innovatively proposes a three-in-one technical solution of "full-class multi-group construction + physical constraint sample enhancement + dynamic hierarchical loss constraint": abandoning the traditional direct regression class label idea, ensuring comprehensive contrast through multi-group sampling covering all classes, alleviating sample imbalance through physically reasonable minority class disturbance enhancement, and guiding the deep learning model to learn strong distinguishing features through hierarchical dynamic contrast loss function, so that the feature distributions of different classes are efficiently separated, and finally the breakthrough improvement of acoustic emission signal classification precision and generalization performance is realized;

[0055] (II) The application realizes an innovative contrast learning method of covering all-class contrast samples, performing physical property reservation enhancement for minority classes, and dynamically adjusting the constraint strength based on class differences, to solve the existing technical bottlenecks and improve the precision and generalization ability of acoustic emission signal classification. At the same time, the application focuses on sample construction, enhancement strategy and loss function optimization of contrast learning in acoustic emission signal classification, and is suitable for structural health monitoring scenarios with sample scarcity and multiple classes;

[0056] (III) The application breaks through the limitations of traditional triple sampling, realizes full-class contrast sample coverage, solves the problem of scarcity of minority class samples, and preserves signal physical features and damage information; and establishes a dynamic loss constraint mechanism adapted to class differences, strengthens class distinction, and finally improves the classification precision and generalization performance of the deep learning model;

[0057] (IV) The application is based on a pre-processed acoustic emission signal dataset, breaks the traditional triple sampling mode, constructs a multi-group sample set covering all classes and considering minority class enhancement, and provides comprehensive and high-quality training data for contrast learning;

[0058] (v) The tuple samples of the present invention cover all categories, ensuring that the deep learning model learns the distinguishing features between all categories and avoids the insufficient generalization ability caused by the one-sidedness of traditional triple samples;

[0059] (vi) The present invention employs a ±5% physical perturbation enhancement strategy for minority class samples, which expands the sample size while preserving the physical characteristics of the signal and alleviates the sample imbalance problem;

[0060] (vii) The present invention uses a hierarchical interval loss function to dynamically adjust the constraint strength according to the category difference, so that the deep learning model can strengthen the distinction of similar categories and reasonably constrain the different categories, thereby improving the classification accuracy. Attached Figure Description

[0061] The invention will be further described below with reference to the accompanying drawings.

[0062] Appendix Figure 1 This is a flowchart illustrating a contrastive learning-based acoustic emission signal classification method.

[0063] Appendix Figure 2 This is a schematic diagram of the network structure of a deep learning model;

[0064] Appendix Figure 3 A visual illustration comparing the category distribution of PCA feature dimensionality reduction in traditional classification and plural group contrastive learning. Detailed Implementation

[0065] The following detailed description of the acoustic emission signal classification method, system, device, and medium based on contrastive learning of the present invention, with reference to the accompanying drawings and specific embodiments, is provided.

[0066] Example 1:

[0067] As attached Figure 1 As shown in the figure, this embodiment provides a method for classifying acoustic emission signals based on contrastive learning, and the method is as follows:

[0068] S1. Constructing multi-group samples: Collect raw acoustic emission signals with grade labels and preprocess the collected raw acoustic emission signals with grade labels to obtain feature vectors. At the same time, set a sample number threshold and perform physical perturbation enhancement on minority class samples with a sample number below the set threshold. Treat each sample as an anchor point and construct 1+N multi-group samples covering all categories for each anchor point. Where N is the total number of categories obtained according to the grade labels.

[0069] S2. Hierarchical tuple contrast loss calculation: Features are extracted from tuple samples using a deep learning model to obtain feature embedding vectors. The cosine distance between the anchor point and each contrast sample is calculated based on cosine similarity. The hierarchical interval is dynamically set according to the category difference, and then the loss value is calculated according to the preset logic.

[0070] S3. Deep learning model training and classification: The deep learning model is trained with the hierarchical tuple contrastive loss function as the optimization objective. The feature embedding vector of the acoustic emission signal to be classified is extracted through the trained deep learning model, and the cosine distance is calculated with the feature embedding vector of the pre-generated support set. The class with the smallest average cosine distance is determined as the classification result.

[0071] The specific steps for constructing the tuple samples in step S1 of this embodiment are as follows:

[0072] S101. Data preprocessing: Acquire raw acoustic emission signals with grade labels, and convert the acquired raw acoustic emission signals with grade labels into fixed-length feature vectors using the PyTorch framework; the dimension of the feature vectors is determined based on the time-domain and frequency-domain feature extraction results of the acoustic emission signals.

[0073] S102. Minority class sample augmentation: Apply random perturbation within ±5% to each dimension of the feature vector to ensure that the augmented sample retains the physical characteristics and loss signal of the original acoustic emission signal and avoids the introduction of invalid noise; at the same time, apply feature perturbation consistency constraint, that is, the feature direction offset of each dimension is consistent, and the maximum perturbation change deviation between the two dimensions does not exceed 10%. The feature consistency constraint and random perturbation form a double constraint, which not only ensures sample diversity, but also forces the preservation of the damage characteristics and physical logic of the original acoustic emission signal.

[0074] S103. Multivariate sampling: Based on the original acoustic emission signal label, one comparison sample is randomly sampled from each of all categories to form a 1+N multivariate consisting of one anchor sample and N comparison samples; when sampling from the category to which the anchor belongs, the anchor sample itself is excluded to avoid duplicate samples affecting the comparison effect.

[0075] The hierarchical tuple contrast loss calculation in step S2 of this embodiment is as follows:

[0076] S201, Feature Embedding: Extract features from tuple samples using a deep learning model to obtain the feature embedding vector X for each anchor sample;

[0077] S202, Cosine Distance Calculation: Based on cosine similarity, the cosine distance between the anchor sample and each comparison sample is measured. The formula is: ;

[0078] in, This represents the distance between the anchor sample and each comparison sample in the cosine space. The calculated cosine distance ranges from [0,1]. This represents the feature embedding vector of the anchor sample; Indicates the first k Feature embedding vectors of each comparison sample;

[0079] S203, dynamically set the inter-class interval: quantify the category difference between the anchor sample and the contrast sample, that is, based on the characteristic that the category difference is in an increasing distribution, the category difference is quantified by the absolute value difference |k-y| of the category numbers to which the two belong, and then according to the quantified category difference, the constraint interval is dynamically adjusted according to the preset basic interval value m sim (the basic interval is a hyperparameter, and an example is three categories, which is set to 0.2 according to artificial experience), and the constraint interval is dynamically adjusted The formula is as follows:

[0080] , ;

[0081] wherein k represents the category of the contrast sample; y represents the category of the anchor sample;

[0082] Finally, the constraint strength and the category difference are accurately matched to ensure that a moderate constraint is applied to samples with small category differences (to avoid excessive differentiation leading to feature distortion), and a strengthened constraint is applied to samples with large category differences (to avoid insufficient constraint leading to high similarity between categories), thereby solving the problem of “excessive constraint” or “insufficient constraint” in the traditional fixed interval mode;

[0083] S204, loss calculation: make the cosine distance between the anchor and the same category sample as low as possible, and the cosine distance between the anchor and the different category sample as high as possible (the degree depends on the category difference); take the similarity between the anchor sample and the same category sample as the “benchmark” to constrain the cosine distance between the anchor sample and the different category sample to be greater than the constraint interval For a sample with a preset basic interval of and a label of y , the loss function formula is as follows:

[0084] ;

[0085] ;

[0086] wherein N represents the total number of categories of the acoustic emission signal, and the category difference is in an increasing distribution (that is, the distance between the 3rd category and the 1st category is greater than the distance between the 2nd category and the 1st category), and respectively represent the cosine distance between the anchor sample and the same category sample and the different category sample; represents the constraint interval between the anchor sample and the kth category sample.

[0087] As shown in the accompanying Figure 2 , the feature extraction of the multi-element sample by the deep learning model in step S201 of the embodiment is specifically as follows:

[0088] S20101, using anchor sample-full category contrast sample collaborative extraction mode, parallel processing 1 anchor + N full category sample multivariate group input;

[0089] S20102, during the feature extraction process by the feature extraction layer, introduce the category global correlation matrix, synchronously capture the relative difference features of the anchor sample and each category contrast sample, rather than only focusing on the isolated features of a single sample;

[0090] S20103, after embedding the vector by the feature final embedding layer, cosine space optimization distribution is adopted, and L2 normalization is used to ensure that all samples are embedded in the cosine space, and the cosine distance is used to accurately reflect the category difference degree.

[0091] The feature extraction layer in this embodiment extracts high-order features layer by layer through linear layer one and linear layer two; linear layer one and linear layer two both have Relu activation function;

[0092] The feature final embedding layer generates the final embedding vector through the third linear transformation.

[0093] The deep learning model training and classification in step S3 of this embodiment are as follows:

[0094] S301, using a hierarchical multivariate group contrast loss function as the optimization target, using multivariate group samples as the input of the deep learning model, training the deep learning model for multiple rounds, and continuously updating the weights of the deep learning model through the back propagation algorithm;

[0095] S302, after the deep learning model is trained, randomly sample each type of acoustic emission data in the training data to obtain a support set (at least one acoustic emission data of each type), and use the trained deep learning model to extract the feature embedding of the support set as the reference benchmark for classification;

[0096] S303, for the acoustic emission signal to be classified, first use the trained deep learning model to extract the feature embedding of the acoustic emission signal to be classified, then calculate the cosine distance between the feature embedding of the acoustic emission signal to be classified and the feature embedding of each category of the support set, the lower the cosine distance value, the closer the acoustic emission signal to be classified and the corresponding category data of the support set in the cosine space; finally, compare the cosine distances of all categories, and determine the category with the smallest cosine distance as the classification result of the new acoustic emission signal, the formula is as follows:

[0097] ;

[0098] Wherein, represents the feature embedding of the acoustic emission signal to be classified; This represents the pre-generated support set feature embedding, which contains all categories corresponding to the training phase. The feature embedding corresponding to the i-th category.

[0099] In this embodiment, step S301 uses a hierarchical tuple contrastive loss function as the optimization objective, uses tuple samples as input to the deep learning model, performs multiple rounds of training on the deep learning model, and continuously updates the weights of the deep learning model through the backpropagation algorithm, as detailed below:

[0100] S30101, Forward Propagation: Input tuple training data, calculate the feature weights through the network layers of the deep learning model according to the current weight parameters, and finally output the feature weights;

[0101] S30102. Calculate the loss: Quantify the prediction error and calculate the loss value through the loss function;

[0102] S30103, Backpropagation: Solving for the gradient direction, based on the loss value, and deriving it backwards using the chain rule, calculating the partial derivative of the loss function with respect to each weight parameter, i.e., the gradient;

[0103] S30104, Weight Update: Update the weights of the deep learning model using gradient descent based on the gradient direction;

[0104] S30105. Iterative optimization: Repeat the process of "forward propagation - loss calculation - back propagation - weight update" until training is complete; the number of loops is determined according to the preset number of training cycles.

[0105] As attached Figure 3 As shown, in the PCA feature dimensionality reduction distribution of this embodiment, the separation degree of different categories of features is significantly better than that of traditional classification methods; the computational resources are shown in Table 1, and the quantitative index comparison is shown in Table 2.

[0106] Table 1 Computational Resources Table

[0107] CPU Memory GPU Video memory Computing resources Intel(R) Xeon(R) Gold 6256 CPU @ 3.60GHz 128GB Nvidia GeForce RTX 4080 16GB

[0108] Table 2 Comparison of Quantitative Indicators

[0109] Traditional classification The training method of the present invention Classification accuracy 71.4% 85.7%

[0110] Example 2:

[0111] This embodiment provides a contrastive learning-based acoustic emission signal classification system, which is used to implement the contrastive learning-based acoustic emission signal classification method as described in Embodiment 1; the system includes:

[0112] A multi-group sample construction module is configured to collect original acoustic emission signals with grade labels, pre-process the collected original acoustic emission signals with grade labels, obtain a feature vector, set a sample quantity threshold, and perform physical disturbance enhancement on a minority class sample with a sample quantity lower than the set threshold; and each sample is regarded as an anchor point, and 1+N multi-group samples covering all classes are constructed for each anchor point, where N is the total number of classes obtained according to the grade labels.

[0113] A contrast loss calculation module is configured to perform feature extraction on the multi-group samples by using a deep learning model, obtain a feature embedding vector, calculate a cosine distance between the anchor point and each contrast sample based on a cosine similarity, dynamically set a hierarchical interval according to a class difference, and then calculate a loss value according to a preset logic.

[0114] A model training and classification module is configured to train a deep learning model by taking a hierarchical multi-group contrast loss function as an optimization target, extract a feature embedding vector of a to-be-classified acoustic emission signal by using the trained deep learning model, calculate a cosine distance between the feature embedding vector and a support set feature embedding vector generated in advance, and determine a class with a minimum average cosine distance as a classification result.

[0115] In the embodiment, when sampling contrast samples from the class to which the anchor point belongs in the multi-group sampling, the anchor point sample itself is excluded, and 1 contrast sample is randomly sampled from each of all classes.

[0116] In the embodiment, the setting rule of the hierarchical interval is that the greater the class difference between the anchor point and the contrast sample, the greater the hierarchical interval value, and the hierarchical interval value is expanded based on a preset basic interval value.

[0117] In the embodiment, the loss function calculation logic is that the cosine distance between the anchor point and the same class sample is taken as a reference, and the cosine distance between the anchor point and the different class sample is constrained to be greater than “reference + hierarchical interval”.

[0118] In the embodiment, the class difference is in an increasing distribution, and N in the 1+N multi-group is the total number of acoustic emission signal classes.

[0119] In the embodiment, in the classification process, the support set feature embedding contains all classes corresponding to the training phase, and the classification result of the to-be-classified acoustic emission signal is determined by the following formula:

[0120] ;

[0121] wherein, represents the feature embedding of the to-be-classified acoustic emission signal; represents the support set feature embedding generated in advance, and the support set feature embedding contains all classes corresponding to the training phase; represents the feature embedding corresponding to the i-th class.

[0122] Embodiment 3:

[0123] The embodiment also provides an electronic device, comprising a memory and a processor.

[0124] The memory stores computer execution instructions.

[0125] The processor executes the computer execution instructions stored in the memory, so that the processor executes the acoustic emission signal classification method based on contrast learning in any embodiment of the application.

[0126] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), ready-to-program gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or any conventional processor.

[0127] The memory can be used to store computer programs and / or modules, and the processor can realize various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and calling data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store operating systems, application programs required by at least one function, etc.; and the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can also include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a secure digital (SD) card, a flash memory card, at least one magnetic disk storage period, a flash memory device, or other volatile solid-state memory devices.

[0128] Embodiment 4:

[0129] The embodiment also provides a computer-readable storage medium, wherein a plurality of instructions are stored, the instructions are loaded by a processor to make the processor execute the acoustic emission signal classification method based on contrast learning in any embodiment of the application. Specifically, a system or device equipped with a storage medium can be provided, and software program code for realizing the functions of any one of the above embodiments is stored on the storage medium, and the computer (or CPU or MPU) of the system or device reads out and executes the program code stored in the storage medium.

[0130] In this case, the program code read from the storage medium can realize the functions of any one of the above embodiments, and therefore the program code and the storage medium storing the program code constitute a part of the application.

[0131] The storage medium for providing the program code includes floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), magnetic tapes, nonvolatile memory cards and ROM. Alternatively, the program code can be downloaded from a server computer through a communication network.

[0132] In addition, it should be clear that not only the program code read by the computer can be executed, but also the operating system or the like operating on the computer can be caused to perform part or all of the actual operations based on the instructions of the program code, thereby realizing the functions of any one of the above embodiments.

[0133] In addition, it should be understood that the program code read by the storage medium is written into the memory provided in the expansion board inserted into the computer or the memory provided in the expansion unit connected to the computer, and then the CPU or the like installed on the expansion board or the expansion unit is caused to perform part or all of the actual operations based on the instructions of the program code, thereby realizing the functions of any one of the above embodiments.

[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the above embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A contrastive learning based acoustic emission signal classification method, characterized in that, The method is specifically as follows: Constructing a multi-tuple sample: collecting original acoustic emission signals with a grade label and preprocessing the collected original acoustic emission signals with a grade label to obtain a feature vector, while setting a sample quantity threshold, and physically disturbing and enhancing the minority class samples with a sample quantity lower than the set threshold; and regarding each sample as an anchor point, constructing a 1+N multi-tuple sample covering all classes for each anchor point; wherein N is the total number of classes obtained according to the grade label; Hierarchical multi-tuple contrast loss calculation: extracting features of the multi-tuple sample through a deep learning model to obtain a feature embedding vector, and calculating the cosine distance between the anchor point and each contrast sample based on the cosine similarity, and dynamically setting the hierarchical interval according to the class difference, and then calculating the loss value according to the preset logic; Deep learning model training and classification: training the deep learning model with the hierarchical multi-tuple contrast loss function as the optimization target, extracting the feature embedding vector of the acoustic emission signal to be classified through the trained deep learning model, and calculating the cosine distance with the pre-generated support set feature embedding vector, and determining the class with the smallest average cosine distance as the classification result.

2. The contrastive learning based acoustic emission signal classification method according to claim 1, wherein, The construction of the multi-tuple sample is specifically as follows: Data preprocessing: collecting original acoustic emission signals with a grade label, and converting the collected original acoustic emission signals with a grade label into fixed-length feature vectors through the Pytorch framework; the dimension of the feature vector is determined according to the time domain and frequency domain feature extraction results of the acoustic emission signal; Minority class sample enhancement: applying a random disturbance within a range of ±5% to each dimension of the feature vector to ensure that the enhanced sample retains the physical characteristics and loss signals of the original acoustic emission signal and avoids the introduction of invalid noise; at the same time, a feature disturbance consistency constraint is applied, that is, the feature direction offset of each dimension is consistent, and the maximum disturbance change deviation of two dimensions does not exceed 10%, the feature consistency constraint and the random disturbance form a double constraint, which ensures sample diversity and forces the retention of the damage characteristics and physical logic of the original acoustic emission signal; Multi-tuple sampling: randomly sampling one contrast sample from all classes according to the original acoustic emission signal label to form a 1+N multi-tuple of one anchor sample plus N contrast samples; wherein, when sampling from the class to which the anchor point belongs, the anchor sample itself is excluded to avoid the influence of repeated samples on the contrast effect.

3. The contrastive learning based acoustic emission signal classification method of claim 1, wherein, The hierarchical multi-tuple contrast loss calculation is specifically as follows: Feature embedding: extracting features of the multi-tuple sample through a deep learning model to obtain a feature embedding vector X of each anchor sample; Cosine distance calculation: the cosine distance between the anchor sample and each comparative sample is measured based on the cosine similarity, and the formula is: ; in, This represents the distance between the anchor sample and each comparison sample in the cosine space. The calculated cosine distance ranges from [0,1]. The feature embedding vector of the anchor sample; Indicates the first k Feature embedding vectors of each comparison sample; Dynamic inter-level interval setting: the category difference between the anchor sample and the contrast sample is quantitatively characterized, that is, based on the characteristic that the inter-category difference is in an increasing distribution, the category difference is quantified by the absolute value difference |k-y| of the category numbers to which the two belong, and then the quantified category difference is taken as the basis to adjust the constraint interval dynamically according to the preset basic interval value m sim , dynamically adjusting the constraint interval The formula is as follows: , ; Wherein, k represents the contrast sample class; y represents the anchor sample class; Loss calculation: take the similarity of anchor samples and same-class samples as "benchmark", constrain the cosine distance between anchor samples and different-class samples to be greater than the constraint interval , the loss function formula is as follows: , the loss function formula is as follows: y ​ ; ; Wherein, N represents the total number of categories of acoustic emission signals, and the difference between categories is in a rising distribution, and respectively represent the cosine distance of the anchor point sample and the same class sample, and the cosine distance of the anchor point sample and the different class sample; represents the constraint interval of the anchor point sample and the kth class sample.

4. The contrastive learning based acoustic emission signal classification method according to claim 3, characterized in that, The feature embedding of each anchor sample is extracted through the deep learning model as follows: An anchor sample-full class contrast sample collaborative extraction method is adopted, and a multi-tuple input of one anchor point plus N full class samples is processed in parallel; During the feature extraction process, a class global correlation matrix is introduced to simultaneously capture the relative difference features of the anchor sample and each class contrast sample. After the feature final embedding layer embeds the vector, the cosine space is optimized for distribution, and L2 normalization is used to ensure that all sample embeddings are in the cosine space, and the cosine distance accurately reflects the degree of category difference.

5. The contrastive learning based acoustic emission signal classification method according to claim 4, characterized in that, The feature extraction layer extracts high-order features through two linear transformations of linear layer one and linear layer two; Both linear layer one and linear layer two have a Relu activation function. The feature final embedding layer generates the final embedding vector through a third linear transformation.

6. The contrastive learning based acoustic emission signal classification method of claim 1, wherein, The deep learning model training and classification are as follows: Using the hierarchical multi-group comparison loss function as the optimization objective, using multi-group samples as the input of the deep learning model, training the deep learning model for multiple rounds, and continuously updating the weights of the deep learning model through the back propagation algorithm; After the deep learning model is trained, the support set is obtained by randomly sampling each class of acoustic emission data in the training data, and the feature embedding of the support set is extracted using the trained deep learning model as the reference benchmark for classification; For the acoustic emission signal to be classified, the feature embedding of the acoustic emission signal to be classified is extracted using the trained deep learning model, and the cosine distance between the feature embedding of the acoustic emission signal to be classified and the feature embedding of each class of the support set is calculated. The lower the cosine distance value, the closer the acoustic emission signal to be classified and the corresponding class data in the support set in the cosine space; finally, the cosine distances of all classes are compared, and the class with the smallest cosine distance is determined as the classification result of the new acoustic emission signal, as follows: ; wherein, represents a feature embedding of the acoustic emission signal to be classified; represents a pre-generated support set feature embedding, the support set feature embedding containing all classes corresponding to the training phase; represents a feature embedding corresponding to the i-th class.

7. The contrastive learning based acoustic emission signal classification method according to claim 6, characterized in that, Using the hierarchical multi-group comparison loss function as the optimization objective, using multi-group samples as the input of the deep learning model, training the deep learning model for multiple rounds, and continuously updating the weights of the deep learning model through the back propagation algorithm are as follows: Forward propagation: input multi-group training data, calculate through the network layers of the deep learning model according to the current weight parameters, and finally output the feature weight; Loss calculation: quantize the prediction error, and calculate the loss value through the loss function; Back propagation: solve the gradient direction, based on the loss value, and calculate the partial derivative of the loss function to each weight parameter, i.e. the gradient, through the chain rule in reverse; Weight update: update the weights of the deep learning model according to the gradient direction through gradient descent; Iterative optimization: repeat the process of "forward propagation - loss calculation - back propagation - weight update" until the training is completed; wherein the number of cycles is determined according to the preset training period.

8. A contrastive learning based acoustic emission signal classification system, characterized in that, The system is used to implement the acoustic emission signal classification method based on contrast learning as claimed in any one of claims 1 to 7; the system comprises: A multi-group sample construction module is used to collect original acoustic emission signals with level labels and preprocess the collected original acoustic emission signals with level labels to obtain feature vectors, set a sample quantity threshold, and perform physical disturbance enhancement on minority class samples with a sample quantity below the set threshold; and each sample is regarded as an anchor point, and 1+N multi-group samples covering all categories are constructed for each anchor point; wherein N is the total number of categories obtained according to the level label. The contrast loss calculation module is configured to perform feature extraction on the multiple sets of samples by using the deep learning model, obtain feature embedding vectors, calculate cosine distances between the anchor point and each contrast sample based on cosine similarity, dynamically set a hierarchical interval according to a category difference, and then calculate a loss value according to a preset logic. The model training and classification module is configured to train the deep learning model by taking the hierarchical multiple set contrast loss function as an optimization objective, extract a feature embedding vector of the to-be-classified acoustic emission signal by using the trained deep learning model, calculate a cosine distance with a support set feature embedding vector generated in advance, and determine a category with a minimum average cosine distance as a classification result.

9. An electronic device, comprising: Comprise: a memory and at least one processor; wherein the memory has stored thereon a computer program; the at least one processor executes the computer program stored in the memory, so that the at least one processor executes the acoustic emission signal classification method based on contrast learning according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer program stored in the computer readable storage medium can be executed by the processor to implement the acoustic emission signal classification method based on contrast learning according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Voiceprint recognition method, model training method and server

    CN110289003A

  • Structure fatigue damage identification method based on acoustic emission and deep learning

    CN120314460A