Method and device for predicting power consumption, and electronic equipment

By using sliding windows and clustering algorithms in the energy internet, a sufficiently differentiated dataset is extracted from the electricity load data sequence to generate an electricity load template. This solves the problem of insufficient accuracy in electricity load analysis in existing technologies and enables accurate prediction of future electricity load and formulation of control strategies.

CN115774846BActive Publication Date: 2026-04-21TOYOTA JIDOSHA KK +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TOYOTA JIDOSHA KK
Filing Date
2021-09-06
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing methods for analyzing electricity load in the energy internet suffer from poor accuracy, primarily due to insufficient diversity in the sample sets used in cluster analysis.

Method used

By using a sliding window to extract sequence segments from the first data sequence, multiple datasets are formed. The proportion of conflicting sequence segments in the dataset formed by the maximum window length is ensured to be less than a first threshold. A clustering algorithm is used to generate an electricity load template, and predictions are made based on this template.

Benefits of technology

This improves the accuracy of clustering results, ensuring that the electricity load template matches the actual electricity load characteristics, enabling accurate prediction of electricity load data and providing precise data support for the management and control of the energy internet.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115774846B_ABST
    Figure CN115774846B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, and electronic device for predicting electricity load. The method includes: acquiring a first data sequence; extracting sequence segments from the first data sequence using a sliding window based on a plurality of sequentially increasing window lengths to form a plurality of datasets; performing cluster analysis on each dataset to obtain clustering results, and generating an electricity load template based on the clusters in the clustering results; determining a target template from the plurality of electricity load templates based on the electricity load data of the electricity user within a first time period, and predicting the electricity load data of the electricity user within a second time period based on the determined target template. This method can accurately predict the electricity load data of the electricity user within a second time period, providing accurate data basis for the management and control of the energy internet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of big data and information processing technology, and in particular to a method, apparatus and electronic device for predicting electricity load. Background Technology

[0002] The Energy Internet is a highly integrated information and physical system. Its operation and strategy formulation require the use of big data analytics technologies, and the quality of related algorithms plays a crucial role in determining the system's performance. In the analysis of Energy Internet users and loads, it is necessary to employ adaptive clustering techniques to rationally cluster users and loads, thereby extracting clear and effective system user operation characteristics. Based on the essential characteristics of these operation features, targeted and differentiated services can be provided to enhance the operational efficiency of the Energy Internet. Simultaneously, to complete some low-latency tasks, the algorithms used must have short running times and sufficient accuracy to generate accurate and effective user and load classifications. However, existing methods for analyzing Energy Internet user electricity load still suffer from technical problems related to the relatively poor accuracy of the analysis results. Summary of the Invention

[0003] In view of the above-mentioned problems existing in the prior art, this application provides a method, apparatus and electronic device for predicting electrical load. The technical solution adopted in the embodiments of this application is as follows:

[0004] This application provides a method for predicting electrical load, including:

[0005] Obtain a first data sequence, wherein the first data sequence includes historical electricity load data arranged in chronological order;

[0006] By using sliding windows based on multiple sequentially increasing window lengths, sequence segments are extracted from the first data sequence to form multiple datasets; wherein, the first index of the dataset formed based on the maximum window length is less than a first threshold, and the first index represents the proportion of conflict sequence segments in the dataset; the last electricity load data of the conflict sequence segment is different from that of another conflict sequence segment, while the electricity load data at the other corresponding positions are the same;

[0007] Cluster analysis is performed on each of the datasets to obtain clustering results, and an electricity load template is generated based on the clusters in the clustering results;

[0008] Based on the electricity load data of the electricity user in the first time period, a target template is determined from multiple electricity load templates, and the electricity load data of the electricity user in the second time period is predicted according to the determined target template.

[0009] In some embodiments, the method further includes:

[0010] Based on the predicted electricity load data of electricity consumers in the second time range, a management and control strategy for the energy internet is formulated.

[0011] In some embodiments, the step of extracting sequence segments from the first data sequence using sliding windows based on a plurality of sequentially increasing window lengths to form a plurality of datasets includes:

[0012] The dataset is formed by extracting sequence segments from the first data sequence using the sliding window based on the initial window length.

[0013] Determine the primary metric for this dataset;

[0014] If the first indicator of the dataset is greater than the first threshold, the length of the sliding window is extended. Based on the extended sliding window, sequence segments are iteratively extracted from the first data sequence to form a dataset, until the first indicator in the formed dataset is less than the first threshold and the iteration stops.

[0015] In some embodiments, the step of extracting sequence segments from the first data sequence using sliding windows based on a plurality of sequentially increasing window lengths to form a plurality of datasets includes:

[0016] The sliding window extracts sequence segments from the first data sequence based on the length of each window within the first value range, thereby forming multiple datasets.

[0017] Determine a first index for the dataset formed based on the upper limit of the first value range;

