Multi-element time sequence classification method and system based on ST-Tree

By combining Swin Transformer and neural tree model, the ST-Tree method is solved, and the combination of high accuracy and interpretability in multivariate time series classification is achieved.

CN119669912APending Publication Date: 2025-03-21SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411664469.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The prior art is difficult to take into account high accuracy and interpretability in multivariate time series classification. Deep neural network models perform excellently in accuracy but lack interpretability, while traditional decision tree models are interpretable but have low accuracy.

Method used

A multivariate time series classification method based on ST-Tree is proposed, combining Swin Transformer (ST) and neural tree model, utilizing ST to learn the time series context and provide an interpretable decision-making process through neural tree.

Benefits of technology

It realizes that while improving classification accuracy in multivariate time series classification, it provides an interpretable decision-making process, which enhances the understanding and explanatory nature of the model decision-making process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669912A_ABST
    Figure CN119669912A_ABST
Patent Text Reader

Abstract

The invention provides a multivariate time sequence classification method and system based on ST-Tree, and relates to the technical field of time sequence classification, the multivariate time sequence is input into a trained ST-Tree for route prediction, and a predicted category and a decision order are obtained; the ST-Tree comprises a feature extraction module and a hierarchical routing module; the feature extraction module is used for capturing time and space relationships among different elements in the multivariate time sequence by utilizing ST to obtain sequence features; the hierarchical routing module is used for performing hierarchical routing on a neural tree based on the similarity between sequence features and categories in tree nodes, and finally performing category prediction at leaf nodes, and paths obtained by routing form a decision sequence; according to the method, the ST and the additional neural tree model are combined, the advantage that the ST learns the context of the time sequence is fully utilized, the neural tree is utilized to provide an interpretable decision-making process, the classification accuracy is improved, and meanwhile interpretation is provided through the visual decision-making process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of time series classification, and in particular to a multivariate time series classification method and system based on ST-Tree. Background Art

[0002] Multivariate time series classification is an important and challenging task. A time series is a sequence of measurements collected from sensors. It is a set of data arranged in chronological order and widely exists in various fields and various real-world applications, including atrial fibrillation detection, error message detection, smart device detection, sleep record classification, drunkenness detection, and human activity recognition.

[0003] Time series classification is one of the important tasks in time series analysis. It is to obtain knowledge from existing labeled instances and predict labels for unknown time series instances. In recent years, more and more researchers have focused on the problem of time series classification, which has important research value in the field of data mining. High accuracy is a concern of all researchers, but interpretability is still important in many tasks. Although a lot of work has been done on the interpretability of computer vision, tabular data classification, and natural language processing, research on time series has not received so much attention.

[0004] Due to the different structures and properties of time series data, most methods cannot be directly applied to time series. In the early days of time series research, shapelet-based methods were widely studied. Shapelet provides interpretability for time series data and can describe the characteristics of time series by identifying and extracting representative shape patterns. These shape patterns can be used to explain the prediction results of the model, thereby enhancing the understanding of time series. However, long time series data will make the shapelet selection and extraction process more difficult, resulting in increased computational complexity. There is also a dictionary-based TSC method that can explain classification decisions through the distribution of symbolic words. However, this explanation is not intuitive enough because the distribution of symbolic words is difficult to judge directly. Some researchers can achieve high accuracy and interpretability by combining traditional shapelet and deep methods, but these methods are not intuitive for the classification decision process.

[0005] In recent years, a large number of methods based on deep models have been proposed, and commonly used models include CNN, RNN, FCN, LSTM, Transformer, etc. Among them, Transformer is a deep neural network model based on the self-attention mechanism, which has a strong time series modeling ability; through the self-attention mechanism, Transformer can capture the global dependencies and local patterns in time series data and extract rich feature representations; however, in many scenarios, especially in high-risk environments such as disease prediction or autonomous driving, the black-box characteristics of these models are a major disadvantage; many methods perform post-hoc interpretation through grad-cam graphs, but cannot reflect the decision-making process, because it becomes crucial to use certain methods to reflect the interpretability of the decision-making process of deep models.

