Method, device and equipment for determining power distribution strategy for medium- and long-term regional users

By obtaining and analyzing the timing information of historical electricity, meteorological and distribution transactions in the target area, and using spectral clustering and timing neural network technology to extract the changing characteristics and impact weights of influencing factors, the problem of adjusting distribution strategies of medium and long-term regional users is solved, and more efficient and reliable grid operation is achieved.

CN119151243BActive Publication Date: 2025-05-16ELECTRIC POWER SCI & RES INST OF STATE GRID TIANJIN ELECTRIC POWER CO +2
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411612354.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-05-16
Estimated Expiration
2044-11-13

AI Technical Summary

Technical Problem

The lack of targeted adjustment methods for power distribution strategies for medium and long-term regional users in the prior art, which makes it difficult for the power grid to accurately predict and adjust when facing complex and fluctuating electricity demands.

Method used

By obtaining the historical electricity, meteorological and distribution transaction timing information of the target area, the spectrum clustering algorithm is used to cluster out influencing factors closely related to electricity consumption, and then using the timing neural network to extract the change characteristics and influence weights of these factors, thereby predicting the target electricity consumption data and determining the distribution strategy.

Benefits of technology

This method can more accurately capture the complex characteristics in timing information, adjust the distribution strategy according to the change characteristics and influence weights, optimize the distribution of power grid resources, improve the operating efficiency of the power grid and enhance reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119151243B_ABST
    Figure CN119151243B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and equipment for determining a power distribution strategy for users in a medium- and long-term region. The method comprises: obtaining target historical time series information for a target region within a historical period; clustering the target historical time series information based on a spectral clustering algorithm to obtain time series information of target factors; extracting features of the time series information of the target factors using a time series neural network to obtain change characteristics and influence weights of the target factors; and processing the change characteristics and influence weights of the target factors using a time series neural network to obtain target power consumption data for a target period, so as to determine a power distribution strategy for a distribution network for the target region based on the target power consumption time series data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power distribution technology, and more specifically to a method, device and equipment for determining a power distribution strategy for medium- and long-term regional users. Background Art

[0002] With the continuous growth of economic development and social electricity demand, electricity demand presents a more complex trend of change. Electricity demand is affected by many factors. The power grid faces the challenges of increasing complexity and abnormal fluctuations. When formulating medium- and long-term regional user power planning, it is necessary to accurately predict future electricity consumption and then make targeted adjustments to the power grid's distribution strategy to meet user needs. The existing technology lacks a method for making targeted adjustments to medium- and long-term regional user distribution strategies. Summary of the invention

[0003] In view of the above problems, the present invention provides a method, device and equipment for determining a power distribution strategy for users in a medium- to long-term area.

[0004] According to a first aspect of the present invention, a method for determining a power distribution strategy for users in a medium- and long-term region is provided, comprising: obtaining target historical time series information for a target region within a historical period, wherein the target historical time series information comprises: target historical power consumption time series information, target historical meteorological time series information and target historical power distribution transaction time series information; clustering the target historical time series information based on a spectral clustering algorithm to obtain time series information of target factors, wherein the target factors represent influencing factors closely associated with historical power consumption; extracting features of the time series information of the target factors using a time series neural network to obtain change characteristics and influence weights of the target factors, wherein the change characteristics comprise: periodic change characteristics and real-time change characteristics, and the influence weights represent the degree of influence of each change characteristic on the target power consumption time series data of the target period, and the time series neural network is trained using sample historical power consumption data as labels; and processing the change characteristics and influence weights of the target factors using the time series neural network to obtain the target power consumption data of the target period, so as to determine a power distribution strategy for the distribution network of the target region based on the target power consumption time series data.

[0005] According to an embodiment of the present invention, the above-mentioned timing neural network includes a multi-scale routing module, and the above-mentioned multi-scale routing module includes a feature extraction layer, a pooling layer and a path selection layer. The above-mentioned timing neural network is used to extract features from the timing information of the above-mentioned target factor to obtain the change characteristics and influence weights of the above-mentioned target factor, including: using the above-mentioned feature extraction layer to perform discrete Fourier transform on the timing information of the above-mentioned target factor to obtain a frequency component sequence; and performing inverse discrete Fourier transform on the first k frequency components to obtain the periodic change characteristics of the above-mentioned target factor, k is an integer greater than 1; using the above-mentioned pooling layer to average pool and weight the periodic change characteristics of the above-mentioned target factor to obtain the real-time change characteristics of the above-mentioned target factor; and using the path selection layer to input the above-mentioned periodic change characteristics and the above-mentioned real-time change characteristics into the multi-scale router to generate the above-mentioned influence weight.

[0006] According to an embodiment of the present invention, the above-mentioned time series neural network also includes: a multi-scale attention module and a multi-scale aggregation module. The above-mentioned time series neural network is used to process the change characteristics and influence weights of the above-mentioned target factors to obtain the target power consumption time series data of the above-mentioned target time period, including: using the above-mentioned multi-scale attention module to fuse the above-mentioned periodic change characteristics based on the attention mechanism to obtain the fused periodic change characteristics; using the above-mentioned multi-scale attention module to fuse the above-mentioned real-time change characteristics based on the above-mentioned attention mechanism to obtain the fused real-time change characteristics; and using the above-mentioned multi-scale aggregation module to process the above-mentioned fused periodic change characteristics and the above-mentioned fused real-time change characteristics according to the above-mentioned influence weights to generate the above-mentioned target power consumption time series data.

[0007] According to an embodiment of the present invention, the above-mentioned multi-scale attention module is used to fuse the above-mentioned periodic change features based on the attention mechanism to obtain a fused periodic change feature, including: dividing the above-mentioned periodic change features to obtain multiple first feature vectors; internally fusing each of the above-mentioned first feature vectors based on the self-attention mechanism to obtain each fused first feature; fusing between each of the above-mentioned first feature vectors based on the interactive attention mechanism to obtain a fused second feature; and splicing the above-mentioned fused first features and the above-mentioned fused second feature to obtain the above-mentioned fused periodic change feature.

[0008] According to an embodiment of the present invention, the multi-scale attention module is used to fuse the real-time change features based on the attention mechanism to obtain fused real-time change features, including: dividing the real-time change features to obtain multiple second feature vectors; internally fusing the second feature vectors based on the self-attention mechanism to obtain fused third features; fusing the second feature vectors based on the interactive attention mechanism to obtain a fused fourth feature; and splicing the fused third features and the fused fourth feature to obtain the fused real-time change features.

[0009] According to an embodiment of the present invention, before obtaining the target historical time series information for the target area within the historical period, the method further includes: obtaining the initial historical time series information for the target area within the historical period, wherein the initial historical time series information includes: initial historical electricity consumption time series information, initial historical meteorological time series information and initial historical power distribution transaction time series information; using an isolation forest algorithm to respectively determine abnormal information and abnormal moments corresponding to the abnormal information from the initial historical time series information; wherein the abnormal information includes at least one of the following: historical abnormal electricity consumption information, historical abnormal meteorological information and historical abnormal power distribution transaction time series information; and removing the abnormal information, and correcting the abnormal information based on historical information corresponding to at least two normal moments adjacent to the abnormal moment, to obtain the target historical time series information.

