A smart power distribution method and system for smart courtyards

By iteratively clustering and removing outlier data points from courtyard electricity consumption data, the problem of insufficient intelligent adjustment in traditional smart courtyard power distribution systems has been solved, resulting in more accurate power distribution results and resource utilization.

CN118468193BActive Publication Date: 2024-11-01BEIJING HEMEI JIAYUAN TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional smart courtyard power distribution systems cannot intelligently adjust to factors such as season, weather, and usage patterns, resulting in resource waste and poor user experience. Furthermore, the accuracy of courtyard power consumption data is insufficient when the environment changes, affecting the power distribution results.

Method used

By iteratively clustering the electricity consumption data of the courtyard, calculating the similarity and anomaly of data points, and eliminating abnormal data points, intelligent power distribution is achieved.

Benefits of technology

It improves the accuracy of courtyard electricity consumption data, ensures the precision of power distribution results and the rational allocation of resources, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118468193B_ABST
    Figure CN118468193B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology, and in particular to an intelligent power distribution method and system for a smart courtyard. The method comprises the steps of: iteratively clustering the courtyard electricity consumption data to obtain clustering results; for any iterative clustering result, calculating the similarity between any two data points; calculating the comprehensive similarity of any data point according to the similarity of the data points; calculating the abnormality of any cluster cluster according to the proportion of the number of data in any cluster cluster in the clustering result and the discreteness of the cluster cluster; calculating the participation index of any data point according to the average value of the abnormality of the cluster cluster in the iteration process and the comprehensive similarity; performing anomaly detection by participating in anomaly detection algorithm according to the participation index of the data point, completing the elimination of abnormal data points, and realizing intelligent power distribution. The present invention provides more accurate power distribution results for smart courtyards.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an intelligent power distribution method and system for a smart courtyard. Background Art

[0002] The smart courtyard system integrates various sensors, actuators and intelligent control units to achieve intelligent management and control of lighting, irrigation, security monitoring and other facilities in the courtyard. As an important part of the smart courtyard, the intelligent power distribution system provides power supply for various equipment and facilities and realizes remote control. However, the traditional power distribution system is usually based on timed switches or manual operation, that is, it cannot be intelligently adjusted according to factors such as season, weather and usage mode, resulting in waste of resources or poor user experience. Therefore, the present invention proposes an intelligent power distribution method and system for smart courtyards, which realizes intelligent power distribution of the smart courtyard system by monitoring the user's behavior habits.

[0003] For example, in the patent "A distribution terminal management method and system" with authorization announcement number CN116883059B, the collected courtyard electricity consumption data is directly clustered, and the power demand is calculated based on the clustering results, thereby achieving reasonable distribution of electricity.

[0004] However, when collecting the garden electricity consumption data, if the surrounding environment changes, the collected data will be inaccurate, thus affecting the clustering results and further affecting the reasonable distribution of electricity. For example, extreme temperatures will affect the working efficiency of the meter or sensor, resulting in abnormal readings, making the collected data contain more and more similar abnormal data. When clustering these abnormal data, it will affect the accuracy of the clustering results, thus affecting the accurate distribution results of the smart garden system. Summary of the invention

[0005] The purpose of the present invention is to provide an intelligent power distribution method and system for a smart courtyard, so as to solve the technical problem of inaccurate power distribution results for the smart courtyard.

[0006] In a first aspect, the present invention provides an intelligent power distribution method for a smart courtyard, which adopts the following technical solutions:

[0007] Acquire the courtyard electricity consumption data, perform iterative clustering on the courtyard electricity consumption data, and obtain clustering results;

[0008] For any iterative clustering result, for two data points in different clusters, the similarity between the two data points is recorded as 0; for two data points in the same cluster, the similarity between the two data points is calculated based on the Euclidean distance of the data points and the absolute value of the difference in the degree of outliers, wherein the Euclidean distance and the absolute value of the difference in the degree of outliers are negatively correlated with the degree of similarity;

[0009] Calculate the comprehensive similarity of any data point based on the similarity of the data points;

[0010] Calculate the abnormality of any cluster according to the proportion of the data quantity of any cluster in the clustering results and the degree of dispersion of the cluster, wherein the data quantity is negatively correlated with the degree of abnormality, and the degree of dispersion is positively correlated with the degree of abnormality;

[0011] Calculate the participation index of any data point according to the mean value of the abnormality degree and the comprehensive similarity of the cluster in which the data point is located during the iteration process, wherein the mean value of the abnormality degree and the comprehensive similarity are negatively correlated with the participation index;

