A lightweight time series classification method and system based on diagonal state space and multi-scale feature fusion

CN122986642APending Publication Date: 2026-10-27XINJIANG TECH INST OF PHYSICS & CHEM CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611096906.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

其中①②依赖扩大量化核或并行分支覆盖多尺度,易导致参数与计算线性甚至超线性增长、端侧部署成本高;③虽能捕获长依赖,但对序列长度与位置编码敏感,在长序列上显存与时延开销大,且对瞬时突变/边界细节响应偏弱;④在长依赖建模效率上有优势,但与局部细粒度模式协同不足,简单级联/相加式融合易引入冗余与噪声放大

Benefits of technology

本发明提出一套面向低延迟与轻量部署的多尺度时间序列分类框架,将“滑窗分片卷积嵌入”的局部细节提取与“对角状态空间(S4D)+低秩修正”的全局长依赖建模在同一流水线内紧耦合,通过时域与频域残差实现信息的低损耗互补;在结构上采用 FFT/IFFT高效施加一维卷积核,使计算复杂度随序列长度近线性/对数级增长且参数规模与长度解耦;引入可逆实例归一化以抑制设备或场景带来的分布漂移并提升跨长度鲁棒性;通过深度可分离卷积、逐点卷积与 GLU 构成轻量信息过滤与通道混合机制,增强对突发与边界模式的响应,从而在不增加显著参数与算力开销的前提下同时提升准确性、稳定性与实时性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122986642A_ABST
    Figure CN122986642A_ABST
Patent Text Reader

Abstract

The application provides a lightweight time series classification method based on diagonal state space and multi-scale feature fusion, comprising: arranging an original time series into a tensor and performing normalization processing; dividing the original time series into a plurality of overlapping local segments by using a sliding window in a time dimension; inputting a lightweight classification model to obtain a prediction classification; the lightweight classification model comprises a convolution layer, a diagonal state space model, an average pooling layer and a classification head connected in sequence; the convolution layer maps each local segment into a local feature vector; the diagonal state space model obtains a corresponding equal-length tensor according to the local feature vector, and realizes global modeling of the diagonal state space; the average pooling layer performs global average pooling to obtain a global feature vector corresponding to the original time series; and the classification head outputs the prediction classification. Through active unified modeling of local, global and multi-scale information, the application effectively improves the time series classification accuracy in the input length / sampling rate change and cross-domain distribution drift scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data analysis in the field of information technology, and particularly relates to the technical fields of time series data classification and deep learning. Specifically, it provides a lightweight time series classification method and system based on the fusion of diagonal state space and multi-scale features. Background Technology

[0002] In real-world scenarios, time series data (wearable health, industrial IoT, logs / network streams, energy and transportation, voice / acoustics and earthquake monitoring, etc.) exhibit characteristics such as coexistence of local fine-grained transients and global long-range dependencies, variable input length and sampling rate, significant cross-device / cross-scenario distribution drift, and sparse burst / boundary events. Edge devices also face strict constraints on latency, computing power, and memory. Existing methods struggle to uniformly model "local-global-multi-scale" information within a compact parameter budget, often exhibiting non-stationarity to length / sampling rate changes and domain drift, insufficient response to transient abrupt changes and boundary details, and excessive resource overhead on long sequences. There is an urgent need for a time series classification scheme that achieves extremely high accuracy while maintaining lightweight design, is robust to length / sampling rate and domain drift, and supports real-time inference on edge devices.

[0003] Current mainstream approaches include ① random convolution / linear readout models (such as large-scale kernel libraries + linear classification), ② multi-branch / multi-scale convolution models, ③ Transformer-type self-attention models, and ④ state-space models (SSM / S4, etc.). Among these, ① and ② rely on expanding the quantization kernel or parallel branches to cover multiple scales, which can easily lead to linear or even superlinear growth in parameters and computation, and high deployment costs on edge devices; ③, although it can capture long dependencies, is sensitive to sequence length and position encoding, resulting in high memory and latency overhead on long sequences, and weak response to transient changes / boundary details; ④ has advantages in long dependency modeling efficiency, but lacks coordination with local fine-grained patterns, and simple cascading / additive fusion can easily introduce redundancy and noise amplification. At the same time, cross-device / cross-scene distribution drift makes it difficult for conventional normalization to achieve stable alignment at the sample level, resulting in a prominent training-test mismatch; when the input length changes or the sampling rate is adjusted, performance non-stationarity is generally observed. In summary, existing methods mostly rely on "passive compensation" (posterior reweighting or post-processing fusion), lacking a structured mechanism for proactively unifying "local-global-multi-scale" information under a compact parameter budget, making it difficult to achieve a balance between accuracy, latency, and robustness. In contrast, the method of this invention achieves proactive unified modeling of local-global-multi-scale information under a compact parameter budget, possessing extremely high accuracy, low latency, and low memory usage, while maintaining stable robustness to changes in input length / sampling rate and cross-domain distribution drift, making it suitable for real-time deployment and large-scale applications. Summary of the Invention