[0010] According to an embodiment of the present invention, the above-mentioned spectral clustering algorithm is based on which the above-mentioned target historical time series information is clustered to obtain the time series information of the target factors, including: constructing a similarity matrix according to the above-mentioned target historical time series information, wherein each element in the above-mentioned similarity matrix represents the correlation between each factor and the historical electricity consumption; calculating the adjacency matrix and the degree matrix respectively according to the above-mentioned similarity matrix; generating a Laplace matrix according to the above-mentioned adjacency matrix and the above-mentioned degree matrix; calculating t eigenvectors corresponding to the first t eigenvalues ​​in the normalized Laplace matrix based on the eigenincreasing principle, where t is an integer greater than 1; and clustering the above-mentioned t eigenvectors to obtain the time series information of the above-mentioned target factors.

[0011] According to an embodiment of the present invention, the above-mentioned determination of the distribution strategy of the distribution network for the above-mentioned target area based on the above-mentioned target power consumption time series data includes: determining the power load data corresponding to each moment and the changing trend of the power load data at adjacent moments based on the above-mentioned target power consumption time series data; and determining the above-mentioned distribution strategy based on the above-mentioned power load data and the above-mentioned changing trend.

[0012] The second aspect of the present invention provides a device for determining a power distribution strategy for medium- and long-term regional users, comprising: an acquisition module for acquiring target historical time series information for a target area within a historical period, wherein the target historical time series information includes: target historical power consumption time series information, target historical meteorological time series information and target historical power distribution transaction time series information; a clustering module for clustering the target historical time series information based on a spectral clustering algorithm to obtain time series information of target factors, wherein the target factors represent influencing factors closely related to historical power consumption; a feature extraction module for extracting features from the time series information of the target factors using a time series neural network to obtain change characteristics and influence weights of the target factors; wherein the change characteristics include: periodic change characteristics and real-time change characteristics; the influence weight represents the degree of influence of each change characteristic on the target power consumption time series data of the target period; and a processing module for processing the change characteristics and influence weights of the target factors using the time series neural network to obtain the target power consumption data of the target period, so as to determine the power distribution strategy of the distribution network for the target area based on the target power consumption time series data.

[0013] According to an embodiment of the present invention, the above-mentioned temporal neural network includes a multi-scale routing module, and the above-mentioned multi-scale routing module includes a feature extraction layer, a pooling layer and a path selection layer. The above-mentioned feature extraction module includes: a discrete Fourier transform submodule, which is used to use the above-mentioned feature extraction layer to perform discrete Fourier transform on the timing information of the above-mentioned target factor to obtain a frequency component sequence; and perform an inverse discrete Fourier transform on the first k frequency components to obtain the periodic change characteristics of the above-mentioned target factor, k is an integer greater than 1; a pooling submodule, which is used to use the above-mentioned pooling layer to perform average pooling and weighted processing on the periodic change characteristics of the above-mentioned target factor to obtain the real-time change characteristics of the above-mentioned target factor; and an influence weight generation submodule, which is used to use the path selection layer to input the above-mentioned periodic change characteristics and the above-mentioned real-time change characteristics into the multi-scale router to generate the above-mentioned influence weight.

[0014] According to an embodiment of the present invention, the above-mentioned time series neural network also includes: a multi-scale attention module and a multi-scale aggregation module, and the above-mentioned processing module includes: a periodic fusion sub-module, which is used to use the above-mentioned multi-scale attention module to fuse the above-mentioned periodic change characteristics based on the attention mechanism to obtain a fused periodic change characteristic; a real-time fusion sub-module, which is used to use the above-mentioned multi-scale attention module to fuse the above-mentioned real-time change characteristics based on the above-mentioned attention mechanism to obtain a fused real-time change characteristic; and a multi-scale aggregation sub-module, which is used to use the above-mentioned multi-scale aggregation module to process the above-mentioned fused periodic change characteristics and the above-mentioned fused real-time change characteristics according to the above-mentioned influence weights to generate the above-mentioned target power consumption time series data.

[0015] According to an embodiment of the present invention, the multi-scale aggregation submodule includes: a division unit, used to divide the periodic change feature to obtain multiple first feature vectors; an internal fusion unit, used to internally fuse the first feature vectors based on a self-attention mechanism to obtain the fused first features; a second feature fusion unit, used to fuse the first feature vectors based on an interactive attention mechanism to obtain the fused second features; and a periodic splicing unit, used to splice the fused first features and the fused second features to obtain the fused periodic change feature.

[0016] According to an embodiment of the present invention, the above-mentioned real-time fusion submodule includes: a second division unit, used to divide the above-mentioned real-time change feature to obtain multiple second feature vectors; a second internal fusion unit, used to internally fuse each of the above-mentioned second feature vectors based on a self-attention mechanism to obtain each fused third feature; a fourth feature fusion unit, used to fuse between each of the above-mentioned second feature vectors based on an interactive attention mechanism to obtain a fused fourth feature; and a real-time splicing unit, used to splice the above-mentioned fused third features and the above-mentioned fused fourth feature to obtain the above-mentioned fused real-time change feature.

[0017] According to an embodiment of the present invention, the above-mentioned device also includes: an initial historical time series information acquisition module, which is used to obtain the initial historical time series information for the target area within the historical period, wherein the above-mentioned initial historical time series information includes: initial historical electricity consumption time series information, initial historical meteorological time series information and initial historical power distribution transaction time series information; an abnormal time determination module, which is used to use the isolation forest algorithm to determine the abnormal information and the abnormal time corresponding to the above-mentioned abnormal information from the above-mentioned initial historical time series information respectively; wherein the above-mentioned abnormal information includes at least one of the following: historical abnormal electricity consumption information, historical abnormal meteorological information and historical abnormal power distribution transaction time series information; and a removal module, which is used to remove the above-mentioned abnormal information, and based on the historical information corresponding to at least two normal times adjacent to the above-mentioned abnormal time, correct the above-mentioned abnormal information to obtain the above-mentioned target historical time series information.

[0018] According to an embodiment of the present invention, the above-mentioned clustering module includes: a similarity matrix construction submodule, which is used to construct a similarity matrix based on the above-mentioned target historical time series information, wherein each element in the above-mentioned similarity matrix represents the correlation between each factor and the historical electricity consumption; a calculation submodule, which is used to calculate the adjacency matrix and the degree matrix respectively according to the above-mentioned similarity matrix; a Laplace matrix generation submodule, which is used to generate a Laplace matrix based on the above-mentioned adjacency matrix and the above-mentioned degree matrix; an eigenvector calculation submodule, which is used to calculate the t eigenvectors corresponding to the first t eigenvalues ​​in the normalized Laplace matrix based on the eigenincreasing principle, where t is an integer greater than 1; and a clustering submodule, which is used to cluster the above-mentioned t eigenvectors to obtain the time series information of the above-mentioned target factors.

