Power data model construction method and system based on generative artificial intelligence

By analyzing the fluctuation degree and abnormal data length of power data, combined with the abnormal probability and local entropy of the cluster, the appropriate input length is determined, and the abnormal data is replaced by a generative artificial intelligence model, which solves the problem in the existing technology that the input data length affects the charge. The issue of data accuracy improves the accuracy and reliability of data.

CN118536009BActive Publication Date: 2024-10-11HUBEI CENT CHINA TECH DEV OF ELECTRIC POWER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410996320.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-10-11
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

When the existing technology uses generative artificial intelligence to fill or replace power data, the input data length is insufficient or too long, which will affect the accuracy of abnormal data replacement, resulting in low accuracy of charge data.

Method used

By analyzing the degree of data fluctuation and the length of abnormal data, the most suitable model input data length is determined, and the pre-trained power data processing model is used to replace the abnormal data, and the appropriate input is calculated based on the abnormal probability and local entropy of the cluster. length, using random forest and PSO optimization algorithms to improve data accuracy.

Benefits of technology

It improves the accuracy and reliability of data after replacing abnormal data, avoids the limitations of data in a single time period, reduces the risk of misjudgment, and ensures the integrity and continuity of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536009B_ABST
    Figure CN118536009B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and more specifically, to a method and system for constructing a power data model based on generative artificial intelligence. The method includes: collecting power load data; determining the abnormal probability of each data point in each time period, and clustering to obtain multiple clusters; judging whether a cluster is an abnormal cluster according to the abnormal probability of the data points in the cluster; calculating the appropriateness coefficient; determining the target input length by the minimum value of the appropriateness coefficient; and processing the power load data by a power data processing model to replace the abnormal data. The present invention obtains the input data length that is most suitable for the data processed by the model through the fluctuation degree of the data itself and the length of the abnormal data identified by the abnormal algorithm, so that the model completes the input data (that is, replaces the abnormal data with the generated data), and the output data obtained is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology. More specifically, the present invention relates to a method and system for constructing a power data model based on generative artificial intelligence. Background Art

[0002] Generative AI is the use of AI technology to generate content, such as natural language generation, image generation, audio generation, etc. In terms of natural language generation, generative AI can be used for text summarization, machine translation, dialogue systems, story generation, etc. The core idea of ​​generative AI is to train a model to learn the distribution of data, and then use the learned model to generate new data. For example, in natural language generation, a model can be trained to learn the structure and grammatical rules of sentences, and then the model can be used to generate new sentences. In image generation, a model can be trained to learn the features and styles of images, and then the model can be used to generate new images.

[0003] In the power system, the accuracy and completeness of load data are crucial to the control and maintenance of the circuit system, so existing technologies can fill in missing or abnormal data through generative artificial intelligence. In practical applications, generative artificial intelligence can learn the existing data distribution and patterns, and then use these patterns to fill in missing data or repair abnormal data. For example, a generative adversarial network (GAN) can be used to generate new data that conforms to the real data distribution, thereby filling in missing or abnormal data points. Another common method is to use a sequence-to-sequence (seq2seq) model or a similar recurrent neural network (RNN) model to predict the value of missing or abnormal data points based on the existing data sequence.

[0004] Existing technologies usually identify data points with a large degree of outliers in charge data and replace them through generative artificial intelligence. For example, application document CN117150402A proposes a power data anomaly detection method and model based on a generative adversarial network. The invention processes power time series data through an anomaly detection model of a generator and a discriminator, and continuously optimizes the data generation ability and anomaly identification ability of the generator and the discriminator through adversarial training, thereby improving the anomaly detection ability of the model.

[0005] However, when inputting data into the model, even if the identified abnormal data is relatively accurate, the accuracy of the replaced charge data may still be low due to the large proportion of abnormal data in the input data. Summary of the invention

[0006] The inventors found that when replacing abnormal data in power load data through the power data model, the length of data input to the power data processing model will affect the accuracy of the data obtained after replacing the abnormal data. For example, if the length of data input to the power data processing model is short, then fewer abnormal data will have a greater impact on the accuracy of the data obtained by model processing; if the length of data input to the power data processing model is long, the strength of smoothing the abnormal data may be small. Therefore, the inventors proposed to obtain the input data length that is most suitable for the data processed by the model through the fluctuation degree of the data itself and the length of the abnormal data identified by the abnormal algorithm, so that the model can complete the input data (that is, replace the abnormal data with the model-generated data), and the output data obtained is more accurate.