[0012] Abnormal data points are eliminated based on the participation indicators of the data points, and intelligent power distribution is achieved.

[0013] In one embodiment, for two data points in the same cluster, calculating the similarity of the two data points according to the Euclidean distance of the two data points and the absolute value of the difference in outlier degree, comprises the steps of:

[0014] ;

[0015] In the formula, Indicates Data points and The similarity of the data points; Indicates Data points and The Euclidean distance between data points; Indicates The first The degree of outlier of a data point; Indicates The first The degree of outlier of a data point; Expressed as a natural constant The exponential function of base .

[0016] The effect is that by calculating the Euclidean distance between data points, the relative position of the two in the cluster can be quantified, and by considering the degree of outliers between the two in the cluster, data points with far Euclidean distances but close outliers can be better captured, and the similarity between data points can be more accurately evaluated.

[0017] In one embodiment, the outlier degree satisfies the expression:

[0018] ;

[0019] In the formula, Indicates The first The degree of outlier of a data point; Indicates The total number of data points in the clusters; Indicates The mean Euclidean distance of all data points in a cluster to the cluster center of the cluster; Indicates the ordinal number of the data point in the cluster; Indicates The first cluster Data points to The Euclidean distance between the cluster centers of the clusters; Expressed as a natural constant The exponential function of base .

[0020] The effect is that by calculating the RMS value of the distance distribution between each data point and the cluster center of the cluster it belongs to, the distribution of data points within the entire cluster can be obtained. This helps to determine the compactness and concentration of data points within the cluster, making the calculation result of the outlier degree more accurate.

[0021] In one embodiment, the method for obtaining the comprehensive similarity includes:

[0022] For any two data points, the average similarity between the two data points in all rounds of iterations is taken as the average similarity between the two data points; the average similarity between any data point and all other data points is taken as the comprehensive similarity of the data point.

[0023] The effect is that by calculating the average similarity between each data point and all other data points to obtain the comprehensive similarity of the data point, the error caused by random differences between individual data points can be reduced, and the impact of this error can be reduced by considering the overall trend.

[0024] In one embodiment, the abnormality degree satisfies the expression:

[0025] ;

[0026] In the formula, Indicates The abnormality of each cluster; Indicates The total number of data points in the clusters; Indicates the total number of data points involved in clustering; Indicates The mean Euclidean distance of all data points in a cluster to the cluster center of the cluster; Indicates the ordinal number of the data point in the cluster; Indicates The first cluster Data points to The Euclidean distance between the cluster centers of the clusters; Represents the standard normalization function.

[0027] The effect is: the degree of abnormality of the cluster is calculated by the number of data points in the cluster and the distribution of data points in the cluster. By comprehensively considering these two factors, the degree of abnormality of the cluster can be more comprehensively evaluated, and by normalizing the degree of abnormality, it is avoided that the calculated abnormality degrees of all smaller clusters are high. By considering the relative size of the cluster, the degree of abnormality of the cluster can be more accurately evaluated.

[0028] In one embodiment, the participation index satisfies the expression:

[0029] ;

[0030] Indicates engagement metrics for data points; Indicates The comprehensive similarity of data points; Indicates The average abnormality of the cluster where the data point is located in each iteration.

[0031] In one embodiment, the method of eliminating abnormal data points according to the participation index of the data points and realizing intelligent power distribution includes:

[0032] Make the participation index greater than the preset participation index threshold The data points are involved in the anomaly detection of the isolation forest, and the anomaly score of each data is obtained. The anomaly score greater than the preset anomaly score threshold is The data points are eliminated and the eliminated data points are used as samples to realize intelligent power distribution.

[0033] In a second aspect, the present invention provides an intelligent power distribution system for a smart courtyard, which adopts the following technical solutions:

[0034] An intelligent power distribution system for a smart courtyard comprises: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned intelligent power distribution method for a smart courtyard is implemented.

[0035] By adopting the above technical solution, the above-mentioned intelligent power distribution method for smart courtyards is generated into a computer program and stored in a memory to be loaded and executed by a processor, so that a terminal device is made according to the memory and the processor for easy use.

[0036] The present invention has the following technical effects:

[0037] The present invention performs abnormality detection on the garden power consumption data and removes the abnormal data according to the abnormality detection result, thereby making the power distribution result of the garden data more accurate.