[0006] Decision tree models came into being, distinguishing the granularity of the returned explanations according to the part of the time series used to explain the reasons for the decision process. There are three types: Time points-based explanations, which are achieved by considering the most important time points and presenting these to the user, such as visually, such as methods based on attention mechanisms; Subsequencesbased explanations, which refer to subsequence-based explanations that determine the sub-part of the time series responsible for the classification result, such as shapelets; Instance-based explanations, if the explanation uses the entire time series as an explanation, such as counterfactual-based methods, the counterfactual time series shows the minimum changes in the input data that lead to different decision results. In recent years, a large number of interpretable methods have been proposed.

[0007] In multivariate time series classification, both deep neural network models and decision tree models have their advantages, and two problems need to be solved urgently: interpretability and high precision; high precision: deep neural network models achieve high accuracy by learning complex feature representations, and various methods based on deep models are emerging in an endless stream. Most deep models are black boxes and are ex post explanation models; interpretability: as a transparent model, the decision tree model is interpretable and can clearly display the decision process, making the decision results easier to understand and explain; deep neural network models and decision tree models have their own advantages and limitations. Although deep neural network models have a high accuracy in multivariate time series classification, they lack interpretability and cannot provide an understanding of the decision process; in contrast, although traditional methods based on decision tree classifiers can clearly display the decision process, their accuracy is relatively low. Therefore, the existing technology is insufficient in balancing accuracy and interpretability. Summary of the invention

[0008] In order to solve the above problems, the present invention proposes a multivariate time series classification method and system based on ST-Tree, which combines ST (Swin Transformer) with an additional neural tree model, fully utilizes the advantages of ST learning time series context, and uses neural trees to provide an explainable decision process, thereby improving the classification accuracy and providing explainability through visual decision process.

[0009] According to some embodiments, the present disclosure adopts the following technical solutions:

[0010] A multivariate time series classification method based on ST-Tree, including:

[0011] Get the multivariate time series to be classified;

[0012] Input the multivariate time series into the trained ST-Tree for route prediction, and obtain the predicted category and decision order;

[0013] Among them, the ST-Tree includes a feature extraction module built based on ST and a hierarchical routing module built based on a neural tree; the feature extraction module uses ST to capture the temporal and spatial relationships between different elements in a multivariate time series to obtain sequence features; the hierarchical routing module performs hierarchical routing on the neural tree based on the similarity between the sequence features and the categories in the tree nodes, and finally performs category prediction at the leaf nodes, and the paths obtained by routing constitute a decision sequence.

[0014] According to some embodiments, the present disclosure adopts the following technical solutions:

[0015] A multivariate time series classification system based on ST-Tree, including:

[0016] The sequence acquisition module is configured to: acquire a multivariate time series to be classified;

[0017] The route prediction module is configured to: input the multivariate time series into the trained ST-Tree for route prediction, and obtain the predicted category and decision order;

[0018] Among them, the ST-Tree includes a feature extraction module built based on ST and a hierarchical routing module built based on a neural tree; the feature extraction module uses ST to capture the temporal and spatial relationships between different elements in a multivariate time series to obtain sequence features; the hierarchical routing module performs hierarchical routing on the neural tree based on the similarity between the sequence features and the categories in the tree nodes, and finally performs category prediction at the leaf nodes, and the paths obtained by routing constitute a decision sequence.

[0019] According to some embodiments, the present disclosure adopts the following technical solutions:

[0020] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the multivariate time series classification method based on ST-Tree is implemented.

[0021] According to some embodiments, the present disclosure adopts the following technical solutions:

[0022] A non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the multivariate time series classification method based on ST-Tree is implemented.

[0023] According to some embodiments, the present disclosure adopts the following technical solutions:

[0024] An electronic device comprises: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device implements the multivariate time series classification method based on ST-Tree.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] The present invention discloses a multivariate time series classification method based on ST-Tree, selects ST as the backbone network, and proposes an interpretable multivariate time series classification model ST-Tree. By combining ST with an additional neural tree model, it can fully utilize the advantages of ST in learning the time series context, and use the neural tree to provide an interpretable decision-making process, clearly understand the decision-making process of the model, and obtain meaningful insights from it. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The accompanying drawings constituting a part of the present disclosure are used to provide a further understanding of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure.

[0028] Figure 1 A schematic diagram of a method according to an embodiment of the present disclosure.

[0029] Figure 2 This is the ST-Tree structure diagram of the embodiment of the present disclosure.

[0030] Figure 3 This is a structural diagram of the time patch module of an embodiment of the present disclosure.

[0031] Figure 4 This is an example diagram of the decision sequence of an embodiment of the present disclosure. DETAILED DESCRIPTION

[0032] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.

[0033] It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present disclosure belongs.

[0034] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0035] Example 1

[0036] In one embodiment of the present disclosure, a multivariate time series classification method based on ST-Tree is provided. Figure 1 As shown, including:

[0037] Get the multivariate time series to be classified;

[0038] Input the multivariate time series into the trained ST-Tree for route prediction, and obtain the predicted category and decision order;

[0039] Among them, the ST-Tree includes a feature extraction module built based on ST and a hierarchical routing module built based on a neural tree; the feature extraction module uses ST to capture the temporal and spatial relationships between different elements in a multivariate time series to obtain sequence features; the hierarchical routing module performs hierarchical routing on the neural tree based on the similarity between the sequence features and the categories in the tree nodes, and finally performs category prediction at the leaf nodes, and the paths obtained by routing constitute a decision sequence.

[0040] As an embodiment, the present invention discloses a multivariate time series classification method based on ST-Tree, selects ST as the backbone network, combines ST with an additional neural tree model, and proposes ST-Tree, an interpretable multivariate time series classification model, which fully utilizes the advantages of ST learning the time series context, and uses the neural tree to provide an interpretable decision process, thereby improving the classification accuracy and providing interpretability through visualizing the decision process. The multivariate time series classification model ST-Tree is described in detail below.

[0041] ST-Tree, such as Figure 2As shown in the figure, it consists of two parts: a feature extraction module time patchmodule built based on ST and a hierarchical routing module neural tree module built based on neural tree.

[0042] Specifically, the time patch module uses ST to capture the temporal and spatial relationships between different elements in a multivariate time series to obtain sequence features. In order to improve the interpretability of the model and visualize the decision process, the extracted sequence feature time patch is input into the hierarchical routing module neural tree module. Based on the similarity between the sequence features and the categories in the tree nodes, the neural tree is hierarchically routed, and finally the category prediction is performed at the leaf node. The paths obtained by routing constitute the decision order.

[0043] The Neural tree module uses a binary tree to perform hierarchical routing on multivariate time series, where each node corresponds to a trained category feature extraction model prototype for extracting category features. The category features are used to calculate the similarity between the sequence features and the categories in the tree nodes, and then determine the routing direction. The sequence features are sent to the child nodes to achieve hierarchical routing, and finally routed to the leaf nodes to predict the category labels of the multivariate time series.

[0044] 1. Feature extraction module time patch module

[0045] For processing multivariate time series, traditional time series models (such as ARIMA, LSTM, etc.) may be more suitable because they can capture the temporal relationship and time dependency of time series data; and Swin Transformer can capture both fine-grained local patterns and macroscopic global patterns through the self-attention mechanism, and can also model multi-scale feature representations, thereby providing a more comprehensive time series feature representation, so it still has advantages for processing multivariate time series: ST's patch-based processing strategy can divide time series data into multiple subsequences, which can be processed in parallel; by introducing the self-attention mechanism, different time steps in the time series can be contextually modeled, which enables the model to capture the temporal relationship and time dependency in the time series data; therefore, this embodiment constructs a feature extraction module time patch module based on Swin Transformer to effectively extract sequence features.