[0019] According to an embodiment of the present invention, the above-mentioned processing module includes: a change trend determination submodule, which is used to determine the change trend of the power load data corresponding to each moment and the power load data at adjacent moments based on the above-mentioned target power consumption time series data; and a power distribution strategy determination submodule, which is used to determine the above-mentioned power distribution strategy based on the above-mentioned power load data and the above-mentioned change trend.

[0020] A third aspect of the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0021] The fourth aspect of the present invention further provides a computer-readable storage medium on which a computer program or instruction is stored, and the steps of the above method are implemented when the above computer program or instruction is executed by a processor.

[0022] The fifth aspect of the present invention also provides a computer program product, including a computer program or instructions, which implement the steps of the above method when executed by a processor.

[0023] According to an embodiment of the present invention, the target historical time series information is clustered by a spectral clustering algorithm, so as to obtain influencing factor data closely related to the historical power consumption, and the points with larger influencing factor data in the target historical time series information can be screened out, so as to more accurately capture the inherent structure of the data, reduce noise interference, and further reduce the computational complexity; the change characteristics and influence weights of the target factors are extracted by a time series neural network, so as to obtain the target power consumption data for the target period, and then determine the distribution strategy for the distribution network in the target area, and the complex time series characteristics in the time series information can be captured, so as to adjust the distribution strategy according to the change characteristics and influence weights in a targeted manner, optimize the allocation of power grid resources, further improve the efficiency of power grid operation, and enhance the reliability of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0025] Figure 1 A diagram showing an application scenario of a method and device for determining a power distribution strategy for medium- and long-term regional users according to an embodiment of the present invention;

[0026] Figure 2 A flow chart showing a method for determining a power distribution strategy for medium- and long-term regional users according to an embodiment of the present invention is shown;

[0027] Figure 3 A schematic diagram of the structure of a temporal neural network multi-scale routing module according to an embodiment of the present invention is shown;

[0028] Figure 4 A schematic diagram of a temporal neural network structure according to an embodiment of the present invention is shown;

[0029] Figure 5 A schematic diagram of the structure of a multi-scale attention module according to an embodiment of the present invention is shown;

[0030] Figure 6 A schematic diagram showing a power consumption change trend and actual power consumption change trend data according to an embodiment of the present invention is shown;

[0031] Figure 7 It shows a structural block diagram of a device for determining a power distribution strategy for medium- and long-term regional users according to an embodiment of the present invention;

[0032] Figure 8 A block diagram of an electronic device suitable for implementing a method for determining a power distribution strategy for users in a medium- to long-term area according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0033] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.

[0034] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0035] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0036] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0037] With the booming economy and the continuous increase in social electricity demand, electricity demand is showing an increasingly complex trend of change. These changes are not only affected by traditional factors such as time, weather, holidays, etc., but also by emerging factors such as new energy access and the popularization of electric vehicles. The power grid is therefore facing the challenges of increasing complexity and abnormal fluctuations. When formulating medium- and long-term regional user power planning, it is particularly important to accurately predict future electricity demand, which is directly related to the adjustment of the power distribution strategy of the power grid to ensure that the power demand of users can be met and the stable operation of the power grid can be guaranteed. However, the existing technology lacks a method for targeted adjustment of the medium- and long-term regional user distribution strategy.

[0038] In view of this, an embodiment of the present invention provides a method for determining a power distribution strategy for medium- and long-term regional users, including: obtaining target historical time series information for a target area within a historical period, wherein the target historical time series information includes: target historical power consumption time series information, target historical meteorological time series information, and target historical power distribution transaction time series information; clustering the target historical time series information based on a spectral clustering algorithm to obtain time series information of target factors, wherein the target factors represent influencing factors that are closely related to historical power consumption; using a time series neural network to extract features from the time series information of the target factors to obtain change characteristics and influence weights of the target factors, wherein the change characteristics include: periodic change characteristics and real-time change characteristics, and the influence weights represent the degree of influence of each change characteristic on the target power consumption time series data of the target period, and the time series neural network is trained with sample historical power consumption data as labels; and using the time series neural network to process the change characteristics and influence weights of the target factors to obtain the target power consumption data of the target period, so as to determine the power distribution strategy of the distribution network for the target area based on the target power consumption time series data.

[0039] Figure 1 An application scenario diagram of a method and device for determining a power distribution strategy for medium- and long-term regional users according to an embodiment of the present invention is shown.

[0040] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0041] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0042] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0043] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0044] It should be noted that the power distribution strategy determination method for medium- and long-term regional users provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the power distribution strategy determination device for medium- and long-term regional users provided in the embodiment of the present invention can generally be set in the server 105. The power distribution strategy determination method for medium- and long-term regional users provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Correspondingly, the power distribution strategy determination device for medium- and long-term regional users provided in the embodiment of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0045] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0046] The following will be based on Figure 1 The scene described by Figure 2~Figure 6 The method for determining the power distribution strategy for medium- and long-term regional users in an embodiment of the present invention is described in detail.

[0047] Figure 2 A flow chart of a method for determining a power distribution strategy for medium- and long-term regional users according to an embodiment of the present invention is shown.

[0048] like Figure 2 As shown, the method for determining the power distribution strategy for medium- and long-term regional users in this embodiment includes operations S210 to S240.

[0049] In operation S210 , target historical time series information for a target area within a historical period is obtained.

[0050] Among them, the target historical time series information includes: target historical electricity consumption time series information, target historical meteorological time series information and target historical power distribution transaction time series information.

[0051] According to an embodiment of the present invention, the above-mentioned historical electricity consumption time series information may be, for example, the historical electricity consumption data in the target area, and the corresponding time granularity may be 15 minutes, that is, the electricity consumption data is recorded once every 15 minutes, and the above-mentioned target historical meteorological time series information may include, for example, average temperature, average humidity, wind speed, irradiance and other data. The above-mentioned target historical power distribution transaction time series information may be, for example, transaction information for regulating electricity prices based on regulations. For example, between 0:00 a.m. and 12:00 noon on the same day, the electricity price per kilowatt-hour is set to 0.7 yuan, between 12:00 noon and 6:00 p.m., the electricity price per kilowatt-hour is set to 0.5 yuan, and between 6:00 p.m. and 12:00 p.m., the electricity price per kilowatt-hour is set to 0.4 yuan.

[0052] In operation S220 , the target historical time series information is clustered based on a spectral clustering algorithm to obtain time series information of the target factors.

[0053] Among them, the target factors represent the influencing factors that are closely related to the historical electricity consumption.

[0054] According to the embodiment of the present invention, by clustering the target historical time series information through the spectral clustering algorithm, the influencing factors that are more closely related to the historical power consumption can be screened out from the various influencing factors.

[0055] Exemplarily, the target historical meteorological time series information in the target historical time series information may include data such as average temperature, average humidity, wind speed, and irradiance. After clustering the target historical time series information, the obtained time series information of the target factors may only retain data such as average temperature and irradiance.

[0056] In operation S230, a time series neural network is used to extract features of the time series information of the target factor to obtain the change features and impact weights of the target factor.

[0057] Among them, the change characteristics include: periodic change characteristics and real-time change characteristics. The impact weight represents the degree of influence of each change characteristic on the target power consumption time series data of the target time period. The time series neural network is trained with sample historical power consumption data as labels.

[0058] According to an embodiment of the present invention, the above-mentioned time series neural network can be, for example, a pathformer prediction network, or a time series neural network such as a simple recursive neural network, a long short-term memory network, etc. The present invention does not limit the type of the time series neural network.

[0059] According to an embodiment of the present invention, the above-mentioned periodic changes may be, for example, periodic changes in temperature, periodic changes in radiation, etc. For example, in a year, we often experience four seasons, namely spring, summer, autumn and winter, and air conditioning is usually needed in summer to adjust the room temperature. Obviously, electricity consumption will surge in summer. The time series neural network can extract such periodic changes as mentioned above, while real-time changes are changes in a shorter period of time. Such changes are not periodic. For example, after a heavy rain in summer, the temperature will often drop slightly, and the drop in temperature will reduce the frequency of use of the air conditioner, thereby reducing electricity consumption. Such changes are unpredictable real-time changes.

[0060] According to an embodiment of the present invention, the above-mentioned impact weight is adaptively determined by the time series neural network. For example, if an input data shows rapid fluctuations in a short period of time, the time series neural network may tend to give higher weights to real-time change features, and vice versa. Higher weights will be given to periodic change features. In this way, the time series neural network can capture the changing characteristics in time series information of different scales and assign weights according to the degree of influence, thereby achieving more accurate time series prediction.

[0061] In operation S240, the change characteristics and influence weights of the target factors are processed using a time series neural network to obtain target power consumption data for a target period, so as to determine a power distribution strategy for a distribution network in a target area based on the target power consumption time series data.

[0062] For example, if the peak electricity consumption period is predicted for tomorrow, the smart distribution network can be used to optimize the scheduling, thereby reducing grid losses and providing more electricity to the target area, thereby ensuring the efficient operation of the grid.

[0063] According to an embodiment of the present invention, the target historical time series information is clustered by a spectral clustering algorithm, so as to obtain influencing factor data closely related to the historical power consumption, and the points with larger influencing factor data in the target historical time series information can be screened out, so as to more accurately capture the inherent structure of the data, reduce noise interference, and further reduce the computational complexity; the change characteristics and influence weights of the target factors are extracted by a time series neural network, so as to obtain the target power consumption data for the target period, and then determine the distribution strategy for the distribution network in the target area, and the complex time series characteristics in the time series information can be captured, so as to adjust the distribution strategy according to the change characteristics and influence weights in a targeted manner, optimize the allocation of power grid resources, further improve the efficiency of power grid operation, and enhance the reliability of the power grid.

[0064] According to an embodiment of the present invention, the above-mentioned time series neural network also includes a multi-scale routing module, and the above-mentioned multi-scale routing module includes a feature extraction layer, a pooling layer and a path selection layer. The above-mentioned time series neural network is used to extract features of the time series information of the target factor to obtain the change characteristics and influence weights of the target factor, including: using the feature extraction layer to perform discrete Fourier transform on the time series information of the target factor to obtain a frequency component sequence; and performing inverse discrete Fourier transform on the first k frequency components to obtain the periodic change characteristics of the target factor, k is an integer greater than 1; using the pooling layer to average pool and weight the periodic change characteristics of the target factor to obtain the real-time change characteristics of the target factor; and using the path selection layer to input the periodic change characteristics and the real-time change characteristics into the multi-scale router to generate influence weights.

[0065] Figure 3 A schematic diagram of the structure of a temporal neural network multi-scale routing module according to an embodiment of the present invention is shown.

[0066] like Figure 3 As shown, the multi-scale routing module 300 includes a feature extraction layer 301, a pooling layer 302 and a path selection layer 303. The feature extraction layer is used to perform discrete Fourier transform on the time series information of the target factor, and select the first k frequency components (the most significant k frequency components) to perform discrete Fourier transform to obtain the periodic change characteristics of the target factor.

[0067] According to an embodiment of the present invention, the above-mentioned pooling layer may be a multi-core average pooling layer, which processes data in parallel through multiple cores for pooling, thereby reducing the data dimension.

[0068] According to the embodiment of the present invention, the path selection layer 303 works in a system with the multi-scale aggregation module 403 described below, and generates influence weights by combining periodic change features and real-time change features through weighted aggregation.

[0069] According to an embodiment of the present invention, the above-mentioned time series neural network also includes: a multi-scale attention module and a multi-scale aggregation module, which use the time series neural network to process the change characteristics and influence weights of the target factors to obtain the target power consumption time series data for the target time period, including: using the multi-scale attention module to fuse the periodic change characteristics based on the attention mechanism to obtain the fused periodic change characteristics; using the multi-scale attention module to fuse the real-time change characteristics based on the attention mechanism to obtain the fused real-time change characteristics; and using the multi-scale aggregation module to process the fused periodic change characteristics and the fused real-time change characteristics according to the influence weights to generate the target power consumption time series data.

[0070] Figure 4 A schematic diagram of a temporal neural network structure according to an embodiment of the present invention is shown.

[0071] like Figure 4 As shown, the temporal neural network structure includes a multi-scale routing module 300, a multi-scale attention module 402, and a multi-scale aggregation module 403. As described above, the multi-scale routing module 300 generates influence weights based on periodic change features and real-time change features and outputs them to the multi-scale aggregation module for aggregation.

[0072] According to an embodiment of the present invention, for periodic change features and real-time change features, the time dependency within the change features can be calculated through the multi-scale attention module 402. The multi-scale attention module can, for example, adopt a dual attention mechanism to extract multi-scale features to obtain the weights of each periodic change feature vector in the periodic change feature and the weights of each real-time change feature vector in the real-time change feature. Then, based on the above two weights, each periodic change feature vector and real-time change feature vector are fused respectively to obtain a fused periodic change feature and a fused real-time change feature.

[0073] According to an embodiment of the present invention, after obtaining the fused periodic change features and the fused real-time change features, the contributions of the fused periodic change features and the fused real-time change features are combined according to the influence weight of each feature through the multi-scale aggregation module 403 to obtain the final output target power consumption time series data.

[0074] According to an embodiment of the present invention, a multi-scale attention module is used to fuse periodic change features and real-time change features to obtain fused periodic change features and fused real-time change features, so that the time series neural network can adaptively adjust the attention to different features, so as to more accurately capture the complex changes in time series data. The fused periodic change features and fused real-time change features are weighted aggregated by the multi-scale aggregation module to generate target power consumption time series data, so that the time series neural network can better understand the dynamic changes in power demand and provide more accurate prediction data for the distribution strategy of the target area distribution network.

[0075] According to an embodiment of the present invention, the above-mentioned multi-scale attention module is used to fuse the periodic change features based on the attention mechanism to obtain the fused periodic change features, including: dividing the periodic change features to obtain multiple first feature vectors; internally fusing each first feature vector based on the self-attention mechanism to obtain each fused first feature; fusing between each first feature vector based on the interactive attention mechanism to obtain a fused second feature; and splicing each fused first feature and the fused second feature to obtain a fused periodic change feature.

[0076] According to an embodiment of the present invention, the multi-scale attention module is used to fuse the real-time change features based on the attention mechanism to obtain the fused real-time change features, including: dividing the real-time change features to obtain multiple second feature vectors; internally fusing the second feature vectors based on the self-attention mechanism to obtain the fused third features; fusing the second feature vectors based on the interactive attention mechanism to obtain the fused fourth feature; and splicing the fused third features and the fused fourth feature to obtain the fused real-time change features.

[0077] According to the embodiment of the present invention, the process of obtaining the fused periodic change feature and the process of obtaining the fused real-time change feature are similar, so the fused periodic change feature is taken as an example for explanation.

[0078] Figure 5 A schematic diagram of the structure of a multi-scale attention module according to an embodiment of the present invention is shown.

[0079] like Figure 5 As shown in the figure, the multi-scale attention module structure includes M partition sizes, namely, partition size S1, partition size S2, and partition size S3, where each partition size S corresponds to a partition operation. (where H represents the length of the time series in the change feature, and d represents the feature dimension). Each partition size S divides the input change feature into P (where ),Right now , the feature vector obtained after each partition It contains S time steps, and feature vectors of multiple scales can be obtained by different division sizes, thus providing different time resolution views for the input sequence.

[0080] According to an embodiment of the present invention, for each partition size, the temporal dependency can be captured by the intra-partition attention mechanism and the inter-partition attention mechanism. The intra-partition attention mechanism can capture the temporal dependency within the same feature vector, while the inter-partition attention mechanism is used to capture the dependency between different feature vectors. For a set of feature vectors with a partition size of S1, first for the i-th feature vector , embed the vector along the feature dimension d (that is, convert the original discrete data into a continuous, low-dimensional vector representation through an embedding layer) to obtain (where dm represents the dimension of embedding), then X i intra Perform a trainable linear transformation to obtain the keys and values ​​in the attention operation, expressed as , and finally through the trainable query matrix To incorporate the context of the feature vector, and calculate The following formula (1) shows the calculation formula of the intra-partition attention mechanism.

[0081] (1)

[0082] Among them, Q i intra represents the query matrix of the i-th eigenvector, K i intra represents the key matrix of the i-th eigenvector, V i intra represents the value matrix of the i-th eigenvector, d is the dimension of the query matrix and the key matrix, m is the number of heads of the attention mechanism, Attn i intra represents the intra-partition attention of the i-th feature vector.

[0083] After the intra-partition attention, the input length of each partition is changed to 1, and the attention results of all feature vectors are concatenated to obtain the corresponding fused features. For the fusion of real-time changing features, the third fused feature is obtained here. The following formula (2) shows the fusion formula of the intra-partition feature vector.

[0084] (2)

[0085] Among them, Attn 1 intraIndicates the attention within the partition of the first feature vector, Attn intra Represents the fused intra-partition feature vector.

[0086] At the same time, the inter-partition attention mechanism is used to capture the global correlation. , first perform feature embedding to obtain , then rearrange the feature vectors, merge the number of partitions S and embed The dimension of ,in , after rearrangement, the time steps in the same feature vector are merged together, so only Perform self-attention calculation to obtain the correlation between feature vectors. Perform a linear mapping to obtain the query, key and value, represented as Then, we calculate the interaction attention , which involves the interaction between feature vectors and represents the global correlation of the time series. The following formula (3) shows the calculation formula of the inter-partition attention mechanism.

[0087] (3)

[0088] Among them, Q intra represents the query matrix, K intra represents the bond matrix, V intra represents the value matrix, d is the dimension of the corresponding query matrix and key matrix, m is the number of heads of the attention mechanism, Attn intra Represents inter-partition attention.

[0089] According to the embodiment of the present invention, for the fusion of real-time change features, what is obtained here is the fused fourth feature.

[0090] Finally, divide the internal attention Attn i intra and partition attention Attn intra Add together to get the final output of dual attention , that is, integrating real-time changing features.

[0091] According to an embodiment of the present invention, by dividing the real-time change features and the periodic change features, self-attention and interactive attention are calculated, so as to capture the relationship within a single feature vector and the relationship between different feature vectors, thereby providing a more comprehensive feature identification for the time series neural network, which can improve the time series neural network's understanding of the dynamic changes of time series, thereby making more accurate predictions.

[0092] According to an embodiment of the present invention, before obtaining the target historical time series information for the target area within the historical period, the method also includes: obtaining the initial historical time series information for the target area within the historical period, wherein the initial historical time series information includes: initial historical electricity consumption time series information, initial historical meteorological time series information and initial historical power distribution transaction time series information; using an isolation forest algorithm to determine the abnormal information and the abnormal moment corresponding to the abnormal information from the initial historical time series information respectively; wherein the abnormal information includes at least one of the following: historical abnormal electricity consumption information, historical abnormal meteorological information and historical abnormal power distribution transaction time series information; and removing the abnormal information, and based on the historical information corresponding to at least two normal moments adjacent to the abnormal moment, correcting the abnormal information to obtain the target historical time series information.

[0093] According to an embodiment of the present invention, before using the isolation forest algorithm to determine the abnormal information and the abnormal time corresponding to the abnormal information from the initial historical time series information, the original sample data can also be subjected to normalization preprocessing, outlier screening, missing data and abnormal data correction and other operations.

[0094] According to an embodiment of the present invention, the initial historical time series information can be modeled by an improved isolation forest model to determine abnormal information. The following formula (4) shows the formula of the isolation forest model.

[0095] , (4)

[0096] in, For isolated forests, is the total number of trees, is the path length function of the tree, is the threshold value.

[0097] According to an embodiment of the present invention, by modeling the historical time series model using an isolation forest model to calculate the path length of the sample points on the tree and average it, sample points with shorter paths in most trees can be checked, thereby efficiently identifying abnormal information.

[0098] According to an embodiment of the present invention, the abnormal information is removed and corrected based on historical information corresponding to at least two normal moments adjacent to the abnormal moment to obtain target historical time series information. The abnormal information can be corrected by an interpolation method.

[0099] For example, for the continuous time series information [1, 6, 3], after the isolation forest algorithm determines 6 as abnormal information and deletes it, the new time series information [1, 2, 3] can be calculated based on its two adjacent data "1" and "3".

[0100] According to an embodiment of the present invention, by using an isolation forest algorithm to determine abnormal information from historical time series information and make corrections, the quality and integrity of historical time series data can be improved, thereby ensuring that subsequent processing processes are based on accurate and reliable data, thereby improving the accuracy and robustness of time series neural network predictions.

[0101] According to an embodiment of the present invention, based on a spectral clustering algorithm, the target historical time series information is clustered to obtain the time series information of the target factor, including: constructing a similarity matrix according to the target historical time series information, wherein each element in the similarity matrix represents the correlation between each factor and the historical power consumption; calculating an adjacency matrix and a degree matrix according to the similarity matrix; generating a Laplace matrix according to the adjacency matrix and the degree matrix; calculating t eigenvectors corresponding to the first t eigenvalues ​​in the normalized Laplace matrix based on the eigenincreasing principle, where t is an integer greater than 1; and clustering the t eigenvectors to obtain the time series information of the target factor.

[0102] According to an embodiment of the present invention, the spectral clustering algorithm clusters the original high-dimensional features, reduces the feature dimension of the input prediction model, removes the redundant parts in the complex data, and extracts effective information. The main idea of ​​the spectral clustering algorithm comes from the spectral graph partitioning theory, which regards the data set as a set of nodes in the graph and clusters them using the spectral structure of the graph. Spectral clustering regards the data clustering problem as a multi-way partitioning problem of an undirected graph. From this perspective, the data points are regarded as vertices in an undirected graph, and the combination of weighted edges represents the calculation result of the similarity between two points, and the matrix represents the similarity of the data points to be clustered. The edge weight value between two points that are far away is low, while the edge weight value between two points that are close is high. Therefore, in the graph, the clustering problem can be converted into a graph partitioning problem on the graph. By cutting the graph composed of all data points and dividing it into subgraphs of different sizes, the sum of the edge weights between different subgraphs after cutting is as low as possible, and the sum of the edge weights within the subgraph is as high as possible, thereby achieving the purpose of clustering.

[0103] According to an embodiment of the present invention, the similarity matrix is ​​the weight value between any two points in the graph. The adjacency matrix can be calculated by the following formula (5), and the degree matrix can be calculated by adding the elements of each row in the similarity matrix.

[0104] (5)

[0105] in, is the i-th sample point in the data, is the jth sample point of the data, Enter the parameters for Scale.

[0106] According to the embodiment of the present invention, the Laplacian matrix can be calculated according to the following formula (6).

[0107] (6)

[0108] in, is the degree matrix obtained by the above calculation, is the adjacency matrix calculated above.

[0109] According to an embodiment of the present invention, the above-mentioned determination of the distribution strategy of the distribution network for the target area based on the target power consumption time series data includes: determining the power load data corresponding to each moment and the change trend of the power load data at adjacent moments based on the target power consumption time series data; and determining the distribution strategy based on the power load data and the change trend.

[0110] According to an embodiment of the present invention, through the accurate prediction of electricity load data and changing trends, relevant enterprises can specify corresponding power distribution strategies, such as adjusting power generation, optimizing grid operation, real-time demand response or adjusting electricity price strategies, etc., to meet the predicted power demand and ensure the stable operation of the grid.

[0111] Figure 6 A schematic diagram of the power consumption change trend and actual power consumption change trend data according to an embodiment of the present invention is shown.

[0112] The present invention selects Transformer, Informer and LSTM models as reference items to carry out comparative experiments, and selects industrial and commercial load data of a northern urban area for prediction, which includes power load data of industrial and commercial users in the area and meteorological data, wherein the meteorological data includes temperature, humidity, irradiance, wind speed, etc. The time span is from January 20X2 to April 20X3, the time granularity is 15min, and a total of 48864 time point samples are divided into training set and test set according to the model prediction requirements, and the division ratio is 4:1. The comparison results of power prediction accuracy are shown in Table 1 below.

[0113] Table 1

[0114]

[0115] It can be seen that the power point prediction of the present invention has the highest accuracy and is superior to the reference model in all aspects, with the prediction accuracy improved by more than 19%.

[0116] like Figure 6 As shown, the 96-point load forecast curve for the next month output by the present invention shows significant similarity with the actual load curve, wherein the peak load point and the load distribution also show a synchronous trend, and the forecast effect is excellent.

[0117] Figure 7A structural block diagram of a device for determining a power distribution strategy for medium- and long-term regional users according to an embodiment of the present invention is shown.

[0118] like Figure 7 As shown, the device 700 for determining a power distribution strategy for medium- and long-term regional users in this embodiment includes an acquisition module 710 , a clustering module 720 , a feature extraction module 730 and a processing module 740 .

[0119] The acquisition module 710 is used to acquire the target historical time series information for the target area within the historical period, wherein the target historical time series information includes: target historical electricity consumption time series information, target historical meteorological time series information, and target historical power distribution transaction time series information. In one embodiment, the acquisition module 710 can be used to perform the operation S210 described above, which will not be repeated here.

[0120] The clustering module 720 is used to cluster the target historical time series information based on the spectral clustering algorithm to obtain the time series information of the target factor, wherein the target factor represents the influencing factor closely related to the historical power consumption. In one embodiment, the clustering module 720 can be used to perform the operation S220 described above, which will not be repeated here.

[0121] The feature extraction module 730 is used to extract features from the time series information of the target factor using a time series neural network to obtain the change features and influence weights of the target factor; wherein the change features include: periodic change features and real-time change features; the influence weights represent the degree of influence of each change feature on the target power consumption time series data of the target period. In one embodiment, the feature extraction module 730 can be used to perform the operation S230 described above, which will not be repeated here.

[0122] The processing module 740 is used to process the change characteristics and influence weights of the target factors using a time series neural network to obtain the target power consumption data for the target period, so as to determine the power distribution strategy of the distribution network for the target area based on the target power consumption time series data. In one embodiment, the processing module 740 can be used to perform the operation S240 described above, which will not be repeated here.

[0123] According to an embodiment of the present invention, the above-mentioned temporal neural network includes a multi-scale routing module, and the above-mentioned multi-scale routing module includes a feature extraction layer, a pooling layer and a path selection layer. The above-mentioned feature extraction module includes: a discrete Fourier transform submodule, which is used to use the above-mentioned feature extraction layer to perform discrete Fourier transform on the timing information of the above-mentioned target factor to obtain a frequency component sequence; and perform an inverse discrete Fourier transform on the first k frequency components to obtain the periodic change characteristics of the above-mentioned target factor, k is an integer greater than 1; a pooling submodule, which is used to use the above-mentioned pooling layer to perform average pooling and weighted processing on the periodic change characteristics of the above-mentioned target factor to obtain the real-time change characteristics of the above-mentioned target factor; and an influence weight generation submodule, which is used to use the path selection layer to input the above-mentioned periodic change characteristics and the above-mentioned real-time change characteristics into the multi-scale router to generate the above-mentioned influence weight.

[0124] According to an embodiment of the present invention, the above-mentioned time series neural network also includes: a multi-scale attention module and a multi-scale aggregation module, and the above-mentioned processing module includes: a periodic fusion sub-module, which is used to use the above-mentioned multi-scale attention module to fuse the above-mentioned periodic change characteristics based on the attention mechanism to obtain a fused periodic change characteristic; a real-time fusion sub-module, which is used to use the above-mentioned multi-scale attention module to fuse the above-mentioned real-time change characteristics based on the above-mentioned attention mechanism to obtain a fused real-time change characteristic; and a multi-scale aggregation sub-module, which is used to use the above-mentioned multi-scale aggregation module to process the above-mentioned fused periodic change characteristics and the above-mentioned fused real-time change characteristics according to the above-mentioned influence weights to generate the above-mentioned target power consumption time series data.

