Source load space-time correlation modeling method and system based on attention mechanism
Through the source load space-time correlation modeling method based on attention mechanism, the time attention mechanism and the time-convolution network T-TCN model are used to solve the problem that traditional methods are difficult to deal with complex large-scale scenario data, and the source load scenario is realized Accurate modeling and optimize grid system operation.
Patent Information
- Application Number
- CN202411344844.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-31
AI Technical Summary
Traditional scene generation methods are difficult to process large-scale scene data with complex characteristics, especially in terms of multi-time delays, variable topology structures, and multi-time and spatial scale collaborative optimization, making it difficult to accurately generate source load scenarios.
The source-load space-time correlation modeling method based on attention mechanism is adopted, and the source-load characteristics are constructed and the source-load scene generation is realized by designing the time attention mechanism and the time-convolution network T-TCN model.
Effectively utilize space-time correlation, optimize the generation of source-load scenarios of the power system, improve data modeling accuracy, reduce redundant calculations, provide simulation and analysis examples and optimize power system operation.
Smart Images

Figure CN119227535A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power grid system source-load scenario generation, and in particular to a source-load spatiotemporal correlation modeling method and system. Background Art
[0002] In the new power system, scene data has complex data characteristics such as dynamic variability and spatiotemporal correlation between data. Traditional scene generation methods face the problem of being unable to digest and process large-scale scene data with complex characteristics. At present, certain research has been carried out in the field of collaborative optimization of active distribution networks. However, with the continuous expansion of the scale of distribution networks, the scale of solving traditional centralized optimization problems and the difficulty of analysis have increased significantly. At the same time, for the complex multi-energy coupled distributed optimization in the network, there are still problems such as multiple time delays, variable topological structures, and multi-space-time scale coordination. The scene analysis method has the technical problem of being difficult to accurately generate source-load scenarios due to factors such as multiple time delays, complex variable topological structures, and difficulty in coordinating multiple space-time scales.
[0003] In view of the problem that current methods find it difficult to consider the power grid topology in the source-load scenario to mine and model the spatiotemporal characteristics of data such as the power output of each site and real-time load, this study considers modeling the multi-scale spatiotemporal relationships in complex source-load data based on the attention mechanism, capturing the multi-scale spatiotemporal correlation characteristics in source-load data such as power output, load, voltage and current. Summary of the invention
[0004] The present invention proposes a source-load spatiotemporal correlation modeling method and system based on an attention mechanism. By designing a new temporal attention mechanism to pre-screen influential time series features and model the source-load characteristics, accurate modeling of source-load data in complex and large-scale situations is achieved.
[0005] In a first aspect, the present invention provides a source-load spatiotemporal correlation modeling method based on an attention mechanism, comprising:
[0006] Select the load characteristics of the power transformer changes in the power grid to construct an original source-load data set, and construct the data in the original source-load data set as an initial time series;
[0007] Design a temporal attention block, and construct a temporal-convolutional network T-TCN model by connecting multiple temporal attention blocks in series. The output representation of the previous temporal attention block in the temporal-convolutional network T-TCN model is used as the input of the next temporal attention block. The initial time series is input into the first temporal attention block of the temporal-convolutional network T-TCN model, and the first temporal attention block outputs the time series feature. The time series feature output by the first temporal attention block is used as the input of the next temporal attention block, and so on. Each temporal attention block outputs a time series feature respectively. The time series features output by each temporal attention block constitute the source-load feature. The source-load feature is output by the scene generation temporal-convolutional network T-TCN model, and the source-load feature is dynamically evaluated to obtain influential time series features.
[0008] A source-load spatiotemporal correlation model is constructed on a prediction layer disposed at the output end of a time-convolutional network T-TCN model, and influential time series features are input into the source-load spatiotemporal correlation model to achieve source-load scenario generation. In some embodiments, a source-load feature dynamic evaluation is performed to obtain influential time series features, including: determining a weight coefficient of a time attention mechanism unit in each time attention block, assigning the weight coefficient to the time series features output by the corresponding time attention block, and determining an influential time series feature from each time series feature according to the weight coefficient of each time series feature.
[0009] In some embodiments, determining a weight coefficient of a temporal attention mechanism unit in each temporal attention block includes:
[0010] In the time-convolutional network T-TCN model, each time attention block includes a dilated causal convolution layer and a time attention mechanism unit connected in sequence. The dilated causal convolution layer performs a dilated causal convolution calculation on the time series feature input to the time attention block to obtain an intermediate output vector Output1, and inputs the output vector Output1 to the time attention mechanism unit for a one-dimensional convolution operation. During the one-dimensional convolution operation on the output vector Output1, the time attention mechanism unit obtains the weight coefficient TS of the time attention mechanism unit through the Sigmoid mapping of the activation function:
[0011] TS = Sigmoid(Covld(Output1))
[0013] In some embodiments, each time attention block further includes a bitwise multiplication unit and a logic AND unit connected in series, the bitwise multiplication unit is connected to the time attention mechanism unit, and the output representation of the previous time attention block in the time-convolutional network T-TCN model is used as the input of the next time attention block, including:
[0014] The bitwise multiplication unit performs bitwise multiplication on the weight coefficient TS and the intermediate output vector Output1 to obtain the intermediate output vector Output2. The logical AND operation unit adds the output vector Output2 to the time series feature input input to the current time attention block to obtain the final output vector Output3 of the current time attention block. The final output vector Output3 is used as the time series feature output by the current time attention block.
[0015] In some embodiments, the dilated causal convolution layer includes a plurality of one-dimensional convolution kernels connected in series, and the dilation coefficient of each of the one-dimensional convolution kernels connected in series increases exponentially.
[0016] In a second aspect, the present invention provides a source-load spatiotemporal correlation modeling system based on an attention mechanism, comprising an initial time series construction module, a source-load feature module and a modeling module, wherein:
[0017] The initial time series construction module selects the load characteristics of the power transformer changes in the power grid to construct the original source load data set, and constructs the data in the original source load data set into the initial time series;
[0018] Source-load feature module, design time attention block, construct time-convolutional network T-TCN model by connecting multiple time attention blocks in series, the output representation of the previous time attention block in the time-convolutional network T-TCN model is used as the input of the next time attention block, the initial time series is input to the first time attention block of the time-convolutional network T-TCN model, the first time attention block outputs time series features, the time series features output by the first time attention block are used as the input of the next time attention block, and so on, each time attention block outputs a time series feature respectively, the time series features output by each time attention block constitute the source-load feature, the source-load feature is output by the scene generation time-convolutional network T-TCN model, and the source-load feature is dynamically evaluated to obtain influential time series features;
[0019] The modeling module is used to build a source-load spatiotemporal correlation model on the prediction layer set at the output end of the time-convolutional network T-TCN model, and input influential time series features into the source-load spatiotemporal correlation model to realize source-load scenario generation.
[0020] In some embodiments, a dynamic evaluation of source-load characteristics is performed to obtain influential time series characteristics, including: determining a weight coefficient of a time attention mechanism unit in each time attention block, assigning the weight coefficient to the time series characteristics output by the corresponding time attention block, and determining influential time series characteristics from each time series characteristic according to the weight coefficient of each time series characteristic.
[0021] In some embodiments, determining a weight coefficient of a temporal attention mechanism unit in each temporal attention block includes:
[0022] In the time-convolutional network T-TCN model, each time attention block includes a dilated causal convolution layer and a time attention mechanism unit connected in sequence. The dilated causal convolution layer performs a dilated causal convolution calculation on the time series feature input to the time attention block to obtain an intermediate output vector Output1, and inputs the output vector Output1 to the time attention mechanism unit for a one-dimensional convolution operation. During the one-dimensional convolution operation on the output vector Output1, the time attention mechanism unit obtains the weight coefficient TS of the time attention mechanism unit through the Sigmoid mapping of the activation function:
[0023] TS = Sigmoid(Covld(Output1))
[0025] In some embodiments, each time attention block further includes a bitwise multiplication unit and a logic AND unit connected in series, the bitwise multiplication unit is connected to the time attention mechanism unit, and the output representation of the previous time attention block in the time-convolutional network T-TCN model is used as the input of the next time attention block, including:
[0026] The bitwise multiplication unit performs bitwise multiplication on the weight coefficient TS and the intermediate output vector Output1 to obtain the intermediate output vector Output2. The logical AND operation unit adds the output vector Output2 to the time series feature input input to the current time attention block to obtain the final output vector Output3 of the current time attention block. The final output vector Output3 is used as the time series feature output by the current time attention block.
[0027] In some embodiments, the dilated causal convolution layer includes a plurality of one-dimensional convolution kernels connected in series, and the dilation coefficient of each of the one-dimensional convolution kernels connected in series increases exponentially.
[0028] In a third aspect, the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements a source-load spatiotemporal correlation modeling method based on an attention mechanism provided in any of the above-mentioned embodiments.
[0029] In a third aspect, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a source-load spatiotemporal correlation modeling method based on an attention mechanism provided in any of the above-mentioned embodiments.
[0030] Compared with the prior art, the beneficial effects and advantages of the present invention are:
[0031] 1) Effectively utilize the spatiotemporal correlation of time series data, greatly optimizing the generation of source-load scenarios of the power system;
[0032] 2) It provides simulation analysis examples for grid dispatching and decision-making, and optimizes the generation of power system operation scenarios.
[0033] Considering that it is difficult to accurately generate source-load scenarios in complex or large-scale power grid systems, the technical solution provided by the embodiments of the present invention may have the following beneficial effects:
[0034] Construct a source-load spatiotemporal correlation model and input influential time series features into the source-load spatiotemporal correlation model to achieve source-load scenario generation. This solves the problem of accurate modeling of source-load data in complex and large-scale situations, reduces redundant calculations, improves the accuracy of source-load data modeling, and optimizes the generation of source-load scenarios in the power grid system.
[0035] By designing a new temporal attention mechanism, a temporal-convolutional network T-TCN model is constructed by multiple temporal attention blocks connected in series. The initial time series is input into the first temporal attention block of the temporal-convolutional network T-TCN model. The first temporal attention block outputs the first time series feature representation as the input of the next temporal attention block, and so on. The subsequent temporal attention blocks output the second to n-1th time series feature representations respectively. The time series feature representations obtained by each temporal attention block constitute the source-load feature. The source-load feature is dynamically evaluated to obtain influential time series features. Based on the attention mechanism and spatiotemporal correlation, comprehensive mining of complex characteristics in source-load data is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a schematic diagram of the overall process of a source-load spatiotemporal correlation modeling method based on an attention mechanism of the present invention;
[0037] Figure 2 The following is a diagram of the architecture of the temporal convolutional network (T-TCN) model; (a) the architecture of the temporal convolutional network (T-TCN) model, and (b) the connection method of the prediction layer of the prior art;
[0038] Figure 3 Schematic diagram of an expanded causal convolutional network with an exponentially growing expansion coefficient;
[0039] Figure 4 Schematic diagram of one-dimensional convolution operation;
[0040] Figure 5This is a module diagram of a source-load spatiotemporal correlation modeling system based on an attention mechanism of the present invention. DETAILED DESCRIPTION
[0041] The specific implementation modes of the present invention will be described in detail below with reference to the accompanying drawings.
[0042] like Figure 1 As shown, a source-load spatiotemporal correlation modeling method based on an attention mechanism of the present invention comprises the following specific steps:
[0043] Step 1, select the load characteristics of the power transformer changes of the power grid to construct an initial source load data set, and form a time series: construct a source load data set and perform data processing: that is, select the load characteristics of the power transformer changes of the power grid as the initial source load data set, perform data processing on the data, and generate an initial source load data set time series;
[0044] Step 2: Build a time-convolutional network T-TCN model. Based on the time-convolutional network model (i.e., T-TCN model), the time attention mechanism of the time attention block in step 2 is integrated into the time convolutional network TCN model framework, thereby building a T-TCN model, i.e., a TCN model based on the time attention mechanism. The T-TCN model not only retains the advantages of TCN parallel processing and avoiding gradient disappearance / explosion, but also enhances the model's ability to capture the intrinsic dependency of time series through an innovative time attention mechanism, thereby improving the model performance.
[0045] like Figure 2 As shown, multiple time attention blocks are designed; each time attention block includes a dilated causal convolution module, a time attention mechanism unit, a bitwise multiplication unit and a logical AND operation unit connected in sequence, wherein, in the time-convolutional network T-TCN model, each time attention block includes a dilated causal convolution layer and a time attention mechanism unit connected in sequence, the dilated causal convolution layer performs a dilated causal convolution calculation on the time series feature input input to the time attention block to obtain an intermediate output vector Output1, and the output vector Output1 is input to the time attention mechanism unit for a one-dimensional convolution operation. In the process of performing a one-dimensional convolution operation on the output vector Output1, the time attention mechanism unit obtains the weight coefficient TS of the time attention mechanism unit through the Sigmoid mapping of the activation function:
[0046] TS=Sigmoid(Covld(Output1)) (1)
[0047] Then, the bitwise multiplication unit obtains Output2 by bitwise multiplication of the weight coefficient TS and the output vector Output1, and then the logical AND operation unit adds Output2 to the input to obtain the final output vector Output3 of a single time attention block. Output3 is used as the input of the next time attention block, and the above operation is repeated. The T-TCN model is mainly composed of multiple time attention blocks. The first time block takes the initial source load data as input, and each subsequent time attention block takes the output of the previous time attention block as input. After processing J time attention blocks, the output results of all time attention blocks are used as source load features and input into the prediction layer. The part marked with a box is the source load feature corresponding to the original input data.
[0048] The dilated causal convolution used in this step is a special one-dimensional convolution, such as Figure 3 As shown in the figure, it is a dilated causal convolution network with an exponentially growing dilation coefficient. It combines causal convolution and dilated convolution. The core operation of one-dimensional convolution is to make the inner product of the convolution kernel and the subvector in the input vector the same length and size as the convolution kernel, and then move the convolution kernel forward a certain step size and do the same operation. If the i-th element of the output vector depends only on the elements in the input vector with a subscript less than or equal to i, this convolution method is called causal convolution. In order to ensure that the output vector and the input vector have the same length in causal convolution, it is necessary to fill in zero values on the left side of the input vector. In causal convolution, the receptive field of the convolution kernel is limited by the size of the convolution kernel, making it impossible for the current operation to consider more historical data. To solve this problem, the dilation operation is introduced to expand the range of the receptive field by crossing the interval. This convolution is called dilated causal convolution.
[0049] Based on the dilated causal convolution, through further optimization, the dilation coefficient increases exponentially, thereby reducing the number of layers of the dilated causal convolutional network, such as Figure 2 In the dilated causal convolutional network structure shown in Figure , the dilation coefficient d of the i-th layer is:
[0050] d = 2 i-1 (2)
[0051] Step 3, the source-load feature is related to the initial time series, and the time series features constituting the source-load feature are dynamically evaluated. The time attention block is used to emphasize the dynamic evaluation of the time series for the initial source-load data set, and the initial time series is input into the first time attention block of the time-convolutional network T-TCN model. The first time attention block outputs the first time series feature representation as the input of the next time attention block, and so on. The subsequent time attention blocks output the second to n-1 time series feature representations respectively. In the dynamic evaluation process, the time series features (that is, historical segments) that are more influential in the current prediction task are emphasized, and the weight coefficients of the time attention mechanism are generated, and different weights are assigned to different time series features (that is, historical segments); specifically, the initial time series as the input in the first time attention block is expanded causal convolution, and the intermediate output vector Output1 of the time attention block is obtained through the Relu function and dropout, and the output vector Output1 is input into the current first time attention block, and a one-dimensional convolution operation with a convolution kernel size of 2 is performed, and then the weight coefficient TS of the time attention mechanism unit is obtained through the Sigmoid mapping of the activation function:
[0052] TS=Sigmoid(Covld(Output1)) (3)
[0053] The weight coefficient TS is bitwise multiplied with the intermediate output vector Output1 to obtain the intermediate output vector Output2, and then the output vector Output2 is added to the input input to obtain the final output vector Output3 of a single time attention block, and the final output vector Output3 is used as the input of the next time attention block; the weight coefficient is assigned to different historical periods in the time series, and the initial source-load data set is dynamically evaluated with emphasis on the time series to obtain influential time series features (that is, historical segments); the above dynamic evaluation operation is repeated until the dynamic evaluation of all time attention blocks is completed;
[0054] The time series features are processed by the initial time series through a multi-level attention module. Each time series feature contains historical data information and is therefore also a historical fragment.
[0055] Step 4: Model the source-load spatiotemporal correlation model, which specifically includes the following processes:
[0056] ① According to the length L of the input vector (i.e. the initial source-load data time series), the size k×1 of the convolution kernel, and the expansion coefficient b, the minimum number of layers N required for the source-load spatiotemporal correlation model is determined comprehensively. The expression is as follows:
[0057]
[0058] ② Determine the number of zero values p added to the left side of each layer of the input vector of the source-load spatiotemporal correlation model:
[0059] p=b (i-1) *(k-1) (5)
[0060] Among them, k represents the size of the convolution kernel, and i represents the number of model layers;
[0061] Repeat the above-mentioned dynamic evaluation process of the historical segments of the time series until all time blocks are executed;
[0062] Step 5: Realize source-load scenario generation. Build a source-load spatiotemporal correlation model on the prediction layer set at the output end of the time-convolutional network T-TCN model, and input influential time series features into the source-load spatiotemporal correlation model to realize source-load scenario generation.
[0063] like Figure 5 As shown, a source-load spatiotemporal correlation modeling system based on an attention mechanism of the present invention includes an initial time series construction module, a source-load feature module and a modeling module.
[0064] Among them: the initial time series construction module selects the load characteristics of the power transformer changes of the power grid to construct the original source load data set, and constructs the data in the original source load data set into the initial time series;
[0065] Source-load feature module, design time attention block, construct time-convolutional network T-TCN model by connecting multiple time attention blocks in series, the output representation of the previous time attention block in the time-convolutional network T-TCN model is used as the input of the next time attention block, the initial time series is input to the first time attention block of the time-convolutional network T-TCN model, the first time attention block outputs time series features, the time series features output by the first time attention block are used as the input of the next time attention block, and so on, each time attention block outputs a time series feature respectively, the time series features output by each time attention block constitute the source-load feature, the source-load feature is output by the scene generation time-convolutional network T-TCN model, and the source-load feature is dynamically evaluated to obtain influential time series features;
[0066] The modeling module is used to construct a source-load spatiotemporal correlation model and input influential time series features into the source-load spatiotemporal correlation model to achieve source-load scenario generation.
[0067] The following is an example of the data processing in step 1 through experiments:
[0068] 1) The experiment selected the load characteristics of the local power grid power transformer that changed within one month as the initial source load data set.
[0069] 2) In the experiment, T consecutive values are used to predict the T+1 value (T consecutive values refer to the values of the consecutive time steps of the time series data used for model training, and the model will use T consecutive values to predict the T+1th value). Therefore, this paper first divides the original data set into the format of (initial value, predicted value), that is, {([X1,X2,....,X T ],[X T+1 ]) k'=1 ,([X2,X3,....,X T+1 ],[X T+2 ]) k'=2 ,([X T m ,X T m+1 ,....,X T+m 1 ],[X T+m ]) k'=m} (6)
[0071] Among them, k' represents the index of each training source load data, and m represents the total number of data contained in the data set; in order to consider the application field of the data, in the power data prediction experiment, the T values are 8, 16 and 32 respectively.
[0072] The original data set is obtained, and the original data set includes time series data of T consecutive time steps. Each time series data includes an initial value and an influential historical fragment data value of the source-load time series related data corresponding to the initial value. The original data set is input into the source-load spatiotemporal correlation model to obtain the initial value of the T+1 time series data and the source-load scenario prediction data corresponding to the initial value.
[0073] 3) Experimental comparison
[0074] This experiment uses three evaluation indicators: root mean square error (RMSE), mean absolute error (MAE), and symmetric mean absolute percentage error (sMAPE), respectively RMSE as shown in formula (7), MAE as shown in formula (8), and as shown in formula (9):
[0075]
[0076] Among them, n refers to the number of predicted values, that is, the number of samples; y t represents the actual value, which is the observed value at time point t; Represents the predicted value, which is the model predicted value at time point t.
[0077] As shown in Table 1, there are experimental results of four methods (long short-term memory artificial neural network LSTM, recurrent neural network GRU, time domain convolutional network TCN (Temporal Convolutional Networks) and T-TCN of the present invention) for source-load spatiotemporal correlation modeling, and the best result is shown in bold.
[0078] Table 1
[0079]
[0080] The experimental results show that the model proposed in the present invention achieves the best results under the three indicators, which proves the practicability of the present invention.
[0081] In summary, the present invention realizes comprehensive mining and accurate modeling of complex characteristics in source-load data based on the attention mechanism and spatiotemporal correlation, optimizes the source-load scene generation technology, and improves the quality of generated scenes.
[0082] In addition, based on similar inventive concepts, an embodiment of the present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the above method when executing the computer program.
[0083] In addition, based on similar inventive concepts, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that the computer program implements the above method when executed by a processor.
[0084] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The schemes in the embodiments of the present invention may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0085] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0086] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0088] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0089] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
[0090] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications made without departing from the principle of the present invention should also be regarded as falling within the scope of protection of the present invention.
[0091] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings and technical solutions. This is only a description of the preferred embodiments of the present invention, and does not limit the concept and scope of the present invention. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations. The various specific technical features described in the above specific embodiments may be combined, modified or improved in any suitable manner without contradiction, and shall fall within the scope of protection of the present invention without departing from the concept of the present invention.
Claims
1. A source-load spatiotemporal correlation modeling method based on attention mechanism, characterized in that: include: The load characteristics of the power transformers in the power grid are selected to construct the original source-load data set, so as to construct the initial time series; Design a temporal attention block, and construct a temporal-convolutional network T-TCN model by connecting multiple temporal attention blocks in series. The output representation of the previous temporal attention block in the temporal-convolutional network T-TCN model is used as the input of the next temporal attention block. The initial time series is input into the first temporal attention block of the temporal-convolutional network T-TCN model, and the first temporal attention block outputs the time series feature. The time series feature output by the first temporal attention block is used as the input of the next temporal attention block, and so on. Each temporal attention block outputs a time series feature respectively. The time series features output by each temporal attention block constitute the source-load feature. The source-load feature is output by the scene generation temporal-convolutional network T-TCN model, and the source-load feature is dynamically evaluated to obtain influential time series features. A source-load spatiotemporal correlation model is constructed, and influential time series features are input into the source-load spatiotemporal correlation model to realize source-load scenario generation.
2. According to the method of modeling source-load spatiotemporal correlation based on attention mechanism in claim 1, it is characterized in that: Perform a dynamic evaluation of source-load characteristics to obtain influential time series characteristics, including: determining the weight coefficient of the time attention mechanism unit in each time attention block, assigning the weight coefficient to the time series characteristics output by the corresponding time attention block, and determining the influential time series characteristics from each time series characteristics according to the weight coefficient of each time series characteristic.
3. According to the method of modeling source-load spatiotemporal correlation based on attention mechanism in claim 2, it is characterized in that: Determine the weight coefficient of the temporal attention mechanism unit in each temporal attention block, including: In the time-convolutional network T-TCN model, each time attention block includes a dilated causal convolution layer and a time attention mechanism unit connected in sequence. The dilated causal convolution layer performs a dilated causal convolution calculation on the time series feature input to the time attention block to obtain an intermediate output vector Output1, and inputs the output vector Output1 to the time attention mechanism unit for a one-dimensional convolution operation. During the one-dimensional convolution operation on the output vector Output1, the time attention mechanism unit obtains the weight coefficient TS of the time attention mechanism unit through the Sigmoid mapping of the activation function: TS=Sigmoid(Covld(Output1)).
4. According to the method of modeling source-load spatiotemporal correlation based on attention mechanism in claim 3, it is characterized in that: Each time attention block also includes a bitwise multiplication unit and a logical AND unit connected in sequence. The bitwise multiplication unit is connected to the time attention mechanism unit. The output representation of the previous time attention block in the time-convolutional network T-TCN model is used as the input of the next time attention block, including: The bitwise multiplication unit performs bitwise multiplication on the weight coefficient TS and the intermediate output vector Output1 to obtain the intermediate output vector Output2. The logical AND operation unit adds the output vector Output2 to the time series feature input input to the current time attention block to obtain the final output vector Output3 of the current time attention block. The final output vector Output3 is used as the time series feature output by the current time attention block.
5. According to the method of modeling source-load spatiotemporal correlation based on attention mechanism in claim 1, it is characterized in that: The dilated causal convolution layer includes multiple one-dimensional convolution kernels connected in series, and the dilation coefficient of each one-dimensional convolution kernel connected in series increases exponentially.
6. A source-load spatiotemporal correlation modeling system based on attention mechanism, characterized in that: It includes the initial time series construction module, source load characteristic module and modeling module, among which: The initial time series construction module selects the load characteristics of the power transformer changes in the power grid to construct the original source load data set, and constructs the data in the original source load data set into the initial time series; Source-load feature module, design time attention block, construct time-convolutional network T-TCN model by connecting multiple time attention blocks in series, the output representation of the previous time attention block in the time-convolutional network T-TCN model is used as the input of the next time attention block, the initial time series is input to the first time attention block of the time-convolutional network T-TCN model, the first time attention block outputs time series features, the time series features output by the first time attention block are used as the input of the next time attention block, and so on, each time attention block outputs a time series feature respectively, the time series features output by each time attention block constitute the source-load feature, the source-load feature is output by the scene generation time-convolutional network T-TCN model, and the source-load feature is dynamically evaluated to obtain influential time series features; The modeling module is used to construct a source-load spatiotemporal correlation model and input influential time series features into the source-load spatiotemporal correlation model to achieve source-load scenario generation.
7. The source-load spatiotemporal correlation modeling system based on the attention mechanism according to claim 6, characterized in that: Perform a dynamic evaluation of source-load characteristics to obtain influential time series characteristics, including: determining the weight coefficient of the time attention mechanism unit in each time attention block, assigning the weight coefficient to the time series characteristics output by the corresponding time attention block, and determining the influential time series characteristics from each time series characteristics according to the weight coefficient of each time series characteristic.
8. The source-load spatiotemporal correlation modeling system based on the attention mechanism according to claim 7, characterized in that: Determining the weight coefficient of the temporal attention mechanism unit in each temporal attention block further includes: In the time-convolutional network T-TCN model, each time attention block includes a dilated causal convolution layer and a time attention mechanism unit connected in sequence. The dilated causal convolution layer performs a dilated causal convolution calculation on the time series feature input to the time attention block to obtain an intermediate output vector Output1, and inputs the output vector Output1 to the time attention mechanism unit for a one-dimensional convolution operation. During the one-dimensional convolution operation on the output vector Output1, the time attention mechanism unit obtains the weight coefficient TS of the time attention mechanism unit through the Sigmoid mapping of the activation function: TS=Sigmoid(Covld(Output1)).
9. The source-load spatiotemporal correlation modeling system based on the attention mechanism according to claim 6, characterized in that: Each time attention block also includes a bitwise multiplication unit and a logical AND unit connected in sequence. The bitwise multiplication unit is connected to the time attention mechanism unit. The output representation of the previous time attention block in the time-convolutional network T-TCN model is used as the input of the next time attention block, including: The bitwise multiplication unit performs bitwise multiplication on the weight coefficient TS and the intermediate output vector Output1 to obtain the intermediate output vector Output2. The logical AND operation unit adds the output vector Output2 to the time series feature input input to the current time attention block to obtain the final output vector Output3 of each time attention block. The final output vector Output3 is used as the time series feature output by the current time attention block.
10. The source-load spatiotemporal correlation modeling system based on the attention mechanism according to claim 6, characterized in that: The dilated causal convolution layer includes multiple one-dimensional convolution kernels connected in series, and the dilation coefficient of each one-dimensional convolution kernel connected in series increases exponentially.
11. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a source-load spatiotemporal correlation modeling method based on an attention mechanism is implemented according to any one of claims 1 to 5.
12. A non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for modeling source spatiotemporal correlation based on an attention mechanism according to any one of claims 1 to 5 is implemented.