[0046] The structure of the time patch module is as follows Figure 3 As shown, it includes n groups of time partition blocks and swing transformer blocks, that is, Figure 3 The time partition block performs time segmentation on the input multivariate time series and extracts local features from the obtained multiple subsequences respectively; the swing transformer block performs interaction between adjacent local features based on the shift window mechanism to finally obtain sequence features.

[0047] Specifically, time partition block is used as the first step to segment and obtain local features. The multivariate time series T(L×C) is segmented (reshaped) using 4 non-overlapping adjacent timestamps to obtain subsequences, embed the subsequences, and finally get the dimension The swing transformer block is used as the second step to interact and refine the features and obtain the final sequence features.

[0048] The specific structure of the swing transformer block is as follows: Figure 3 As shown in the figure, it includes Attention, Self Attention, SHIFT (Shifted Window Attention), Attention, and Self Attention. Attention is conducive to feature refinement, while Self Attention can connect different positions of the sequence to derive the relationship at a specific position. Embedding attention into the self-attention structure helps it obtain more distinguishable features.

[0049] The calculation formula for self-attention is shown in Formula 1:

[0050]

[0051] Where query (Q), key (K), and value (V) are feature matrices extracted from the attention layer. In Formula 1, SoftMax is a commonly used function to calculate the probability of a certain matrix. Attention is the function of the attention layer, which is used to obtain the Q, K, and V matrices.

[0052] Although calculating self-attention within a window may greatly reduce the complexity of the model, different windows cannot interact with each other, which makes the model less expressive. In order to better enhance the expressiveness of the model, SHIFT (Shifted Window Attention) is introduced. A shifted window mechanism is used to shift between consecutive SwinTransformer blocks, limiting the self-attention calculation to non-overlapping local time patch windows, so that the attention between each time patch can interact. Therefore, the temporal and spatial relationship between different elements in the sequence can be captured, thereby obtaining contextual features, namely sequence features. The entire feature extraction module is represented by f, and the formula is:

[0053] z 0 =f(x;θ)

[0054] Among them, z 0 is the final extracted sequence feature, x is the input multivariate time series, and θ is the parameter of the feature extraction module training.

[0055] 2. Hierarchical routing module neural tree module

[0056] The hierarchical routing module uses a perfect binary tree to perform hierarchical routing on the neural tree based on the similarity between sequence features and categories in tree nodes, and finally makes category predictions at leaf nodes. The paths obtained by routing constitute a decision sequence to achieve interpretable multivariate time series recognition.

[0057] Define the ST-Tree for supervised learning. Consider a training set T for a classification problem containing m labeled multi-source time series, where each multivariate time series is represented as {(x (1) ,y (1) ),...,(x (m) ,y (m) )}∈X×Y. Given the input multivariate time series x, ST-Tree predicts the category probability distribution of K categories, expressed as Let y represent the true label y for one-hot encoding so that The cross entropy loss between is used to train ST-Tree.

[0058] This embodiment proposes a hierarchical routing module using a perfect binary tree and a differentiable routing mechanism. The proposed module consists of an internal node set N(·), a leaf node set L(·), and an edge set E between a parent node i and a child node j. i,j (·) composition; since the model uses a perfect binary tree, each internal node has two child nodes: N2×i and N 2×i+1 Given the sequence feature z extracted by the feature extraction module 0 , the proposed module predicts the final class label in a soft decision manner