[0018] If the first indicator of the dataset is greater than the first threshold, the window length of the sliding window is extended. Based on the extended window length, the sequence segments are iteratively extracted from the first data sequence to form a dataset, until the first indicator in the formed dataset is less than the first threshold and the iteration stops.

[0019] In some embodiments, the step of performing cluster analysis on each of the datasets to obtain clustering results, and generating an electricity load template based on the clusters in the clustering results, includes:

[0020] Perform cluster analysis on each of the datasets to obtain multiple clustering results;

[0021] Based on a second index of the clustering results, a target clustering result is selected from the clustering results; wherein, the second index is used to characterize the symmetry of the clustering results;

[0022] Based on the clusters in the target clustering results, an electricity load template is generated.

[0023] In some embodiments, selecting a target clustering result from the clustering results based on a second metric includes:

[0024] Determine a second metric for each of the clustering results;

[0025] The clustering result with the smallest value of the second index is selected as the target clustering result.

[0026] In some embodiments, the clustering result includes multiple clusters, each cluster including multiple sequence fragments; the second metric for determining each clustering result includes:

[0027] Based on the median and average values ​​of the electricity load data in the sequence segment, the symmetry index of the sequence segment is determined;

[0028] The geometric mean of the symmetry indices of all the sequence fragments in the cluster is determined as the symmetry index of the cluster.

[0029] The maximum value among the symmetry indices of each cluster in the clustering results is determined as the second index of the clustering results.

[0030] In some embodiments, the symmetry index of the sequence fragment is calculated using the following formula:

[0031] Z mkn =abs(median(Y) mkn )-mean(Y mkn ))

[0032] Among them, Z mkn Y represents the symmetry index of a sequence segment determined based on a power parameter in one dimension of electricity load data; mkn This represents the electrical parameter of one dimension within the nth sequence fragment contained in the kth cluster of the mth clustering result; median(Y) mkn The mean(Y) represents the median of one dimension of the electrical parameters in the electrical load data of the sequence segment; mkn ) represents the average value of one dimension of the power parameters in the power load data of the sequence segment; abs() represents the absolute value;

[0033] The symmetry index of the clusters is calculated using the following formula:

[0034]

[0035] Among them, Z mk The symmetry index represents the clustering clusters; N represents the dimension of the power parameters included in the power load data.

[0036] Another aspect of this application provides an electrical load prediction device, comprising:

[0037] An acquisition module is used to acquire a first data sequence, wherein the first data sequence includes historical electricity load data arranged in chronological order;

[0038] The segmentation module is used to extract sequence segments from the first data sequence using a sliding window based on multiple sequentially increasing window lengths, to form multiple datasets respectively; wherein, the first index of the dataset formed based on the maximum window length is greater than a first threshold, and the first index represents the proportion of conflict sequence segments in the dataset; the last power load data of the conflict sequence segment is different from that of another conflict sequence segment, and the power load data at the other corresponding positions are the same;

[0039] The analysis module is used to perform cluster analysis on each of the datasets to obtain clustering results, and generate an electricity load template based on the clusters in the clustering results;

[0040] The prediction module is used to determine a target template from multiple electricity load templates based on the electricity load data of the electricity user in a first time range, and to predict the electricity load data of the electricity user in a second time range according to the determined target template.

[0041] In another aspect, this application provides an electronic device, including at least a memory and a processor, wherein the memory stores an application program, and the processor implements the method described above when executing the application program in the memory.

[0042] The electricity load prediction method of this application embodiment extracts sequence segments from a first data sequence using a sliding window to form multiple datasets. The proportion of conflicting sequence segments in the datasets formed based on the maximum window length is less than a first threshold. This ensures sufficient differences between the sequence segments in the datasets, resulting in high accuracy of the clustering results obtained from cluster analysis. Consequently, the electricity load template formed based on the clustering results matches the actual electricity load characteristics of the electricity user. Based on this electricity load template, the electricity load data of the electricity user within a second time range can be accurately predicted, providing accurate data for the management and control of the energy internet. Attached Figure Description

[0043] Figure 1 This is a flowchart of the power load prediction method according to an embodiment of this application;

[0044] Figure 2 This is a flowchart of step S2 in the power load prediction method of this application embodiment;

[0045] Figure 3 This is a flowchart of step S3 in the power load prediction method of this application embodiment;

[0046] Figure 4 This is a flowchart of step S32 in the power load prediction method of this application embodiment;

[0047] Figure 5 This is a schematic diagram of step S321;

[0048] Figure 6 This is a structural block diagram of the electrical load prediction device according to an embodiment of this application;

[0049] Figure 7 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0050] Various embodiments and features of this application are described herein with reference to the accompanying drawings.

[0051] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this application will be apparent to those skilled in the art.

[0052] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0053] These and other features of this application will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.

[0054] It should also be understood that although this application has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of this application.

[0055] The above and other aspects, features and advantages of this application will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.

[0056] Specific embodiments of this application are described thereafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of this application, which can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the application. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but merely serve as the basis and representative basis for the claims to teach those skilled in the art to use this application in a variety of substantially any suitable detailed structures.

[0057] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in other embodiments,” all of which may refer to one or more of the same or different embodiments according to this application.

[0058] Analysis of electricity load analysis methods for energy internet users reveals that conventional clustering analysis methods yield poor accuracy. This is attributed to insufficient diversity among samples in the clustering dataset. To address this, this application provides an electricity load prediction method. This method uses a sliding window to extract sequence segments from a first data sequence, forming multiple datasets. At least in the datasets formed based on the maximum window length, the proportion of conflicting sequence segments is less than a first threshold. This ensures sufficient diversity among the sequence segments in the datasets, resulting in high accuracy of the clustering results. Consequently, the electricity load template formed based on the clustering results matches the actual electricity load characteristics of the users. This electricity load template can accurately predict the electricity load data of users within a second time frame, providing accurate data for the management and control of the energy internet.

[0059] Figure 1 This is a flowchart of the electricity load prediction method according to an embodiment of this application. See also: Figure 1 As shown, the method for predicting electrical load in this application embodiment specifically includes the following steps:

[0060] S1, Obtain a first data sequence, wherein the first data sequence includes historical electricity load data arranged in chronological order;

[0061] The electricity load data includes data related to the power consumed by the electricity user from the power system at a given moment, such as total power consumption, active power, reactive power, voltage, current, and other relevant power parameters. This electricity load data may include only one dimension of power parameters, for example, only total power consumption or voltage. It may also include multiple dimensions of power parameters, such as total power consumption, active power, and voltage.

[0062] Electricity users can be a single household, a company, or a factory, or they can be a group of electricity users in an area, such as a building, a residential area, a community, or a region.

[0063] During the power supply process, the power load data of each power consumer in the power system can be monitored regularly. For example, the power load data of each power consumer can be monitored every hour, day or other time intervals to form historical power load data of the power consumer.

[0064] Once historical electricity load data for a specific electricity consumer is obtained, the historical electricity load data can be sorted according to the chronological order of monitoring time to form a first data sequence. Each element in the first data sequence is formed by a historical electricity load data point.

[0065] S2, by using a sliding window based on multiple sequentially increasing window lengths, sequence segments are extracted from the first data sequence to form multiple datasets; wherein, the first index of the dataset formed based on the maximum window length is less than a first threshold, and the first index represents the proportion of conflict sequence segments in the dataset; the last power load data of the conflict sequence segment is different from that of another conflict sequence segment, and the power load data at the other corresponding positions are the same.

[0066] The sliding window method, also known as the sliding-window method, is a method that uses a sliding window of a specific length to slide along a data sequence in steps of a specific size, selecting sequence segments that fall within the sliding window after each slide. In this application, a sliding window is used to select sequence segments from a first data sequence as samples for cluster analysis, and a dataset is formed from the selected sequence segments as the sample set.

[0067] Multiple sequentially increasing window lengths can be configured. These window lengths can increase sequentially by a fixed increment or by a non-fixed increment. For example, sequentially increasing window lengths R-2, R-1, and R can be configured. A sliding window of length R-2 slides along the first data sequence to select multiple sequence segments of length R-2, forming a first dataset. A sliding window of length R-1 selects sequence segments of length R-1 from the first data sequence, forming a second dataset. A sliding window of length R selects sequence segments of length R from the first data sequence, forming a third dataset.

[0068] During the process of extracting sequence fragments and forming datasets, it is also necessary to ensure that at least the first metric of the dataset formed based on the maximum window length is greater than a first threshold. That is, in the dataset formed by extracting sequence fragments using a sliding window of the maximum window length, the proportion of conflicting sequence fragments to the total number of sequence fragments in the dataset is less than a pre-configured first threshold. For example, taking datasets formed using sequence fragments of length R-2, R-1, and R respectively, the proportion of conflicting sequence fragments in the third dataset must be less than the first threshold. The first threshold is the threshold at which the proportion of conflicting sequence fragments in the dataset affects the sample variability. This ensures that the samples in the dataset formed by the longest sequence fragment have sufficient variability.

[0069] A conflicting sequence segment is defined as one whose last element differs from another conflicting sequence segment, while the elements at the remaining corresponding positions are the same. Specifically, it means the last element of the electricity load data is different, while the electricity load data at the remaining corresponding positions are the same. Taking two sequence segments X1 and X2 of length R in the third dataset as an example, X1 = {x...} 11 ,x 12 ,…,x 1R}, X2={x 21 ,x 22 ,…,x 2R When X1 and X2 are conflicting sequence segments, the following relationship must be satisfied between X1 and X2: 11 =x 21 ,x 12 =x 22 ,x 1(R-1) =x 2(R-1) And x 1R ! = x 2R .

[0070] S3, perform cluster analysis on each dataset to obtain clustering results, and generate an electricity load template based on the clusters in the clustering results.

[0071] If the multiple datasets formed meet preset conditions, that is, if at least the first index of the dataset formed based on the maximum window length is less than a first threshold, then clustering analysis is performed on each dataset using a clustering algorithm to obtain multiple clustering results. Each clustering result includes one or more clusters, which are sets of multiple similar samples in the dataset. In other words, clusters are sets of sequence segments containing similar electricity load characteristics.

[0072] Since the sequence segments within a cluster share similar electricity load characteristics, analyzing these common characteristics can create an electricity load template that characterizes the historical electricity load characteristics of a user. For example, when the electricity load data includes total power consumption, the template can include a time-series curve of total power consumption to reflect the historical time-series variation of total power consumption. When the electricity load data includes multidimensional power parameters, the template can also be used to represent the comprehensive electricity load characteristics of the user.

[0073] S4. Based on the electricity load data of the electricity user in the first time range, a target template is determined from multiple electricity load templates, and the electricity load data of the electricity user in the second time range is predicted according to the determined target template.

[0074] The first time range is the historical time range, and the second time range is the future time range. Specifically, the second time range can be a future time range that is adjacent to the first time range, or it can be a future time range that is not adjacent to the first time range.

[0075] When it is necessary to predict the future electricity load data of a power consumer, the power load data of the consumer within the first time frame can be obtained, that is, the historical power load data of the consumer. Based on this historical power load data, the power load template with the highest matching degree to the consumer's historical power load data is selected from multiple power load templates and used as the target template. In this way, the determined target template can reflect the historical power load characteristics of the consumer. Subsequently, based on this target template, the future power load data of the consumer can be accurately predicted.

[0076] For example, when the electricity load data includes total electricity consumption, the time-series variation curve of the total electricity consumption of the electricity user within a first time period can be matched with the time-series variation curves of the total electricity consumption included in each electricity load template, and the electricity load template with the highest matching degree is used as the target template. Based on the time-series variation curve of the total electricity consumption included in the target template, the future change of the total electricity consumption of the electricity user within a second time period can be accurately predicted, such as obtaining the time-series variation curve of the total electricity consumption of the electricity user within the second time period.

[0077] The electricity load prediction method proposed in this application involves extracting sequence segments from a first data sequence using a sliding window to form multiple datasets. The proportion of conflicting sequence segments in the datasets formed based on the maximum window length is less than a first threshold. This ensures sufficient difference between the sequence segments in the datasets, resulting in high accuracy of the clustering results. Consequently, the electricity load template formed based on the clustering results matches the actual electricity load characteristics of the electricity user. Based on this electricity load template, the electricity load data of the electricity user within a second time range can be accurately predicted, providing accurate data for the management and control of the energy internet.

[0078] In some embodiments, the method further includes:

[0079] Based on the predicted electricity load data of electricity consumers in the second time range, a management and control strategy for the energy internet is formulated.

[0080] The energy internet's management and control strategies can include operational strategies, control strategies, management strategies, and transaction strategies. The electricity load data of the electricity user within the second time frame is also the user's future electricity load data. Since the electricity load prediction method in this application's embodiments can accurately predict the user's future electricity load data, based on this data, precise management and control strategies for the energy internet can be formulated, providing targeted and differentiated services and enhancing the operational efficiency of the energy internet.

[0081] Based on the electricity load data of electricity consumers within a second time frame, management and control strategies for the energy internet can be formulated. This can be done by developing a management and control strategy specifically for a single electricity consumer based on their future electricity load data. For example, when a consumer is located in a specific region, management strategies for the energy internet and power supply strategies for that region can be developed based on the region's future electricity load data. Alternatively, a comprehensive management and control strategy can be developed based on the future electricity load data of multiple electricity consumers. This could involve coordinating transaction and operational strategies between multiple electricity consumers and power suppliers. Furthermore, emergency response strategies for the energy internet can be developed based on the future electricity load data of one or more electricity consumers to improve the operational stability of the energy internet.

[0082] In some embodiments, step S2, which involves extracting sequence segments from the first data sequence using sliding windows based on a plurality of sequentially increasing window lengths to form a plurality of datasets, includes:

[0083] S211, using the sliding window based on the initial window length, extract sequence segments from the first data sequence to form the dataset;

[0084] S212, determine the first indicator for this dataset;

[0085] S213, if the first indicator of the dataset is greater than the first threshold, extend the length of the sliding window, and based on the extended sliding window, iteratively extract sequence segments from the first data sequence to form a dataset, until the first indicator in the formed dataset is less than the first threshold and stop iterating.

[0086] In the initial state, only an initial window length can be configured. A sliding window with the initial window length is used to extract sequence segments from the first dataset, thus forming an initial dataset. A first index of this initial dataset is calculated, and it is determined whether the first index of the initial dataset is greater than a first threshold. If the first index of the initial dataset is greater than the first threshold, the length of the sliding window is extended. Based on the extended sliding window, sequence segments are extracted from the first dataset, thus forming an expanded dataset. It is determined whether the first index of the expanded dataset is greater than the first threshold. If the first index of the expanded dataset is greater than the first threshold, the window length is extended again. Based on the further extended sliding window, sequence segments are extracted from the first dataset, thus forming another expanded dataset. This process is iterated until the first index in the formed expanded dataset is less than the first threshold, at which point the iteration stops. Both the formed initial dataset and all expanded datasets are used as sample sets for cluster analysis; that is, cluster analysis is performed on the initial dataset and each expanded dataset in step S3.

[0087] For example, an initial window length of R-2 can be configured. A sliding window of length R-2 is used to truncate sequence segments of length R-2 to form the first dataset. It is then determined whether the first indicator of the first dataset is greater than a first threshold. If the first indicator is greater than the first threshold, the window length is extended to R-1. A sliding window of length R-1 is used to truncate sequence segments of length R-1 to form the second dataset. It is then determined whether the first indicator of the second dataset is greater than the first threshold. If the first indicator is still greater than the first threshold, the window length is extended to R. A sliding window of length R is used to truncate sequence segments of length R to form the third dataset. If the first indicator of the third dataset is less than the first threshold, it indicates that the sample set used for cluster analysis meets the preset conditions, and the selection of the sample set for cluster analysis is complete.

[0088] Based on the proportion of conflicting sequence fragments in the dataset, the window length of the sliding window is increased to extend the length of the sequence fragments used as samples, thus forming a new sample set (i.e., the dataset). By iteratively performing the above process, the diversity of samples in the sample set can be improved, and the number of samples in the sample set can be reasonably expanded, which is beneficial to improving the performance of the clustering algorithm.

[0089] In some embodiments, step S2, which involves extracting sequence segments from the first data sequence using sliding windows based on a plurality of sequentially increasing window lengths to form a plurality of datasets, includes:

[0090] S221, using the sliding window, sequence segments are extracted from the first data sequence based on the length of each window within the first value range, to form multiple datasets respectively;

[0091] S222, determine the first index of the dataset formed based on the upper limit of the first value range;

[0092] S223, if the first indicator of the dataset is greater than the first threshold, extend the window length and, based on the extended window length, iteratively extract sequence segments from the first data sequence to form a dataset, until the first indicator in the formed dataset is less than the first threshold and stop iterating.

[0093] Cooperate Figure 2 As shown, in the initial state, it is not limited to configuring an initial window length, but can also configure an initial window length range, that is, a first value range. This first value range can include multiple different window length values. By using a sliding window, sequence segments are extracted from the first data sequence based on each window length value within the initial window length range to form multiple initial datasets. For example, when the initial window length range includes three window length values: R-2, R-1, and R, sequence segments can be extracted using sliding windows with window lengths of R-2, R-1, and R respectively, forming the first dataset, the second dataset, and the third dataset, which serve as the initial datasets.

[0094] At this point, it's unnecessary to determine the first indicator for each initial dataset separately. Instead, it's sufficient to determine the first indicator for the initial dataset formed based on the upper limit of the first value range. If the first indicator in this initial dataset is greater than the first threshold, the length of the sliding window is extended. The extended sliding window iteratively extracts sequence segments from the first data sequence to form an expanded dataset, until the first indicator of the expanded dataset is less than the first threshold. For example, the window length can be extended to R+1, R+2, or longer until the first indicator of the resulting expanded dataset is less than the first threshold. Configuring the first value range in the initial state helps increase the number of sample sets used for cluster analysis, thereby enabling the formation of multiple clustering results and enriching the number of references for the clustering results.

[0095] In some embodiments, if the first indicator of the dataset is greater than a first threshold, the window length is extended and, based on the extended window length, sequence segments are iteratively extracted from the first data sequence to form a dataset, until the first indicator in the formed dataset is less than the first threshold, and the iteration stops, including:

[0096] If the first metric of the dataset is greater than the first threshold, the window length of the sliding window is extended by one unit.

[0097] Based on the extended sliding window, sequence segments are iteratively extracted from the first data sequence to form a dataset, and the iteration stops when the first index in the formed dataset is less than the first threshold.

[0098] That is, the window length is increased by one unit with each iteration. For example, if the first value range is [4,7], then sequence segments are truncated based on sliding windows of lengths 4, 5, 6, and 7, respectively, forming four initial datasets. If the first index of the initial dataset formed by the sequence segment of length 7 is greater than the first threshold, the window length of the sliding window is increased to 8, and a sequence segment of length 8 is truncated from the first data sequence based on the sliding window of length 8, thus forming an expanded dataset. If the first index of the expanded dataset is less than the first threshold, the sequence segment truncating stops; if it is greater than the first threshold, the window length is increased by one unit until the first index of the formed expanded dataset is less than the first threshold.

[0099] Cooperate Figure 3 As shown, in some embodiments, step S3, which involves performing cluster analysis on each of the datasets to obtain clustering results, and generating an electricity load template based on the clusters in the clustering results, includes:

[0100] S31, perform cluster analysis on each of the datasets to obtain multiple clustering results.

[0101] S32, based on the second index of the clustering results, select a target clustering result from the clustering results; wherein, the second index is used to characterize the symmetry of the clustering results.

[0102] S33, Based on the clusters in the target clustering results, generate an electricity load template.

[0103] To ensure the accuracy of clustering results, it is necessary to select from multiple clustering results to obtain the clustering result that best reflects the electricity load characteristics of the electricity user. Establishing a simple and reliable selection criterion for all clustering results and choosing the optimal clustering result is a challenge. Traditional clustering algorithm design lacks a fast and efficient algorithm for selecting clustering results. If selection is based on information entropy, intra-cluster distance, or inter-cluster distance polarity, the algorithm complexity is high, and with large amounts of data, the processing latency is long, resulting in poor timeliness. To overcome this technical problem, this application proposes a symmetry-based clustering result selection method.

[0104] In practice, M datasets, including an initial dataset and an expanded dataset, are acquired. After cluster analysis, M clustering results are generated, such as Y1, Y2, Y3, ..., YM. The symmetry of each clustering result is analyzed to determine a second index for each clustering result, which characterizes the symmetry of the clustering result. Based on the second index, the clustering result with the best symmetry is selected as the target clustering result. Subsequently, based on the clusters in the target clustering result, an electricity load template is generated, which can accurately and effectively reflect the electricity load characteristics of the electricity user. Moreover, selecting clustering results based on symmetry has low complexity and can effectively reduce the latency of electricity load analysis. For clustering results that cannot converge, their performance can also be determined based on the symmetry selection method, thus successfully completing the selection of clustering results, which has high timeliness and practicality.

[0105] Cooperate Figure 4 As shown, in one specific embodiment, the clustering result includes multiple clusters, and each cluster includes multiple sequence fragments, that is, each cluster includes multiple samples; the step of selecting a target clustering result from the clustering result based on the second index of the clustering result includes:

[0106] S321, Based on the median and average values ​​of the electricity load data in the sequence segment, determine the symmetry index of the sequence segment.

[0107] A sequence segment comprises multiple elements arranged chronologically, each element consisting of a single electricity load data point. Based on this, a symmetry index for the sequence segment can be determined using the absolute value of the distance between the median and average distances of the electricity load data within the sequence segment. Figure 5 As shown. Specifically, the symmetry index of a sequence segment can be calculated using the following formula:

[0108] Z mkn =abs(median(Y) mkn )-mean(Y mkn ))

