A project data abnormality early warning method and system for electric power construction

By performing clustering and screening, missing value filling and feature extraction on power construction data, combined with the prediction model of the weighted training data set, the problem of large data errors is solved and the accuracy of data prediction and anomaly warning is improved.

CN118332481BActive Publication Date: 2024-09-06JIANGXI POWER TRANSMISSION & TRANSFORMATION CONSTR CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410763766.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-09-06
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

In the existing technology, interference and abnormal conditions in data collection during the power construction process lead to large data errors, which affects the accuracy of data abnormality early warning.

Method used

By clustering and filtering initial power project data, missing value prediction filling, time series feature extraction, weighted training data set processing, and using preset prediction models for data prediction, real data is obtained for abnormal warning.

Benefits of technology

It effectively eliminates abnormal data with large errors, ensures data integrity and prediction accuracy, and improves the accuracy of data prediction and abnormal warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118332481B
    Figure CN118332481B
Patent Text Reader

Abstract

The present invention provides a method and system for abnormal warning of project data for electric power construction. The method comprises clustering and screening initial electric power project data; performing missing prediction on missing values ​​in the screened electric power project data; extracting and filling time series features of the electric power project data; identifying labels and assigning weights to training data sets; inputting the weighted training data set into a preset prediction model for training, inputting the feature data set into the trained preset prediction model for prediction output, obtaining the difference between the predicted data and the real electric power project data, and performing abnormal warning based on the difference. The present invention can eliminate abnormal data with large errors and large noises, and perform missing filling on the data to ensure the integrity of the data, thereby ensuring that the information contained in the data can be fully expressed when extracting data features, thereby improving the accuracy of data prediction, thereby improving the accuracy of abnormal warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data early warning, and in particular relates to a method and system for abnormal early warning of project data for electric power construction. Background Art

[0002] In the existing power construction process, the smart construction mode is usually adopted. In order to better supervise the entire process of power construction, it is necessary to obtain construction data from all aspects of the entire power construction process so as to supervise the entire construction process from a global perspective.

[0003] At the same time, in order to further control power construction, data anomaly warnings can be issued for project data during the construction process to control the risks in the power construction process in advance. In the existing technology, the existing power construction data is analyzed to predict the data at future times, and data anomaly warnings are issued through the predicted data. However, due to interference at the power construction site and abnormal conditions in the data collection process, there are large errors in the data itself, which leads to large noise and errors in the predicted data, thereby affecting the accuracy of subsequent abnormal warnings. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a method and system for early warning of abnormal project data for electric power construction, which are used to solve the technical problems in the prior art.

[0005] On the one hand, the present invention provides the following technical solution, a method for early warning of abnormal project data for electric power construction, comprising:

[0006] Acquire initial power project data, and perform clustering and screening processing on the initial power project data to obtain screened power project data;

[0007] Identify missing values ​​and missing value positions in the screened power project data, perform missing prediction on the missing values ​​in the screened power project data to obtain predicted filling values, and fill the predicted filling values ​​at the corresponding missing value positions to obtain filled power project data;

[0008] Extracting the time series features of the padded power project data to obtain a feature data set;

[0009] Obtaining a training data set, identifying labels and assigning weights to the training data set to obtain a weighted training data set;

[0010] Input the weighted training data set into a preset prediction model for training, input the feature data set into the trained preset prediction model for prediction output, so as to obtain prediction data, obtain the real power project data at the corresponding time, obtain the difference between the prediction data and the real power project data, and perform abnormal warning based on the difference;

[0011] The step of performing missing prediction on the missing values ​​in the screened power project data to obtain predicted filling values ​​comprises:

[0012] Acquire the attribute variable set of the screened power project data, and perform sampling processing on the attribute variable set in turn to obtain the attribute variable extraction set ,in, Indicates that 2 attribute variables are extracted from the attribute variable set each time, and a total of The obtained subset set is Indicates that 3 attribute variables are extracted from the attribute variable set each time, and a total of The obtained subset set is Indicates that each time in the attribute variable set A total of attribute variables are extracted The obtained subset set is Indicates the number of attribute variables in the attribute variable set;

[0013] Input each subset set in the attribute variable extraction set into the missing prediction model for training and testing to obtain the prediction accuracy of each subset in each subset set, arrange the prediction accuracy of each subset in each subset set in descending order and select the first several subsets as the missing prediction set;

[0014] The missing prediction set is input into the missing prediction model to perform missing prediction to obtain a number of initial prediction filling values, and the prediction filling values ​​are determined based on the prediction accuracy and the initial prediction filling values. :

[0015] ;

[0016] In the formula, Indicates Initial prediction fill value, Indicates The prediction accuracy corresponding to the initial prediction filling value.

[0017] Furthermore, the step of clustering and screening the initial power project data to obtain screened power project data includes:

[0018] The neighbor range is determined with each data point in the initial power project data as the center and the preset neighbor distance as the radius, and the neighbor density of each data point is calculated based on the neighbor range of each data point :

[0019] ;

[0020] In the formula, For the The number of data points corresponding to the neighborhood range of each data point;

[0021] Calculate the The range density of the neighbor range corresponding to the data point :

[0022] ;

[0023] In the formula, Indicates The data point corresponds to the Neighbor density of each data point;

[0024] Based on the neighbor density of each data point And the range density of the neighbor range corresponding to each data point Determine the density difference for each data point :

[0025] ;

[0026] Based on the density difference of each data point The range density of the neighbor range corresponding to each data point Determine the density transition rate for each data point :

[0027] ;