[0125] According to an embodiment of the present invention, the multi-scale aggregation submodule includes: a division unit, used to divide the periodic change feature to obtain multiple first feature vectors; an internal fusion unit, used to internally fuse the first feature vectors based on a self-attention mechanism to obtain the fused first features; a second feature fusion unit, used to fuse the first feature vectors based on an interactive attention mechanism to obtain the fused second features; and a periodic splicing unit, used to splice the fused first features and the fused second features to obtain the fused periodic change feature.

[0126] According to an embodiment of the present invention, the above-mentioned real-time fusion submodule includes: a second division unit, used to divide the above-mentioned real-time change feature to obtain multiple second feature vectors; a second internal fusion unit, used to internally fuse each of the above-mentioned second feature vectors based on a self-attention mechanism to obtain each fused third feature; a fourth feature fusion unit, used to fuse between each of the above-mentioned second feature vectors based on an interactive attention mechanism to obtain a fused fourth feature; and a real-time splicing unit, used to splice the above-mentioned fused third features and the above-mentioned fused fourth feature to obtain the above-mentioned fused real-time change feature.

[0127] According to an embodiment of the present invention, the above-mentioned device also includes: an initial historical time series information acquisition module, which is used to obtain the initial historical time series information for the target area within the historical period, wherein the above-mentioned initial historical time series information includes: initial historical electricity consumption time series information, initial historical meteorological time series information and initial historical power distribution transaction time series information; an abnormal time determination module, which is used to use the isolation forest algorithm to determine the abnormal information and the abnormal time corresponding to the above-mentioned abnormal information from the above-mentioned initial historical time series information respectively; wherein the above-mentioned abnormal information includes at least one of the following: historical abnormal electricity consumption information, historical abnormal meteorological information and historical abnormal power distribution transaction time series information; and a removal module, which is used to remove the above-mentioned abnormal information, and based on the historical information corresponding to at least two normal times adjacent to the above-mentioned abnormal time, correct the above-mentioned abnormal information to obtain the above-mentioned target historical time series information.

[0128] According to an embodiment of the present invention, the above-mentioned clustering module includes: a similarity matrix construction submodule, which is used to construct a similarity matrix based on the above-mentioned target historical time series information, wherein each element in the above-mentioned similarity matrix represents the correlation between each factor and the historical electricity consumption; a calculation submodule, which is used to calculate the adjacency matrix and the degree matrix respectively according to the above-mentioned similarity matrix; a Laplace matrix generation submodule, which is used to generate a Laplace matrix based on the above-mentioned adjacency matrix and the above-mentioned degree matrix; an eigenvector calculation submodule, which is used to calculate the t eigenvectors corresponding to the first t eigenvalues ​​in the normalized Laplace matrix based on the eigenincreasing principle, where t is an integer greater than 1; and a clustering submodule, which is used to cluster the above-mentioned t eigenvectors to obtain the time series information of the above-mentioned target factors.

[0129] According to an embodiment of the present invention, the above-mentioned processing module includes: a change trend determination submodule, which is used to determine the change trend of the power load data corresponding to each moment and the power load data at adjacent moments based on the above-mentioned target power consumption time series data; and a power distribution strategy determination submodule, which is used to determine the above-mentioned power distribution strategy based on the above-mentioned power load data and the above-mentioned change trend.

[0130] According to an embodiment of the present invention, any multiple modules among the acquisition module 710, the clustering module 720, the feature extraction module 730 and the processing module 740 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present invention, at least one of the acquisition module 710, the clustering module 720, the feature extraction module 730 and the processing module 740 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the acquisition module 710, the clustering module 720, the feature extraction module 730 and the processing module 740 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be performed.

[0131] Figure 8 A block diagram of an electronic device suitable for implementing a method for determining a power distribution strategy for users in a medium- to long-term area according to an embodiment of the present invention is shown.

[0132] like Figure 8 As shown, the electronic device 800 according to an embodiment of the present invention includes a processor 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage part 808 to the RAM (Random Access Memory). The processor 801 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0133] In RAM 803, various programs and data required for the operation of electronic device 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other via bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present invention by executing the programs in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present invention by executing the programs stored in the one or more memories.

[0134] According to an embodiment of the present invention, the electronic device 800 may further include an I / O interface 805, which is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the I / O interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage portion 808 as needed.

[0135] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.

[0136] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a RAM (Random Access Memory), a ROM (Read Only Memory), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include the ROM 802 and / or RAM 803 described above and / or one or more memories other than ROM 802 and RAM 803.

[0137] The embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method for determining the power distribution strategy for medium- and long-term regional users provided by the embodiment of the present invention.

[0138] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when it is executed by the processor 801. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0139] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0140] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0141] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0142] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0143] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention may be combined and / or combined in various ways. All of these combinations and / or combinations fall within the scope of the present invention.

[0144] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination advantageously. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.

Claims

1. A method for determining a power distribution strategy for medium- and long-term regional users, characterized in that: The method comprises: Obtaining target historical time series information for a target area within a historical period, wherein the target historical time series information includes: target historical electricity consumption time series information, target historical meteorological time series information, and target historical power distribution transaction time series information; the historical electricity consumption time series information is the historical electricity data within the target area, the target historical meteorological time series information includes: average temperature, average humidity, wind speed, irradiance, and the target historical power distribution transaction time series information is transaction information for regulating electricity prices based on regulations; Based on the spectral clustering algorithm, clustering the target historical time series information to obtain the time series information of the target factors; Using a time series neural network to extract features from the time series information of the target factor, obtaining the change features and impact weights of the target factor, wherein the change features include: periodic change features and real-time change features, and the impact weights represent the degree of influence of each change feature on the target power consumption time series data of the target period, and the time series neural network is trained with sample historical power consumption data as labels; and Using the time series neural network to process the change characteristics and influence weights of the target factors, the target power consumption time series data of the target period is obtained, so as to determine the power distribution strategy of the distribution network for the target area based on the target power consumption time series data, wherein the target period is a future period; The time series neural network includes a multi-scale routing module, which includes a feature extraction layer, a pooling layer and a path selection layer. The time series neural network is used to extract features from the time series information of the target factor to obtain the change characteristics and influence weight of the target factor, including: Using the feature extraction layer, discrete Fourier transform is performed on the time series information of the target factor to obtain a frequency component sequence; and inverse discrete Fourier transform is performed on the first k frequency components to obtain the periodic change characteristics of the target factor, where k is an integer greater than 1; Using the pooling layer to perform multi-core average pooling and weighted processing on the periodic change characteristics of the target factor to obtain the real-time change characteristics of the target factor; and Using the path selection layer, inputting the periodic change feature and the real-time change feature into a multi-scale router to generate the influence weight; The time series neural network further includes: a multi-scale attention module and a multi-scale aggregation module. The time series neural network is used to process the change characteristics and influence weights of the target factors to obtain the target power consumption time series data of the target period, including: The multi-scale attention module structure includes M partition sizes, namely, partition size S1, partition size S2, and partition size S3, where each partition size S corresponds to a partition operation for a periodic change feature or a real-time change feature of an input. , where H represents the length of the time series in the periodic change feature or real-time change feature, d represents the feature dimension, and each partition size S divides the input periodic change feature or real-time change feature into P pieces, where ,Right now , after each partition, we get the feature vector , ; Using the multi-scale attention module to fuse the periodic change features based on the attention mechanism to obtain a fused periodic change feature; Using the multi-scale attention module to fuse the real-time change features based on the attention mechanism to obtain a fused real-time change feature; and Using the multi-scale aggregation module, weighted aggregation is performed on the fused periodic change feature and the fused real-time change feature according to the impact weight to generate the target power consumption time series data; The method of fusing the periodic change features using the multi-scale attention module based on the attention mechanism to obtain the fused periodic change features includes: Divide the periodic variation feature according to multiple division sizes to obtain multiple first feature vectors , ; Based on the self-attention mechanism, the first feature vectors of the same partition size are Perform internal fusion to obtain the first fused feature; Based on the interactive attention mechanism, the first feature vector to obtain a fused second feature; and Adding the fused first feature and the fused second feature to obtain the fused periodic variation feature; The method of fusing the real-time change features using the multi-scale attention module based on the attention mechanism to obtain the fused real-time change features includes: Divide the real-time change feature according to multiple division sizes to obtain multiple second feature vectors , ; Based on the self-attention mechanism, the second feature vectors of the same partition size are Perform internal fusion to obtain the fused third feature; Based on the interactive attention mechanism, each of the second feature vectors fused to obtain a fused fourth feature; and The fused third features and the fused fourth features are added together to obtain the fused real-time change feature.

