A prediction method for encoder-decoder of GCN and bidirectional GRU
Through the codec prediction method for GCN and bidirectional GRU, the number of rehabilitation training sessions in hospitals is predicted, which solves the problem of low prediction accuracy of medium and short-term time series in the prior art, and achieves higher prediction accuracy and better training efficiency.
Patent Information
- Application Number
- CN202210305564.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-03-25
AI Technical Summary
The existing medium- and short-term time series prediction methods have lower accuracy and poor results in predicting the number of upper limb rehabilitation training sessions in hospitals.
The codec prediction method for GCN and bidirectional GRU is adopted to predict the number of rehabilitation training times of hospital upper limbs through data cleaning, feature extraction and data prediction modules, combined with the encoder-decoder framework.
The accuracy and effect of medium and short-term time series predictions are improved, the training strategy is optimized, and the efficiency of rehabilitation training is improved.
Smart Images

Figure CN114649079B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a prediction method for a codec, and in particular to a prediction method for a codec oriented to GCN and bidirectional GRU. Background Art
[0002] The prediction of the number of posture rehabilitation training for patients is the focus of current research. Whether it can be accurately predicted affects all aspects of rehabilitation training. Especially in training evaluation, high-precision prediction analysis can not only optimize the formulation of training strategies. It can also play an important role in high-frequency training movements. Thereby effectively improving the efficiency of rehabilitation training. The existing prediction methods have low accuracy and poor effect for the prediction results of medium- and short-term time series. In response to this phenomenon, considering that hospital patient training is generally carried out in a cycle of one week or even one month, this paper intends to use a prediction method for the encoder-decoder of GCN and bidirectional GRU to solve the problem of low accuracy and poor effect of medium- and short-term time series prediction results.
[0003] In practical applications, time series prediction tools and methods can be divided into three categories: one is the factor prediction model based on business scenario understanding, one is the traditional time series prediction model, such as autoregressive model, autoregressive moving average model, moving average model, etc., and the other is machine learning model, such as support vector machine (SVM), tree model (such as Xgboost, lightgbm), neural network model (such as CNN, LSTM, GRU), etc. Summary of the invention
[0004] Purpose of the invention: The purpose of the present invention is to provide a prediction method for a GCN and bidirectional GRU encoder-decoder that combines an encoder-decoder to predict the number of upper limb rehabilitation training sessions in a hospital.
[0005] Technical solution: The prediction method of the present invention comprises the following steps:
[0006] S1, cleaning the input posture rehabilitation training data through a data cleaning module, and inputting the cleaned posture rehabilitation training data into a feature extraction module;
[0007] The data cleaning module includes a data input module and a Kalman filter module, wherein the data input module classifies the input posture rehabilitation training data, and the Kalman filter module processes the classified posture rehabilitation training data;
[0008] S2, the feature extraction module processes the input posture rehabilitation training data to obtain feature information of the posture rehabilitation training data;
[0009] The feature extraction module includes a GCN encoder and a bidirectional GRU decoder. The GCN encoder encodes the input data and then inputs it into the bidirectional GRU decoder. The bidirectional GRU decoder decodes the received data and outputs feature information.
[0010] The GCN encoder consists of two layers of graph convolution modules and one layer of first attention module; the bidirectional GRU decoder consists of two layers of bidirectional GRU convolution modules and one layer of second attention module;
[0011] S3, calling the data prediction module, processing the feature information, and outputting the processed feature information.
[0012] Further, in step S1, the data input module divides the input data set into three categories: the first 1 / 2 is used as training set data, the second 1 / 4 is used as test set data, and the remaining 1 / 4 is used as validation set data;
[0013] The divided data set is then input into the Kalman filter module for data cleaning, filtering out erroneous data, filling in missing data, and smoothing the data curve.
[0014] Furthermore, in the step S2, the cleaned posture rehabilitation training data first enters the convolution module of a layer of GraphConv to obtain feature data X1; then the feature data X1 is put into the convolution module of a second layer of GraphConv to obtain feature data X2;
[0015] Then, the data X2 processed by the two-layer GraphConv convolution module is put into the first attention module to obtain the data X3 encoded by the GCN encoder; the data X3 first passes through the first-layer bidirectional GRU convolution module to obtain the feature data X4; then the feature data X4 is put into the second-layer bidirectional GRU convolution module to obtain the feature data X5; finally, the feature data X5 is put into the second attention module to obtain the data X6 decoded by the bidirectional GRU decoder.
[0016] Furthermore, the convolution module of GraphConv uses spectrum-based graph convolution to extract relevant sequence feature information; the corresponding Laplacian matrix L in the spectrum-based graph convolution is expressed as:
[0017]
[0018] Where D represents the degree matrix, defined as D ii =∑ i A ij ;I N is a unit matrix of size N×N;
[0019] Next, the Laplace matrix L is decomposed and the eigenvalues are extracted to obtain:
[0020] L=UAU T
[0021] Among them, A is a diagonal matrix composed of the eigenvalues of L; U = {u1,u2,……,u n} is composed of the eigenvectors of the Laplace matrix L, corresponding to R N A set of orthogonal bases in space;
[0022] The inter-layer propagation formula of spectral graph convolution is:
[0023]
[0024] Among them, W l is the learning parameter, σ is the activation function; Indicates a self-loop operation on the adjacency matrix A itself; X l ∈R N Represents the activation value of layer l.
[0025] Furthermore, the convolution process of GRU is as follows:
[0026] z t =σ(W z ·[h t-1 ,x t ]+b z )
[0027] r t =σ(W r ·[h t-1 ,x t ]+b r )
[0028]
[0029] Among them, h t-1 and h t Respectively represent the output state of GRU at the previous moment and the current moment, x t represents the input at the current time t; W z and b z is the corresponding weight parameter in the update gate; W r and b r is the corresponding weight parameter in the reset gate; W d and b d is the corresponding weight parameter in the gated recurrent unit; represents the candidate state at time t; tanh(·) and σ(·) are two different activation functions.
[0030] Furthermore, the data prediction module is mainly composed of a Batchnormalization function, a Dropout function, a Dense function and an output interface; after completing the training times of k time steps and the feature extraction of the employee number, the data is standardized by the Batchnormalization function and then by the Dropout function; finally, the data is output through the Dense fully connected layer.
[0031] Compared with the prior art, the present invention has the following significant effects: 1. The framework structure of the present invention is simple, and it combines the GCN and GRU neural network frameworks, and at the same time combines the encoder-decoder, which can make better predictions on the number of upper limb rehabilitation training sessions in the hospital, and solves the problem of low accuracy and poor effect of prediction results for medium- and short-term time series; 2. The present invention inputs the divided data set into the Kalman filter module for data cleaning, filters out erroneous data, fills in missing data, smoothes the data curve, and improves prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a structural schematic diagram of the present invention;
[0033] Figure 2 The following is a comparison chart of the predicted values and true values of AE_GCN_BiGRU, DARNN, and LSTNet;
[0034] Figure 3 Comparison chart between the predicted values and the true values of AE_GCN_BiGRU and DARNN;
[0035] Figure 4 Comparison chart of predicted values and true values of AE_GCN_BiGRU and LSTNet;
[0036] Figure 5 The evaluation indicators for each model are used to refine the comparison chart. DETAILED DESCRIPTION
[0037] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0038] The present invention adopts the GCN (Graph Convolution Network) and bidirectional GRU (Gate Recurrent Unit) neural network framework (i.e. AE_GCN_BiGRU), uses GCN to construct an encoder and a bidirectional GRU decoder to build a GCN-BiGRU encoding and decoding network, and optimizes and improves the current prediction algorithm for the low time series prediction accuracy and poor prediction effect of the number of "forearm stretching" posture rehabilitation training for stroke patients in a hospital for one month, thereby improving the prediction accuracy. The network framework of AE_GCN_BiGRU is as follows: Figure 1 As shown, the modules involved in the implementation process of the prediction method of the present invention mainly include a data cleaning module, a feature extraction module and a data prediction module.
[0039] The data set uses time series data of the number of "forearm stretching" posture rehabilitation training sessions for stroke patients in a hospital for one month.
[0040] The data cleaning module is mainly composed of a data input module and a Kalman filter module. The data input module divides the input data set (the time series data of the number of "forearm stretching" posture rehabilitation training for a stroke patient A in one month) into three categories: the first 1 / 2 is used as the training set data, the second 1 / 4 is used as the test set data, and the remaining 1 / 4 is used as the validation set data. The divided data set is then input into the Kalman filter module for data cleaning, filtering out erroneous data, filling in missing data, and smoothing the data curve.
[0041] The feature extraction module uses an encoder composed of a GCN graph neural network to encode the input data. After that, a decoder composed of a bidirectional GRU model is used to decode the output information of the encoder composed of the GCN graph neural network, and finally obtain the feature information of the input data. Finally, the data prediction module is called to predict the data.
[0042] The data cleaning module first divides the input feature vector reasonably, and divides the entire data set (the time series data of the number of "forearm stretching" posture rehabilitation training of stroke patient A in one month) into 1 / 2 training set, 1 / 4 test set and 1 / 4 validation set according to the time node. Then the divided data is input into the Kalman filter module through the input interface to complete the data cleaning. Finally, the cleaned data is transmitted to the feature extraction module for feature extraction.
[0043] The feature extraction module is mainly composed of a GCN encoder and a bidirectional GRU decoder. The time series data is passed through the GCN encoder to obtain the encoded data, and then the decoded time series data features are obtained through the bidirectional GRU decoder. The data cleaned by the data cleaning module first enters the GCN encoder, which is composed of two layers of graph convolution modules (GraphConv) and a first layer of attention module (Attenation). The time series data of the number of "forearm stretching" posture rehabilitation training of stroke patient A for one month first enters a convolution module (Layer1) of a layer of GraphConv to obtain feature data X1. Then the feature data X1 is put into the convolution module of the second layer of GraphConv to obtain feature data X2. Among them, the convolution module of GraphConv of the present invention uses spectrum-based graph convolution to extract related sequence feature information. The main idea of spectral-based graph convolution is to use Fourier transform to transform the related graph signal into the spectral domain, and finally perform convolution operation. Among them, the corresponding Laplace matrix L in the spectrum-based graph convolution is expressed as:
[0044]
[0045] In formula (1), D represents the degree matrix, which is defined as D ii =∑ i A ij I N is a unit matrix of size N×N. Where i represents the i-th row and j represents the j-th column. Then, the eigenvalues of L are decomposed and extracted to obtain:
[0046] L=UAU T (2)
[0047] In formula (2), A is a diagonal matrix composed of the eigenvalues of L, U = {u1,u2,...,u n} is composed of the eigenvectors of L, corresponding to R N A set of orthogonal bases in space. Where n means that the diagonal matrix is n-dimensional, and N means R to the power of N.
[0048] The inter-layer propagation formula of the spectrum graph convolution adopted by the present invention is, where X l+1 Represents the activation value of the l+1th layer:
[0049]
[0050] In formula (3), W l is a learning parameter and σ is an activation function. It means to perform a self-loop operation on the adjacency matrix A itself, and add the central node itself to the convolution operation by adding the unit matrix. X l ∈RN Represents the activation value of layer l.
[0051] Then, the data X2 processed by the convolution module of the two layers of GraphConv is put into the attention module to obtain the data X3 encoded by the GCN encoder. After the encoded data X3 obtained by the GCN encoder. It will be convolved through the bidirectional GRU decoder. The encoded data X3 first passes through the first layer of bidirectional GRU convolution module (BiGRU) to obtain feature data X4. Then the feature data X4 is put into the second layer of bidirectional GRU convolution module (BiGRU) to obtain feature data X5. Finally, the feature data X5 is put into the second attention module to obtain the data X6 decoded by the bidirectional GRU decoder. Among them, the convolution process of GRU is as follows:
[0052] z t =σ(W z ·[h t-1 ,x t ]+b z ) (4)
[0053] r t =σ(W r ·[h t-1 ,x t ]+b r ) (5)
[0054]
[0055] Among them, h t-1 and h t Respectively represent the output state of GRU at the previous moment and the current moment, x t Represents the input at the current time t. z and b z is the corresponding weight parameter in the update gate. r and b r is the corresponding weight parameter in the reset gate. d and b d is the corresponding weight parameter in the gated recurrent unit. represents the candidate state at time t. tanh(·) and σ(·) are two different activation functions.
[0056] The data prediction module is mainly composed of a Batchnormalization function, a Dropout function, a Dense function and an output interface. After completing the training times of k time steps and the feature extraction of the employee ID, the data is standardized by the Batchnormalization function, and then by the Dropout function to reduce the overfitting of the function, and finally output by the Dense fully connected layer.
[0057] On the collected data set, we conducted comparative experiments on various network models with relatively high efficiency, and compared the prediction results of DA-RNN network and LSTNet network. The experimental results are as follows: Figure 2 , Figure 3 , Figure 4 shown.
[0058] This paper uses four evaluation indicators: determination coefficient (R2-Score), average absolute error (MAE), root mean square error (RMSE) and mean square error (MSE) to refine the comparison results. Figure 5 The values of various indicators are shown in Table 1.
[0059] Table 1 Numerical table of four types of evaluation indicators
[0060] Model R2-Score MAE RMSE MSE DARNN 0.83426 0.069132 0.085855 0.007371 LSTNet 0.928971 0.043252 0.056394 0.00318 GCN-BiGRU-Encoder-Decoder 0.96494 0.029611 0.039576 0.001566
[0061] As can be seen from Table 1, the AE_GCN_BiGRU prediction method proposed in the present invention improves the determination coefficient (R2-Score) by 13% and 3.5% respectively compared with DARNN and LSTNet; reduces the absolute mean error (MAE) by 1.6% and 0.2% respectively compared with DARNN and LSTNet; reduces the root mean square error (RMSE) by 4.6% and 1.6% respectively compared with DARNN and LSTNet; and reduces the mean square error (MSE) by 0.5% and 0.16% respectively compared with DARNN and LSTNet.
[0062] It can be concluded that the prediction method for the codec for GCN and bidirectional GRU proposed in the present invention is optimal in terms of evaluation indicators such as determination coefficient, absolute mean error, mean square error and root mean square error. It also shows that the prediction method for the codec for GCN and bidirectional GRU has higher prediction accuracy and better prediction results in the prediction of a one-month time series than the existing prediction network model.
Claims
1. A prediction method for codecs of GCN and bidirectional GRU, characterized in that: The steps include: S1, cleaning the input posture rehabilitation training data through a data cleaning module, and inputting the cleaned posture rehabilitation training data into a feature extraction module; The data cleaning module includes a data input module and a Kalman filter module, wherein the data input module classifies the input posture rehabilitation training data, and the Kalman filter module processes the classified posture rehabilitation training data; S2, the feature extraction module processes the input posture rehabilitation training data to obtain feature information of the posture rehabilitation training data; The feature extraction module includes a GCN encoder and a bidirectional GRU decoder. The GCN encoder encodes the input data and then inputs it into the bidirectional GRU decoder. The bidirectional GRU decoder decodes the received data and outputs feature information. The GCN encoder consists of two layers of graph convolution modules and one layer of first attention module; the bidirectional GRU decoder consists of two layers of bidirectional GRU convolution modules and one layer of second attention module; The cleaned posture rehabilitation training data first enters the convolution module of the first layer of GraphConv to obtain feature data X1; then the feature data X1 is put into the convolution module of the second layer of GraphConv to obtain feature data X2; Then, the data X2 processed by the convolution module of the two layers of GraphConv is put into the first attention module to obtain the data X3 encoded by the GCN encoder; the data X3 first passes through the first layer of bidirectional GRU convolution module to obtain the feature data X4; then the feature data X4 is put into the second layer of bidirectional GRU convolution module to obtain the feature data X5; finally, the feature data X5 is put into the second attention module to obtain the data X6 decoded by the bidirectional GRU decoder; S3, calling the data prediction module, processing the feature information, and outputting the processed feature information.
2. The prediction method for GCN and bidirectional GRU codec according to claim 1, characterized in that: In step S1, the data input module divides the input data set into three categories: the first 1 / 2 is used as training set data, the second 1 / 4 is used as test set data, and the remaining 1 / 4 is used as validation set data; The divided data set is then input into the Kalman filter module for data cleaning, filtering out erroneous data, filling in missing data, and smoothing the data curve.
3. The prediction method for GCN and bidirectional GRU codec according to claim 1, characterized in that: The convolution module of GraphConv uses spectrum-based graph convolution to extract relevant sequence feature information; the corresponding Laplacian matrix L in the spectrum-based graph convolution is expressed as: Where D represents the degree matrix, defined as D ii =∑ i A ij ;I N is a unit matrix of size N×N; Next, the Laplace matrix L is decomposed and the eigenvalues are extracted to obtain: L=WOW T Among them, A is a diagonal matrix composed of the eigenvalues of L; U = {u1,u2,……,u n } is composed of the eigenvectors of the Laplace matrix L, corresponding to R N A set of orthogonal bases in space; The inter-layer propagation formula of spectral graph convolution is: Among them, W l is the learning parameter, σ is the activation function; Indicates a self-loop operation on the adjacency matrix A itself; X l ∈R N Represents the activation value of layer l.
4. The prediction method for GCN and bidirectional GRU codec according to claim 1, characterized in that: The convolution process of GRU is as follows: z t =σ(W z ·[h t-1 ,x t ]+b z ) r t =σ(W r ·[h t-1 ,x t ]+b r ) Among them, h t-1 and h t Respectively represent the output state of GRU at the previous moment and the current moment, x t represents the input at the current time t; W z and b z is the corresponding weight parameter in the update gate; W r and b r is the corresponding weight parameter in the reset gate; W d and b d is the corresponding weight parameter in the gated recurrent unit; represents the candidate state at time t; tanh(·) and σ(·) are two different activation functions.
5. The prediction method for GCN and bidirectional GRU codec according to claim 1, characterized in that: The data prediction module is mainly composed of a Batchnormalization function, a Dropout function, a Dense function and an output interface; after completing the training times of k time steps and the feature extraction of the employee number, the data is standardized by the Batchnormalization function and then by the Dropout function; finally, the data is output through the Dense fully connected layer.
Citation Information
Patent Citations
Human movement mode speculation model based on variation track context perception, training method and speculation method
CN110147892A
Method for recognizing upper limb and hand rehabilitation training action of stroke patient
CN111184512A