Power consumption dynamic prediction method based on time channel fusion strategy and mxlstm

By using the time channel fusion strategy and mxlstm model in power consumption prediction, combining historical power consumption data and peripheral multivariate data, the problem that traditional methods cannot capture time series dependencies is solved, and high-precision power consumption prediction is achieved, which is suitable for power consumption data monitoring and prediction of different enterprises.

CN119558688AActive Publication Date: 2025-03-04FUZHOU UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510095641.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-03-04
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

Traditional power consumption prediction methods rely on single-dimensional data and cannot capture long-term and short-term dependencies in time series of different scales, resulting in low prediction accuracy and inability to meet the needs of scenarios that require more refined management.

Method used

The time channel fusion strategy and mxlstm dynamic prediction method are adopted, and the time channel fusion method is combined with the random shuffle strategy and the early stop strategy, and multi-scale feature extraction and the Multi-Attention-OLSTM model are used to predict the power consumption data and peripheral multivariate data.

Benefits of technology

It realizes high-precision prediction of electricity consumption, has the characteristics of long-term and short-term adaptation and multi-scale data fusion, and can effectively process and analyze the dynamic characteristics of space-time and space in the changes in electricity consumption, and has high application value and social benefits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119558688A_ABST
    Figure CN119558688A_ABST
Patent Text Reader

Abstract

The invention provides an electricity consumption dynamic prediction method based on a time channel fusion strategy and mxlstm, and the method employs a time channel fusion method, combines a random shuffling strategy and an early stop strategy, employs a Multi-Attention-OLSTM model after multi-scale feature extraction based on expansion convolution and path attention weight optimization, and achieves the dynamic prediction of electricity consumption. Power consumption prediction is realized by combining historical time power consumption data and peripheral multivariate data. Power consumption data and external multivariate related data are effectively combined to realize prediction, and spatio-temporal dynamic characteristics in power consumption changes are efficiently processed and analyzed. The method can be widely applied to power consumption data monitoring and prediction of different enterprises, provides reference for power customers to optimize production structures and judge equipment faults, provides decision basis for power sales companies in electric power futures trading, provides advanced reference values for generating capacity of power generation enterprises, provides pilot indexes for balancing peak clipping and valley leveling of power grid loads, and improves power supply efficiency. And the method has relatively high application value and social benefit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical fields of electric power big data, power consumption prediction, etc., and specifically relates to a method for dynamic power consumption prediction based on time channel fusion strategy and mxlstm. Background Art

[0002] Electricity consumption forecasting is an important branch of the application and value realization of power big data, which helps to provide scientific guidance and reference for power departments, power users, and power sales companies, such as arranging operation plans, industrial production planning, and power trading. However, most traditional power consumption estimation methods rely on single-dimensional data, such as simply referring to the linear extrapolation of historical power consumption data in the past, or roughly estimating the scale of power consumption based on the company's production capacity, ignoring the relevant data of other modes. These solutions often oversimplify the power consumption scenarios and fail to capture the long-term and short-term dependencies in time series of different scales, resulting in a significant reduction in prediction accuracy and unable to meet the needs of various scenarios that require more refined management. Summary of the invention

[0003] In view of this, the present invention aims to propose a method for dynamic prediction of power consumption based on time channel fusion strategy and mxlstm, combining time channel fusion strategy and multi-dimensional, multi-feature deep learning model to achieve high-precision prediction of power consumption. The present invention predicts future power consumption with historical power consumption data and peripheral multivariate data, and has the characteristics of long-short cycle adaptation and multi-scale data fusion. By adopting the time channel fusion method, combined with the random shuffle strategy and the early stopping strategy, the prediction is realized by using the Multi-Attention-OLSTM model after multi-scale feature extraction (expanded convolution) and path attention weight optimization, and the power consumption data and external multivariate related data are effectively combined to realize the prediction, and the spatiotemporal dynamic characteristics of power consumption changes are efficiently processed and analyzed. The present invention can be widely used in the monitoring and prediction of power consumption data of different enterprises, providing reference for power customers to optimize production structure and judge equipment failure, providing decision-making basis for power sales companies in power futures trading, providing advance reference value for power generation of power generation enterprises, and providing leading indicators for balancing power grid load peak shaving and valley leveling, with high application value and social benefits.