[0004] Key challenges in time series data classification include effective modeling of long-term dependencies and fine-grained features, as well as the need for efficient deployment in resource-constrained scenarios. To address these challenges, this invention proposes a lightweight time series classification method and system based on diagonal state space and multi-scale feature fusion. This method integrates local-global information while maintaining cross-scale robustness, all while ensuring lightweight parameters and low latency.

[0005] In view of this, the present invention proposes a lightweight time series classification method based on the fusion of diagonal state space and multi-scale features, comprising: Step 1: Reorganize the original time series into tensors and perform normalization. Step 2: Divide the normalized tensor into several overlapping local segments according to the time dimension using a sliding window; Step 3: Input the local segment into a pre-trained lightweight classification model to obtain the predicted classification; the lightweight classification model includes a convolutional layer, a diagonal state space model, an average pooling layer, and a classification head connected in sequence; wherein, The convolutional layer is used to map each local segment into a local feature vector; The angular state space model is used to obtain a corresponding tensor of equal length based on local feature vectors, thereby realizing global modeling of the angular state space. The average pooling layer is used to perform global average pooling on the tensor output by the diagonal state space model to obtain the global feature vector corresponding to the original time series. The classification head is used to obtain a predicted classification based on the global feature vector.

[0006] As an improvement to the above method, the tensor in step 1 is a three-dimensional tensor including batch size B, time length L, and number of channels C, where batch size B represents the number of original time series samples input to the model at one time, time length L represents the number of time points contained in each time series, and number of channels C represents the feature dimension or number of signal channels corresponding to each time point.

[0007] As an improvement to the above method, step 2 employs a sliding window segmentation, specifically including: The window length is defined as X consecutive time points, and the sliding step is defined as Y time points, where X>Y; Starting from the beginning of the timeline, X consecutive time points are taken as the first segment. The window then moves Y time points each time, repeating the extraction of subsequent segments. Segmentation stops when the right end of the next window exceeds the end of the sequence, retaining only complete segments of length X. A tensor is constructed based on the number of segments P, and the time length dimension and channel dimension of each segment are merged into a feature dimension F, where... The tensor after segmentation is a three-dimensional array including batch size B, feature dimension F, and number of segments P.

[0008] As an improvement to the above method, the convolutional layer employs one-dimensional convolution.

[0009] As an improvement to the above method, the processing procedure for the diagonal state-space model includes: The input local feature vectors and convolution kernels are subjected to Fast Fourier Transform (FFT) respectively. They are multiplied point by point in the frequency domain to achieve convolution. Then, the inverse Fast Fourier Transform is used to return to the time domain to obtain the convolution result. A channel-wise residual term is added and broadcast in the fragment dimension. Lightweight enhancement and channel mixing of fragment-level features are performed through non-linear activation, Dropout, pointwise convolution, gated linear units, and depthwise separable convolution. The output tensor is consistent with the input fragment-level feature sequence in both the fragment number dimension and the feature dimension.

[0010] As an improvement to the above method, the processing of the average pooling layer specifically includes: The global feature vector corresponding to the original time series is obtained by averaging the output tensors of all segments along the segment dimension.

[0011] As an improvement to the above method, the classification head uses a linear fully connected layer.

[0012] As an improvement to the above method, the method further includes a training step for a lightweight classification model, in which the output predicted classification and the true label input cross-entropy loss function are optimized to obtain a trained lightweight classification model.

