Search

CN-121980160-A - Data processing method and device based on TPA-LSTM

CN121980160ACN 121980160 ACN121980160 ACN 121980160ACN-121980160-A

Abstract

The invention discloses a data processing method and a device based on TPA-LSTM, which relate to the technical field of data processing and comprise the steps of collecting a historical data set and an actual data set of energy equipment in an industrial park, and convolving the historical data set and the actual data set to obtain a convolution data set; the method comprises the steps of carrying out dimension matching on a historical data set, an actual data set and a convolution data set based on a preset mixed convolution completion method to obtain a historical data sequence and an actual data sequence, training the historical data sequence and the actual data sequence based on a preset TPA model to obtain fusion data, optimizing the fusion data based on a preset LSTM model to generate a predicted data sequence, obtaining an actual data value corresponding to a sampling time point of the predicted data sequence, determining the accuracy of the predicted data sequence based on the actual data value, carrying out smoothing processing on the predicted data sequence based on the accuracy to obtain target data, and completing data processing.

Inventors

  • XU HUAN
  • LIN KEQUAN
  • CHEN BIN
  • YANG QIUYONG
  • WANG WU
  • LIN CONG
  • Cao Zejiang

Assignees

  • 中国南方电网有限责任公司

Dates

Publication Date
20260505
Application Date
20251205

Claims (10)

  1. 1. A method of TPA-LSTM based data processing, comprising: Collecting a historical data set and an actual data set of energy utilization equipment in an industrial park, and convolving the historical data set and the actual data set to obtain a convolution data set; Performing dimension matching on the historical data set, the actual data set and the convolution data set based on a preset mixed convolution completion method to obtain a historical data sequence and an actual data sequence; Training the historical data sequence and the actual data sequence based on a preset TPA model to obtain fusion data, and optimizing the fusion data based on a preset LSTM model to generate a predicted data sequence; And acquiring an actual data value corresponding to a sampling time point of the predicted data sequence, determining the accuracy of the predicted data sequence based on the actual data value, performing smoothing processing on the predicted data sequence based on the accuracy to obtain target data, and finishing data processing.
  2. 2. The TPA-LSTM based data processing method of claim 1 wherein said dimension matching of said historical data set, said actual data set, and said convolved data set based on a predetermined hybrid convolution completion method to obtain a historical data sequence and an actual data sequence comprises: aligning the historical data sequence, the actual data sequence and the convolution data sequence based on sampling time points to construct an initial data matrix; Marking elements with null values in the initial data matrix as convolution points, and setting initial values of the convolution points to be zero to obtain a data matrix; And carrying out iterative convolution on the data matrix based on a preset convolution kernel and a convolution rule to obtain a historical data sequence and an actual data sequence.
  3. 3. The TPA-LSTM based data processing method of claim 2, wherein iteratively convolving the data matrix based on a predetermined convolution kernel and a convolution rule to obtain a historical data sequence and an actual data sequence, comprising: performing iterative convolution on the data matrix based on a preset convolution check, and resetting an element value corresponding to a non-convolution point to an initial value after each iteration to obtain a data matrix of the next iteration; And outputting a target data matrix until the convolution times reach a preset threshold value, taking the first row of data of the target data matrix as a historical data sequence, and taking the second row of data of the target data matrix as an actual data sequence.
  4. 4. The TPA-LSTM based data processing method as claimed in claim 3, wherein training the historical data sequence and the actual data sequence based on a preset TPA model to obtain fusion data, and optimizing the fusion data based on a preset LSTM model to generate a predicted data sequence, comprises: performing parallel training on the historical data sequence and the actual data sequence based on a preset TPA model to obtain a first data sequence and a second data sequence; and fusing the first data sequence and the second data sequence to obtain fused data, and optimizing the fused data based on a preset LSTM model to generate a predicted data sequence.
  5. 5. The TPA-LSTM based data processing method as claimed in claim 4, wherein the training the historical data sequence and the actual data sequence in parallel based on a preset TPA model to obtain a first data sequence and a second data sequence comprises: Presetting a weight matrix based on the dimensionality of the historical data sequence; Performing tensor multiplication operation based on the weight matrix and the historical data sequence, and constructing a plurality of first attention matrixes; And splitting and normalizing each first attention matrix to generate a plurality of first attention head matrixes, and splicing all the first attention head matrixes to obtain a first data sequence.
  6. 6. The TPA-LSTM based data processing method as claimed in claim 4, wherein the training the historical data sequence and the actual data sequence in parallel based on a preset TPA model to obtain a first data sequence and a second data sequence comprises: Presetting a weight matrix based on the dimension of the actual data sequence; Performing tensor multiplication operation based on the weight matrix and the historical data sequence, and constructing a plurality of second attention matrixes; and splitting and normalizing each second attention matrix to generate a plurality of second attention head matrixes, and splicing all the second attention head matrixes to obtain a second data sequence.
  7. 7. The TPA-LSTM based data processing method as claimed in claim 4, wherein the fusing the first data sequence and the second data sequence to obtain fused data, and optimizing the fused data based on a preset LSTM model, generating a predicted data sequence, includes: Alternately fusing the first data sequence and the second data sequence to obtain fused data; and optimizing the fusion data based on a preset LSTM model to generate a predicted data sequence.
  8. 8. The TPA-LSTM based data processing method as claimed in claim 7, wherein the obtaining an actual data value corresponding to a sampling time point of the predicted data sequence, determining an accuracy of the predicted data sequence based on the actual data value, performing a smoothing process on the predicted data sequence based on the accuracy, obtaining target data, and completing data processing, includes: acquiring a sampling time point of the predicted data sequence, acquiring an actual data value based on the sampling time point, and generating a judging data sequence; Calculating the difference degree of the judging data sequence and the predicting data sequence, and determining the accuracy of the predicting data sequence based on the difference degree; and when the accuracy is greater than a preset threshold, smoothing the predicted data sequence to obtain target data, and finishing data processing.
  9. 9. A communication device comprising means for performing the method of any of claims 1 to 8.
  10. 10. A communication device comprising a processor and interface circuitry for receiving signals from other communication devices and transmitting signals to the processor or for sending signals from the processor to other communication devices, the processor being configured to implement the method of any one of claims 1 to 8 by logic circuitry or executing code instructions.

