An electric energy meter abnormal data repairing method based on data and knowledge bidirectional driving
By employing a data- and knowledge-driven approach, combined with Gram angle field transformation and joint training modules, the problem of low accuracy in repairing wind farm electricity meter data was solved, achieving efficient data repair and improved model generalization capabilities.
Patent Information
- Application Number
- CN202411622070.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-11-14
AI Technical Summary
Existing technologies suffer from problems such as data gaps and low repair accuracy due to noise when processing energy meter data in wind farms. Furthermore, machine learning methods experience performance degradation or overfitting when training data is lacking or when noise is present.
A data- and knowledge-driven approach is adopted, which combines data-driven and knowledge-driven feature extraction with normalization, Gram angle field transformation and joint training modules, and uses convolutional neural networks and LSTM models to repair abnormal data of electricity meters.
It improves the accuracy and efficiency of repairing wind farm electricity meter data, provides more reliable data support, and enhances the model's generalization ability and the ability to analyze time series data.
Smart Images

Figure CN119622402B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and relates to an electric energy meter abnormal data repairing method based on data and knowledge bidirectional driving. BACKGROUND
[0002] Wind power generation has realized large-scale and high-quality development, and its installed capacity is still expanding, and its proportion in the power system is becoming higher and higher. However, since the wind farm site selection is mostly located in the area with relatively poor natural environment, in the data storage or transmission process, the extreme weather, unstable signal, hardware failure of sensors or other monitoring equipment can all cause interruption in data collection, resulting in a certain degree of damage to the completeness of the collected wind power time series and the adequacy of the data, which directly affects the decision-making in power generation evaluation, reliability analysis, operation and maintenance, technical improvement and retirement. Therefore, it is necessary to research the automatic repairing method of wind farm monitoring data, so as to ensure the safe and stable operation of the power system and provide complete and accurate data support for realizing intelligent operation of the power grid. In order to solve the above problems, the existing data repairing technology mainly relies on statistical methods and machine learning algorithms. Statistical methods usually perform interpolation or extrapolation based on the statistical characteristics of historical data, but its limitation is that it 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] The existing machine learning methods can be divided into two types: knowledge-driven methods and data-driven methods. The knowledge-driven model is based on expert experience to construct an experience feature set, which has been widely used in power system classification and load identification. However, according to the expert experience to construct and select features, and ensure the effectiveness of different types of feature combinations for load identification, classification and other practical application scenarios, a large amount of feature engineering work needs to be carried out, but the constructed and selected features cannot ensure the benefit of abnormal value repairing. The data-driven deep learning method processes the data by vectorizing the input image data or time series data, and maps the numerical vector of the input image data or time series data into an implicit combination feature vector form to capture potential information, without human intervention. However, when the data is missing or noisy, the deep learning method will reduce the model performance due to learning of feature vector combinations unrelated to the sample. When the number of training samples is insufficient or the samples are imbalanced, the data-driven deep learning method will over-train for a certain type of feature vector combination, which will cause the model to overfit. SUMMARY
[0004] In view of the above problems in the prior art, the application provides an electric energy meter abnormal data repairing method based on bidirectional driving of data and knowledge, and solves the problem of low repairing precision of wind farm electric energy meter data in the prior art.
[0005] To achieve the above-mentioned application purposes, the application adopts the technical scheme of an electric energy meter abnormal data repairing method based on bidirectional driving of data and knowledge, comprising the following steps:
[0006] S1, obtaining wind power time series data of a wind power plant, and performing normalization processing on the wind power time series data to obtain normalized wind power time series data;
[0007] S2, converting data values in the normalized wind power time series data into cosine values of angles, converting time stamps corresponding to the data values in the normalized wind power time series data into radii, and determining a vector set of data points in the normalized wind power time series data in a polar coordinate system according to the cosine values of angles and the radii;
[0008] S3, calculating a self-defined inner product of a first vector and a second vector in the vector set;
[0009] S4, determining a Gram angle field according to the self-defined inner product;
[0010] S5, determining total load, maximum value, minimum value, average value, standard deviation, skewness and kurtosis of the wind power time series data respectively according to the wind power time series data, and performing feature splicing on the total load, maximum value, minimum value, average value, standard deviation, skewness and kurtosis to obtain empirical features;
[0011] S6, constructing a double-channel feature extraction module, and performing feature extraction on the Gram angle field and the empirical features respectively through the double-channel feature extraction module to obtain data-driven features and knowledge-driven features respectively;
[0012] S7, constructing a joint training module, and processing the data-driven features and the knowledge-driven features using the joint training module to obtain sample labels corresponding to the wind power time series data;
[0013] The sample labels comprise abnormal data and normal data;
[0014] S8, repairing data of the wind power time series data with abnormal data using an abnormal data repairing module to obtain wind power time series repairing data.
[0015] The above-mentioned scheme has the following beneficial effects:
[0016] (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 longer time spans, 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 dependency information of time series data.
[0017] (2) The present invention combines the advantages of data-driven and knowledge-driven approaches, and improves the accuracy and efficiency of repairing wind farm electricity meter data through joint training, thereby providing more reliable data support for the intelligent operation and maintenance of wind farms.
[0018] Furthermore, in step S1, the calculation formula used for normalizing the wind power time series data is:
[0019]
[0020] in, Indicates the Normalized wind power time series data, represents wind power time series data, Indicates the length of wind power time series data, Indicates the Wind power time series data;
[0021] In step S2, the calculation formula for converting the data values in the normalized wind power time series data into the cosine value of the angle is:
[0022]
[0023] in, Indicates the The cosine value of the angle corresponding to the normalized wind power time series data is: Indicates the Normalized wind power time series data;
[0024] 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:
[0025]
[0026] in, Indicates the The radius corresponding to the normalized wind power time series data is: Indicates the a timestamp corresponding to the normalized wind power time series data, indicates the length of the wind power time series data;
[0027] In step S3, the calculation formula used by the self-defined inner product of the first vector and the second vector in the vector set is:
[0028]
[0029] wherein, indicates the self-defined inner product of the first vector and the second vector, indicates the first vector, indicates the second vector, indicates the included angle between the first vector and the second vector.
[0030] 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.
[0031] Further, in step S4, the calculation formula used by the Gram angle field determined according to the self-defined inner product is:
[0032]
[0033] wherein, indicates the Gram angle field, indicates the matrix composed of the self-defined inner product.
[0034] The beneficial effect of the above further scheme is that the Gram transformation method provides rich visual features and multi-dimensional information by converting one-dimensional time series data into two-dimensional image data, enhances the visualization effect of the data, and improves the performance and generalization ability of the model.
[0035] Further, in step S5, the calculation formulas used by the total load, maximum value, minimum value, average value, standard deviation, skewness and kurtosis of the wind power time series data respectively determined according to the wind power time series data are:
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043] 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 the Wind power time series data.
[0044] Furthermore, 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;
[0045] 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 set in parallel;
[0046] 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.
[0047] Furthermore, in step S7, the joint training module includes a deep part, a wide part, a feature splicing module and a training module;
[0048] The Deep part is a feedforward neural network, and the Wide part is a linear network.
[0049] The calculation formula for the Deep part is:
[0050]
[0051] 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;
[0052] The calculation formula for each layer of the neural network in the Deep part is:
[0053]
[0054] 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;
[0055] The loss function of the training module is:
[0056]
[0057] wherein, represents a sample label, represents a softmax function, represents an experience feature, represents a bias term, represents a weight vector of the Wide part, represents a weight vector of the Deep part, represents an activation function of the neural network.
[0058] The above further scheme has the beneficial effect that the joint training method and the improved LSTM model are introduced, further combining the generalization of the knowledge-driven model, the learning ability of the data-driven model, and the analysis ability of the LSTM on the time series data dependency information, and improving the accuracy of the electric energy meter abnormal data repair. BRIEF DESCRIPTION OF DRAWINGS
[0059] Figure 1 It is a flowchart of an electric energy meter abnormal data repair method based on bidirectional driving of data and knowledge.
[0060] Figure 2 It is a model structure diagram of an electric energy meter abnormal data repair method based on bidirectional driving of data and knowledge.
[0061] Figure 3 It is a structure diagram of a dual-channel feature extraction module.
[0062] Figure 4 It is a structure diagram of an LSTM. DETAILED DESCRIPTION
[0063] The present application will be further described below in conjunction with the drawings and specific embodiments.
[0064] As Figure 1 shown, an electric energy meter abnormal data repair method based on bidirectional driving of data and knowledge includes the following steps:
[0065] S1, wind power time series data of a wind power plant is obtained, and the wind power time series data is normalized to obtain normalized wind power time series data.
[0066] In this embodiment, the calculation formula used for normalizing the wind power time series data is:
[0067]
[0068] wherein, represents the i-th a normalized wind power time series data, representing wind power time series data, representing the length of the wind power time series data, representing the i-th normalized wind power time series data.
[0069] S2, converting the data value in the normalized wind power time series data into a cosine of an angle value, and converting the time stamp corresponding to the data value in the normalized wind power time series data into a radius size, and determining a vector set of the data point in the polar coordinate system according to the cosine of the angle value and the radius size.
[0070] In this embodiment, the calculation formula used for converting the data value in the normalized wind power time series data into a cosine of an angle value is:
[0071]
[0072] wherein, representing the cosine of an angle value corresponding to the i-th normalized wind power time series data, representing the i-th normalized wind power time series data;
[0073] The calculation formula used for converting the time stamp corresponding to the data value in the normalized wind power time series data into a radius size is:
[0074]
[0075] wherein, representing the radius size corresponding to the i-th normalized wind power time series data, representing the time stamp corresponding to the i-th normalized wind power time series data, representing the length of the wind power time series data. Exemplarily, in the polar coordinate system, each normalized wind power time series data contains two information, one is the normalized value of the data point, and the other is the time sequence position thereof. That is, the polar axis
[0076] retains the relationship of the wind power time series data in time, and the polar angle retains the relationship of the wind power time series data in the value at a certain time stamp.
[0077] S3, calculating a self-defined inner product of the first vector and the second vector in the vector set.
[0078] In the embodiment, the calculation formula used for calculating the self-defined inner product of the first vector and the second vector in the vector set is:
[0079]
[0080] wherein, represents the self-defined inner product of the first vector and the second vector, represents the first vector, represents the second vector, represents the included angle between the first vector and the second vector.
[0081] Exemplarily, if the length of the vector in the vector set is ignored, the inner product of the vector can be considered as the similarity of the two vectors, i.e., the correlation information of the different time stamp features. In the self-defined inner product calculation, the closer the two vectors are, the closer the inner product value is to 1, and vice versa.
[0082] S4, determining a Gram angle field according to the self-defined inner product.
[0083] In the embodiment, the calculation formula used for determining the Gram angle field according to the self-defined inner product is:
[0084]
[0085] wherein, represents the Gram angle field, represents a matrix composed of the self-defined inner product.
[0086] Exemplarily, the basic principle of the Gram angle 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 by the self-defined inner product with a penalty term to analyze the time correlation of different time points of the time series data, so as to improve the model performance while considering the model generalization. There are two implementation methods of the Gram transformation, the first one is GASF (Gram angle sum field), and the second one is GADF (Gram angle difference field).
[0087] In the Gram angle field, compared with the original one-dimensional time series data, the Gram angle field uses the self-defined inner product to convert the information of a certain time point into the correlation information of the information of the time point and the information of other time points. The calculation formula of the Gram angle difference field (GADF) can be:
[0088]
[0089] wherein, GADF represents the Gram angle difference field.
[0090] 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.
[0091] In this embodiment, 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:
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098]
[0099] 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 the Wind power time series data.
[0100] 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.
[0101] 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.
[0102] like Figure 2 As shown, Figure 2 This 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 2In one embodiment, a model structure of an electric energy meter abnormal data repairing method based on bidirectional driving of data and knowledge can include feature extraction (i.e., a double-channel feature extraction module), joint training, and abnormal data repairing.
[0103] As shown in Figure 3 , Figure 3 is a structural diagram of the double-channel feature extraction module. In Figure 3 , the double-channel feature extraction module includes two layers of convolutional neural networks, the convolution kernel size of the convolutional neural network is 5*5, the activation function of the convolutional neural network is a 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.
[0104] S7, a joint training module is constructed, and data-driven features and knowledge-driven features are processed using the joint training module to obtain sample labels corresponding to wind power time series data; the sample labels include abnormal data and normal data.
[0105] In this embodiment, the joint training module includes a Deep part, a Wide part, a feature splicing module, and a training module.
[0106] The Deep part is a feedforward neural network, and the Wide part is a linear network.
[0107] The calculation formula of the Deep part is:
[0108]
[0109] Among them, represents the recognition result of the Deep part, represents the data-driven feature, represents the model parameter of the Deep part, represents the bias of the Deep part.
[0110] The calculation formula of each layer of neural network in the Deep part is:
[0111]
[0112] Among them, represents the number of layers of neural network in the Deep part, represents the Relu activation function, respectively represent the activation, bias, and weight parameters of the layer neural network;
[0113] The loss function of the training module is:
[0114]
[0115] 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.
[0116] 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).
[0117] like Figure 4 As shown, Figure 4 This is a schematic diagram of the LSTM structure. Figure 4 In 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:
[0118] 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 , which is calculated as follows:
[0119]
[0120] in, W f and b f is the parameter of the forget gate, is the sigmoid function, [ h t-1 ,x t ] means to hide the state of the previous moment h t-1 and the input data at the current moment x t Vectors formed by stitching together.
[0121] The function of the forget gate is to determine the memory state of the previous momentc t-1 which information needs to be forgotten and which information needs to be retained. If f t the output is close to 0, it means that the information at the previous moment needs to be forgotten, and if it is close to 1, it means that the information at the previous moment needs to be retained.
[0122] Then, the input gate i t and the candidate memory state c t at the current moment are calculated. Among them, the input gate i t decides which information in the input data x t at the current moment needs to be retained, and its calculation formula is as follows:
[0123]
[0124] The calculation formula of the candidate memory state c t is as follows:
[0125]
[0126] Among them, W i and W c are the parameters of the input gate, b i and b c are the parameters of the candidate memory state, tanh and
[0127] The role of the input gate and the candidate memory state is to calculate a candidate memory state x t according to the input data t-1 and the hidden state h t at the previous moment, so as to determine which information needs to be retained and which information needs to be forgotten. c t
[0128] Finally, the output gate o t and the hidden state h t at the current moment are calculated. The output gate o t decides which information in the memory state c t at the current moment needs to be output, and its calculation formula is as follows:
[0129]
[0130] The hidden state at the current moment h t The calculation formula is as follows:
[0131]
[0132] in, represents element-wise multiplication, o t represents the output of the output gate, tanh ( c t ) indicates the value of the memory cell at the current moment tanh The result after activation function.
[0133] 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 ensemble training is that in the ensemble model, the individual models are trained separately without knowing each other, and their predictions are only combined during inference 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 during training. In addition, the joint training method also has an impact on the model size. For the ensemble training model, since the training sets are disjoint, the size of each individual model 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 ensemble 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 for the Wide part to include all valid features of the samples. In addition, joint training is achieved by backpropagating the gradient from the output to the Wide and Deep parts of the model using mini-batch stochastic optimization.
[0134] 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.
[0135] 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 it should be understood that the scope of protection of the present invention is not limited to such specific descriptions and embodiments. Those skilled in the art can make various other specific variations and combinations based on the technical teachings disclosed in the present invention without departing from the essence of the present invention, and such variations and combinations are still within the scope of protection 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, converting the timestamps corresponding to the data values in the normalized wind power time series data into radius sizes, and determining a vector set of the data points in the normalized wind power time series data in a polar coordinate system based on the angle cosine values and the radius sizes; S3. Calculate 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 customized inner product; S5. Determine the total load, maximum value, minimum value, average value, standard deviation, skewness, and kurtosis of the wind power time series data respectively based on the wind power time series data, and perform feature concatenation 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. Construct a dual-channel feature extraction module, and extract features from the Gram angle field and the empirical features respectively through the dual-channel feature extraction module to obtain data-driven features and knowledge-driven features respectively; 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; 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 for 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; 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 step S1, the calculation formula used for normalizing the wind power time series data is: in, Indicates the Normalized wind power time series data, represents wind power time series data, Indicates the length of wind power time series data, Indicates the 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 The cosine value of the angle corresponding to the normalized wind power time series data is: Indicates the Normalized wind power time series data; The calculation formula for converting the timestamp corresponding to the data value in the normalized wind power time series data into the radius size is: in, Indicates the The radius corresponding to the normalized wind power time series data is: Indicates the The timestamp corresponding to the normalized wind power time series data, 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 based on 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 the Wind power time series data.
5. The method according to claim 1, wherein 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.
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