[0004] The technical solution specifically adopted by the present invention to solve the technical problem is: A method for dynamic electricity consumption prediction based on time channel fusion strategy and mxlstm: By adopting the time channel fusion method, combined with the random shuffling strategy and early stopping strategy, and using the Multi-Attention-OLSTM model after multi-scale feature extraction based on dilated convolution and path attention weight optimization, the electricity consumption forecast is realized by combining historical time electricity consumption data and peripheral multivariate data.

[0005] Furthermore, the original data set uses historical electricity consumption data with time stamps and peripheral electricity consumption multivariate data, with a sampling interval of 1 hour; the peripheral electricity consumption multivariate data includes: meteorological data, and one or more of economic, cargo ship cycle, commodity prices, PMI, PPI, and industrial structure change data; a threshold denoising method based on wavelet transform is used to preprocess the electricity consumption data and external data in the original data set.

[0006] Furthermore, the time channel fusion method adopts a time channel fusion strategy to fuse the original independent time channels, and the specific steps are as follows: First, multiple time channels are reduced to two dimensions and preliminary features are extracted from them; Then execute the following time channel fusion algorithm: Initialize the CF tree parameters, including the maximum number of CFs for internal nodes, the maximum number of CFs for leaf nodes, and the maximum sample radius threshold; read the first sample point from the data set and create a new CF triplet As root node: In the above formula: represents the linear summation of each point, represents the sum of squares of each point, represents the nth sample point, x ni represents the size of the i-th dimension of the n-th sample point, and N represents the total number of sample points; Insert new sample points into the CF tree, create or update CF nodes and split nodes, and finally extract the fusion results according to the CF nodes in the CF tree. Each CF node represents a fusion class: In the above formula: represents the fusion class centroid, represents each sample point, represents the class radius, represents the class diameter, represents the distance between classes, , Respectively represent the total number of sample points in any two clusters, Respectively represent the sum of sample points in any two clusters, Respectively represent the sum of squares of sample points in any two clusters; Thus, n fusion classes are obtained; then, the boundary elements of the obtained fusion results are exchanged using a random shuffle strategy to optimize the boundary fusion results.

[0007] Furthermore, the specific process of the random shuffling strategy is: The specific process of the random shuffling strategy is: For the mth fusion class, select the cluster center The nearest fusion class centroid , and define the jth fusion class as the target fusion class; In the nth fusion class, select the distance from the target fusion class centroid The nearest 20% elements; in the target fusion class, the distance to the cluster center is also selected The most recent 20% elements; The two groups of elements are exchanged, and the above steps of inserting new sample points into the CF tree are repeated, and the CF tree nodes are updated by creating or updating CF nodes and splitting nodes, and the fusion results are extracted according to the CF nodes in the CF tree, so as to update and optimize the fusion results; For the fusion results of two adjacent updates, calculate the similarity and performance loss difference between the time channels; The similarity between the time channels Specifically:

[0008] In the above formula: represents the number of common samples in the i-th true category and the j-th fusion result, represents the number of samples in the i-th true category, represents the number of samples in the jth true category; the operation in the brackets on the right side of the equation represents the combination number operation; The range is [-1, 1], where 1 means that the fusion results are completely consistent; 0 means that there is no correlation between the fusion results; -1 means that the fusion results are completely different; The performance loss difference between two adjacent time channel fusion results is recorded as , used to measure the difference in time channels;

[0009] In the above formula: represents the number of samples, is the fusion performance of the nth time channel fusion result, and its value range is [-1, 1]; A value close to 1 indicates good fusion quality; A value close to 0 indicates that the time channel is located at the boundary of two fusion classes and the fusion effect is not good; A value close to -1 indicates that the temporal channel is incorrectly assigned to a fused class; Represents the mean distance from time channel k to each sample point in the fusion class, Represents the mean distance of time channel k to the time channels in other fusion classes:

[0010] in, Indicates the number of time channels in the fusion class where time channel k belongs, Indicates the number of time channels outside the fusion class where time channel k belongs; represents the time channel feature value in the fusion class where time channel k belongs, Indicates the time channel feature value outside the fusion class where time channel k belongs; Through the random shuffle strategy, the fusion results are continuously updated, and the similarity between time channels is continuously updated. and performance loss The calculation results are taken and gradient test is performed to determine whether to stop the random shuffle process and output the final fusion result: If the performance loss is poor The gradient is positive and the similarity If the gradient is negative, continue to optimize; If the performance loss is poor Gradient is negative or similarity When the gradient is regular, the optimization is stopped and the final fusion result is output.

[0011] Furthermore, the gradient test adopts an early stopping strategy, in which a patience value is set to 5.

[0012] Furthermore, the time channel fusion method adopts the introduction of sliding window method sampling: based on the determined sliding window and sliding step size, the denoised power consumption data in each window is slidingly fused, thereby obtaining the dynamic fusion results of different power consumption data; and the performance loss difference is adopted. and similarity , will meet the similarity The maximum adjacent sliding windows of the threshold are merged into one window, which is used as the input of the next time series prediction model.

[0013] Furthermore, based on the fusion results determined by the time channel fusion method, similar time channels and external meteorological data are used as multi-feature inputs of the Multi-Attention-OLSTM model; short-term and medium-scale features of the time series are extracted by dilated convolution, and two time steps in units of hours and weeks are extracted in total. Different levels of dynamic weighting are performed on the features of the two time scales, so that each attention module can adaptively adjust the temporal relationship in the data; The formula for the dilated convolution operation is: in, is the input data sequence, is the output sequence, is the expansion factor, is the convolution kernel weight, is the convolution kernel length; by adjusting the expansion factor , to obtain features at different time scales; The Multi-Attention-OLSTM model adopts the self-attention mechanism formula after introducing the large core attention mechanism adjustment: Among them, Q is the prediction target at the current moment, that is, the future electricity consumption; K is the characteristic information of the historical time step, including all external indicators; V is the actual electricity consumption value corresponding to each historical moment, is the weight coefficient calculated by expanding the kernel size.

[0014] Furthermore, the Multi-Attention-OLSTM model introduces a two-dimensional sliding window in the multi-feature fusion stage to weightedly fuse local information and global information of time series features of different scales.

[0015] Furthermore, the Multi-Attention-OLSTM model uses a global Transformer encoder to further encode the extracted multi-scale features; the encoded features enter the optimized LSTM neural network to realize prediction, and perform electricity consumption prediction based on multi-feature input.

[0016] The optimized LSTM neural network reduces the weight decay rate of the hidden state and adjusts the dynamic threshold of the forget gate to make the model pay more attention to short-term change characteristics; at each time step, multiple LSTM units process the features on the hour and month time scales in parallel; a hybrid loss function combining cross entropy and KL divergence is used as the connection layer, and parallel LSTM units are used to coordinate features of different time scales: in, They represent the forget gate, input gate and output gate respectively. is the current input, is the hidden state of the previous time step, is the memory state of the previous time step; W f , W i , W o , W c is the weight matrix, corresponding to the update of the forget gate, input gate, output gate and memory unit respectively; b f , b i , b o, b c They are bias items corresponding to the forget gate, input gate, output gate and memory unit state update respectively; the output of the optimized LSTM neural network passes through the self-attention mechanism decoder to output the predicted power consumption.

[0017] And, an electronic device includes a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of a method for dynamic prediction of electricity consumption based on a time channel fusion strategy and mxlstm as described above are implemented.

[0018] A non-transitory computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for dynamic power consumption prediction based on a time channel fusion strategy and mxlstm as described above.