[0059] Two submodules are deployed on the internal nodes: an attention module and a branch routing module; the attention module uses the spatial and channel attention mechanisms to enhance the sequence features input to the current node to obtain discriminative sequence features; the branch routing module determines the routing direction based on the discriminative features and sends the discriminative sequence features to the child nodes, where the routing direction is to select which child node of the current node, and the selection is based on the similarity between the sequence features and the categories in the tree nodes. The similarity here is calculated using the Euclidean distance to calculate the similarity between the sequence features input to the current node and the category features, and the category features are learned from samples of preset categories in the training data set.

[0060] 1. Attention Module

[0061] The attention module is used to force the model to capture discriminative features. Discriminative features are one of the key factors for the successful classification of time series classification tasks. Therefore, a spatial and channel attention module is proposed. The spatial and channel attention mechanism is used to enhance the sequence features input to the current node to obtain discriminative sequence features, specifically:

[0062] The attention module obtains the attention map along two independent dimensions, channel and space, and then performs adaptive feature refinement on the attention map to obtain discriminative sequence features. Finally, the sequence features are input into the corresponding child nodes / leaves.

[0063] Channel Attention:

[0064] First, the spatial information of the feature map is aggregated using average pooling and maximum pooling operations to generate two different spatial context descriptors, representing the average pooling feature and the maximum pooling feature respectively. Finally, the two are concatenated and the channel attention is calculated as formula (2).

[0065] Spatial Attention:

[0066] The relationship between feature spaces is used to generate a spatial attention map, which is a complement to channel attention. First, average pooling and maximum pooling operations are applied along the channel axis and they are concatenated to generate a valid feature descriptor. The calculation method of spatial attention is formula (3).

[0067] The final attention module is represented by attent ion, and the specific formula is:

[0068] z=sigmoid(f a [AvgPool(p i ));MaxPool(z i )]) (2)

[0069] z j =sigmoid(f a [AvgPool(p);MaxPool(z)]) (3)

[0070] z j =attention(z i ) (4)

[0071] Among them, f a represents a one-dimensional convolution operation with a filter size of a, z i is the sequence feature of the current node input, z j is a discriminative sequence feature, and z is an intermediate variable.

[0072] 2. Branch routing module

[0073] When the attention module captures discriminative sequence features, the differentiable routing module determines the routing direction and sends the sequence features to the child nodes of the current node. Specifically, each internal node corresponds to a trainable category feature prototype = P i ∈R H1×W1×D ; Each prototype is a trainable tensor, which is used to calculate the similarity between the sequence features input to the current node and the prototype, that is, to calculate P i and sequence features z∈R H×W×D The square of similarity L 2 As the routing score N i ∈[0,1].

[0074] Each category has a prototype feature vector, that is, the category feature, which is a typical representation of the category. The prototype feature vector can be calculated through the samples of the category in the training data set. So how to measure the similarity between the prototype and the multivariate time series, and interpret it through the prototype: the similarity measurement is to interpret the extracted features by analyzing the source position of the prototype. The specific analysis method is: use the prototype as a convolution kernel, convolve the multivariate time series, find the position with the largest weight, which is the source position of the sequence feature, and use the weight as the similarity. Then calculate the square of the similarity Euclidean distance. For the distance between the prototype feature vector and the sequence feature, use the square of the Euclidean distance to measure the similarity between them.

[0075] Specifically, for each sequence feature, ST-tree calculates the square of the Euclidean distance between it and the prototype of each category. This distance value is considered to be the similarity score between the sequence feature and the category prototype. A smaller distance value indicates a higher similarity score. In order to define the similarity between the prototype and the sequence feature in each node, a convolution operation is used to measure the distance, where each prototype operates on the sequence feature z as a convolution kernel and calculates the distance between the prototype and its current sequence feature z. In order to guide the similarity from the distance, the logarithmic similarity measurement is used in formula (5). When the distance is close to the sequence feature it receives, it has a high similarity:

[0076]

[0077] The routing score N(z i ) gives the nearest simplified sequence feature z∈R 1×D and category feature P i The similarity between them, the routing score of each child node, is expressed as:

[0078]