[0028] Initial clustering is performed on the initial power project data to obtain a plurality of clusters, and density clustering is performed on the data points in the clusters to obtain screened power project data.

[0029] Furthermore, the steps of performing initial clustering on the initial power project data to obtain a plurality of clusters, and performing density clustering on the data points in the clusters to obtain the screened power project data include:

[0030] The data points in the initial power project data are divided into Group and Select data points as the first cluster center, calculate the cluster distance between each data point and the first cluster center, assign each data point to the first distance center with the closest distance based on the cluster distance, and iteratively update the first cluster center to obtain a number of clusters;

[0031] Based on the density transition rate of each data point Determine the density threshold corresponding to each data point in the cluster , based on the density threshold Determine the adaptive neighbor radius of each data point in the cluster :

[0032] ;

[0033] In the formula, Indicates the cluster The number of data points corresponding to the neighbor range of each data point. Indicates the cluster The neighbor density of a data point is Indicates setting the neighbor range radius. Indicates the number of data points in the cluster;

[0034] Select a reference data point in the cluster, calculate the density distance between the reference data point and the remaining data points in the cluster, and if the density distance is not less than the density threshold , then the reference data point is taken as the center and the adaptive neighbor range radius is Determine a density neighbor range, store all data points in the density neighbor range corresponding to the reference data point in a density clustering cluster, iteratively perform density clustering on the remaining data points in the clustering cluster, and remove data points not stored in the density clustering cluster to obtain screened power project data.

[0035] Furthermore, the step of extracting the time series features of the padded power project data to obtain a feature data set includes:

[0036] Performing dimensionality reduction processing on the padded power project data to obtain a number of dimensionality reduction vectors, and performing sequence feature extraction on the dimensionality reduction vectors to obtain sequence features;

[0037] The first vector in the dimension reduction vector is converted into a first conversion vector through a conversion network and transform the remaining vector into the second transformed vector , generating a time feature weight based on the first conversion vector and the second conversion vector :

[0038] ;

[0039] In the formula, Indicates a second transformation vector;

[0040] Based on the dimension reduction vector and the time feature weight Determine time characteristics :

[0041] ;

[0042] ;

[0043] ;

[0044] ;

[0045] In the formula, Represents the first vectors;

[0046] The sequence features With the time characteristics Perform splicing and fusion processing to obtain a feature data set.

[0047] Furthermore, the step of performing dimensionality reduction processing on the padded power project data to obtain a plurality of dimensionality reduction vectors, and extracting sequence features from the dimensionality reduction vectors to obtain sequence features comprises:

[0048] The infill power project data is subjected to dimensionality reduction processing to obtain a number of dimensionality reduction vectors, each attribute variable in the dimensionality reduction vector is used as a data node, and the association distance between any two data nodes is calculated :

[0049] ;

[0050] In the formula, , Respectively represent , Attribute variables corresponding to data nodes;

[0051] Select the associated distance The largest front data nodes as neighbor data nodes, and determine the association matrix based on the neighbor data nodes :

[0052] ;

[0053] In the formula, Represents the incidence matrix Middle Line The elements of the column, Indicates The neighbor data node and The correlation distance between data nodes, represents the indicator function;

[0054] Calculate the , The connection matrix between data nodes :

[0055] ;

[0056] In the formula, Represents the connection matrix Middle Line The elements of the column, Indicates , The sampling probability between data nodes, Indicates , The sampling probability between data nodes, represents the neighbor data node, Indicates Gaussian noise of data nodes, No. Gaussian noise of data nodes, represents the Gaussian smoothing coefficient;

[0057] The connection matrix With the correlation matrix Fusion is performed to obtain the fusion matrix , based on the fusion matrix Get sequence features :

[0058] ;

[0059] In the formula, , are the first and second activation functions respectively, Represents the fusion matrix Middle Line The elements of the column, Represents the fusion matrix Middle Elements of a column.

[0060] Furthermore, the step of identifying labels and assigning weights to the training data set to obtain a weighted training data set includes:

[0061] Setting a sliding window in the training data set and moving backward with a step size each time to obtain a plurality of sets of window data;

[0062] Obtain label information in the window data, and determine label authenticity based on the label information :

[0063] ;

[0064] In the formula, , Respectively represent The number of true labels and blank labels in a sliding window, Indicates The number of tags in the sliding window, Represents the sample category of the training data set;

[0065] Determine sample training factors based on training phase :

[0066] ;

[0067] In the formula, Indicates The drift value of the group window data, Indicates the current training stage;

[0068] Based on the training factor Calculate training weights :

[0069] ;

[0070] Based on the training weights Determine the weighted training dataset :

[0071] ;

[0072] In the formula, Indicates Group window data.

[0073] The present invention also provides the following technical solution, a project data abnormality early warning system for electric power construction, the system comprising:

[0074] A screening module is used to obtain initial power project data and perform clustering and screening processing on the initial power project data to obtain screened power project data;

[0075] A filling module is used to identify missing values ​​and missing value positions in the screened power project data, perform missing prediction on the missing values ​​in the screened power project data to obtain predicted filling values, and fill the predicted filling values ​​at the corresponding missing value positions to obtain filled power project data;

[0076] An extraction module, used for extracting the time series features of the padded power project data to obtain a feature data set;

[0077] An identification module is used to obtain a training data set, identify labels and assign weights to the training data set to obtain a weighted training data set;

[0078] An early warning module is used to input the weighted training data set into a preset prediction model for training, input the feature data set into the trained preset prediction model for prediction output, so as to obtain prediction data, obtain the real power project data at the corresponding time, obtain the difference between the prediction data and the real power project data, and issue an abnormal early warning based on the difference;

