Industrial time sequence data compression method and device based on VAE model and medium

Through the data compression method based on the VAE model, the industrial IoT timing data is compressed, which solves the problem that traditional databases are difficult to process and store a large amount of timing data, and achieves significant savings in storage space and efficient data recovery.

CN119892107APending Publication Date: 2025-04-25NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411936597.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

Traditional databases are difficult to effectively process and store large amounts of industrial timing data, resulting in huge storage space requirements.

Method used

Using the data compression method based on the VAE model, the initial VAE model is established through the Pytorch framework, and the model parameters are optimized to obtain the trained VAE model, which is used to compress the time series data of the industrial Internet of Things.

Benefits of technology

It significantly reduces the usage of database storage space while ensuring that data integrity and accuracy are not affected.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892107A_ABST
    Figure CN119892107A_ABST
Patent Text Reader

Abstract

The invention discloses an industrial time sequence data compression method and device based on a VAE model and a medium, and relates to the technical field of data compression, and the method comprises the steps: obtaining historical industrial Internet of Things time sequence data of an industrial Internet of Things; a Pytorch framework is adopted, and an initial VAE model is established; historical industrial Internet of Things time series data are input into the initial VAE model, parameters in the initial VAE model are optimized through input data reconstruction and a repeated iteration mode, and a trained VAE model is obtained; the input data is historical industrial Internet of Things time series data; and based on the trained VAE model, carrying out data compression on the collected industrial Internet of Things time series data. According to the data compression method provided by the invention, the storage space occupation of the database is reduced, and the data integrity and precision are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data compression technology, and in particular to an industrial time series data compression method, device and medium based on a VAE model. Background Art

[0002] The Industrial Internet of Things relies on massive sensors. With the continuous development of the Industrial Internet of Things, more and more devices and sensors are connected to the network, generating a large amount of time series data (Time Series Data). For example, a commercial Boeing 787 aircraft will generate nearly 1TB of time series data in a day, and a smart grid covering millions of users, if each user's home has 10 sensors, will generate about 864GB of data every day.

[0003] With the popularization of industrial IoT devices, the amount of real-time industrial time series data is growing rapidly. Traditional relational databases cannot effectively process such large-scale time series data due to their row storage method, resulting in huge storage space requirements. Summary of the invention

[0004] The purpose of this application is to provide an industrial time series data compression method, device and medium based on a VAE model, which can effectively solve the problem of large storage space occupation and significantly reduce the amount of data stored and transmitted.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides an industrial time series data compression method based on a VAE model, and the industrial time series data compression method based on a VAE model includes:

[0007] Get historical IIoT time series data for IIoT.

[0008] Use the Pytorch framework to build the initial VAE model.

[0009] The historical industrial Internet of Things time series data is input into the initial VAE model, and the parameters in the initial VAE model are optimized by reconstructing the input data and iterating repeatedly to obtain a trained VAE model; the input data is the historical industrial Internet of Things time series data.

[0010] Based on the trained VAE model, the collected industrial IoT time series data is compressed.

[0011] Optionally, the VAE model includes an encoder and a decoder.

[0012] Optionally, the encoder in the VAE model is used to encode the input data into a low-dimensional feature vector Z, and save the low-dimensional feature vector Z and the timestamp in a time series database.

[0013] Optionally, the decoder Decoder in the VAE model is used to map the low-dimensional feature vector Z back to the high-dimensional original data space to obtain restored data; the restored data is the input data when input into the VAE model.

[0014] Optionally, the loss function of the VAE model consists of reconstruction loss and KL divergence loss; the reconstruction loss is used to measure the difference between the input data and the data output by the decoder; the KL divergence loss is used to measure the difference between the potential distribution of the output data and the standard normal distribution N(0,1).

[0015] Optionally, the loss function of the VAE model is specifically:

[0016]

[0017] Among them, MSE(X, X′) is the reconstruction loss function, is the KL divergence loss function, X is the input data, and X' is the decoder output data.

[0018] Optionally, the expression of the reconstruction loss function is:

[0019] MSE(X,X')=|X-X'| 2 .

[0020] Optionally, the expression of the KL divergence loss function is:

[0021]

[0022] Among them, μ1, σ1 are the mean and variance of the eigenvector Z.

[0023] In a second aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any one of the above-mentioned industrial time series data compression methods based on a VAE model.

[0024] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any one of the above-mentioned industrial time series data compression methods based on a VAE model.

[0025] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0026] The present application provides an industrial time series data compression method, device and medium based on a VAE model, and the method involves the following steps: First, historical industrial Internet of Things time series data is obtained from the industrial Internet of Things system. Subsequently, an initial variational autoencoder (VAE) model is constructed using the Pytorch framework. Next, the historical industrial Internet of Things time series data is input into the initial VAE model, and the parameters in the VAE model are fine-tuned and optimized by reconstructing the input data and multiple iterations to obtain a trained VAE model. In this model, the input data specifically refers to historical industrial Internet of Things time series data. Furthermore, based on the trained VAE model, efficient data compression processing is performed on the industrial Internet of Things time series data collected in real time. The data compression method proposed in the present application aims to significantly reduce the usage of database storage space while ensuring that the integrity and accuracy of the data are not affected. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 This is an application environment diagram of an industrial time series data compression method based on a VAE model in one embodiment of the present application.

[0029] Figure 2 A flowchart of an industrial time series data compression method based on a VAE model is provided in one embodiment of the present application.

[0030] Figure 3 A data compression workflow diagram provided for an embodiment of the present application.

[0031] Figure 4 A schematic diagram of the operation of a VAE model provided in accordance with an embodiment of the present application.

[0032] Figure 5 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0034] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0035] The industrial time series data compression method based on the VAE model provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the historical industrial Internet of Things time series data to be processed to the server 104. After the server 104 receives the historical industrial Internet of Things time series data to be processed, for the historical industrial Internet of Things time series data to be processed, the server 104 uses the Pytorch framework to establish an initial VAE model; the historical industrial Internet of Things time series data is input into the initial VAE model, and the parameters in the initial VAE model are optimized by reconstructing the input data and iteratively, so as to obtain a trained VAE model; the input data is the historical industrial Internet of Things time series data; based on the trained VAE model, the collected industrial Internet of Things time series data is compressed. The server 104 can feed back the compressed data to the terminal 102. In addition, in some embodiments, the industrial time series data compression method based on the VAE model can also be implemented independently by the server 104 or the terminal 102. For example, the terminal 102 can directly perform data processing on the historical industrial Internet of Things time series data to be processed, or the server 104 can obtain the historical industrial Internet of Things time series data to be processed from the data storage system and perform data processing on the historical industrial Internet of Things time series data to be processed.

[0036] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0037] In an exemplary embodiment, Figure 2 As shown, a method for compressing industrial time series data based on a VAE model is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1The server 104 in the example is used for explanation, and the steps include the following steps 201 to 204.

[0038] in:

[0039] Step 201: Obtain historical IIoT time series data of IIoT.

[0040] Step 202: Use the Pytorch framework to build an initial VAE model.

[0041] Step 203: Input the historical IIoT time series data into the initial VAE model, optimize the parameters in the initial VAE model by reconstructing the input data and iterating repeatedly to obtain a trained VAE model; the input data is the historical IIoT time series data.

[0042] Step 204: Based on the trained VAE model, the collected industrial Internet of Things time series data is compressed.

[0043] When executing step 201, the specific steps may be as follows:

[0044] like Figure 3 As shown, the acquired historical industrial IoT time series data may come from historical data of sensors such as temperature sensors, humidity sensors, light sensors, and CO2 sensors.

[0045] When executing step 202, the specific steps may be as follows:

[0046] The VAE model is a generative model based on a neural network, and its full name is Variational Auto-Encoder, which belongs to the category of unsupervised learning algorithms. It can learn a model so that the distribution of output data is as close as possible to the original data distribution.

[0047] The initial VAE model established in this embodiment mainly consists of two parts: encoder and decoder. They are connected together through a shared latent space and jointly realize the compression and reconstruction of time series data. The network structure is as follows Figure 4 As shown, the encoder in the VAE model is used to encode the input data into a low-dimensional feature vector Z, save the low-dimensional feature vector Z and the timestamp in the time series database, and learn the mean and variance of the Gaussian distribution in the latent space. The Encoder network is similar to the process of data dimensionality reduction by principal component analysis (PCA) or matrix decomposition (MF). The main task of the decoder is to map the low-dimensional feature vector Z back to the high-dimensional original data space to obtain the restored data X', thereby realizing the reconstruction of the input data.

[0048] The VAE model provided in this embodiment compresses high-dimensional time series data into a low-dimensional latent space through an encoder, and then reconstructs it into original data through a decoder to achieve algorithm training. The Encoder implements data compression and the Decoder generates and reconstructs. The design of this network structure provides a flexible and effective solution for time series data compression.

[0049] In some embodiments, when executing step 203, the specific steps may be as follows:

[0050] 1) Data preprocessing: Before model training, the input historical IIoT time series data is first preprocessed, including standardization or normalization operations, to ensure that the data distribution is suitable for model training, and the result X is used as the input of the encoder.

[0051] 2) Encoder: During the training process, the encoder gΦ maps the input time series data X to a probability distribution through a neural network. Specifically, the encoder learns the mean μ and variance σ of the Gaussian distribution of the input data and learns the probability distribution from high-dimensional data.

[0052] Encoder: In the training process, the encoder gΦ is responsible for mapping the input time series data X to a probability distribution through a neural network. Specifically, the encoder is committed to learning the mean μ and variance σ of the Gaussian distribution followed by the input data, so as to accurately extract and characterize the characteristics of its probability distribution from high-dimensional data.

[0053] 3) Sampling: Extract the latent variable Z from the Gaussian distribution and then pass Z as input to the decoder fθ.

[0054] 4) Decoder: The decoder fθ remaps the latent feature vector Z to the original data space to obtain the result X'. The goal of the decoder is to learn how to generate time series data that is as similar as possible to the original input X from the low-dimensional feature vector Z. By maximizing the reconstruction probability, the model restores the characteristics of the original input data X.

[0055] 5) Loss function optimization: The loss function of VAE consists of two parts: reconstruction loss and KL divergence loss. The reconstruction loss measures the difference between the original data and the decoder output, while the KL divergence loss measures the difference between the potential distribution of the output X and the standard normal distribution N(0,1). By minimizing these two losses, the model can learn high-quality feature representation and generation capabilities at the same time.

[0056] Specifically, the loss function of the VAE model is:

[0057]

[0058] Among them, MSE(X, X′) is the reconstruction loss function, is the KL divergence loss function, X is the input data, and X' is the decoder output data.

[0059] Among them, the expression of the reconstruction loss function is:

[0060] MSE(X,X')=|X-X'| 2 .

[0061] Optionally, the expression of the KL divergence loss function is:

[0062]

[0063] Among them, μ1, σ1 are the mean and variance of the eigenvector Z.

[0064] 6) Model training and optimization: The model training optimizes the loss function through error back propagation and gradient descent algorithm. After iteration, the model parameters gradually converge, thus obtaining the VAE model parameters.

[0065] The present application also provides an application scenario, which applies the above-mentioned industrial time series data compression method based on the VAE model. Specifically: the industrial time series data compression method based on the VAE model provided in this embodiment can be applied in an environmental monitoring scenario.

[0066] Specific as Figure 3As shown in the figure, regarding the process of data collection and input, sensors such as temperature, humidity, light, and CO2 capture time series data in the industrial Internet of Things in real time, and these data are then collected centrally through the data collection gateway. In the data encoding and compression stage, the data collection gateway divides and collects the data into time periods according to the preset time intervals. Subsequently, the encoder component (VAE Encoder) of VAE (Variational Autoencoder) is used to process the data in each time window and convert it into a low-dimensional feature vector Z, thereby achieving effective data compression. For the storage of low-dimensional feature vectors, these encoded feature vectors Z will be properly stored in the time series database according to their corresponding timestamps. Since the dimension of the low-dimensional feature vector is significantly reduced compared to the original data, this approach not only reduces the storage space of the data, but also achieves compressed storage of the data. When it is necessary to read the information in the database, the system will retrieve the corresponding feature vector Z from the time series database according to the given timestamp. Subsequently, these feature vectors will be restored to the original data through the decoder component (VAEDecoder) of VAE. The restored data can be widely used in various industrial Internet of Things applications and data mining scenarios, including but not limited to smart home control, environmental monitoring systems, energy management platforms, and predictive maintenance.

[0067] In addition, in some embodiments, the present application provides an industrial Internet of Things time series data compression method based on a variational autoencoder (VAE) model, which is mainly composed of the following parts:

[0068] 1) Data acquisition module:

[0069] Structure description: It consists of multiple sensors and is responsible for collecting real-time IIoT time series data in the IIoT environment, such as temperature and humidity in the room.

[0070] Connection relationship: This module is connected to the data processing module and transmits the collected raw data to the data processing module.

[0071] Function: Collect environmental data in real time and transmit the data to the data processing module for processing at a predetermined sampling period.

[0072] 2) Data processing module:

[0073] Structure description: Contains the Encoder part of the VAE model, which consists of multiple neural network layers and is used to encode the input time series data into a low-dimensional feature vector Z.