[0079]

[0080] in, are the routing scores of the two child nodes respectively.

[0081] After calculating the score, the discriminative features extracted from the current node are used as sequence features and sent to the child nodes with high scores.

[0082] 3. Label prediction module

[0083] (1) Each leaf node corresponds to a label prediction module used to predict the category probabilities of the K categories that need to be learned. Let ρ(z i ) is the sequence feature z extracted by the feature extraction module i In a specific path p l The cumulative routing score ρ(z i ) is calculated by using formula (6):

[0084]

[0085] in, Represents the route from node i to child node j. i,j Indicates that the input feature z of node i i A function that converts node i and child j.

[0086] (2) Each label prediction module is formed by global average pooling (GAP), global maximum pooling (GMP), a global fully connected layer (GFC) with shared weights, a local fully connected layer (LFC), and layer normalization (LN), as shown in Figure 2 As shown in (d), the formula of the label prediction module is as follows:

[0087]

[0088] In formula (7), the leaf node learns the local view of the sequence features sent by the parent node through LFC, while GFC provides the leaf node with the initial sequence features extracted by the feature extraction module.

[0089] (3) Final prediction is calculated by predicting all leaves Multiply by the cumulative routing score ρ l It is calculated by the sum of , and optimized with the true label y using the negative log-likelihood loss function, as shown in formula (8):

[0090]

[0091] in, Represents a collection of leaf nodes.

[0092] This embodiment uses 10 multivariate time series benchmark data sets from UEA archive for experimental evaluation. ST-Tree uses three-layer trees. The experiments are carried out in python 3.9 and pytorch 1.10. The results of all data sets are obtained after 50 iterations. The comparison results with existing methods (ED-1NN, DTW-1NN, MLSTM-FCN, WEASEL+MUSE, MR-PETSC, DA-Net, MTSC_FF, MF-Net, TS-TCC, TNC) are shown in Table 1. Table 1 shows the accuracy of all methods. The corresponding parameters are all from the data published in the corresponding papers. In Table 2, "AVG" represents the average accuracy of the 10 data sets achieved by the corresponding method, and "Win" represents the number of data sets where the corresponding method obtains the best accuracy. The highest accuracy of each data set is bolded, and the best result will be bolded:

[0093] Table 1 Comparison results

[0094]

[0095]

[0096] As can be seen from Table 1, ST-tree has the highest average accuracy (0.789) on the 10 data sets, proving that the ST-tree model has improved accuracy in multivariate time series classification tasks.

[0097] This embodiment also visualizes the decision process in the classification process on the BasicMotions, CharacterTrajectories, and AtrialFibrillation datasets. Figure 4 is the final decision sequence diagram obtained on BasicMotions. The orange part in the figure is the source location of the sequence features extracted from each internal node, and the arrows represent the decision order.

[0098] pass Figure 4 It can be seen that the method of this embodiment can visualize the local explanation of the decision sequence displayed on the time series, providing explanation for the visualization decision process.

[0099] In summary, this embodiment selects ST as the backbone network and proposes ST-Tree, an interpretable multivariate time series classification model. By combining ST with an additional neural tree model, it can fully utilize the advantages of ST learning time series context and use neural trees to provide interpretable decision-making processes, which enables researchers to clearly understand the decision-making process of the model and gain meaningful insights from it. Experimental evaluation on 10 UEA datasets proves that the ST-tree model improves the accuracy of multivariate time series classification tasks and provides interpretability by visualizing the decision process on different datasets.

[0100] Example 2

[0101] In one embodiment of the present disclosure, a multivariate time series classification system based on ST-Tree is provided, comprising:

[0102] The sequence acquisition module is configured to: acquire a multivariate time series to be classified;

[0103] The route prediction module is configured to: input the multivariate time series into the trained ST-Tree for route prediction, and obtain the predicted category and decision order;