[0019] In view of the defects and deficiencies of the prior art, the present invention and its preferred solution effectively combine electricity consumption data and external multivariate related data to achieve prediction, and efficiently process and analyze the spatiotemporal dynamic characteristics of electricity consumption changes. This solution can be widely used in the monitoring and prediction of electricity consumption data of different enterprises, provide a reference for electricity users to optimize production structure and judge equipment failures, provide a decision-making basis for power sales companies in power futures trading, provide advance reference values ​​for power generation companies, and provide leading indicators for balancing power grid load peak and valley, with high application value and social benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments: Figure 1 It is an overall flow chart of the embodiment of the present invention; Figure 2 The figure is a flow chart of the time channel fusion process according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to make the features and advantages of the present invention more clearly understood, the following embodiments are specifically described in detail as follows: It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0022] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0023] like Figure 1 As shown, taking the enterprise electricity consumption forecast as an example, the specific implementation process of the embodiment of the present invention includes: First, historical electricity consumption data with time stamps and peripheral electricity consumption multivariate data are collected, with the preferred reference sampling interval being 1 hour, as the original data set.

[0024] Among them, the multivariate data of external electricity consumption includes but is not limited to one or more of the data that affect electricity consumption, such as weather, economy, cargo ship cycle, commodity prices, PMI, PPI, changes in industrial structure, etc. In general, meteorological data is a necessary external data.

[0025] Taking meteorological data as an example, including temperature data (℃), wind force data (level), wind speed data (km / h), air pressure data (hPa), etc., the data is continuously collected or amplified, and the time intervals of electricity consumption are aligned to form a continuous original data set. The temperature directly affects the operating load of the company's air conditioning, refrigeration and heating equipment; wind force and wind speed have an indirect impact on the power demand of the equipment by adjusting the environmental ventilation and heat dissipation efficiency; changes in air pressure will affect the air density and the operating efficiency of mechanical equipment, thereby affecting electricity consumption. The above factors interact with each other and jointly determine the dynamic changes in the company's electricity consumption. Therefore, introducing these indicators in the prediction model can more comprehensively capture the complex impact of the external environment on electricity consumption and improve the prediction accuracy. Therefore, these four indicators are specially selected as input variables.

[0026] The threshold denoising method based on wavelet transform is used to preprocess the electricity consumption data and external data.

[0027] Then, as the core processing step of the present invention, the spatial dimension characteristics of electricity consumption are considered, and the time channel fusion strategy is adopted to fuse the original independent time channels. The specific steps are as follows: Perform dimensionality reduction on multiple time channels to obtain 2 dimensions, from which preliminary features are extracted.

[0028] Initialize the CF tree parameters, including the maximum number of CFs for internal nodes (B), the maximum number of CFs for leaf nodes (L), and the maximum sample radius threshold (T). Read the first sample point from the dataset and create a new CF triplet. , and use it as the root node: In the above formula: represents the linear summation of each point, represents the sum of squares of each point, represents the nth sample point, x ni represents the size of the i-th dimension of the n-th sample point, and N represents the total number of sample points.

[0029] Insert new sample points into the CF tree, create or update CF nodes and split nodes, and finally extract the fusion results according to the CF nodes in the CF tree. Each CF node represents a fusion class:

[0030] In the above formula: represents the fusion class centroid, represents the class radius, represents the class diameter, represents the distance between classes, , Respectively represent the total number of sample points in any two clusters.

[0031] Through the above steps, multiple fusion classes are obtained. In order to enhance the boundary robustness of the fusion result, the present invention uses a random shuffle strategy to exchange the boundary elements of the obtained fusion result, so as to optimize the boundary fusion result. The random shuffle process is defined as follows: For the mth fusion class, select the cluster center The nearest fusion class centroid , and define the jth fusion class as the target fusion class.

[0032] In the nth fusion class, select the distance from the target fusion class centroid The nearest 20% elements; in the target fusion class, the distance to the cluster center is also selected The most recent 20% elements.

