Enterprise dangerous electricity precision early warning method based on unsupervised clustering and multi-scale integrated framework

By employing unsupervised clustering and a multi-scale ensemble framework, and utilizing the SOM and HCA algorithms to cluster enterprise electricity consumption data and train early warning models, this approach addresses the issues of low intelligence and insufficient early warning accuracy in traditional methods, thereby achieving efficient and accurate early warning of hazardous electricity consumption patterns in enterprises.

CN120974215BActive Publication Date: 2026-04-10CHONGQING UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING UNIV
Filing Date
2025-07-02
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing methods for early warning of hazardous electricity use by enterprises have low levels of intelligence and low efficiency in mining and utilizing electricity information. Traditional methods cannot quickly and accurately analyze the electricity use behavior of a large number of enterprises, and early warning models trained from historical data cannot accurately predict new electricity use patterns.

Method used

A method based on unsupervised clustering and multi-scale ensemble framework is adopted. The SOM neural network is used for initial clustering, and the HCA algorithm is used for secondary clustering to construct a multi-scale power data early warning model. The model is trained with multi-level data from a single enterprise, the same industry, and different industries to enhance the pertinence and generalization ability of the early warning capability.

Benefits of technology

It enables accurate and intelligent early warning of hazardous electricity usage patterns in enterprises, improves the efficiency of power system electricity safety monitoring, and ensures the accuracy and reliability of early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120974215B_ABST
    Figure CN120974215B_ABST
Patent Text Reader

Abstract

The application discloses a precision early warning method for enterprise dangerous power utilization based on an unsupervised clustering and a multi-scale integrated framework, and comprises the following steps: 1) obtaining historical enterprise power utilization data; 2) preliminarily clustering the historical enterprise power utilization data based on a SOM neural network to obtain features of n output cluster results of different power utilization mode categories; 3) performing secondary clustering on the features of the n output cluster results of different power utilization mode categories based on an HCA algorithm, screening and identifying the enterprise dangerous power utilization mode category, and constructing a training set; 4) constructing a dangerous power utilization mode early warning model based on multi-scale power data; 5) training the dangerous power utilization mode early warning model based on multi-scale power data by using the training set; 6) obtaining real-time enterprise power utilization data, and inputting the real-time enterprise power utilization data into the trained dangerous power utilization mode early warning model based on multi-scale power data to perform early warning on the enterprise dangerous power utilization mode. The application can realize accurate and intelligent early warning on the enterprise dangerous power utilization mode.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of power system and automation, in particular to an enterprise dangerous power use precise early warning method based on unsupervised clustering and multi-scale integrated framework. BACKGROUND

[0002] With the sustained development of China's economy and society, the energy production and consumption pattern is undergoing major changes, and the energy industry shoulders the new mission of improving energy efficiency, ensuring energy security, promoting new energy consumption and promoting environmental protection. In March 2020, China State Grid Corporation proposed to build an intelligent, efficient, safe and green energy production and consumption system. Under this framework, big data, as one of the key driving forces, plays an indispensable role. According to estimates, China's intelligent monitoring terminals generate several hundred billion data per day, and the amount of data generated each year exceeds 70TB. Running against such a huge amount of data and complex data structure, it is difficult to meet the demand by relying solely on traditional data analysis methods. Especially in some high-risk industries such as mines, chemical industry and metallurgy, in addition to normal power consumption patterns, there are also abnormal power consumption patterns such as daytime stop and nighttime start, overload power consumption, daytime stop and nighttime start, emergency production stop and other abnormal power consumption patterns. These abnormal power consumption behaviors increase the risk of power system operation and may cause serious production safety accidents. Because of the large coverage of power data and rich monitoring data, a large amount of manual intervention is required for traditional calculation methods, which cannot meet the development requirements of power grid companies, and it is urgent to improve the calculation efficiency through technical means. The power big data is analyzed by artificial intelligence technology, and the dangerous power use of key enterprises is accurately monitored and warned.

[0003] At present, the power system generally uses artificial experience judgment to analyze the power consumption behavior of enterprises. Artificial experience judgment relies on a large number of staff to monitor in real time, and cannot achieve fast and accurate analysis of a large number of enterprises. The power system then introduces the K-Means algorithm to reduce the proportion of artificial experience in power consumption behavior analysis, but the K-Means algorithm must specify the K value in advance when clustering and mining, and then select the appropriate K value according to the result, which seriously reduces the intelligent degree of the algorithm, and the algorithm is more suitable for discrete data point clustering, and the data structure adaptability of the power consumption behavior model mining is not high. At the same time, in the actual application process, the warning model generated by training the historical data has the problem of missing report. The reason is that only part of the abnormal power consumption mode is included in the training historical data of the enterprise, and when a new power consumption mode appears in the warning process, the warning model trained by the historical data cannot accurately warn.

[0004] In summary, the existing enterprise dangerous power use early warning method has the problems of low intelligent degree, low efficiency of power consumption information mining and utilization, etc. SUMMARY

[0005] The application aims to provide an enterprise dangerous electricity precision early warning method based on an unsupervised clustering and multi-scale integrated framework, comprising the following steps:

[0006] 1) Obtain historical enterprise electricity data.

[0007] 2) Preliminarily cluster the historical enterprise electricity data based on a SOM neural network to obtain n output characteristics of clustering results of different electricity mode categories, n output being a positive integer.

[0008] 3) Perform secondary clustering on the n output characteristics of clustering results of different electricity mode categories based on an HCA algorithm, screen and identify enterprise dangerous electricity mode categories, and construct a training set.

[0009] 4) Construct a dangerous electricity mode early warning model based on multi-scale electricity data.

[0010] 5) Take the historical enterprise electricity data in the training set as input and the enterprise dangerous electricity mode category as output, train the dangerous electricity mode early warning model based on multi-scale electricity data, and obtain the trained dangerous electricity mode early warning model based on multi-scale electricity data.

[0011] 6) Obtain real-time enterprise electricity data, input the real-time enterprise electricity data into the trained dangerous electricity mode early warning model based on multi-scale electricity data, and obtain the current enterprise electricity mode; if the enterprise electricity mode is a dangerous electricity mode, early warning is performed.

[0012] Further, the category of the electricity mode comprises an enterprise normal electricity mode and an enterprise dangerous electricity mode.

[0013] The enterprise dangerous electricity mode comprises day-off night-on, overload electricity, day-on night-off, emergency production shutdown, automatic production shutdown, and production shutdown and resumption.

[0014] Further, in step 2), the step of obtaining the n output characteristics of clustering results of different electricity mode categories is as follows:

[0015] 2.1) Construct a plurality of SOM neural network structures.

[0016] The SOM neural network structure comprises an input layer and an output layer.

[0017] The input layer has n input nodes for obtaining enterprise electricity data, and n input is the dimension of the enterprise electricity data.

[0018] The output layer has n outputn output clusters.

[0019] 2.2) Different SOM neural network structures correspond to different power mode categories.

[0020] 2.3) According to the power mode category, the random gradient descent method is used to select the corresponding dimension data from the historical enterprise power data as the sample to construct the sample set of different SOM neural network structures.

[0021] 2.4) Train different SOM neural network structures using the sample set to obtain the SOM neural network clustering structure of different power mode categories.

[0022] 2.5) Input the historical enterprise power data into the SOM neural network clustering structure of different power mode categories to obtain n output clusters of different power mode categories.

[0023] 2.6) Calculate the power center curve of n output clusters of different power mode categories. output characteristics of n

[0024] The power center curve is as follows:

[0025]

[0026] where i represents the power mode category index, k represents the historical enterprise power data index, l represents the neuron index, and t represents the time. N il represents the total number of historical enterprise power data corresponding to the lth neuron of the ith power mode category. C il (t) represents the characteristics of the lth clustering result of the ith power mode category at time t. X k (t) represents the value of the kth historical enterprise power data at time t.

[0027] Further, the step of training the SOM neural network structure using the sample set is as follows:

[0028] 2.4.1) Initialize the weight of each neuron in the output layer of the SOM neural network structure.

[0029] 2.4.2) Calculate the distance between each sample in the sample set and the weight of each neuron in the output layer.

[0030] 2.4.3) Select the neuron closest to each sample as the preferred neuron corresponding to the sample, as follows:

[0031] ||Xj - W|| = min{||X j -W l ||},l = 1,2,...,n output (2)

[0032] where j represents sample index, X j represents the jth sample data. W represents the weight of neuron. l represents neuron index, W l represents the weight of the lth neuron. n output represents the total number of neurons. ||·|| represents distance function.

[0033] 2.4.4) Determine the winning neighborhood of the preferred neuron according to the neighborhood radius, and calculate the amplitude of each neuron update through the neighborhood function.

[0034] 2.4.5) Update the weight of the neurons in the winning neighborhood by learning rate, and get the trained SOM neural network clustering structure.

[0035] Further, in step 3), the steps of screening and identifying the enterprise dangerous electricity mode category are as follows:

[0036] 3.1) Characterize the feature C il (t) of the lth clustering result of the ith electricity mode category at time t by two-dimensional data, that is, C il (t) (x il (t), y il (t)).

[0037] 3.2) Calculate the Euclidean distance between different clustering results under the same electricity mode category, as follows:

[0038]

[0039] where l, m represent clustering result index, i represents electricity mode category index, t represents time, d ilm (t) represents the Euclidean distance between the lth clustering result and the mth clustering result at time t under the ith electricity mode category. x il (t), y il (t) represents the two-dimensional feature of the lth clustering result of the ith electricity mode category at time t. x im (t), y im (t) represents the two-dimensional feature of the mth clustering result of the ith electricity mode category at time t.

[0040] 3.3) Evaluate the Euclidean distance between different clustering results under the same electricity mode category by single linkage method, and synthesize the clustering cluster under the same electricity mode category.

[0041] The inter-cluster distance of different cluster groups is as follows:

[0042]

[0043] In the formula, d single (C a ,C b ) represents the inter-cluster distance. D lm represents the Euclidean distance between the lth cluster result and the mth cluster result under the same power mode category. C a , C b represents two different cluster groups under the same power mode category.

[0044] 3.4) Introducing C-H index to HCA algorithm to determine the optimal number of cluster groups under the same power mode category.

[0045] The C-H index is as follows:

[0046]

[0047] In the formula, r represents the cluster group index, R represents the number of cluster groups. C-H(R) represents the C-H index. B(R) represents the inter-class dispersion. n output represents the total number of cluster results. W(R) represents the intra-class dispersion. u r represents the center point of the rth cluster group. C r represents all cluster results of the rth cluster group. n r represents the total number of cluster results of the rth cluster group. u represents the global center point. x r represents the cluster result feature within the rth cluster group.

[0048] The optimal number of clusters is as follows:

[0049]

[0050] In the formula, R * is the optimal number of clusters.

[0051] 3.5) Based on the optimal number of cluster groups, the cluster groups under the same power mode category are screened using the HCA algorithm to obtain the screened cluster groups under the same power mode category.

[0052] 3.6) Through the power center curve, the cluster group representing the dangerous power mode category of the enterprise is identified from the screened cluster groups under the same power mode category.

[0053] Further, the dangerous power mode early warning model based on multi-scale power data includes a single enterprise scale dangerous power early warning model, a same industry scale dangerous power early warning model, and a different industry scale dangerous power early warning model.

[0054] The enterprise electricity data is input into the dangerous electricity mode early warning model based on multi-scale electricity data. First, the dangerous electricity mode category is identified by the single-enterprise-scale dangerous electricity early warning model. If the identification result of the single-enterprise-scale dangerous electricity early warning model exists a dangerous electricity mode category, the dangerous electricity mode category is output. If the identification result of the single-enterprise-scale dangerous electricity early warning model does not exist a dangerous electricity mode category, the dangerous electricity mode category is identified by the same industry-scale dangerous electricity early warning model. If the identification result of the same industry-scale dangerous electricity early warning model exists a dangerous electricity mode category, the dangerous electricity mode category is output. If the identification result of the same industry-scale dangerous electricity early warning model does not exist a dangerous electricity mode category, the dangerous electricity mode category is identified by the different industry-scale dangerous electricity early warning model, and the dangerous electricity mode category identified by the different industry-scale dangerous electricity early warning model is output.

[0055] Further, the steps of training the single-enterprise-scale dangerous electricity early warning model by using the training set are as follows:

[0056] a1 obtaining n ent historical enterprise electricity data of each enterprise, screening and identifying the enterprise dangerous electricity mode category and quantity of each enterprise, and constructing a training set I.

[0057] a2 constructing a single-enterprise-scale dangerous electricity early warning model.

[0058] a3 training the single-enterprise-scale dangerous electricity early warning model by using the training set I, to obtain a trained single-enterprise-scale dangerous electricity early warning model.

[0059] Further, when training the single-enterprise-scale dangerous electricity early warning model by using the training set, an ensemble learning strategy is introduced to improve the robustness of the model.

[0060] The steps of the ensemble learning strategy are as follows:

[0061] s1 constructing n Bag base learners by using the Bagging ensemble learning method.

[0062] s2 generating n Bag ensemble learning training sets from the training set I by using the Bootstrapping algorithm.

[0063] s3 training n Bag base learners by using n Bag ensemble learning training sets, to obtain n Bag trained base learners.

[0064] s4obtains the real-time enterprise electricity data of the enterprise and inputs the data into the trained n Bag base learners to obtain n Bag ×n div ensemble learning results.

[0065] s5divides the ensemble learning results into electricity mode categories through a consensus matrix and reclassifies the consensus matrix using a K-Means clustering algorithm to obtain n result electricity mode categories.

[0066] The elements of the consensus matrix are as follows:

[0067]

[0068] In the formula, θ、 represents different ensemble learning results. C θφ represents the frequency of different ensemble learning results being divided into the same electricity mode category.

[0069] s6calculates the weights of n Bag ×n div electricity mode categories using the n result ensemble learning results and calculates the proportion of n result electricity mode categories through the weights.

[0070] s7outputs the electricity mode category with the highest proportion as the electricity mode category of the enterprise.

[0071] Further, the steps of training the same industry scale dangerous electricity early warning model using the training set are as follows:

[0072] b1integrates n ent enterprises according to industry types to obtain n industry industries.

[0073] The industry types include coal mines, copper mines, dangerous chemicals, and industry and commerce.

[0074] b2obtains historical enterprise electricity data of the n industry industries, screens and identifies the enterprise dangerous electricity mode categories and quantities of each industry, and constructs a training set II.

[0075] b3constructs a same industry scale dangerous electricity early warning model.

[0076] b4trains the same industry scale dangerous electricity early warning model using the training set II to obtain a trained same industry scale dangerous electricity early warning model.

[0077] Further, the steps of training the different industry scale dangerous electricity early warning model using the training set are as follows:

[0078] c1 obtaining n ent household enterprises according to the industry type, obtaining n industry kinds of industries.

[0079] The industry type includes coal mines, copper mines, dangerous chemicals, industry and trade.

[0080] c2 obtaining n ent historical enterprise electricity data of household enterprises, screening and identifying the enterprise dangerous electricity mode category and quantity of each household enterprise.

[0081] c3 randomly selecting historical enterprise electricity data and corresponding enterprise dangerous electricity mode category and quantity of a plurality of enterprises from different industries to construct a training set III.

[0082] c4 constructing a dangerous electricity early warning model of different industry scales.

[0083] c5 training the dangerous electricity early warning model of different industry scales by using the training set III, to obtain the trained dangerous electricity early warning model of different industry scales.

[0084] The technical effect of the present application is self-evident, and the present application proposes an enterprise dangerous electricity accurate early warning method based on unsupervised clustering and ensemble learning, which can realize accurate and intelligent early warning of enterprise dangerous electricity mode.

[0085] The present application first constructs an enterprise electricity mode mining strategy based on SOM and HCA, uses the advantages of SOM in clustering high-dimensional curve data to mine enterprise electricity mode from massive electricity data, and uses the advantages of automatic screening and analysis of HCA to realize intelligent optimal selection of electricity mode;Secondly, design an electricity mode early warning framework based on single enterprise-same industry-different industry multi-level electricity data, train the model using single enterprise historical data, enhance the pertinence of the model early warning ability, use multi-level electricity data such as the same industry and different industries to train the model, enhance the generalization ability of the model early warning ability, and based on the framework, propose an enterprise dangerous electricity integrated early warning method based on SOM-HCA and multi-scale integrated framework, provide more accurate and reliable electricity safety early warning service for power system;Finally, the electric meter electricity data provided by a certain actual power company is verified, which shows that the method can accurately and efficiently early warn the enterprise dangerous electricity, and verifies the effectiveness and practical potential of the proposed method.

[0086] The present application combines HCA and SOM, which can further improve the effect of curve clustering, and gradually merges the most similar samples or clusters by calculating the distance or similarity between samples, to realize automatic screening and analysis of electricity mode.

[0087] The application guarantees the pertinence of the enterprise dangerous electric mode early warning and the generalization ability of the method in the real environment through the complementation of single enterprise, same industry and different industry multi-scale data. BRIEF DESCRIPTION OF DRAWINGS

[0088] Figure 1 Strategy structure diagram for enterprise dangerous electric mode mining;

[0089] Figure 2 Method structure diagram for enterprise dangerous electric precise early warning;

[0090] Figure 3 Strategy structure diagram for integrated learning;

[0091] Figure 4 Proportion diagram of various dangerous electric behaviors in non-coal mine enterprise data;

[0092] Figure 5 Proportion diagram of various dangerous electric behaviors in coal mine enterprise data;

[0093] Figure 6 Proportion diagram of various dangerous electric behaviors in non-coal mine enterprise and coal mine enterprise data;

[0094] Figure 7 Proportion diagram of various dangerous electric behaviors in four industry data. DETAILED DESCRIPTION

[0095] The application will be further described below in conjunction with examples, but should not be understood as limiting the above-mentioned subject matter of the application to the following examples. According to ordinary technical knowledge and conventional means in the art, various substitutions and changes can be made without departing from the technical idea of the application, and all should be included in the protection scope of the application.

[0096] Example 1:

[0097] Referring to Figures 1 to 7 , the enterprise dangerous electric precise early warning method based on unsupervised clustering and multi-scale integrated framework includes the following steps:

[0098] 1) Obtain historical enterprise electric data.

[0099] 2) Based on the SOM neural network, the historical enterprise electric data is preliminarily clustered to obtain the features of n output cluster results of different electric mode categories, n output is a positive integer.

[0100] 3) Based on the HCA algorithm, the features of n output cluster results of different electric mode categories are secondarily clustered to screen and identify the enterprise dangerous electric mode categories, and a training set is constructed.

[0101] 4) Constructing a dangerous electricity use mode early warning model based on multi-scale electricity data.

[0102] 5) Taking the historical enterprise electricity data in the training set as input and the enterprise dangerous electricity use mode category as output, training the dangerous electricity use mode early warning model based on multi-scale electricity data to obtain the trained dangerous electricity use mode early warning model based on multi-scale electricity data.

[0103] 6) Obtaining real-time enterprise electricity data and inputting the real-time enterprise electricity data into the trained dangerous electricity use mode early warning model based on multi-scale electricity data to obtain the current electricity use mode of the enterprise; if the enterprise electricity use mode is a dangerous electricity use mode, an early warning is performed.

[0104] Embodiment 2:

[0105] The enterprise dangerous electricity precise early warning method based on an unsupervised clustering and multi-scale integrated framework, the main technical content is seen in embodiment 1, further, the electricity use mode category includes an enterprise normal electricity use mode and an enterprise dangerous electricity use mode.

[0106] The enterprise dangerous electricity use mode includes day-off night-on, overload electricity use, day-on night-off, emergency production shutdown, automatic shutdown, and shutdown and restart.

[0107] Embodiment 3:

[0108] The enterprise dangerous electricity precise early warning method based on an unsupervised clustering and multi-scale integrated framework, the main technical content is seen in any one of embodiments 1 to 2, further, in step 2), the steps of obtaining the features of n output cluster results of different electricity use mode categories are as follows:

[0109] 2.1) Constructing a plurality of SOM neural network structures.

[0110] The SOM neural network structure includes an input layer and an output layer.

[0111] The input layer has n input nodes for obtaining enterprise electricity data, and n input is the dimension of the enterprise electricity data.

[0112] The output layer has n output neurons, and n output cluster results are obtained by competitive learning of the enterprise electricity data.

[0113] 2.2) Different SOM neural network structures correspond to one electricity use mode category.

[0114] 2.3) According to the power consumption mode category, the random gradient descent method is used to select the corresponding dimension data from the historical enterprise power consumption data as the sample to construct the sample set of different SOM neural network structures.

[0115] 2.4) Train different SOM neural network structures using the sample set to obtain the SOM neural network clustering structure of different power consumption mode categories.

[0116] 2.5) Input the historical enterprise power consumption data into the SOM neural network clustering structure of different power consumption mode categories to obtain n output cluster results of different power consumption mode categories.

[0117] 2.6) Calculate the power center curve of n output neurons of different power consumption mode categories to obtain the characteristics of n output cluster results of different power consumption mode categories.

[0118] The power center curve is as follows:

[0119]

[0120] In the formula, i represents the power consumption mode category index, k represents the historical enterprise power consumption data index, l represents the neuron index, and t represents the time. N il represents the total number of historical enterprise power consumption data corresponding to the lth neuron of the ith power consumption mode category. C il (t) represents the characteristics of the lth cluster result of the ith power consumption mode category at time t. X k (t) represents the value of the kth historical enterprise power consumption data at time t.

[0121] Example 4:

[0122] The enterprise dangerous power consumption precise early warning method based on the unsupervised clustering and multi-scale integrated framework mainly includes the technical contents of any one of embodiments 1 to 3, and further, the step of training the SOM neural network structure using the sample set is as follows:

[0123] 2.4.1) Initialize the weight of each neuron in the output layer of the SOM neural network structure.

[0124] 2.4.2) Calculate the distance between each sample in the sample set and the weight of each neuron in the output layer.

[0125] 2.4.3) Select the neuron closest to each sample as the preferred neuron corresponding to the sample, as shown below:

[0126] ||X j -W||=min{||X j -Wl ||},l=1,2,…,n output (2)

[0127] where j represents sample index, X j represents the jth sample data. W represents the weight of neuron. l represents neuron index, W l represents the weight of the lth neuron. n output represents the total number of neurons. ||·|| represents distance function.

[0128] 2.4.4) Determine the winning neighborhood of the preferred neuron according to the neighborhood radius, and calculate the amplitude of each neuron update through the neighborhood function.

[0129] 2.4.5) Update the weight of the neurons in the winning neighborhood by the learning rate, and obtain the trained SOM neural network clustering structure.

[0130] Example 5:

[0131] The enterprise dangerous electricity precision early warning method based on unsupervised clustering and multi-scale integrated framework, the main technical content is any one of examples 1 to 4, further, in step 3), the steps of screening and identifying the enterprise dangerous electricity mode category are as follows:

[0132] 3.1) Use two-dimensional data to represent the feature C il (t) of the lth clustering result of the i th electricity mode category at time t, that is, C il (t)(x il (t),y il (t)).

[0133] 3.2) Calculate the Euclidean distance between different clustering results under the same electricity mode category, as follows:

[0134]

[0135] where l, m represent clustering result index, i represents electricity mode category index, t represents time, d ilm (t) represents the Euclidean distance between the lth clustering result and the mth clustering result at time t under the i th electricity mode category. x il (t),y il (t) represents the two-dimensional feature of the lth clustering result of the i th electricity mode category at time t. x im (t),y im (t) represents the two-dimensional feature of the mth clustering result of the i th electricity mode category at time t.

[0136] 3.3) Evaluate the Euclidean distance between different clustering results in the same power mode category by using single linkage method, and synthesize the clustering clusters in the same power mode category.

[0137] The inter-cluster distance of different clustering clusters is shown as follows:

[0138]

[0139] In the formula, d single (C a ,C b ) represents the inter-cluster distance. D lm represents the Euclidean distance between the lth clustering result and the mth clustering result in the same power mode category. C a 、C b represents two different clustering clusters in the same power mode category.

[0140] 3.4) Introduce C-H index into HCA algorithm to determine the optimal number of clustering clusters in the same power mode category.

[0141] The C-H index is shown as follows:

[0142]

[0143] In the formula, r represents the clustering cluster index, R represents the number of clustering clusters. C-H(R) represents the C-H index. B(R) represents the inter-class dispersion. n output represents the total number of clustering results. W(R) represents the intra-class dispersion. u r represents the center point of the rth clustering cluster. C r represents all clustering results of the rth clustering cluster. n r represents the total number of clustering results of the rth clustering cluster. u represents the global center point. x r represents the clustering result feature in the rth clustering cluster.

[0144] The optimal number of clustering is shown as follows:

[0145]

[0146] In the formula, R * is the optimal number of clustering.

[0147] 3.5) Based on the optimal number of clustering clusters, use HCA algorithm to screen the clustering clusters in the same power mode category, and obtain the screened clustering clusters in the same power mode category.

[0148] 3.6) Identify the clustering cluster representing the dangerous power mode category of the enterprise from the screened clustering clusters in the same power mode category through the power center curve.

[0149] Embodiment 6

[0150] The enterprise dangerous electricity accurate early warning method based on the unsupervised clustering and multi-scale integrated framework mainly includes the technical contents of any one of embodiments 1 to 5, further, the dangerous electricity mode early warning model based on the multi-scale electricity data includes a single enterprise scale dangerous electricity early warning model, a same industry scale dangerous electricity early warning model, and a different industry scale dangerous electricity early warning model.

[0151] After the enterprise electricity data is input into the dangerous electricity mode early warning model based on the multi-scale electricity data, the dangerous electricity mode category recognition is first performed by the single enterprise scale dangerous electricity early warning model, if the recognition result of the single enterprise scale dangerous electricity early warning model exists the dangerous electricity mode category, the dangerous electricity mode category is output; if the recognition result of the single enterprise scale dangerous electricity early warning model does not exist the dangerous electricity mode category, the dangerous electricity mode category recognition is performed by the same industry scale dangerous electricity early warning model, if the recognition result of the same industry scale dangerous electricity early warning model exists the dangerous electricity mode category, the dangerous electricity mode category is output; if the recognition result of the same industry scale dangerous electricity early warning model does not exist the dangerous electricity mode category, the dangerous electricity mode category recognition is performed by the different industry scale dangerous electricity early warning model, and the dangerous electricity mode category recognized by the different industry scale dangerous electricity early warning model is output.

[0152] Embodiment 7

[0153] The enterprise dangerous electricity accurate early warning method based on the unsupervised clustering and multi-scale integrated framework mainly includes the technical contents of any one of embodiments 1 to 6, further, the steps of training the single enterprise scale dangerous electricity early warning model by using the training set are as follows:

[0154] a1 obtaining n ent The historical enterprise electricity data of each enterprise is screened and recognized to identify the enterprise dangerous electricity mode category and quantity of each enterprise, and a training set I is constructed.

[0155] a2 constructing a single enterprise scale dangerous electricity early warning model.

[0156] a3 training the single enterprise scale dangerous electricity early warning model by using the training set I, and obtaining the trained single enterprise scale dangerous electricity early warning model.

[0157] Embodiment 8

[0158] The enterprise dangerous electricity accurate early warning method based on the unsupervised clustering and multi-scale integrated framework mainly includes the technical contents of any one of embodiments 1 to 7, further, when training the single enterprise scale dangerous electricity early warning model by using the training set, an ensemble learning strategy is introduced to improve the robustness of the model.

[0159] The steps of the ensemble learning strategy are as follows:

[0160] s1 uses the Bagging ensemble learning method to construct n Bag A basic learner.

[0161] s2 uses the Bootstrapping algorithm to sample with replacement from the training set I to generate n Bag An ensemble learning training set.

[0162] s3 utilizes n Bag Train n ensemble learning training sets respectively Bag From 1 basic learner, we obtain n trained machines. Bag A basic learner.

[0163] s4 acquires real-time electricity consumption data from enterprises and inputs it into the trained n. Bag Given n basic learners, we obtain n Bag ×n div An ensemble learning outcome.

[0164] S5 uses the consensus matrix to classify the electricity consumption patterns of the ensemble learning results, and then uses the K-Means clustering algorithm to reclassify the consensus matrix, resulting in n. result Electricity consumption mode categories.

[0165] The elements of the consensus matrix are as follows:

[0166]

[0167] In the formula, θ, This represents different ensemble learning results. (C) θφ This indicates the frequency at which different ensemble learning results are classified into the same electricity consumption pattern category.

[0168] s6 utilizes n Bag ×n div Calculate n from the ensemble learning results. result The weights of each electricity consumption pattern category are determined, and n is calculated using these weights. result The percentage of each electricity consumption mode category.

[0169] The electricity usage mode category with the highest output share for s7 is the enterprise electricity usage mode category.

[0170] Example 9:

[0171] The method for accurate early warning of hazardous electricity use in enterprises based on unsupervised clustering and multi-scale ensemble framework, the main technical contents of which are described in any one of Examples 1 to 8, and the steps for training a hazardous electricity use early warning model at the same industry scale using the training set are as follows:

[0172] b1 will nent The companies are consolidated according to industry type to obtain n industry This industry.

[0173] The industry types mentioned include coal mines, copper mines, hazardous chemicals, and industrial and commercial trade.

[0174] b2 gets n industry Historical electricity consumption data of enterprises in various industries were used to screen and identify the categories and number of hazardous electricity consumption patterns of enterprises in each industry, and a training set II was constructed.

[0175] b3 Constructs a hazardous electricity use early warning model at the same industry scale.

[0176] b4 uses training set II to train a hazardous electricity use early warning model for the same industry scale, and obtains a well-trained hazardous electricity use early warning model for the same industry scale.

[0177] Example 10:

[0178] A precise early warning method for hazardous electricity use in enterprises based on unsupervised clustering and a multi-scale ensemble framework is described in any one of Examples 1 to 9. Further, the steps for training hazardous electricity use early warning models at different industry scales using the training set are as follows:

[0179] c1 will n ent The companies are consolidated according to industry type to obtain n industry This industry.

[0180] The industry types mentioned include coal mines, copper mines, hazardous chemicals, and industrial and commercial trade.

[0181] c2 gets n ent We use historical electricity consumption data from each company to filter and identify the types and quantities of hazardous electricity usage patterns for each company.

[0182] c3 randomly selects historical electricity consumption data of several enterprises from different industries, along with the corresponding categories and quantities of hazardous electricity consumption patterns, to construct training set III.

[0183] c4 constructs early warning models for hazardous electricity use at different industry scales.

[0184] c5 uses training set III to train early warning models of hazardous electricity use at different industry scales, resulting in well-trained early warning models of hazardous electricity use at different industry scales.

[0185] Example 11:

[0186] See Figures 1 to 7 A precise early warning method for hazardous electricity use in enterprises based on unsupervised clustering and multi-scale ensemble framework includes the following steps:

[0187] Firstly, the enterprise electricity mode mining strategy based on SOM and HCA is constructed. The advantages of SOM clustering high-dimensional curve data are used to mine enterprise electricity mode from massive electricity data, and the advantages of automatic screening and analysis of HCA are used to realize intelligent optimal selection of electricity mode. Secondly, the electricity mode early warning framework based on single enterprise-same industry-different industry multi-level electricity data is designed. The model is trained using single enterprise historical data to enhance the pertinence of the model's early warning ability, and the model is trained using multi-level electricity data such as the same industry and different industries to enhance the generalization ability of the model's early warning ability. Based on this framework, an enterprise dangerous electricity integrated early warning method based on SOM-HCA and multi-scale integration framework is proposed to provide more accurate and reliable electricity safety early warning services for the power system. Finally, the meter electricity data provided by a real power company is verified, which shows that the proposed method can accurately and efficiently early warn the enterprise dangerous electricity, and verifies the effectiveness and practical potential of the proposed method. The specific method steps are as follows:

[0188] (1) SOM enterprise dangerous electricity mode mining method based on high-dimensional electricity data

[0189] The method framework is composed of a type judgment module combined with the definition of electricity mode and an electricity mode mining module for enterprise high-dimensional electricity data, which is introduced as follows:

[0190] For the type judgment module combined with the definition of electricity mode, it judges the enterprise state to belong to the electricity mode category, and the input for subsequent SOM mining of enterprise electricity mode is constructed according to the characteristics of electricity mode. High-risk industries have dangerous electricity modes such as daytime stop and nighttime start, overload electricity, daytime stop and nighttime start, emergency production stop, automatic production stop, and production stop and restart, etc. The definition of various dangerous electricity modes is shown in Table 1.

[0191] Table 1 Definition of enterprise dangerous electricity mode

[0192]

[0193] According to the definition, the enterprise dangerous electricity mode can be classified according to the enterprise state, and the input data of the enterprise dangerous electricity mode mining method shown in Table 2 is constructed according to the characteristics of abnormal electricity mode, which provides suitable input data for subsequent electricity mode mining.

[0194] Table 2 Input form corresponding to each type of dangerous electricity mode

[0195]

[0196] The power consumption mode mining module for high-dimensional power consumption data of enterprises mines the characteristics of power consumption curves of enterprises by SOM, realizes accurate mining of dangerous power consumption modes, and solves the problems of traditional methods that cannot analyze curve characteristics and ignore non-electricity factors. SOM is an unsupervised learning neural network based on competitive learning strategy, which relies on the mutual competition between neurons to gradually optimize the network and maintains the topology of the input space by using the near-neighbor relationship function. Since SOM can also preserve the proximity of data in the process of mining the characteristics of high-dimensional data, it can effectively mine the local features and global structure of power consumption curves in the process of power consumption curve clustering mining, and adapt to the needs of enterprise dangerous power consumption mode mining.

[0197] First, the network structure of the SOM neural network is constructed. SOM has a two-layer network structure, the input layer has n input nodes, n input is the dimension of the input data. The output layer has n output neurons, corresponding to n output clustering results. The learning process of SOM maps each input data to a node on the output layer, and makes the input data that are close in the input space also close in the geometric position of the competition layer nodes. After n input dimensional power consumption curves are learned by competition, n output clustering results are obtained.

[0198] Second, the training process of SOM is performed. The weights of SOM store the characteristics of each node in the competition layer, denoted as The training process is as follows: 1) weight initialization: the weights of the SOM competition layer are initialized to 2) sample selection: the training process uses stochastic gradient descent (SGD) and uses N power curves to learn. 3) distance calculation: the distance between the power curve X i (i=1,2,…,N) and each node in the competition layer is calculated by the distance function (Euclidean distance). 4) competitive learning: the node W i with the shortest distance to the power curve X j is selected as the winning node, j=1,2,…,n output , and its competitive learning process is shown in equation (1). 5) self-organization process: the winning neighborhood σ is determined according to the neighborhood radius, and the amplitude of each node update is calculated by the neighborhood function. 6) weight update: the node weights W in the winning field are updated by the learning rate. Through the above training, the winning node will gradually approach the spatial position of the corresponding power curve.

[0199] ||X i -W||=min{||X i -Wj ||},j = 1,2, …, n output (1)

[0200] Finally, the center curve of each neuron is calculated. After the training of SOM is completed, each neuron has learned the typical characteristics of its corresponding region through the weight vector. In order to further refine the representative power consumption mode of each cluster, statistical analysis needs to be performed on the power consumption curves belonging to the same neuron. For each neuron, all the power consumption curves belonging to it are averaged in the time dimension T to obtain a center curve. If a neuron C l corresponds to N j power consumption curves (l = 1,2, …, n output , j = 1,2, …, N), the center value at time point t is shown in the formula. The center curve of each neuron represents the typical characteristics of the power consumption mode in the cluster, as shown in formula (2).

[0201]

[0202] where X k (t) represents the value of the kth power curve belonging to the neuron at time t. t ∈ [1, …, T].

[0203] (2) Intelligent screening technology of enterprise dangerous power consumption mode based on HCA

[0204] Considering the problem of feature repetition in the enterprise power consumption mode mined by SOM, an artificial intelligence algorithm is needed to intelligently integrate and screen the neurons generated by SOM. This subsection proposes an intelligent screening technology of enterprise dangerous power consumption mode based on HCA. The combination of HCA and SOM can further improve the effect of curve clustering. By calculating the distance or similarity between samples, the most similar samples or clusters are gradually merged to realize the automatic screening and analysis of power consumption mode. The specific introduction is as follows:

[0205] 1) Calculate the similarity between samples: after the SOM neural network clusters and mines the power curves, n output neurons are obtained. The power consumption type characteristics of each neuron can be represented by two-dimensional curve data (x, y). For neurons C l (x l , y l ) and C m (x m , y m ), l, m = 1,2, …, n output , the similarity between neurons is measured by the Euclidean distance, as shown in formula (3).

[0206]

[0207] where d lm (t) denotes the Euclidean distance between the lth neuron and the mth neuron at time t. t e [1, …, T].

[0208] 2) Bottom-up clustering: The distance between all samples is calculated and stored as a distance matrix D, where D lm represents the distance between neuron l and neuron m, the minimum distance between two clusters is evaluated using the single linkage method C a and C b to perform the synthesis of the clustering cluster, as shown in equation (4).

[0209]

[0210] 3) Intelligent screening: Since the traditional HCA algorithm needs to manually specify the number of clustering clusters, the Calinski-Harabasz (C-H) index is introduced to realize the intelligent feedback and screening process of the HCA algorithm, and its calculation process is shown in equations (5)-(7).

[0211]

[0212] where W(k) is the intra-class dispersion, where u l is the center point of the lth cluster, C l is all samples of the lth cluster. B(k) is the inter-class dispersion, where n l is the number of samples of the lth cluster, and u is the global center point of all data. k = 1, 2, …, K max .

[0213] In the bottom-up clustering process, different synthesis times will generate k clustering results, and for each k value in the HCA algorithm, the corresponding C-H index is generated, and the k with the maximum C-H index is selected as the optimal clustering number k * , as shown in equation (8).

[0214]

[0215] 4) Output the screened enterprise abnormal electricity mode, determine k * , and use the HCA algorithm to re-aggregate the electricity type neurons produced by SOM, finally generating n end clusters, and each cluster can be represented by its center curve, as shown in equation (2). Through the center curve, the clustering cluster representing a certain type of abnormal electricity curve can be identified, and the function of screening and identifying a certain type of abnormal electricity mode can be realized.

[0216] (3) Hazardous electricity mode early warning framework based on single enterprise-same industry-different industry multi-scale electricity data:

[0217] In practical application, the early warning model generated by training historical data has a false negative situation, because the training historical data of the enterprise only has part of the dangerous electricity mode, when a new electricity mode appears in the early warning process, the early warning model trained by the historical data cannot accurately warn, therefore, a dangerous electricity mode early warning framework based on single enterprise, same industry, and different industry multi-scale electricity data is proposed. As shown in Figure 2 , the framework is composed of different scale data early warning models, through the complementation of single enterprise, same industry, and different industry multi-scale data, it ensures the pertinence of the enterprise dangerous electricity mode early warning, and also ensures the generalization ability of the method in the real environment, as shown in Figure 2 , the specific introduction is as follows.

[0218] 1) Single enterprise scale dangerous electricity early warning model: in the invention contents (1) and (2), the invention constructs an enterprise dangerous electricity mode mining strategy based on SOM-HCA, in order to enhance the accuracy of the method in identifying abnormal electricity mode of the enterprise, a targeted early warning model is constructed for each enterprise using the electricity data of each enterprise and the state. First, if there are n ent enterprises in the training process, the pth enterprise has n ent-p dangerous electricity modes p = 1, 2, …, n ent , n ent-p dangerous electricity early warning models are constructed for the pth enterprise, the training data required for the corresponding dangerous electricity early warning model is generated from the historical electricity data of the pth enterprise according to the requirements of invention content (1), and the training of the early warning model is completed. Further, in the working process, for the real-time electricity data of the pth enterprise, the input data is constructed according to the requirements of invention content (1), and is input into the n ent-p dangerous electricity early warning models, if none of the n ent-p dangerous electricity early warning models identifies dangerous electricity, it is input into the higher scale early warning model for judgment, otherwise there is a dangerous electricity situation.

[0219] 2) Same industry scale dangerous electricity early warning model: since the single enterprise scale dangerous electricity early warning model constructs a targeted early warning model for each enterprise using its historical data, if the dangerous electricity mode appears in the working process, the early warning accuracy of the model is higher, but if the dangerous electricity mode does not exist in the historical data, the targeted early warning model may misjudge or miss, therefore, the same industry scale dangerous electricity early warning model is constructed. First, the enterprises are integrated according to industry type, such as coal mine, copper mine, dangerous chemicals, industry and trade, etc., after integration, there are n industry industries, n industry-u dangerous electricity modes exist in the uth industry, u = 1, 2, …, n industryFurther, n industry-u dangerous power consumption patterns are constructed for the u-th industry, and the training data required for generating the corresponding dangerous power consumption early warning model is generated from the historical power consumption data of the u-th industry according to the summary (1), and the training of the early warning model is completed. Finally, in the working process, if the p-th enterprise (belonging to the u-th industry) is not identified as a dangerous power consumption pattern by the single-enterprise-scale dangerous power consumption early warning model, it is input into the n industry-u dangerous power consumption pattern early warning model of the u-th industry, and if none of the n industry-u dangerous power consumption early warning models identifies dangerous power consumption, it is input into a higher-scale early warning model for judgment, otherwise there is a certain dangerous power consumption situation.

[0220] 3) Different industry-scale dangerous power consumption early warning models: Similarly, in order to further improve the generalization ability of the early warning model, different industry-scale dangerous power consumption early warning models are proposed. First, n all dangerous power consumption pattern early warning models are constructed using historical power consumption data of different industries in the training process. Further, in the working process, if the p-th enterprise (belonging to the u-th industry) is not identified as an abnormal power consumption pattern by the single-enterprise-scale dangerous power consumption early warning model and the same industry-scale dangerous power consumption early warning model, it is input into the n all dangerous power consumption pattern early warning model, and if none of the n all dangerous power consumption early warning models identifies abnormal power consumption, the p-th enterprise is in a normal power consumption state under the current condition, otherwise there is a certain dangerous power consumption situation.

[0221] 4) Considering that the frequency of different abnormal power consumption patterns in the historical power consumption data of the enterprise is different, the single SOM-HCA model has a bias in the early warning process, in order to improve the robustness of the early warning model and reduce the false alarm and missed alarm situation, this section introduces an ensemble learning strategy in the dangerous power consumption pattern early warning framework based on multi-scale power consumption data. Since the data used in this invention is unlabeled data, a consensus clustering method is introduced to distinguish the ensemble learning results, and finally an enterprise dangerous power consumption precise early warning method based on unsupervised clustering and multi-scale ensemble framework is constructed.

[0222] The ensemble learning strategy is shown in Figure 3 , first, n Bag SOM-HCA models are constructed using the Bagging ensemble learning method, and the Bootstrapping algorithm is used to sample with replacement from the training set to construct n Bag training set support model training, and finally n Bag x n divThere are several clusters. Furthermore, considering that the data used in this study is unlabeled, a consensus clustering method is introduced to calculate the weights of the ensemble learning model results. A consensus matrix C is constructed to classify the ensemble learning algorithms, and its elements C... ij The frequency with which samples i and j are grouped into the same cluster in multiple clustering operations is expressed by the formula shown in equation (9). The consensus matrix is ​​then reclassified using the K-Means clustering algorithm, and finally classified into n clusters. result The results include normal power consumption patterns and various abnormal power consumption patterns, and the classification results are used to calculate the impact on n. Bag ×n div For n result The weights w of each result are assigned. Finally, during the process, a certain electricity data point is input into the ensemble learning strategy, and after n... Bag n SOM-HCA models generate n div Each clustering result is used to calculate the corresponding n based on its weights. result The category with the highest percentage among the classification results is output as the electricity consumption pattern.

[0223]

[0224] Example 12:

[0225] See Figures 1 to 7 A precise early warning method for hazardous electricity consumption in enterprises, based on unsupervised clustering and a multi-scale integration framework, is presented in Example 11. Further, a case study verification and analysis were conducted using electricity consumption data provided by an actual power company. The verification methods M0-M6 and various hazardous electricity consumption behaviors B1-B7 are set as follows:

[0226] Table 3 Comparison Method M0-M6 Settings

[0227]

[0228] Table 4. Classification of Hazardous Electricity Use Behaviors (B1-B7)

[0229]

[0230] (1) Validation of the effectiveness of the enterprise hazardous electricity use behavior mining strategy based on SOM-HCA

[0231] By comparing the accuracy of five methods (M2-M6) in mining 16,529 electricity consumption data from nine coal mining and non-coal mining enterprises from August 2021 to September 2024, it was verified that the basic method M2 proposed in this embodiment can more accurately detect dangerous electricity consumption behaviors of enterprises than the existing method M3 and other unsupervised learning algorithms.

[0232] Table 5. Accuracy of Early Warning for Non-Coal Mine Electricity Consumption Data Using Methods M2-M6

[0233]

[0234] Table 6 Method M2-M6 warning accuracy rate of coal mine power consumption data

[0235]

[0236] The data used for testing is composed as shown in Figure 4 , 5 , and the warning accuracy rate is shown in Tables 5 and 6. As can be seen from the table, the warning accuracy rate of the basic method M2 proposed in this embodiment for various dangerous power consumption behaviors is more than 90%, and the warning accuracy rate of the existing method M3 and other unsupervised learning algorithms is more than 20% lower than that of the M2 method. Compared with other methods, M2 can realize accurate mining of enterprise dangerous power consumption behaviors.

[0237] (2) Accuracy verification of enterprise dangerous power consumption warning method based on multi-scale warning framework and ensemble learning

[0238] In this section, the mining accuracy of three methods M0-M2 for 28601 pieces of power consumption information of 22 industries in four industries including coal mines, non-coal mines, dangerous chemicals, and trade from August 2021 to September 2024 is compared respectively, and it is verified that the method M0 proposed in this embodiment solves the problem that the model trained based on the historical data of enterprise scale cannot identify the dangerous power consumption behaviors that do not appear in the historical data, and at the same time improves the robustness of the model.

[0239] First, the mixed data of coal mines and non-coal mines shown in Figure 6 is used to test M1 and M2. After introducing the ensemble learning strategy, the warning accuracy rate and total accuracy of M1 for various dangerous power consumption behaviors are improved by more than 5% compared with M2.

[0240] Table 7 Method M1-M2 warning accuracy rate of non-coal mine power consumption data

[0241]

[0242] Table 8 Method M1-M2 warning accuracy rate of coal mine power consumption data

[0243]

[0244] Table 9 Method M1-M2 warning accuracy rate of non-coal mine and coal mine power consumption data

[0245]

[0246] Table 10 Method M0-M2 warning accuracy rate of dangerous power consumption behaviors in four industries

[0247]

[0248] Secondly, adopt Figure 7 The four industry-mixed data testing methods M0-M2 shown demonstrate that by introducing a multi-scale early warning framework and ensemble learning strategy into the basic method, high-precision early warning accuracy can be achieved when processing power consumption data from different industries in practical work. The results are shown in Table 10. The M0 method achieves a total early warning accuracy of 97.9% when dealing with data from different industries, which is more than 6% higher than the accuracy of other methods, verifying the effectiveness of the method in this embodiment.

[0249] (3) Efficiency verification of the enterprise's accurate method for early warning of hazardous electricity use

[0250] Since the method proposed in this embodiment provides real-time early warnings during operation, this section verifies that the proposed method M0 can achieve efficient training by comparing the training time of M0 under different dataset sizes. The results are shown in Table 11. Training with three years of electricity consumption data from 22 companies takes only 84 seconds. This demonstrates that in practical applications, the early warning method proposed in this embodiment can achieve efficient training, avoiding delays in actual operation caused by model training.

[0251] Table 11 shows the time required to train M0 on datasets of different sizes.

[0252]

[0253] In summary, this embodiment addresses the shortcomings of existing methods for early warning of hazardous electricity consumption patterns in enterprises, including insufficient intelligence, inability to incorporate curve feature analysis, neglect of non-electrical quantity factors, and the inability of trained models to identify entirely new electricity consumption patterns due to the incompleteness of historical data on enterprises. It proposes a precise early warning method for hazardous electricity consumption patterns in enterprises based on unsupervised clustering and ensemble learning, enabling accurate and intelligent early warning of such patterns. Verification using meter readings provided by an actual power company demonstrates that the proposed method can provide accurate and efficient early warning of hazardous electricity consumption patterns in enterprises, validating its effectiveness and practical potential.

Claims

1. A precise early warning method for hazardous electricity use in enterprises based on unsupervised clustering and a multi-scale ensemble framework, characterized in that... Includes the following steps: 1) Obtain historical enterprise electricity consumption data; 2) Based on the SOM neural network, preliminary clustering of historical enterprise electricity consumption data was performed to obtain different electricity consumption pattern categories. Features of each clustering result If the integer is positive, the steps are as follows: 2.1) Construct several SOM neural network structures; The SOM neural network structure includes an input layer and an output layer; The input layer has Several nodes are used to acquire enterprise electricity consumption data. Dimensions of enterprise electricity consumption data; The output layer has Each neuron learns through competitive interaction with enterprise electricity consumption data. Clustering results; 2.2) Different SOM neural network structures are each mapped to a different electricity consumption mode category; 2.3) Based on the electricity consumption pattern category, the stochastic gradient descent method is used to select data of the corresponding dimension from the historical enterprise electricity consumption data as samples to construct a sample set with different SOM neural network structures; 2.4) Train different SOM neural network structures using sample sets to obtain SOM neural network clustering structures for different electricity consumption patterns; 2.5) Input historical enterprise electricity consumption data into the SOM neural network clustering structure for different electricity consumption pattern categories to obtain the data for different electricity consumption pattern categories. Clustering results; 2.6) Calculate the different electricity consumption patterns. By analyzing the charge center curves of individual neurons, different categories of electricity consumption patterns can be obtained. Features of each clustering result; The electric charge center curve is shown below: (1) In the formula, i represents the electricity consumption pattern category index, and k represents the historical enterprise electricity consumption data index. This represents the neuron index, and t represents time. Represents the i-th electricity consumption mode category. The total number of historical enterprise electricity consumption data corresponding to each neuron; Represents the i-th electricity consumption mode category. Features of each clustering result at time t; This represents the value of the k-th historical enterprise electricity consumption data at time t; 3) Based on the HCA algorithm, different electricity consumption patterns are analyzed. The features of each clustering result are used for secondary clustering to filter and identify the categories of hazardous electricity use patterns of enterprises and construct a training set. 4) Construct an early warning model for dangerous electricity consumption patterns based on multi-scale electricity consumption data; 5) Using historical enterprise electricity consumption data in the training set as input and enterprise hazardous electricity consumption pattern categories as output, train a hazardous electricity consumption pattern early warning model based on multi-scale electricity consumption data to obtain the trained hazardous electricity consumption pattern early warning model based on multi-scale electricity consumption data. 6) Obtain real-time enterprise electricity consumption data and input the real-time enterprise electricity consumption data into the trained dangerous electricity consumption pattern early warning model based on multi-scale electricity data to obtain the current electricity consumption pattern of the enterprise; If a company's electricity usage pattern is deemed hazardous, an early warning will be issued.

2. The enterprise hazardous electricity consumption precision early warning method based on unsupervised clustering and multi-scale integration framework according to claim 1, characterized in that, The categories of electricity usage modes include normal electricity usage modes for enterprises and hazardous electricity usage modes for enterprises; The hazardous electricity usage patterns of the enterprises include daytime shutdown and nighttime operation, overloaded electricity usage, overt shutdown and covert operation, emergency production shutdown, automatic production shutdown, and resumption of work after shutdown.

3. The enterprise hazardous electricity consumption precision early warning method based on unsupervised clustering and multi-scale integration framework according to claim 1, characterized in that, The steps for training the SOM neural network structure using the sample set are as follows: 2.4.1) Initialize the weights of each neuron in the output layer of the SOM neural network structure; 2.4.2) Calculate the distance between each sample in the sample set and the weight of each neuron in the output layer; 2.4.3) Select the neuron closest to each sample as the preferred neuron for that sample, as shown below: (2) In the formula, j represents the sample index. This represents the j-th sample data; Represents the weights of neurons; Represents the neuron index. Indicates the first The weights of each neuron; Indicates the total number of neurons; Represents the distance function; 2.4.4) Determine the winning neighborhood of the preferred neuron based on the neighborhood radius, and calculate the update magnitude of each neuron using the neighborhood function; 2.4.5) The weights of neurons in the winning neighborhood are updated by the learning rate to obtain the trained SOM neural network clustering structure.

4. The enterprise hazardous electricity consumption precision early warning method based on unsupervised clustering and multi-scale integration framework according to claim 1, characterized in that, In step 3), the steps for screening and identifying the categories of hazardous electricity usage patterns of enterprises are as follows: 3.1) Using two-dimensional data to represent the i-th electricity consumption pattern category Features of each clustering result at time t ,Right now ; 3.2) Calculate the Euclidean distance between different clustering results under the same electricity consumption pattern category, as shown below: (3) In the formula, All represent clustering result indices, where i represents the electricity consumption pattern category index and t represents time. Indicates the th electricity consumption mode category under the ith category. The Euclidean distance between the first clustering result and the m-th clustering result at time t; Represents the i-th electricity consumption mode category. Two-dimensional features of each clustering result at time t; This represents the two-dimensional feature of the m-th clustering result for the i-th electricity consumption pattern category at time t; 3.3) The single-linkage method is used to evaluate the Euclidean distance between different clustering results under the same electricity consumption pattern category, and clusters under the same electricity consumption pattern category are synthesized; The inter-cluster distances between different clusters are shown below: (4) In the formula, Indicates the inter-cluster distance; Indicates the first under the same electricity consumption mode category The Euclidean distance between the first clustering result and the m-th clustering result; This represents two different clusters within the same electricity consumption pattern category; 3.4) Introduce the CH index into the HCA algorithm to determine the optimal number of clusters under the same electricity consumption pattern category; The CH index is shown below: (5) (6) (7) In the formula, r represents the cluster index, and R represents the number of clusters; Indicates the CH index; Indicates the inter-class divergence; This represents the total number of clustering results; Indicates the intra-class divergence; This represents the center point of the r-th cluster; This represents all clustering results for the r-th cluster; This represents the total number of clustering results for the r-th cluster; Indicates the global center point; This represents the clustering result feature within the r-th cluster; The optimal number of clusters is shown below: (8) In the formula, The optimal number of clusters; 3.5) Based on the optimal number of clusters, the HCA algorithm is used to filter the clusters under the same electricity consumption pattern category to obtain the filtered clusters under the same electricity consumption pattern category; 3.6) Identify clusters representing the enterprise's hazardous electricity usage patterns from the clusters selected under the same electricity usage pattern category using the electricity consumption center curve.

5. The enterprise hazardous electricity consumption precision early warning method based on unsupervised clustering and multi-scale integration framework according to claim 1, characterized in that, The dangerous electricity consumption pattern early warning model based on multi-scale electricity data includes a single enterprise-scale dangerous electricity consumption early warning model, a same industry-scale dangerous electricity consumption early warning model, and different industry-scale dangerous electricity consumption early warning models. After the enterprise's electricity consumption data is input into the dangerous electricity consumption pattern early warning model based on multi-scale electricity consumption data, it first goes through the single enterprise-scale dangerous electricity consumption early warning model to identify the dangerous electricity consumption pattern category. If the identification result of the single enterprise-scale dangerous electricity consumption early warning model contains a dangerous electricity consumption pattern category, then the dangerous electricity consumption pattern category is output. If the identification result of the single enterprise-scale hazardous electricity use early warning model does not have a hazardous electricity use pattern category, then it will enter the same industry-scale hazardous electricity use early warning model to identify the hazardous electricity use pattern category. If the identification result of the same industry-scale hazardous electricity use early warning model has a hazardous electricity use pattern category, then the hazardous electricity use pattern category will be output. If the identification results of the hazardous electricity use early warning model at the same industry scale do not have a hazardous electricity use pattern category, then proceed to the hazardous electricity use early warning model at different industry scales to identify the hazardous electricity use pattern category, and output the hazardous electricity use pattern category identified by the hazardous electricity use early warning model at different industry scales.

6. The enterprise hazardous electricity consumption precision early warning method based on unsupervised clustering and multi-scale integration framework according to claim 5, characterized in that, The steps for training a single-enterprise-scale hazardous electricity consumption early warning model using a training set are as follows: a1 obtain Historical electricity consumption data of enterprises were used to filter and identify the types and quantities of hazardous electricity consumption patterns for each enterprise, and a training set I was constructed. a2. Construct a single-enterprise-scale early warning model for hazardous electricity use; a3 uses training set I to train a single-enterprise-scale hazardous electricity use early warning model, and obtains a well-trained single-enterprise-scale hazardous electricity use early warning model.

7. The enterprise hazardous electricity consumption precision early warning method based on unsupervised clustering and multi-scale integration framework according to claim 6, characterized in that, When training a single enterprise-scale hazardous electricity use early warning model using the training set, an ensemble learning strategy is also introduced to improve the model's robustness. The steps of the ensemble learning strategy are as follows: s1 is constructed using the Bagging ensemble learning method. A basic learner; s2 uses the Bootstrapping algorithm to sample with replacement from the training set I to generate An integrated learning training set; s3 utilization Train on each ensemble learning training set respectively A basic learner is obtained, and a trained... A basic learner; S4 acquires real-time electricity consumption data from enterprises and inputs it into the trained program. A basic learner is obtained. One ensemble learning outcome; S5 uses the consensus matrix to classify the electricity consumption patterns of the ensemble learning results, and then uses the K-Means clustering algorithm to reclassify the consensus matrix, resulting in... Electricity usage mode categories; The elements of the consensus matrix are as follows: (9) In the formula, Indicates different ensemble learning results; This indicates the frequency at which different ensemble learning results are classified into the same electricity consumption pattern category; S6 utilization Calculate the ensemble learning results The weights of each electricity consumption pattern category are determined, and the weights are used to calculate... The percentage of each electricity consumption mode category; The electricity usage mode category with the highest output share for s7 is the enterprise electricity usage mode category.

8. The enterprise hazardous electricity consumption precision early warning method based on unsupervised clustering and multi-scale integration framework according to claim 5, characterized in that, The steps for training a hazardous electricity use early warning model at the same industry scale using a training set are as follows: b1 will The companies were consolidated according to industry type, and the results were obtained. This industry; The industry types mentioned include coal mining, copper mining, hazardous chemicals, and industrial and commercial trade. b2 acquisition Historical electricity consumption data of enterprises in various industries were used to screen and identify the categories and number of hazardous electricity consumption patterns of enterprises in each industry, and training set II was constructed. b3. Construct a hazardous electricity use early warning model at the same industry scale; b4 uses training set II to train a hazardous electricity use early warning model for the same industry scale, and obtains a well-trained hazardous electricity use early warning model for the same industry scale.

9. The enterprise hazardous electricity consumption precision early warning method based on unsupervised clustering and multi-scale integration framework according to claim 5, characterized in that, The steps for training hazardous electricity use early warning models at different industry scales using the training set are as follows: c1 will The companies were consolidated according to industry type, and the results were obtained. This industry; The industry types mentioned include coal mining, copper mining, hazardous chemicals, and industrial and commercial trade. c2 acquisition Historical electricity consumption data of each enterprise was used to filter and identify the types and number of hazardous electricity consumption patterns for each enterprise. c3 randomly selects historical electricity consumption data of several enterprises from different industries and the corresponding categories and number of dangerous electricity consumption patterns to construct training set III; c4 constructs early warning models for hazardous electricity use at different industry scales; c5 uses training set III to train early warning models of hazardous electricity use at different industry scales, resulting in well-trained early warning models of hazardous electricity use at different industry scales.

Citation Information

Patent Citations

  • Logistic regression health condition judgment and early warning method based on optimization clustering

    CN118114084A

  • Layout optimization method of water quality monitoring points based on rf-c-som clustering algorithm

    US12320794B1