[0013] On the other hand, the present invention provides a lightweight time series classification system based on the fusion of diagonal state space and multi-scale features, comprising: The normalization module is used to convert the original time series into tensors and perform normalization processing. The window segmentation module is used to segment the normalized tensor into several overlapping local segments according to the time dimension using a sliding window. A classification output module is used to input local segments into a pre-trained lightweight classification model to obtain a predicted classification; the lightweight classification model includes a convolutional layer, a diagonal state space model, an average pooling layer, and a classification head connected in sequence; wherein... The convolutional layer is used to map each local segment into a local feature vector; The angular state space model is used to obtain a corresponding tensor of equal length based on local feature vectors, thereby realizing global modeling of the angular state space. The average pooling layer is used to perform global average pooling on the tensor output by the diagonal state space model to obtain the global feature vector corresponding to the original time series. The classification head is used to obtain a predicted classification based on the global feature vector.

[0014] Compared with the prior art, the advantages of the present invention are: This invention proposes a multi-scale time series classification framework for low latency and lightweight deployment. It tightly couples local detail extraction via "sliding window piecewise convolution embedding" with global long dependency modeling via "diagonal state space (S4D) + low-rank correction" within the same pipeline, achieving low-loss complementary information through time-domain and frequency-domain residuals. Structurally, it employs FFT / IFFT to efficiently apply one-dimensional convolution kernels, making the computational complexity grow nearly linearly / logarithmically with sequence length while decoupling parameter size from length. It introduces reversible instance normalization to suppress distribution drift caused by devices or scenarios and improve robustness across lengths. Through depthwise separable convolution, pointwise convolution, and GLU, it constructs a lightweight information filtering and channel mixing mechanism to enhance the response to bursty and boundary patterns, thereby improving accuracy, stability, and real-time performance without significantly increasing parameters and computational overhead.

[0015] Under the same experimental conditions, our proposed method demonstrates high classification accuracy on multiple publicly available time-series classification datasets while maintaining low model parameter count and inference latency. Experimental results show that our method can effectively balance local detail modeling, long-range dependency modeling, and real-time inference requirements in resource-constrained scenarios, thus achieving a good balance between accuracy and efficiency. Attached Figure Description

[0016] Figure 1 This is a technical flowchart of the method of the present invention. Detailed Implementation

[0017] This invention is a lightweight sequence modeling framework that integrates a diagonal state space model and its training and inference process; and it also proposes a multi-scale feature fusion mechanism to take into account both local details and long-range dependencies under low parameter and low latency conditions.

[0018] like Figure 1As shown, this invention proposes a lightweight sequence modeling method for multi-scale time series classification. It uniformly represents local fine-grained patterns and global long-range dependencies under conditions of compact parameters and low latency, and improves robustness to changes in input length and distribution drift. The method includes the following steps: first, acquiring the input time series data and performing reversible instance normalization; then, segmenting the time series using a sliding window approach; next, mapping each local segment to fixed-dimensional features using convolutional embedding; subsequently, performing global dynamic modeling of the segment-level features using the S4D diagonal state space model; then, performing global pooling aggregation on the modeled segment features; and finally, outputting the category prediction result through a classification head.

[0019] This method consists of the following three parts: 1) Dynamic Stabilization and Local Encoding: First, Reversible Instance Normalization (RevIN) is performed on the input sequence to reduce the mean / variance differences caused by different devices, scenes and individuals; then, sliding window patching and one-dimensional convolutional embedding are used to divide the original long sequence into multiple overlapping subsequences, and each subsequence is encoded as a fixed-dimensional "local atomic feature".

[0020] 2) Global dynamic modeling: A diagonal state space model (S4D) is introduced on the segment-level sequence. A one-dimensional convolution kernel is constructed by learning complex eigenvalues ​​and weights, and the convolution with the segment sequence is efficiently completed using Fast Fourier Transform (FFT / Inverse FFT) to achieve modeling of long-term span dependence. At the same time, a channel-wise residual term is introduced to retain local information.

[0021] 3) Multi-scale feature fusion and classification: Based on the S4D output, depthwise separable convolution and pointwise linear projection can be used for lightweight multi-scale filtering and channel mixing. Global average pooling and linear classification head are used to output the probability of each category, thereby obtaining classification results that can be directly used by the terminal.

[0022] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and embodiments.

