Electric energy meter abnormal data repairing method based on data and knowledge bidirectional driving
By using a two-way data-knowledge-driven method in wind farm electricity meter data repair, and using technical means such as standardized processing, Gram transformation and joint training, the problem of low repair accuracy in the existing technology is solved, and more efficient and accurate data repair is achieved.
Patent Information
- Application Number
- CN202411622070.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-14
AI Technical Summary
The prior art has low repair accuracy of the electric energy meter data in wind farms, especially when processing nonlinear and non-stationary data, it is difficult to effectively repair abnormal data.
Using a two-way driven method based on data and knowledge, a model with knowledge-driven and data-driven features is constructed through technical means such as standardized processing, Gram transformation, dual-channel feature extraction and joint training, and is used to repair abnormal data of wind power time series data.
It improves the accuracy and efficiency of repairing electricity meter data in the wind farm, and can repair abnormal data more accurately, thus providing more reliable data support for the intelligent operation and maintenance of wind farms.
Smart Images

Figure CN119622402A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of data processing, and in particular to a method for repairing abnormal data of an electric energy meter based on bidirectional drive of data and knowledge. Background Art
[0002] Wind power generation has achieved large-scale and high-quality development, and its installed capacity is still expanding, accounting for an increasing proportion in the power system. However, since most wind farms are located in areas with harsh natural environments, extreme weather, unstable signals, and hardware failures of sensors or other monitoring equipment will cause data collection interruptions during data storage or transmission, resulting in a large amount of data missing. This causes a certain degree of damage to the integrity of the collected wind power time series and the abundance of data, which directly affects decisions in power generation assessment, reliability analysis, operation and maintenance, technical transformation and decommissioning, etc. Therefore, it is necessary to study the automatic repair method of wind farm monitoring data to ensure the safe and stable operation of the power system and provide complete and accurate data support for the realization of intelligent operation and maintenance of the power grid. In order to solve the above problems, existing data repair technologies mainly rely on statistical methods and machine learning algorithms. Statistical methods usually interpolate or extrapolate based on the statistical characteristics of historical data, but their limitation is that they cannot effectively process nonlinear and non-stationary wind power data. Although machine learning algorithms have advantages in processing complex data patterns, they often require a large amount of training data and computing resources, and the generalization ability of the model is limited by the quality and diversity of the training set.
[0003] Existing machine learning methods can be divided into two types: knowledge-driven methods and data-driven methods. Knowledge-driven models construct empirical feature sets based on expert experience and have been widely used in fields such as power system classification and load identification. However, constructing and selecting features based on expert experience and ensuring the effectiveness of different types of feature combinations for actual application scenarios such as load identification and classification often require a lot of feature engineering work, but the constructed and selected features cannot ensure that they are beneficial to outlier repair. In contrast, data-driven deep learning methods, by vectorizing data during processing, map the input image data or time series data numerical vectors into implicit combination feature vectors to capture potential information, and the process does not require human intervention. However, when there is missing or noisy data, the deep learning method will have reduced model performance due to learning feature vector combinations that are irrelevant to the sample. When the number of training samples is insufficient or the samples are unbalanced, the data-driven deep learning method will over-train a certain type of feature vector combination, which will lead to overfitting of the model. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method for repairing abnormal data of electric energy meters based on bidirectional drive of data and knowledge, which solves the problem of low repair accuracy of wind farm electric energy meter data in the prior art.
[0005] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a method for repairing abnormal data of an electric energy meter based on bidirectional drive of data and knowledge, comprising the following steps: S1. Obtain wind power time series data of a wind farm, and perform normalization processing on the wind power time series data to obtain normalized wind power time series data; S2. Convert the data values in the normalized wind power time series data into angle cosine values, convert the timestamps corresponding to the data values in the normalized wind power time series data into radius sizes, and determine the vector set of the data points in the normalized wind power time series data in the polar coordinate system according to the angle cosine values and the radius sizes; S3, calculating a custom inner product of a first vector and a second vector in a vector set; S4. Determine the Gram angle field according to the custom inner product; S5. According to the wind power time series data, the total load, maximum value, minimum value, average value, standard deviation, skewness and kurtosis of the wind power time series data are determined respectively, and the total load, maximum value, minimum value, average value, standard deviation, skewness and kurtosis are feature spliced to obtain empirical features; S6, constructing a dual-channel feature extraction module, and extracting features from the Gram angle field and the empirical features through the dual-channel feature extraction module to obtain data-driven features and knowledge-driven features respectively; S7, constructing a joint training module, using the joint training module to process the data-driven features and the knowledge-driven features to obtain sample labels corresponding to the wind power time series data; Sample labels include abnormal data and normal data; S8. Use the abnormal data repair module to repair the wind power time series data whose sample labels are abnormal data to obtain wind power time series repair data.
[0006] The beneficial effects of the above scheme are: (1) The present invention first constructs seven common explicit empirical features to mine the long-term periodic fluctuation characteristics of wind farm electricity meters; then introduces a data-driven Gram transform method to convert one-dimensional time series data into two-dimensional image data, wherein the polar coordinate transformation is used to improve the performance of the model for correlation analysis of samples with a longer time span, and extracts implicit features suitable for analyzing periodic fluctuation characteristics; finally, a joint training method and an improved LSTM model are introduced to achieve the generalization of the knowledge-driven model, the learning ability of the data-driven model, and the analysis ability of the LSTM for the forward and backward dependency information of time series data.
[0007] (2) The present invention combines the advantages of data-driven and knowledge-driven approaches, and improves the repair accuracy and efficiency of wind farm electricity meter data through joint training, thereby providing more reliable data support for the intelligent operation and maintenance of wind farms.
[0008] Furthermore, in step S1, the calculation formula used for normalizing the wind power time series data is:
[0009] in, Indicates Normalized wind power time series data, represents wind power time series data, Indicates the length of wind power time series data, Indicates Wind power time series data; In step S2, the calculation formula used to convert the data values in the normalized wind power time series data into the cosine value of the angle is:
[0010] in, Indicates The cosine value of the angle corresponding to the normalized wind power time series data is: Indicates Normalized wind power time series data; The calculation formula used to convert the timestamp corresponding to the data value in the normalized wind power time series data into the radius size is:
[0011] in, Indicates The radius corresponding to the normalized wind power time series data is: Indicates The timestamp corresponding to the normalized wind power time series data is: Indicates the length of wind power time series data; In step S3, the calculation formula used to calculate the custom inner product of the first vector and the second vector in the vector set is:
[0012] in, represents a custom inner product of the first and second vectors, represents the first vector, represents the second vector, Represents the angle between a vector and a second vector.
[0013] The beneficial effect of the above further scheme is that the normalized data helps to maintain the stability of the training process and reduce the numerical instability problem caused by inconsistent feature scales.
[0014] Further, in step S4, the calculation formula used to determine the Gram angle field is as follows according to the custom inner product:
[0015] in, represents the Gram angle field, Represents a matrix consisting of custom inner products.
[0016] The beneficial effect of the above further scheme is that the Gram transform method provides rich visual features and multi-dimensional information by converting one-dimensional time series data into two-dimensional image data, thereby enhancing the visualization of the data and improving the performance and generalization ability of the model.
[0017] Further, in step S5, the total load, maximum value, minimum value, average value, standard deviation, skewness and kurtosis of the wind power time series data are determined respectively according to the wind power time series data, and the calculation formulas used are:
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024] in, They represent the total load, maximum value, minimum value, mean value, standard deviation, skewness and kurtosis respectively. Indicates the length of wind power time series data, Indicates Wind power time series data.
[0025] Further, in step S6, the dual-channel feature extraction module includes a convolutional neural network, a first fully connected layer, and a second fully connected layer; The second fully connected layer is connected to the convolutional neural network, and the first fully connected layer and the second fully connected layer are arranged in parallel; The convolutional neural network consists of two layers, and the convolution kernel size of the convolutional neural network is 5*5, the activation function of the convolutional neural network is the Relu function, the pooling layer of the convolutional neural network is set to global average pooling 2*2, and the Dropout layer of the convolutional neural network is set to 0.3.
[0026] Further, in step S7, the joint training module includes a Deep part, a Wide part, a feature splicing module and a training module; The Deep part is a feedforward neural network, and the Wide part is a linear network. The calculation formula of the Deep part is:
[0027] in, Represents the recognition result of the Deep part, represents data-driven features, Represents the model parameters of the Deep part, Indicates the deviation of the Deep part; The calculation formula for each layer of the neural network in the Deep part is:
[0028] in, Indicates the number of layers of the neural network in the Deep part, represents the Relu activation function, Respectively represent Activation, bias and weight parameters of layer neural networks; The loss function of the training module is:
[0029] in, represents the sample label, represents the softmax function, Represents experience characteristics, represents the bias term, represents the weight vector of the Wide part, Represents the weight vector of the Deep part, Represents the activation function of the neural network.
[0030] The beneficial effect of the above further scheme is: introducing a joint training method and improving the LSTM model, further combining the generalization of the knowledge-driven model, the learning ability of the data-driven model and the LSTM's ability to analyze the before and after dependency information of time series data, and improving the accuracy of repairing abnormal data of electricity meters. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 The present invention is a flowchart of a method for repairing abnormal data of an electric energy meter based on bidirectional drive of data and knowledge.
[0032] Figure 2 The schematic diagram of the model structure of an abnormal data repair method for electric energy meters based on bidirectional drive of data and knowledge.
[0033] Figure 3 It is a structural diagram of the dual-channel feature extraction module.
[0034] Figure 4 This is a schematic diagram of the LSTM structure. DETAILED DESCRIPTION
[0035] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0036] like Figure 1 As shown, a method for repairing abnormal data of an electric energy meter based on bidirectional drive of data and knowledge comprises the following steps: S1. Obtain wind power time series data of a wind farm, and normalize the wind power time series data to obtain normalized wind power time series data.
[0037] In this embodiment, the calculation formula used to normalize the wind power time series data is:
[0038] in, Indicates Normalized wind power time series data, represents wind power time series data, Indicates the length of wind power time series data, Indicates Wind power time series data.
[0039] S2. Convert the data values in the normalized wind power time series data into angle cosine values, convert the timestamps corresponding to the data values in the normalized wind power time series data into radius sizes, and determine the vector set of the data points in the normalized wind power time series data in the polar coordinate system based on the angle cosine values and radius sizes.
[0040] In this embodiment, the calculation formula used to convert the data values in the normalized wind power time series data into the cosine value of the angle is:
[0041] in, Indicates The cosine value of the angle corresponding to the normalized wind power time series data is: Indicates Normalized wind power time series data; The calculation formula used to convert the timestamp corresponding to the data value in the normalized wind power time series data into the radius size is:
[0042] in, Indicates The radius corresponding to the normalized wind power time series data is: Indicates The timestamp corresponding to the normalized wind power time series data is: Indicates the length of wind power time series data.
[0043] For example, in the polar coordinate system, each normalized wind power time series data contains two pieces of information, one is the normalized value of the data point, and the other is its time series position. The temporal relationship of wind power time series data is retained, and the polar angle The numerical relationship of wind power time series data at a certain timestamp is retained.
[0044] S3. Calculate the custom inner product of the first vector and the second vector in the vector set.
[0045] In this embodiment, the calculation formula used to calculate the custom inner product of the first vector and the second vector in the vector set is:
[0046] in, represents a custom inner product of the first and second vectors, represents the first vector, represents the second vector, Represents the angle between a vector and a second vector.
[0047] For example, if the length of the vector in the vector set is ignored, the inner product of the vector can be considered as the similarity between the two vectors, that is, the correlation information of different timestamp features. In the custom inner product calculation, the closer the two vectors are, the closer the inner product value is to 1, and vice versa.
[0048] S4. Determine the Gram angle field based on the custom inner product.
[0049] In this embodiment, the calculation formula used to determine the Gram angle field is as follows based on the custom inner product:
[0050] in, represents the Gram angle field, Represents a matrix consisting of custom inner products.
[0051] For example, the basic principle of the Gram angular field is to convert the scaled one-dimensional time series data from the rectangular coordinate system to the polar coordinate system, and then calculate the angle sum or difference between different time points through a custom inner product with a penalty term to analyze the time correlation of the time series data at different time points, while improving the model performance and taking into account the generalization of the model. There are two specific implementation methods of the Gram transform, the first is GASF (Gram angular sum field), and the second is GADF (Gram angular difference field).
[0052] In the Gram angle field, compared with the original one-dimensional time series data, the Gram angle field uses a custom inner product to transform the information of a certain time point into the correlation information between this time point information and other time point information. The calculation formula of the Gram angle difference field (GADF) can be:
[0053] Here, GADF represents the Gram Angle Difference Field.
[0054] S5. According to the wind power time series data, the total load, maximum value, minimum value, average value, standard deviation, skewness and kurtosis of the wind power time series data are determined respectively, and the total load, maximum value, minimum value, average value, standard deviation, skewness and kurtosis are feature concatenated to obtain empirical features.
[0055] In this embodiment, according to the wind power time series data, the calculation formulas used to determine the total load, maximum value, minimum value, average value, standard deviation, skewness and kurtosis of the wind power time series data are respectively:
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062] in, They represent the total load, maximum value, minimum value, mean value, standard deviation, skewness and kurtosis respectively. Indicates the length of wind power time series data, Indicates Wind power time series data.
[0063] S6. Construct a dual-channel feature extraction module, and extract the Gram angle field and the empirical feature respectively through the dual-channel feature extraction module to obtain data-driven features and knowledge-driven features respectively.
[0064] In this embodiment, the dual-channel feature extraction module includes a convolutional neural network, a first fully connected layer and a second fully connected layer; the second fully connected layer is connected to the convolutional neural network, and the first fully connected layer and the second fully connected layer are arranged in parallel; the convolutional neural network includes two layers, and the convolution kernel size of the convolutional neural network is 5*5, the activation function of the convolutional neural network is the Relu function, the pooling layer of the convolutional neural network is set to global average pooling 2*2, and the Dropout layer of the convolutional neural network is set to 0.3.
[0065] like Figure 2 As shown, Figure 2 The figure is a schematic diagram of the model structure of an abnormal data repair method for electric energy meters based on bidirectional drive of data and knowledge. Figure 2 In the present invention, a model structure of an abnormal data repair method of an electric energy meter based on bidirectional driving of data and knowledge may include feature extraction (ie, a dual-channel feature extraction module), joint training and abnormal data repair.
[0066] like Figure 3 As shown, Figure 3 It is a schematic diagram of the structure of the dual-channel feature extraction module. Figure 3 In the dual-channel feature extraction module, the convolutional neural network includes two layers, and the convolution kernel size of the convolutional neural network is 5*5, the activation function of the convolutional neural network is the Relu function, the pooling layer of the convolutional neural network is set to global average pooling 2*2, and the Dropout layer of the convolutional neural network is set to 0.3.
[0067] S7. Construct a joint training module, and use the joint training module to process the data-driven features and the knowledge-driven features to obtain sample labels corresponding to the wind power time series data; the sample labels include abnormal data and normal data.
[0068] In this embodiment, the joint training module includes a Deep part, a Wide part, a feature splicing module and a training module; The Deep part is a feedforward neural network, and the Wide part is a linear network. The calculation formula of the Deep part is:
[0069] in, Represents the recognition result of the Deep part, represents data-driven features, Represents the model parameters of the Deep part, Indicates the deviation of the Deep part; The calculation formula for each layer of the neural network in the Deep part is:
[0070] in, Indicates the number of layers of the neural network in the Deep part, represents the Relu activation function, Respectively represent Activation, bias and weight parameters of layer neural networks; The loss function of the training module is:
[0071] in, represents the sample label, represents the softmax function, Represents experience characteristics, represents the bias term, represents the weight vector of the Wide part, Represents the weight vector of the Deep part, Represents the activation function of the neural network.
[0072] Continue to refer Figure 2 ,exist Figure 2 In the joint training, the joint training is also a joint training module, and the basic structure of the joint training module can be a long short-term memory network (Long Short Term Memory, LSTM).
[0073] like Figure 4 As shown, Figure 4 This is a schematic diagram of the LSTM structure. Figure 4In the long short-term memory network, the forget gate f t , Input Gate i t and output gate o t The operation steps of the long short-term memory network are as follows: First, for the moment t Input data x t and the hidden state at the previous moment h t-1 , calculate the forget gate f t , and its calculation formula is as follows:
[0074] in, W f and b f is the parameter of the forget gate, is the sigmoid function, [ h t-1 ,x t ] indicates that the hidden state of the previous moment h t-1 and the input data at the current moment x t Stitched together to form a vector.
[0075] The function of the forget gate is to determine the memory state of the previous moment. c t-1 Which information should be forgotten and which information should be kept. f t If the output is close to 0, it means that the information at the previous moment needs to be forgotten. If it is close to 1, it means that the information at the previous moment needs to be retained.
[0076] Next, calculate the input gate i t and the candidate memory state at the current moment c t Among them, the input gate i t Determine the input data at the current moment x t Which information needs to be retained? The calculation formula is as follows:
[0077] Candidate memory state c t The calculation formula is as follows:
[0078] in, W i and W c are the parameters of the input gate, b i and b c are the parameters of the candidate memory states, tanh is the hyperbolic tangent function.
[0079] The role of the input gate and candidate memory state is to x t and the hidden state h at the previous moment t-1 Compute a candidate memory state c t , to determine what information needs to be retained and what needs to be forgotten.
[0080] Finally, the output gate is calculated o t and the hidden state at the current moment h t . Output Gate o t Determines the memory state at the current moment c t Which information needs to be output? The calculation formula is as follows:
[0081] The hidden state at the current moment h t The calculation formula is as follows:
[0082] in, represents element-wise multiplication, o t represents the output of the output gate, tanh ( c t ) indicates that the value of the memory cell at the current moment has passed tanh The result after activation function.
[0083] Exemplarily, the outputs of the Wide part and the Deep part are spliced and sent to the training module for joint training. The difference between joint training and integrated training is that in the integrated model, the individual models are trained separately without knowing each other, and their predictions are only combined during reasoning rather than during training. In contrast, joint training optimizes all parameters simultaneously by considering the common inputs and weights of the Wide part and the Deep part at the same time during training. In addition, the joint training method also has an impact on the model size. For the integrated training model, since the training sets are disjoint, each individual model size usually needs to be larger (for example, with more features, or a single model needs to input the corresponding training set separately) to achieve reasonable accuracy for the integrated work. In contrast, for joint training, the Wide part only needs to use a small number of features to make up for the lack of generalization of the Deep part, without the need to include the Wide part of all sample valid features. In addition, the gradient is back-propagated from the output to the Wide and Deep parts of the model using mini-batch stochastic optimization to achieve joint training.
[0084] S8. Use the abnormal data repair module to repair the wind power time series data whose sample labels are abnormal data to obtain wind power time series repair data.
[0085] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the invention.
Claims
1. A method for repairing abnormal data of electric energy meters based on bidirectional drive of data and knowledge, characterized in that: The method comprises: S1. Acquire wind power time series data of a wind farm, and perform normalization processing on the wind power time series data to obtain normalized wind power time series data; S2, converting the data values in the normalized wind power time series data into angle cosine values, and converting the timestamps corresponding to the data values in the normalized wind power time series data into radius sizes, and determining the vector set of the data points in the normalized wind power time series data in the polar coordinate system according to the angle cosine values and the radius sizes; S3, calculating a user-defined inner product of a first vector and a second vector in the vector set; S4. Determine the Gram angle field according to the custom inner product; S5. According to the wind power time series data, respectively determine the total load, maximum value, minimum value, average value, standard deviation, skewness and kurtosis of the wind power time series data, and perform feature splicing on the total load, the maximum value, the minimum value, the average value, the standard deviation, the skewness and the kurtosis to obtain empirical features; S6, constructing a dual-channel feature extraction module, and performing feature extraction on the Gram angle field and the empirical feature respectively through the dual-channel feature extraction module to obtain data-driven features and knowledge-driven features respectively; S7, constructing a joint training module, and using the joint training module to process the data-driven features and the knowledge-driven features to obtain sample labels corresponding to the wind power time series data; The sample labels include abnormal data and normal data; S8. Use the abnormal data repair module to repair the wind power time series data whose sample labels are abnormal data to obtain wind power time series repair data.
2. The method according to claim 1, characterized in that In the step S1, the calculation formula used for normalizing the wind power time series data is: in, Indicates Normalized wind power time series data, represents wind power time series data, Indicates the length of wind power time series data, Indicates Wind power time series data; In step S2, the calculation formula used to convert the data values in the normalized wind power time series data into the cosine value of the angle is: in, Indicates The cosine value of the angle corresponding to the normalized wind power time series data is: Indicates Normalized wind power time series data; The calculation formula used to convert the timestamp corresponding to the data value in the normalized wind power time series data into the radius size is: in, Indicates The radius corresponding to the normalized wind power time series data is: Indicates The timestamp corresponding to the normalized wind power time series data is: Indicates the length of wind power time series data; In step S3, the calculation formula used for calculating the custom inner product of the first vector and the second vector in the vector set is: in, represents a custom inner product of the first and second vectors, represents the first vector, represents the second vector, Represents the angle between a vector and a second vector.
3. The method according to claim 2, characterized in that In step S4, the calculation formula used to determine the Gram angle field according to the custom inner product is: in, represents the Gram angle field, Represents a matrix consisting of custom inner products.
4. The method according to claim 2, characterized in that: In step S5, the calculation formulas used to determine the total load, maximum value, minimum value, average value, standard deviation, skewness and kurtosis of the wind power time series data are respectively: in, They represent the total load, maximum value, minimum value, mean value, standard deviation, skewness and kurtosis respectively. Indicates the length of wind power time series data, Indicates Wind power time series data.
5. The method according to claim 1, characterized in that: In step S6, the dual-channel feature extraction module includes a convolutional neural network, a first fully connected layer and a second fully connected layer; The second fully connected layer is connected to the convolutional neural network, and the first fully connected layer and the second fully connected layer are arranged in parallel; The convolutional neural network includes two layers, and the convolution kernel size of the convolutional neural network is 5*5, the activation function of the convolutional neural network is the Relu function, the pooling layer of the convolutional neural network is set to global average pooling 2*2, and the Dropout layer of the convolutional neural network is set to 0.
3.
6. The method according to claim 1, characterized in that In step S7, the joint training module includes a Deep part, a Wide part, a feature splicing module and a training module; The Deep part is a feedforward neural network, and the Wide part is a linear network. The calculation formula of the Deep part is: in, Represents the recognition result of the Deep part, represents data-driven features, Represents the model parameters of the Deep part, Indicates the deviation of the Deep part; The calculation formula of each layer of the neural network in the Deep part is: in, Indicates the number of layers of the neural network in the Deep part, represents the Relu activation function, Respectively represent Activation, bias and weight parameters of layer neural networks; The loss function of the training module is: in, represents the sample label, represents the softmax function, Represents experience characteristics, represents the bias term, represents the weight vector of the Wide part, Represents the weight vector of the Deep part, Represents the activation function of the neural network.
Citation Information
Patent Citations
Rolling bearing fault diagnosis method based on GAF-DRSN
CN114595730A
Fusion model-based site soil and groundwater environment monitoring data cleaning method
CN117591506A
Foam flotation working condition identification method based on data and knowledge dual-drive integrated learning
CN117853844A
Rotating machine fault diagnosis method, system and equipment
CN118245911A
Knowledge and twin model driven actuator key fault injection and diagnosis method
WO2024113574A1