[0109] Among them, Z mkn Y represents the symmetry index of a sequence segment determined based on a power parameter in one dimension of electricity load data; mkn This represents the electrical parameter of one dimension within the nth sequence fragment contained in the kth cluster of the mth clustering result; median(Y) mkn The mean(Y) represents the median of one dimension of the electrical parameters in the electrical load data of the sequence segment; mkn ) represents the average value of one dimension of the power parameters in the power load data of the sequence segment; abs() represents the absolute value.

[0110] When the electricity load data includes N dimensions of power parameters, the symmetry index of the sequence segment can be calculated based on the power parameters of each dimension.

[0111] S322, determine the geometric mean of the symmetry index of all the sequence segments in the cluster, and use it as the symmetry index of the cluster.

[0112] Specifically, the symmetry index of clusters can be calculated using the following formula:

[0113]

[0114] Among them, Z mk The symmetry index represents the clustering clusters; N represents the dimension of the power parameters included in the power load data.

[0115] S323, determine the maximum value among the symmetry indices of each cluster in the clustering results, and use it as the second index of the clustering results.

[0116] Specifically, the second metric of the clustering results can be calculated using the following formula:

[0117] Z m =max k Z mk

[0118] Among them, Z m The second indicator representing the clustering results.

[0119] S324. Select the clustering result with the smallest value of the second index as the target clustering result.

[0120] That is, from multiple clustering results, the clustering result with the smallest value of the second index is selected, and it is considered to have the best symmetry, and is taken as the target clustering result.

[0121] Theoretically, samples in a sample set should conform to a uniform distribution. Therefore, the more uniform the density distribution of samples in a sample set, the better the symmetry of the sample set. Based on this, the absolute value of the distance between the median and the mean of the elements in the sample is used to determine the symmetry index of the sample. To reduce the influence of the weight of elements at different positions in each sample, the geometric mean of the symmetry index of all samples in the cluster is calculated as the symmetry index of the cluster. The maximum value of the symmetry index of all clusters is selected as the second index of the clustering result. Then, the clustering result with the smallest value of the second index is selected as the target clustering result. The electricity load template generated based on this target clustering result can accurately and effectively reflect the electricity load characteristics of the electricity user. This method is suitable for parallel computing of big data, helps to reduce latency, and has good timeliness and practicality.

[0122] See Figure 6 As shown in the illustration, this application also provides an electrical load prediction device, comprising:

[0123] The acquisition module 51 is used to acquire a first data sequence, wherein the first data sequence includes historical electricity load data arranged in chronological order;

[0124] The interception module 52 is used to intercept sequence segments from the first data sequence using a sliding window based on multiple sequentially increasing window lengths to form multiple datasets; wherein, the first index of the dataset formed based on the maximum window length is less than a first threshold, and the first index represents the proportion of conflict sequence segments in the dataset; the last power load data of the conflict sequence segment is different from that of another conflict sequence segment, and the power load data at the other corresponding positions are the same;

