IoT (Internet of Things) data online prediction system based on memory replay variational automatic encoder
By introducing memory playback variational automatic encoder and attention mechanism in deep learning models, the concept drift problem caused by dynamic changes in sensor data is solved, efficient prediction and model adaptability of sensor time series data is achieved, and intelligence is improved Security of environmental and data center monitoring systems.
Patent Information
- Application Number
- CN202411152070.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-21
AI Technical Summary
Existing deep learning models are difficult to adapt to when facing the dynamic distribution of sensor data, resulting in performance degradation, and offline trained models cannot flexibly adjust structure and complexity, resulting in concept drift and prediction deviation, affecting the monitoring of smart environments and data centers. System security.
Using the memory playback variational automatic encoder (OLVAE) model, combining attention mechanism and brain playback mechanism, dynamically adjust the model structure and representation ability through collaborative training of the encoder and generator to generate a replica representing the distribution of past data. Put data to reduce forgetting problems and improve prediction performance.
It realizes efficient prediction of sensor time series data, flexibly adjusts model complexity and representation capabilities, alleviates concept drift problems, improves prediction performance and system security, and reduces storage requirements.
Smart Images

Figure CN119128794A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of sensor time series, and in particular relates to an IoT data online prediction system based on a memory-replay variational autoencoder. Background Art
[0002] In recent years, the widespread use of various sensors has led to a sharp increase in the amount of time series data generated. In the fields of intelligent environmental monitoring, industrial monitoring, and data center monitoring, the importance of real-time and intelligent analysis has become increasingly prominent.
[0003] The time series data observed by sensors are affected by many unknown factors, such as physical or chemical changes in the environment, contaminant attachment, sensor performance degradation, etc., which makes most streaming sensor data non-stationary and prone to dynamic distribution drift. This phenomenon is called the concept drift problem in machine learning, that is, data changes in unpredictable ways over time.
[0004] Deep learning models can capture time series patterns very well, but offline trained deep learning models are difficult to adapt to data streams with changing distributions. First, their representation capabilities are limited to predefined fixed structures, and they can only adjust the parameters between hidden layers in the fixed structure, while ignoring the importance of adjusting different hidden layers and being unable to flexibly adjust the model structure. Second, when the sampling rate of sensor data is high, if the model cannot quickly adapt to these new data, performance will degrade. Finally, this method cannot adjust the complexity of the model, that is, it cannot perform effective model selection.
[0005] The above-mentioned problems of offline learning will accumulate decision biases and affect the model's learning of complex patterns. In addition, the "one-time review" strategy of streaming data analysis makes errors difficult to correct, which has serious adverse effects on sensor monitoring systems such as data centers and smart oceans, and even threatens system security.
[0006] Online learning methods can learn data streams quickly and in real time. However, the current challenge is how to enable the model to learn from shallow to deep as the data stream flows, thereby effectively alleviating the concept drift problem, and overcoming the overfitting problem when the amount of data is small, and overcoming the underfitting problem when a large amount of data is accumulated. Summary of the invention
[0007] In order to solve the above problems, the present invention proposes an IoT data online prediction system based on a memory-replay variational autoencoder. Through the collaborative training of the encoder and the generator, combined with the attention mechanism and the brain replay mechanism, the encoder's forgetting of old knowledge is alleviated, and efficient prediction of IoT time series data is achieved.
[0008] In order to achieve the above object, the present invention adopts the following technical solution:
[0009] In a first aspect, the present invention provides an IoT data online prediction system based on a memory-replay variational autoencoder, comprising:
[0010] The prediction module is used to obtain the IoT data to be predicted, input the IoT data to be predicted into the trained memory replay VAE, and obtain the prediction result;
[0011] A training module is used to train a memory replay VAE; the memory replay VAE includes an encoder and a generator; the training process of the memory replay VAE is:
[0012] Inputting the first sample data into the encoder to obtain the first sample latent factors and the first sample prediction results;
[0013] Inputting the first sample latent factor into the generator to obtain first sample replay data;
[0014] Inputting the second sample data and the first sample replay data into the encoder to obtain the fusion category latent factors and the prediction results of the first sample and the second sample;
[0015] Based on the first sample prediction result and the first sample label, as well as the second sample prediction result and the second sample label, the loss function is calculated, and the training is completed when the loss is minimized.
[0016] Preferably, the encoder includes a hidden layer and an output layer; the hidden layer includes an attention mechanism for adjusting the participation weight of the hidden layer to obtain a prediction result according to the input IoT data; the output layer is used to obtain the potential factors of the IoT data according to the input IoT data;
[0017] The generator is used to generate replay IoT data according to latent factors.
[0018] Preferably, the hidden layer includes an attention mechanism for adjusting the participation weight of the hidden layer, and obtaining a prediction result according to the input IoT data, specifically including:
[0019] α j =weight(p j )
[0020]
[0021] Among them, prediction(*) is a feed-forward network that converts hidden representations into local predictions, and weight(*) is a feed-forward network with a softmax function that calculates the weight of each hidden layer; the weights of all layers are normalized to weight(*) is intended to determine how necessary each substructure is in the final prediction.
[0022] Preferably, the playback data is a distribution characteristic of latent factors.
[0023] In a second aspect, the present invention provides an IoT data online prediction method based on a memory-replay variational autoencoder, comprising:
[0024] Obtain the IoT data to be predicted, input the IoT data to be predicted into the trained memory replay VAE, and obtain the prediction result;
[0025] The memory replay VAE includes an encoder and a generator; the training process of the memory replay VAE is:
[0026] Inputting the first sample data into the encoder to obtain the first sample latent factors and the first sample prediction results;
[0027] Inputting the first sample latent factor into the generator to obtain first sample replay data;
[0028] Inputting the second sample data and the first sample replay data into the encoder to obtain the fusion category latent factors and the prediction results of the first sample and the second sample;
[0029] Based on the first sample prediction result and the first sample label, as well as the second sample prediction result and the second sample label, the loss function is calculated, and the training is completed when the loss is minimized.
[0030] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the online prediction method for IoT data based on a memory-replay variational autoencoder described in the second aspect.
[0031] In a fourth aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the method for online prediction of IoT data based on a memory-replay variational autoencoder described in the second aspect are implemented.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] 1. This paper proposes an online deep learning model based on variational autoencoders, called the OLVAE model. By integrating the attention mechanism, the model can dynamically adjust the contribution of each substructure, thereby flexibly adjusting the complexity and representation ability of the model.
[0034] 2. The present invention proposes a "brain generation and replay mechanism" that generates data representing the distribution of past data to reactivate the neural activity patterns representing past memories, thereby reducing storage requirements and improving the sensor time series prediction performance to address the challenge of concept drift.
[0035] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their description are used to explain the present invention but do not constitute a limitation of the present invention.
[0037] Figure 1 A schematic diagram of the overall structure of the memory replay VAE (OLVAE) provided in the first embodiment of the present invention;
[0038] Figure 2 The attention-based prediction fusion path provided in the first embodiment of the present invention;
[0039] Figure 3 A schematic diagram of an online learning paradigm provided in the first embodiment of the present invention;
[0040] Figure 4 A schematic diagram of prediction results of the OLVAE model provided in the first embodiment of the present invention on multiple sensors;
[0041] Figure 5 A schematic diagram of the evolution process of each layer weight in the prediction of CPU power provided in the first embodiment of the present invention;
[0042] Figure 6 This is a schematic diagram comparing the inference time of OLVAE, LSTM and NBeats provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0043] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0044] Embodiment 1
[0045] This embodiment provides an IoT data online prediction system based on a memory-replay variational autoencoder, including:
[0046] The prediction module is used to obtain the IoT data to be predicted, input the IoT data to be predicted into the trained memory replay VAE, and obtain the prediction result;
[0047] A training module is used to train a memory replay VAE; the memory replay VAE includes an encoder and a generator; the training process of the memory replay VAE is:
[0048] Inputting the first sample data into the encoder to obtain the first sample latent factors and the first sample prediction results;
[0049] Inputting the first sample latent factor into the generator to obtain first sample replay data;
[0050] Inputting the second sample data and the first sample replay data into the encoder to obtain the fusion category latent factors and the prediction results of the first sample and the second sample;
[0051] Based on the first sample prediction result and the first sample label, as well as the second sample prediction result and the second sample label, the loss function is calculated, and the training is completed when the loss is minimized.
[0052] The overall framework of the memory replay VAE provided in this embodiment is as follows Figure 1 As shown, next, combined with Figure 1 Provide detailed explanation.
[0053] 1) VAE-based encoder-generator path:
[0054] First, the encoder is based on the historical input data sample X1 = {x i ,x i+1 ,...,x i+hw ,...,x T}Estimate mean μ and variance σ 2 , to determine the potential representation distribution of historical input data.
[0055] The generator samples the latent factor z from the latent variable space and feeds it into the generator network. The generator is responsible for generating data representing the distribution characteristics of past data based on the latent factor z, that is, generating memory replay data X1′={x′ i ,x′ i+1 ,...,x′ i+hw ,...,x′ i+T}.
[0056] Figure 1 The process of brain generation and replay mechanism is demonstrated, and the memory replay data X1' is used for subsequent training. This embodiment expects that the latent factor z sampled from the latent variable space helps to calibrate the probability distribution of the generated X1' so that it follows the probability distribution of the historical input data X1. Generally speaking, the larger the latent variable space, the more historical probability distribution information can be retained.
[0057] The prior distribution p(z) of the latent factor z is assumed to be a Gaussian distribution. p(z) cannot be obtained directly in this embodiment, so the encoder is responsible for inferring the distribution by modeling the posterior distribution p(z|x) when the input x is provided. In other words, when the input x is provided, the encoder estimates the Gaussian distribution parameters of the mean μ and the standard deviation σ. This process can be understood as representing the original data in a low-dimensional space of a Gaussian distribution. Considering that only limited data is provided, the estimated posterior probability p(z|x) is only an approximation. Therefore, the estimated distribution from the encoder is expressed as q(z|x) to distinguish it from the true posterior distribution p(z|x). During model training, the encoder is optimized to approximate the true posterior probability.
[0058] In the brain, a mechanism believed to be crucial for maintaining memory is that the neuronal activity patterns that represent memories are reactivated, which is essential for stabilizing new memories. The brain seems to have implemented an efficient and scalable continuous learning algorithm, and this memory replay is regulated by the hippocampus. Inspired by brain neuroscience, this embodiment proposes a "brain generation and replay mechanism."
[0059] First, let the generator and predictor share the original encoder ( Figure 1 The blue part) establishes a two-way feedback between them. The learning of the generator depends on the potential representation obtained by the encoder to learn the knowledge of the current stage. The predictor also needs to be represented by the encoder for prediction, so the generator and the predictor share the encoder. Bidirectional feedback refers to the interaction between the encoder and the generator, which is used for the training of the generator, specifically manifested as Figure 1 The black arrow in the
[0060] Through the feedback connection modulated by the network's own context, the generator ( Figure 1 The orange part is responsible for generating data X′ representing the distribution characteristics of past data (generated by the first sample data input of the generator), and then passing the current data and the data X′ representing the distribution characteristics of past data to the encoder to obtain the most likely label (Predicted value). These data It is used as a replay dataset for subsequent training instead of replaying the original training data.
[0061] Specifically, the first sample data X1 is predicted, the first sample data X1 is input into the encoder, and the first sample prediction result is obtained based on the first sample label Y1 At the same time, the encoder obtains the latent factor z1 of the first sample data X1, and the generator generates the first sample playback data X1' based on the latent factor z1.
[0062] Since the distribution of the first sample data and the second sample data are inconsistent, and the encoder learns the current knowledge, it will gradually forget the past knowledge. Therefore, when predicting the second sample data, only the second sample data is input into the encoder for training. The encoder focuses on learning the data distributed in the current stage and gradually forgets the data distribution of the previous stage (i.e., the first sample data). Although the prediction effect is good in the current stage, when the first sample data is encountered again in the next cycle, the prediction effect will deteriorate.
[0063] In order to overcome the above-mentioned catastrophic forgetting problem, when predicting the second sample data X2, this embodiment inputs the second sample data X2 and the first sample replay data X1' into the encoder together, and obtains the first sample prediction result based on the first sample label Y1 and the second sample label Y2 respectively. And the second sample prediction results In addition, the encoder obtains the latent factor z1 of the first sample data and the latent factor z2 of the second sample data, and the generator generates the second sample replay data X2' based on the latent factor z2 of the second sample data for subsequent training.
[0064] Each time the model is trained based on new stage data, the historical replay data and the current new stage data are input into the memory replay VAE (OLVAE) together, so that the encoder can learn new knowledge in the current stage while also learning old knowledge in the past, avoiding forgetting past knowledge and improving the accuracy of the model's prediction of time series data.
[0065] Among them, data from different stages within the same cycle can be used as IoT time series sample data to train the model. This embodiment uses seasonal data: relevant data from the spring, summer, autumn, and winter stages as the first, second, third, and fourth sample data for training. After the generator generates historical simulation data, i.e., replays the data, it is put together with the current data to train the encoder, which is equivalent to reactivating the encoder. Since the encoder tends to forget old knowledge after learning new knowledge in the current stage, this method can reactivate the encoder's past memory.
[0066] This process is similar to the human brain experiencing an event in the summer, but the memory of the event becomes blurred in the winter due to the passage of time. Subsequently, by consciously reviewing the memory fragments related to the summer, the original memory is reawakened and strengthened, which is essentially the same as reactivating the experience in memory.
[0067] In this embodiment, since the data generated by the generator has extracted the characteristics of historical data, in theory, there is no need to store historical data, and only less data, i.e., potential factors, are needed to achieve the desired goal without having to worry about data storage. This improvement mimics the structure of the brain, where the generator responsible for playback transmits the signal to the encoder.
[0068] Therefore, when the encoder calculates μ and σ, it can sample z from the distribution and further feed z to the generator to generate data that represents the characteristics of the historical data distribution.
[0069] Due to the random sampling in this process, the gradient information flow in the architecture is interrupted, and the traditional back-propagation chain rule cannot be directly applied. Therefore, the VAE model adopts the reparameterization technique to obtain the properties of the classical neural network during model training. In reparameterization, VAE uses random sampling to generate a set of variables ε that satisfy the normal distribution. From N(μ,σ 2 ) is equivalent to sampling ε from N(0,1), and then letting z=μ+σ 2 *ε. Therefore, the gradient descent method can be applied. Finally, the generator decodes z and generates a replay sample X′.
[0070] 2) Attention-based prediction fusion path:
[0071] In addition to the encoder-generator path mentioned above for capturing the potential distribution of historical data, this embodiment also needs to establish an inference path for sensor data prediction, which is the core goal of this paper.
[0072] like Figure 2 As shown, this embodiment establishes an inference path on the encoder, utilizing and fusing the information of each layer of the encoder. In addition, the inference network is dynamically adjusted by introducing an attention mechanism on the information extracted at each layer.
[0073] Assuming that the encoding path of the OLVAE model contains k hidden layers, how to determine the appropriate k is challenging because if less data is provided, a larger k tends to cause the "overfitting" problem, while if a larger amount of data is provided, a smaller k tends to cause the "underfitting" problem.
[0074] Considering the above problems, this embodiment chooses to set a relatively large k to ensure the representation ability of the model. At the same time, an adjustment mechanism is introduced in the prediction path to ensure that the representation ability of the model can be adjusted with the data flow. If the adjustment mechanism is not introduced, the representation ability of the model is constant and is the sum of the capacity of each hidden layer, that is, all hidden layers contribute equally in the encoding; and the introduction of the adjustment mechanism enables the hidden layer to dynamically adapt to the amount of data to be processed.
[0075] In order to iteratively update the model, this embodiment incorporates a key technology, which is called the reweighting operation in this embodiment, that is, dynamically adjusting the contribution of each layer in the final prediction. Through the reweighting operation, the weights of all layers are recalculated and normalized after processing each input sample. This embodiment adds an attention network to learn the attention weights of the hidden layers of the inference network, as shown in formula (1):
[0076] α j =weight(p j ) (1)
[0077]
[0078] Where prediction(*) is a feed-forward network that transforms hidden representations into local predictions, and weight(*) is a feed-forward network with a softmax function that computes the weights of each hidden layer. The weights of all layers are normalized to Aims to determine the extent to which each substructure is necessary in the final prediction.
[0079] Unlike traditional feedforward neural network models, the final prediction is derived from the representation of the last layer. However, the final prediction of OLVAE is made by weighting the predictions obtained from each hidden layer. The lower the weight, the less the layer contributes in predicting the current data. The final prediction of the model is the fusion of sub-layer predictions, that is, the weighted sum of multiple layer predictions, as shown in formula (2):
[0080]
[0081] where p j is the prediction represented by the jth hidden layer.
[0082] It is worth mentioning that if fewer blocks are sufficient to learn the data flow, the model can achieve fast convergence. The use of attention mechanisms allows networks with multiple layers to be dynamically adjusted, introducing plasticity to the representation power of the model.
[0083] 3) Loss function and parameter optimization:
[0084] For sensor data prediction, the most important learning goal is to minimize the prediction deviation, so this embodiment needs to first define the prediction deviation in the objective function. The prediction deviation function is defined as follows:
[0085]
[0086] The loss function here can be any convex function. This embodiment uses the mean square error loss function (MSE). In online prediction and online learning, this loss will evaluate each sample in real time.
[0087] In addition to the prediction loss function, the training of the OLVAE model also requires the guidance of two other loss functions. One of them is the Kullback-Leibler divergence loss (KL loss), which is used to measure the difference between the posterior distribution q(z|x) and the standard normal distribution p(z). Given a hidden variable space of dimension m with known mean μ and variance σ, the KL loss is defined as follows:
[0088]
[0089] The other is the replay loss L replay , used to guide the generation of inputs that represent previous learning, can be a standard prediction loss. The replay loss is defined as follows:
[0090]
[0091] Finally, in order to optimize the model from the above three perspectives, this embodiment needs to minimize the above three losses at the same time, that is, the loss of OLVAE is the sum of three losses: prediction loss, KL loss and replay loss, as shown in formula (6).
[0092] Loss = L p +L kL +L replay (6)
[0093] In practice, after each round of prediction, the model is adjusted based on the immediate loss to cope with the next round. For traditional feedforward neural networks, the error derivatives are back-propagated from the last output layer to the first layer. However, the error derivatives of the OLVAE model are back-propagated to each prediction block to adjust the corresponding parameters. In each iteration, the parameters W of each block are i Update according to the following equation:
[0094]
[0095] 4) Online learning paradigm in data streams:
[0096] The previous section describes the loss function that guides learning. Here, this example illustrates the online learning paradigm of the proposed model in sensor data streams, such as Figure 3 shown.
[0097] In this study, this embodiment adopts a real-time prediction and learning paradigm. In practice, the OLVAE model is iteratively updated based on the loss and gradient generated for each incoming data point. Let X = x0, x1, ..., x t ,...,x Trepresents the time series data generated by the sensor in real time, where the time index T is unbounded. In the online learning paradigm, this time series is not available all at once, but is received one by one in sequence. When performing the prediction for the next time t, this embodiment can only access the historical data x0, x1, ..., x t-1 This embodiment uses the most recent past data at time t to make predictions, and then the actual value x t It can be used to measure the prediction error. t And compare it with the predicted value, this embodiment calculates the real-time loss and makes necessary parameter adjustments for the subsequent round of prediction.
[0098] 5) Experimental results:
[0099] The prediction performance of the OLVAE model is verified on the selected sensor dataset. Figure 4 As shown, this embodiment plots the original data and predicted data of the OLVAE model for each experimental data set. The OLVAE model can flexibly adapt to the distribution changes of sensor data, and its prediction performance is excellent when facing obvious "concept drift". This experiment shows that OLVAE is a robust prediction method suitable for sensor time series data with drift distribution.
[0100] In addition, if Figure 5 As shown in (a), by printing the model weight evolution process of CPU Power, it can be observed that the attention weights of the three layers are not static, but are re-weighted during the online learning process. In the early stages of the data flow, the contribution of each layer to power prediction is relatively stable. This is reasonable because the power in the early stages also shows relatively stable behavior. Compared with the other two layers, the role of layer 1 is smaller. Deeper layers contribute more to representing data distribution in the early stages of the data flow, especially layer 3. As the data distribution changes, this embodiment can find that the influence of layer 3 is getting bigger and bigger. On the contrary, the influence of layer 1 gradually becomes smaller. It is worth noting that the weights of all three layers change significantly between 3000 and 3500. The weight of layer 2 remains almost unchanged for most of the time until it suddenly increases vertically at the end of the data flow. This situation is understandable, as Figure 5 As shown in (b), this is due to the obvious mutation of the power curve, which increases the complexity of the data distribution, so deeper networks should take more responsibility in modeling the latent factors of the data. This experimental result verifies the effectiveness of the model of this embodiment in dynamic model selection.
[0101] In the real-time prediction of sensor data, the online learning method proposed in this embodiment is not only superior to traditional deep learning methods in prediction effect, but also superior to them in time cost. Time cost is an important factor to be considered in the processing and analysis of high-flow sensor data. This embodiment compares the time cost of the method of this embodiment and the benchmark model under different data scales. This embodiment selects data of different scales from a data set to simulate sensor flow. The data scales are set to 1000, 5000, 10000, 15000 and 20000 respectively. This embodiment selects NBeats and LSTM models for comparison.
[0102] like Figure 6 As shown in the figure, the OLVAE method always shows higher inference efficiency than NBeats and LSTM under various data scales, and this advantage increases with the increase of data scale. This shows that the OLVAE model has a competitive advantage in sensor data processing. In theory, as a model composed of several fully connected network blocks, NBeats has higher inference efficiency than LSTM. LSTM contains a recursive mechanism, which leads to a longer time consumption when processing sequential data. Figure 6 It can be seen that the inference speed of LSTM is indeed the slowest.
[0103] This embodiment generates replay data representing the distribution of historical data, and simultaneously inputs the replay data when predicting the current data, so that the encoder learns new knowledge and old knowledge together, alleviating the catastrophic forgetting of old knowledge by the model; at the same time, the model stores replay data representing historical data instead of directly storing all data, which can significantly reduce storage requirements. By reactivating past memory patterns, the model can better adapt to changes in data distribution, thereby improving performance in time series prediction, especially when facing concept drift challenges. This mechanism draws on the biological memory consolidation and playback process, providing a novel and effective solution for time series prediction.
[0104] The OLVAE provided in this embodiment integrates the attention mechanism on the basis of the variational autoencoder, so that the model can dynamically adjust the contribution of each of its substructures. The OLVAE model can automatically adjust its complexity and representation ability according to the different characteristics of the input data to adapt to different learning tasks. Due to the ability to dynamically adjust the complexity and representation ability, the OLVAE model shows higher flexibility and adaptability when processing complex and changeable online data.
[0105] Embodiment 2
[0106] This embodiment discloses an IoT data online prediction method based on a memory-replay variational autoencoder, comprising the following steps:
[0107] S1: Obtain the IoT data to be predicted, input the IoT data to be predicted into the trained memory replay VAE, and obtain the prediction result;
[0108] S2: The memory replay VAE includes an encoder and a generator; the training process of the memory replay VAE is:
[0109] Input the first category data into the encoder to obtain the first category latent factors and the first category prediction results;
[0110] Inputting the first category of latent factors into the generator to obtain the first category of replay data;
[0111] Input the second category data and the first category replay data into the encoder to obtain the fusion sample latent factors and the first category and the second category prediction results;
[0112] Based on the prediction results of the first category and the first category label, as well as the prediction results of the first category and the second category and the first category and the second category label, the loss function is calculated, and the training is completed when the loss is minimized.
[0113] Embodiment 3
[0114] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps in the online prediction method for IoT data based on a memory-replay variational autoencoder as described in the second embodiment above are implemented.
[0115] Embodiment 4
[0116] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the online prediction method for IoT data based on a memory-replay variational autoencoder as described in the second embodiment are implemented.
[0117] The steps or modules involved in the above embodiments 2 to 4 correspond to those in embodiment 1. For the specific implementation, please refer to the relevant description of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0118] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An IoT data online prediction system based on memory-replay variational autoencoder, characterized in that: include: The prediction module is used to obtain the IoT data to be predicted, input the IoT data to be predicted into the trained memory replay VAE, and obtain the prediction result; A training module is used to train a memory replay VAE; the memory replay VAE includes an encoder and a generator; the training process of the memory replay VAE is: Inputting the first sample data into the encoder to obtain the first sample latent factors and the first sample prediction results; Inputting the first sample latent factor into the generator to obtain first sample replay data; Inputting the second sample data and the first sample replay data into an encoder to obtain a fusion sample latent factor and prediction results of the first sample and the second sample; Based on the first sample prediction result and the first sample label, as well as the second sample prediction result and the second sample label, the loss function is calculated, and the training is completed when the loss is minimized.
2. The IoT data online prediction system based on memory-replay variational autoencoder according to claim 1, characterized in that: The encoder includes a hidden layer and an output layer; the hidden layer includes an attention mechanism for adjusting the participation weight of the hidden layer to obtain a prediction result according to the input IoT data; the output layer is used to obtain the potential factors of the IoT data according to the input IoT data; The generator is used to generate replay IoT data according to latent factors.
3. The IoT data online prediction system based on memory-replay variational autoencoder according to claim 2, characterized in that: The hidden layer includes an attention mechanism for adjusting the participation weight of the hidden layer and obtaining a prediction result based on the input IoT data, specifically including: α j =weight(p j ) Among them, predicition(*) is a feed-forward network that converts hidden representations into local predictions, and weight(*) is a feed-forward network with a softmax function that calculates the weight of each hidden layer; the weights of all layers are normalized to weight(*) is intended to determine how necessary each substructure is in the final prediction.
4. The IoT data online prediction system based on memory-replay variational autoencoder according to claim 1, characterized in that: The replay data are distribution characteristics of the latent factors.
5. An online prediction method for IoT data based on memory-replay variational autoencoder, characterized in that: include: Obtain the IoT data to be predicted, input the IoT data to be predicted into the trained memory replay VAE, and obtain the prediction result; The memory replay VAE includes an encoder and a generator; the training process of the memory replay VAE is: Inputting the first sample data into the encoder to obtain the first sample latent factors and the first sample prediction results; Inputting the first sample latent factor into the generator to obtain first sample replay data; Inputting the second sample data and the first sample replay data into an encoder to obtain a fusion sample latent factor and prediction results of the first sample and the second sample; Based on the first sample prediction result and the first sample label, as well as the second sample prediction result and the second sample label, the loss function is calculated, and the training is completed when the loss is minimized.
6. The method for online prediction of IoT data based on memory-replay variational autoencoder according to claim 5, characterized in that: The encoder includes a hidden layer and an output layer; the hidden layer includes an attention mechanism for adjusting the participation weight of the hidden layer to obtain a prediction result according to the input IoT data; the output layer is used to obtain the potential factors of the IoT data according to the input IoT data; The generator is used to generate replay IoT data according to latent factors.
7. The method for online prediction of IoT data based on memory-replay variational autoencoder according to claim 6, characterized in that: The hidden layer includes an attention mechanism for adjusting the participation weight of the hidden layer and obtaining a prediction result based on the input IoT data, specifically including: α j =weight(p j ) Among them, prediction(*) is a feed-forward network that converts hidden representations into local predictions, and weight(*) is a feed-forward network with a softmax function that calculates the weight of each hidden layer; the weights of all layers are normalized to weight(*) is intended to determine how necessary each substructure is in the final prediction.
8. The method for online prediction of IoT data based on memory-replay variational autoencoder according to claim 5, characterized in that: The replay data are distribution characteristics of the latent factors.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in an online prediction method for IoT data based on a memory-replay variational autoencoder as described in any one of claims 5-8 are implemented.
10. A computer 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, the steps in the online prediction method of IoT data based on a memory-replay variational autoencoder as described in any one of claims 5-8 are implemented.
Citation Information
Patent Citations
CRISPR / Cas9 off-target prediction method based on VAE data enhancement
CN113611367A
Intelligent agent control task solving method for continuous action space
CN116224775A
Continuous learning track prediction system based on uncertainty perception
CN117634587A
Identifying sensor drifts and diverse varying operational conditions using variational autoencoders for continual training
US20230281429A1