[0074] Connection relationship: This module receives the time series data transmitted by the data acquisition module and transmits the processed low-dimensional feature vector Z to the data storage module.

[0075] Function: Process the time series data within the time window and generate the corresponding low-dimensional feature vector Z to achieve data compression.

[0076] 3) Data storage module:

[0077] Structural description: Database system used to store compressed low-dimensional feature vector Z.

[0078] Connection relationship: This module is connected to the data processing module to receive and store compressed data.

[0079] Function: Efficiently store low-dimensional feature vector Z, reduce storage space, and provide it to the data restoration module for decoding when needed.

[0080] 4) Data restoration module:

[0081] Structure description: Contains the Decoder part of the VAE model, which consists of multiple neural network layers and is used to decode the stored low-dimensional feature vector Z into time series data close to the original.

[0082] Connection relationship: This module reads the low-dimensional feature vector Z from the data storage module and outputs the decoded data to the data output module or other application systems.

[0083] Function: Decode the stored low-dimensional feature vector Z and restore it to time series data close to the original, ensuring the integrity and validity of the data after compression.

[0084] 5) Data output module:

[0085] Structural description: Interface or display system used to output restored data.

[0086] Connection relationship: This module is connected to the data restoration module, receives the restored data and outputs or displays it.

[0087] Function: Provide decoded data to users or other systems for further analysis or use.

[0088] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data processing data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an industrial time series data compression method based on a VAE model is implemented.

[0089] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0090] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0091] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0092] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0093] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0094] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0095] In summary, this application has the following technical effects:

[0096] 1) Storage space saving: This application significantly reduces the space required for data storage by compressing the original time series data into low-dimensional feature vectors.

[0097] 2) High data recovery accuracy: This application uses the Decoder of the VAE model to restore data, ensuring that the compressed data can be restored to time series data close to the original when reading.

[0098] 3) Strong adaptability: This application is suitable for sensor data in industrial Internet of Things monitoring, especially when the data does not change drastically (such as temperature changes), and can be compressed more effectively.

[0099] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0100] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. An industrial time series data compression method based on VAE model, characterized in that: The industrial time series data compression method based on the VAE model includes: Get historical IIoT time series data for IIoT; Use the Pytorch framework to build the initial VAE model; Input the historical industrial Internet of Things time series data into the initial VAE model, optimize the parameters in the initial VAE model by reconstructing the input data and iterating repeatedly to obtain a trained VAE model; the input data is the historical industrial Internet of Things time series data; Based on the trained VAE model, the collected industrial IoT time series data is compressed.

2. According to the VAE model-based industrial time series data compression method of claim 1, it is characterized in that: The VAE model includes an encoder and a decoder.

3. The industrial time series data compression method based on the VAE model according to claim 2 is characterized in that: The encoder in the VAE model is used to encode the input data into a low-dimensional feature vector Z, and save the low-dimensional feature vector Z and the timestamp in a time series database.

4. The industrial time series data compression method based on the VAE model according to claim 3 is characterized in that: The decoder Decoder in the VAE model is used to map the low-dimensional feature vector Z back to the high-dimensional original data space to obtain restored data; the restored data is the input data when input into the VAE model.

5. The industrial time series data compression method based on the VAE model according to claim 4 is characterized in that: The loss function of the VAE model consists of reconstruction loss and KL divergence loss; the reconstruction loss is used to measure the difference between the input data and the data output by the decoder; the KL divergence loss is used to measure the difference between the potential distribution of the output data and the standard normal distribution N(0,1).

6. The industrial time series data compression method based on the VAE model according to claim 5 is characterized in that: The loss function of the VAE model is specifically: Among them, MSE(X,X′) is the reconstruction loss function, is the KL divergence loss function, X is the input data, and X' is the decoder output data.

7. The industrial time series data compression method based on the VAE model according to claim 6 is characterized in that: The expression of the reconstruction loss function is: MSE(X,X’)=|X-X’| 2 。 8. The industrial time series data compression method based on the VAE model according to claim 7 is characterized in that: The expression of the KL divergence loss function is: Among them, μ1, σ1 are the mean and variance of the eigenvector Z.

9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement an industrial time series data compression method based on a VAE model as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements an industrial time series data compression method based on a VAE model as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data compression method and device, equipment and storage medium

    CN116155297A

  • VAE-based high-fidelity aggregate particle generation and evaluation method

    CN118537430A

  • Efficient encoding and decoding sequences using variational autoencoders

    US20190392302A1

  • Committed information rate variational autoencoders

    US20200104640A1