[0023] Example 1 This invention uses the publicly available time series dataset UWaveGestureLibraryAll as an example to illustrate the specific implementation process. This includes the model training phase and the model inference phase.

[0024] During the training phase, training time-series samples with true class labels are first acquired and grouped into training batches of size B, which are then input into the lightweight classification model. Each training sample sequentially undergoes reversible instance normalization, sliding window segmentation, piecewise convolutional embedding, S4D diagonal state space global modeling, fragment-dimensional feature aggregation, and classifier head prediction to obtain the corresponding class prediction result. Subsequently, the model's output prediction result and the true class label are input into the cross-entropy loss function to calculate the training loss for the current batch. Based on this training loss, the convolutional layers, diagonal state space model, low-rank correction parameters, and learnable parameters in the classifier head are updated using the backpropagation algorithm. This training process is repeated until the preset training epochs or loss function convergence conditions are met, resulting in a trained lightweight classification model.

[0025] During the inference phase, the time series to be classified is input into the trained lightweight classification model, and Steps 1 through 6 are executed to output the final classification result. This dataset is a single-channel gesture time series, with each sample having a length of L = 945 time points and K = 8 categories, corresponding to 8 different gestures. Therefore, the number of categories output by the model is fixed at num. classes = 8. The number of samples (batch size) input to the model at one time is denoted as B, and in this embodiment, B = 64; the number of channels C = 1. The input tensor can be uniformly described as a three-dimensional array with shape (B, L, C) = (64, 945, 1). It should be noted that the various specific values ​​in this embodiment are only illustrative and are not limited.

[0026] I. Parameter and Data Settings 1. Dataset: UWaveGestureLibraryAll; 2. Batch size: B = 64; 3. Time length: L = 945 (each time series contains 945 sampling points); 4. Number of channels: C = 1 (single-channel gesture signal); 5. Number of categories: K = 8, corresponding to 8 types of gestures, therefore set num. classes = 8; 6. Segment length X = 15; 7. Sliding step size Y = 5; 8. The formula for calculating the number of slices P is: P = floor((L - patch lenX) / Y) + 1 = floor((945 - 15) / 5) + 1 = 187. Where floor(·) represents rounding down, i.e., keeping only the integer part; 9. Model feature dimension d model = 64 (denoted as H = 64), indicating that each local segment is ultimately encoded as a 64-dimensional feature; 10. State space dimension d state = 32, used to control the dimension of the hidden state inside S4D; 11. The normalization method uses reversible instance normalization RevIN (revin = True).

[0027] 12. The original feature dimension of the fragment is F = patch_len × C = 15, which represents the original feature length of each local fragment before convolutional embedding; 13. The fragment-level input tensor is denoted as u, and the shape of u is (B, d). model , P) = (64, 64, 187), representing 64 samples, each sample has 187 segments, and each segment corresponds to 64-dimensional local features; 14. The low-rank correction rank r represents the rank of the low-rank compensation term in the diagonal state-space model. In this embodiment, r = 4 can be taken to supplement the expressive power of the pure diagonal structure while maintaining lightweightness. 15. The length of the residual vector D is d. model = 64, which represents the channel-by-channel residual weight applied to each feature channel; 16. The classification head parameters include the weight matrix W. cls and bias vector b cls W cls The shape is (8, 64), b cls The shape is (8,), which corresponds to the linear discriminant parameters of the 8 types of gestures.

[0028] The total number of data points actually processed in one forward propagation is approximately B × P × X × C = 64 × 187 × 15 × 1. Except for the batch size B, which can be adjusted according to hardware resources, the other parameters remain fixed in this embodiment to clarify the physical meaning and tensor shape of each variable.

[0029] II. Specific Steps Step 1: Input and Reversible Instance Normalization (RevIN) First, the original time series is reorganized into a tensor x of shape (64, 945, 1), where: The first dimension is the batch size B = 64; The second dimension is the time length L = 945; The third dimension is the number of channels, C = 1.

[0030] Batch size B represents the number of original time series samples input into the model at one time, time length L represents the number of time points contained in each time series, and number of channels C represents the feature dimension or the number of signal channels corresponding to each time point.

