A light-weight time series prediction method and device fusing dynamic forgetting in edge scenes
By combining temporal convolutional networks and Bayesian Transformers, along with dynamic forgetting mechanisms and edge training loops to optimize the model on edge devices, the problem of traditional models being unable to actively forget outdated patterns is solved, achieving lightweight and adaptive time series prediction and improving the prediction performance of edge devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HENAN POLYTECHNIC UNIV
- Filing Date
- 2025-06-25
- Publication Date
- 2026-07-14
Smart Images

Figure CN120781199B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of time series forecasting technology, and in particular to a lightweight time series forecasting method and apparatus that incorporates dynamic forgetting in edge scenarios. Background Technology
[0002] Time series forecasting tasks account for a significant portion of industrial applications. However, in practical applications, the distribution of time series data collected by edge devices (such as sensors and IoT nodes) undergoes gradual changes over time due to factors like equipment aging and seasonal changes, or abrupt shifts caused by sudden failures and extreme events. This raises two key issues: first, traditional static models cannot actively forget outdated patterns, leading to a continuous decline in predictive performance; second, edge devices have limited memory and computing power, necessitating more lightweight model designs.
[0003] Although research on deep learning methods in time series forecasting has reached a considerable scale, current studies primarily focus on improving forecast accuracy, with insufficient attention paid to the trade-off between parameter efficiency and accurate prediction. On one hand, deep learning models have high hardware requirements, making them difficult to implement in edge computing scenarios. On the other hand, unlike existing deep learning model training approaches, most current research employs continuous learning methods that emphasize preserving historical knowledge for comprehensive modeling. This approach contradicts the fundamental logic and requirement of maintaining parameter efficiency in edge time series forecasting tasks. Summary of the Invention
[0004] This invention provides a lightweight time series prediction method and apparatus that incorporates dynamic forgetting in edge scenarios, aiming to solve the following two problems: First, traditional static models cannot actively forget outdated patterns, resulting in a continuous decline in prediction performance due to accumulated errors; Second, edge devices have limited memory and computing power, requiring a more lightweight model design.
[0005] In a first aspect, the present invention provides a lightweight time series prediction method that incorporates dynamic forgetting in edge scenarios, comprising:
[0006] The system acquires the operating status information of the monitored equipment within a preset time period, processes the operating status information to generate a time series data, and extracts the high-frequency and low-frequency components of the time series data.
[0007] For high-frequency components, a trained temporal convolutional network is used for prediction to obtain the first data component of the monitored device at a future time point;
[0008] For low-frequency components, a Bayesian Transformer and a time-aware attention mechanism are used for prediction to obtain the second data component of the monitored device at a future time point.
[0009] Calculate the weights of the first and second data components, and fuse the two data components according to the weights to obtain the operating status information of the monitored equipment at a future time point.
[0010] Furthermore, it also includes: identifying important time nodes in the time series data, and marking the high-frequency and low-frequency components at the important time nodes;
[0011] The corresponding loss function is:
[0012]
[0013] Where A is the set of relevant anchor point parameters, L pred The prediction error loss is represented by λ1, which is the regularization parameter, and Q is the value of Q. i S represents the predicted value output by the model. ianc hor This represents the anchor state at time point i.
[0014] Furthermore, the training process of the temporal convolutional network specifically includes:
[0015] In each training step, a time-varying exponential decay is applied to the convolution kernel, causing it to update its weights according to the following formula:
[0016]
[0017] Among them, W high,t λ represents the updated convolutional kernel weights corresponding to the current training step t, λ2 is the decay rate, e is the natural exponent, and Δt represents the time interval for updating the parameter weights.
[0018] Furthermore, it also includes: for high-frequency components, when a sudden increase in the relevant parameters of the high-frequency component is detected, the relevant parameters are directly reset to their initial values.
[0019] Furthermore, the training process of the temporal convolutional network specifically includes an edge training loop, which includes a forgetting phase, a compensation fine-tuning phase, and an elastic expansion phase.
[0020] The forgetting stage refers to analyzing the importance of time-domain parameters, using binary masks to remove low-importance time-domain parameters, and forming sparse sub-networks.
[0021] The compensation fine-tuning phase refers to updating the sparse subnetwork only on new data to restore the model capacity;
[0022] The elastic expansion phase refers to the dynamic recovery of some forgotten parameters when losses increase.
[0023] Furthermore, the training process of the Bayesian Transformer and the time-aware attention mechanism specifically includes:
[0024] Using a Bayesian Transformer to extract each parameter θ from the low-frequency components i Modeled as a time-varying Gaussian distribution The variance of each parameter in the low-frequency component is calculated using the following formula:
[0025]
[0026] in, The low-frequency parameter θ at time t is represented by i The prior variance; α represents the prior variance at the initial time step. i It is the time decay factor;
[0027] Calculate attention score using time-aware attention mechanism:
[0028]
[0029] in, Used to control historical attention, t i For the current time node, t j For past time points, λ2 is the decay rate; Q is the query vector, representing the parameter that needs to be focused on; K is the key vector, which is matched with the query vector; V is the value vector, representing the actual parameter.
[0030] Furthermore, the training process of the Bayesian Transformer and the time-aware attention mechanism specifically includes:
[0031] Calculate the low-frequency parameter θ using the following formula. i The survival time Δt is used to update the low-frequency parameter θ according to the following formula. i Importance S i If the importance of the updated value is S′ i If the value is less than the preset pruning threshold θ, then delete the low-frequency parameter θ. i ;
[0032] Δt=t i -t j
[0033]
[0034] Where e represents the natural index.
[0035] Furthermore, the calculation of the weights of the first and second data components, and the fusion of the two data components based on the weights to obtain the operating status information of the monitored device at a future time point, specifically includes:
[0036]
[0037]
[0038] Where g represents the weight, ∈ is a small constant to prevent division by zero, and F high F represents the high-frequency component. low y represents the low-frequency component, ω represents the learnable and dynamically adjustable weights, σ is the Sigmoid function, and y low This represents the output of the low-frequency branch, y high This indicates the output of the high-frequency branch.
[0039] Secondly, the present invention provides a lightweight time series prediction device that integrates dynamic forgetting in edge scenarios, comprising:
[0040] The data processing and frequency domain decomposition module is used to acquire the operating status information of the monitored equipment within a preset time period, process the operating status information to generate a time series data, and extract the high-frequency and low-frequency components of the time series data.
[0041] The high-frequency branch module is used to predict high-frequency components using a trained temporal convolutional network to obtain the first data component of the monitored device at a future time point.
[0042] The low-frequency branch module is used to predict low-frequency components using a Bayesian Transformer and a time-aware attention mechanism to obtain the second data component of the monitored device at a future time point.
[0043] The gated aggregation module is used to calculate the weights of the first and second data components, and then fuse the two data components according to the weights to obtain the operating status information of the monitored equipment at a future time point.
[0044] Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as described in the first aspect.
[0045] Fourthly, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in the first aspect.
[0046] The beneficial effects of this invention are as follows:
[0047] This invention provides a lightweight time series prediction method and device for edge scenarios that incorporates dynamic forgetting. It can actively forget outdated patterns, adapt to data distribution drift, and achieve a balance between model lightweighting and adaptive distribution drift. In edge time series prediction scenarios, this method and device, through dynamic parameter decay and structural optimization, utilizes a methodology of "high-frequency fast updates and low-frequency slow decay" to effectively address the problem of continuously declining prediction performance of traditional static models on edge devices. Simultaneously, it overcomes the difficulty of deploying existing deep learning models in edge scenarios, achieving a balance between efficient parameters and accurate prediction. Attached Figure Description
[0048] Figure 1 This is one of the flowcharts illustrating a lightweight time series prediction method that incorporates dynamic forgetting in edge scenarios, as provided in an embodiment of the present invention.
[0049] Figure 2 This is the second flowchart illustrating a lightweight time series prediction method that incorporates dynamic forgetting in edge scenarios, as provided in an embodiment of the present invention.
[0050] Figure 3 A schematic diagram of the lightweight time series prediction device that integrates dynamic forgetting in the scenario provided by an embodiment of the present invention;
[0051] Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0053] In industrial settings, many devices, such as motors, pumps, compressors, and wind turbines, require real-time monitoring of their operating status to prevent sudden malfunctions that could lead to downtime, production losses, or safety hazards. Real-time prediction of time-series data (such as temperature, vibration frequency, and pressure) collected by sensors via edge devices allows for the early prediction of equipment anomalies (e.g., excessive bearing wear, unbalanced vibration). Furthermore, based on time-series prediction, maintenance can shift from scheduled to preventative measures, reducing the operating and maintenance costs of industrial equipment. While cloud-based computation effectively addresses the resource constraints of edge devices, it can suffer from high latency and high costs. Therefore, this invention aims to provide a time-series prediction method and apparatus that can be deployed at a lower cost and with rapid response on edge devices.
[0054] The trends, periodicity, and abrupt changes in time series require that the time series prediction methods and devices provided should be able to dynamically adjust memory weights. This is essentially highly consistent with the goal of the forgetting mechanism—"decaying old patterns and strengthening new patterns." Therefore, this invention aims to provide a lightweight time series prediction method and device that integrates dynamic forgetting in edge scenarios to achieve efficient and accurate time series prediction by actively forgetting outdated patterns and focusing on current patterns.
[0055] Combination Figure 1 and Figure 2 As shown, this embodiment of the invention provides a lightweight time series prediction method that incorporates dynamic forgetting in edge scenarios, including the following steps:
[0056] S101: Obtain the operating status information of the monitored device within a preset time period, process the operating status information to generate a time series data, and extract the high-frequency and low-frequency components of the time series data.
[0057] Specifically, a fixed-length window and a moving step size are set, and the window is slid across the entire time series data according to the moving step size. This can divide the entire time series data into several sub-time series data. A Fast Fourier Transform (FFT) is performed on each sub-time series data to transform the entire time series data from the time domain to the frequency domain, thereby decomposing the time series data into low-frequency components and high-frequency components.
[0058] For example, take a certain sub-time series data X = [x1, x2, ..., x n For example, the frequency domain representation F = FFT(X) is obtained through FFT, and then F is divided into low-frequency components F1 and F2 according to the dividing frequency k. low =[F1,F2,...,F k ] and high-frequency component F high =[F k+1 ,F k+2 ,...,Fn Finally, X is obtained through inverse transformation reconstruction. low =IFFT(F low ) and X high =IFFT(F high ).
[0059] Furthermore, to avoid forgetting important information during parameter updates, this embodiment of the invention also designs a dynamic anchor point detection mechanism, specifically including: identifying important time nodes in the time series data, and marking the high-frequency and low-frequency components at the important time nodes;
[0060] Specifically, when the operating conditions of the monitored equipment change (such as switching production specifications, equipment start-up / shutdown preheating, or mechanical and electromagnetic interference in the environment), the data characteristics of the monitored equipment will change significantly. This embodiment refers to the time points where the data characteristics change significantly as important time nodes. A dynamic anchor point detection mechanism is used to protect the parameters at important time nodes, preventing them from being forgotten and ensuring that key information is not lost in subsequent modeling. Based on this, the time points where the peak and the start of the cycle in a time series data are located are important time nodes. Therefore, the detection methods can include detecting peak points based on derivative thresholds and identifying the start of the cycle based on autocorrelation analysis.
[0061] Correspondingly, the loss function is:
[0062]
[0063] Where A is the set of relevant anchor point parameters, L pred The prediction error loss is represented by λ1, which is a regularization parameter used to control the weight of the anchor point labeling loss in the total loss; Q is the prediction error loss. i S represents the predicted value output by the model. ianc hor This represents the anchor state at time point i. The loss function minimizes Q... i and S ianc hor The differences between them allow the model to learn how to make better predictions at important time points, and by adjusting the value of λ1, the model can control the degree of importance it places on the accuracy of anchor points during the optimization process.
[0064] S102: For high-frequency component X high The trained temporal convolutional network is used to make predictions and obtain the first data component of the monitored device at a future time point.
[0065] Specifically, in actual time series monitoring and forecasting tasks, high-frequency parameters often represent high-frequency changes in data patterns within a short period, which contain a lot of data noise. This noise is mostly caused by minor changes in equipment status (e.g., changes in production specifications, inconsistent raw materials, or continuous equipment operation can all lead to minor changes in equipment status), changes in the production environment, or changes in operator behavior habits, resulting in short-term high-frequency fluctuations in data. The impact of these fluctuations on the time series is sometimes significant and sometimes insignificant. Based on this, this embodiment of the invention uses a temporal convolutional network to model and predict time series data.
[0066] In this embodiment, to achieve fast updates of high-frequency information, during the training of the temporal convolutional network, a time-varying exponential decay is applied to the convolutional kernel in each training step, so that its weights are updated according to the following formula:
[0067]
[0068] Among them, W high,t λ represents the updated convolutional kernel weights corresponding to the current training step t, λ2 is the decay rate (when the value is large, such as 0.1, it can accelerate the elimination of old fluctuation information), e is the natural exponent, and Δt represents the time interval for updating parameter weights. The larger the time interval, the lower the parameter weights.
[0069] Furthermore, a mutation detection trigger reset mechanism is also set up, which includes: when a high-frequency energy surge is detected (such as when the variance of the high-frequency component exceeds a set threshold in the current window), the relevant parameters of the high-frequency component are directly reset to the initial value, thereby avoiding historical noise interference.
[0070] Specifically, in the high-frequency branch, the main body of the model in this invention is a TCN temporal convolutional neural network, which is also equipped with weight decay of the convolutional kernels to make the convolutional kernels more focused on recent fluctuations. However, over time, not all parameter weight decays are appropriate. In this invention, events occurring at some representative time points are referred to as mutations. These mutations are not outliers in the general sense, but represent a shift or migration of a pattern. For example, a significant shift in the mean of production specification switching data is a mutation and needs to be focused on by the model. This embodiment sets a mutation detection trigger reset mechanism, hoping that the model can recall these representative features and details when such situations occur, rather than uniformly "forgetting" them over time.
[0071] Furthermore, an edge training loop is included, specifically comprising: a forgetting phase, compensatory fine-tuning, and elastic expansion. The forgetting phase involves using binary masks to remove low-importance parameters through temporal parameter importance analysis, forming a sparse subnetwork. Compensatory fine-tuning involves updating the sparse subnetwork only on new data to restore model capacity. Elastic expansion involves dynamically recovering some forgotten parameters as "reserve experts" when the loss increases.
[0072] Specifically, over time, through weight decay, the weights of some parameters gradually fall below a set threshold (e.g., 0.01). When the weight is too low, the actual impact of the parameter on the model's predictive ability can be considered negligible. Therefore, this embodiment of the invention uses a binary mask to set these parameters with excessively low weights to zero, thereby filtering out parameters with too little impact on predictive ability. The sparse subnetwork of this invention refers to a network that contains only zero values and non-zero values that have a significant impact on the model's predictive ability. These non-zero values encompass the model's high-level abstraction of the learned data patterns.
[0073] In actual industrial time series forecasting, new time series data streams are constantly being input into the model training. Simply modeling past data patterns is far from sufficient for accurate time series forecasting. Therefore, this embodiment sets up compensation fine-tuning to focus on learning new data patterns on these new input data. In this way, the zero values that have been filtered out can be recovered by training on the new data.
[0074] If the loss function increases significantly during the training process of "learning new patterns and discarding old patterns", it is because the model has forgotten old patterns that should not have been forgotten. Therefore, this embodiment uses the features of past key time points as a kind of "reserve experts". When the model performance deteriorates, these "reserve experts" are reactivated to assist the current prediction.
[0075] Specifically, the edge training loop approach avoids the catastrophic forgetting problem of high-frequency parameters. Furthermore, by using binary masks instead of continuous weight adjustments and limiting the number of fine-tuning iterations, computational complexity is reduced and training efficiency is improved. This method operates efficiently on edge devices, ensuring that the model retains previous key knowledge while learning new information, thus enhancing the model's robustness and adaptability.
[0076] S103: For low-frequency component X low The second data component of the monitored device at a future time point is obtained by using Bayesian Transformer and time-aware attention mechanism for prediction.
[0077] Specifically, low-frequency fluctuations in time series data often reflect long-term trends, and these low-frequency data characteristics, to some extent, reflect the aging and wear of key components in industrial equipment. Equipment fatigue caused by prolonged operation, and abnormal vibrations or even shutdowns due to component aging and wear exceeding limits, can all be reflected in the long-term trend modeling of time series data. Therefore, this embodiment uses a Bayesian Transformer and a time-aware attention mechanism to predict low-frequency components in time series data.
[0078] In this embodiment, a Bayesian Transformer is used to transform each parameter θ in the low-frequency component. i Modeled as a time-varying Gaussian distribution The variance of each parameter in the low-frequency component is calculated using the following formula:
[0079]
[0080] in, The low-frequency parameter θ at time t is represented by i The prior variance; α represents the prior variance at the initial time (t=0), which is a measure of the initial uncertainty of the prior distribution of the low-frequency parameters; i It is the time decay factor; a larger α low The value implies that the prior variance grows faster over time, the prior constraints are relaxed more rapidly, and the rate at which the prior variance grows over time is controlled. t represents the time variable, indicating the elapsed time since the initial moment.
[0081] Calculate attention score using time-aware attention mechanism:
[0082]
[0083] in, Used to control historical attention, t i For the current time node, t j For past time points, λ² is the decay rate, used to control the impact of time distance on attention. A larger λ² value means that time distance has a greater impact on attention, that is, the influence of older data points on the current prediction decays faster. Q (Query) is the query vector, representing the parameters that need to be focused on; K (Key) is the key vector, matched with the query vector to determine which parameters are relevant; V (Value) is the value vector, containing the actual parameters, which are weighted and summed according to the degree of matching between the query and the key; d k is the dimension of the key vector, used to scale the dot product to prevent the gradient vanishing problem caused by an excessively large dot product result.
[0084] Specifically, this embodiment performs Bayesian time decay processing on low-frequency components, so that the model does not overemphasize short-term high-frequency noise, but grasps the long-term trend of the data, thereby achieving fast updates of high-frequency information and slow decay of low-frequency information.
[0085] Furthermore, to prevent the model from excessively forgetting important low-frequency parameters, a spatiotemporal joint forgetting mechanism is designed, specifically including: calculating the low-frequency parameter θ according to the following formula. i The survival time Δt is used to update the low-frequency parameter θ according to the following formula. i Importance S i If the importance of the updated value is S′ i If the value is less than the preset pruning threshold θ, then delete the low-frequency parameter θ. i ;
[0086] Δt=t i -t j
[0087]
[0088] Among them, t i The current time point refers to the latest point in time in the calculation or analysis, or the point in time where a prediction is being made. j Historical time points refer to an earlier point in the time series, or a specific point in time used for reference or comparison during calculations. λ² represents the forgetting rate or decay rate, and e represents the natural exponent.
[0089] Specifically, in this embodiment, a timestamp and spatial importance score are introduced for each parameter, and the forgetting decision function (i.e., S′) is used. i <θ) Avoid accidentally deleting old but important parameters. The spatial importance score combines parameter weight magnitude and gradient sensitivity (such as Fisher information) to evaluate the importance S. i .
[0090] S104: Calculate the weights of the first data component and the second data component, and fuse the two data components according to the weights to obtain the operating status information of the monitored equipment at a future time point.
[0091] Specifically, in industrial settings, many monitoring indicators require long-term and continuous monitoring. Data monitoring should not only grasp the long-term trends of the data but also pay attention to short-term fluctuations, while avoiding the accumulation of errors in the prediction process.
[0092] This invention separates time series data into high-frequency and low-frequency features, performs parallel predictions on each using different branches, and then aggregates the prediction results to achieve time series data prediction. The high-frequency branch output and the low-frequency branch output contribute differently to the final prediction result. Therefore, this step calculates the weights of the two branches to aggregate the final prediction result.
[0093] As one possible implementation method, the weights of the two factors, also known as the gate values, are calculated as follows, and then the two factors are fused using a weighted average method based on these weights to obtain the final prediction result.
[0094]
[0095]
[0096] Where g represents the weight, ∈ is a small constant to prevent division by zero, and F high F represents the high-frequency component. low Representing the low-frequency component, y low This represents the output of the low-frequency branch, y high ω represents the output of the high-frequency branch, and ω is a learnable and dynamically adjustable weight used to distinguish the contribution of high-frequency and low-frequency branch results to the final result. For the final prediction result, the influence of high-frequency and low-frequency branches is not constant and needs to be dynamically adjusted through ω. σ is the Sigmoid function.
[0097] Based on the methodology of "fast updates for high frequencies and slow decay for low frequencies", this invention employs different prediction strategies for high-frequency parameter groups and low-frequency parameter groups, thereby improving prediction accuracy.
[0098] Based on the same inventive concept, such as Figure 3 As shown, this embodiment of the invention provides a lightweight time series prediction device that integrates dynamic forgetting in edge scenarios, including: a data processing and frequency domain decomposition module, a high-frequency branch module, a low-frequency branch module, and a gated aggregation module.
[0099] The data processing and frequency domain decomposition module is used to acquire the operating status information of the monitored device within a preset time period, process the operating status information to generate a time series data, and extract the high-frequency and low-frequency components of the time series data. The high-frequency branch module is used to predict the high-frequency components using a trained temporal convolutional network to obtain the first data component of the monitored device at a future time point. The low-frequency branch module is used to predict the low-frequency components using a Bayesian Transformer and a time-aware attention mechanism to obtain the second data component of the monitored device at a future time point. The gated aggregation module is used to calculate the weights of the first and second data components, and fuse the two data components according to the weights to obtain the operating status information of the monitored device at a future time point.
[0100] This invention relates to the field of time series prediction, and particularly to time series prediction in edge scenarios. In the frequency domain decomposition module, the time series is separated into high-frequency components representing short-term waves and noise, and low-frequency components representing long-term trends and periodicity through frequency domain decomposition. In the high-frequency branch module, TCN is used for the high-frequency parameter group; in the low-frequency branch module, Bayesian Transformer and time-aware attention mechanism are used for the low-frequency parameter group. To avoid catastrophic forgetting and insufficient forgetting of parameters, "triple insurance" is set at different positions of the model: (1) After frequency domain decomposition, the parameters are dynamically anchored to avoid forgetting important information; (2) In the high-frequency branch module, an edge training loop is designed to avoid catastrophic forgetting problems that may be caused by rapid iteration of high-frequency parameters; (3) In the low-frequency branch module, a spatiotemporal joint forgetting mechanism is used when processing low-frequency parameters, and a timestamp and spatial importance score are introduced for each parameter. The forgetting decision function is used to avoid the accidental deletion of old but important parameters. In the gated aggregation module, the weights of the high-frequency branch and the low-frequency branch are dynamically allocated according to the frequency domain energy ratio of the current sequence, and the final prediction result is obtained by aggregation. This invention is used to perform time series forecasting tasks on edge devices and maintains parameter efficiency by actively forgetting outdated patterns to focus on current patterns. This method aligns with the time series forecasting logic of "forgetting old patterns and reinforcing new patterns," employing a methodology of "high-frequency, fast updates and low-frequency, slow decay" to maintain model lightweightness and avoid model failure caused by error accumulation over long time scales, thus achieving efficient and accurate forecasting of time series data in edge parameter-constrained scenarios.
[0101] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4As shown, the electronic device may include a processor 401, a communication interface 402, a memory 403, and a communication bus 404. The processor 401, communication interface 402, and memory 403 communicate with each other via the communication bus 404. The processor 401 can call logical instructions in the memory 403 to execute a lightweight time-series prediction method that integrates dynamic forgetting in edge scenarios. This method includes: acquiring the operating status information of the monitored device within a preset time period; processing the operating status information to generate time-series data; extracting high-frequency and low-frequency components of the time-series data; predicting the high-frequency components using a trained temporal convolutional network to obtain a first data component of the monitored device at a future time point; predicting the low-frequency components using a Bayesian Transformer and a time-aware attention mechanism to obtain a second data component of the monitored device at a future time point; calculating the weights of the first and second data components; and fusing the two data components according to the weights to obtain the operating status information of the monitored device at a future time point.
[0102] Furthermore, when the logical instructions in the aforementioned memory 403 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0103] This invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute a lightweight time series prediction method for fusing dynamic forgetting in edge scenarios provided by the above-described method embodiments.
[0104] This invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements a lightweight time series prediction method for fusing dynamic forgetting in edge scenarios provided by the above-described method embodiments.
[0105] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A lightweight time series prediction method incorporating dynamic forgetting in edge scenarios, characterized in that, include: The system acquires the operating status information of the monitored equipment within a preset time period, processes the operating status information to generate a time series data, and extracts the high-frequency and low-frequency components of the time series data. For high-frequency components, a trained temporal convolutional network is used for prediction to obtain the first data component of the monitored device at a future time point; the training process of the temporal convolutional network specifically includes: In each training step, a time-varying exponential decay is applied to the convolution kernel, causing it to update its weights according to the following formula: in, Indicates the current training step The corresponding updated convolutional kernel weights, It is the attenuation rate. For natural index, Indicates the time interval for updating parameter weights; The training process of the temporal convolutional network specifically includes an edge training loop, which includes a forgetting phase, a compensation fine-tuning phase, and an elastic expansion phase. The forgetting stage refers to analyzing the importance of time-domain parameters, using binary masks to remove low-importance time-domain parameters, and forming sparse sub-networks. The compensation fine-tuning phase refers to updating the sparse subnetwork only on new data to restore the model capacity; The elastic expansion phase refers to the parameters of some forgotten key time points that are dynamically recovered when losses increase. For low-frequency components, a Bayesian Transformer combined with a time-aware attention mechanism is used for prediction to obtain the second data component of the monitored device at a future time point; the training process of the Bayesian Transformer combined with the time-aware attention mechanism specifically includes: Using a Bayesian Transformer to extract each parameter from the low-frequency components Modeled as a time-varying Gaussian distribution ( ); where the variance of each parameter in the low-frequency component is calculated according to the following formula: in, Indicates time Low-frequency parameters The prior variance; Let V be the prior variance at the initial time. It is the time decay factor; Calculate attention score using time-aware attention mechanism: in, Used to control historical attention. For the current time point, For past time points, Q is the decay rate; K is the query vector, representing the parameter that needs to be focused on; V is the key vector, which is matched with the query vector; and V is the value vector, representing the actual parameter. The training process of the Bayesian Transformer and the time-aware attention mechanism also includes: Calculate the low-frequency parameters using the following formula. Survival time According to the survival time Update the low-frequency parameters according to the following formula. Importance If the importance of the update Less than the preset pruning threshold Then delete the low-frequency parameter. ; in, Indicates the natural index; Calculate the weights of the first and second data components, and fuse the two data components according to the weights to obtain the operating status information of the monitored equipment at a future time point.
2. The lightweight time series prediction method for edge scenarios incorporating dynamic forgetting as described in claim 1, characterized in that, Also includes: Identify important time nodes in the time series data and mark the high-frequency and low-frequency components at the important time nodes; The corresponding loss function is: Where A is the set of relevant anchor point parameters, To predict error loss, For regularization parameters, The predicted value output by the model; This represents the anchor state at time point i.
3. The lightweight time series prediction method for edge scenarios incorporating dynamic forgetting as described in claim 1, characterized in that, The calculation of the weights of the first and second data components, and the fusion of the two data components based on the weights to obtain the operating status information of the monitored device at a future time point, specifically includes: in, Indicates weight, It is a small constant that prevents division by zero. Represents high-frequency components, Indicates low-frequency components, This represents weights that can be learned and dynamically adjusted. For the Sigmoid function, This indicates the output of the low-frequency branch. This indicates the output of the high-frequency branch.
4. A lightweight time series prediction device that integrates dynamic forgetting in edge scenarios, characterized in that, Applied to the method of claim 1, comprising: The data processing and frequency domain decomposition module is used to acquire the operating status information of the monitored equipment within a preset time period, process the operating status information to generate a time series data, and extract the high-frequency and low-frequency components of the time series data. The high-frequency branch module is used to predict high-frequency components using a trained temporal convolutional network to obtain the first data component of the monitored device at a future time point. The low-frequency branch module is used to predict low-frequency components using a Bayesian Transformer and a time-aware attention mechanism to obtain the second data component of the monitored device at a future time point. The gated aggregation module is used to calculate the weights of the first and second data components, and then fuse the two data components according to the weights to obtain the operating status information of the monitored equipment at a future time point.
5. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 3.
6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 3.