2. The method according to claim 1, characterized in that Before obtaining the target historical time series information for the target area within the historical period, the method further includes: Acquire initial historical time series information for the target area within a historical period, wherein the initial historical time series information includes: initial historical electricity consumption time series information, initial historical meteorological time series information, and initial historical power distribution transaction time series information; Determine abnormal information and abnormal time corresponding to the abnormal information from the initial historical time series information by using an isolation forest algorithm; wherein the abnormal information includes at least one of the following: historical abnormal power consumption information, historical abnormal meteorological information, and historical abnormal power distribution transaction time series information; and The abnormal information is removed, and based on the historical information corresponding to at least two normal moments adjacent to the abnormal moment, the abnormal information is corrected to obtain the target historical time series information.

3. The method according to claim 1, characterized in that The determining of a power distribution strategy for the distribution network in the target area based on the target power consumption time series data includes: Based on the target power consumption time series data, determining the power load data corresponding to each moment and the change trend of the power load data at adjacent moments; and The power distribution strategy is determined based on the power load data and the change trend.

4. A device for determining a power distribution strategy for medium- and long-term regional users, characterized in that: The device comprises: An acquisition module is used to acquire target historical time series information for a target area within a historical period, wherein the target historical time series information includes: target historical electricity consumption time series information, target historical meteorological time series information and target historical power distribution transaction time series information; the historical electricity consumption time series information is the historical electricity data within the target area, the target historical meteorological time series information includes: average temperature, average humidity, wind speed, irradiance, and the target historical power distribution transaction time series information is transaction information for regulating electricity prices based on regulations; A clustering module, used for clustering the target historical time series information based on a spectral clustering algorithm to obtain time series information of target factors; A feature extraction module is used to extract features from the time series information of the target factor using a time series neural network to obtain the change features and influence weights of the target factor; wherein the change features include: periodic change features and real-time change features, and the influence weights represent the degree of influence of each change feature on the target power consumption time series data of the target period; the time series neural network is trained with sample historical power consumption data as labels and a processing module, configured to process the change characteristics and influence weights of the target factors using the time series neural network to obtain the target power consumption time series data of the target period, so as to determine the power distribution strategy of the distribution network for the target area based on the target power consumption time series data, wherein the target period is a future period; The time series neural network includes a multi-scale routing module, which includes a feature extraction layer, a pooling layer and a path selection layer. The time series neural network is used to extract features from the time series information of the target factor to obtain the change characteristics and influence weight of the target factor, including: Using the feature extraction layer, discrete Fourier transform is performed on the time series information of the target factor to obtain a frequency component sequence; and inverse discrete Fourier transform is performed on the first k frequency components to obtain the periodic change characteristics of the target factor, where k is an integer greater than 1; Using the pooling layer to perform multi-core average pooling and weighted processing on the periodic change characteristics of the target factor to obtain the real-time change characteristics of the target factor; and Using the path selection layer, inputting the periodic change feature and the real-time change feature into a multi-scale router to generate the influence weight; The time series neural network further includes: a multi-scale attention module and a multi-scale aggregation module. The time series neural network is used to process the change characteristics and influence weights of the target factors to obtain the target power consumption time series data of the target period, including: The multi-scale attention module structure includes M partition sizes, namely, partition size S1, partition size S2, and partition size S3, where each partition size S corresponds to a partition operation for a periodic change feature or a real-time change feature of an input. , where H represents the length of the time series in the periodic change feature or real-time change feature, d represents the feature dimension, and each partition size S divides the input periodic change feature or real-time change feature into P pieces, where ,Right now , after each partition, we get the feature vector , ; Using the multi-scale attention module to fuse the periodic change features based on the attention mechanism to obtain a fused periodic change feature; Using the multi-scale attention module to fuse the real-time change features based on the attention mechanism to obtain a fused real-time change feature; and Using the multi-scale aggregation module, weighted aggregation is performed on the fused periodic change feature and the fused real-time change feature according to the impact weight to generate the target power consumption time series data; The method of fusing the periodic change features using the multi-scale attention module based on the attention mechanism to obtain the fused periodic change features includes: Divide the periodic variation feature according to multiple division sizes to obtain multiple first feature vectors , ; Based on the self-attention mechanism, the first feature vectors of the same partition size are Perform internal fusion to obtain the first fused feature; Based on the interactive attention mechanism, the first feature vector to obtain a fused second feature; and Adding the fused first feature and the fused second feature to obtain the fused periodic variation feature; The method of fusing the real-time change features using the multi-scale attention module based on the attention mechanism to obtain the fused real-time change features includes: Divide the real-time change feature according to multiple division sizes to obtain multiple second feature vectors , ; Based on the self-attention mechanism, the second feature vectors of the same partition size are Perform internal fusion to obtain the fused third feature; Based on the interactive attention mechanism, each of the second feature vectors fused to obtain a fused fourth feature; and The fused third features and the fused fourth features are added together to obtain the fused real-time change feature.

5. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Power load prediction method, system, medium and equipment

    CN117277316A

  • Short-term power load prediction method and system

    CN118137492A

  • Multivariable time series prediction method fusing federated learning and pre-training large model fine tuning

    CN118690900A