[0033] The two groups of elements are exchanged, and the above steps of inserting new sample points into the CF tree are repeated. By creating or updating CF nodes and splitting nodes, the CF tree nodes are updated according to the CF nodes in the CF tree, and the fusion results are extracted to update and optimize the fusion results.

[0034] For the fusion results of two consecutive updates, the following two indicators are defined to measure their effectiveness and generalization ability: Define the similarity between time channels in a single fusion result :

[0035] In the above formula: represents the number of common samples in the i-th true category and the j-th fusion result, represents the number of samples in the i-th true category, represents the number of samples in the jth true category, and the operation in the brackets on the right side of the equation represents the combination number operation.

[0036] The range is [-1, 1], where 1 means the fusion results are completely consistent; 0 means there is no correlation between the fusion results; -1 means the fusion results are completely different. This indicator is used to compare the consistency of two adjacent fusion results. If An increase in , means that the consistency of the fusion results is improved, otherwise it means that the fusion results are quite different.

[0037] Define the performance loss difference between two adjacent time channel fusion results, denoted as , which is used to measure the difference in time channels.

[0038]

[0039] In the above formula: represents the number of samples, It is the fusion performance of the nth time channel fusion result, and its value range is [-1, 1]. A value close to 1 indicates good fusion quality, where samples within the fusion class are very close together and far away from samples in other fusion classes; A value close to 0 indicates that the time channel is located at the boundary of two fusion classes and the fusion effect is not good; A value close to -1 indicates that the temporal channel is incorrectly assigned to a fused class and the fusion effect is very poor.

[0040] Represents the mean distance from time channel k to each sample point in the fusion class, It represents the mean distance from time channel k to the time channels in other fusion classes. The specific expression is as follows:

[0041] in, Indicates the number of time channels in the fusion class where time channel k belongs, Indicates the number of time channels outside the fusion class where time channel k belongs. represents the time channel feature value in the fusion class where time channel k belongs, Represents the time channel feature value outside the fusion class where time channel k belongs.

[0042] Poor performance loss The difference reflects the change in fusion quality. If the fusion quality differs greatly, the performance loss is poor. will increase; if the fusion quality does not change much, the performance loss is poor Will decrease.

[0043] Use a random shuffle strategy to continuously update the fusion results and the similarity between time channels and performance loss The calculation results of , perform gradient tests on the two to determine whether to stop the random shuffle process and output the final fusion result: If the performance loss is poor The gradient is positive, indicating that the updated channel fusion performance is continuously optimized. The gradient is negative, indicating that the difference in the updated channel fusion results increases, and optimization should continue.

[0044] If the performance loss is poor The gradient is negative, indicating that the updated channel fusion performance is not continuously optimized, or the similarity If the gradient is positive, it means that the updated channel fusion result tends to be stable. Then the update is no longer meaningful, the optimization is stopped, and the final fusion result is output.

[0045] Gradient testing involves a continuous change determination process, and the embodiment of the present invention uses an early stopping strategy. By setting the patience value to 5, if the performance or stability fails to be significantly improved after 5 consecutive iterations, the optimization is considered to be no longer meaningful, the training is stopped, and the current best fusion result is output.

[0046] In summary, the time channel fusion process of the embodiment of the present invention is as follows: Figure 2 shown.

[0047] As a preferred solution, this embodiment considers the time dimension characteristics of power consumption changes and introduces sliding window sampling based on the above time channel fusion strategy. The specific steps are as follows: Based on the determined sliding window and sliding step size, the denoised power consumption data in each window is fused by sliding, thereby obtaining the dynamic fusion results of different power consumption data. and similarity , will meet the similarity The maximum adjacent sliding windows of the threshold are merged into one window, which is used as the input of the next time series prediction model.