[0038] Furthermore, the present invention obtains the comprehensive similarity of any data point and the degree of abnormality of its cluster during the iteration process, and calculates the participation index of the data point according to the comprehensive similarity of the data point and the degree of abnormality, and screens the collected courtyard electricity consumption data according to the participation index, and uses the screened data as samples of the anomaly detection algorithm for anomaly detection, thereby making the anomaly detection result more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] Figure 1 It is a method flow chart of an intelligent power distribution method for a smart courtyard in an embodiment of the present invention. DETAILED DESCRIPTION

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

[0042] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.

[0043] The embodiment of the present invention discloses an intelligent power distribution method for a smart courtyard, referring to Figure 1 , comprising steps S1 to S6:

[0044] S1: Obtain the courtyard electricity consumption data, perform iterative clustering on the courtyard electricity consumption data, and obtain clustering results.

[0045] It should be noted that the courtyard electricity consumption data refers to the electricity consumption and power data of each branch in the courtyard. By monitoring the electricity consumption data, it can help detect whether the electrical system in the courtyard is operating normally, whether there are signs of energy waste or equipment failure, and help optimize energy management and save costs.

[0046] In one embodiment, by installing a smart meter or sensor on each power branch, the power consumption data of each branch can be collected in real time.

[0047] It should be noted that the present invention does not limit the period for collecting the power consumption data of each branch by using a smart meter or a sensor, and the implementer can set it according to the actual situation, for example, 0.2S.

[0048] In one embodiment, the power consumption data of each branch collected at the same time is taken as a multidimensional data point, and all the obtained multidimensional data points are taken as cluster samples, and an iterative clustering operation is performed on them using an iterative self-organizing clustering algorithm to obtain a clustering result.

[0049] It should be noted that each dimension of the obtained multi-dimensional data points represents the power consumption data of a branch.

[0050] At this point, the clustering of the courtyard electricity consumption data and the acquisition of the clustering results are completed.

[0051] S2: Calculate the similarity between any two data points;

[0052] It should be noted that the theoretical basis of the isolation forest algorithm is that the proportion of abnormal data in the total sample size is very small, and abnormal points are often more easily "isolated" than normal data points. In a normal data set, normal points are usually densely distributed, while abnormal points are often relatively few isolated points. When using the isolation forest algorithm to detect abnormalities in courtyard electricity data, interference from the external environment, such as electromagnetic interference, temperature, humidity and other environmental factors may also affect the accuracy of the meter or sensor, resulting in data anomalies. For example, extreme temperatures can affect the working efficiency of the meter or sensor, resulting in abnormal readings, so that the collected data contains more and more similar abnormal data. Therefore, the present invention needs to calculate the similarity between any two data points.

[0053] In one embodiment, for any two data points completed in any round of iteration, if the two data points are in different clusters, the similarity between the two data points is recorded as 0; if the two data points are in the same cluster, the similarity is calculated as follows:

[0054]

[0055] In the formula, Indicates Data points and The similarity of the data points; Indicates Data points and The Euclidean distance between data points; Indicates The first The degree of outlier of a data point; Indicates The first The degree of outlier of a data point; Expressed as a natural constant The exponential function of base .

[0056] in, The smaller the value of is, the closer the distance between the two data points is, and the higher their similarity is; otherwise, the lower their similarity is. It represents the difference in the degree of outliers between the two data points. The smaller the difference, the higher the similarity between the two data points. Otherwise, the similarity is lower.

[0057] The calculation formula for the outlier degree of any data point is as follows:

[0058]

[0059] In the formula, Indicates The first The degree of outlier of a data point; Indicates The total number of data points in the clusters; Indicates The mean Euclidean distance of all data points in a cluster to the cluster center of the cluster; Indicates the ordinal number of the data point in the cluster; Indicates The first cluster Data points to The Euclidean distance between the cluster centers of the clusters; Expressed as a natural constant The exponential function of base .

[0060] in, Indicates the distance distribution of all data points in the cluster to the cluster center. The smaller its value is, the more uniform the distance distribution of all data points in the cluster to the cluster center is. The larger the value of is, the farther the data point is from the cluster center. The smaller the value of , the higher the outlier degree of the data point, and vice versa.

[0061] It should be noted that the degree of outlier only represents the distance between the data point and the cluster to which it belongs. The above formula is only a preferred method for obtaining the degree of outlier of the data point. The implementer can use other methods to obtain the degree of outlier of any data point, as long as the repeatability can characterize the degree of outlier of the data point. For example, the normalized result of the Euclidean distance between the data point and the cluster center of the cluster to which it belongs can be directly used as the degree of outlier of the data point.

[0062] S3: Calculate the comprehensive similarity of any data point;

[0063] It should be noted that the comprehensive similarity of each data point cannot be measured only by the similarity between any two data points. Therefore, it is necessary to comprehensively consider the similarity between the same data point and all other data points to calculate and obtain the comprehensive similarity of the data point.

[0064] In one embodiment, for any two data points, the average similarity between the two data points in all rounds of iteration is taken as the average similarity between the two data points; further, the average similarity between any data point and all collected data points is obtained; the average of the average similarity between any data point and all other data points is taken as the comprehensive similarity of the data point.

[0065] At this point, the calculation of the comprehensive similarity of any data point is completed.

[0066] S4: Calculate the abnormality degree of any cluster;

[0067] It should be noted that since the isolation forest algorithm has certain requirements on the number of abnormal data and needs to ensure that the number of abnormal data is small, it is necessary to reflect the abnormality degree of each data point by calculating the abnormality degree of any cluster.

[0068] In one embodiment, the calculation formula for calculating the abnormality degree of any cluster in the clustering results according to the data quantity ratio of the cluster and the discrete degree of the cluster is as follows:

[0069]

[0070] In the formula, Indicates The abnormality of each cluster; Indicates The total number of data points in the clusters; Indicates the total number of data points involved in clustering; Indicates The mean Euclidean distance of all data points in a cluster to the cluster center of the cluster; Indicates the ordinal number of the data point in the cluster; Indicates The first cluster Data points to The Euclidean distance between the cluster centers of the clusters; Represents the standard normalization function.

[0071] in, Indicates The ratio of the total number of data points in a cluster to the total number of data points participating in the cluster. The smaller the value, the higher the abnormality of the cluster. It indicates the degree of dispersion of all data points of the cluster. The larger the value is, the higher the degree of dispersion of all data points of the cluster is, that is, the higher the abnormality of the cluster is. Conversely, the abnormality of the cluster is lower.

[0072] Furthermore, for any data point in the process of continuous iteration, the abnormality degree of the cluster in each round of iteration is obtained, and the average abnormality degree of the cluster in which the data point is located in the iteration process is obtained.

[0073] At this point, the calculation of the abnormality degree of any cluster is completed.

[0074] S5: Calculate the participation index of any data point according to the average value of the abnormality degree and the comprehensive similarity of the cluster in which the data point is located during the iteration process.

[0075] It should be noted that due to the requirement of the isolation forest algorithm on the number of abnormal data, it is necessary to filter out some of the data points with high similarity and more abnormality to ensure that the number of abnormal data points is small, so that the anomaly detection results of the collected courtyard electricity consumption data using the isolation forest algorithm can be more accurate.

[0076] In one embodiment, the calculation formula for calculating the participation index of any data point according to the average value of the abnormality degree of the cluster in which the data point is located during the iteration process and the comprehensive similarity is as follows:

[0077]

[0078] In the formula, Indicates engagement metrics for data points; Indicates The comprehensive similarity of data points; Indicates The average abnormality of the cluster where the data point is located in each iteration.

[0079] Among them, The higher the comprehensive similarity of the data points and the greater the average abnormality of the cluster in each iteration, the higher the comprehensive similarity of the data points and the greater the abnormality, the smaller the participation index of the data points. Conversely, the greater the participation index of the data points.

[0080] At this point, the calculation of the participation index of any data point is completed.

[0081] S6: Abnormal data points are eliminated according to the participation index of the data points, and intelligent power distribution is realized.

[0082] In one embodiment, the participation index is set to be greater than a preset participation index threshold. The data points are involved in the anomaly detection of the isolation forest, and the anomaly score of each data is obtained. The anomaly score greater than the preset anomaly score threshold is The data points are eliminated, and the eliminated data points are used as samples for analysis and processing to achieve intelligent power distribution.

[0083] It should be noted that To preset the participation indicator threshold, The abnormal score threshold is preset, and the present invention does not specifically limit it. The implementer can set it according to the actual situation. For example, , .

[0084] It should be further explained that obtaining the anomaly score of each data is a step included in the isolation forest algorithm, which is a prior art.

[0085] It is a prior art to realize intelligent power distribution by analyzing and processing the eliminated data points as samples, for example, as described in the patent "A distribution terminal management method and system" with publication number CN116883059B, intelligent power distribution is realized by analyzing and processing the collected data.

