Multi-source time series data prediction method fusing spatio-temporal characteristics
By preprocessing data and constructing a spatiotemporal graph convolutional network with a self-attention mechanism, and combining the improved gray wolf optimization algorithm to optimize hyperparameters, the problems of frequency asynchrony and nonlinear time delay topology of multi-source time series data are solved, and efficient and lightweight multi-source time series data prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-04-14
AI Technical Summary
Existing multi-source time series data prediction methods are unable to effectively solve the problem of asynchronous frequency of multi-source data, cannot accurately explore nonlinear time delay topological relationships, and traditional parameter adjustment relies on manual experience, making it difficult to achieve lightweight model deployment.
By preprocessing data, constructing a spatiotemporal graph convolutional network (STGCN) with a self-attention mechanism, optimizing hyperparameters using an improved gray wolf optimization algorithm, and compressing the model through knowledge distillation, a lightweight prediction model is generated.
It significantly improves the prediction accuracy and model adaptability of multi-source time series data, and enhances the model's real-time prediction capability and lightweight deployment capability in complex data environments.
Smart Images

Figure CN121859078A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of Internet of Things data analysis and artificial intelligence technology, and relates to a method for predicting multi-source time series data by integrating spatiotemporal features, and more particularly to a method for predicting multi-source time series data based on deep learning and graph convolutional networks. Background Technology
[0002] With the rapid development of IoT and big data technologies, multi-source time-series data is widely collected in fields such as industrial production, environmental monitoring, equipment operation and maintenance, and energy management. This type of data typically originates from different types of sensors, such as vibration, temperature, and pressure sensors, and exhibits significant heterogeneous characteristics: the sampling frequencies of each data source are asynchronous, the physical dimensions differ greatly, and complex cross-domain coupling relationships exist between subsystems. Accurately fusing and predicting the trends of this data is crucial for achieving system fault early warning and intelligent decision-making.
[0003] Because real-world data is diverse and noisy, it often contains missing values, outliers, and inconsistent feature scales. These factors can affect the stability of the model and the accuracy of predictions. Existing preprocessing methods often struggle to simultaneously satisfy the integrity, continuity, and consistency of the data, thus impacting prediction performance.
[0004] In recent years, deep learning models, represented by recurrent neural networks and long short-term memory networks, have excelled at capturing univariate temporal dependencies, but often overlook the potential spatial topological relationships between multi-source variables. Spatiotemporal graph convolutional networks have been introduced to address this issue, but existing graphing methods are mostly based on static physical distance or linear Pearson correlation coefficients. This simple graphing strategy has significant drawbacks: it struggles to capture the prevalent nonlinear coupling and physical time delays between multi-source subsystems, and it cannot identify complex dependencies with similar waveforms but asynchronous values, resulting in graph structures that fail to accurately reflect the physical operating mechanisms of the system.
[0005] Furthermore, the predictive performance of deep spatiotemporal network models is highly dependent on their complex hyperparameter configurations (such as graph sparsity, learning rate, and number of network layers). Traditional parameter tuning often relies on manual experience or grid search, which is time-consuming, inefficient, and difficult to find the global optimum. Although swarm intelligence algorithms such as the Grey Wolf Optimization Algorithm have been used for automatic optimization, standard algorithms have inherent drawbacks such as slow convergence speed, an imbalance between exploration and exploitation capabilities, and a tendency to get trapped in local optima. Meanwhile, as model depth increases, computational complexity rises sharply, making it difficult to meet the lightweight deployment requirements of industrial edge devices.
[0006] Therefore, there is an urgent need for a prediction method that can effectively solve the problem of asynchronous frequency of multi-source data, accurately mine nonlinear time-delay topological relationships, and has both efficient parameter optimization and model lightweighting capabilities. Summary of the Invention
[0007] In view of this, the purpose of this invention is to provide a multi-source time series data prediction method that integrates spatiotemporal features, which can significantly improve the accuracy of multi-source data prediction and the adaptability of the model, and achieve efficient and dynamic prediction of complex data.
[0008] To achieve the above objectives, the present invention is implemented through the following technical solution: To achieve the above objectives, the present invention provides the following technical solution: A method for predicting multi-source time series data by fusing spatiotemporal features includes the following steps: S1. Data preprocessing: Processing multi-source time series data, specifically including: Clean the input data to remove invalid data, null values, and duplicates; Outlier detection and processing: The interquartile range (IQR) algorithm is used to detect outliers, and the moving average method is used for smoothing correction. Data from different sources are time-domain aligned and resampled using a cubic spline interpolation algorithm, so that the data have a unified time reference and avoid data misalignment caused by different sampling frequencies; Z-Score standardization is applied to all features to eliminate the dimensional differences between different features, so that the data can be processed on the same scale. A multi-source sparse topology graph is constructed, and a sparse adjacency matrix is generated using the time-delay mutual information matrix and the dynamic time warping (DTW) algorithm to describe the spatiotemporal dependencies between different data sources. S2. Construct the Spatiotemporal Graph Convolutional Network STGCN and introduce a self-attention mechanism, specifically including: Temporal and spatial self-attention mechanisms are introduced into the spatiotemporal graph convolution module to dynamically calculate the relationship weights between nodes and enhance the model's adaptability. The spatial self-attention mechanism dynamically calculates the attention weights between graph nodes based on real-time input data, thereby increasing the model's attention to key spatiotemporal nodes. Temporal self-attention mechanisms are used to capture long-term temporal dependencies, avoiding the limited local receptive field problem of traditional convolutional methods. S3. Hyperparameter optimization: The improved Grey Wolf Optimization (IGWO) algorithm is used to globally optimize the hyperparameters of the Spatiotemporal Graph Convolutional Network (STGCN). Specifically, this includes: An initial population is generated using a hierarchical anchor point and perturbation strategy, and the optimal combination of hyperparameters is selected based on fitness evaluation. The prediction error was calculated using the K-fold cross-validation method, and the hyperparameters were adjusted according to the model accuracy during the optimization process. By using an adaptive state-time dual-control convergence factor, the global search capability and local exploitation capability are balanced to avoid getting trapped in local optima; the population position is updated by mixing gravity weights and state perturbations. S4. Model Training: The spatiotemporal graph convolutional network model is trained using the optimized hyperparameters, specifically including: The spatiotemporal graph convolutional network model is optimized through multiple iterations, using training data for learning, and hyperparameters such as the number of network layers and convolutional kernel size are gradually adjusted. In each iteration, the network parameters are adjusted using gradient descent to optimize the prediction results and obtain a high-precision spatiotemporal graph convolutional network model. S5. Model Compression and Distillation: Based on the knowledge distillation framework, this transforms a complex, trained model into a lightweight prediction model. Specifically, it includes: Define a lightweight model and gradually reduce model complexity by balancing hard and soft losses through a dynamic composite loss function; By varying course weights during training, hard and soft losses are balanced; the loss of the lightweight model is minimized during training to obtain a lightweight yet high-accuracy prediction model. S6. Use the trained lightweight prediction model to make real-time predictions on multi-source time series data. S7. Optimize based on real-time prediction results, and continuously optimize and adjust the model through an online learning mechanism.
[0009] Furthermore, S1 also includes: By combining the time-delay mutual information matrix and the dynamic time warping algorithm, a spatiotemporal dependency graph is generated, specifically as follows: Calculate the time-delay mutual information matrix between different nodes to capture nonlinear coupling and time-delay phenomena between multi-source data; The dynamic time warping algorithm is used to calculate the time dependencies between nodes, and the results are transformed into a similarity matrix based on the Gaussian kernel function. A sparse adjacency matrix is generated using the Top-K strategy to connect nodes with strong physical relationships, thereby constructing a multi-source sparse topology graph that reflects the complex relationships between multiple data sources.
[0010] Furthermore, S1 also includes: Dynamic trend pattern matrix Treated as morphological resistance, nodes are calculated through nonlinear deep coupling. With nodes The transfer admittance values between them are used as the unsparsed connection weights. The calculation formula is as follows:
[0011] in, This is the preset drive gain coefficient; This is the impedance attenuation coefficient; The base noise floor constant; This is the time-delay mutual information value; For dynamic trend pattern distance; using The term is used as a nonlinear modulation factor.
[0012] Furthermore, S2 also includes: A spatial self-attention mechanism is adopted to dynamically calculate the attention weight coefficients between connected graph nodes based on the real-time input data content. The formula is as follows:
[0013]
[0014] in, It is a learnable linear transformation weight matrix. and These are nodes and eigenvectors, It is a learnable attention weight vector. This represents vector concatenation. It is a node The set of neighboring nodes in the graph.
[0015] Furthermore, the fitness function in S3 is:
[0016] in, For a set of hyperparameters, The number of folds for cross-validation. To use hyperparameters The trained model, in the first The mean square error calculated on the validation set.
[0017] Furthermore, S3 also includes: Decouple the convergence factor into a time-domain reference decay component. With adaptive state feedback components The product of these two elements is used to achieve closed-loop feedback control, specifically:
[0018] in, This represents the current iteration number. For stagnation counters; Time-domain reference attenuation component A hyperbolic tangent hybrid attenuation formula is adopted, specifically as follows:
[0019] in, The maximum number of iterations, This is the preset decay rate control constant; Adaptive state feedback component When the algorithm stalls... Perform dynamic nonlinear amplification compensation.
[0020] Furthermore, S3 also includes: Dynamic nonlinear amplification compensation specifically includes: 1) Set a stall counter The initial value is 0; in each iteration In the middle, compare the current optimal solution ( fitness of wolves Fitness of the previous generation optimal solution ;like Not better ,but Conversely, Reset to zero; 2) A bounded nonlinear amplification formula is adopted, specifically:
[0021] in, A stagnation counter that is updated by comparing the fitness of the current best solution with that of the previous generation's best solution. and The preset feedback control constant; when When greater than 0, The value increases smoothly, causing the convergence factor to... The size is dynamically increased to enhance the algorithm's ability to escape local optima and re-explore the global optimum.
[0022] Furthermore, the convergence factor is:
[0023] The specific location update formula is as follows:
[0024]
[0025] in, For mixed gravitational weights, Alpha Wolf Fitness value after processing; For the present Wolf With the alpha wolf Euclidean distance, The preset gravitational decay index; The adaptive state-time dual-control convergence factor. For the first Only The wolf's current location The position of another wolf randomly selected from the current population.
[0026] Furthermore, S5 also includes: Build a lightweight model Dynamic composite loss function ; Through a course weight Balanced hard loss and soft loss Course weight With training iterations Dynamic changes, composite loss function for:
[0027] The soft loss Further through a deterministic weight To balance the average distillation loss and distribution of distillation losses for:
[0028] in, for For the The prediction standard deviation of each sample. This represents the average distillation loss.
[0029] A multi-source time-series data prediction system integrating spatiotemporal features includes: The data preprocessing module is used to clean, detect outliers, align time-domain data, standardize features, and generate multi-source sparse topology graphs. The spatiotemporal feature extraction module includes a spatiotemporal graph convolutional network SA-STGCN with a self-attention mechanism, which is used to extract spatiotemporal dependent features from multi-source time-series data. The parameter optimization module is used to globally optimize the hyperparameters of the SA-STGCN model based on the improved Grey Wolf Optimization Algorithm to improve the model's prediction accuracy. The model compression and distillation module is used to compress and distill the trained model to generate a lightweight prediction model. The prediction module is used to make predictions on real-time data using the compressed prediction model and output the prediction results.
[0030] The beneficial effects of this invention are as follows: This invention provides a method for predicting multi-source time-series data by integrating spatiotemporal features. On one hand, a data preprocessing module cleans, handles outliers, and standardizes the multi-source data to ensure its integrity and consistency. On the other hand, it effectively extracts complex spatiotemporal dependencies from the data by incorporating a self-attention mechanism (SAM) into a spatiotemporal graph convolutional network (STGCN). Furthermore, this invention utilizes an improved Grey Wolf Optimization (IGWO) algorithm to globally optimize the hyperparameters of the SA-STGCN, addressing the problem of traditional optimization methods relying on human experience and easily getting trapped in local optima, thus significantly improving the model's prediction accuracy and generalization ability.
[0031] A complete prediction process has been established, encompassing data preprocessing, spatiotemporal feature extraction, intelligent optimization, and fault diagnosis. This significantly improves the model's prediction accuracy and automated tuning capabilities in complex, multi-source time-series data environments. An improved Grey Wolf optimization algorithm is employed to enhance global search and local exploitation capabilities, ensuring good classification performance across different datasets. The model's ability to dynamically identify real-time data anomalies has been effectively enhanced, providing reliable support for real-time status monitoring in complex data environments.
[0032] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0033] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein: Figure 1 This is a schematic diagram of the structure of a multi-source time series data prediction system that integrates spatiotemporal features according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the data processing flow of a data preprocessing module according to an embodiment of the present invention; Figure 3This is a schematic diagram of the core structure of a spatiotemporal graph convolutional network that incorporates a self-attention mechanism according to an embodiment of the present invention. Figure 4 This is a schematic diagram of the parameter optimization process of a spatiotemporal graph convolutional network based on a multi-strategy collaborative gray wolf optimization algorithm with a fused self-attention mechanism, according to an embodiment of the present invention. Detailed Implementation
[0034] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0035] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0036] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0037] This invention belongs to the field of IoT data analysis and artificial intelligence technology, and relates to a method for predicting multi-source time-series data by integrating spatiotemporal features, particularly a method based on deep learning and graph convolutional networks. This method addresses the challenges of frequency asynchrony, noise interference, and complex spatiotemporal coupling relationships in multi-source heterogeneous time-series data. It proposes an efficient data fusion and prediction technique combining spatiotemporal features, applicable to fields such as industrial monitoring, environmental monitoring, intelligent device management, and energy management, overcoming the shortcomings of existing methods in multi-source data fusion and prediction accuracy.
[0038] Please see Figure 1This is a schematic diagram of the structure of a multi-source time series data prediction system that integrates spatiotemporal features according to an embodiment of the present invention; it shows the logical relationship between each module and the data flow; the system includes a data preprocessing module, a basic model construction module, a model parameter optimization module (based on the Gray Wolf optimization algorithm with multi-strategy collaboration), and a model compression and distillation module.
[0039] The data preprocessing module is used to preprocess the collected multi-source time-series data to ensure data quality and consistency. Specifically, it includes data cleaning, missing value imputation, outlier detection and handling, feature standardization, and constructing a multi-source sparse topology graph representing the topological dependencies between variables. Basic prediction model building module: used to build a spatiotemporal graph convolutional network that integrates a self-attention mechanism. This model is based on the spatiotemporal graph convolutional network and integrates a self-attention module to effectively extract high-dimensional spatiotemporal dependency features from the data. Intelligent Model Parameter Optimization Module: Based on the multi-strategy collaborative improvement Grey Wolf Optimization Algorithm, it performs global optimization on the hyperparameter combination of the SA-STGCN model (e.g., learning rate, batch size, number of layers, etc.) to improve the model's prediction accuracy and generalization ability. Model compression and distillation module: Based on the model obtained from the above steps, a lightweight prediction model is obtained by distillation training through a dynamic composite loss function.
[0040] Please see Figure 2 This diagram illustrates the data processing flow of a data preprocessing module according to an embodiment of the present invention. It shows five steps of the data preprocessing module, with each step detailing the execution process of the various data processing methods to ensure the consistency and integrity of the input data. The steps include: Data cleaning removes invalid items, null values, and duplicates from the data to ensure data integrity. Outlier detection and handling: Outliers are detected using the interquartile range algorithm and smoothed using the moving average method; Multi-source data time-domain alignment and resampling: To address the issue of inconsistent sampling frequencies of multi-source data, a unified time reference is established, and a continuous resampling function is constructed using a cubic spline interpolation algorithm to map low-frequency data to a high-frequency time axis, ensuring the continuity of the physical signal; Feature standardization scales each feature to a uniform scale, eliminating dimensional differences between different features and facilitating subsequent analysis.
[0041] Multi-source sparse topology graphs are constructed by integrating time-delay mutual information and dynamic time warping (DTW) metrics to mine the physical time delay and nonlinear morphological dependencies between multi-source data, and a Top-K strategy is introduced to generate sparse adjacency matrices.
[0042] Please see Figure 3 This is a schematic diagram of the core structure of a spatiotemporal graph convolutional network with a fusion self-attention mechanism according to an embodiment of the present invention. The diagram shows the details of the modification of the spatiotemporal graph convolutional block of the ST-GCN model. Inside the spatiotemporal graph convolutional block of the original ST-GCN model, a temporal self-attention module is connected in series before the temporal convolution module; and at the same time, a spatial self-attention module is connected in series before the spatial convolution module, thereby realizing the deep extraction of spatiotemporal features.
[0043] Please see Figure 4 This diagram illustrates the parameter optimization process of a spatiotemporal graph convolutional network based on a multi-strategy collaborative gray wolf optimization algorithm with a fused self-attention mechanism, according to an embodiment of the present invention. The diagram shows the overall optimization process of the multi-strategy collaborative gray wolf optimization algorithm, including steps such as initial population generation, fitness calculation, exploration and development behavior control, and position update. The specific implementation is as follows: The initial population generation employs a hierarchical anchor point and perturbation strategy. This hierarchical design during population initialization enhances both the algorithm's local exploitation and global exploration capabilities.
[0044] Fitness calculation involves calculating the fitness of each individual in the population and selecting the top three individuals as the best fit. Wolf, wolves and Wolf.
[0045] The individual gray wolf's position is updated using a hybrid gravity weighting and state perturbation collaborative update mechanism. The fitness value of the updated individual is re-evaluated and compared with the fitness value obtained in the previous iteration. If the new value is better than the original fitness value, the original wolf's position is replaced by the new wolf's position; otherwise, the original wolf's position remains unchanged.
[0046] Update convergence factor and coefficient vector And the optimal solution individual.
[0047] The iteration termination condition is determined by whether the number of iterations exceeds a preset value or meets the accuracy requirement. If the termination condition is met, the optimal solution is output as the final global optimal solution; otherwise, the next iteration begins.
[0048] The data processing schemes for each module in the multi-source time-series data prediction system that integrates spatiotemporal features proposed in this paper are as follows: 1. Data Preprocessing Module: Used for cleaning, aligning, and mapping multi-source heterogeneous data. Specifically, it performs data cleaning, outlier detection and handling, temporal alignment of multi-source data, heterogeneous feature standardization, and construction of multi-source sparse topology graphs; it includes the following implementation methods: 1.1 Perform basic cleaning on the input multi-source monitoring data: remove invalid data, null values and duplicates to ensure the integrity and correctness of the original records.
[0049] Data cleaning removes invalid items, null values, and duplicates from data to ensure its integrity and accuracy. 1.2 Outlier Detection and Handling: Outliers in the data are detected using the Interquartile Range (IQR) algorithm.
[0050] Outliers in the data are detected using the IQR algorithm. For the original time-series data, the interquartile range (IQR) algorithm is used to detect outliers. First, the first quartile of the data sequence is calculated. and the third and fourth quartiles And calculate the interquartile range Then define the upper and lower boundaries for anomaly detection.
[0051] The upper and lower boundaries of anomaly detection are defined as follows:
[0052]
[0053] Data outside the upper and lower boundaries are considered outliers. For detected outliers, a moving average method is used for smoothing to eliminate noise interference. The smoothing formula is as follows:
[0054] in, The smoothed value. For window size; 1.3 Multi-Source Data Temporal Alignment and Resampling: To address the issue of inconsistent sampling frequencies in the cleaned multi-source data, a unified high-frequency time reference is established. A cubic spline interpolation algorithm is used to construct a continuous resampling function. This is to ensure the smoothness of the resampled data.
[0055] To address the issue of inconsistent sampling frequencies in multi-source monitoring data, time-domain alignment and resampling are implemented: a unified high-frequency time reference is established. To maintain the smoothness and continuity of physical signal changes and avoid the piecewise high-frequency noise introduced by traditional linear interpolation, this invention employs a cubic spline interpolation algorithm to construct continuous resampling functions for each data source. Let the known sampling point sequence of the low-frequency data source be... For any interval formed by two adjacent known sampling points Construct a cubic polynomial function To fit the data change trend within this interval, the formula is as follows:
[0056] in, For any high-frequency time point under a unified benchmark; These are the undetermined coefficients for this interval. The function must satisfy boundary constraints. , And the smoothness condition for the continuity of the first and second derivatives at the connection points.
[0057] By seeking After solving for the coefficients, all time points on the unified reference time axis will be... By substituting the corresponding interval functions in sequence, the aligned high-frequency dense sequence can be obtained.
[0058] 1.4 Heterogeneous Feature Standardization: Z-Score Standardization (ZSS) is performed on the resampled data to eliminate the dimensional differences between different features.
[0059] To reduce the impact of scale differences between features, all feature values are scaled to a uniform scale. The resampled data is then standardized using Z-Score to eliminate dimensional differences between different features. The standardization formula is as follows:
[0060] in, These are the original eigenvalues. The characteristic mean, The characteristic standard deviation; 1.5 Constructing a Multi-Source Sparse Topology Graph: Constructing a multi-source sparse topology graph. Fusing the time-delay mutual information matrix. With dynamic trend pattern matrix The spatiotemporal dynamic admittance model is used to calculate the transfer admittance between nodes, and a sparse adjacency matrix is generated by combining it with the Top-K strategy. .
[0061] Based on the normalized time series of N variables This invention constructs a multi-source sparse topological graph representing the physical time delay and nonlinear morphological dependencies among multi-source subsystems. It integrates a time-delay mutual information view and a dynamic trend view to generate a sparse adjacency matrix. Specifically, it includes: Constructing a time-delay mutual information matrix The sliding window mutual information algorithm is used to calculate the mutual information between any two nodes. , At the preset maximum lag time The maximum mutual information value within the range is used to quantify the nonlinear time-delay dependency between multi-source data. Constructing a dynamic trend pattern matrix Extract the first-order difference sequence of each node, and use the Dynamic Time Warping Algorithm (DTW) to compute the node's first-order difference sequence. Morphological distance between difference sequences And use the Gaussian kernel function to convert it into similarity. ; Generate sparse adjacency matrix This paper proposes a topology generation model based on a spatiotemporal dynamic admittance mechanism. Unlike traditional linear weighted fusion, it follows the potential-driven-impedance suppression principle and incorporates the time-delay mutual information matrix... Viewed as driving potential energy, the dynamic trend pattern matrix Treated as morphological resistance, nodes are calculated through nonlinear deep coupling. With nodes The transfer admittance values between them are used as the unsparsed connection weights. The calculation formula is as follows:
[0062] in, This is a preset drive gain coefficient used to adjust the overall connection strength; It is the impedance attenuation coefficient, used to control the degree to which physical correlation suppresses morphological resistance; This serves as the base noise floor constant, used to prevent the denominator from being zero and to maintain the numerical stability of the system, thereby enabling adaptive fusion of multi-view features: The time-delayed mutual information value represents the driving potential energy; The distance to the dynamic trend pattern represents resistance; using The term, as a nonlinear modulation factor, simulates the "breakdown" and compensation effects of strong physical time-delay correlation on morphological impedance differences; that is, in physical correlation... When significant, the effective morphological impedance decreases exponentially, thus preserving physical causality while being compatible with waveform morphological heterogeneity. Then, a Top-K preservation strategy is applied to the calculated matrix to generate the final sparse adjacency matrix. This achieves the goal of reducing computational complexity.
[0063] 2. Constructing the SA-STGCN model by integrating a self-attention mechanism: Introducing a self-attention mechanism before the temporal and spatial convolution modules of the ST-GCN model to improve the model's ability to dynamically capture key features.
[0064] The SA-STGCN model built by the basic prediction model building module is based on a redesign of the basic spatiotemporal graph convolution block of the traditional spatiotemporal graph convolution (STGCN) model, which integrates both spatial and temporal self-attention mechanisms into the basic module.
[0065] Specifically, in the spatial dimension, a spatial self-attention mechanism is employed to enhance the spatial graph convolution part that relies on a static adjacency matrix in traditional spatiotemporal convolutional blocks. This spatial self-attention mechanism dynamically calculates the attention weight coefficients between connected graph nodes based on the real-time input data content, as shown in the following formula:
[0066]
[0067] in, It is a learnable linear transformation weight matrix. and These are nodes and eigenvectors, It is a learnable attention weight vector. This represents vector concatenation. It is a node The set of neighboring nodes in the graph. These variable weight coefficients. This enables the model to adaptively focus on more important spatial neighbors, thereby capturing dynamic spatial dependencies more accurately.
[0068] Meanwhile, in the time dimension, a temporal self-attention mechanism is introduced to enhance the original temporal convolution part. This temporal self-attention mechanism overcomes the local receptive field defect caused by the limited size of the convolution kernel in traditional temporal convolution, enabling the model to capture long-distance temporal dependencies within the basic module and understand the complex relationships between non-adjacent time steps in the historical sequence.
[0069] Step 3: SA-STGCN Model Parameter Optimization Module: To construct a high-accuracy IGWO-SA-STGCN algorithm model and achieve data prediction, the specific implementation method is as follows: 3.1 Initial Population Generation The hyperparameter population of the spatiotemporal graph convolutional network with a self-attention mechanism is initialized using a multi-strategy collaborative gray wolf optimization algorithm. This includes the number of stacked graph convolutional blocks and the number of attention heads. The initial population is determined through a hierarchical anchor point and perturbation strategy: first, the anchor point population size is set. Randomly generated There are 10 candidate anchor points, and their corresponding values are calculated using a reverse learning mechanism. A reverse anchor point; then, from this... Evaluate and select the anchor points with the best fitness among the anchor points. Individuals form an anchor wolf pack, and the best individual is selected as the dominant anchor. Finally, the remaining Individuals The system is divided into a development layer with Gaussian distribution perturbation and an exploration layer with Cauchy distribution perturbation, with the perturbation center as the perturbation center.
[0070] The SA-STGCN parameter optimization module optimizes the hyperparameters of SA-STGCN using the Grey Wolf Optimization Algorithm based on multi-strategy collaborative improvement. This algorithm first initializes the population distribution using a hierarchical anchor point and perturbation strategy, setting the total population size as N and the anchor point population size as... Randomly generated There are 10 candidate anchor points, and their corresponding values are calculated based on the reverse learning mechanism. The nth reverse anchor point, the nth reverse anchor point dimension The calculation formula is:
[0071] in and Let be the lower and upper boundaries of the j-th dimension search space, respectively. The anchor points are merged and evaluated, and the one with the best fitness is selected. Individual wolves form an anchor wolf pack. Then, the individual with the best fitness is selected from the "anchor wolf pack" as the dominant anchor. The remaining Individuals are divided into development and exploration layers. The perturbation center is generated. The development layer uses Gaussian distribution perturbation to enhance local development capabilities, while the exploration layer uses Cauchy distribution perturbation, utilizing its "long-tail property" to enhance global exploration capabilities.
[0072] 3.2 Fitness Assessment: The fitness of each individual in the initial population is assessed, and the classification error is calculated using the K-fold cross-validation method to measure the fitness of each group. The advantages and disadvantages of hyperparameter combinations.
[0073] The IGWO algorithm uses K-fold cross-validation to evaluate the hyperparameter combinations of each individual, and the fitness function is defined as:
[0074] in, Represents a set of hyperparameter combinations. The number of folds for cross-validation; To use hyperparameters The trained model, in the first The mean square error calculated on the validation set.
[0075] 3.3 Iterative optimization of the IGWO algorithm dynamically adjusts the convergence factor based on the current number of iterations and the fitness trend, thereby affecting the balance between global exploration and local exploitation, and improving the algorithm's ability to escape local optima and re-explore the global environment. Furthermore, the population position is updated by combining gravity weights and state perturbations.
[0076] In the IGWO algorithm, the convergence factor is decoupled into a time-domain reference decay component. With adaptive state feedback components The product of and is used to achieve closed-loop feedback control. The specific formula is:
[0077] in, This represents the current iteration number. This is a stall counter.
[0078] Time-domain reference attenuation component A hyperbolic tangent hybrid attenuation formula is adopted to achieve a nonlinear "slow-fast-slow" attenuation characteristic. The specific formula is as follows:
[0079] in, The maximum number of iterations, This is the preset decay rate control constant.
[0080] Adaptive state feedback component Responsible for handling when the algorithm stalls. Dynamic nonlinear amplification compensation is performed, and its implementation includes: Set a stagnation counter The initial value is 0. In each iteration... In the middle, compare the current optimal solution ( fitness of wolves Fitness of the previous generation optimal solution .if Not better ,but Conversely, Reset to zero.
[0081] (2) A bounded nonlinear amplification formula is adopted, the specific formula is as follows:
[0082] in, A stagnation counter that is updated by comparing the fitness of the current best solution with that of the previous generation's best solution. and This is a preset feedback control constant. When When greater than 0, The value increases smoothly, causing the convergence factor to... The size is dynamically increased to enhance the algorithm's ability to escape local optima and re-explore the global optimum.
[0083] The specific convergence factor formula is as follows:
[0084] In the IGWO algorithm, the wolf pack position update adopts a hybrid gravity weight and state perturbation collaborative update mechanism. The specific position update formula is as follows:
[0085]
[0086] in, For mixed gravitational weights, Alpha Wolf Fitness value after processing; For the present Wolf With the alpha wolf Euclidean distance, The preset gravitational decay index; The adaptive state-time dual-control convergence factor. For the first Only The wolf's current location The position of another wolf randomly selected from the current population.
[0087] Step 4: Model training, using the IGWO optimization algorithm to obtain the optimal hyperparameter combination. We trained a spatiotemporal graph convolutional network with a self-attention mechanism to build the final prediction model.
[0088] Step 5: Model compression and distillation. Lightweight models are trained using the Knowledge Distillation (KD) framework to expand the application scenarios of the models. The model compression and distillation module uses a knowledge distillation framework to transfer the complex model produced by the above steps into a lightweight model with a simpler structure and higher computational efficiency (hereinafter referred to as...). This study addresses the technical challenges of high computational costs and difficulty in deploying computationally limited edge devices due to the complexity of the model structure and the large number of parameters.
[0089] 5.1 Define a lightweight model Lightweight model The network structure complexity is lower than that of the original model. ; 5.2 Construct a lightweight model for training Dynamic composite loss function ; Through a course weight To balance hard loss and soft loss Course weight With training iterations The dynamic changes and the designed composite loss function as follows:
[0090] Course weight For a number of training iterations A varying annealing function is used to smoothly anneal the student model. The focus shifts from hard loss to soft loss. In a preferred embodiment of the invention, A linear heating strategy is adopted, and its specific formula is as follows:
[0091] in, It is a preset hyperparameter that represents the total number of iterations required for the linear heating phase.
[0092] Soft loss A deterministic weight defined by this invention To achieve balance, that is, through a deterministic weight. To balance the average distillation loss and distribution of distillation losses :
[0093] in, As an uncertainty sensitivity factor, for For the The prediction standard deviation of each sample. This is the mean distillation loss (MDL). This refers to the distribution distillation loss (DDL).
[0094] 5.3 By minimizing For lightweight models Train the model to obtain a lightweight and highly accurate prediction model.
[0095] As can be seen from the above discussion, this invention designs a multi-source time series data prediction method that integrates spatiotemporal features. Compared with the prior art, the advantages and positive effects of this invention are as follows: This invention provides a method for predicting multi-source time-series data by integrating spatiotemporal features. On one hand, a data preprocessing module cleans, handles outliers, and standardizes the multi-source data to ensure its integrity and consistency. On the other hand, a spatiotemporal graph convolutional network module with a self-attention mechanism is used to effectively extract complex spatiotemporal dependencies from the data. Furthermore, this invention utilizes an improved Grey Wolf optimization algorithm to globally optimize the hyperparameters of SA-STGCN, solving the problem of traditional optimization relying on human experience and easily getting trapped in local optima, thus significantly improving the model's prediction accuracy and generalization ability.
[0096] This invention establishes a complete prediction process from data preprocessing, spatiotemporal feature extraction, intelligent optimization to fault diagnosis, significantly improving the model's prediction accuracy and automated tuning capabilities in complex multi-source time-series data environments. An improved gray wolf optimization algorithm is employed to enhance global search and local exploitation capabilities, ensuring good classification performance across different datasets. This invention effectively enhances the model's dynamic identification capability for real-time data anomalies, providing reliable support for real-time status monitoring in complex data environments.
[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for predicting multi-source time-series data by integrating spatiotemporal features, characterized in that, Includes the following steps: S1. Data preprocessing: Processing multi-source time series data, specifically including: Clean the input data to remove invalid data, null values, and duplicates; Outlier detection and processing: The interquartile range (IQR) algorithm is used to detect outliers, and the moving average method is used for smoothing correction. Data from different sources are time-domain aligned and resampled using a cubic spline interpolation algorithm, so that the data have a unified time reference and avoid data misalignment caused by different sampling frequencies; Z-Score standardization is applied to all features to eliminate the dimensional differences between different features, so that the data can be processed on the same scale. A multi-source sparse topology graph is constructed, and a sparse adjacency matrix is generated using the time-delay mutual information matrix and the dynamic time warping (DTW) algorithm to describe the spatiotemporal dependencies between different data sources. S2. Construct the Spatiotemporal Graph Convolutional Network STGCN and introduce a self-attention mechanism, specifically including: Temporal and spatial self-attention mechanisms are introduced into the spatiotemporal graph convolution module to dynamically calculate the relationship weights between nodes and enhance the model's adaptability. The spatial self-attention mechanism dynamically calculates the attention weights between graph nodes based on real-time input data, thereby increasing the model's attention to key spatiotemporal nodes. Temporal self-attention mechanisms are used to capture long-term temporal dependencies, avoiding the limited local receptive field problem of traditional convolutional methods. S3. Hyperparameter optimization: The improved Grey Wolf Optimization (IGWO) algorithm is used to globally optimize the hyperparameters of the Spatiotemporal Graph Convolutional Network (STGCN). Specifically, this includes: An initial population is generated using a hierarchical anchor point and perturbation strategy, and the optimal combination of hyperparameters is selected based on fitness evaluation. The prediction error was calculated using the K-fold cross-validation method, and the hyperparameters were adjusted according to the model accuracy during the optimization process. By using an adaptive state-time dual-control convergence factor, the global search capability and local exploitation capability are balanced to avoid getting trapped in local optima; the population position is updated by mixing gravity weights and state perturbations. S4. Model Training: The spatiotemporal graph convolutional network model is trained using the optimized hyperparameters, specifically including: The spatiotemporal graph convolutional network model is optimized through multiple iterations, using training data for learning, and hyperparameters such as the number of network layers and convolutional kernel size are gradually adjusted. In each iteration, the network parameters are adjusted using gradient descent to optimize the prediction results and obtain a high-precision spatiotemporal graph convolutional network model. S5. Model Compression and Distillation: Based on the knowledge distillation framework, this transforms a complex, trained model into a lightweight prediction model. Specifically, it includes: Define a lightweight model and gradually reduce model complexity by balancing hard and soft losses through a dynamic composite loss function; By varying course weights during training, hard and soft losses are balanced; the loss of the lightweight model is minimized during training to obtain a lightweight yet high-accuracy prediction model. S6. Use the trained lightweight prediction model to make real-time predictions on multi-source time series data. S7. Optimize based on real-time prediction results, and continuously optimize and adjust the model through an online learning mechanism.
2. The method for predicting multi-source time-series data by fusing spatiotemporal features according to claim 1, characterized in that, S1 further includes: By combining the time-delay mutual information matrix and the dynamic time warping algorithm, a spatiotemporal dependency graph is generated, specifically as follows: Calculate the time-delay mutual information matrix between different nodes to capture nonlinear coupling and time-delay phenomena between multi-source data; The dynamic time warping algorithm is used to calculate the time dependencies between nodes, and the results are transformed into a similarity matrix based on the Gaussian kernel function. A sparse adjacency matrix is generated using the Top-K strategy to connect nodes with strong physical relationships, thereby constructing a multi-source sparse topology graph that reflects the complex relationships between multiple data sources.
3. The method for predicting multi-source time-series data by fusing spatiotemporal features according to claim 1, characterized in that, S1 further includes: Dynamic trend pattern matrix Treated as morphological resistance, nodes are calculated through nonlinear deep coupling. With nodes The transfer admittance values between them are used as the unsparsed connection weights. The calculation formula is as follows: in, This is the preset drive gain coefficient; This is the impedance attenuation coefficient; The base noise floor constant; This is the time-delay mutual information value; For dynamic trend pattern distance; using The term is used as a nonlinear modulation factor.
4. The method for predicting multi-source time-series data by fusing spatiotemporal features according to claim 1, characterized in that, S2 further includes: A spatial self-attention mechanism is adopted to dynamically calculate the attention weight coefficients between connected graph nodes based on the real-time input data content. The formula is as follows: in, It is a learnable linear transformation weight matrix. and These are nodes and eigenvectors, It is a learnable attention weight vector. This represents vector concatenation. It is a node The set of neighboring nodes in the graph.
5. The method for predicting multi-source time-series data by fusing spatiotemporal features according to claim 1, characterized in that, The fitness function in S3 is: in, For a set of hyperparameters, The number of folds for cross-validation. To use hyperparameters The trained model, in the first The mean square error calculated on the validation set.
6. The method for predicting multi-source time series data by fusing spatiotemporal features according to claim 1, characterized in that, S3 further includes: Decouple the convergence factor into a time-domain reference decay component. With adaptive state feedback components The product of these two elements is used to achieve closed-loop feedback control, specifically: in, This represents the current iteration number. For stagnation counters; Time-domain reference attenuation component A hyperbolic tangent hybrid attenuation formula is adopted, specifically as follows: in, The maximum number of iterations, This is the preset decay rate control constant; Adaptive state feedback component When the algorithm stalls... Perform dynamic nonlinear amplification compensation.
7. The method for predicting multi-source time series data by fusing spatiotemporal features according to claim 6, characterized in that, S3 further includes: Dynamic nonlinear amplification compensation specifically includes: 1) Set a stall counter The initial value is 0; in each iteration In the middle, compare the current optimal solution ( fitness of wolves Fitness of the previous generation optimal solution ;like Not better ,but Conversely, Reset to zero; 2) A bounded nonlinear amplification formula is adopted, specifically: in, A stagnation counter that is updated by comparing the fitness of the current best solution with that of the previous generation's best solution. and The preset feedback control constant; when When greater than 0, The value increases smoothly, causing the convergence factor to... The size is dynamically increased to enhance the algorithm's ability to escape local optima and re-explore the global optimum.
8. The method for predicting multi-source time series data by fusing spatiotemporal features according to claim 7, characterized in that, The convergence factor is: The specific location update formula is as follows: in, For mixed gravitational weights, Alpha Wolf Fitness value after processing; For the present Wolf With the alpha wolf Euclidean distance, The preset gravitational decay index; The adaptive state-time dual-control convergence factor. For the first Only The wolf's current location The position of another wolf randomly selected from the current population.
9. The method for predicting multi-source time series data by fusing spatiotemporal features according to claim 1, characterized in that, The S5 also includes: Build a lightweight model Dynamic composite loss function ; Through a course weight Balanced hard loss and soft loss Course weight With training iterations Dynamic changes, composite loss function for: The soft loss Further through a deterministic weight To balance the average distillation loss and distribution of distillation losses for: in, for For the The prediction standard deviation of each sample. This represents the average distillation loss.
10. A multi-source time-series data prediction system integrating spatiotemporal features, characterized in that, Includes the following modules: The data preprocessing module is used to clean, detect outliers, align time-domain data, standardize features, and generate multi-source sparse topology graphs. The spatiotemporal feature extraction module includes a spatiotemporal graph convolutional network SA-STGCN with a self-attention mechanism, which is used to extract spatiotemporal dependent features from multi-source time-series data. The parameter optimization module is used to globally optimize the hyperparameters of the SA-STGCN model based on the improved Grey Wolf Optimization Algorithm to improve the model's prediction accuracy. The model compression and distillation module is used to compress and distill the trained model to generate a lightweight prediction model. The prediction module is used to make predictions on real-time data using the compressed prediction model and output the prediction results.