[0048] Based on the above determined fusion results, similar time channels and external meteorological data are used as multi-feature inputs of the Multi-Attention-OLSTM model, and the local window self-attention mechanism and window moving strategy of the swin-transformer are used to further encode the extracted multi-scale features. The specific steps are as follows: Divide into training set and test set in a ratio of 8:2; By dilating convolution to extract short-term and medium-scale features of the time series, this embodiment extracts two time steps in units of hours and weeks, and dynamically weights the features of the two time scales at different levels. In this way, each attention module can adaptively adjust the temporal relationship in the data.

[0049] Specifically, the formula for the dilated convolution operation is: in, is the input data sequence, is the output sequence, is the expansion factor, is the convolution kernel weight, is the length of the convolution kernel. By adjusting the dilation factor , which can obtain features at different time scales.

[0050] The large-kernel attention mechanism is introduced to adjust the size of the convolution kernel and expand the perception range, so that the model can focus on a wider range of temporal features, thereby capturing long-distance dependencies across time steps and capturing global temperature change trends.

[0051] Among them, the adjusted self-attention mechanism formula is: Among them, Q is the prediction target at the current moment, that is, the future electricity consumption; K is the characteristic information of the historical time step, including all external indicators; V is the actual electricity consumption value corresponding to each historical moment, It is the weight coefficient calculated by expanding the kernel size. By adjusting the weight coefficient, we can strengthen the attention to long-distance temporal dependencies, thereby improving the ability to predict long-term temporal changes.

[0052] In the multi-feature fusion stage, an additional two-dimensional sliding window is introduced to weightedly fuse local information and global information of time series features of different scales, thereby improving the expression ability of local information.

[0053] The extracted multi-scale features are further encoded using a global Transformer encoder.

[0054] The encoded features enter the optimized LSTM neural network to achieve prediction and perform electricity consumption prediction based on multi-feature input. Compared with the standard LSTM network, this solution adds three changes. First, by reducing the weight decay rate of the hidden state and adjusting the dynamic threshold of the forget gate, the model pays more attention to short-term change characteristics; second, at each time step, multiple LSTM units process features on the hour and month time scales in parallel. Third, a hybrid loss function combining cross entropy and KL divergence is used as the connection layer, and parallel LSTM units are designed to ensure that features of different time scales can work together effectively.

[0055] Among them, the basic calculation formula of the optimized LSTM is as follows: in, They represent the forget gate, input gate and output gate respectively. is the current input, is the hidden state of the previous time step, is the memory state of the previous time step, W f , W i , W o , W c is the weight matrix, corresponding to the update of the forget gate, input gate, output gate and memory unit respectively; b f , b i , b o , b c are the bias terms corresponding to the forget gate, input gate, output gate and memory unit state update respectively.

[0056] The output of the optimized Multi-Attention-OLSTM passes through the self-attention mechanism decoder and finally outputs the predicted power consumption.

[0057] Based on the above design, R 2 (coefficient of determination), MAE (mean absolute error), and RMSE (root mean square error) are used to evaluate the performance of the model proposed in this embodiment on the validation set.

[0058] Based on the same inventive concept, the present invention also provides a computer device, which includes: one or more processors, and a memory for storing one or more computer programs; the program includes program instructions, and the processor is used to execute the program instructions stored in the memory. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is used to implement one or more instructions, specifically for loading and executing one or more instructions in a computer storage medium to implement the above method.

[0059] It should be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium, on which a computer program is stored, and the computer program is executed by the processor to execute the above method. The storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electrical, magnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0060] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0061] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.

[0062] The present invention is not limited to the above-mentioned optimal implementation mode. Anyone can derive other various forms of a dynamic prediction method for electricity consumption based on time channel fusion strategy and mxlstm under the inspiration of the present invention. All equal changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.

Claims

1. A method for dynamic power consumption prediction based on time channel fusion strategy and mxlstm, characterized by: By adopting the time channel fusion method, combined with the random shuffle strategy and early stopping strategy, the Multi-Attention-OLSTM model based on dilated convolution multi-scale feature extraction and path attention weight optimization is used to combine historical time power consumption data and peripheral multivariate data to realize power consumption prediction; The time channel fusion method adopts the time channel fusion strategy to fuse the original independent time channels. The specific steps are as follows: First, multiple time channels are reduced to two dimensions and preliminary features are extracted from them; Then execute the following time channel fusion algorithm: Initialize the CF tree parameters, including the maximum number of CFs for internal nodes, the maximum number of CFs for leaf nodes, and the maximum sample radius threshold; read the first sample point from the data set and create a new CF triplet As root node: In the above formula: represents the linear summation of each point, represents the sum of squares of each point, represents the nth sample point, x ni represents the size of the i-th dimension of the n-th sample point, and N represents the total number of sample points; Insert new sample points into the CF tree, create or update CF nodes and split nodes, and finally extract the fusion results according to the CF nodes in the CF tree. Each CF node represents a fusion class: In the above formula: represents the fusion class centroid, represents each sample point, represents the class radius, represents the class diameter, represents the distance between classes, , Respectively represent the total number of sample points in any two clusters, Respectively represent the sum of sample points in any two clusters, Respectively represent the sum of squares of sample points in any two clusters; Thus, multiple fusion classes are obtained; then, the boundary elements of the obtained fusion results are exchanged using a random shuffle strategy to optimize the boundary fusion results.

2. According to claim 1, a method for dynamic power consumption prediction based on time channel fusion strategy and mxlstm is characterized by: The original data set uses historical electricity consumption data with time stamps and peripheral electricity consumption multivariate data, with a sampling interval of 1 hour; the peripheral electricity consumption multivariate data includes: meteorological data, and one or more of the economic, cargo ship cycle, commodity prices, PMI, PPI, and industrial structure change data; the threshold denoising method based on wavelet transform is used to preprocess the electricity consumption data and external data in the original data set.

3. According to claim 1, a method for dynamic power consumption prediction based on time channel fusion strategy and mxlstm is characterized by: The specific process of the random shuffling strategy is: For the mth fusion class, select the cluster center The nearest fusion class centroid , and define the nth fusion class as the target fusion class; In the mth fusion class, select the distance from the target fusion class centroid The most recent 20% elements; In the target fusion class, also select the distance cluster center The most recent 20% elements; The two groups of elements are exchanged, and the above steps of inserting new sample points into the CF tree are repeated, and the CF tree nodes are updated by creating or updating CF nodes and splitting nodes, and the fusion results are extracted according to the CF nodes in the CF tree, so as to update and optimize the fusion results; For the fusion results of two adjacent updates, calculate the similarity and performance loss difference between the time channels; The similarity between the time channels Specifically: In the above formula: represents the number of common samples in the i-th true category and the j-th fusion result, represents the number of samples in the i-th true category, represents the number of samples in the jth true category; the operation in the brackets on the right side of the equation represents the combination number operation; The range is [-1, 1], where 1 means that the fusion results are completely consistent; 0 means that there is no correlation between the fusion results; -1 means that the fusion results are completely different; The performance loss difference between two adjacent time channel fusion results is recorded as , used to measure the difference in time channels; In the above formula: represents the number of samples, is the fusion performance of the nth time channel fusion result, and its value range is [-1, 1]; A value close to 1 indicates good fusion quality; A value close to 0 indicates that the time channel is located at the boundary of two fusion classes and the fusion effect is not good; A value close to -1 indicates that the temporal channel is incorrectly assigned to a fused class; Represents the mean distance from time channel k to each sample point in the fusion class, Represents the mean distance of time channel k to the time channels in other fusion classes: in, Indicates the number of time channels in the fusion class where time channel k belongs, Indicates the number of time channels outside the fusion class where time channel k belongs; represents the time channel feature value in the fusion class where time channel k belongs, Indicates the time channel feature value outside the fusion class where time channel k belongs; Through the random shuffle strategy, the fusion results are continuously updated, and the similarity between time channels is continuously updated. and performance loss The calculation results are taken and gradient test is performed to determine whether to stop the random shuffle process and output the final fusion result: If the performance loss is poor The gradient is positive and the similarity If the gradient is negative, continue to optimize; If the performance loss is poor Gradient is negative or similarity When the gradient is regular, the optimization is stopped and the final fusion result is output.

