CN-121980369-A - Time sequence signal classification method and system based on alignment of class text prototypes
Abstract
The invention discloses a time sequence signal classification method and a system based on alignment of class text prototypes, wherein the method comprises the following steps: inputting the time sequence signals to be classified into a trained time sequence signal classification model, preprocessing the time sequence signals to be classified by the time sequence signal classification model, extracting time signal characteristics of preprocessed data, respectively carrying out distance calculation on the time signal characteristics and the optimized text prototype characteristics of each class, and selecting the class corresponding to the text prototype characteristics with the smallest distance as a final classification result. According to the method, the class text description is introduced, the coding capability of a large language model is utilized, semantic information is supplemented through the class text description fused with prior knowledge in the field under the scene of limited data samples and small difference between classes, and meanwhile, the class prototype feature distribution is dynamically optimized through aligning the class text description and sample features, so that potential difference between different classes is enlarged, and the classification precision and the robustness under a complex scene are improved.
Inventors
- LIU YANXIA
- LI XIAOZHEN
- WANG LE
Assignees
- 华南理工大学
Dates
- Publication Date
- 20260505
- Application Date
- 20251231
Claims (10)
- 1. A time sequence signal classification method based on alignment of class text prototypes is characterized by comprising the following steps of inputting a time sequence signal to be classified into a trained time sequence signal classification model, preprocessing the time sequence signal to be classified by the time sequence signal classification model, extracting sample characteristics of preprocessed data, respectively carrying out distance calculation on the sample characteristics and optimized class text prototypes, and selecting a class corresponding to the class text prototypes with the minimum distance as a final classification result.
- 2. The method of claim 1, wherein the preprocessing includes filtering and denoising the time series signals to remove noise signals generated during signal acquisition.
- 3. The method for classifying a time-series signal based on alignment of class text prototypes of claim 1 wherein the extraction of sample features comprises: 1) For timing signals with long-range dependency characteristics, global correlation features between different time steps are captured through a multi-head attention layer by adopting a transducer encoder or a variant of the transducer encoder based on a self-attention mechanism; 2) For a time sequence signal with obvious local characteristics, a multi-scale convolutional neural network is adopted, and local morphological characteristics of a time domain waveform are extracted by parallelly setting convolutional kernels of different receptive fields; 3) For complex mixed characteristic signals, a mixed coding architecture is adopted to extract sample characteristics, a multi-scale convolutional neural network is firstly adopted to extract local characteristics under different time scales, a transducer encoder is used for modeling global dependency relations of time sequences, and then a cross attention mechanism is adopted to take global characteristics output by the transducer as query vectors and local characteristics output by the convolutional network as keys and values, so that dynamic weighted fusion between the global characteristics and the local characteristics is realized, and time sequence characteristic representation with local discrimination capability and global context information is obtained.
- 4. The method for classifying a time-series signal based on alignment of a class text prototype according to claim 1, wherein the extraction of the feature of the class text prototype comprises the steps of: And constructing class text description containing multidimensional semantic information aiming at different kinds of time series signals, and in the encoding process, firstly inputting the class text description into a large language model of freezing parameters, and extracting the last layer of characteristics as initial class text prototype characteristics.
- 5. The method for classifying time-series signals based on alignment of class text prototypes according to claim 1, wherein the optimization of class text prototypes features is an iterative optimization of class text features by saving representative sample features across a dynamic storage queue of batches; in each batch of training, firstly calculating a class center of each class, calculating the distance between each sample feature and the class center based on the class center obtained by calculation, sorting the similarity of the samples from high to low, screening out the sample closest to the class center as a representative sample, and storing the representative sample feature in a dynamic storage queue of the representative sample feature; In each training iteration, class characteristics are calculated based on the sample characteristics of the dynamic storage queue, class text characteristics are calculated based on the class characteristics, and the sample characteristics stored in the queue can always represent the current class.
- 6. The method for classifying time-series signals based on alignment of class-text prototypes according to claim 1, wherein in each training batch, the selected representative sample features are combined with the features in the queue and ordered based on the distance between the sample and the class center, and at the same time, by limiting the capacity of the dynamic storage queue, only the top K sample features with highest similarity are reserved as updated queues.
- 7. The method of time series signal classification based on class text prototype alignment of claim 1, wherein the total loss function of the time series signal classification model comprises a class text prototype feature alignment loss function and a triplet alignment loss function, wherein the class text prototype feature alignment loss is intended to enhance the consistency of the sample with its corresponding class text prototype, the triplet alignment loss function being used to construct the most challenging triplet by considering the distance relationship between the sample and the anchor class feature.
- 8. A system for implementing a class text prototype alignment-based time-series signal classification method in accordance with claim 1, comprising: the signal preprocessing module is used for preprocessing the acquired time sequence signals; the signal coding module is used for extracting the characteristics of the time sequence signal from the preprocessed time sequence signal; The class text coding module is used for extracting class text prototype features from the preprocessed time sequence signals of different types; And the class text feature dynamic optimization module is used for dynamically optimizing class text prototype features and outputting sample features capable of representing the current class.
- 9. A computer device comprising a memory and a processor, the memory being electrically connected to the processor, the memory storing a computer program, wherein the computer program, when executed by the processor, causes the processor to implement the method as claimed in any one of claims 1 to 8.
- 10. A computer readable storage medium storing a computer program, wherein the computer program is executed by a processor, the processor implementing the method according to any one of claims 1 to 8.
Description
Time sequence signal classification method and system based on alignment of class text prototypes Technical Field The invention relates to the technical field of time sequence signal classification, in particular to a time sequence signal classification method and system based on alignment of class text prototypes. Background Currently, time-series signal classification technology is widely applied to industrial equipment monitoring, financial behavior analysis, medical diagnosis and other scenes, and a classification model based on deep learning plays a crucial role. However, in the face of practical application scenarios with limited data size and small feature differences between signal classes, the classification capability of the conventional deep neural network model in these fields is limited, and it is difficult to achieve high classification accuracy (classification method, apparatus, device and storage medium of multi-source time series, CN 113920365A). In summary, how to fully mine data information by deep learning, expand the differences between different signal classes, and improve the signal separability of different time series is a technical problem that needs to be solved by those skilled in the art. Disclosure of Invention The invention aims to provide a time sequence signal classification method and a system based on alignment of class text prototypes, so as to accurately and rapidly classify different time sequence signals. The object of the invention is achieved by at least one of the following technical solutions. A time sequence signal classification method based on alignment of class text prototypes comprises the following steps of inputting a time sequence signal to be classified into a trained time sequence signal classification model, preprocessing the time sequence signal to be classified by the time sequence signal classification model, extracting sample characteristics of preprocessed data, respectively carrying out distance calculation on the sample characteristics and optimized class text prototypes, and selecting a class corresponding to the class text prototypes with the minimum distance as a final classification result. Further, the preprocessing comprises filtering and denoising the time series signals so as to remove noise signals generated in the signal acquisition process. Further, the extracting of the sample feature includes: 1) For timing signals with long-range dependency characteristics, global correlation features between different time steps are captured through a multi-head attention layer by adopting a transducer encoder or a variant of the transducer encoder based on a self-attention mechanism; 2) For a time sequence signal with obvious local characteristics, a multi-scale convolutional neural network is adopted, and local morphological characteristics of a time domain waveform are extracted by parallelly setting convolutional kernels of different receptive fields; 3) For complex mixed characteristic signals, a mixed coding architecture is adopted to extract sample characteristics, a multi-scale convolutional neural network is firstly adopted to extract local characteristics under different time scales, a transducer encoder is used for modeling global dependency relations of time sequences, and then a cross attention mechanism is adopted to take global characteristics output by the transducer as query vectors and local characteristics output by the convolutional network as keys and values, so that dynamic weighted fusion between the global characteristics and the local characteristics is realized, and time sequence characteristic representation with local discrimination capability and global context information is obtained. Further, the extraction of the text-like prototype features comprises the following steps: And constructing class text description containing multidimensional semantic information aiming at different kinds of time series signals, and in the encoding process, firstly inputting the class text description into a large language model of freezing parameters, and extracting the last layer of characteristics as initial class text prototype characteristics. In each batch of training, firstly calculating a class center of each class, calculating the distance between each sample feature and the class center based on the calculated class center, sorting the similarity of the samples from high to low, screening out the sample closest to the class center as a representative sample, and storing the representative sample feature in a dynamic storage queue of the sample; In each training iteration, class characteristics are calculated based on the sample characteristics of the dynamic storage queue, class text characteristics are calculated based on the class characteristics, and the sample characteristics stored in the queue can always represent the current class. Further, in each batch of training, the screened representative sample features are combine