[0031] Then, for each sample and each channel, the mean and standard deviation are calculated along the time dimension and standardized. Let μ(b, c) be the mean of the c-th channel of the b-th sample along the time dimension, and σ(b, c) be the standard deviation. The normalization formula is: x hat = (x - μ) / (σ + ε), where ε is a very small constant used to prevent division by zero.

[0032] This process corresponds to RevIN's "norm" mode, which eliminates the overall amplitude differences caused by different individuals and different acquisition devices, making the model focus more on the shape changes of the time series rather than the absolute numerical magnitude. The shape of the tensor remains unchanged before and after normalization, still being (64, 945, 1).

[0033] Step 2: Unfold the sliding window. Using X consecutive time points as the window length and Y time points as the sliding step size, where X>Y; starting from the beginning of the time axis, take X consecutive time points as the first segment, and then move the window by Y time points each time to repeatedly extract subsequent segments; when the right end of the next window exceeds the end of the sequence, stop slicing and only retain complete segments of length X; construct the slicing tensor based on the number of segments P, and merge the time length dimension and channel dimension of each segment into the feature dimension F, where F = X × C. The slicing tensor is a three-dimensional array including the batch size B, the feature dimension F, and the number of segments P.

[0034] In this embodiment, after normalization x hat A sliding window is used to divide the data along the upper time dimension. The window length is X=15, and the sliding step is Y=5. Specifically, this means: Starting from the beginning of the timeline, take 15 consecutive time points as the first segment; then shift the window forward by 5 time points, and take another 15 consecutive time points as the second segment, and so on, until the right end of the window reaches the end of the sequence. According to the calculation formula above, each sequence is finally divided into P = 187 segments.

[0035] In practice, the sliding partitioning of the time dimension automatically cuts the original long sequence into several overlapping segments according to the specified length X and step size Y, and arranges them into a group in chronological order.

[0036] After segmentation, a tensor x with shape (B, P, X, C) = (64, 187, 15, 1) can be obtained. patch Then, the time length dimension and channel dimension of each segment are merged into a single feature dimension F, where F = X × C = 15. The dimensions are then reordered so that the number of segments P becomes the new "time axis," resulting in a tensor x with shape (B, F, P) = (64, 15, 187). patch .

[0037] The original time series with a length of 945 has been represented as 187 local segments of length 15, which are arranged in chronological order to form a new segment sequence.

[0038] Step 3: Piecewise Convolutional Embedding (Local Feature Extraction) To enhance the expressive power of each local segment, this invention uses a one-dimensional convolution (with a kernel size of 1) to map each segment from 15 dimensions to a 64-dimensional feature space. The fixed parameters of the convolutional layer are as follows: Number of input channels in channels = 15 (original feature dimension for each segment); Number of output channels (out) channels = d model = 64; The kernel size is 1.

[0039] This layer multiplies each 15-dimensional segment vector by the same set of 15×64 weight matrices, resulting in a 64-dimensional "local feature vector". After convolutional embedding, a vector of shape (B, d) is obtained. model The tensor u is (64, 64, 187) where P) = (64, 64, 187). At this point, each sample corresponds to 187 segments, and each segment has been encoded as a 64-dimensional feature vector.

[0040] Step 4: Global modeling of diagonal state space in S4D A diagonal state-space model, S4D, is introduced for global dynamic modeling on the fragment-level feature sequence u. Let the shape of the input tensor u be (B, d). model , P) = (64, 64, 187). The S4D module constructs d for each feature channel.state = 32-dimensional hidden states, the discrete state transition matrix is ​​denoted as A d = diag(λ1, λ2, …, λ 32 ) + P low Q low T , where λ i P represents the learnable feature value of the i-th state. low and Q low These are low-rank correction matrices, all of which have the shape (32, r), where r represents the low-rank correction rank. In this embodiment, r = 4 can be used.

[0041] Correspondingly, let k be the one-dimensional convolution kernel generated for each channel, and let the length of k in the segment dimension correspond to the number of segments P. Then, the one-dimensional convolution operation between u and the convolution kernel k is implemented in the frequency domain using the Fast Fourier Transform (FFT): 1. Perform FFT transformations on the input feature u and the convolution kernel k respectively; 2. Perform convolution by multiplying point by point in the frequency domain; 3. Then, perform an inverse FFT transformation to return to the time domain and obtain the convolution result.