[0079] The filling module includes:

[0080] A sampling submodule is used to obtain the attribute variable set of the screened power project data, and to perform sampling processing on the attribute variable set in turn to obtain an attribute variable extraction set ,in, Indicates that 2 attribute variables are extracted from the attribute variable set each time, and a total of The obtained subset set is Indicates that 3 attribute variables are extracted from the attribute variable set each time, and a total of The obtained subset set is Indicates that each time in the attribute variable set A total of attribute variables are extracted The obtained subset set is Indicates the number of attribute variables in the attribute variable set;

[0081] A missing prediction submodule is used to input each subset set in the attribute variable extraction set into the missing prediction model for training and testing to obtain the prediction accuracy of each subset in each subset set, arrange the prediction accuracy of each subset in each subset set in descending order and select the first several subsets as the missing prediction set;

[0082] The filling submodule is used to input the missing prediction set into the missing prediction model to perform missing prediction to obtain a number of initial prediction filling values, and determine the prediction filling value based on the prediction accuracy and the initial prediction filling value :

[0083] ;

[0084] In the formula, Indicates Initial prediction fill value, Indicates The prediction accuracy corresponding to the initial prediction filling value.

[0085] The present invention also proposes a readable storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned project data abnormality early warning method for power construction is implemented.

[0086] The present invention also proposes a computer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned project data abnormality warning method for power construction when executing the computer program.

[0087] The present invention provides a method and system for abnormal warning of project data for power construction. First, the data is clustered and screened to eliminate abnormal data with large errors and noise, while also avoiding the situation where a large number of outliers are generated when facing high-dimensional non-uniform data. Secondly, the missing data is filled to ensure the integrity of the data, thereby ensuring that the information contained in the data can be fully expressed when extracting data features, ensuring the accuracy of the filled values ​​and improving the filling efficiency, thereby ensuring the accuracy of subsequent data predictions. Thereafter, the training data is weighted to avoid the problem of low prediction accuracy caused by the imbalance between test data and training data, thereby ensuring the effectiveness of the training samples. Finally, the data is predicted through the model to improve the accuracy of data prediction, thereby improving the accuracy of abnormal warnings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0089] Figure 1 A flowchart of a method for early warning of abnormal project data for electric power construction provided in Embodiment 1 of the present invention;

[0090] Figure 2 A structural block diagram of a project data abnormality early warning system for electric power construction provided in Embodiment 2 of the present invention;

[0091] Figure 3 A schematic diagram of the hardware structure of a computer provided in another embodiment of the present invention.

[0092] The embodiments of the present invention will be further described below with reference to the accompanying drawings. DETAILED DESCRIPTION

[0093] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.

[0094] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0095] In the first embodiment of the present invention, please refer to Figure 1 , a project data abnormality early warning method for power construction, comprising:

[0096] S1. Acquire initial power project data, and perform clustering and screening processing on the initial power project data to obtain screened power project data;

[0097] Wherein, the step S1 comprises:

[0098] S11, determining a neighbor range with each data point in the initial power project data as the center and a preset neighbor distance as the radius, and calculating a neighbor density of each data point based on the neighbor range of each data point :

[0099] ;

[0100] In the formula, For the The number of data points corresponding to the neighborhood range.

[0101] S12, calculate the The range density of the neighbor range corresponding to the data point :

[0102] ;

[0103] In the formula, Indicates The data point corresponds to the Neighbor density of each data point;

[0104] Specifically, the range density calculated in this step specifically refers to the average density within the neighborhood range corresponding to a data point.

[0105] S13, based on the neighbor density of each data point And the range density of the neighbor range corresponding to each data point Determine the density difference for each data point :

[0106] ;

[0107] Specifically, the density difference here is specifically the density standard deviation.

[0108] S14, based on the density difference of each data point The range density of the neighbor range corresponding to each data point Determine the density transition rate for each data point :

[0109] ;

[0110] Specifically, the density transition rate here specifically reflects the density change speed of each data point, and the change speed occurs within the neighborhood range corresponding to the data point.

[0111] S15, performing initial clustering on the initial power project data to obtain a plurality of clusters, and performing density clustering on the data points in the clusters to obtain screened power project data;

[0112] Specifically, step S15 includes:

[0113] S151, dividing the data points in the initial power project data into Group and Select data points as the first cluster center, calculate the cluster distance between each data point and the first cluster center, assign each data point to the first distance center with the closest distance based on the cluster distance, and iteratively update the first cluster center to obtain a number of clusters;

[0114] Specifically, the clustering process expressed in step S151 is specifically a K clustering process.

[0115] S152, density conversion rate based on each data point Determine the density threshold corresponding to each data point in the cluster , based on the density threshold Determine the adaptive neighbor radius of each data point in the cluster :

[0116] ;

[0117] In the formula, Indicates the cluster The number of data points corresponding to the neighbor range of each data point. Indicates the cluster The neighbor density of a data point is Indicates setting the neighbor range radius. Indicates the number of data points in the cluster;

[0118] Specifically, in the process of determining the density threshold, the density conversion rate of each data point in the cluster is determined, and the density conversion rate is inversely proportional to the density threshold. In the actual process, it can be determined according to the maximum, minimum and mean values ​​of the density conversion rates of all data points. If the density conversion rate of a data point is close to the maximum value of the density conversion rate, the density threshold can be set to 2. If the density conversion rate of a data point is close to the mean value of the density conversion rate, the density threshold can be set to 4. If the density conversion rate of a data point is close to the minimum value of the density conversion rate, the density threshold can be set to 6.

