A long time series classification method based on graph neural network
Through the long-time series classification method based on graph neural network, using segmentation mechanism and shared neural network strategy, local and global features of time series are extracted, and the large computing resource consumption and poor classification effect of long-time series classification tasks in the existing technology is solved. The problem of this achieves more efficient classification effect.
Patent Information
- Application Number
- CN202210588513.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-05-26
AI Technical Summary
When handling long-time series classification tasks, the prior art consumes huge computing resources, has a long calculation time and poor classification effect.
Using a long-term time series classification method based on graph neural network, the scale of time series map map is reduced through a segmentation mechanism, and the adjacency matrix and shared neural network strategy are shared. The graph neural network extracts local features and combines the recurrent neural network to extract the global Features are finally classified through a fully connected neural network.
Effectively extracting local and global features reduces the data scale and model parameters, significantly improves the accuracy of long-term series classification, and reduces computing resource consumption and computing time.
Smart Images

Figure CN114897090B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of network science, data mining and data analysis technology, and in particular to a long time series classification method based on graph neural network. Background Art
[0002] Time series is one of the indispensable features of many data and has a wide range of applications, such as in radio signal recognition (Reference [1]: Chen Z, Cui H, Xiang J, et al. SigNet: A Novel Deep Learning Framework for Radio Signal Classification [J]. IEEE Transactions on Cognitive Communications and Networking, 2021, Chen Z, Cui H, Xiang J, et al., Signal Network: A Novel Deep Learning Framework for Radio Signal Classification, IEEE Transactions on Cognitive Communications and Networking, 2021.), stock prediction (Reference [2]: Qian MC, Jiang ZQ, Zhou W X. Universal and nonuniversal allometric scaling behaviors in the visibility graphs of world stock market indices [J]. Journal of Physics A: Mathematical and Theoretical, 2010, 43 (33): 335002, ... WX, Universal and non-universal allometric scaling behavior in the visualization graph of world stock market indices, Journal of Physics A: Mathematical and Theoretical, 2010, 43(33): 335002.), EEG onset detection (Reference [3]: Supriya S, Siuly S, Wang H, et al. Weighted visibility graph with complex network features in the detection of epilepsy [J]. IEEE Access, 2016, 4: 6554-6566, Supriya S, Siuly S, Wang H, et al., Application of weighted visibility graph with complex network features in the detection of epilepsy [J]. IEEE Access, 2016, 4: 6554-6566.), Weather prediction (Reference [4]: Telesca L, Lovallo M.Analysis of seismic sequences by using the method of visibility graph[J].EPL(Europhysics Letters),2012,97(5):50002, namely Telesca L, Lovallo M, Analysis of seismic sequences by using the visibility graph method, EPL(Europhysics Letters),2012,97(5):50002.), traffic trends (reference [5]: Liu H, Zhang X, Zhang X. Exploring dynamic evolution and fluctuation characteristics of air traffic flow volume time series: A single waypoint case[J]. Physica A: Statistical Mechanics and its Applications,2018,503:560-571, namely Liu H, Zhang X, Zhang X, Exploring dynamic evolution and fluctuation characteristics of air traffic flow volume time series: A single waypoint case, Physica A: Statistical Mechanics and its Applications,2018,503:560-571.), financial forecasting (reference [6]: Wang N, Li D, Wang Q. Visibility graph analysis on quarterlymacroeconomic series of China based on complex network theory[J]. Physica A: Statistical Mechanics and its Applications, 2012, 391(24): 6543-6555.) and other applications. Tasks involving time series can be mainly divided into two types: classification tasks based on time series and prediction tasks based on time series. This invention mainly studies the classification problem of long time series. Time series classification is an important and challenging problem in data mining. With the development of deep learning technology and the successful application of convolutional neural networks in the field of image vision, more and more researchers have applied it to time series data and achieved excellent results. In addition, recurrent neural networks, which are highly compatible with time series, have also achieved classification results that are superior to traditional methods in this field. Later, with the rise of graph neural networks, joint research on network graphs and time series began to emerge, and even achieved better classification results than convolutional neural networks. .
[0003] Network graphs and time series are two typical data in the real world. Network graphs are often used to describe the topological structure of many complex systems, where nodes represent subsystems and edges in network graphs are used to characterize the relationships between subsystems; while time series are often used to capture the temporal dynamic characteristics of these subsystems. With the development of the field of complex networks, researchers began to consider mapping time series into network graph data, and then converting time series classification tasks into network graph classification tasks, and combined with graph neural networks to achieve excellent classification results. There are many methods in the academic community today that use complex network theory to achieve time series classification tasks, such as traditional methods such as visibility graph (VG), horizontal visibility graph (HVG) and limited traversal visibility graph (LPVG) and deep learning methods such as adaptive visibility graph (AVG) combined with graph neural network (reference [7]: Xuan Q, Zhou J, Qiu K, et al. Adaptive Visibility Graph Neural Network and Its Application in Modulation Classification [J]. IEEE Transactions on Network Science and Engineering, 2022, i.e. Xuan Q, Zhou J, Qiu K, et al., Adaptive Visibility Graph Neural Network and Its Application in Modulation Classification, IEEE Transactions on Network Science and Engineering, 2022.), and experiments have shown that these network building methods can extract and retain the periodicity, fractal, chaotic dynamics and other characteristics of time series. However, the network construction process of the traditional mapping algorithm is very time-consuming, and the method combined with the graph neural network consumes huge computing resources. Moreover, as the length of the time series increases, the time consumption of the above methods increases exponentially and the classification effect gradually deteriorates or even has no effect. Therefore, it is very meaningful to combine graph neural networks with existing research to design a model that is more suitable for long time series classification tasks.
[0004] The technical solution disclosed in the patent with application number CN201610889168.1 is an EEG signal analysis method based on complex networks and its application. This method classifies EEG signal sequence data sets, and after normalizing and filtering the original EEG signals, constructs a horizontal finite traversal visual graph complex network for each multi-scale EEG signal, and then calculates and extracts the characteristic indicators of each network graph, and finally combines the support vector machine classifier in machine learning to achieve the classification of EEG signal sequences. Similar visual graph network construction algorithms take a long time to calculate and consume a lot of computation when processing long time series classification tasks, and traditional machine learning methods are also quite limited in their ability to extract network graph features, resulting in poor long time series classification results. Summary of the invention
[0005] In response to the above technical problems, the present invention provides a long time series classification method based on graph neural network.
[0006] To achieve the above object, the present invention adopts the following technical solution:
[0007] A long time series classification method based on graph neural network, comprising:
[0008] Step S1: Collect sample data sets, set the number of segments and segment the time series data;
[0009] Step S2: setting the initial adjacency matrix of the network graph corresponding to each segment in the time series, and each segment of each time series shares the corresponding adjacency matrix, and converting each time series data into corresponding network graph data;
[0010] Step S3: Using a graph neural network to extract features from the network graph data corresponding to the segmented time series, and synchronously updating the adjacency matrix of the network graph corresponding to each segmented time series to obtain a local feature vector of each segment of the time series data;
[0011] Step S4: using a recurrent neural network to perform global feature extraction on the local feature vectors of the above time series data to obtain the final feature vectors of each segmented time series data;
[0012] Step S5: Fuse the feature vectors of each segmented time series data and use a fully connected neural network to complete the classification of the time series;
[0013] Step S6: Adjust the number of segments and the initial adjacency matrix of the network graph corresponding to each segment time series, and repeat steps S2 to S5 until the classification effect is optimal.
[0014] Preferably, step S1 specifically includes:
[0015] Step S1.1: Establish a sample data set, wherein the sample data set includes each time point and a single or multiple sampling values corresponding to each time point;
[0016] Step S1.2: Set the number of segments n, divide the time series data of length L into equal intervals, and round down the length of each segment to the integer l = [L / n].
[0017] Preferably, in step S2, the field of view window w parameter is preset, the adjacency matrix of the network graph corresponding to each segment in the time series is initialized, and each segment of each time series shares the corresponding adjacency matrix, and each time series data is converted into corresponding network graph data, and the collection of network graph data converted from a single time series data is recorded as The time points of the time series are mapped to nodes of the network graph, and a single or F sample values at each time point are used as the features of the corresponding node. G is the network graph, and X∈R l×F Represented as the node feature of the network, A∈R l×l Represented as an adjacency matrix of a network graph.
[0018] Preferably, step S3 specifically includes:
[0019] Step S3.1: The network graph corresponding to each time series passes through the same number of layers of graph neural network in turn, and the node features are updated as the local feature extraction of each time series. Among them, the node feature of the mth layer of the network graph corresponding to the i-th time series is The network graphs corresponding to each segment are updated by m layers of GNN and the network graph set is The network node feature X (m) ∈R l×h , and its dimension h can be adjusted and specified by itself;
[0020] Step S3.2: Use global cumulative pooling to pool the network node features X (m) Accumulated pooling is As the local feature vector of each segment, its set is recorded as
[0021] Preferably, step S4 specifically includes:
[0022] Step S4.1: Concatenate the local feature vectors of the above segmented time series in a vertical form to obtain a local feature matrix in Indicates vertical splicing;
[0023] Step S4.2: Use a recurrent neural network to train the local feature matrix Φ∈R n×h Perform global feature extraction, and obtain the final feature matrix Φ'∈R after Φ passes through multiple layers of RNN n×h, where Φ'=RNN(Φ).
[0024] Preferably, in step S5, the feature vector Φ' representing each signal is flattened and then passed through multiple fully connected layers to achieve classification.
[0025] Preferably, in step S2, the process of initializing the adjacency matrix of the network graph corresponding to each segment and constructing the network graph is as follows: Let Y = {y i} i=1,2,...,l is a time series with a segment length of l, w is the visible window size, and each time point has F observations, that is, y i ∈R F First, each time point in the segmented time series is mapped to each node in the network. According to the size of the visible window w, each node is connected to its w adjacent nodes. The initial weight of each edge is 1, that is,
[0026]
[0027] And A is set as a learnable parameter and updated iteratively during the model training process.
[0028] The beneficial effects of the present invention are as follows:
[0029] When processing long time series related tasks, the existing network graph mapping methods consume large computing resources, take a long time to operate, and have poor classification results. The present invention aims to provide a long time series classification method based on graph neural network, which can effectively extract local features and global features while using a smaller data scale and lower model parameter amount than other network graph mapping methods, and performs better in long time series classification tasks.
[0030] 1. The scale of the time series graph mapping network graph is reduced through the segmentation mechanism, and each time series shares the adjacency matrix, which compresses the data scale; the strategy of shared neural network is adopted to compress the model parameters.
[0031] 2. Use graph neural network to extract local features of each segmented time series, and synchronously train the adjacency matrix of the network graph corresponding to each segmented time series during the model training process to make the graph mapping more reasonable.
[0032] 3. Use recurrent neural network to extract the temporal features between each segmented time series, so that the final feature vector takes into account both local and global features to achieve better long time series classification results.
[0033] 4. This method only needs to adjust the preset number of segments and the initialization settings of the adjacency matrix. The adjacency matrix, graph neural network and recurrent neural network corresponding to the above segmented time series can be trained synchronously, which greatly reduces the operation complexity and speeds up the optimization efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0035] Figure 1 is a flow chart of the method of the present invention;
[0036] Figure 2 A schematic diagram of the time series segmentation and network construction method of the present invention;
[0037] Figure 3 It is a schematic diagram of the local feature extraction method of the network graph corresponding to the segmented time series based on the graph neural network according to the present invention;
[0038] Figure 4 A schematic diagram of a time series global feature extraction method based on a recurrent neural network according to the present invention;
[0039] Figure 5 A schematic diagram of feature fusion and classification according to the present invention. DETAILED DESCRIPTION
[0040] The present invention is described in detail below with reference to the accompanying drawings and based on the modulation signal data set RML2018.01A, taking the radio modulation identification task as an example. In the accompanying drawings or descriptions, similar or identical parts use the same reference numerals, and in practical applications, the shape, thickness or height of each component can be enlarged or reduced. The various embodiments listed in the present invention are only used to illustrate the present invention and are not intended to limit the scope of the present invention. Any obvious modifications or changes made to the present invention do not depart from the spirit and scope of the present invention.
[0041] like Figure 1 As shown, a radio modulation identification method using the method of the present invention is provided, comprising the following steps:
[0042] Step S1: time series data segmentation, including two steps: establishing a sample data set and data segmentation;
[0043] Step S1.1: Establish a sample data set, which includes each time point and a single or multiple sampling values corresponding to each time point. In RML2018.01A, a single modulated signal consists of a real part I and an imaginary part Q, that is, a single time point has two sampling values, and the signal length is 1024;
[0044] Step S1.2: Figure 2 As shown, for the data set RML2018.01A, the number of segments n is set to 16, and the time series data with a length of L = 1024 is divided into equal intervals, and the length of each segment is rounded down to l = [L / n] = 64.
[0045] Step S2: Each segment constructs a network diagram, such as Figure 2 As shown in the figure, for the dataset RML2018.01A, the preset field of view w parameter is 4, each time series data is converted into the corresponding network graph data, and the set of network graph data converted from a single time series data is recorded as Among them, the time points of the time series are mapped into nodes of the network graph, and the IQ sampling value of each time point is used as the feature of its corresponding node. G is the network graph, X∈R 64×2 Represented as the node feature of the network, A∈R 64×64 Represented as an adjacency matrix of a network graph.
[0046] Step S3: Extract features within the graph neural network segment, such as Figure 3 As shown, it includes two steps: shared GNN convolution and global accumulation pooling;
[0047] Step S3.1: The network graph corresponding to each time series passes through the same number of layers of the graph neural network in turn, and the node features are updated as the local feature extraction of each time series. For the dataset RML2018.01A, the preset number of GNN layers m is 4, and the hidden layer dimension h is 64. Among them, the node feature of the 4th layer of the network graph corresponding to the i-th time series is The network graphs corresponding to each segment are updated by 4 layers of GNN. The network node feature X (4) ∈R 64×64 ;
[0048] Step S3.2: Use global cumulative pooling to pool the network node features X (4) Accumulated pooling is As the local feature vector of each segment, its set is recorded as
[0049] Step S4: Recurrent neural network segment feature extraction, such as Figure 4 As shown, it includes two steps: local feature vertical splicing and recurrent neural network feature extraction;
[0050] Step S4.1: Concatenate the local feature vectors of the above segmented time series in a vertical form to obtain a local feature matrix in Indicates vertical splicing;
[0051] Step S4.2: Use a recurrent neural network to train the local feature matrix Φ∈R 16×64 Perform global feature extraction. For the dataset RML2018.01A, Φ passes through two layers of RNN to obtain the final feature matrix Φ'∈R 16×64 , where Φ'=RNN(Φ).
[0052] Step S5: Classification of fully connected layers after feature fusion, such as Figure 5 As shown, for the dataset RML2018.01A, according to the above preset parameters, the feature vector Φ' representing each signal is flattened to obtain a feature vector with a corresponding dimension of 1024, and classification is achieved after passing through multiple layers of fully connected layers.
[0053] Step S6: Adjust the number of segments n and the size of the field of view w according to the classification result, and repeat steps S2 to S5 until the classification effect is optimal.
[0054] Step S7: Perform a modulation recognition test on the radio modulation signal dataset RML2018.01A on the trained model to obtain the index of the maximum probability output of the Softmax function layer after each signal passes through the model. The index is the unique digital label of the current signal, where 0-23 represents OOK, 4ASK, 8ASK, BPSK, QPSK, 8PSK, 16PSK, 32PSK, 16APSK, 32APSK, 64APSK, 128APSK, 16QAM, 32QAM, 64QAM, 128QAM, 256QAM, AM-SSB-WC, AM-SSB-SC, AM-DSB-WC, AM-DSB-SC, FM, GMSK and OQPSK respectively.
[0055] In step S2, the process of initializing the network graph adjacency matrix corresponding to each segment and constructing the network graph is as follows: for the data set RML2018.01A, let Y = {y i} i=1,2,...,64 is any time series with a segment length of 64 in the data set, w is the visible window size, initially set to 4, and each time point has two observations of IQ, i.e., y i ∈R 2 First, each time point in the segmented time series is mapped to each node in the network. According to the size of the visible window w, each node is connected to its four adjacent nodes, and the initial weight of each edge is 1, that is,
[0056]
[0057] And A is set as a learnable parameter and updated iteratively during the model training process.
[0058] In step S3, the GNN model used in the method of the present invention is GraphSAGE. The method of the present invention superimposes three layers of GraphSAGE and adds a batch normalization (BN) layer between the layers as the feature extraction model of each segmented network graph node. For the data set RML2018.01A, the output feature dimension of each layer is set to 64, and then the obtained segmented network graph node features are obtained by global cumulative pooling to obtain the local feature vector representing each segment Where R 64 Represents a 64-dimensional vector.
[0059] In step S4, the RNN model used in the method of the present invention is LSTM. The method of the present invention superimposes two layers of LSTM. For the data set RML2018.01A, the feature dimension of the middle hidden layer is set to 128, and the feature dimension of the output layer is set to 64. The final feature matrix Φ'∈R is output 16×64 .
[0060] In step S5, the method of the present invention adopts the flattening operation as the feature fusion method, horizontally splices the segmented feature vectors, and obtains the fused feature vector of each signal. Then, a single-layer fully connected layer with regularized dropout and a Softmax function are used as the classifier of the entire model to output the probability distribution of the samples in each category.
[0061] The present invention has the following technical effects:
[0062] Compared with the existing traditional graph mapping method based on visual graphs and the automatic visual graph method based on deep learning, the method disclosed in the present invention shows higher long signal classification accuracy, and the computing resource consumption and model parameter amount of the method of the present invention are far less than those of the above methods.
[0063] It should be understood that although this specification is described according to implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
Claims
1. A long time series classification method based on graph neural network, characterized in that: include: Step S1: Collect sample data sets, set the number of segments and segment the time series data; Step S2: setting the initial adjacency matrix of the network graph corresponding to each segment in the time series, and the same segments of each time series share the corresponding adjacency matrix, and converting each time series data into the corresponding network graph data; Step S3: Use graph neural network to extract features from the network graph data corresponding to the segmented time series, and synchronously update the adjacency matrix of the network graph corresponding to each segmented time series to obtain the local feature vector of each time series data; Step S4: using a recurrent neural network to perform global feature extraction on the local feature vectors of the above time series data to obtain the final feature vectors of each segmented time series data; Step S5: Fuse the feature vectors of each segmented time series data and use a fully connected neural network to complete the classification of the time series; Step S6: Adjust the number of segments and the initial adjacency matrix of the network graph corresponding to each segment time series, and repeat steps S2 to S5 until the classification effect is optimal; Step S1 specifically includes: Step S1.1: Establish a sample data set, wherein the sample data set includes each time point and a single or multiple sampling values corresponding to each time point; Step S1.2: Set the number of segments n, divide the time series data of length L into equal intervals, and round down the length of each segment to l = [L / n]; In step S2, the field of view w parameter is preset, and the adjacency matrix of the network graph corresponding to each segment in the time series is initialized. Each segment of each time series shares the corresponding adjacency matrix, and each time series data is converted into the corresponding network graph data. The set of network graph data converted from a single time series data is recorded as The time points of the time series are mapped to nodes of the network graph, and a single or F sample values at each time point are used as the features of the corresponding node. G is the network graph, and X∈R l×F Represented as the node feature of the network, A∈R l×l Represented as an adjacency matrix of a network graph; Step S3 specifically includes: Step S3.1: The network graph corresponding to each time series passes through the same number of layers of graph neural network in turn, and the node features are updated as the local feature extraction of each time series. Among them, the node feature of the mth layer of the network graph corresponding to the i-th time series is The network graphs corresponding to each segment are updated by m layers of GNN and the network graph set is The network node feature X (m) ∈R l×h , and its dimension h is automatically adjusted and specified; Step S3.2: Use global cumulative pooling to pool the network node features X (m) Accumulated pooling is As the local feature vector of each segment, its set is recorded as Step S4 specifically includes: Step S4.1: Concatenate the local feature vectors of the above segmented time series in a vertical form to obtain a local feature matrix in Indicates vertical splicing; Step S4.2: Use a recurrent neural network to train the local feature matrix Φ∈R n×h Perform global feature extraction, and obtain the final feature matrix Φ'∈R after Φ passes through multiple layers of RNN n×h , where Φ'=RNN(Φ).
2. The long time series classification method based on graph neural network according to claim 1, characterized in that: In step S2, the process of initializing the adjacency matrix of the network graph corresponding to each segment and constructing the network graph is as follows: i } i=1,2,...,l is a time series with a segment length of l, w is the visible window size, and each time point has F observations, that is, y i ∈R F ; First, correspond each time point in the segmented time series to each node in the network, and establish edges between each node and its w adjacent nodes according to the size of the visible window w. The initial weight of each edge is 1, that is, And A is set as a learnable parameter and updated iteratively during the model training process.
Citation Information
Patent Citations
Methods and Applications of EEG Signal Analysis Based on Complex Networks
CN106473736B
Auxiliary diagnosis system and method for alzheimer disease based on dynamic brain network graph kernel
CN110459317A