[0007] In one embodiment, the formula for calculating Ax is: , where ui is the data length of all data in the i-th abnormal cluster in a period, M is the total number of abnormal clusters in a period, and uT is the data length of a predetermined size.

[0008] In one embodiment, the formula for calculating Bx includes: for any time period, calculating the variance σ2j of the power load value corresponding to the j-th data point in the power load data, and normalizing the variance of the j-th data point to obtain the weight coefficient αj of the j-th data point in each time period; obtaining the local entropy Sj of the j-th data point in each time period; for any time period, extracting multiple groups of calculation data sets with a data length of the length x of the model input data in the time order of collecting data points in the time period; for any calculation data set, calculating the sum of the products of the weight coefficients corresponding to each data point in the calculation data set and the local entropy to obtain the fluctuation degree value of the calculation data set; the maximum value of the fluctuation degree values ​​in all calculation data sets is Bx.

[0009] In one embodiment, for all time periods, counting whether the j-th data point in each time period is abnormal, so as to determine the probability that the j-th data point is abnormal data, includes: obtaining the number nj of abnormal data points in each time period; obtaining the probability that the j-th data point is abnormal data: pj=nj / N, wherein pj is the probability that the j-th data point in each time period is abnormal data, and N is the number of time periods.

[0010] Beneficial effects are as follows: the inventors have found that the power load data of each time period, for example, the power load data collected throughout the day, has similar changes in amplitude with the power load data of other time periods, and abnormal data will appear at the same time point in a time period. For example, from 13:00 to 14:00 every day, the power load data collected has a greater probability of being abnormal. Therefore, the present invention collects multiple time periods, and the proportion of the probability of the data collected at the same time point in each time period being abnormal is calculated as the probability of a failure in each time period at that time point. Based on this, by comparing the data of multiple time periods, it is possible to more accurately identify abnormal situations at specific time points, avoid the limitations of data in a single time period, and improve the accuracy and reliability of abnormal probability.

[0011] In one embodiment, judging whether the cluster is an abnormal cluster according to the average value of the abnormal probabilities of the data points in the cluster includes: for any cluster, calculating the average value of the probability that each data point in the cluster is abnormal data; in response to the average value being greater than a threshold, determining that the cluster is an abnormal cluster; in response to the average value being greater than a threshold, determining that the cluster is not an abnormal cluster.

[0012] The beneficial effect is: the average value of all data points in the cluster is taken as the probability that the cluster is an abnormal cluster. By comprehensively considering the abnormality of the entire cluster, the abnormality of the cluster is more comprehensively evaluated. Furthermore, by using the average value as the judgment indicator, the influence of a single abnormal data point on the abnormal judgment of the cluster can be reduced, thereby reducing the risk of misjudgment and improving the accuracy of judgment.

[0013] In one embodiment, the processing of the power load data using a pre-trained power data processing model includes: constructing a window with a length equal to the target input length xA; for any abnormal cluster: in response to the length of the window being greater than the length of the abnormal cluster, causing the window to cover the abnormal cluster for processing; in response to the length of the window being less than the length of the abnormal cluster, causing the window to traverse the abnormal cluster, and during the first traversal, causing a portion of the window to cover the head end of the abnormal cluster; during the traversal process, sliding the window.

[0014] The beneficial effect is that for abnormal clusters with smaller data length, the window can directly cover them, so that they include normal data and abnormal data, and the abnormal data is replaced by the power data processing model. By making the window cover the non-abnormal data (normal data), it is ensured that the replaced data can better reflect the actual situation, making the data output by the model more accurate. For abnormal clusters with larger data length, the window cannot be completely covered. At this time, the traversal starts from the end where the window partially covers the abnormal cluster, and the window is slid during the traversal process. Through localized processing, the data in the window better retains the original characteristics, thereby maintaining the integrity and continuity of the data.

[0015] In one embodiment, the anomaly detection algorithm is a random forest anomaly detection algorithm.

[0016] The beneficial effect is that the power load data of the present invention is single-dimensional data (current data, power data, etc.) and there is a time series relationship between each data point, which is suitable for the isolation forest anomaly detection algorithm. The reason is that the time series relationship between data points can be considered when constructing a random tree, so that the time series information can be used to more effectively judge the abnormal points.

[0017] In one embodiment, the optimization algorithm is a PSO optimization algorithm.

[0018] In a second aspect, the present invention provides a power data model construction system based on generative artificial intelligence, which includes a processor and a memory, the memory stores a computer program, and the processor executes the computer program to implement a power data model construction method based on generative artificial intelligence as described in any one of the above invention contents. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0020] Figure 1 is a flowchart schematically illustrating the steps of a method for constructing a power data model based on generative artificial intelligence according to an embodiment of the present invention;

[0021] Figure 2 is a flow chart schematically illustrating step S4 according to an embodiment of the present invention;

[0022] Figure 3 It is a structural block diagram schematically showing a power data model construction system based on generative artificial intelligence according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0024] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0025] Figure 1 It is a flowchart schematically showing the steps of the method for constructing a power data model based on generative artificial intelligence in this embodiment.

[0026] like Figure 1 As shown, the method for constructing a power data model based on generative artificial intelligence includes steps S1 to S4.

[0027] Step S1: Collecting power load data of electrical equipment in multiple consecutive time periods.

[0028] The power load data is single-dimensional data, which is current data, voltage data or frequency data. The power load data corresponds to a power load value, which is the current value, voltage value or frequency of the power equipment. The length of a time period is equal to a working cycle of the power equipment.

[0029] In one embodiment, the working hours of industrial electrical equipment are from 10:00 to 16:00 every day, so one period is 6 hours (from 10:00 to 16:00 a day), and the power load data in multiple consecutive periods are the current values ​​of the industrial electrical equipment collected from 10:00 to 16:00 for multiple consecutive days. The power load data can also be the power size of the industrial electrical equipment.

[0030] In another embodiment, a household electrical appliance, such as a refrigerator, works from 0:00 to 24:00 every day (working all day), and a period is 24 hours (from 0:00 to 24:00 every day). The power load data in multiple consecutive periods are the current values ​​of the household electrical appliances collected continuously for multiple consecutive days. The power load data can also be the power size of the household electrical appliances.

[0031] Step S2: For any time period, determine the abnormal probability of each data point, and cluster according to the abnormal probability to obtain a predetermined number of clusters; for any cluster, determine whether the cluster is an abnormal cluster according to the average value of the abnormal probability of the data points in the cluster.

[0032] In one embodiment, the algorithm for clustering data points is the DBSCAN clustering algorithm. It should be noted that when the DBSCAN clustering algorithm is used for classification in this embodiment, the category radius is 0.05, the minimum number of neighbors is 5, and the time values ​​corresponding to all time points in a single cycle and the values ​​of the abnormal probability of each data point are normalized during classification to eliminate dimensional interference. In addition, the data points in the clusters obtained by the DBSCAN clustering algorithm are continuous in time series. For example, a cluster includes the 10th to 20th data points collected in a time period.

[0033] In one embodiment, the process of determining the abnormal probability of each data point is as follows: obtaining the number nj of abnormal data points in each time period, wherein the random forest algorithm is used to determine whether the jth data point is abnormal. Obtaining the probability that the jth data point is abnormal data: pj=nj / N, wherein pj is the probability that the jth data point in each time period is abnormal data, and N is the number of time periods.

[0034] Furthermore, the process of judging whether a cluster is an abnormal cluster according to the average value of the abnormal probability of the data points in the cluster is as follows: for any cluster, the average value of the probability that each data point in the cluster is abnormal data is calculated; in response to the average value being greater than a threshold, the cluster is determined to be an abnormal cluster; in response to the average value not being greater than a threshold, the cluster is determined not to be an abnormal cluster. In this embodiment, the threshold is 0.3.

[0035] Step S3: Calculate the fitness coefficient Px: Px=exp(Ax+Bx); calculate the minimum value of the fitness coefficient Px through the optimization algorithm to determine the corresponding input length x, which is recorded as the target input length xA.

[0036] Among them, Ax is related to the length x of the input data and the data length of each abnormal cluster, Bx is related to the input length x, the value of the data point and its local entropy, and exp() is an exponential function with the natural constant e as the base. The fitness coefficient Px is positively correlated with Ax, and the fitness coefficient Px is positively correlated with Bx.

[0037] In one embodiment, the formula for calculating Ax is: , ui is the data length of all data in the ith abnormal cluster in a period, M is the total number of abnormal clusters in a period, and uT is the data length of a predetermined size. Among them, Ax is positively correlated with the square of the data length of all data in each abnormal cluster. When Ax is smaller, it means that the proportion of data in the abnormal cluster in the input data is lower, and the accuracy of the output data obtained by supplementing the input data is higher.

[0038] Furthermore, the process of calculating Bx is as follows: calculate the variance σ2j of the power load value corresponding to the jth data point in all time periods of the power load data, and normalize the variance of the jth data point to obtain the weight coefficient αj of the jth data point in each time period; obtain the local entropy Sj of the jth data point in each time period; for any time period, extract multiple groups of calculation data sets with a data length of the length x of the model input data in the time order of the data points collected in the time period; for any calculation data set, calculate the sum of the product of the weight coefficient corresponding to each data point in the calculation data set and the local entropy to obtain the fluctuation degree value of the calculation data set; the maximum value of the fluctuation degree value in all calculation data sets is Bx. Among them, the smaller Bx is, the smaller the fluctuation of the input data input into the model in the data collected in a time period (the product of the variance corresponding to the data point and the local entropy is small), and the accuracy of the output data output by the model is higher.

[0039] Among them, the local entropy Sj of the j-th data point in each time period is centered on the j-th data point, selects power load data with a time length of t, and obtains the local entropy Sj of the j-th data point through an entropy calculation method (such as Shannon entropy).

[0040] In summary, when Ax is smaller, Px is smaller, and the accuracy of the model output data is higher; when Bx is smaller, Px is smaller, and the accuracy of the model output data is higher. When Ax is larger, Px is larger, and the accuracy of the model output data is lower; when Bx is larger, Px is larger, and the accuracy of the model output data is lower.

[0041] Step S4: Process the power load data using a pre-trained power data processing model to obtain power load data that replaces the abnormal data.

[0042] In one embodiment, the power data processing model expands the input data through a VAE network so that the input data length is the same as the output data length. In another embodiment, the input data is expanded through a GAN network.

[0043] The data length input into the power data processing model is the target input length xA, and the abnormal data is the data points belonging to the abnormal cluster in the power load data.

[0044] like Figure 2 As shown, step S4 includes steps S401 to S403.

[0045] Step S401: construct a window with a length equal to the target input length xA.

[0046] Step S402: For any abnormal cluster: in response to the length of the window being greater than the length of the abnormal cluster, the window is made to cover the abnormal cluster for processing.

[0047] Step S403: for any abnormal cluster: in response to the length of the window being less than the length of the abnormal cluster, the window is traversed through the abnormal cluster, and during the first traversal, a portion of the window covers the head end of the abnormal cluster; during the traversal, the window is slid, and a portion of the sliding window covers the abnormal cluster that has not been traversed.

[0048] In one embodiment, it is necessary to replace the data points belonging to the abnormal clusters within a time period (delete them and generate new data through the data points of the non-abnormal clusters). When the data length of the data in one of the abnormal clusters is less than the window length, align the center of the window with the center of the data in the abnormal cluster, and input the data in the window into the model as input data. When the data length of the data in one of the abnormal clusters is greater than the window length, make a part of the window cover the head end of the abnormal cluster, and after the data in the window is input into the model as input data, replace the output data of the model with the original data in the window, and slide the window so that a part of the window covers the unprocessed data belonging to the abnormal cluster until the window traverses the entire abnormal cluster.

[0049] The length of the window covering the first segment of the abnormal cluster is less than or equal to half of the total length of the window, so that the data in the abnormal cluster accounts for a smaller proportion and the model output data is more accurate.

[0050] The present invention also provides a power data model construction system based on generative artificial intelligence. Figure 3 As shown, the system includes a processor and a memory, and the memory stores computer program instructions. When the computer program instructions are executed by the processor, a method and system for constructing a power data model based on generative artificial intelligence according to the first aspect of the present invention is implemented.

[0051] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present invention, and does not constitute a limitation on the computer device of the present invention. The specific computer device may include more or less components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0052] The system also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface, whose configuration and functions are known in the art and thus will not be described in detail here.

[0053] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in the present invention may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.

[0054] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly defined.

[0055] 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.

[0056] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent application. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.

Claims

1. A method for constructing a power data model based on generative artificial intelligence, characterized in that: include: Collect power load data of electrical equipment in multiple consecutive time periods; For any time period, determine the abnormal probability of each data point, and cluster according to the abnormal probability to obtain a predetermined number of clusters; for any cluster, determine whether the cluster is an abnormal cluster according to the average value of the abnormal probability of the data points in the cluster, wherein the data points in a cluster are continuous in time series; Calculate the fitness coefficient P x : P x =exp( A x + B x ),in, A x The length of the input data x It is related to the data length of each abnormal cluster. B x The length of the input data x , the value of the data point and its local entropy, exp() is an exponential function with the natural constant e as the base; the fitness coefficient is calculated by the optimization algorithm P x The minimum value of determines the corresponding input length x, recorded as the target input length x A ; The optimization algorithm is PSO optimization algorithm; calculate A x The formula is: ,in, u i For a period of time i The data length of all data in the abnormal clusters, M is the total number of abnormal clusters in a period, u T The data length is a predetermined size; calculate B x The formulas include: The calculated power load data for all time periods j The variance of the power load value corresponding to the data point σ 2 j , and for j The variance of each data point is normalized to obtain the j The weight coefficient of each data point α j ; Get the first j The local entropy of the data points S j ; For any number of segments, multiple sets of data are extracted in sequence in the time sequence of the collected data points, and the length of the data is the length of the model input data. x The computational data set; For any calculation data set, the sum of the products of the weight coefficients and the local entropy corresponding to each data point in the calculation data set is calculated to obtain the fluctuation degree value of the calculation data set; The maximum value of the fluctuation degree in all calculated data sets is B x ; The power load data is processed using a pre-trained power data processing model to obtain power load data that replaces the abnormal data; wherein the data length input to the power data processing model is the target input length x A , the abnormal data are data points belonging to abnormal clusters in the power load data.

2. The method for constructing a power data model based on generative artificial intelligence according to claim 1, characterized in that: For all the time periods, count the number of j Whether the data point is abnormal, thus determining the j The probability that a data point is an outlier includes: Get the first j The number of data points that are abnormal n j ; Get the j The probability that a data point is an outlier: p j = n j / N ,in, p j For each period j The probability that a data point is an abnormal data, and N is the number of time periods.

3. The method for constructing a power data model based on generative artificial intelligence according to claim 1, characterized in that: The step of judging whether the cluster is an abnormal cluster according to the average value of the abnormal probability of the data points in the cluster comprises: For any cluster, the average value of the probability that each data point in the cluster is abnormal data is calculated; In response to the average value being greater than a threshold, determining that the cluster is an abnormal cluster; In response to the average being greater than a threshold, it is determined that the cluster is not an abnormal cluster.

4. The method for constructing a power data model based on generative artificial intelligence according to claim 1, characterized in that: The processing of the power load data using a pre-trained power data processing model includes: The build length is the target input length x A Window; For any anomaly cluster: In response to the length of the window being greater than the length of the abnormal cluster, the window is made to cover the abnormal cluster for processing; in response to the length of the window being less than the length of the abnormal cluster, the window is made to traverse the abnormal cluster, and during the first traversal, a portion of the window is made to cover the beginning of the abnormal cluster; during the traversal process, the window is slid, and a portion of the window after sliding covers the abnormal cluster that has not been traversed.

5. The method for constructing a power data model based on generative artificial intelligence according to claim 1, characterized in that: The anomaly detection algorithm is a random forest anomaly detection algorithm.

6. A power data model construction system based on generative artificial intelligence, comprising a processor and a memory, wherein the memory stores a computer program, characterized in that: The processor executes the computer program to implement the method for constructing a power data model based on generative artificial intelligence as described in any one of claims 1-5.