[0119] S153, selecting a reference data point in the cluster, calculating the density distance between the reference data point and the remaining data points in the cluster, and if the density distance is not less than the density threshold , then the reference data point is taken as the center and the adaptive neighbor range radius is Determine a density neighbor range, and store all data points in the density neighbor range corresponding to the reference data point into a density clustering cluster, iteratively perform density clustering on the remaining data points in the clustering cluster, and remove the data points not stored in the density clustering cluster to obtain screened power project data;

[0120] Specifically, in the above steps, the data is first clustered initially to obtain several clusters, and then the data in each cluster is density clustered iteratively. In the clustering process, the adaptive density threshold and adaptive neighbor range are adjusted to solve the problem of uneven density of high-dimensional data and fully remove interference data.

[0121] S2, identifying missing values ​​and missing value positions in the screened power project data, performing missing prediction on the missing values ​​in the screened power project data to obtain predicted filling values, and filling the predicted filling values ​​at the corresponding missing value positions to obtain filled power project data;

[0122] Specifically, due to problems with the data acquisition equipment, installation location, etc., as well as the removal of abnormal data in the above steps, there will be several missing values ​​in the screened power project data, which will lead to incomplete and discontinuous data sequences. Therefore, in order to improve the accuracy of the prediction, it is necessary to predict the data at the missing value position based on the existing data and fill it in accordingly, so as to obtain complete and continuous filled power data.

[0123] Wherein, the step S2 comprises:

[0124] S21, obtaining the attribute variable set of the screened power project data, and performing sampling processing on the attribute variable set in sequence to obtain the attribute variable extraction set ,in, Indicates that 2 attribute variables are extracted from the attribute variable set each time, and a total of The obtained subset set is Indicates that 3 attribute variables are extracted from the attribute variable set each time, and a total of The obtained subset set is Indicates that each time in the attribute variable set A total of attribute variables are extracted The obtained subset set is Indicates the number of attribute variables in the attribute variable set;

[0125] Specifically, assume that there are t attribute variables in the attribute variable set, so for the subset set In terms of random sampling, two attribute variables are selected each time from K sub-attribute variables, and according to the sampling probability, in the subset set Existence Subsets, similarly, for the subset set In terms of random sampling, three attribute variables are selected each time from K sub-attribute variables, and according to the sampling probability, in the subset set Existence subsets, so when the last extraction is performed, all attribute variables are extracted, so the sampling obtains t-1 subset sets, and there are There are 2~t attribute variables in each subset.

[0126] S22, inputting each subset set in the attribute variable extraction set into the missing prediction model for training and testing to obtain the prediction accuracy of each subset in each subset set, arranging the prediction accuracy of each subset in each subset set in descending order and selecting the first several subsets as the missing prediction set;

[0127] Specifically, after training and testing, the model will output the corresponding prediction value. For the subset set, it contains too many attribute variables. Therefore, in order to ensure the accuracy of the prediction, the mean square error of the model prediction output is used as the prediction accuracy of the model. The larger the mean square error, the smaller the prediction accuracy, and vice versa. Therefore, after obtaining the prediction accuracy of each subset, they are arranged from large to small, and the first t-1 subsets are selected as the missing prediction set according to the number of subsets.

[0128] S23, inputting the missing prediction set into the missing prediction model to perform missing prediction to obtain a number of initial prediction filling values, and determining the prediction filling value based on the prediction accuracy and the initial prediction filling value :

[0129] ;

[0130] In the formula, Indicates Initial prediction fill value, Indicates The prediction accuracy corresponding to the initial prediction filling value;

[0131] Specifically, the missing prediction model is the GAIN model. By filling in the predicted fill-in values, all relationships around the missing values ​​can be fully considered, which helps to improve the accuracy of the filling results. It can also effectively fill in multivariate missing data at the same time, greatly improving the filling efficiency. The filling reduces the attribute dimension of the data set and reduces the dependence on the data.

[0132] S3, extracting the time series features of the padded power project data to obtain a feature data set;

[0133] Wherein, the step S3 comprises:

[0134] S31, performing dimensionality reduction processing on the padded power project data to obtain a number of dimensionality reduction vectors, and performing sequence feature extraction on the dimensionality reduction vectors to obtain sequence features;

[0135] Wherein, the step S31 includes:

[0136] S311, performing dimensionality reduction processing on the infilled power project data to obtain a number of dimensionality reduction vectors, taking each attribute variable in the dimensionality reduction vector as a data node, and calculating the association distance between any two data nodes :

[0137] ;

[0138] In the formula, , Respectively represent , Attribute variables corresponding to data nodes;

[0139] Specifically, the association distance can be used to reflect the similarity between two data nodes.

[0140] S312, select the associated distance The largest front data nodes as neighbor data nodes, and determine the association matrix based on the neighbor data nodes :

[0141] ;

[0142] In the formula, Represents the incidence matrix Middle Line The elements of the column, Indicates The neighbor data node and The correlation distance between data nodes, represents the indicator function;

[0143] Specifically, the association matrix can be used to represent a directed graph composed of all data nodes.

[0144] S313, calculate the , The connection matrix between data nodes :

[0145] ;

[0146] In the formula, Represents the connection matrix Middle Line The elements of the column, Indicates , The sampling probability between data nodes, Indicates , The sampling probability between data nodes, represents the neighbor data node, Indicates Gaussian noise of data nodes, No. Gaussian noise of data nodes, represents the Gaussian smoothing coefficient;

[0147] Specifically, the connection matrix can be used to represent the connection relationship between two data nodes, which corresponds to the connection edge in the directed graph.