[0125] Analysis module 53 is used to perform cluster analysis on each of the datasets to obtain clustering results, and generate an electricity load template based on the clusters in the clustering results;

[0126] The prediction module 54 is used to determine a target template from multiple electricity load templates based on the electricity load data of the electricity user in a first time range, and to predict the electricity load data of the electricity user in a second time range according to the determined target template.

[0127] In some embodiments, the apparatus further includes:

[0128] The module is designed to formulate management and control strategies for the energy internet based on the predicted electricity load data of electricity consumers in the second time range.

[0129] In some embodiments, the interception module 52 is specifically used for:

[0130] The dataset is formed by extracting sequence segments from the first data sequence using the sliding window based on the initial window length.

[0131] Determine the primary metric for this dataset;

[0132] If the first indicator of the dataset is greater than the first threshold, the length of the sliding window is extended. Based on the extended sliding window, sequence segments are iteratively extracted from the first data sequence to form a dataset, until the first indicator in the formed dataset is less than the first threshold and the iteration stops.

[0133] In some embodiments, the interception module 52 is specifically used for:

[0134] The sliding window extracts sequence segments from the first data sequence based on the length of each window within the first value range, thereby forming multiple datasets.

[0135] Determine a first index for the dataset formed based on the upper limit of the first value range;

[0136] If the first indicator of the dataset is greater than the first threshold, the window length of the sliding window is extended. Based on the extended window length, the sequence segments are iteratively extracted from the first data sequence to form a dataset, until the first indicator in the formed dataset is less than the first threshold and the iteration stops.

[0137] In some embodiments, the analysis module 53 is specifically used for:

[0138] Perform cluster analysis on each of the datasets to obtain multiple clustering results;

[0139] Based on a second index of the clustering results, a target clustering result is selected from the clustering results; wherein, the second index is used to characterize the symmetry of the clustering results;

[0140] Based on the clusters in the target clustering results, an electricity load template is generated.

[0141] In some embodiments, the analysis module 53 is specifically used for:

[0142] Determine a second metric for each of the clustering results;

[0143] The clustering result with the smallest value of the second index is selected as the target clustering result.

[0144] In some embodiments, the analysis module 53 is specifically used for:

[0145] Based on the median and average values ​​of the electricity load data in the sequence segment, the symmetry index of the sequence segment is determined;

[0146] The geometric mean of the symmetry indices of all the sequence fragments in the cluster is determined as the symmetry index of the cluster.

[0147] The maximum value among the symmetry indices of each cluster in the clustering results is determined as the second index of the clustering results.

[0148] In some embodiments, the symmetry index of the sequence fragment is calculated using the following formula:

[0149] Z mkn =abs(median(Y) mkn )-mean(Y mkn ))

[0150] Among them, Z mkn Y represents the symmetry index of a sequence segment determined based on a power parameter in one dimension of electricity load data; mkn This represents the nth sequence fragment contained within the kth cluster of the mth clustering result, median(Y) mkn The mean(Y) represents the median of one dimension of the electrical parameters in the electrical load data of the sequence segment. mkn ) represents the average value of one dimension of the power parameters in the power load data of the sequence segment, and abs() represents the absolute value;

[0151] The symmetry index of the clusters is calculated using the following formula:

[0152]

[0153] Among them, Z mk The symmetry index represents the clustering clusters; N represents the dimension of the power parameters included in the power load data.

[0154] See Figure 7 As shown, this application embodiment also provides an electronic device, including at least a memory 61 and a processor 62. The memory 61 stores an application program, and the processor 62 implements the method described in any of the above embodiments when executing the application program on the memory 61.

[0155] Those skilled in the art will understand that embodiments of this application can be provided as methods, electronic devices, computer-readable storage media, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware. Furthermore, this application can take the form of a computer program product implemented on one or more computer-readable storage media containing computer-readable program code. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.

[0156] The aforementioned processor can be a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0157] The aforementioned memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0158] The aforementioned readable storage medium may be a magnetic disk, optical disk, DVD, USB, read-only memory (ROM) or random access memory (RAM), etc. This application does not limit the specific form of storage medium.

[0159] The above embodiments are merely exemplary embodiments of this application and are not intended to limit this application. The scope of protection of this application is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to this application within its substance and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of this application.

Claims