[0042] After convolution, a channel-wise residual term D is added, where D is a term of length d. model A vector of size 64 is generated and broadcast across the fragment dimension. Then, non-linear activation, Dropout, pointwise convolution, gated linear units (GLU), and depthwise separable convolution are used to perform lightweight enhancement and channel blending on the fragment-level features, resulting in an output tensor y with the shape remaining (B, d). model , P) = (64, 64, 187).

[0043] In terms of effectiveness, S4D allows the features of each segment to take into account the contextual information of a large number of segments before and after it when updating, thus achieving the modeling of long-term dependencies while maintaining the basic decoupling of the number of parameters from the original time length L.

[0044] Where, λ i Let represent the feature value parameter corresponding to the i-th hidden state, k represent the one-dimensional convolution kernel generated by S4D, D represent the channel-wise residual vector, and y represent the fragment-level output feature after global dynamic modeling and lightweight enhancement. By explicitly defining these parameters and variables, the structural meaning, computational process, and implementation boundaries of the model can be made clearer.

[0045] Step 5: Fragment-dimensional feature aggregation (global pooling) To obtain a holistic representation of each time series, this invention performs global average pooling on the S4D output y along the segment dimension P. Specifically: For the b-th sample, the 64-dimensional features corresponding to its 187 segments are averaged over the segment dimension to obtain a 64-dimensional vector h. b After performing this operation on the entire batch, a shape of (B, d) can be obtained. model The global characteristic tensor h is (64, 64).

[0046] The features of the 187 segments are averaged over the time axis to obtain a compact 64-dimensional "global feature vector" for each sequence.

[0047] Step 6: Classification Header and Category Prediction Based on the overall feature h, a linear fully connected layer is used as the classification head to map the 64-dimensional features to an 8-dimensional class space. Let W be the weight matrix of this classification head. cls The shape is (8, 64), and the bias vector is b. cls The shape is (8,). Its input dimension is 64, and its output dimension is num. classes = 8.

[0048] Input dimension: 64; Output dimension: num classes = 8.

[0049] After linear transformation, the output tensor o = W is obtained. cls h + b cls The shape is (B, 8) = (64, 8). Each row corresponds to the predicted score of a sample across 8 gesture categories.

[0050] During model training, the output o is input along with the true labels into the cross-entropy loss function for optimization; during inference, the category corresponding to the maximum value of the 8 scores for each sample is taken as the final prediction result. Since the UWaveGestureLibraryAll dataset has 8 gesture categories, in this embodiment, num... classes Fixed at 8. For other time series classification tasks, simply set L, C, and num to 8. classes By modifying the length, number of channels, and number of categories of the corresponding dataset, and recalculating the number of slices P according to P = floor((L -X) / Y) + 1, the method of this invention can be migrated without changing the overall structure.

[0051] By recalculating the number of segments P, the method of this invention can be migrated without changing the overall structure.

[0052] Example 2 Embodiment 2 of the present invention provides a lightweight time series classification system based on the fusion of diagonal state space and multi-scale features, implemented based on the method of Embodiment 1. The system includes: The normalization module is used to convert the original time series into tensors and perform normalization processing. The window segmentation module is used to segment the normalized tensor into several overlapping local segments according to the time dimension using a sliding window. A classification output module is used to input local segments into a pre-trained lightweight classification model to obtain a predicted classification; the lightweight classification model includes a convolutional layer, a diagonal state space model, an average pooling layer, and a classification head connected in sequence; wherein... The convolutional layer is used to map each local segment into a local feature vector; The angular state space model is used to obtain a corresponding tensor of equal length based on local feature vectors, thereby realizing global modeling of the angular state space. The average pooling layer is used to perform global average pooling on the tensor output by the diagonal state space model to obtain the global feature vector corresponding to the original time series. The classification head is used to obtain a predicted classification based on the global feature vector.

[0053] It is worth noting that in the embodiments of the above system, the modules included are divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional module are only for easy distinction between each other and are not used to limit the scope of protection of the present invention.

[0054] Example 3 Embodiments of the present invention may also provide a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, the various steps in the above method embodiments can be implemented.