[0148] S314, the connection matrix With the correlation matrix Fusion is performed to obtain the fusion matrix , based on the fusion matrix Get sequence features :

[0149] ;

[0150] In the formula, , are the first and second activation functions respectively, Represents the fusion matrix Middle Line The elements of the column, Represents the fusion matrix Middle Elements of a column;

[0151] Specifically, the first activation function is a softmax function, and the second activation function is a LeakyReLU function.

[0152] S32: convert the first vector in the dimension reduction vector into a first conversion vector through a conversion network. and transform the remaining vector into the second transformed vector , generating a time feature weight based on the first conversion vector and the second conversion vector :

[0153] ;

[0154] In the formula, Indicates a second transformation vector;

[0155] Specifically, the first conversion vector here is specifically a query vector, and the second conversion vector is specifically a key vector.

[0156] S33, based on the dimension reduction vector and the time feature weight Determine time characteristics :

[0157] ;

[0158] ;

[0159] ;

[0160] ;

[0161] In the formula, Represents the first vectors;

[0162] Specifically, after adding the time feature weight, the time feature fully contains the time information of the data.

[0163] S34, the sequence features With the time characteristics Perform splicing and fusion processing to obtain a feature data set;

[0164] Specifically, firstly, the sequence features With the time characteristics The splicing is performed to obtain a splicing vector, and then the sequence information contained in the splicing vector is fused with the time information through the spatiotemporal feature fuser to obtain a fused feature. Then, the position information of each sequence is embedded in the fused feature as an embedding vector through the encoder, and after passing through the Transformer encoder, the feature data set can be output.

[0165] S4, obtaining a training data set, identifying labels and assigning weights to the training data set to obtain a weighted training data set;

[0166] Wherein, the step S4 comprises:

[0167] S41, setting a sliding window in the training data set and moving backward with a step size each time to obtain several groups of window data.

[0168] S42: Obtain label information in the window data, and determine label authenticity based on the label information :

[0169] ;

[0170] In the formula, , Respectively represent The number of true labels and blank labels in a sliding window, Indicates The number of tags in the sliding window, Represents the sample category of the training dataset.

[0171] S43, determining sample training factors based on training phase :

[0172] ;

[0173] In the formula, Indicates The drift value of the group window data, Indicates the current training stage.

[0174] S44, based on the training factor Calculate training weights :

[0175] .

[0176] S45, based on the training weight Determine the weighted training dataset :

[0177] ;

[0178] In the formula, Indicates Group window data.

[0179] Specifically, by processing the training samples through the above steps, samples that are difficult to classify and samples in the minority class can obtain more training opportunities, thereby further improving the accuracy of the model after training.

[0180] S5, inputting the weighted training data set into a preset prediction model for training, inputting the feature data set into the trained preset prediction model for prediction output, so as to obtain prediction data, obtain the real power project data at the corresponding time, obtain the difference between the prediction data and the real power project data, and perform abnormal warning based on the difference;

[0181] Specifically, in the present application, the preset prediction model is a BP neural network prediction model, and the weighted training data set is input into the preset prediction model for training. After the training is completed, the prediction data is obtained, and then the real power project data at the corresponding moment is obtained. Assuming that the current moment is moment J, it is necessary to obtain the power project data before moment J as test data and the real power project data at moment J. After the test data is processed through the above steps, it is input into the trained model for prediction data, and the prediction data of moment J, moment J+1, moment J+2, etc. can be obtained. The difference between the prediction data at moment J and the real power project data at moment J is calculated. If the difference is greater than the preset threshold, the data can be warned.

[0182] The method for abnormal warning of project data for power construction provided in the first embodiment of the present invention first clusters and screens the data, and can eliminate abnormal data with large errors and noise, while also avoiding the situation where a large number of outliers are generated in the face of high-dimensional non-uniform data. Secondly, the missing data are filled to ensure the integrity of the data, and then to ensure that the information contained in the data can be fully expressed when extracting data features, to ensure the accuracy of the filled values ​​and to improve the filling efficiency, thereby ensuring the accuracy of subsequent data predictions, and then weighting the training data to avoid the problem of low prediction accuracy caused by the imbalance between test data and training data, thereby ensuring the effectiveness of the training samples, and finally performing data prediction through the model to improve the accuracy of data prediction, thereby improving the accuracy of abnormal warnings.

[0183] Embodiment 2

[0184] See also Figure 2 In a second embodiment of the present invention, a project data abnormality early warning system for electric power construction is provided, the system comprising:

[0185] Screening module 1, used for acquiring initial power project data, and performing clustering and screening processing on the initial power project data to obtain screened power project data;

[0186] Filling module 2 is used to identify missing values ​​and missing value positions in the screened power project data, perform missing prediction on the missing values ​​in the screened power project data to obtain predicted filling values, and fill the predicted filling values ​​at the corresponding missing value positions to obtain filled power project data;

[0187] Extraction module 3, used to extract the time series characteristics of the padded power project data to obtain a characteristic data set;

[0188] Identification module 4, used to obtain a training data set, identify labels and assign weights to the training data set to obtain a weighted training data set;

[0189] The early warning module 5 is used to input the weighted training data set into the preset prediction model for training, input the feature data set into the trained preset prediction model for prediction output, so as to obtain prediction data, obtain the real power project data at the corresponding time, obtain the difference between the prediction data and the real power project data, and perform abnormal warning based on the difference.

[0190] The screening module 1 comprises:

[0191] The first density calculation submodule is used to determine the neighbor range with each data point in the initial power project data as the center and the preset neighbor distance as the radius, and calculate the neighbor density of each data point based on the neighbor range of each data point :

