Time series signal processing method, device and equipment based on hierarchical progressive feature compression
By employing a hierarchical progressive feature compression method, the problem of high computational complexity of the Transformer model in high-dimensional time series signal processing is solved, enabling efficient analysis in resource-constrained environments and making it suitable for real-time detection and classification of multi-dimensional time series signals.
Patent Information
- Application Number
- CN202611263164.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-11-25
- Filing Date
- 2026-08-19
- Publication Date
- 2026-11-27
AI Technical Summary
Traditional Transformer models have high computational complexity and memory consumption when processing high-dimensional time series signals, and are easily affected by noise, which limits their application in resource-constrained scenarios and makes it difficult to balance computational efficiency and analytical accuracy.
A hierarchical progressive feature compression method is adopted, which performs compression in stages along the channel and time dimensions. The feature dimensions are gradually reduced by using channel compression and time compression modules. In addition, learnable summary lexical extraction and global context enhancement modules are combined to achieve multi-stage feature compression and context encoding.
While reducing computational complexity, it retains key discrimination information, improving processing efficiency and analysis accuracy on embedded devices, and is suitable for real-time detection and classification of multi-dimensional time-series signals.
Smart Images

Figure CN123179271A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of time-series signal processing, and specifically relates to a time-series signal processing method, apparatus, and device based on hierarchical progressive feature compression. Background Technology
[0002] In fields such as biomedical signal analysis (e.g., EEG signal monitoring, ECG signal monitoring) and industrial equipment status monitoring, accurate anomaly detection and classification of multidimensional time-series signals in real-time or near real-time is a core requirement. However, such signals often exhibit high sampling rates and multi-channel characteristics in practical applications. For example, EEG signals typically contain multiple electrode channels, forming large-scale, highly redundant multidimensional data after continuous sampling. In scenarios such as EEG abnormal event detection and EEG state-assisted analysis, models also need to balance long-term modeling dependency with real-time processing efficiency.
[0003] While traditional Transformer models can capture long-range dependencies when used for time-series signal analysis, the computational cost of self-attention and the overhead of intermediate feature storage typically increase quadratically with the sequence length when dealing with high-dimensional inputs with a large number of lexical units. This results in high memory consumption and low computational efficiency. Furthermore, the large amount of redundant information in high-dimensional data not only exacerbates the computational load but may also be affected by noise, leading to feature distortion and decreased detection performance. This, in turn, can cause problems such as false negatives and false positives, limiting the practical application of Transformer models in resource-constrained scenarios such as bedside monitoring and wearable devices.
[0004] Some Transformer optimization methods for time-series signals mainly focus on adjusting the number of model layers or attention mechanisms, lacking explicit, staged compression strategies for the spatial redundancy of the original signal in the channel and time dimensions, making it difficult to stably balance computational efficiency and accuracy. Therefore, there is an urgent need for a technical solution that can reduce the computational complexity of the model while retaining key discriminative information and maintaining analytical accuracy, in order to promote the application of intelligent signal analysis technology in resource-constrained environments and improve its deployment feasibility on embedded devices. Summary of the Invention
[0005] To address the aforementioned issues, this invention proposes a time-series signal processing method, apparatus, and device based on hierarchical progressive feature compression. By controlling the single compression ratio and performing compression in small batches and multiple times in both the channel and time dimensions, it helps to reduce computational complexity while preserving key discriminative information, thereby improving processing efficiency and deployment feasibility on embedded devices.
[0006] In a first aspect, the present invention provides a time-series signal processing method based on hierarchical progressive feature compression, comprising: Acquire the multidimensional time-series signal to be processed; The multidimensional time series signal to be processed is input into the trained time series signal analysis model to obtain the analysis results; Output or display the analysis results; The time-series signal analysis model includes: The preprocessing layer is used to divide the multidimensional time-series signal to be processed into time segments and embedding vector transformation to generate an initial word sequence; An improved Transformer encoder is used to perform hierarchical progressive feature compression and context encoding on the initial lexical sequence to obtain an encoded feature sequence. The improved Transformer encoder includes multiple sequentially connected Transformer encoding layers, with a channel compression module, an extraction module, and at least one temporal compression module arranged between these layers. The channel compression module performs average pooling downsampling in the channel dimension and fuses the samples through the Transformer encoding layers. The extraction module extracts compressed channel representations using learnable channel summary lexical units. The temporal compression module performs staged downsampling in the temporal dimension and fuses the samples through the Transformer encoding layers. The channel compression module and the temporal compression module are executed in stages between different Transformer encoding layers according to a preset window length, stride, or single compression ratio. The extraction module controls the scale of channel representations by a preset number of channel summary lexical units, allowing features to gradually shrink in the channel and temporal dimensions in small increments. A feature integration layer is used to integrate the encoded feature sequence into a single vector; The target task adapter is used to perform decision analysis based on the single vector information and output the analysis results.
[0007] In an optional implementation, the channel compression module is used for: The first feature sequence output by the previous Transformer encoding layer is downsampled by average pooling in the channel dimension according to a preset window or preset grouping to obtain the intermediate channel features; wherein, the preset grouping is determined based on at least one of the following: channel number, electrode spatial topology, brain region correspondence, acquisition channel arrangement or preset channel adjacency relationship; The intermediate channel features are input into the Transformer encoding layer to fuse the compressed inter-channel information; In an optional implementation, the extraction module is used to concatenate several learnable channel summary terms to the intermediate channel features, remove the original channel terms after interaction with the Transformer encoding layer, and retain only the several learnable channel summary terms as channel compression representations; the channel compression module retains a preset number of channel summary terms as channel-level representations, and the preset number is less than the number of intermediate channel features output by the channel compression module.
[0008] In an optional implementation, the channel compression module and / or extraction module may combine channel position encoding or electrode position encoding to model the spatial relationship between channels.
[0009] In an optional implementation, the time compression module is used for: The second feature sequence output by the previous Transformer encoding layer is downsampled by average pooling in the time dimension according to a preset window length and a preset time step to obtain the sampling result. The sampling results are used as compressed time segment sequences and input into subsequent Transformer coding layers for time context fusion to obtain time compression results.
[0010] In an optional implementation, the improved Transformer encoder is also used in combination with a global context enhancement module based on a summary enhancement mechanism; the global context enhancement module is used to temporarily concatenate at least one learnable temporary summary term in the lexical sequence to be enhanced, and remove the learnable temporary summary term after interaction with the Transformer encoding layer to obtain the enhanced lexical sequence.
[0011] In an optional implementation, the feature integration layer is used to integrate the encoded feature sequence into a single vector using average pooling or attention aggregation operations.
[0012] In an optional implementation, the target task adapter is used to perform decision analysis based on the single vector information and using a regression head or a lightweight classifier, and output the analysis results.
[0013] In an optional implementation, the time series signal analysis model is trained using a supervised learning strategy; when the target task is a classification task, the model parameters of the time series signal analysis model are optimized using the cross-entropy loss function; when the target task is a regression task, the model parameters of the time series signal analysis model are optimized using the mean squared error loss function.
[0014] Secondly, the present invention provides a time-series signal processing apparatus based on hierarchical progressive feature compression, comprising: The data acquisition module is used to acquire the multidimensional time-series signal to be processed; The data processing module is used to input the multi-dimensional time series signal to be processed into the trained time series signal analysis model to obtain the analysis results; The data display module is used to output or display the analysis results; The data processing module includes: The preprocessing module is used to divide the multidimensional time-series signal to be processed into time segments and embedding vector transformation to generate an initial word sequence; An improved Transformer encoding module is used to perform hierarchical progressive feature compression and context encoding on an initial lexical sequence to obtain an encoded feature sequence. The improved Transformer encoder includes multiple sequentially connected Transformer encoding layers, with a channel compression module, an extraction module, and at least one temporal compression module positioned between these layers. The channel compression module performs average pooling downsampling in the channel dimension and fuses the samples through the Transformer encoding layers. The extraction module extracts compressed channel representations using learnable channel summary lexical units. The temporal compression module performs staged downsampling in the temporal dimension and fuses the samples through the Transformer encoding layers. The channel compression module and the temporal compression module are executed in stages between different Transformer encoding layers according to a preset window length, stride, or single compression ratio. The extraction module controls the scale of channel representations by a preset number of channel summary lexical units, allowing features to gradually shrink in the channel and temporal dimensions in small increments. A feature integration module is used to integrate the encoded feature sequence into a single vector; The target task adaptation module is used to perform decision analysis based on the single vector information and output the analysis results.
[0015] Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in any of the foregoing embodiments.
[0016] Fourthly, the present invention provides a computer-readable medium having processor-executable non-volatile program code, the program code causing the processor to perform the method described in any of the foregoing embodiments.
[0017] The beneficial effects of the technical solution provided by the embodiments of the present invention are as follows: The time-series signal processing method, apparatus, and device based on hierarchical progressive feature compression of the present invention use a trained time-series signal analysis model to analyze multi-dimensional time-series signals. The time-series signal analysis model divides the multi-dimensional time-series signal to be processed into time segments and embedding vector transformation through a preprocessing layer to generate an initial word sequence. An improved Transformer encoder is then used to perform hierarchical progressive feature compression and context encoding on the initial word sequence to obtain an encoded feature sequence. Then, a feature integration layer is used to integrate the encoded feature sequence into a single vector. Finally, decision analysis is performed based on the information of the single vector to output the analysis results. Since the improved Transformer encoder is equipped with a channel compression module, an extraction module, and a time compression module, it can achieve multi-stage progressive information compression in both channel and time dimensions with a preset single compression ratio. This reduces data redundancy during feature encoding and, in typical embodiments, retains key discrimination information while reducing computational overhead, thereby helping to improve processing efficiency and deployment feasibility on embedded devices. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the time-series signal processing method based on hierarchical progressive feature compression provided in an embodiment of the present invention. Figure 2 Another flowchart illustrating the time-series signal processing method based on hierarchical progressive feature compression provided in this embodiment of the invention; Figure 3 This is a schematic diagram of the structure of the global context enhancement module provided in an embodiment of the present invention; Figure 4 A schematic diagram of the system principle of a time-series signal processing device based on hierarchical progressive feature compression provided in an embodiment of the present invention; Figure 5 A schematic diagram of the system principle of an electronic device provided in an embodiment of the present invention.
[0019] In the diagram: 100 - Data acquisition module; 200 - Data processing module; 210 - Preprocessing module; 220 - Improved Transformer encoding module; 230 - Feature integration module; 240 - Target task adaptation module; 300 - Data display module; 1000 - Electronic device; 1001 - Communication interface; 1002 - Processor; 1003 - Memory; 1004 - Bus. Detailed Implementation
[0020] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0021] Reference Figure 1A time-series signal processing method based on hierarchical progressive feature compression includes the following steps S100 to S300.
[0022] Step S100: Obtain the multidimensional time-series signal to be processed.
[0023] Specifically, in this embodiment, the multidimensional time-series signal is an electroencephalogram (EEG) signal, and a detailed description will be given using the EEG signal as an example. This multidimensional time-series signal is X, where X∈R. B×C×T Here, B represents the batch size, C represents the number of channels, and T represents the number of time sampling points. The batch size refers to the number of samples that the model processes simultaneously. Each sample is a time series signal in the format C×T. For example, if the batch size is set to 64, the model will process 64 samples simultaneously in each iteration, and the input multidimensional time series signal to be processed will be in the format 64×C×T.
[0024] Step S200: Input the multi-dimensional time series signal to be processed into the trained time series signal analysis model to obtain the analysis results.
[0025] Here, the time series signal analysis model is trained using a supervised learning strategy; for classification tasks, the cross-entropy loss function can be used to optimize model parameters and track model performance; for regression tasks, the mean squared error loss function can be used to optimize model parameters.
[0026] Step S300: Output or display the analysis results.
[0027] The time-series signal analysis model includes a preprocessing layer, an improved Transformer encoder, a feature integration layer, and a target task adapter. Each layer is described in detail below.
[0028] The preprocessing layer is used to divide the multi-dimensional time-series signal to be processed into time segments and embedding vector transformation to generate an initial word sequence.
[0029] When segmenting time periods, the time dimension T is divided into several non-overlapping "time segments". Specifically, time window convolution, grouped convolution, depthwise separable convolution, or equivalent linear mapping can be used to perform sliding window segmentation and embedding on the time series of each channel. Taking this embodiment as an example: T=3072, and each time segment is set to cover 64 consecutive sampling points, then it can be divided into 3072÷64=48 time segments.
[0030] After dividing the time segment into multiple time segments, each segment is converted into an embedding vector through convolution or linear mapping, forming an initial word sequence E∈R. B×C×N×DWhere N=floor((TL) / s)+1 is the number of segments, L is the window length, s is the sliding step size, and D is the embedding dimension; when the non-overlapping partition is L=s=64, N=T / 64=48.
[0031] An improved Transformer encoder is used to perform hierarchical progressive feature compression and context encoding on an initial lexical sequence to obtain an encoded feature sequence. The improved Transformer encoder includes multiple sequentially connected Transformer encoding layers, with a channel compression module, an extraction module, and at least one time compression module set between the multiple Transformer encoding layers.
[0032] The improved Transformer coding in this embodiment performs channel compression, channel representation extraction, and temporal compression operations sequentially across multiple Transformer coding layers, forming a hierarchical progressive compression structure. This structure does not perform a large compression all at once in a single dimension, but rather sets up channel compression and temporal compression with controlled compression amplitudes across several Transformer coding layers, allowing intermediate representations to continue to be reorganized by the Transformer context after each compression.
[0033] The channel compression stage includes a channel compression module and an extraction module. The channel compression module performs average pooling downsampling on the channel dimension according to a preset window or preset grouping, and inputs the downsampled intermediate channel features into the Transformer encoding layer for inter-channel information fusion. The preset grouping can be determined based on at least one of channel number, electrode spatial topology, brain region correspondence, acquisition channel arrangement, or preset channel adjacency relationship. In one embodiment, the channel compression module compresses 24 channels into 12 channels. The extraction module concatenates several learnable channel summary terms into the intermediate channel features, removes the original channel terms after interaction with the Transformer encoding layer, and retains only several learnable channel summary terms as channel representations for further compression. In one embodiment, the extraction module retains 4 channel summary terms as 4 channel-level representations. This channel processing method can combine channel position encoding or electrode position encoding to model channel spatial relationships.
[0034] The time compression module is used to perform average pooling downsampling on the second feature sequence output by the previous Transformer encoding layer according to a preset window length and a preset time step to obtain the sampling result. The sampling result is then used as a compressed time segment sequence to input into the subsequent Transformer encoding layer for time context fusion, so as to reduce the risk of losing key temporal relationships and obtain the time compression result.
[0035] Specifically, in a possible embodiment, the time dimension of the input EEG signal contains 3072 sampling points, which are initially divided into 48 time segments, each covering 64 consecutive sampling points. The first time compression module performs average pooling with a window length of 2 and a step size of 2, compressing the 48 time segments into 24 time units; the second time compression module also performs average pooling with a window length of 2 and a step size of 2, compressing the 24 time units into 12 time units. Each compressed new time unit corresponds to a longer continuous sampling interval on the original time axis.
[0036] For the nth time unit after compression, the center position of the original sampling interval it covers can be used as the position reference information. This position reference information can be used for optional time position encoding or relative order identification, or it can be used only to illustrate the correspondence between the compressed time segment and the original time axis. The core of this embodiment does not limit the specific position encoding method.
[0037] The feature sequences after channel compression and time compression are input into the subsequent multi-layer Transformer encoder. The insertion position and stage combination of the two can be adjusted according to the actual application scenario. In the preferred embodiment, channel compression is performed first, followed by time compression, in order to capture semantic information across layers and channels and achieve efficient spatiotemporal dependency modeling.
[0038] Optionally, the improved Transformer encoder can also be used in combination with a global context enhancement module based on a summary enhancement mechanism. This module can temporarily concatenate one or more temporary summary terms between specified layers, and remove the temporary summary terms after interaction with the Transformer encoding layers, retaining only the enhanced original term sequence. It should be noted that the channel summary terms used for channel compression are retained as compressed channel representations; the temporary summary terms in the summary enhancement module only serve as temporary global context mediators and are removed after interaction. This module is a collaborative enhancement method and is not a necessary component of the hierarchical progressive feature compression structure of this embodiment.
[0039] This embodiment performs feature fusion through a feature integration layer, which integrates the encoded feature sequence (i.e., the compressed feature sequence) into a single vector. Preferably, average pooling can be performed in the sequence dimension, or weighted aggregation of each word based on learnable attention weights can be performed to obtain a single feature vector for classification, detection, or regression tasks.
[0040] The target task adapter is used to perform decision analysis based on a single vector of information and output the analysis results. In optional embodiments, a regression head or a lightweight classifier is used for decision analysis, outputting signal category, abnormal event probability, or other target values as the analysis results.
[0041] The hierarchical progressive feature compression structure in this embodiment can be used in conjunction with the global context enhancement module based on the summary enhancement mechanism. It should be noted that learnable temporary summary terms or global terms are one of the general modeling ideas that can be adopted in the Transformer domain; this embodiment emphasizes its specific configuration, insertion levels, retention or removal rules, and collaborative relationship with channel-time progressive compression in the multi-dimensional temporal signal hierarchical compression architecture. The hierarchical progressive feature compression structure is responsible for multi-stage progressive compression in both channel and time dimensions according to a preset single compression ratio, reducing redundancy and improving feature discrimination efficiency; the global context enhancement module based on the summary enhancement mechanism, as an optional collaborative module, temporarily inserts multiple learnable temporary summary terms, which are then structurally removed after multi-layer Transformer interaction to achieve global semantic aggregation and consistency enhancement. The core considerations for combining the two are as follows.
[0042] Regarding the selection of the insertion level for temporary summary terms, in a preferred embodiment combined with the hierarchical progressive feature compression structure of this example, the Summary-Augment Module (SAM) can be embedded in the mid-to-late compression stage or the global integration stage; it is generally not preferred to place it in the initial embedding layer. The reason is that early features still contain a large amount of channel and temporal redundancy, making temporary summary terms susceptible to local noise interference; after one or more rounds of channel compression and temporal compression, the sequence length and channel dimension are reduced, allowing for global modeling within a more compact and discriminative representation space; later insertion helps reduce the additional computational overhead caused by temporary summary terms. In specific implementations, insertion can be performed after the first channel compression is completed, or before entering the 13th to 15th layer global integration Transformer, and removed after the summarization interaction is completed within layers 3 to 4.
[0043] Regarding the design considerations for the number of temporary summarization units, the number is typically set to 2 to 8, depending on the channel size, time segment size, compression ratio, and the complexity of the target task. For tasks with higher dimensionality, the number of temporary summarization units can be appropriately increased; the higher the compression ratio, the heavier the burden on a single temporary summarization unit, and the more units can be added to share the semantic modeling load; for multi-class and multi-state tasks, appropriately increasing the number of temporary summarization units helps improve the expression of semantic diversity. The principle is to control the increase in parameter quantity and computational complexity as much as possible while taking into account the overall semantic expression capability. This embodiment emphasizes structure-level integration rather than relying on special training mechanisms.
[0044] Regarding parameters and training stability, the basic supervised training process does not need to be changed after combining them. However, the following points should be noted: Temporary summary terms are learnable parameters, and their initialization usually adopts a standard normal or uniform distribution; to avoid temporary summary terms dominating early training, a smaller initialization scale can be used; in the hierarchical progressive compression structure, since the sequence length gradually decreases, it is recommended to use standard residual connections and LayerNorm to stabilize gradient propagation during the SAM insertion stage. It is important to emphasize that the structural role of SAM in this embodiment is to temporarily insert temporary summary terms into the network structure and remove them after several layers of interaction, rather than to adopt different processing strategies in the training and inference stages. Therefore, the training and inference structures remain consistent and do not introduce additional stage differences.
[0045] This embodiment adopts a standard supervised learning process, consistent with mainstream Transformer training methods, including using cross-entropy loss (for classification tasks) or mean squared error loss (for regression tasks), employing Adam (Adaptive Moment Estimation) or AdamW optimizer (Adam with Weight Decay), and using batch training and backpropagation. There are no special strategies at the training process level that differ from existing technologies. The technical focus of this embodiment is the hierarchical progressive compression mechanism at the structural level, rather than training techniques.
[0046] Regarding the design of the loss function, the loss function itself was not structurally changed, but the following considerations were taken into account: For anomaly detection scenarios, class-imbalanced weighted cross-entropy can be combined to enhance sensitivity to a few anomalous samples; for deployment in scenarios with severe noise interference, appropriate regularization (such as weight decay) can be introduced to improve generalization ability. The above are engineering optimization measures and do not change the basic form of the loss function.
[0047] The special considerations and their technical effects in the structural design at each stage are as follows.
[0048] The channel compression stage is designed as follows: First, the channel compression module performs average pooling downsampling on the channel dimension, and then the compressed channel information is fused through a Transformer layer. Next, an extraction module introduces several learnable channel summary terms to extract compact channel representations from the channel set. In a possible embodiment, 24 channels are first compressed into 12 channels, and then 4 channel-level representations are formed from 4 channel summary terms. This design reduces the risk of information loss associated with relying on only one pooling operation to obtain the final channel representation, and can retain cross-channel correlations and key electrode information while reducing the number of channels.
[0049] The design considerations for the time compression stage are as follows: time compression is performed in stages rather than a large-step compression all at once; optionally, temporal position information is configured for the compressed time segments, which can use learnable positional encoding, relative positional encoding, or other positional representation methods. The design aims to reduce the risk of losing key dynamic features due to a large-scale compression at once, ensuring that the compressed segments still retain the sequential relationships on the original timeline, thus helping to improve the model's ability to perceive long-range dependencies. The technical effect is to maintain the discernibility of the temporal dynamic structure even with a reduced sequence length.
[0050] The overall approach of layered progressive compression is not to perform all compression at once in a single dimension, but rather to perform channel compression and temporal compression in stages across different Transformer coding layers at a preset single compression ratio. The design aims to continuously reorganize features during the gradual abstraction process, reducing the risk of excessive information loss in a single large-scale compression, and maintaining a certain degree of representational freedom in intermediate layers, which is beneficial for subsequent global Transformer modeling. The technical effect, in typical implementations, is that it helps achieve a balance between reducing computational cost and maintaining or improving accuracy.
[0051] While keeping the core structure of this embodiment unchanged, the following extended modules and application scenarios can be combined.
[0052] One is the graph structure spatial modeling module. In multi-electrode EEG or multi-sensor industrial data, a graph convolutional layer (GCN) based on the adjacency matrix can be introduced to characterize the real physical connections between electrodes or sensors. This module can be placed before channel compression to enhance the spatial structure representation, and is suitable for scenarios such as brain region connectivity analysis and multi-node status monitoring of complex industrial equipment.
[0053] Secondly, there is the contrastive learning auxiliary branch. In scenarios with mixed labeled and unlabeled data, a self-supervised contrastive learning branch can be added to enhance feature consistency, impose comparative constraints on data before and after compression or different time windows, and improve representation robustness. This is suitable for medical signal analysis scenarios with limited labeled samples.
[0054] Thirdly, there is the streaming inference and memory caching mechanism. In real-time monitoring scenarios, a cache memory unit can be added, using the compressed features of the previous time window as auxiliary input to achieve cross-window dependency modeling, which is suitable for scenarios such as continuous ECG monitoring and online anomaly early warning of industrial equipment.
[0055] Fourthly, it features a multi-scale temporal branching structure. This structure adds branches for short-term temporal resolution, captures instantaneous changes with a lower compression rate, and fuses them at the backend. It is suitable for scenarios such as speech breakpoint detection and electromyography (EMG) event recognition.
[0056] The above extensions are all implemented within the main framework of layered progressive compression and Transformer encoding in this embodiment. They are module-level enhancements and do not change the main compression logic.
[0057] This embodiment converts the multidimensional temporal signal to be processed into a word sequence through a preprocessing layer, and performs context dependency modeling through an improved Transformer encoder. The improved Transformer encoder uses a channel compression module, an extraction module, and a time compression module to perform progressive downsampling and aggregation at a preset single compression ratio in the channel and time dimensions. In an optional implementation, it can be combined with a global context enhancement module based on a summary enhancement mechanism for global semantic injection and consistency enhancement. The feature sequence is then integrated into a single vector through a feature integration layer, and the classification result or anomaly detection probability is output through a target task adapter head.
[0058] Compared with existing technologies, this embodiment can reduce computational load and intermediate feature storage overhead under typical configuration, and helps to improve the accuracy and robustness of multidimensional time series signal analysis.
[0059] The following section uses the auxiliary detection of epilepsy-related EEG abnormalities as an example to further explain the time-series signal analysis model in this embodiment.
[0060] The input data is EEG signals (encephalogram sequences) with dimensions B=1, C=24, T=3072. During the signal embedding stage, channel-wise temporal window convolution, grouped convolution, depthwise separable convolution, or equivalent linear mapping with a window length L=64 and stride s=64 can be used to divide the time into 48 time segments. Each time segment generates a 512-dimensional embedding, preserving the channel dimensions, resulting in a word sequence of dimensions (B, C, 48, 512). When C=24, it can be represented as (B, 24, 48, 512).
[0061] The first seven layers of the model constitute the channel aggregation stage: the first three layers can use standard Transformer encoding layers, followed by a channel compression module that downsamples the 24 channels through average pooling and then fuses them into 12 channels via a Transformer layer; then, an extraction module adds four learnable channel summary terms, and after interaction with the Transformer layer, only these four channel summary terms are retained as four channel-level representations. This process can be combined with electrode position encoding vectors to explicitly model the channel spatial relationships.
[0062] Two temporal compression operations are performed progressively between layers 8 and 12, reducing the number of time segments from 48 to 12. Each temporal compression uses an aggregation operation with a window length of 2 and a step size of 2, halving the number of time segments: the first compression reduces 48 to 24, and the second reduces 24 to 12. This corresponds to a 2:1 compression ratio; the step size represents the interval at which the sampling window moves along the temporal dimension, not the reciprocal of the compression ratio. Optionally, temporal position information can be configured after compression and dynamically fused with cross-time-segment attention in subsequent Transformer coding layers. For example, the first temporal compression can be set after the 8th Transformer coding layer, i.e., between layers 8 and 9; the second temporal compression can be set after the 12th Transformer coding layer, i.e., between layers 12 and 13. Correspondingly, the number of time segments changes from 48 to 24 after the first compression and then to 12 after the second compression.
[0063] Alternatively, time-dimensional compression can be set, and it is not absolutely limited to the two layer intervals mentioned above. The insertion position of the time compression layer can be adjusted according to task requirements, model size, and performance requirements. However, different insertion positions will affect the model performance: ① If compression is set too early, the original time series has not yet undergone sufficient feature extraction, which may lead to the premature loss of fine-grained temporal information; ② If compression is set too late, although more information is preserved, the sequence length is longer, the computational cost is greater, and the efficiency advantage brought by compression is reduced.
[0064] Layers 13-15 are used for global attention modeling, fusing channel and temporally compressed features to output a global EEG representation. Subsequently, average pooling and linear mapping are used to obtain the signal category probability or the auxiliary analysis probability of epilepsy-related EEG states.
[0065] like Figure 2 As shown, another possible implementation is presented, where the EEG signal is input to a time-series signal analysis model. This model includes a channel compression stage (comprising three sequentially connected Transformer layers, a channel compression layer, and an extraction module based on learnable channel summary terms), a time compression stage (comprising a compression layer, three Transformer layers, and a compression layer), three Transformer layers, an aggregation layer, a Linear layer, and a Softmax layer. The Transformer layer is the aforementioned Transformer encoding layer; the aggregation layer can use average pooling, flattening, or attention aggregation as a feature integration layer; the Linear layer and the Softmax layer together serve as a target task adapter head, used to output signal category or anomaly detection results.
[0066] Compared to the uncompressed standard EEG Transformer, this model reduces GFLOPs from 31.40 to 20.20, a computational reduction of approximately 35.7%; the accuracy improves from 0.8447 to 0.8518, an absolute improvement of 0.71 percentage points (a relative improvement of approximately 0.84%), and demonstrates better representational stability in low signal-to-noise ratio time-series signal processing. The results of cross-validation on the main dataset are shown in Table 1; to assert statistical significance, paired tests or confidence interval analysis can be further incorporated.
[0067] Table 1 Comparison of experimental results As shown in Table 1, the improved Transformer encoder achieves an absolute increase in accuracy of 0.71 percentage points (a relative increase of approximately 0.84%) while reducing GFLOPs by approximately 35.7%. This result supports the beneficial effect of this embodiment in reducing computational complexity while maintaining accuracy.
[0068] The above embodiments are only used to illustrate the principles and effects of the present invention and do not constitute a limitation on the claims. Those skilled in the art can make several improvements and substitutions without departing from the spirit of the present invention.
[0069] This embodiment aims to perform hierarchical progressive feature compression and discriminant analysis on high-dimensional, multi-channel, long-term sequence signals, and can be applied to multimodal time-series signal analysis tasks such as electroencephalography (EEG), electrocardiography (ECG), electromyography (EMG), speech, and industrial sensor sequences.
[0070] This embodiment achieves hierarchical aggregation of feature dimensions through multi-stage progressive downsampling and information fusion in both channel and time dimensions, and can work in conjunction with the global context enhancement module of the summary enhancement mechanism; the above-mentioned collaborative relationship is an optional combination and does not change the core structure of the hierarchical compression scheme.
[0071] This embodiment has the following beneficial effects: (1) Layered progressive compression mechanism: Multi-stage progressive information compression is achieved in both channel and time dimensions with a preset single compression ratio, which effectively reduces computational overhead while maintaining the main discrimination information.
[0072] (2) Flexible structure and strong scalability: The window length, step size and compression ratio of each compression layer can be configured according to the task requirements; when using attention aggregation or weighted aggregation, the aggregation weights can be learned through training; when using average pooling, the aggregation weights within the window are equal, thus adapting to different signal types and sampling rates.
[0073] When adjusting the compression layer parameters, the window length, stride, and compression ratio can be set according to task requirements; the stride represents the interval at which the sampling window moves along the sequence dimension. For example, a window length of 2 and a stride of 2 correspond to a 2:1 compression ratio, meaning a sequence of length 48 is compressed to length 24. Aggregation refers to forming a single feature from multiple features within each sampling window through averaging or weighted summation. For example, the average pooling compression method used in this paper is an aggregation method that takes the average of all features within a window, with equal aggregation weights for each feature within the window.
[0074] (3) Optional global enhancement module collaboration: By using it in conjunction with the context enhancement module of the summary enhancement mechanism, the robustness and global modeling ability of the model can be further improved.
[0075] (4) Wide applicability: The architecture can be used in various scenarios such as EEG abnormal event detection, ECG abnormality analysis, speech feature recognition and industrial sensor time-series state analysis.
[0076] (5) Efficiency and accuracy are balanced: In the cross-validation results of typical EEG signal tasks, GFLOPs are reduced by about 35.7%, and the accuracy is improved by 0.71 percentage points (relative improvement of about 0.84%).
[0077] In terms of structural design, this embodiment balances algorithm efficiency and key information preservation through "layered progressive feature compression + Transformer encoding"; at the application level, it can support time series analysis of biological signals, speech, and industrial conditions; it also has modular expansion capabilities and can be combined with a global context enhancement module based on a summary enhancement mechanism for collaborative enhancement in multidimensional time series signal analysis.
[0078] See Figure 4 This invention provides a time-series signal processing device based on hierarchical progressive feature compression, comprising a data acquisition module 100, a data processing module 200, and a data display module 300. The data acquisition module 100 acquires the multi-dimensional time-series signal to be processed; the data processing module 200 inputs the multi-dimensional time-series signal to be processed into a trained time-series signal analysis model to obtain analysis results; and the data display module 300 outputs or displays the analysis results.
[0079] The data processing module includes: Preprocessing module 210 is used to divide the multi-dimensional time-series signal to be processed into time segments and embedding vector transformation to generate an initial word sequence; An improved Transformer encoding module 220 is used to perform hierarchical progressive feature compression and context encoding on the initial lexical sequence to obtain the encoded feature sequence. The improved Transformer encoder includes multiple sequentially connected Transformer encoding layers, with a channel compression module, an extraction module, and at least one temporal compression module set between the multiple Transformer encoding layers. The channel compression module is used to perform average pooling downsampling in the channel dimension and fuse it through the Transformer encoding layers. The extraction module is used to extract the compressed channel representations through learnable channel summary lexical units. The temporal compression module is used to perform staged downsampling in the temporal dimension and fuse it through the Transformer encoding layers. The channel compression module and the temporal compression module are executed in stages between different Transformer encoding layers according to a preset window length, stride, or single compression ratio. The extraction module controls the scale of the channel representations by a preset number of channel summary lexical units, so that the features gradually shrink in the channel dimension and the temporal dimension in a small number of multiple steps. Feature integration module 230 is used to integrate the encoded feature sequence into a single vector; The target task adaptation module 240 is used to perform decision analysis based on single vector information and output or display the analysis results.
[0080] In an optional embodiment, the channel compression layer includes: The channel compression submodule is used to perform average pooling downsampling on the first feature sequence output by the previous Transformer coding layer in the channel dimension according to a preset window or preset grouping to obtain intermediate channel features, and input the intermediate channel features into the Transformer coding layer for inter-channel information fusion; wherein, the preset grouping is determined based on at least one of the following: channel number, electrode spatial topology, brain region correspondence, acquisition channel arrangement or preset channel adjacency relationship. The extraction submodule concatenates several learnable channel summary terms to intermediate channel features. After interaction with the Transformer encoding layer, the original channel terms are removed, retaining only a few learnable channel summary terms as channel-level compressed representations. The channel compression module retains a preset number of channel summary terms as channel-level representations; this preset number is less than the number of intermediate channel features output by the channel compression module.
[0081] In an optional embodiment, the channel compression submodule and / or extraction submodule may combine channel position encoding or electrode position encoding to model the spatial relationship between channels.
[0082] In an optional embodiment, the time compression layer includes: The sampling submodule is used to perform average pooling downsampling on the second feature sequence output by the previous Transformer encoding layer according to a preset window length and a preset time step to obtain the sampling result. The temporal context fusion submodule is used to input the sampling results as a compressed time segment sequence into the subsequent Transformer coding layer for temporal context fusion to obtain the temporal compression result.
[0083] In an optional embodiment, the improved Transformer encoder may also be used in combination with a global context enhancement module based on a summary enhancement mechanism; the global context enhancement module is used to temporarily concatenate at least one learnable temporary summary term in the lexical sequence to be enhanced, and remove the learnable temporary summary term after interaction with the Transformer encoding layer to obtain the enhanced lexical sequence.
[0084] In an optional embodiment, the feature integration module 230 is specifically used to integrate the encoded feature sequence into a single vector using average pooling or attention aggregation operations.
[0085] In an optional embodiment, the target task adaptation module 240 is specifically used to perform decision analysis based on a single vector information and using a regression head or a lightweight classifier, and output the analysis results.
[0086] In an optional embodiment, the time series signal analysis model is trained using a supervised learning strategy; when the target task is a classification task, the model parameters are optimized using the cross-entropy loss function; when the target task is a regression task, the model parameters are optimized using the mean squared error loss function.
[0087] The apparatus provided in the embodiments of this application has the same inventive concept as the method provided in the embodiments of this application. As long as the method can solve the technical problem, the apparatus can also solve the technical problem. This will not be elaborated here.
[0088] Reference Figure 5 The present invention also provides an electronic device 1000, including a communication interface 1001, a processor 1002, a memory 1003, and a bus 1004. The processor 1002, the communication interface 1001, and the memory 1003 are connected via the bus 1004. The memory 1003 is used to store a computer program that supports the processor 1002 in executing the aforementioned timing signal processing method based on hierarchical progressive feature compression. The processor 1002 is configured to execute the program stored in the memory 1003.
[0089] Optionally, embodiments of the present invention also provide a computer-readable medium having non-volatile program code executable by a processor 1002, the program code causing the processor 1002 to perform a timing signal processing method based on hierarchical progressive feature compression as described in the above embodiments.
[0090] As is known from common technical knowledge, this invention can be implemented through other embodiments that do not depart from its spirit or essential characteristics. Therefore, the disclosed embodiments described above are merely illustrative in all respects and are not the only ones. All modifications within the scope of this invention or its equivalents are included in this invention.
Claims
1. A time-series signal processing method based on hierarchical progressive feature compression, characterized in that, include: Acquire the multidimensional time-series signal to be processed; The multidimensional time series signal to be processed is input into the trained time series signal analysis model to obtain the analysis results; Output or display the analysis results; The time-series signal analysis model includes: The preprocessing layer is used to divide the multidimensional time-series signal to be processed into time segments and embedding vector transformation to generate an initial word sequence; An improved Transformer encoder is used to perform hierarchical progressive feature compression and context encoding on the initial lexical sequence to obtain an encoded feature sequence. The improved Transformer encoder includes multiple sequentially connected Transformer encoding layers, with a channel compression module, an extraction module, and at least one temporal compression module arranged between these layers. The channel compression module performs average pooling downsampling in the channel dimension and fuses the samples through the Transformer encoding layers. The extraction module extracts compressed channel representations using learnable channel summary lexical units. The temporal compression module performs staged downsampling in the temporal dimension and fuses the samples through the Transformer encoding layers. The channel compression module and the temporal compression module are executed in stages between different Transformer encoding layers according to a preset window length, stride, or single compression ratio. The extraction module controls the scale of channel representations by a preset number of channel summary lexical units, allowing features to gradually shrink in the channel and temporal dimensions in small increments. A feature integration layer is used to integrate the encoded feature sequence into a single vector; The target task adapter is used to perform decision analysis based on the single vector information and output the analysis results.
2. The time-series signal processing method based on hierarchical progressive feature compression according to claim 1, characterized in that, The channel compression module is used to perform average pooling downsampling on the channel dimension of the first feature sequence output by the previous Transformer encoding layer according to a preset window or preset grouping to obtain intermediate channel features, and input the intermediate channel features into the Transformer encoding layer for inter-channel information fusion; wherein, the preset grouping is determined based on at least one of the following: channel number, electrode spatial topology, brain region correspondence, acquisition channel arrangement or preset channel adjacency relationship.
3. The time-series signal processing method based on hierarchical progressive feature compression according to claim 2, characterized in that, The extraction module is used to concatenate several learnable channel summary terms to the intermediate channel features, and after interaction with the Transformer encoding layer, remove the original channel terms, retaining only the several learnable channel summary terms as channel compression representations. The channel compression module retains a preset number of channel summary tokens as channel-level representations, and the preset number is less than the number of intermediate channel features output by the channel compression module.
4. The time-series signal processing method based on hierarchical progressive feature compression according to claim 2 or 3, characterized in that, The channel compression module and / or extraction module, in conjunction with channel position encoding or electrode position encoding, model the spatial relationship between channels.
5. The time-series signal processing method based on hierarchical progressive feature compression according to claim 1, characterized in that, The time compression module is used for: The second feature sequence output by the previous Transformer encoding layer is downsampled by average pooling in the time dimension according to a preset window length and a preset time step to obtain the sampling result. The sampling results are used as compressed time segment sequences and input into subsequent Transformer coding layers for time context fusion to obtain time compression results.
6. The time-series signal processing method based on hierarchical progressive feature compression according to claim 1, characterized in that, The improved Transformer encoder is also used in combination with a global context enhancement module based on a summary enhancement mechanism. The global context enhancement module is used to temporarily concatenate at least one learnable temporary summary term in the lexical sequence to be enhanced, and remove the learnable temporary summary term after interaction with the Transformer encoding layer to obtain the enhanced lexical sequence.
7. The time-series signal processing method based on hierarchical progressive feature compression according to claim 1, characterized in that, The feature integration layer is used to integrate the encoded feature sequence into a single vector using average pooling or attention aggregation operations.
8. The time-series signal processing method based on hierarchical progressive feature compression according to claim 1, characterized in that, The target task adapter is used to perform decision analysis based on the single vector information and using a regression head or a lightweight classifier, and output the analysis results.
9. A time-series signal processing device based on hierarchical progressive feature compression, characterized in that, include: The data acquisition module is used to acquire the multidimensional time-series signal to be processed; The data processing module is used to input the multi-dimensional time series signal to be processed into the trained time series signal analysis model to obtain the analysis results; The data display module is used to output or display the analysis results; The data processing module includes: The preprocessing module is used to divide the multidimensional time-series signal to be processed into time segments and embedding vector transformation to generate an initial word sequence; An improved Transformer encoding module is used to perform hierarchical progressive feature compression and context encoding on the initial lexical sequence to obtain an encoded feature sequence. The improved Transformer encoder includes multiple sequentially connected Transformer encoding layers, with a channel compression module, an extraction module, and at least one temporal compression module arranged between the multiple Transformer encoding layers. The channel compression module performs average pooling downsampling in the channel dimension and fuses the samples through the Transformer encoding layers. The extraction module extracts compressed channel representations using learnable channel summary lexical units. The temporal compression module performs staged downsampling in the temporal dimension and fuses the samples through the Transformer encoding layers. The channel compression module and the temporal compression module are executed in stages between different Transformer encoding layers according to a preset window length, stride, or single compression ratio. The extraction module controls the scale of channel representations by a preset number of channel summary lexical units, allowing features to gradually shrink in the channel and temporal dimensions in small increments. A feature integration module is used to integrate the encoded feature sequence into a single vector; The target task adaptation module is used to perform decision analysis based on the single vector information and output the analysis results.
10. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1-8.