[0104] Among them, the ST-Tree includes a feature extraction module built based on ST and a hierarchical routing module built based on a neural tree; the feature extraction module uses ST to capture the temporal and spatial relationships between different elements in a multivariate time series to obtain sequence features; the hierarchical routing module performs hierarchical routing on the neural tree based on the similarity between the sequence features and the categories in the tree nodes, and finally performs category prediction at the leaf nodes, and the paths obtained by routing constitute a decision sequence.

[0105] Example 3

[0106] In one embodiment of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the multivariate time series classification method based on ST-Tree is implemented.

[0107] Example 4

[0108] In one embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the multivariate time series classification method based on ST-Tree is implemented.

[0109] Example 5

[0110] In one embodiment of the present disclosure, an electronic device is provided, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes and implements the multivariate time series classification method based on ST-Tree.

[0111] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0113] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Technical personnel in the relevant field should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.

Claims

1. A multivariate time series classification method based on ST-Tree, characterized in that: include: Get the multivariate time series to be classified; Input the multivariate time series into the trained ST-Tree for route prediction, and obtain the predicted category and decision order; The ST-Tree includes a feature extraction module based on ST and a hierarchical routing module based on a neural tree; the feature extraction module uses ST to capture the temporal and spatial relationships between different elements in a multivariate time series to obtain sequence features; The hierarchical routing module performs hierarchical routing on the neural tree based on the similarity between the sequence features and the categories in the tree nodes, and finally performs category prediction at the leaf nodes. The paths obtained by routing constitute the decision sequence.

2. A multivariate time series classification method based on ST-Tree as claimed in claim 1, characterized in that: The feature extraction module includes multiple groups of time partition blocks and swing transformer blocks; The time partition block performs time segmentation on the input multivariate time series and extracts local features from the obtained multiple subsequences respectively; The swing transformer block, based on a shift window mechanism, performs interaction between adjacent local features and finally obtains sequence features.

3. A multivariate time series classification method based on ST-Tree as claimed in claim 1, characterized in that: The hierarchical routing module uses a differentiable routing mechanism to construct a perfect binary tree consisting of an internal node set, a leaf node set, and an edge set between a parent node and a child node.

4. A multivariate time series classification method based on ST-Tree as claimed in claim 3, characterized in that: Each internal node in the internal node set includes two modules: an attention module and a branch routing module; The attention module uses the spatial and channel attention mechanisms to enhance the sequence features input to the current node to obtain discriminative sequence features; The branch routing module determines the routing direction according to the discriminative features and sends the discriminative sequence features to the child nodes.

5. A multivariate time series classification method based on ST-Tree as claimed in claim 4, characterized in that: The similarity between the feature and the category in the tree node is calculated by using the Euclidean distance to calculate the similarity between the sequence feature input to the current node and the category feature.

6. A multivariate time series classification method based on ST-Tree as claimed in claim 5, characterized in that: The category features are learned from samples of preset categories in the training data set.

7. A multivariate time series classification system based on ST-Tree, characterized in that: include: The sequence acquisition module is configured to: acquire a multivariate time series to be classified; The route prediction module is configured to: input the multivariate time series into the trained ST-Tree for route prediction, and obtain the predicted category and decision order; The ST-Tree includes a feature extraction module based on ST and a hierarchical routing module based on a neural tree; the feature extraction module uses ST to capture the temporal and spatial relationships between different elements in a multivariate time series to obtain sequence features; The hierarchical routing module performs hierarchical routing on the neural tree based on the similarity between the sequence features and the categories in the tree nodes, and finally performs category prediction at the leaf nodes. The paths obtained by routing constitute the decision sequence.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the multivariate time series classification method based on ST-Tree described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by the processor, the multivariate time series classification method based on ST-Tree as described in any one of claims 1 to 6 is implemented.

10. An electronic device, characterized in that: include: A processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device implements a multivariate time series classification method based on ST-Tree as described in any one of claims 1 to 6.