Method, system and product for complementing abnormal and missing data of power system database
The method employs a dual model with bidirectional recurrent neural networks and attention mechanisms to address the limitations of existing methods in predicting missing data, improving accuracy and data integrity in power system databases by capturing long-distance dependencies.
Patent Information
- Application Number
- CN202411176267.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-08-26
AI Technical Summary
Existing methods for handling missing data in power system databases, particularly those using machine learning techniques, face challenges with large-scale data sets due to high computing time, storage requirements, and limitations in capturing long-distance dependencies, leading to inaccurate data prediction and significant information loss.
A method utilizing a dual model based on bidirectional recurrent neural networks combined with a bidirectional attention mechanism to predict missing data from both forward and backward directions, incorporating time decay factors and multi-head attention mechanisms to capture long-distance dependencies and improve prediction accuracy.
Enhances the accuracy of missing data prediction by effectively capturing long-distance dependencies and improving the integrity and consistency of power system data, reducing information loss and enhancing data integrity.
Smart Images

Figure CN119179692A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of big data, and in particular relates to a method, system and product for completing abnormal missing data in a power system database. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Traditional power systems face challenges such as supply and demand balance and energy waste. The application of smart grid technology has promoted the industry's green transformation. In order to meet the data support service needs of typical energy-consuming industries in terms of energy efficiency, energy consumption, production and consumption, energy conservation and census, it is necessary to build a database to store information such as the company's electricity consumption. However, in the process of data acquisition, various factors such as smart meter failure or data transmission channel blockage may cause irregular missing of power data. This missing is not only uncertain in quantity, but also not fixed in the time of occurrence. Especially when the amount of missing data is large, simply deleting the missing data will result in a large amount of information loss, thus affecting the integrity and accuracy of the data.
[0004] The existing methods for processing missing data mainly include deletion, interpolation or no processing. Deletion is the simplest processing method, but the effect is very unsatisfactory when the amount of missing data is large. Interpolation methods are mainly divided into two categories: statistical-based methods and machine learning-based methods. Statistical-based methods include regression analysis and multiple interpolation methods, but most of these methods do not consider the category attributes of a single data object, and the filling results may be affected by objects of different categories in the entire data set, resulting in relatively limited accuracy. Therefore, in order to better complete missing data, a more sophisticated method is needed to capture the temporal and spatial distribution characteristics of the data, thereby improving the completion effect.
[0005] With the significant increase in computing power, machine learning-based filling methods have been widely used. In many scenarios, machine learning techniques have been used to handle missing values in time series data. These methods include the nearest neighbor method (KNN), recurrent neural network (RNN), random forest, matrix decomposition and other algorithms, which are widely used in the task of filling missing values. In the prior art, one method is to set a threshold to screen the nearest neighbor points based on the naive K-nearest neighbor method, and then calculate the weight coefficients of the neighbor points in combination with the grey correlation coefficient, and finally fill in the missing data in sequence. However, this method may perform poorly in terms of computing time and storage requirements when processing large-scale data sets. There is also a new deep learning model based on RNN called GRU-D, which effectively integrates it into the deep model architecture by introducing two missing value pattern representations, so that the model can not only capture the long-term time dependency in the time series, but also use the missing value pattern to obtain better prediction results. However, the current mainstream data prediction methods generally use the time decay mechanism, which is mainly to deal with the time decay effect of missing data. At the same time, for long time series data, gradient vanishing or gradient explosion problems are prone to occur. Therefore, these models have great limitations in dealing with long-distance dependencies. Summary of the invention
[0006] In order to solve at least one technical problem existing in the above-mentioned background technology, the present invention provides a method, system and product for completing abnormal missing data in a power system database, which predicts missing data from both the forward and backward directions through a dual model based on history and feature, and uses a bidirectional recurrent neural network combined with a bidirectional attention mechanism to capture long-distance dependencies between data, thereby improving the accuracy of prediction.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] A first aspect of the present invention provides a method for completing abnormal missing data in a power system database, comprising the following steps:
[0009] Acquire multi-source data of the power system and process it to obtain multivariate time series data;
[0010] Predictions are made based on multivariate time series data and a missing data prediction model to obtain predicted values of missing data; wherein the process of constructing the missing data prediction model includes:
[0011] For each time step, the time decay factor is calculated based on the extracted mask and time interval of the current time step, the hidden state is updated according to the time decay factor, the historical prediction missing value is calculated according to the hidden state, the missing value is filled, and the time series data after preliminary completion is obtained; based on the time series data after preliminary completion, feature estimation is performed in combination with the attention mechanism to calculate the feature estimation value; the combined weight of the historical prediction missing value and the feature estimation value is calculated, and the historical prediction missing value and the feature estimation value are combined according to the combined weight to obtain the combined estimation value, and the hidden state and cell state of the LSTM unit are updated based on the combined estimation value;
[0012] After the time step cycle ends, the hidden states of all time steps are processed to obtain the context vector, and the context vector is processed using a linear layer to obtain the predicted value of the missing data; the predicted value of the missing data is interpolated to the position of the missing value, and the data with the missing value filled is stored in the power system database.
[0013] Furthermore, the calculation formula of the time decay factor is:
[0014]
[0015] Among them, γ h and γ x represents the time decay factor, W x , b x , W h , b h represents the model parameters, Indicates the time interval between the current time t and the last time data was detected, s t is the time series data x of the current step t The corresponding moment, s t-1 is the time series data x of the previous step t-1 The corresponding moment, Represents the time interval between the current time t and the time when the data was last detected, Represents the observed time series data x t The d-th feature of For the corresponding The mask vector of .
[0016] Furthermore, the feature estimation is performed based on the time series data after preliminary completion in combination with the attention mechanism, and the formula for calculating the feature estimation value is:
[0017]
[0018] in, is the time series data after preliminary completion of historical data, Q, K, and V are the linear transformation parameter matrix W based on the time series data after preliminary completion. Q , W K , W V The vector matrix after the linear transformation, d model is the dimension of the input vector, z t is the estimated value of the feature.
[0019] Furthermore, when processing the hidden states of all time steps, a multi-head attention mechanism is used. The multi-head attention mechanism first uses a parameter matrix to perform a linear transformation on the hidden states of all time steps, and divides the vector matrix after the linear transformation into H heads. The attention weight of each head is calculated based on the query, key, and value vectors of the i-th head. The output of each head is concatenated and average pooled, and the context vector obtained after average pooling is sent to a linear transformation layer to obtain the final prediction value of the missing data.
[0020] Furthermore, after obtaining the multivariate time series data, the acquired data is preprocessed, including cleaning, noise reduction and standardization.
[0021] Furthermore, after preprocessing the acquired data, the multivariate time series data is checked for integrity, and if there are missing values in the data, the specific location and time point of the missing values are determined.
[0022] A second aspect of the present invention provides a system for completing missing abnormal data in a power system database, comprising:
[0023] A data acquisition module, which is used to acquire multi-source data of the power system and process it to obtain multivariate time series data;
[0024] A missing value prediction module is used to make predictions based on multivariate time series data and a missing data prediction model to obtain a predicted value of the missing data; wherein the construction process of the missing data prediction model includes:
[0025] For each time step, the time decay factor is calculated based on the extracted mask and time interval of the current time step, the hidden state is updated according to the time decay factor, the historical prediction missing value is calculated according to the hidden state, the missing value is filled, and the time series data after preliminary completion is obtained; based on the time series data after preliminary completion, feature estimation is performed in combination with the attention mechanism to calculate the feature estimation value; the combined weight of the historical prediction missing value and the feature estimation value is calculated, and the historical prediction missing value and the feature estimation value are combined according to the combined weight to obtain the combined estimation value, and the hidden state and cell state of the LSTM unit are updated based on the combined estimation value;
[0026] After the time step cycle is completed, the hidden states of all time steps are processed to obtain the context vector, which is processed using a linear layer to obtain the predicted value of the most missing data;
[0027] The missing value completion module is used to interpolate the predicted value of the missing data to the position of the missing value, and store the data after the missing value is completed in the power system database.
[0028] Furthermore, the system also includes a missing value detection module, which is used to perform integrity detection on the multivariate time series data after preprocessing the acquired data, and if there are missing values in the data, determine the specific location and time point of the missing values.
[0029] Furthermore, in the missing value prediction module, a multi-head attention mechanism is used to process the hidden states of all time steps. The multi-head attention mechanism first uses a parameter matrix to perform a linear transformation on the hidden states of all time steps, and divides the vector matrix after the linear transformation into H heads. The attention weight of each head is calculated based on the query, key, and value vectors of the i-th head. The output of each head is concatenated and average pooled, and the context vector obtained after average pooling is sent to a linear transformation layer to obtain the final prediction value of the missing data.
[0030] A third aspect of the present invention provides a program product.
[0031] A program product, which is a computer program product, includes a computer program, and when the computer program is executed by a processor, it implements the steps in the method for completing abnormal missing data in a power system database as described above in the first aspect.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] The present invention performs integrity detection on multivariate time series data, and if there are missing values in the data, determines the specific location and time point of the missing values; performs prediction based on the multivariate time series data and the missing data prediction model to obtain the predicted value of the missing data; when predicting missing data, the missing data is predicted from both the forward and backward directions through a dual model based on history and feature, and a bidirectional recurrent neural network is used in combination with a bidirectional attention mechanism to capture the long-distance dependency between data, thereby improving the accuracy of the prediction.
[0034] 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
[0035] The accompanying drawings in the specification, which constitute 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 descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0036] Figure 1 The present invention provides a flowchart of a method for completing abnormally missing data in a power system database. DETAILED DESCRIPTION
[0037] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0038] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0039] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0040] Explanation of terms
[0041] Normalization: Normalization is a data preprocessing technique that aims to convert data of different scales and ranges to a common scale, usually by adjusting the data to a specific range (such as between 0 and 1) or making it have specific statistical properties.
[0042] Attention Mechanism: Attention Mechanism is an important artificial intelligence technology that allows the model to pay more attention to the key information in the sequence when processing sequence data, while ignoring other unimportant information. The core idea of this technology is to assign different weights to each position according to the importance of each position in the input sequence. The attention mechanism can capture and utilize key information more effectively. This method can effectively improve the performance of the model in processing long sequence data.
[0043] Recurrent Neural Network: Recurrent Neural Network (RNN) is a neural network structure used to process sequence data. Unlike traditional feedforward neural networks, RNN has the characteristics of recurrent connections, which enables it to process time series data and other order-related information. In RNN, neurons in the hidden layer receive not only the current input, but also the hidden state of the previous moment as input, so that previous information can be retained and utilized. RNN is widely used in natural language processing, speech recognition, time series prediction and other fields.
[0044] After the system collects, stores and preprocesses the data, the missing data detection module detects the missing parts in the preprocessed data and marks the location of the missing values. The missing data is predicted by combining the bidirectional attention mechanism with the recurrent neural network. This embodiment takes large-scale power data as an example. In the process of acquiring power data, various factors such as smart meter failure or data transmission channel blockage may cause irregular missing of power data. The method of the present invention is to first identify the missing data in the abnormal phenomenon and then calculate and supplement it.
[0045] Embodiment 1
[0046] like Figure 1 As shown, this embodiment provides a method for completing abnormal missing data in a power system database, comprising the following steps:
[0047] S101, acquiring various data of the power system and storing them in a centralized database;
[0048] In this embodiment, the various data of the power system include sensor data, log files, external APIs and other data in various forms.
[0049] The data collection module needs to have efficient data transmission and storage capabilities to ensure the integrity and timeliness of the data. The data is stored in a centralized database to achieve centralized data collection and management.
[0050] S102. Preprocess the acquired data, including cleaning, noise reduction and standardization, to ensure the quality and consistency of the data.
[0051] Among them, the cleaning process includes removing duplicate data, correcting outliers, filling missing values and other operations; the noise reduction process aims to filter out the noise in the data and retain useful information; the standardization process converts the data into a unified format and unit for subsequent processing and analysis.
[0052] S103, checking the integrity of the data and recording the location of the missing data;
[0053] If missing values are detected in the data, the system will record the specific location and time points of these missing values to ensure that the subsequent completion process can accurately locate the missing data.
[0054] S104: predicting and completing the missing data according to the constructed missing data prediction model, specifically including the following steps:
[0055] For each time step, do the following:
[0056] S401, extracting the value, mask and time interval of the current time step;
[0057] In the real world, multivariate time series data X = {x1, x2, …, x t ,…,x T} as an observation sequence, T is the length of the time series, and each observed value x t There may be D features, such as Since data may be missing, a mask vector m is introduced t , indicating the missing of one of the features, and its calculation formula is as follows:
[0058]
[0059] in, Represents the observed time series data x t The d-th feature of .
[0060] In order to more conveniently analyze the relationship between data and time, δ t :
[0061]
[0062] in, Represents the time interval between the current time t and the time when the data was last detected, s t For x t The corresponding moment, s t-1 For x t-1 The corresponding moment, Represents the time interval between the current time t and the time when the data was last detected, For the corresponding The mask vector of .
[0063] S402, based on the extracted mask and time interval of the current time step, calculate the time decay factor, update the hidden state according to the time decay factor, calculate the historical prediction missing value according to the hidden state, fill the missing value, and obtain the time series data after preliminary completion; for the historical estimation, since the value x of the current time step t There may be missing values, so x cannot be used directlyt The value of is used as input, but the preliminary completed data x is calculated by formula (1) bt , when initializing, the hidden state h is a zero tensor, and x t Using the mask vector m through formula (2) t After supplementation Then proceed to the next layer of calculation.
[0064] In order to prevent irregular sampling of time, the time attenuation factor γ is first introduced through formula (3) and formula (4) respectively. h and γ x , the former is mainly used to attenuate the hidden state h, and the latter is mainly used to process the input data. The formula is as follows:
[0065] x bt =W his h t-1 +b his (1)
[0066]
[0067] γ h =exp{-ReLU(W h ·δ t +b h )} (3),
[0068] γ x =exp{-ReLU(W x ·δ t +b x )} (4),
[0069] In the formula, x bt represents the missing values initially based on historical forecasts, represents the time series data after preliminary completion based on historical data, W his , b his , W x , b x , W h , b h represents the model parameters, m t represents the mask vector, δ t represents the time interval between the current time t and the last time data was detected, γ h and γ x Represents the time decay factor.
[0070] S403, based on the time series data after preliminary completion, feature estimation is performed in combination with the attention mechanism to calculate the feature estimation value;
[0071] The prediction obtained by formula (2) is based on historical data, and it is assumed that each observed attribute is independent of each other. However, in many cases, the values of different attributes will also affect each other. In order to further improve the accuracy of the prediction, the attention mechanism is used to implement feature-based estimation, where Q, K, and V are obtained by linear transformation of the sequence completed by the historical estimation, as shown in formulas (5), (6), and (7). After being processed by the softmax function in formula (8), the feature-based estimation z is obtained. t , the formula is as follows:
[0072]
[0073] z t =Attention(Q,K,V) (9),
[0074] S404. Calculate the missing value x based on historical predictions bt and feature-based estimates z t The combined weight α t , according to the combined weight, the historical estimated value and the feature estimated value are combined to obtain the combined estimated value, and the missing value is filled. The completed value is used as input, and the hidden state and cell state of the LSTM unit are updated through the self-attention mechanism. The specific formula is as follows:
[0075] α t =σ(W c ·[γ x ,m]+b c ) (10),
[0076] c t =α t ⊙z t +(1-α t )⊙x bt (11)
[0077]
[0078] After the time step cycle ends:
[0079] S405, use a multi-head attention mechanism to process the hidden states of all time steps to obtain a context vector, use a linear layer to process the context vector to obtain a final prediction value, and calculate the prediction loss;
[0080] The hidden states of all the above time steps are processed through the multi-head attention mechanism to obtain the context vector. This context vector can help the model better understand and utilize the overall structure and characteristics of time series data in the prediction task. The context vector is then processed using a linear layer to obtain the final prediction value and calculate the prediction loss.
[0081] For the hidden states of all the above time steps, the multi-head attention mechanism first uses the parameter matrix W q , W k , W v The linear transformation is performed on them, and the transformed vectors are represented as Q, K, and V respectively. Q in formula (15) i , K i 、V i All are obtained from the hidden state h, the subscript i represents different attention mechanism heads, and the formula is as follows:
[0082]
[0083] y h =σ(W out avg_context+b out ) (17),
[0084] Then the Q, K, V vectors are divided into H heads, each with a dimension of d model / H, where d model is the dimension of the input vector, H is the number of heads, and then the attention weight is calculated for each head, as shown in formula (15), where Q i , K i 、V i Denote the query, key, and value vectors of the i-th head, respectively. Specifically, first calculate the similarity between Q and K, and then divide it by d model To scale, the attention weight of each head is obtained after normalization by the softmax function. The attention weight is multiplied by V to obtain the attention output of each head. Finally, the output of each head is concatenated and average pooled. The context vector avg_context obtained after average pooling is sent to a linear transformation layer to obtain the final output as shown in formulas (16) and (17), where W out , b out are the parameters of the model.
[0085] S105, interpolating the predicted value of the missing data to the position of the missing value, and storing the data after the missing value is interpolated in the power system database.
[0086] The interpolation process of the predicted value needs to ensure the continuity and consistency of the data to avoid sudden or unreasonable changes in the interpolated data. After the interpolation is completed, the interpolated data will be stored back in the centralized database.
[0087] In summary, the model of the present invention combines RNN and multi-head attention mechanism to make full use of the long-term and short-term dependencies and feature correlations in time series data to achieve efficient and accurate missing value prediction. The modular design and flexible parameter setting of the model enable it to adapt to different application scenarios and provide strong technical support for data completion.
[0088] Embodiment 2
[0089] This embodiment provides a system for completing missing abnormal data in a power system database, comprising:
[0090] A data acquisition module, which is used to acquire multi-source data of the power system and process it to obtain multivariate time series data;
[0091] A missing value prediction module is used to make predictions based on multivariate time series data and a missing data prediction model to obtain a predicted value of the missing data; wherein the construction process of the missing data prediction model includes:
[0092] For each time step, the time decay factor is calculated based on the extracted mask and time interval of the current time step, the hidden state is updated according to the time decay factor, the historical prediction missing value is calculated according to the hidden state, the missing value is filled, and the time series data after preliminary completion is obtained; based on the time series data after preliminary completion, feature estimation is performed in combination with the attention mechanism to calculate the feature estimation value; the combined weight of the historical prediction missing value and the feature estimation value is calculated, and the historical prediction missing value and the feature estimation value are combined according to the combined weight to obtain the combined estimation value, and the hidden state and cell state of the LSTM unit are updated based on the combined estimation value;
[0093] After the time step cycle is completed, the hidden states of all time steps are processed to obtain the context vector, which is processed using a linear layer to obtain the predicted value of the most missing data;
[0094] The missing value completion module is used to interpolate the predicted value of the missing data to the position of the missing value, and store the data after the missing value is completed in the power system database.
[0095] Embodiment 3
[0096] 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 method for completing abnormally missing data in a power system database as described above are implemented.
[0097] Embodiment 4
[0098] 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 method for completing abnormal missing data in a power system database as described above are implemented.
[0099] Embodiment 5
[0100] This embodiment provides a program product, which is a computer program product, including a computer program. When the computer program is executed by a processor, the steps in the method for completing abnormal missing data in a power system database as described above are implemented.
[0101] 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. A method for completing abnormal missing data in a power system database, characterized in that: The steps include: Acquire multi-source data of the power system and process it to obtain multivariate time series data; Predictions are made based on multivariate time series data and a missing data prediction model to obtain predicted values of missing data; wherein the process of constructing the missing data prediction model includes: For each time step, the time decay factor is calculated based on the extracted mask and time interval of the current time step, the hidden state is updated according to the time decay factor, the historical prediction missing value is calculated according to the hidden state, the missing value is filled, and the time series data after preliminary completion is obtained; based on the time series data after preliminary completion, feature estimation is performed in combination with the attention mechanism to calculate the feature estimation value; the combined weight of the historical prediction missing value and the feature estimation value is calculated, and the historical prediction missing value and the feature estimation value are combined according to the combined weight to obtain the combined estimation value, and the hidden state and cell state of the LSTM unit are updated based on the combined estimation value; After the time step cycle ends, the hidden states of all time steps are processed to obtain the context vector, and the context vector is processed using a linear layer to obtain the predicted value of the missing data; the predicted value of the missing data is interpolated to the position of the missing value, and the data with the missing value filled is stored in the power system database.
2. A method for completing abnormal missing data in a power system database according to claim 1, characterized in that: The calculation formula of time decay factor is: Among them, γ h and γ x represents the time decay factor, W x , b x , W h , b h represents the model parameters, Indicates the time interval between the current time t and the last time data was detected, s t is the time series data x of the current step t The corresponding moment, s t-1 is the time series data x of the previous step t-1 The corresponding moment, Represents the time interval between the current time t and the time when the data was last detected, Represents the observed time series data x t The d-th feature of For the corresponding The mask vector of .
3. A method for completing abnormal missing data in a power system database according to claim 1, characterized in that: The feature estimation is performed based on the time series data after preliminary completion and combined with the attention mechanism. The formula for calculating the feature estimation value is: z t =Attention(Q,K,V), in, is the time series data after preliminary completion of historical data, Q, K, and V are the linear transformation parameter matrix W based on the time series data after preliminary completion. Q , W K , W V The vector matrix after the linear transformation, d model is the dimension of the input vector, z t is the estimated value of the feature.
4. A method for completing abnormal missing data in a power system database according to claim 1, characterized in that: When processing the hidden states of all time steps, a multi-head attention mechanism is used. The multi-head attention mechanism first uses a parameter matrix to perform a linear transformation on the hidden states of all time steps, and divides the vector matrix after the linear transformation into H heads. The attention weight of each head is calculated based on the query, key, and value vectors of the i-th head. The output of each head is concatenated and average pooled, and the context vector obtained after average pooling is sent to a linear transformation layer to obtain the final prediction value of the missing data.
5. A method for completing abnormal missing data in a power system database according to claim 1, characterized in that: After obtaining the multivariate time series data, the acquired data is preprocessed, including cleaning, noise reduction and standardization.
6. A method for completing abnormal missing data in a power system database according to claim 5, characterized in that: After preprocessing the acquired data, the multivariate time series data is checked for integrity. If there are missing values in the data, the specific location and time point of the missing values are determined.
7. A power system database abnormal missing data completion system, using a power system database abnormal missing data completion method according to any one of claims 1 to 6, characterized in that: include: A data acquisition module, which is used to acquire multi-source data of the power system and process it to obtain multivariate time series data; A missing value prediction module is used to make predictions based on multivariate time series data and a missing data prediction model to obtain a predicted value of the missing data; wherein the construction process of the missing data prediction model includes: For each time step, the time decay factor is calculated based on the extracted mask and time interval of the current time step, the hidden state is updated according to the time decay factor, the historical prediction missing value is calculated according to the hidden state, the missing value is filled, and the time series data after preliminary completion is obtained; based on the time series data after preliminary completion, feature estimation is performed in combination with the attention mechanism to calculate the feature estimation value; the combined weight of the historical prediction missing value and the feature estimation value is calculated, and the historical prediction missing value and the feature estimation value are combined according to the combined weight to obtain the combined estimation value, and the hidden state and cell state of the LSTM unit are updated based on the combined estimation value; After the time step cycle is completed, the hidden states of all time steps are processed to obtain the context vector, which is processed using a linear layer to obtain the predicted value of the most missing data; The missing value completion module is used to interpolate the predicted value of the missing data to the position of the missing value, and store the data after the missing value is completed in the power system database.
8. A power system database abnormal missing data completion system as claimed in claim 7, characterized in that: The system also includes a missing value detection module, which is used to perform integrity detection on the multivariate time series data after preprocessing the acquired data, and if there are missing values in the data, determine the specific location and time point of the missing values.
9. A power system database abnormal missing data completion system as claimed in claim 7, characterized in that: In the missing value prediction module, a multi-head attention mechanism is used to process the hidden states of all time steps. The multi-head attention mechanism first uses a parameter matrix to perform a linear transformation on the hidden states of all time steps, and divides the vector matrix after the linear transformation into H heads. The attention weight of each head is calculated based on the query, key, and value vectors of the i-th head. The output of each head is concatenated and average pooled, and the context vector obtained after average pooling is sent to a linear transformation layer to obtain the final prediction value of the missing data.
10. A program product, the program product being a computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, the steps of a method for completing abnormally missing data in a power system database as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Chronic disease aggravation risk assessment and alarm system
CN109817338A
Traffic missing data complementation method based on space-time attention mechanism
CN113094357A
User demand prediction method based on big data
CN116228280A
Time series data reconstruction method based on multi-head attention mechanism
CN116992224A
Reliable time sequence completion method based on recurrent neural network and ensemble learning
CN117668456A