Description

Data processing method and device based on TPA-LSTM Technical Field The invention relates to the technical field of data processing, in particular to a data processing method and device based on TPA-LSTM. Background At present, with the continuous development of industrial internet technology and cloud-edge platforms, the demands of activities on data refinement are increasing. The platforms have higher requirements on the real-time performance and the accuracy of the data, and promote the evolution of the data management and regulation to the intelligent and refined direction. To accommodate these variations, existing measurement methods and equipment must be able to provide more accurate and detailed data to support more sophisticated energy management and decision analysis. When the energy consumption scene data in the existing industrial park is acquired, under the condition of lower cost and monitoring requirement, the problems of longer measurement sampling period and insufficient accuracy are generally faced, so that the existing energy consumption data cannot meet the requirement of an industrial Internet platform on high-precision and high-frequency data, and the intelligent development of the energy consumption scene is also limited. Disclosure of Invention The invention provides a data processing method and device based on TPA-LSTM (thermoplastic polyurethane-LSTM) to improve the data precision of energy consumption data in industrial scenes. In order to solve the above technical problems, the present invention provides a data processing method based on TPA-LSTM, including: Collecting a historical data set and an actual data set of energy utilization equipment in an industrial park, and convolving the historical data set and the actual data set to obtain a convolution data set; Performing dimension matching on the historical data set, the actual data set and the convolution data set based on a preset mixed convolution completion method to obtain a historical data sequence and an actual data sequence; Training the historical data sequence and the actual data sequence based on a preset TPA model to obtain fusion data, and optimizing the fusion data based on a preset LSTM model to generate a predicted data sequence; And acquiring an actual data value corresponding to a sampling time point of the predicted data sequence, determining the accuracy of the predicted data sequence based on the actual data value, performing smoothing processing on the predicted data sequence based on the accuracy to obtain target data, and finishing data processing. The method comprises the steps of firstly, carrying out convolution on a historical data set and an actual data set of energy utilization equipment of an industrial park to obtain a convolution data set, and then carrying out dimension matching on the data based on a preset mixed convolution completion method to ensure uniformity and consistency of the data. Historical data and actual data are trained through a TPA (tensor product attention ) model, fusion data are further generated, and then the fusion data are optimized through an LSTM (Long Short-Term Memory) algorithm, so that a high-precision predicted data sequence is generated. And finally, smoothing the predicted data based on the accuracy of the predicted data to obtain target data, thereby improving the prediction accuracy and reliability of the energy consumption data. Further, the dimension matching is performed on the historical data set, the actual data set and the convolution data set based on a preset mixed convolution completion method to obtain a historical data sequence and an actual data sequence, which comprises the following steps: aligning the historical data sequence, the actual data sequence and the convolution data sequence based on sampling time points to construct an initial data matrix; Marking elements with null values in the initial data matrix as convolution points, and setting initial values of the convolution points to be zero to obtain a data matrix; And carrying out iterative convolution on the data matrix based on a preset convolution kernel and a convolution rule to obtain a historical data sequence and an actual data sequence. According to the invention, the historical data sequence, the actual data sequence and the convolution data sequence are aligned based on the sampling time point to construct an initial data matrix, null elements are marked as convolution points, and iterative convolution is performed by adopting a convolution kernel on the basis, so that missing parts in data are gradually filled. The method ensures the uniformity of data dimension and effectively reserves the time sequence information of the data, and provides more stable and accurate data input for subsequent TPA and LSTM model training. Further, the performing iterative convolution on the data matrix based on a preset convolution kernel and a convolution rule to obtain a historical data sequence