[0055] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to the embodiments, those skilled in the art should understand that modifications or equivalent substitutions to the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A lightweight time series classification method based on the fusion of diagonal state space and multi-scale features, comprising: Step 1: Reorganize the original time series into tensors and perform normalization. Step 2: Divide the normalized tensor into several overlapping local segments according to the time dimension using a sliding window; Step 3: Input the local segment into a pre-trained lightweight classification model to obtain the predicted classification; the lightweight classification model includes a convolutional layer, a diagonal state space model, an average pooling layer, and a classification head connected in sequence; wherein, The convolutional layer is used to map each local segment into a local feature vector; The angular state space model is used to obtain a corresponding tensor of equal length based on local feature vectors, thereby realizing global modeling of the angular state space. The average pooling layer is used to perform global average pooling on the tensor output by the diagonal state space model to obtain the global feature vector corresponding to the original time series. The classification head is used to obtain a predicted classification based on the global feature vector.

2. The lightweight time series classification method based on diagonal state space and multi-scale feature fusion as described in claim 1, characterized in that, The tensor in step 1 is a three-dimensional tensor including batch size B, time length L, and number of channels C, where batch size B represents the number of original time series samples input into the model at one time, time length L represents the number of time points contained in each time series, and number of channels C represents the feature dimension or number of signal channels corresponding to each time point.

3. The lightweight time series classification method based on diagonal state space and multi-scale feature fusion according to claim 2, characterized in that, Step 2, which employs a sliding window segmentation, specifically includes: The window length is defined as X consecutive time points, and the sliding step is defined as Y time points, where X > Y. Starting from the beginning of the timeline, X consecutive time points are taken as the first segment. The window then moves Y time points each time, repeating the extraction of subsequent segments. Segmentation stops when the right end of the next window exceeds the end of the sequence, retaining only complete segments of length X. A tensor is constructed based on the number of segments P, and the time length dimension and channel dimension of each segment are merged into a feature dimension F, where... The tensor after segmentation is a three-dimensional array including batch size B, feature dimension F, and number of segments P.

4. The lightweight time series classification method based on diagonal state space and multi-scale feature fusion according to claim 1, characterized in that, The convolutional layer uses one-dimensional convolution.

5. The lightweight time series classification method based on diagonal state space and multi-scale feature fusion according to claim 1, characterized in that, The processing procedure for the diagonal state-space model includes: The input local feature vectors and convolution kernels are subjected to Fast Fourier Transform (FFT) respectively, and multiplied point by point in the frequency domain to achieve convolution. Then, the result is obtained by returning to the time domain through Inverse Fast Fourier Transform. A channel-wise residual term is added and broadcast in the fragment dimension. Lightweight enhancement and channel mixing of fragment-level features are performed through non-linear activation, Dropout, pointwise convolution, gated linear units, and depthwise separable convolution. The output tensor is consistent with the input fragment-level feature sequence in both the fragment number dimension and the feature dimension.

6. The lightweight time series classification method based on diagonal state space and multi-scale feature fusion according to claim 1, characterized in that, The processing of the average pooling layer specifically includes: The global feature vector corresponding to the original time series is obtained by averaging the output tensors of all segments along the segment dimension.

7. The lightweight time series classification method based on diagonal state space and multi-scale feature fusion according to claim 1, characterized in that, The classification head uses a linear fully connected layer.

8. The lightweight time series classification method based on diagonal state space and multi-scale feature fusion according to claim 1, characterized in that, The method also includes a training step for the lightweight classification model, in which the output predicted classification and the true label input cross-entropy loss function are optimized to obtain the trained lightweight classification model.

9. A lightweight time series classification system based on the fusion of diagonal state space and multi-scale features, characterized in that, include: The normalization module is used to convert the original time series into tensors and perform normalization processing. The window segmentation module is used to segment the normalized tensor into several overlapping local segments according to the time dimension using a sliding window. The classification output module is used to input local segments into a pre-trained lightweight classification model to obtain a predicted classification; the lightweight classification model includes a convolutional layer, a diagonal state space model, an average pooling layer, and a classification head connected in sequence; wherein... The convolutional layer is used to map each local segment into a local feature vector; The angular state space model is used to obtain a corresponding tensor of equal length based on local feature vectors, thereby realizing global modeling of the angular state space. The average pooling layer is used to perform global average pooling on the tensor output by the diagonal state space model to obtain the global feature vector corresponding to the original time series. The classification head is used to obtain a predicted classification based on the global feature vector.