[0192] ;

[0193] In the formula, For the The number of data points corresponding to the neighborhood range of each data point;

[0194] The second density calculation submodule is used to calculate the The range density of the neighbor range corresponding to the data point :

[0195] ;

[0196] In the formula, Indicates The data point corresponds to the Neighbor density of each data point;

[0197] The difference calculation submodule is used to calculate the neighbor density of each data point And the range density of the neighbor range corresponding to each data point Determine the density difference for each data point :

[0198] ;

[0199] The conversion rate calculation submodule is used to calculate the density difference based on each data point. The range density of the neighbor range corresponding to each data point Determine the density transition rate for each data point :

[0200] ;

[0201] The clustering submodule is used to perform initial clustering on the initial power project data to obtain a plurality of clusters, and to perform density clustering on the data points in the clusters to obtain screened power project data.

[0202] The clustering submodule includes:

[0203] The first clustering unit is used to divide the data points in the initial power project data into Group and Select data points as the first cluster center, calculate the cluster distance between each data point and the first cluster center, assign each data point to the first distance center with the closest distance based on the cluster distance, and iteratively update the first cluster center to obtain a number of clusters;

[0204] Radius determination unit for density transition rate based on each data point Determine the density threshold corresponding to each data point in the cluster , based on the density threshold Determine the adaptive neighbor radius of each data point in the cluster :

[0205] ;

[0206] In the formula, Indicates the cluster The number of data points corresponding to the neighbor range of each data point. Indicates the cluster The neighbor density of a data point is Indicates setting the neighbor range radius. Indicates the number of data points in the cluster;

[0207] The second clustering unit is used to select a reference data point in the cluster, calculate the density distance between the reference data point and the remaining data points in the cluster, and if the density distance is not less than the density threshold , then the reference data point is taken as the center and the adaptive neighbor range radius is Determine a density neighbor range, store all data points in the density neighbor range corresponding to the reference data point in a density clustering cluster, iteratively perform density clustering on the remaining data points in the clustering cluster, and remove data points not stored in the density clustering cluster to obtain screened power project data.

[0208] The filling module 2 comprises:

[0209] A sampling submodule is used to obtain the attribute variable set of the screened power project data, and to perform sampling processing on the attribute variable set in turn to obtain an attribute variable extraction set ,in, Indicates that 2 attribute variables are extracted from the attribute variable set each time, and a total of The obtained subset set is Indicates that 3 attribute variables are extracted from the attribute variable set each time, and a total of The obtained subset set is Indicates that each time in the attribute variable set A total of attribute variables are extracted The obtained subset set is Indicates the number of attribute variables in the attribute variable set;

[0210] A missing prediction submodule is used to input each subset set in the attribute variable extraction set into the missing prediction model for training and testing to obtain the prediction accuracy of each subset in each subset set, arrange the prediction accuracy of each subset in each subset set in descending order and select the first several subsets as the missing prediction set;

[0211] The filling submodule is used to input the missing prediction set into the missing prediction model to perform missing prediction to obtain a number of initial prediction filling values, and determine the prediction filling value based on the prediction accuracy and the initial prediction filling value :

[0212] ;

[0213] In the formula, Indicates Initial prediction fill value, Indicates The prediction accuracy corresponding to the initial prediction filling value.

[0214] The extraction module 3 comprises:

[0215] The first feature submodule is used to perform dimensionality reduction processing on the padded power project data to obtain a number of dimensionality reduction vectors, and perform sequence feature extraction on the dimensionality reduction vectors to obtain sequence features;

[0216] A time weight submodule, used to convert the first vector in the dimension reduction vector into a first conversion vector through a conversion network and transform the remaining vector into the second transformed vector , generating a time feature weight based on the first conversion vector and the second conversion vector :

[0217] ;

[0218] In the formula, Indicates a second transformation vector;

[0219] The second feature submodule is used to calculate the time feature weight based on the dimension reduction vector and the time feature weight. Determine time characteristics :

[0220] ;

[0221] ;

[0222] ;

[0223] ;

[0224] In the formula, Represents the first vectors;

[0225] Fusion submodule, used to transform the sequence features With the time characteristics Perform splicing and fusion processing to obtain a feature data set.

[0226] The first feature submodule includes:

[0227] A distance unit is used to perform dimensionality reduction processing on the infill power project data to obtain a number of dimensionality reduction vectors, take each attribute variable in the dimensionality reduction vector as a data node, and calculate the association distance between any two data nodes :

[0228] ;

[0229] In the formula, , Respectively represent , Attribute variables corresponding to data nodes;

[0230] The first matrix unit is used to select the associated distance The largest front data nodes as neighbor data nodes, and determine the association matrix based on the neighbor data nodes :

[0231] ;

[0232] In the formula, Represents the incidence matrix Middle Line The elements of the column, Indicates The neighbor data node and The correlation distance between data nodes, represents the indicator function;

[0233] The second matrix unit is used to calculate the , The connection matrix between data nodes :

[0234] ;

[0235] In the formula, Represents the connection matrix Middle Line The elements of the column, Indicates , The sampling probability between data nodes, Indicates , The sampling probability between data nodes, represents the neighbor data node, Indicates Gaussian noise of data nodes, No. Gaussian noise of data nodes, represents the Gaussian smoothing coefficient;

[0236] A fusion unit is used to transform the connection matrix With the correlation matrix Fusion is performed to obtain the fusion matrix , based on the fusion matrix Get sequence features :

[0237] ;

[0238] In the formula, , are the first and second activation functions respectively, Represents the fusion matrix Middle Line The elements of the column, Represents the fusion matrix Middle Elements of a column.

[0239] The identification module 4 comprises:

[0240] A window submodule, used for setting a sliding window in the training data set and moving backward by one step each time to obtain a plurality of sets of window data;

[0241] The authenticity submodule is used to obtain the label information in the window data and determine the label authenticity based on the label information. :

[0242] ;

[0243] In the formula, , Respectively represent The number of true labels and blank labels in a sliding window, Indicates The number of tags in the sliding window, Represents the sample category of the training data set;

[0244] Factor calculation submodule, used to determine sample training factors based on the training phase :

[0245] ;

[0246] In the formula, Indicates The drift value of the group window data, Indicates the current training stage;

[0247] A training weight submodule is used to train a weight based on the training factor Calculate training weights :

[0248] ;

[0249] A weighted submodule for training weights based on the Determine the weighted training dataset :

[0250] ;

[0251] In the formula, Indicates Group window data.

[0252] The present invention also provides a computer, see Figure 3 , shown is a computer in the third embodiment of the present invention, including a memory 10, a processor 20, and a computer program 30 stored in the memory 10 and executable on the processor 20. When the processor 20 executes the computer program 30, the above-mentioned project data abnormality early warning method for power construction is implemented.

[0253] The memory 10 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10 may be an internal storage unit of a computer, such as a hard disk of the computer. In other embodiments, the memory 10 may also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. Further, the memory 10 may also include both an internal storage unit of the computer and an external storage device. The memory 10 may be used not only to store application software and various types of data installed in the computer, but also to temporarily store data that has been output or is to be output.

[0254] Among them, in some embodiments, the processor 20 can be an electronic control unit (Electronic Control Unit, abbreviated as ECU, also known as a vehicle computer), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run the program code stored in the memory 10 or process data, such as executing access restriction programs, etc.

[0255] It should be pointed out that Figure 3 The structure shown does not constitute a limitation on the computer. In other embodiments, the computer may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0256] The embodiment of the present invention further provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned project data abnormality early warning method for electric power construction.

[0257] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0258] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0259] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

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

[0261] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A project data abnormality early warning method for electric power construction, characterized in that: include: Acquire initial power project data, and perform clustering and screening processing on the initial power project data to obtain screened power project data; Identify missing values ​​and missing value positions in the screened power project data, perform missing prediction on the missing values ​​in the screened power project data to obtain predicted filling values, and fill the predicted filling values ​​at the corresponding missing value positions to obtain filled power project data; Extracting the time series features of the padded power project data to obtain a feature data set; Obtaining a training data set, identifying labels and assigning weights to the training data set to obtain a weighted training data set; Input the weighted training data set into a preset prediction model for training, input the feature data set into the trained preset prediction model for prediction output, so as to obtain prediction data, obtain the real power project data at the corresponding time, obtain the difference between the prediction data and the real power project data, and perform abnormal warning based on the difference; The step of performing missing prediction on the missing values ​​in the screened power project data to obtain predicted filling values ​​comprises: Acquire the attribute variable set of the screened power project data, and perform sampling processing on the attribute variable set in turn to obtain the attribute variable extraction set ,in, Indicates that 2 attribute variables are extracted from the attribute variable set each time, and a total of The obtained subset set is Indicates that 3 attribute variables are extracted from the attribute variable set each time, and a total of The obtained subset set is Indicates that each time in the attribute variable set A total of attribute variables are extracted The obtained subset set is Indicates the number of attribute variables in the attribute variable set; Input each subset set in the attribute variable extraction set into the missing prediction model for training and testing to obtain the prediction accuracy of each subset in each subset set, arrange the prediction accuracy of each subset in each subset set in descending order and select the first several subsets as the missing prediction set; The missing prediction set is input into the missing prediction model to perform missing prediction to obtain a number of initial prediction filling values, and the prediction filling values ​​are determined based on the prediction accuracy and the initial prediction filling values. : ; In the formula, Indicates Initial prediction fill value, Indicates The prediction accuracy corresponding to the initial prediction filling value; The step of extracting the time series features of the padded power project data to obtain a feature data set includes: Performing dimensionality reduction processing on the padded power project data to obtain a number of dimensionality reduction vectors, and performing sequence feature extraction on the dimensionality reduction vectors to obtain sequence features; The first vector in the dimension reduction vector is converted into a first conversion vector through a conversion network and transform the remaining vector into the second transformed vector , generating a time feature weight based on the first conversion vector and the second conversion vector : ; In the formula, Indicates a second transformation vector; Based on the dimension reduction vector and the time feature weight Determine time characteristics : ; ; ; ; In the formula, Represents the first vectors; The sequence features With the time characteristics Perform splicing and fusion processing to obtain a feature data set; The step of performing dimensionality reduction processing on the padded power project data to obtain a plurality of dimensionality reduction vectors, and extracting sequence features from the dimensionality reduction vectors to obtain sequence features comprises: The infill power project data is subjected to dimensionality reduction processing to obtain a number of dimensionality reduction vectors, each attribute variable in the dimensionality reduction vector is used as a data node, and the association distance between any two data nodes is calculated : ; In the formula, , Respectively represent , Attribute variables corresponding to data nodes; Select the associated distance The largest front data nodes as neighbor data nodes, and determine the association matrix based on the neighbor data nodes : ; In the formula, Represents the incidence matrix Middle Line The elements of the column, Indicates The neighbor data node and The correlation distance between data nodes, represents the indicator function; Calculate the , The connection matrix between data nodes : ; In the formula, Represents the connection matrix Middle Line The elements of the column, Indicates , The sampling probability between data nodes, Indicates , The sampling probability between data nodes, represents the neighbor data node, Indicates Gaussian noise of data nodes, No. Gaussian noise of data nodes, represents the Gaussian smoothing coefficient; The connection matrix With the correlation matrix Fusion is performed to obtain the fusion matrix , based on the fusion matrix Get sequence features : ; In the formula, , are the first and second activation functions respectively, Represents the fusion matrix Middle Line The elements of the column, Represents the fusion matrix Middle Elements of a column; The step of identifying labels and assigning weights to the training data set to obtain a weighted training data set includes: Setting a sliding window in the training data set and moving backward with a step size each time to obtain a plurality of sets of window data; Obtain label information in the window data, and determine label authenticity based on the label information : ; In the formula, , Respectively represent The number of true labels and blank labels in a sliding window, Indicates The number of tags in the sliding window, Represents the sample category of the training data set; Determine sample training factors based on training phase : ; In the formula, Indicates The drift value of the group window data, Indicates the current training stage; Based on the training factor Calculate training weights : ; Based on the training weights Determine the weighted training dataset : ; In the formula, Indicates Group window data.

