CN116777305A - Power data quality improving method and device, electronic equipment and storage medium - Google Patents

Power data quality improving method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116777305A
CN116777305A CN202311040926.9A CN202311040926A CN116777305A CN 116777305 A CN116777305 A CN 116777305A CN 202311040926 A CN202311040926 A CN 202311040926A CN 116777305 A CN116777305 A CN 116777305A
Authority
CN
China
Prior art keywords
power sequence
data
time
real
abnormal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311040926.9A
Other languages
Chinese (zh)
Other versions
CN116777305B (en
Inventor
王兆辉
陈明
曾令康
刘林青
刁首人
底寅龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hebei Siji Technology Co ltd
Original Assignee
Hebei Siji Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hebei Siji Technology Co ltd filed Critical Hebei Siji Technology Co ltd
Priority to CN202311040926.9A priority Critical patent/CN116777305B/en
Publication of CN116777305A publication Critical patent/CN116777305A/en
Application granted granted Critical
Publication of CN116777305B publication Critical patent/CN116777305B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The application is suitable for the technical field of power data processing, and provides a power data quality improving method, a device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a historical power sequence in a first time period, and inputting the historical power sequence into a pre-established prediction model to obtain a predicted power sequence in a second time period; acquiring a real-time power sequence in a second time period, and determining abnormal data in the real-time power sequence and abnormal attributes corresponding to the abnormal data according to the real-time power sequence and the predicted power sequence; and correcting the abnormal data based on the abnormal attribute, the predicted power sequence and the historical power sequence corresponding to the abnormal data to obtain a corrected real-time power sequence. The method and the device can accurately and timely detect the abnormal data in the real-time power sequence, accurately and effectively correct the abnormal data, improve the data quality and reduce the influence on the stable and reliable operation of the power system.

Description

Power data quality improving method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of power data processing, in particular to a power data quality improving method and device, electronic equipment and a storage medium.
Background
With the continuous development of smart grids, the number and scale of power equipment in a power system are continuously enlarged, and the power equipment generates massive power data for interactive transmission. And the accurate collection and transmission of mass power data have important significance for the stable and reliable operation of the power system.
In the related art, in the process of collecting and transmitting power data, due to uncontrollable factors such as equipment failure, transmission channel interference, network transmission abnormality and the like, abnormal conditions such as data errors, data loss and the like may exist, so that the data quality is difficult to ensure, and the stable and reliable operation of a power system is further influenced. Therefore, how to detect and correct abnormal data and improve the data quality becomes an urgent problem to be solved.
Disclosure of Invention
In view of the above, the embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for improving the quality of electric power data, so as to solve the technical problem of poor data quality caused by abnormal data conditions in the process of collecting and transmitting electric power data in the related art.
In a first aspect, an embodiment of the present application provides a method for improving power data quality, including: acquiring a historical power sequence in a first time period, and inputting the historical power sequence into a pre-established prediction model to obtain a predicted power sequence in a second time period; inputting a power sequence in one time period by a pre-established prediction model, and outputting a predicted power sequence in another time period; acquiring a real-time power sequence in a second time period, and determining abnormal data in the real-time power sequence and abnormal attributes corresponding to the abnormal data according to the real-time power sequence and the predicted power sequence; and correcting the abnormal data based on the abnormal attribute, the predicted power sequence and the historical power sequence corresponding to the abnormal data to obtain a corrected real-time power sequence.
In a possible implementation manner of the first aspect, the exception attribute includes a data error and a data miss; determining abnormal data in the real-time power sequence and abnormal attributes corresponding to the abnormal data according to the real-time power sequence and the predicted power sequence, wherein the determining comprises the following steps: comparing the real-time power sequence with the predicted power sequence based on each time instant within the second time period; based on the comparison result, real-time data exceeding a preset threshold range in the real-time power sequence is determined to be first abnormal data compared with predicted data at corresponding moments in the predicted power sequence; the abnormal attribute corresponding to the first abnormal data is a data error; comparing the data which are most adjacent to the missing real-time data in the real-time power sequence with the predicted data at the corresponding moment in the predicted power sequence, and determining the data which are most adjacent to the missing real-time data as second abnormal data; the abnormal attribute corresponding to the second abnormal data is data missing.
In a possible implementation manner of the first aspect, correcting the abnormal data based on the abnormal attribute, the predicted power sequence and the historical power sequence corresponding to the abnormal data to obtain a corrected real-time power sequence includes: when the abnormal attribute corresponding to the abnormal data is data missing, based on a second moment corresponding to the second abnormal data, carrying out average value calculation on a predicted data segment corresponding to the second moment in the predicted power sequence and a historical data segment corresponding to the second moment in the historical power sequence to obtain an average data segment; carrying out mean value calculation and variance calculation on the average data segment to obtain a first mean value and a first variance; carrying out mean value calculation and variance calculation on the real-time power sequence to obtain a second mean value and a second variance; and correcting the missing real-time data according to the first mean value, the first variance, the second mean value, the second variance and the average data segment to obtain a second correction result, and obtaining a corrected real-time power sequence according to the second correction result and the real-time power sequence.
In a possible implementation manner of the first aspect, correcting the missing real-time data according to the first mean, the first variance, the second mean, the second variance and the average data segment to obtain a second correction result includes: according to the expression:
determining a second correction result->
In the method, in the process of the invention,for the first mean>For the second mean>For the first variance>For the second variance>Is the average data segment.
In a possible implementation manner of the first aspect, correcting the abnormal data based on the abnormal attribute, the predicted power sequence and the historical power sequence corresponding to the abnormal data to obtain a corrected real-time power sequence includes: when the abnormal attribute corresponding to the abnormal data is data error, multiplying the predicted data corresponding to the first time in the predicted power sequence by corresponding first weight based on the first time corresponding to the first abnormal data to obtain a first weighted result, and multiplying the historical data corresponding to the first time in the historical power sequence by corresponding second weight to obtain a second weighted result; and correcting the first abnormal data according to the first weighting result and the second weighting result to obtain a first correction result, and obtaining a corrected real-time power sequence according to the first correction result and the real-time power sequence.
In a possible implementation manner of the first aspect, the pre-established prediction model includes a plurality of sub-prediction models; wherein, one sub-prediction model corresponds to one class of power sequence, and each sub-prediction model inputs the power sequence of the corresponding class in one time period and outputs the predicted power sequence of the corresponding class in the other time period; acquiring a historical power sequence in a first time period, inputting the historical power sequence into a pre-established prediction model, and obtaining a predicted power sequence in a second time period, wherein the method comprises the following steps of: acquiring a historical power sequence and a category corresponding to the historical power sequence in a first time period, and determining a sub-prediction model corresponding to the prediction model according to the category corresponding to the historical power sequence; and inputting the historical power sequences into the corresponding sub-prediction models according to the categories to obtain the predicted power sequences in the second time period.
In a possible implementation manner of the first aspect, the power data quality improving method further includes: if the first abnormal data and the second abnormal data are not existed in the real-time power sequence based on the comparison result, the real-time power sequence is judged to be normal.
In a second aspect, an embodiment of the present application provides a device for improving power data quality, including:
The acquisition module is used for acquiring a historical power sequence in a first time period, inputting the historical power sequence into a pre-established prediction model and obtaining a predicted power sequence in a second time period; the pre-established predictive model inputs a power sequence over one period of time and outputs a predicted power sequence over another period of time.
The determining module is used for acquiring the real-time power sequence in the second time period, and determining abnormal data in the real-time power sequence and abnormal attributes corresponding to the abnormal data according to the real-time power sequence and the predicted power sequence.
And the correction module is used for correcting the abnormal data based on the abnormal attribute, the predicted power sequence and the historical power sequence corresponding to the abnormal data to obtain a corrected real-time power sequence.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program executable on the processor, and the processor implements the power data quality improvement method according to any one of the first aspects when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium storing a computer program, which when executed by a processor implements the power data quality improvement method according to any one of the first aspects.
In a fifth aspect, an embodiment of the application provides a computer program product, which when run on an electronic device, causes the electronic device to perform the power data quality improvement method of any of the first aspects described above.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
According to the power data quality improving method, the device, the electronic equipment and the storage medium, the historical power sequence in the first time period is obtained, and the historical power sequence is input into the pre-established prediction model to obtain the predicted power sequence in the second time period, so that the abnormal data in the real-time power sequence and the abnormal attribute corresponding to the abnormal data are determined according to the real-time power sequence and the predicted power sequence in the second time period, the abnormal data are corrected based on the abnormal attribute corresponding to the abnormal data, the predicted power sequence and the historical power sequence, the corrected real-time power sequence is obtained, the abnormal data in the real-time power sequence can be accurately and timely detected, the abnormal data can be accurately and effectively corrected, the data quality is improved, and the influence on the stable and reliable operation of the power system is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for improving the quality of power data according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a power data quality improvement device according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be more clearly described with reference to the following examples. The following examples will assist those skilled in the art in further understanding the function of the present application, but are not intended to limit the application in any way. It should be noted that variations and modifications could be made by those skilled in the art without departing from the inventive concept. These are all within the scope of the present application.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
In the description of the present specification and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Furthermore, references to "a plurality of" in embodiments of the present application should be interpreted as two or more.
Fig. 1 is a flowchart of a method for improving quality of electric power data according to an embodiment of the application. As shown in fig. 1, the method in the embodiment of the present application may include:
step 101, acquiring a historical power sequence in a first time period, and inputting the historical power sequence into a pre-established prediction model to obtain a predicted power sequence in a second time period.
Wherein, the power sequence in one period of time is input into the pre-established prediction model, and the predicted power sequence in the other period of time is output. The above-described period of time may be a historical period of time and the above-described other period of time may be a real-time period of time.
The first period of time in this embodiment is a historical period of time, for example, a period of time of one month before today, and the second period of time is a real-time period of time, for example, a period of time of one day from the current time. The first period of time is earlier in time than the second period of time.
In one possible implementation, the pre-established prediction model includes a plurality of sub-prediction models; one sub-prediction model corresponds to one class of power sequences, and each sub-prediction model inputs the power sequences of the corresponding class in one time period and outputs the predicted power sequences of the corresponding class in the other time period.
In this embodiment, the historical power sequence and the category corresponding to the historical power sequence in the first period may be obtained, the corresponding sub-prediction model in the prediction model is determined according to the category corresponding to the historical power sequence, and the historical power sequence is input into the corresponding sub-prediction model according to the category, so as to obtain the predicted power sequence in the second period.
For example, in this embodiment, the types of the power sequences may be divided according to physical properties of the power sequences, for example, the types may include voltage, resistance, temperature, and the like, or may be divided according to collection sources of the power sequences, for example, the types may include a first device, a second device, a third device, and the like, and the types of the power sequences may be divided according to actual needs, which is not limited specifically herein.
Alternatively, the prediction model in this embodiment may be constructed based on a neural network, for example, the neural network may be a back propagation neural network (Back Propagation Neural Network, BPNN) or the like. When the prediction model is constructed, training is carried out on each sub-neural network according to the training sample set of each category, and then each trained sub-neural network is used as each sub-prediction model, and each sub-prediction model forms the prediction model. Each training sample set comprises a plurality of training samples of the same category, each training sample is historical power data in a period of time, and a label corresponding to each training sample is power data in another period of time corresponding to the historical power data. Wherein the time period is temporally earlier than the other time period.
For example, in the present embodiment, when training the corresponding sub-neural network according to each training sample set, the training samples are input into the corresponding sub-neural network, and the predicted power data of another period of time is output. Calculating a loss value according to the predicted power data and the label, when the loss value is smaller than a preset loss threshold value, completing training, taking the trained sub-neural network as a sub-prediction model, and when the loss value is larger than or equal to the preset loss threshold value, repeating the step of training the sub-neural network until the training is completed.
In this embodiment, training is performed on the sub-neural network according to training sample sets of different types to obtain sub-prediction models corresponding to the power sequences of each type, so that the historical power sequences can be input into the corresponding sub-prediction models according to the types of the historical power sequences, and the corresponding predicted power sequences can be obtained more accurately.
Step 102, acquiring a real-time power sequence in a second time period, and determining abnormal data in the real-time power sequence and abnormal attributes corresponding to the abnormal data according to the real-time power sequence and the predicted power sequence.
Wherein the exception attributes may include data errors and data deletions.
In one possible implementation manner, when determining the abnormal data and the abnormal attribute corresponding to the abnormal data, the embodiment may compare the real-time power sequence with the predicted power sequence based on each time in the second time period; based on the comparison result, real-time data exceeding a preset threshold range in the real-time power sequence is determined to be first abnormal data compared with predicted data at corresponding moments in the predicted power sequence; the abnormal attribute corresponding to the first abnormal data is a data error; comparing the data which are most adjacent to the missing real-time data in the real-time power sequence with the predicted data at the corresponding moment in the predicted power sequence, and determining the data which are most adjacent to the missing real-time data as second abnormal data; the abnormal attribute corresponding to the second abnormal data is data missing.
In this embodiment, the real-time data corresponding to each time in the second period of time and the predicted data in the predicted power sequence are compared in numerical values, for example, the real-time data and the predicted data at the corresponding time may be differenced, the real-time data corresponding to the difference value exceeding the preset threshold range is determined to be the first abnormal data, and the corresponding abnormal attribute is a data error. The preset threshold range can be set according to requirements, and different types of power sequences correspond to different preset threshold ranges.
Optionally, in this embodiment, the real-time power sequence is further compared with the predicted data corresponding to each time in the second time period, and it is determined that, in the real-time power sequence, the data most adjacent to the missing real-time data is second abnormal data, and the corresponding abnormal attribute is missing, where the data most adjacent to the missing real-time data is usually two data, and possibly also is one data. For example, if it is determined that the 8 th to 14 th real-time data are missing in the real-time power sequence, the 7 th real-time data and the 15 th real-time data are the most adjacent data to the missing real-time data, that is, the 7 th real-time data and the 15 th real-time data are the second abnormal data. For another example, if it is determined that the 1 st to 4 th real-time data are missing in the real-time power sequence, it is determined that the 5 th real-time data are the most adjacent data to the missing real-time data, and only one second abnormal data exists at this time.
It should be noted that, in one real-time power sequence, there may be a plurality of first abnormal data, a plurality of second abnormal data, and both the first abnormal data and the second abnormal data.
Optionally, in this embodiment, if it is determined, based on the comparison result, that the first abnormal data and the second abnormal data do not exist in the real-time power sequence, it is determined that the real-time power sequence is normal.
In this embodiment, the real-time power sequence is compared with the predicted power sequence, so that abnormal data in the real-time power sequence can be timely and accurately found, and abnormal attributes corresponding to the abnormal data can be determined.
And 103, correcting the abnormal data based on the abnormal attribute, the predicted power sequence and the historical power sequence corresponding to the abnormal data to obtain a corrected real-time power sequence.
In one possible implementation, the embodiment may include A1 to A4 when correcting the abnormal data and obtaining the corrected real-time power sequence.
A1, when the abnormal attribute corresponding to the abnormal data is data missing, based on a second moment corresponding to the second abnormal data, carrying out average calculation on a predicted data segment corresponding to the second moment in the predicted power sequence and a historical data segment corresponding to the second moment in the historical power sequence to obtain an average data segment.
And A2, carrying out mean value calculation and variance calculation on the average data segment to obtain a first mean value and a first variance.
And A3, carrying out mean value calculation and variance calculation on the real-time power sequence to obtain a second mean value and a second variance.
And A4, correcting the missing real-time data according to the first mean value, the first variance, the second mean value, the second variance and the average data segment to obtain a second correction result, and obtaining a corrected real-time power sequence according to the second correction result and the real-time power sequence.
As an example, from the foregoing, the second abnormal data may be two or one. When there are two second abnormal data, there are two corresponding second moments, and in this embodiment, a data segment between the two second moments in the predicted power sequence is defined as a predicted data segment, and it should be noted that the predicted data segment does not include predicted data corresponding to the two second moments. When the second abnormal data is one, the corresponding second time is also one, in this embodiment, based on the missing real-time data, a data segment between the first predicted data and the predicted data corresponding to the second time in the predicted power sequence is defined as a predicted data segment, or a data segment between the predicted data corresponding to the second time and the last predicted data in the predicted power sequence is defined as a predicted data segment, where the predicted data segment does not include the predicted data corresponding to the second time.
Similarly, the implementation process of determining the historical data segment corresponding to the second time in the historical power sequence in this embodiment may refer to the implementation process of determining the predicted data segment corresponding to the second time in the predicted power sequence, which is not described herein.
It should be noted that, as can be seen from the foregoing, the first period may be, for example, a period of one month before today, and the second period may be, for example, a period of one day from the current time, and then the historical power sequence may correspondingly determine historical data periods corresponding to the plurality of second moments. In the embodiment, when the average value of the predicted data segment and the historical data segment is calculated, the average value of the predicted data segment and the historical data segments is calculated according to the corresponding time, so that the average data segment is obtained.
Optionally, in this embodiment, correcting the missing real-time data according to the first mean, the first variance, the second mean, the second variance and the average data segment to obtain a second correction result includes:
according to the expression:
determining a second correction result->
In the method, in the process of the invention,for the first mean>For the second mean>For the first variance>For the second variance>Is the average data segment.
It should be noted that, if there are multiple second abnormal data in one real-time power sequence in this embodiment, the missing real-time data corresponding to each second abnormal data is corrected to obtain corresponding second correction results, and further, the corrected real-time power sequence is obtained according to each second correction result and the real-time power sequence.
In one possible implementation manner, the embodiment may further include B1 to B2 when correcting the abnormal data to obtain the corrected real-time power sequence.
And B1, when the abnormal attribute corresponding to the abnormal data is data error, multiplying the predicted data corresponding to the first time in the predicted power sequence by corresponding first weight based on the first time corresponding to the first abnormal data to obtain a first weighted result, and multiplying the historical data corresponding to the first time in the historical power sequence by corresponding second weight to obtain a second weighted result.
And B2, correcting the first abnormal data according to the first weighting result and the second weighting result to obtain a first correction result, and obtaining a corrected real-time power sequence according to the first correction result and the real-time power sequence.
Alternatively, as can be seen from the foregoing, in this embodiment, the first period may be, for example, a period of one month before the present day, and the second period may be, for example, a period of one day from the present time, and the historical power sequence may correspondingly determine the historical data corresponding to the first plurality of times, and correspondingly, the second weight may correspondingly be a plurality of the historical data. In this embodiment, each history data is multiplied by a corresponding second weight, and then added to obtain a second weighted result. The first weight and the second weight may be set according to specific needs, and are not limited in particular.
Illustratively, correcting the first abnormal data according to the first weighted result and the second weighted result to obtain a first corrected result, including:
according to the expression:
determining a first correction result->
In the method, in the process of the invention,for prediction data, ++>For the first weight, ++>For the first weighting result, +.>Is the firstnPersonal calendarThe history data is used to determine the history of the user,is the firstnSecond weight, ++>Is the second weighted result, wherein +.>,/>Determining according to the number of historical data in the historical power sequence, wherein +.>
It should be noted that, if there are multiple first abnormal data in one real-time power sequence in this embodiment, each first abnormal data is corrected to obtain each corresponding first correction result, and then the corrected real-time power sequence is obtained according to each first correction result and the real-time power sequence.
In addition, if the first abnormal data and the second abnormal data exist in one real-time power sequence in the embodiment, the first abnormal data is corrected first, and then the second abnormal data is corrected based on the real-time power sequence corrected by the first abnormal data, so as to obtain a corrected real-time power sequence.
In this embodiment, for abnormal data with different abnormal attributes, such as data errors or data deletions, different methods are used to correct the abnormal data, so that the abnormal data can be more accurately and effectively corrected, a corrected real-time power sequence is obtained, and the data quality is improved.
According to the power data quality improving method provided by the embodiment of the application, the historical power sequence in the first time period is obtained, and the historical power sequence is input into the pre-established prediction model to obtain the predicted power sequence in the second time period, so that the abnormal data in the real-time power sequence and the abnormal attribute corresponding to the abnormal data are determined according to the real-time power sequence and the predicted power sequence in the second time period, the abnormal data is corrected based on the abnormal attribute corresponding to the abnormal data, the predicted power sequence and the historical power sequence, the corrected real-time power sequence is obtained, the abnormal data in the real-time power sequence can be accurately and timely detected, the abnormal data can be accurately and effectively corrected, the data quality is improved, and the influence on the stable and reliable operation of the power system is reduced.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Fig. 2 is a schematic structural diagram of an apparatus for improving quality of electric power data according to an embodiment of the application. As shown in fig. 2, the power data quality improving apparatus provided in this embodiment may include: an acquisition module 201, a determination module 202 and a correction module 203.
The obtaining module 201 is configured to obtain a historical power sequence in a first period, and input the historical power sequence into a pre-established prediction model to obtain a predicted power sequence in a second period; the pre-established predictive model inputs a power sequence over one period of time and outputs a predicted power sequence over another period of time.
The determining module 202 is configured to obtain the real-time power sequence in the second period, and determine the abnormal data in the real-time power sequence and the abnormal attribute corresponding to the abnormal data according to the real-time power sequence and the predicted power sequence.
And the correction module 203 is configured to correct the abnormal data based on the abnormal attribute, the predicted power sequence and the historical power sequence corresponding to the abnormal data, and obtain a corrected real-time power sequence.
Optionally, the exception attribute includes a data error and a data miss; the determining module 202 is specifically configured to: comparing the real-time power sequence with the predicted power sequence based on each time instant within the second time period;
based on the comparison result, real-time data exceeding a preset threshold range in the real-time power sequence is determined to be first abnormal data compared with predicted data at corresponding moments in the predicted power sequence; the abnormal attribute corresponding to the first abnormal data is a data error;
Comparing the data which are most adjacent to the missing real-time data in the real-time power sequence with the predicted data at the corresponding moment in the predicted power sequence, and determining the data which are most adjacent to the missing real-time data as second abnormal data; the abnormal attribute corresponding to the second abnormal data is data missing.
Optionally, the correction module 203 is specifically configured to: when the abnormal attribute corresponding to the abnormal data is data missing, based on a second moment corresponding to the second abnormal data, carrying out average value calculation on a predicted data segment corresponding to the second moment in the predicted power sequence and a historical data segment corresponding to the second moment in the historical power sequence to obtain an average data segment;
carrying out mean value calculation and variance calculation on the average data segment to obtain a first mean value and a first variance;
carrying out mean value calculation and variance calculation on the real-time power sequence to obtain a second mean value and a second variance;
and correcting the missing real-time data according to the first mean value, the first variance, the second mean value, the second variance and the average data segment to obtain a second correction result, and obtaining a corrected real-time power sequence according to the second correction result and the real-time power sequence.
Optionally, the correction module 203 is further specifically configured to: according to the expression:
determining a second correction result- >
In the method, in the process of the invention,for the first mean>For the second mean>For the first variance>For the second variance>Is the average data segment.
Optionally, the correction module 203 is further specifically configured to: when the abnormal attribute corresponding to the abnormal data is data error, multiplying the predicted data corresponding to the first time in the predicted power sequence by corresponding first weight based on the first time corresponding to the first abnormal data to obtain a first weighted result, and multiplying the historical data corresponding to the first time in the historical power sequence by corresponding second weight to obtain a second weighted result;
and correcting the first abnormal data according to the first weighting result and the second weighting result to obtain a first correction result, and obtaining a corrected real-time power sequence according to the first correction result and the real-time power sequence.
Optionally, the pre-established prediction model includes a plurality of sub-prediction models; wherein, one sub-prediction model corresponds to one class of power sequence, and each sub-prediction model inputs the power sequence of the corresponding class in one time period and outputs the predicted power sequence of the corresponding class in the other time period; the obtaining module 201 is specifically configured to: acquiring a historical power sequence and a category corresponding to the historical power sequence in a first time period, and determining a sub-prediction model corresponding to the prediction model according to the category corresponding to the historical power sequence;
And inputting the historical power sequences into the corresponding sub-prediction models according to the categories to obtain the predicted power sequences in the second time period.
Optionally, the determining module 202 is further configured to: and determining that the real-time power sequence is normal when the first abnormal data and the second abnormal data are not present in the real-time power sequence based on the comparison result.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 3, the electronic apparatus 300 of this embodiment includes: a processor 310, a memory 320, and a computer program 321 executable on the processor 310 is stored in the memory 320. The steps of any of the various method embodiments described above, such as steps 101 through 103 shown in fig. 1, are implemented when the processor 310 executes the computer program 321. Alternatively, the processor 310, when executing the computer program 321, performs the functions of the modules/units in the above-described apparatus embodiments, for example, the functions of the modules 201 to 203 shown in fig. 2.
By way of example, the computer program 321 may be partitioned into one or more modules/units that are stored in the memory 320 and executed by the processor 310 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used to describe the execution of the computer program 321 in the electronic device 300.
It will be appreciated by those skilled in the art that fig. 3 is merely an example of an electronic device and is not limiting of an electronic device and may include more or fewer components than shown, or may combine certain components, or different components, such as input-output devices, network access devices, buses, etc.
The processor 310 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 320 may be an internal storage unit of the electronic device, for example, a hard disk or a memory of the electronic device, or an external storage device of the electronic device, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the electronic device. The memory 320 may also include both internal storage units and external storage devices of the electronic device. The memory 320 is used to store computer programs and other programs and data required by the electronic device. The memory 320 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. For example, the apparatus/electronic device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (10)

1. A method for improving the quality of power data, comprising:
acquiring a historical power sequence in a first time period, and inputting the historical power sequence into a pre-established prediction model to obtain a predicted power sequence in a second time period; the pre-established prediction model inputs a power sequence in one time period and outputs a predicted power sequence in another time period;
acquiring a real-time power sequence in the second time period, and determining abnormal data in the real-time power sequence and abnormal attributes corresponding to the abnormal data according to the real-time power sequence and the predicted power sequence;
And correcting the abnormal data based on the abnormal attribute, the predicted power sequence and the historical power sequence corresponding to the abnormal data to obtain a corrected real-time power sequence.
2. The power data quality improvement method according to claim 1, characterized in that said abnormal attributes include data errors and data deletions;
the determining, according to the real-time power sequence and the predicted power sequence, abnormal data in the real-time power sequence and abnormal attributes corresponding to the abnormal data includes:
comparing the real-time power sequence with the predicted power sequence based on each time instant within the second time period;
based on a comparison result, real-time data exceeding a preset threshold range in the real-time power sequence is determined to be first abnormal data compared with predicted data at corresponding moments in the predicted power sequence; the abnormal attribute corresponding to the first abnormal data is a data error;
comparing the most adjacent data of the missing real-time data in the real-time power sequence with the predicted data at the corresponding moment in the predicted power sequence, and determining the most adjacent data of the missing real-time data as second abnormal data; and the abnormal attribute corresponding to the second abnormal data is data missing.
3. The method of claim 2, wherein the correcting the abnormal data based on the abnormal attribute corresponding to the abnormal data, the predicted power sequence and the historical power sequence to obtain the corrected real-time power sequence includes:
when the abnormal attribute corresponding to the abnormal data is data missing, based on a second moment corresponding to the second abnormal data, carrying out average value calculation on a predicted data segment corresponding to the second moment in the predicted power sequence and a historical data segment corresponding to the second moment in the historical power sequence to obtain an average data segment;
carrying out mean value calculation and variance calculation on the average data segment to obtain a first mean value and a first variance;
performing mean value calculation and variance calculation on the real-time power sequence to obtain a second mean value and a second variance;
correcting the missing real-time data according to the first mean value, the first variance, the second mean value, the second variance and the average data segment to obtain a second correction result, and obtaining a corrected real-time power sequence according to the second correction result and the real-time power sequence.
4. The method of claim 3, wherein the correcting missing real-time data according to the first mean, the first variance, the second mean, the second variance, and the average data segment to obtain the second correction result comprises:
according to the expression:
determining a second correction result->
In the method, in the process of the invention,for the first mean>For the second mean>For the first variance>For the second variance>Is the average data segment.
5. The method of claim 2, wherein the correcting the abnormal data based on the abnormal attribute corresponding to the abnormal data, the predicted power sequence and the historical power sequence to obtain the corrected real-time power sequence includes:
when the abnormal attribute corresponding to the abnormal data is data error, multiplying the predicted data corresponding to the first time in the predicted power sequence by corresponding first weight based on the first time corresponding to the first abnormal data to obtain a first weighted result, and multiplying the historical data corresponding to the first time in the historical power sequence by corresponding second weight to obtain a second weighted result;
And correcting the first abnormal data according to the first weighted result and the second weighted result to obtain a first corrected result, and obtaining a corrected real-time power sequence according to the first corrected result and the real-time power sequence.
6. The power data quality improvement method according to any one of claims 1 to 5, characterized in that said pre-established prediction model includes a plurality of sub-prediction models; wherein, one sub-prediction model corresponds to one class of power sequence, and each sub-prediction model inputs the power sequence of the corresponding class in one time period and outputs the predicted power sequence of the corresponding class in the other time period;
the step of obtaining the historical power sequence in the first time period, inputting the historical power sequence into a pre-established prediction model to obtain a predicted power sequence in the second time period, and the step of obtaining the predicted power sequence comprises the following steps:
acquiring a historical power sequence in the first time period and a category corresponding to the historical power sequence, and determining a sub-prediction model corresponding to the prediction model according to the category corresponding to the historical power sequence;
and inputting the historical power sequences into corresponding sub-prediction models according to the categories to obtain the predicted power sequences in the second time period.
7. The power data quality improvement method according to claim 2, characterized in that the method further comprises:
and if the first abnormal data and the second abnormal data are not existed in the real-time power sequence based on the comparison result, judging that the real-time power sequence is normal.
8. An electrical data quality improvement apparatus, comprising:
the acquisition module is used for acquiring a historical power sequence in a first time period, inputting the historical power sequence into a pre-established prediction model and obtaining a predicted power sequence in a second time period; the pre-established prediction model inputs a power sequence in one time period and outputs a predicted power sequence in another time period;
the determining module is used for acquiring a real-time power sequence in the second time period, and determining abnormal data in the real-time power sequence and abnormal attributes corresponding to the abnormal data according to the real-time power sequence and the predicted power sequence;
and the correction module is used for correcting the abnormal data based on the abnormal attribute corresponding to the abnormal data, the predicted power sequence and the historical power sequence to obtain a corrected real-time power sequence.
9. An electronic device comprising a memory and a processor, the memory having stored therein a computer program executable on the processor, wherein the processor implements the power data quality improvement method of any of claims 1 to 7 when the computer program is executed by the processor.
10. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the power data quality improvement method according to any one of claims 1 to 7.
CN202311040926.9A 2023-08-18 2023-08-18 Power data quality improving method and device, electronic equipment and storage medium Active CN116777305B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311040926.9A CN116777305B (en) 2023-08-18 2023-08-18 Power data quality improving method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311040926.9A CN116777305B (en) 2023-08-18 2023-08-18 Power data quality improving method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116777305A true CN116777305A (en) 2023-09-19
CN116777305B CN116777305B (en) 2023-11-10

Family

ID=88013757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311040926.9A Active CN116777305B (en) 2023-08-18 2023-08-18 Power data quality improving method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116777305B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104008432A (en) * 2014-06-03 2014-08-27 华北电力大学 Micro-grid short-term load forecasting method based on EMD-KELM-EKF
CN109934385A (en) * 2019-01-29 2019-06-25 跨越速运集团有限公司 Goods amount prediction technique and system based on length Memory Neural Networks
CN110634081A (en) * 2019-08-02 2019-12-31 国网四川省电力公司映秀湾水力发电总厂 Method and device for processing abnormal data of hydropower station
CN111582542A (en) * 2020-03-31 2020-08-25 国网上海市电力公司 Power load prediction method and system based on abnormal restoration
CN111784030A (en) * 2020-06-12 2020-10-16 国网冀北电力有限公司电力科学研究院 Distributed photovoltaic power prediction method and device based on spatial correlation
CN112199252A (en) * 2020-09-30 2021-01-08 中国民航信息网络股份有限公司 Abnormity monitoring method and device and electronic equipment
CN112435054A (en) * 2020-11-19 2021-03-02 西安理工大学 Nuclear extreme learning machine electricity sales amount prediction method based on generalized maximum correlation entropy criterion
WO2021164267A1 (en) * 2020-02-21 2021-08-26 平安科技(深圳)有限公司 Anomaly detection method and apparatus, and terminal device and storage medium
WO2022162798A1 (en) * 2021-01-27 2022-08-04 日本電信電話株式会社 Power demand prediction device, power demand prediction method, and program
CN114881374A (en) * 2022-07-11 2022-08-09 广东电网有限责任公司佛山供电局 Multi-element heterogeneous energy consumption data fusion method and system for building energy consumption prediction
CN115269108A (en) * 2021-04-30 2022-11-01 华为云计算技术有限公司 Data processing method, device and equipment
CN115374091A (en) * 2021-05-20 2022-11-22 中国电力科学研究院有限公司 Distributed new energy output data quality improving method and system
CN115859200A (en) * 2022-11-09 2023-03-28 微梦创科网络科技(中国)有限公司 Data detection method and system
CN116150132A (en) * 2022-12-05 2023-05-23 北京数极智能科技有限公司 Enterprise internet of things data processing method, terminal equipment and storage medium
CN116502160A (en) * 2023-03-13 2023-07-28 华能曲阜热电有限公司 Automatic electric quantity data acquisition system

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104008432A (en) * 2014-06-03 2014-08-27 华北电力大学 Micro-grid short-term load forecasting method based on EMD-KELM-EKF
CN109934385A (en) * 2019-01-29 2019-06-25 跨越速运集团有限公司 Goods amount prediction technique and system based on length Memory Neural Networks
CN110634081A (en) * 2019-08-02 2019-12-31 国网四川省电力公司映秀湾水力发电总厂 Method and device for processing abnormal data of hydropower station
WO2021164267A1 (en) * 2020-02-21 2021-08-26 平安科技(深圳)有限公司 Anomaly detection method and apparatus, and terminal device and storage medium
CN111582542A (en) * 2020-03-31 2020-08-25 国网上海市电力公司 Power load prediction method and system based on abnormal restoration
CN111784030A (en) * 2020-06-12 2020-10-16 国网冀北电力有限公司电力科学研究院 Distributed photovoltaic power prediction method and device based on spatial correlation
CN112199252A (en) * 2020-09-30 2021-01-08 中国民航信息网络股份有限公司 Abnormity monitoring method and device and electronic equipment
CN112435054A (en) * 2020-11-19 2021-03-02 西安理工大学 Nuclear extreme learning machine electricity sales amount prediction method based on generalized maximum correlation entropy criterion
WO2022162798A1 (en) * 2021-01-27 2022-08-04 日本電信電話株式会社 Power demand prediction device, power demand prediction method, and program
CN115269108A (en) * 2021-04-30 2022-11-01 华为云计算技术有限公司 Data processing method, device and equipment
CN115374091A (en) * 2021-05-20 2022-11-22 中国电力科学研究院有限公司 Distributed new energy output data quality improving method and system
CN114881374A (en) * 2022-07-11 2022-08-09 广东电网有限责任公司佛山供电局 Multi-element heterogeneous energy consumption data fusion method and system for building energy consumption prediction
CN115859200A (en) * 2022-11-09 2023-03-28 微梦创科网络科技(中国)有限公司 Data detection method and system
CN116150132A (en) * 2022-12-05 2023-05-23 北京数极智能科技有限公司 Enterprise internet of things data processing method, terminal equipment and storage medium
CN116502160A (en) * 2023-03-13 2023-07-28 华能曲阜热电有限公司 Automatic electric quantity data acquisition system

Also Published As

Publication number Publication date
CN116777305B (en) 2023-11-10

Similar Documents

Publication Publication Date Title
US10789120B2 (en) Preprocessor and abnormality predictor diagnosis system
CN110008080B (en) Business index anomaly detection method and device based on time sequence and electronic equipment
CN111401940A (en) Feature prediction method, feature prediction device, electronic device, and storage medium
CN114978956A (en) Method and device for detecting abnormal performance mutation points of network equipment in smart city
CN111178537A (en) Feature extraction model training method and device
CN110991761B (en) Heat supply load prediction method and device
CN112801315A (en) State diagnosis method and device for power secondary equipment and terminal
CN109597745B (en) Abnormal data processing method and device
CN116777305B (en) Power data quality improving method and device, electronic equipment and storage medium
CN113205230A (en) Data prediction method, device and equipment based on model set and storage medium
CN110458713B (en) Model monitoring method, device, computer equipment and storage medium
CN116452242A (en) Game profit prediction method, device and equipment based on fitting regression
CN109857816B (en) Test sample selection method and device, storage medium and electronic equipment
CN115759850A (en) Enterprise credit evaluation method and device, electronic equipment and storage medium
CN116150132A (en) Enterprise internet of things data processing method, terminal equipment and storage medium
CN112465104B (en) Height development evaluation method and terminal equipment
CN110715799B (en) Method and device for detecting mechanical state of circuit breaker and terminal equipment
CN115169089A (en) Wind power probability prediction method and device based on kernel density estimation and copula
CN111563078B (en) Data quality detection method and device based on time sequence data and storage device
CN111176931A (en) Operation monitoring method, operation monitoring device, server and storage medium
CN116433402B (en) Analysis processing device, method and storage medium for automatic sales of user electricity fees
JP7322918B2 (en) Program, information processing device, and learning model generation method
CN112434198B (en) Chart component recommending method and device
CN117132177B (en) Runoff forecasting model construction and runoff forecasting method based on multiple hypothesis test
CN113743532B (en) Abnormality detection method, abnormality detection device, abnormality detection apparatus, and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant