Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present application, there is provided an embodiment of a voltage anomaly analysis method, it is noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system, such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flowchart of a voltage anomaly analysis method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
and S102, acquiring power distribution network data.
Specifically, the power distribution network data acquisition may be performed by measuring the real-time and time-averaged voltage of the power distribution network through a power distribution network gateway voltage detector, which may be an R8 type multiple variable resistance intelligent voltage and current detection device, and is used for detecting the power distribution network voltage data in a multi-mode manner, and reporting and inputting the data. The multiple modes may include a real-time voltage load mode, an average voltage mode, and the like, and which mode is specifically adopted needs to be adjusted according to a specific application scenario, which is not specifically limited herein.
The power distribution network data may also be data such as load rate, current, and electrical performance index, and the data sources of the above data may be calculated by using a power distribution network gateway voltage detector and combining with an arithmetic unit in the processor, so as to analyze the voltage abnormality in the following.
And step S104, carrying out preset processing on the power distribution network data to obtain preprocessed data.
Specifically, after the power distribution network data is collected, the data is composed of many data values, for example, the power distribution network data is composed of voltage, current, load rate, and the like, wherein effective values and abnormal values exist, even missing values exist, if the power distribution network data is directly analyzed, the data noise is large, that is, effective data is difficult to find for utilization and analysis, and therefore the data needs to be preprocessed to meet the purpose of rapid mining and analysis.
Optionally, the performing preset processing on the power distribution network data to obtain preprocessed data includes: acquiring missing values and abnormal values in the power distribution network data according to the power distribution network data; filling in the missing value; and deleting the outlier.
Specifically, the missing value of the power distribution network data is mainly due to the fact that missed mining or empty mining occurs in data acquisition when the power distribution network is unstable, the collected missing value cannot be analyzed and utilized under such a situation, and similarly, it can be known that the abnormal value cannot be used for interest division, so that the missing value needs to be supplemented and completed after the missing value and the abnormal value in the power distribution network data are obtained in the embodiment of the present invention, for example, the voltage value of the node a1 of the power distribution network is? v, the above-mentioned value obviously belongs to the missing value, then the embodiment of the present invention will find the voltage value of the a1 node to be 100v according to the collected record and other related data, so as to ensure the use of the subsequent model analysis.
In addition, for abnormal values in the power distribution network data, the embodiment of the invention adopts an operation of deleting the abnormal values to achieve the effect of data preprocessing, for example, the voltage value of the node a1 of the power distribution network is 9999v, and the above numerical values obviously belong to the abnormal values, so that the embodiment of the invention finds the voltage value of the node a1 to be 100v according to the collected records and other related data to ensure the use of subsequent model analysis.
And S106, screening the preprocessed data according to a preset rule to obtain important characteristic data.
Specifically, the preprocessed data includes many kinds of data features, and the data features refer to reference values of various data, which are not all required by the analysis model, so that the embodiment of the present invention needs to perform a certain rule screening on the preprocessed data after the data is preprocessed.
Optionally, the screening the preprocessed data according to a preset rule to obtain important feature data includes: acquiring the preprocessing data, wherein the preprocessing data comprises important characteristic data and non-important characteristic data; deleting the non-important characteristic data in the preprocessed data; and keeping the important characteristic data.
Optionally, the important feature data includes: load factor, voltage, three-phase imbalance, sudden change of residential electricity consumption.
Specifically, the preprocessed data is subjected to specification, that is, unimportant or irrelevant features are deleted from the original features according to a certain rule, so as to obtain and retain important feature data, wherein the important feature data are respectively: the load factor LR, the voltage V, the three-phase unbalance Tpi and the residential electricity utilization mutation Rem.
It should be noted that the preset rule may be determined by a user according to an application scenario or a voltage anomaly analysis policy, and the preset rule plays a decisive role in how to filter important and non-important feature data in the preprocessed data. For example, according to the demand of a field distribution network, a user needs to screen four data of load rate LR, voltage V, three-phase imbalance Tpi and residential electricity consumption mutation Rem, and exclude other unnecessary non-important characteristic data, when the preprocessing data includes: when the load rate LR, the voltage V, the three-phase unbalance Tpi, the residential electricity utilization mutation Rem and the instantaneous current i are subjected to the preset rules, the screening result deletes the parameter value of the instantaneous current i, and the four parameter values of the load rate LR, the voltage V, the three-phase unbalance Tpi and the residential electricity utilization mutation Rem are reserved.
And step S108, training the anomaly analysis model according to the important characteristic data.
Specifically, the important feature data obtained in the above steps can be used for training an anomaly analysis model, the important feature data is input into the anomaly analysis model through the processor to obtain a training opportunity of the anomaly analysis model, and the anomaly analysis model is continuously perfected by continuously inputting data. The abnormal analysis model can be a model system framework realized by utilizing an FP-growth algorithm and is realized according to forms of a binary tree and a node linked list.
Optionally, the training of the anomaly analysis model according to the important feature data includes deleting a low relevance parameter in the anomaly analysis model, and taking the important feature data as a high relevance factor of the anomaly analysis model; adjusting the parameters of the high correlation factor according to a preset threshold value; and generating the abnormal analysis model data structure according to the adjusted parameters of the high relevance factor.
Specifically, correlation factor analysis is realized through an FP-growth algorithm, the model is trained, factors with low correlation are removed, and factors with high correlation are left, wherein the factors are respectively as follows: voltage V (maximum, minimum and average), load rate LR (maximum, minimum and average), three-phase imbalance Tpi (maximum, minimum and average), and residential electricity utilization mutation Rem, adjusting parameters of a threshold value, starting to generate an FPtree and a node chain table, firstly mining low-frequency items, and then mining high-frequency items successively.
In step S110, the abnormality cause is analyzed using an abnormality analysis model.
Optionally, before the analyzing the cause of the abnormality by using the abnormality analysis model, the method further includes: and evaluating the trained anomaly analysis model.
Specifically, after the model training is completed, in order to evaluate the reliability of the anomaly analysis model, the model can be evaluated in four ways, namely full confidence, maximum confidence, Kluc, and cosine. For example, the confidence: it is a function of the sample size (i.e., 3000 of you here) and the range of fluctuation of the numerical result. That is, the results obtained by you will fluctuate around a certain specific value, and you want to know how large the fluctuation range is, and the credibility (reliability) of the model can be evaluated through the confidence, so as to intuitively determine whether the model is usable, and further determine whether the results analyzed by the model are accurate and effective.
Fig. 2 is a block diagram of a voltage abnormality analysis apparatus according to an embodiment of the present application, and as shown in fig. 2, the apparatus includes:
and the obtaining module 20 is used for obtaining the data of the power distribution network.
Specifically, the power distribution network data acquisition may be performed by measuring the real-time and time-averaged voltage of the power distribution network through a power distribution network gateway voltage detector, which may be an R8 type multiple variable resistance intelligent voltage and current detection device, and is used for detecting the power distribution network voltage data in a multi-mode manner, and reporting and inputting the data. The multiple modes may include a real-time voltage load mode, an average voltage mode, and the like, and which mode is specifically adopted needs to be adjusted according to a specific application scenario, which is not specifically limited herein.
The power distribution network data may also be data such as load rate, current, and electrical performance index, and the data sources of the above data may be calculated by using a power distribution network gateway voltage detector and combining with an arithmetic unit in the processor, so as to analyze the voltage abnormality in the following.
And the preprocessing module 22 is configured to perform preset processing on the power distribution network data to obtain preprocessed data.
Specifically, after the power distribution network data is collected, the data is composed of many data values, for example, the power distribution network data is composed of voltage, current, load rate, and the like, wherein effective values and abnormal values exist, even missing values exist, if the power distribution network data is directly analyzed, the data noise is large, that is, effective data is difficult to find for utilization and analysis, and therefore the data needs to be preprocessed to meet the purpose of rapid mining and analysis.
Optionally, the performing preset processing on the power distribution network data to obtain preprocessed data includes: acquiring missing values and abnormal values in the power distribution network data according to the power distribution network data; filling in the missing value; and deleting the outlier.
Specifically, the missing value of the power distribution network data is mainly due to the fact that missed mining or empty mining occurs in data acquisition when the power distribution network is unstable, the collected missing value cannot be analyzed and utilized under such a situation, and similarly, it can be known that the abnormal value cannot be used for interest division, so that the missing value needs to be supplemented and completed after the missing value and the abnormal value in the power distribution network data are obtained in the embodiment of the present invention, for example, the voltage value of the node a1 of the power distribution network is? v, the above-mentioned value obviously belongs to the missing value, then the embodiment of the present invention will find the voltage value of the a1 node to be 100v according to the collected record and other related data, so as to ensure the use of the subsequent model analysis.
In addition, for abnormal values in the power distribution network data, the embodiment of the invention adopts an operation of deleting the abnormal values to achieve the effect of data preprocessing, for example, the voltage value of the node a1 of the power distribution network is 9999v, and the above numerical values obviously belong to the abnormal values, so that the embodiment of the invention finds the voltage value of the node a1 to be 100v according to the collected records and other related data to ensure the use of subsequent model analysis.
And the screening module 24 is configured to screen the preprocessed data according to a preset rule to obtain important feature data.
Specifically, the preprocessed data includes many kinds of data features, and the data features refer to reference values of various data, which are not all required by the analysis model, so that the embodiment of the present invention needs to perform a certain rule screening on the preprocessed data after the data is preprocessed.
Optionally, the screening the preprocessed data according to a preset rule to obtain important feature data includes: acquiring the preprocessing data, wherein the preprocessing data comprises important characteristic data and non-important characteristic data; deleting the non-important characteristic data in the preprocessed data; and keeping the important characteristic data.
Optionally, the important feature data includes: load factor, voltage, three-phase imbalance, sudden change of residential electricity consumption.
Specifically, the preprocessed data is subjected to specification, that is, unimportant or irrelevant features are deleted from the original features according to a certain rule, so as to obtain and retain important feature data, wherein the important feature data are respectively: the load factor LR, the voltage V, the three-phase unbalance Tpi and the residential electricity utilization mutation Rem.
It should be noted that the preset rule may be determined by a user according to an application scenario or a voltage anomaly analysis policy, and the preset rule plays a decisive role in how to filter important and non-important feature data in the preprocessed data. For example, according to the demand of a field distribution network, a user needs to screen four data of load rate LR, voltage V, three-phase imbalance Tpi and residential electricity consumption mutation Rem, and exclude other unnecessary non-important characteristic data, when the preprocessing data includes: when the load rate LR, the voltage V, the three-phase unbalance Tpi, the residential electricity utilization mutation Rem and the instantaneous current i are subjected to the preset rules, the screening result deletes the parameter value of the instantaneous current i, and the four parameter values of the load rate LR, the voltage V, the three-phase unbalance Tpi and the residential electricity utilization mutation Rem are reserved.
And the training module 26 is used for training the anomaly analysis model according to the important characteristic data.
Specifically, the important feature data obtained in the above steps can be used for training an anomaly analysis model, the important feature data is input into the anomaly analysis model through the processor to obtain a training opportunity of the anomaly analysis model, and the anomaly analysis model is continuously perfected by continuously inputting data. The abnormal analysis model can be a model system framework realized by utilizing an FP-growth algorithm and is realized according to forms of a binary tree and a node linked list.
Optionally, the training of the anomaly analysis model according to the important feature data includes deleting a low relevance parameter in the anomaly analysis model, and taking the important feature data as a high relevance factor of the anomaly analysis model; adjusting the parameters of the high correlation factor according to a preset threshold value; and generating the abnormal analysis model data structure according to the adjusted parameters of the high relevance factor.
Specifically, correlation factor analysis is realized through an FP-growth algorithm, the model is trained, factors with low correlation are removed, and factors with high correlation are left, wherein the factors are respectively as follows: voltage V (maximum, minimum and average), load rate LR (maximum, minimum and average), three-phase imbalance Tpi (maximum, minimum and average), and residential electricity utilization mutation Rem, adjusting parameters of a threshold value, starting to generate an FPtree and a node chain table, firstly mining low-frequency items, and then mining high-frequency items successively.
And the analysis module 28 is used for analyzing the abnormality reasons by using the abnormality analysis model.
Optionally, before the analyzing the cause of the abnormality by using the abnormality analysis model, the method further includes: and evaluating the trained anomaly analysis model.
Specifically, after the model training is completed, in order to evaluate the reliability of the anomaly analysis model, the model can be evaluated in four ways, namely full confidence, maximum confidence, Kluc, and cosine. For example, the confidence: it is a function of the sample size (i.e., 3000 of you here) and the range of fluctuation of the numerical result. That is, the results obtained by you will fluctuate around a certain specific value, and you want to know how large the fluctuation range is, and the credibility (reliability) of the model can be evaluated through the confidence, so as to intuitively determine whether the model is usable, and further determine whether the results analyzed by the model are accurate and effective.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: a processor; and a memory, in which a computer-readable program is stored, and when the computer-readable program is executed by the processor, the electronic device executes the method of the embodiment, and details of the method are not repeated herein.
Fig. 3 is a flowchart of the FP-growth algorithm according to an embodiment of the present invention, as shown in fig. 3, including:
assume that the data form of the data platform is as follows: voltage V (maximum, minimum, average), load rate LR (maximum, minimum, average), three-phase imbalance Tpi (maximum, minimum, average), and residential electricity utilization mutation Rem, as shown in table 1 below.
TABLE 1 data platform preprocessed data
S302 scans the database once, finds the frequent 1-item set L1, counts each element in the transaction, V-max (4 times), LR-min (2 times), Tpi-max (3 times), Rem (6 times), Tpi-a (1 time), Tpi-min (1 time), LR-max (2 times).
S304, sorting the items in the L1 in a descending manner according to the support degree, generating an item head table, setting the minimum support degree (namely the occurrence frequency of each element in the transaction) to be 2, and re-determining new elements according to the descending manner, wherein Rem (6 times), V-max (4 times), Tpi-max (3 times), LR-min (2 times) and LR-max (2 times).
S306, scanning the database for the second time, generating an FP-tree, and readjusting the element items in the transaction.
TABLE 2 element entries after data warping
S308, mining the condition mode base of the FP-tree generating item according to the sequence from the tail to the head of the item head table, constructing a condition FP-tree, and constructing the FP tree, wherein the structure of the FP tree is shown in FIG. 4.
S310, based on the condition FP-tree recursive mining, generating a frequent pattern recursive call FP-Growth mining frequent item, and for each element item, acquiring a corresponding condition pattern base. The conditional mode base is a set of paths ending with the element entry looked up. Each path is in essence a prefix path. In the order from bottom to top. According to the FP-growth algorithm, the final support degree is more than 2, and the frequent mode is as follows:
TABLE 3 frequent modes
Frequent item
|
Conditional mode base
|
Conditional FP Tree
|
Frequent patterns of generation
|
LR-max
|
{Rem}1,{Rem、Tpi-max}1
|
{Rem}2
|
{Rem、LR-max}2
|
LR-min
|
{Rem、Tpi-max}1,{Tpi-max}1
|
{Tpi-max}2
|
{Tpi-max、LR-min}2
|
Tpi-max
|
{Rem}3
|
{Rem}3
|
{Rem、Tpi-max}3
|
V-max
|
{Rem}3
|
{Rem}3
|
{Rem、V-max}3 |
Frequent items can be mined through an FP-growth algorithm, and the probability that distribution transformer voltage abnormal factors are generated by { resident electricity utilization mutation Rem, voltage maximum V-max }, { resident electricity utilization mutation Rem, three-phase imbalance maximum Tpi-max }, { three-phase imbalance maximum Tpi-max, load rate minimum LR-min }, { resident electricity utilization mutation Rem, load rate maximum LR-max } can be obtained through a frequent mode generated by the upper graph.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.