4. According to claim 3, a method for dynamic power consumption prediction based on time channel fusion strategy and mxlstm is characterized by: The gradient test adopts an early stopping strategy.

5. According to claim 3, a method for dynamic power consumption prediction based on time channel fusion strategy and mxlstm is characterized by: The time channel fusion method adopts the introduction of sliding window method sampling: based on the determined sliding window and sliding step size, the denoised power consumption data in each window is slidingly fused, thereby obtaining the dynamic fusion results of different power consumption data; and the performance loss difference is adopted. and similarity , will meet the similarity The maximum adjacent sliding windows of the threshold are merged into one window, which is used as the input of the next time series prediction model.

6. According to claim 1, a method for dynamic power consumption prediction based on time channel fusion strategy and mxlstm is characterized by: Based on the fusion results determined by the time channel fusion method, similar time channels and external meteorological data are used as multi-feature inputs of the Multi-Attention-OLSTM model; short-term and medium-scale features of the time series are extracted by dilated convolution, and two time steps in units of hours and weeks are extracted in total. Different levels of dynamic weighting are performed on the features of the two time scales, so that each attention module can adaptively adjust the temporal relationship in the data; The formula for the dilated convolution operation is: in, is the input data sequence, is the output sequence, is the expansion factor, is the convolution kernel weight, is the convolution kernel length; by adjusting the expansion factor , to obtain features at different time scales; The Multi-Attention-OLSTM model adopts the self-attention mechanism formula after introducing the large core attention mechanism adjustment: Among them, Q is the prediction target at the current moment, that is, the future electricity consumption; K is the characteristic information of the historical time step, including all external indicators; V is the actual electricity consumption value corresponding to each historical moment, is the weight coefficient calculated by expanding the kernel size.

7. According to claim 6, a method for dynamic power consumption prediction based on time channel fusion strategy and mxlstm is characterized by: The Multi-Attention-OLSTM model introduces a two-dimensional sliding window in the multi-feature fusion stage to weightedly fuse local information and global information of time series features of different scales.

8. According to claim 6, a method for dynamic power consumption prediction based on time channel fusion strategy and mxlstm is characterized by: The Multi-Attention-OLSTM model uses a global Transformer encoder to further encode the extracted multi-scale features; the encoded features enter the optimized LSTM neural network to achieve prediction, and perform power consumption prediction based on multi-feature input; The optimized LSTM neural network reduces the weight decay rate of the hidden state and adjusts the dynamic threshold of the forget gate to make the model pay more attention to short-term change characteristics; at each time step, multiple LSTM units process the features on the hour and month time scales in parallel; a hybrid loss function combining cross entropy and KL divergence is used as the connection layer, and parallel LSTM units are used to coordinate features of different time scales: in, They represent the forget gate, input gate and output gate respectively. is the current input, is the hidden state of the previous time step, is the memory state of the previous time step; W f , W i , W o , W c is the weight matrix, corresponding to the update of the forget gate, input gate, output gate and memory unit respectively; b f , b i , b o , b c They are bias items corresponding to the forget gate, input gate, output gate and memory unit state update respectively; the output of the optimized LSTM neural network passes through the self-attention mechanism decoder to output the predicted power consumption.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of a method for dynamic power consumption prediction based on a time channel fusion strategy and mxlstm as described in any one of claims 1 to 8 are implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a method for dynamic power consumption prediction based on a time channel fusion strategy and mxlstm as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Continuous attribute discretization method based on Canopy clustering and BIRCH hierarchical clustering

    CN104573050A

  • Method, device and equipment for acquiring electrical load of electric energy meter and medium

    CN117239743A

  • Distributed new energy unit output control method responding to demand change of power system

    CN117458607A

  • Dynamic recognition method for background picture image of master station scheduling system

    WO2023160557A1