[0086] Through the above steps, the screening of courtyard electricity consumption data is completed and the intelligent power distribution of the smart courtyard is completed.

[0087] An embodiment of the present invention further discloses an intelligent power distribution system for a smart courtyard, including a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, an intelligent power distribution method for a smart courtyard according to the present invention is implemented.

[0088] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0089] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory, a dynamic random access memory, a static random access memory, an enhanced dynamic random access memory, a high bandwidth memory, a hybrid storage cube, etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of the device or accessible or connectable to the device.

[0090] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

[0091] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. An intelligent power distribution method for a smart courtyard, characterized in that: Includes steps: Acquire the courtyard electricity consumption data, perform iterative clustering on the courtyard electricity consumption data, and obtain the clustering results; For any iterative clustering result, for two data points in different clusters, the similarity between the two data points is recorded as 0; for two data points in the same cluster, the similarity between the two data points is calculated based on the Euclidean distance of the data points and the absolute value of the difference in the degree of outliers, wherein the Euclidean distance and the absolute value of the difference in the degree of outliers are negatively correlated with the degree of similarity; Calculate the comprehensive similarity of any data point based on the similarity of the data points; Calculate the abnormality of any cluster according to the proportion of data in any cluster in the clustering results and the degree of dispersion of the cluster, wherein the proportion of data is negatively correlated with the degree of abnormality, and the degree of dispersion is positively correlated with the degree of abnormality; Obtain the abnormality degree of the cluster in which any data point belongs in each iteration process, obtain the average abnormality degree of the data point in the iteration process, and calculate the participation index of the data point according to the average abnormality degree and the comprehensive similarity, wherein the average abnormality degree and the comprehensive similarity are negatively correlated with the participation index; Abnormal data points are eliminated based on the participation indicators of the data points, and intelligent power distribution is achieved.

2. The intelligent power distribution method for a smart courtyard according to claim 1, characterized in that: For two data points in the same cluster, the similarity of the two data points is calculated according to the Euclidean distance of the data points and the absolute value of the difference in the degree of outliers, including the steps of: ; In the formula, Indicates Data points and The similarity of the data points; Indicates Data points and The Euclidean distance between data points; Indicates The first The degree of outlier of a data point; Indicates The first The degree of outlier of a data point; Indicated by natural constant The exponential function of base .

3. The intelligent power distribution method for a smart courtyard according to claim 2, characterized in that: The degree of outlier satisfies the expression: ; In the formula, Indicates The first The degree of outlier of a data point; Indicates The total number of data points in the clusters; Indicates The mean Euclidean distance of all data points in a cluster to the cluster center of the cluster; Indicates the ordinal number of the data point in the cluster; Indicates The first Data points to The Euclidean distance between the cluster centers of the clusters; Indicated by natural constant The exponential function of base .

4. The intelligent power distribution method for a smart courtyard according to claim 1, characterized in that: The method for obtaining the comprehensive similarity includes: For any two data points, the average similarity between the two data points in all rounds of iterations is taken as the average similarity between the two data points; the average similarity between any data point and all other data points is taken as the comprehensive similarity of the data point.

5. The intelligent power distribution method for a smart courtyard according to claim 1, characterized in that: The abnormality degree satisfies the expression: ; In the formula, Indicates The abnormality of each cluster; Indicates The total number of data points in the clusters; Indicates the total number of data points involved in clustering; Indicates The mean Euclidean distance of all data points in a cluster to the cluster center of the cluster; Indicates the ordinal number of the data point in the cluster; Indicates The first Data points to The Euclidean distance between the cluster centers of the clusters; Represents the standard normalization function.

6. The intelligent power distribution method for a smart courtyard according to claim 1, characterized in that: The participation index satisfies the expression: ; Indicates engagement metrics for data points; Indicates The comprehensive similarity of data points; Indicates The average abnormality of the clusters in which the data points are located in each iteration; Indicated by natural constant The exponential function of base .

7. The intelligent power distribution method for a smart courtyard according to claim 1, characterized in that: The method of eliminating abnormal data points according to the participation index of the data points and realizing intelligent power distribution includes: Make the participation index greater than the preset participation index threshold The data points are used to participate in the anomaly detection of the isolation forest, and the anomaly score of each data is obtained. The anomaly score greater than the preset anomaly score threshold is The data points are eliminated, and the eliminated data points are used as samples to realize intelligent power distribution.

8. An intelligent power distribution system for smart courtyards, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, an intelligent power distribution method for a smart courtyard according to any one of claims 1 to 7 is implemented.