2. The project data abnormality early warning method for electric power construction according to claim 1 is characterized in that: The step of clustering and screening the initial power project data to obtain screened power project data comprises: The neighbor range is determined with each data point in the initial power project data as the center and the preset neighbor distance as the radius, and the neighbor density of each data point is calculated based on the neighbor range of each data point : ; In the formula, For the The number of data points corresponding to the neighborhood range of each data point; Calculate the The range density of the neighbor range corresponding to the data point : ; In the formula, Indicates The data point corresponds to the Neighbor density of each data point; Based on the neighbor density of each data point And the range density of the neighbor range corresponding to each data point Determine the density difference for each data point : ; Based on the density difference of each data point The range density of the neighbor range corresponding to each data point Determine the density transition rate for each data point : ; Initial clustering is performed on the initial power project data to obtain a plurality of clusters, and density clustering is performed on the data points in the clusters to obtain screened power project data.

3. The project data abnormality early warning method for electric power construction according to claim 2 is characterized in that: The steps of performing initial clustering on the initial power project data to obtain a plurality of clusters, and performing density clustering on the data points in the clusters to obtain the screened power project data include: The data points in the initial power project data are divided into Group and Select data points as the first cluster center, calculate the cluster distance between each data point and the first cluster center, assign each data point to the first distance center with the closest distance based on the cluster distance, and iteratively update the first cluster center to obtain a number of clusters; Based on the density transition rate of each data point Determine the density threshold corresponding to each data point in the cluster , based on the density threshold Determine the adaptive neighbor radius of each data point in the cluster : ; In the formula, Indicates the cluster The number of data points corresponding to the neighbor range of each data point. Indicates the cluster The neighbor density of a data point is Indicates setting the neighbor range radius. Indicates the number of data points in the cluster; Select a reference data point in the cluster, calculate the density distance between the reference data point and the remaining data points in the cluster, and if the density distance is not less than the density threshold , then the reference data point is taken as the center and the adaptive neighbor range radius is Determine a density neighbor range, store all data points in the density neighbor range corresponding to the reference data point in a density clustering cluster, iteratively perform density clustering on the remaining data points in the clustering cluster, and remove data points not stored in the density clustering cluster to obtain screened power project data.

4. A project data abnormality early warning system for electric power construction, the system adopts the project data abnormality early warning method for electric power construction according to claim 1, characterized in that: The system comprises: A screening module, used for acquiring initial power project data, and performing clustering and screening processing on the initial power project data to obtain screened power project data; A filling module is used to identify missing values ​​and missing value positions in the screened power project data, perform missing prediction on the missing values ​​in the screened power project data to obtain predicted filling values, and fill the predicted filling values ​​at the corresponding missing value positions to obtain filled power project data; An extraction module, used for extracting the time series features of the padded power project data to obtain a feature data set; An identification module is used to obtain a training data set, identify labels and assign weights to the training data set to obtain a weighted training data set; An early warning module is used to input the weighted training data set into a preset prediction model for training, input the feature data set into the trained preset prediction model for prediction output, so as to obtain prediction data, obtain the real power project data at the corresponding time, obtain the difference between the prediction data and the real power project data, and issue an abnormal early warning based on the difference; The filling module includes: A sampling submodule is used to obtain the attribute variable set of the screened power project data, and to perform sampling processing on the attribute variable set in turn to obtain an attribute variable extraction set ,in, Indicates that 2 attribute variables are extracted from the attribute variable set each time, and a total of The obtained subset set is Indicates that 3 attribute variables are extracted from the attribute variable set each time, and a total of The obtained subset set is Indicates that each time in the attribute variable set A total of attribute variables are extracted The obtained subset set is Indicates the number of attribute variables in the attribute variable set; A missing prediction submodule is used to input each subset set in the attribute variable extraction set into the missing prediction model for training and testing to obtain the prediction accuracy of each subset in each subset set, arrange the prediction accuracy of each subset in each subset set in descending order and select the first several subsets as the missing prediction set; The filling submodule is used to input the missing prediction set into the missing prediction model to perform missing prediction to obtain a number of initial prediction filling values, and determine the prediction filling value based on the prediction accuracy and the initial prediction filling value : ; In the formula, Indicates Initial prediction fill value, Indicates The prediction accuracy corresponding to the initial prediction filling value.

5. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the project data abnormality early warning method for power construction as described in any one of claims 1 to 3 is implemented.

6. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the project data abnormality early warning method for power construction as described in any one of claims 1 to 3 is implemented.