1. A method for predicting electrical load, characterized in that, include: Obtain a first data sequence, wherein the first data sequence includes historical electricity load data arranged in chronological order; By using sliding windows based on multiple sequentially increasing window lengths, sequence segments are extracted from the first data sequence to form multiple datasets; wherein, the first index of the dataset formed based on the maximum window length is less than a first threshold, and the first index represents the proportion of conflict sequence segments in the dataset; the last electricity load data of the conflict sequence segment is different from that of another conflict sequence segment, while the electricity load data at the other corresponding positions are the same; Cluster analysis is performed on each of the datasets to obtain clustering results, and an electricity load template is generated based on the clusters in the clustering results; Based on the electricity load data of the electricity user in the first time period, a target template is determined from multiple electricity load templates, and the electricity load data of the electricity user in the second time period is predicted according to the determined target template.

2. The method according to claim 1, characterized in that, The method further includes: Based on the predicted electricity load data of electricity consumers in the second time period, a management and control strategy for the energy internet is formulated.

3. The method according to claim 1, characterized in that, The step of extracting sequence segments from the first data sequence using sliding windows based on multiple sequentially increasing window lengths to form multiple datasets includes: The dataset is formed by extracting sequence segments from the first data sequence using the sliding window based on the initial window length. Determine the primary metric for this dataset; If the first indicator of the dataset is greater than the first threshold, the length of the sliding window is extended. Based on the extended sliding window, sequence segments are iteratively extracted from the first data sequence to form a dataset, until the first indicator in the formed dataset is less than the first threshold and the iteration stops.

4. The method according to claim 1, characterized in that, The step of extracting sequence segments from the first data sequence using sliding windows based on multiple sequentially increasing window lengths to form multiple datasets includes: The sliding window extracts sequence segments from the first data sequence based on the length of each window within the first value range, thereby forming multiple datasets. Determine a first index for the dataset formed based on the upper limit of the first value range; If the first indicator of the dataset is greater than the first threshold, the window length of the sliding window is extended. Based on the extended window length, sequence segments are iteratively extracted from the first data sequence to form a dataset, until the first indicator in the formed dataset is less than the first threshold and the iteration stops.

5. The method according to claim 1, characterized in that, The step of performing cluster analysis on each of the datasets to obtain clustering results, and generating an electricity load template based on the clusters in the clustering results, includes: Perform cluster analysis on each of the datasets to obtain multiple clustering results; Based on a second index of the clustering results, a target clustering result is selected from the clustering results; wherein, the second index is used to characterize the symmetry of the clustering results; Based on the clusters in the target clustering results, an electricity load template is generated.

6. The method according to claim 5, wherein, The second metric, based on the clustering results, selects the target clustering result from the clustering results, including: Determine a second metric for each of the clustering results; The clustering result with the smallest value of the second index is selected as the target clustering result.

7. The method according to claim 6, wherein, The clustering result includes multiple clusters, and each cluster includes multiple sequence fragments; The second metric for determining each of the clustering results includes: Based on the median and average values ​​of the electricity load data in the sequence segment, the symmetry index of the sequence segment is determined; The geometric mean of the symmetry indices of all the sequence fragments in the cluster is determined as the symmetry index of the cluster. The maximum value among the symmetry indices of each cluster in the clustering results is determined as the second index of the clustering results.

8. The method according to claim 7, wherein, The symmetry index of the sequence segment is calculated using the following formula: in, Z mkn It represents the symmetry index of a sequence segment determined based on a power parameter in one dimension of electricity load data; Y mkn This represents the electrical parameter of one dimension in the nth sequence segment contained within the kth cluster of the mth clustering result; median ( Y mkn ) represents the median of one dimension of the electrical parameters in the electrical load data of the sequence segment; mean ( Y mkn ) represents the average value of one dimension of the electrical parameters in the electrical load data of the sequence segment; abs () represents absolute value; The symmetry index of the clusters is calculated using the following formula: in, Z mk The symmetry index represents the clustering clusters; N represents the dimension of the power parameters included in the electricity load data.

9. A device for predicting electrical load, characterized in that, include: An acquisition module is used to acquire a first data sequence, wherein the first data sequence includes historical electricity load data arranged in chronological order; The interception module is used to intercept sequence segments from the first data sequence using a sliding window based on multiple sequentially increasing window lengths to form multiple datasets; wherein, the first index of the dataset formed based on the maximum window length is greater than a first threshold, and the first index represents the proportion of conflict sequence segments in the dataset; the last power load data of the conflict sequence segment is different from that of another conflict sequence segment, and the power load data at the other corresponding positions are the same; The analysis module is used to perform cluster analysis on each of the datasets to obtain clustering results, and generate an electricity load template based on the clusters in the clustering results; The prediction module is used to determine a target template from multiple electricity load templates based on the electricity load data of the electricity user in a first time range, and to predict the electricity load data of the electricity user in a second time range according to the determined target template.

10. An electronic device comprising at least a memory and a processor, wherein the memory stores an application program, and the processor, when executing the application program in the memory, implements the method as claimed in any one of claims 1-8.

Citation Information

Patent Citations

  • High sliding window data stream anomaly detection method based on layered clustering

    CN103400152A

  • Energy Internet user electricity consumption prediction method and system

    CN108573323A