Energy demand forecasting method and device

By separating and high-dimensional mapping state transfer of natural gas demand time series data, combined with the Koopman operator and Mamba model, the accuracy and efficiency issues of natural gas demand forecasting are solved, and efficient modeling of complex non-stationary data is achieved.

CN120124815BActive Publication Date: 2025-09-30PIPECHINA SOUTH CHINA CO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510593130.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-09-30
Estimated Expiration
2045-05-09

AI Technical Summary

Technical Problem

Existing technologies have difficulty in accurately predicting natural gas demand, especially when processing complex and non-stationary time series data, which suffer from problems such as low accuracy, long training time and insufficient adaptability.

Method used

The energy demand time series data of separated historical time periods are used as the first subsequence and the second subsequence, and high-dimensional mapping and state transfer are performed respectively. The global and local Koopman operators are used for prediction. The Mamba model and adaptive window adjustment are combined to realize long-term and short-term modeling and attention mechanism.

Benefits of technology

It improves the accuracy and efficiency of natural gas demand forecasting, can capture non-stationary and nonlinear dynamic characteristics, and meet the needs of energy management and supply scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120124815B_ABST
    Figure CN120124815B_ABST
Patent Text Reader

Abstract

The present application discloses an energy demand forecasting method and device, which relates to the field of energy demand forecasting technology and aims to solve the problem of how to accurately forecast natural gas demand. The energy demand forecasting method includes: obtaining energy demand time series data for a historical time period; separating the energy demand time series data for the historical time period to obtain first subsequence data and second subsequence data; performing first dimension mapping and state transition on the first subsequence data and the second subsequence data, respectively, to obtain energy demand forecast results corresponding to the first subsequence data and energy demand forecast results for the second subsequence data; and determining energy demand forecast results for a target time period based on the energy demand forecast results for the first subsequence data and the energy demand forecast results for the second subsequence data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of energy demand forecasting, and in particular to an energy demand forecasting method and device. Background Art

[0002] As an important clean energy source, natural gas can effectively reduce the use of coal and oil, significantly improving environmental pollution. Therefore, its demand has shown a continuous growth trend worldwide in recent years.

[0003] To effectively manage natural gas supply, accurate forecasts of natural gas demand are necessary. However, since natural gas demand is affected by many factors, including temperature changes, economic activity, and seasonal fluctuations, accurately forecasting natural gas demand is a technical challenge that urgently needs to be addressed. Summary of the Invention

[0004] The purpose of this application is to provide an energy demand forecasting method and device, aiming to solve the problem that energy demand cannot be accurately predicted.

[0005] To achieve the above objectives, this application adopts the following technical solutions:

[0006] In a first aspect, a method for predicting energy demand is provided, comprising: obtaining time series data of energy demand for a historical time period; separating the time series data of energy demand for the historical time period to obtain first subsequence data and second subsequence data; the first subsequence data is used to represent the changing trend of energy demand within a first cycle of the historical time period; the second subsequence data is used to represent the fluctuation of energy demand within a second cycle of the historical time period; the cycle length of the first cycle is greater than the cycle length of the second cycle; performing first dimension mapping and state transfer on the first subsequence data and the second subsequence data respectively to obtain an energy demand prediction result corresponding to the first subsequence data and an energy demand prediction result for the second subsequence data; the first dimension is greater than a preset dimension; and determining the energy demand prediction result for the target time period based on the energy demand prediction result of the first subsequence data and the energy demand prediction result of the second subsequence data.

[0007] In some embodiments, first-dimensional mapping and state transfer are performed on the first subsequence data and the second subsequence data, respectively, to obtain an energy demand prediction result corresponding to the first subsequence data and an energy demand prediction result of the second subsequence data, including: performing first-dimensional mapping on the first subsequence data and the second subsequence data, respectively, based on a measurement function, to obtain a first-dimensional linear relationship corresponding to the first subsequence data and a first-dimensional linear relationship of the second subsequence data; performing state transfer on the first-dimensional linear relationship corresponding to the first subsequence data based on a global Koopman operator to obtain an energy demand prediction result for the first subsequence data; performing state transfer on the first-dimensional linear relationship corresponding to the second subsequence data based on a local Koopman operator to obtain an energy demand prediction result for the second subsequence data.

[0008] In some embodiments, the energy demand forecasting method further includes: obtaining energy demand time series data of a preset time window in a historical time period; inputting the energy demand time series data of the preset time window into a pre-trained Mamba model to obtain an energy demand forecast result corresponding to the energy demand time series data of the preset time window; determining a Koopman operator based on the energy demand time series data of the preset time window and the energy demand forecast result corresponding to the energy demand time series data of the preset time window; the Koopman operator is a global Koopman operator or a local Koopman operator.

[0009] In some embodiments, the energy demand prediction method further includes: obtaining a training sample set, the training sample set including multiple training samples and a label for each training sample; the training samples include energy demand data of multiple sample time windows in a historical time period; the labels of the training samples include energy demand data of a target time window in the historical time period; the target time window is located after the multiple sample time windows; based on the training sample set, the original Mamba model is trained to obtain a trained Mamba model.

[0010] In some embodiments, the original Mamba model is trained based on the training sample set to obtain a trained Mamba model, including: determining the weight of each sample time window based on the model parameters and long-short-term attention mechanism of the original Mamba model; updating the training sample based on the weight of each sample time window, and training the original Mamba model based on the updated training sample to obtain a trained Mamba model.

[0011] In some embodiments, the energy demand prediction method further includes: obtaining the actual energy demand result of the target time period; and updating the model parameters of the trained Mamba model according to the loss value between the energy demand prediction result of the target time period and the actual energy demand result of the target time period.

[0012] In some embodiments, the energy demand forecast result for the target time period is determined based on the energy demand forecast result of the first subsequence data and the energy demand forecast result of the second subsequence data, including: combining the energy demand forecast result of the first subsequence data and the energy demand forecast result of the second subsequence data to obtain an overall forecast result for the target time period; mapping the overall forecast result to a second dimension through measuring an inverse function to obtain an energy demand forecast result for the target time period; the second dimension is smaller than a preset dimension.

[0013] In some embodiments, obtaining time series data of energy demand for a historical time period includes: obtaining original data of energy demand at each time point in the historical time period; preprocessing the original data of energy demand at each time point, and sorting the preprocessed energy demand data according to the time series to obtain time series data of energy demand for the historical time period; the preprocessing includes standardization processing and / or noise reduction processing.

[0014] In some embodiments, the raw energy demand data at each time point is multimodal data.

[0015] In a second aspect, an energy demand forecasting device is provided, comprising: a communication unit and a processing unit.

[0016] The communication unit is used to obtain energy demand time series data for a historical period.

[0017] A processing unit is used to separate the energy demand time series data of the historical time period to obtain first subsequence data and second subsequence data; the first subsequence data is used to represent the changing trend of energy demand in the first cycle of the historical time period; the second subsequence data is used to represent the fluctuation of energy demand in the second cycle of the historical time period; the cycle length of the first cycle is greater than the cycle length of the second cycle.

[0018] The processing unit is further used to perform first dimension mapping and state transfer on the first subsequence data and the second subsequence data respectively to obtain the energy demand prediction result corresponding to the first subsequence data and the energy demand prediction result of the second subsequence data; the first dimension is greater than the preset dimension.

[0019] The processing unit is further configured to determine an energy demand prediction result for a target time period based on the energy demand prediction result of the first subsequence data and the energy demand prediction result of the second subsequence data.

[0020] In a third aspect, an energy demand forecasting device is provided, comprising a memory and a processor; the memory is used to store computer execution instructions, and the processor is connected to the memory via a bus; when the energy demand forecasting device is running, the processor executes the computer execution instructions stored in the memory, so that the energy demand forecasting device executes the energy demand forecasting method of the first aspect.

[0021] The energy demand forecasting device may be an electronic device or a portion of an electronic device, such as a chip system within the electronic device. The chip system is configured to support the electronic device in implementing the functions described in the first aspect and any possible implementation thereof, such as acquiring and determining the data and / or information involved in the above-described energy demand forecasting method. The chip system includes a chip and may also include other discrete devices or circuit structures.

[0022] In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium including computer execution instructions, which, when executed on a computer, enable the computer to execute the energy demand forecasting method described in the first aspect.

[0023] In a fifth aspect, a computer program product is also provided, which includes a computer program or instructions. When the computer instructions are run on an energy demand forecasting device, the energy demand forecasting device executes the energy demand forecasting method as described in the first aspect above.

[0024] It should be noted that the aforementioned computer instructions may be stored in whole or in part on a computer-readable storage medium. The computer-readable storage medium may be packaged together with the processor of the energy demand forecasting device, or may be packaged separately from the processor of the energy demand forecasting device, and this is not limited in the present embodiment.

[0025] The description of the second, third, fourth and fifth aspects of this application can refer to the detailed description of the first aspect.

[0026] In the embodiments of this application, the name of the energy demand forecasting device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear with other names. For example, the receiving unit may also be called a receiving module, a receiver, etc. As long as the functions of each device or functional module are similar to those of this application, they are within the scope of the claims of this application and their equivalents.

[0027] From the above, it can be seen that the present application can separate the data of the historical time period to obtain two different types of energy demand time series data. These two different types of energy demand time series data are predicted separately and then merged to obtain the energy demand prediction data of the target time. In this way, the energy demand of the target time can be predicted from a variety of different situations.

[0028] Secondly, this application can also perform high-dimensional mapping and state transfer on the two different types of energy demand time series data. The high-dimensional mapping can make the energy demand time series data linear, and the state transfer can be used to obtain subsequent prediction results, so that accurate energy demand forecasts can be made at the target time. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0030] Figure 1 A schematic diagram of the structure of an energy demand forecasting system provided in an embodiment of the present application;

[0031] Figure 2 A schematic diagram of the hardware structure of an energy demand forecasting device provided in an embodiment of the present application;

[0032] Figure 3 A schematic diagram of a flow chart of an energy demand forecasting method provided in an embodiment of the present application;

[0033] Figure 4 A schematic structural diagram of another energy demand forecasting device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0035] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0036] In order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order.

[0037] As described in the background technology, natural gas, as an important clean energy source, is experiencing a continuous growth in demand worldwide. In urban heating, resources need to be rationally allocated to ensure adequate natural gas supply in winter; in the energy trading market, supply and demand need to be scientifically matched to reduce market risks; similarly, in clean energy management, smart city construction, energy system optimization, natural gas supply chain management, price setting, multi-energy coordinated scheduling, improving energy efficiency, reducing resource waste, optimizing natural gas production, transportation, and distribution, and other scenarios, especially in dealing with natural gas demand forecasting with nonlinear and non-stationary characteristics, accurate energy demand forecasting poses a huge challenge.

[0038] Existing energy demand forecasting methods suffer from numerous shortcomings when processing complex, non-stationary time series data. These include the following: The Auto Regressive Integrated Moving Average (ARIMA) model suffers from low accuracy when processing non-stationary and nonlinear time series. Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU), while capable of capturing nonlinearities, are prone to gradient issues and require long training times when processing very long time series. Combining LSTM with convolutional neural networks struggles to effectively model complex, non-stationary systems. Deep learning models with attention mechanisms, such as the Transformer model, have recently gained traction due to their powerful self-attention modeling capabilities for long series. However, their high computational complexity makes them inefficient when processing very long natural gas demand series and their adaptability to specific domain data is limited. While the Koopman theorem provides a method for linearizing nonlinear systems, its application is limited by its reliance on high-dimensional mappings and insufficient prediction accuracy. Therefore, there is an urgent need for an energy demand forecasting method that can capture non-stationary and nonlinear dynamic characteristics and has efficient long-sequence modeling capabilities, so as to achieve more accurate and stable demand forecasting and meet the needs of energy management and supply scheduling.

[0039] To address the above issues, embodiments of the present application provide an energy demand forecasting method that can obtain time series data on energy demand over a historical period. This time series data can then be separated to produce a first subsequence of data (i.e., the long-term trend, also known as the time-invariant component) and a second subsequence of data (i.e., the short-term fluctuation, also known as the time-varying component).

[0040] Among them, the first subsequence data is used to represent the changing trend of energy demand in the first cycle of the historical time period; the second subsequence data is used to represent the fluctuation of energy demand in the second cycle of the historical time period; the cycle length of the first cycle is greater than the cycle length of the second cycle.

[0041] Next, first dimension mapping (the first dimension is greater than a preset dimension) and state transition are performed on the first and second subsequence data, respectively, to obtain energy demand forecast results corresponding to the first and second subsequence data. Subsequently, the energy demand forecast results for the target time period can be determined based on the energy demand forecast results for the first and second subsequence data.

[0042] From the above, it can be seen that the present application can separate the data of the historical time period to obtain two different types of energy demand time series data. These two different types of energy demand time series data are predicted separately and then merged to obtain the energy demand prediction data of the target time. In this way, the energy demand of the target time can be predicted from a variety of different situations.

[0043] Secondly, this application can also perform high-dimensional mapping and state transfer on the two different types of energy demand time series data. The high-dimensional mapping can make the energy demand time series data linear, and the state transfer can be used to obtain subsequent prediction results, so that accurate energy demand forecasts can be made at the target time.

[0044] The above energy demand forecasting method can be applied to the energy demand forecasting system. Figure 1 A schematic diagram of the structure of an energy demand forecasting system provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the energy demand forecasting system includes: an energy demand forecasting device 101 and a data storage device 102 .

[0045] The energy demand prediction device 101 and the data storage device 102 are communicatively connected.

[0046] In practical applications, the energy demand forecasting device 101 can be connected to any number of data storage devices 102. Figure 1 An energy demand forecasting device 101 connected to a data storage device 102 is used as an example for description.

[0047] In an embodiment of the present application, the data storage device 102 is used to provide data for energy demand forecasting (for example, energy demand time series data for the previous four years, etc.) to the energy demand forecasting device 101, so that the energy demand forecasting device 101 can implement energy demand forecasting based on the data sent by the data storage device 102.

[0048] Optionally, the physical device of the energy demand forecasting device 101 may be a server, a terminal, or other types of electronic devices, which is not limited in the embodiment of the present application.

[0049] Optionally, the terminal may be a device that provides voice and / or data connectivity to a user, a handheld device with wireless connection capabilities, or other processing devices connected to a wireless modem. A wireless terminal may communicate with one or more core networks via a radio access network (RAN). A wireless terminal may be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal, or a portable, pocket-sized, handheld, computer-built-in, or vehicle-mounted mobile device that exchanges voice and / or data with a radio access network, such as a mobile phone, tablet computer, laptop computer, netbook, or personal digital assistant (PDA).

[0050] Optionally, the above-mentioned server can be a server in a server cluster (consisting of multiple servers), or a chip in the server, or a system on a chip in the server, or can be implemented by a virtual machine (VM) deployed on a physical machine, which is not limited in this embodiment of the present application.

[0051] Optionally, the energy demand forecasting device 101 and the data storage device 102 may be two independent devices or integrated into the same device. When the energy demand forecasting device 101 and the data storage device 102 are integrated into the same device, the data storage device 102 may be a storage module (e.g., a database) of the energy demand forecasting device 101.

[0052] It's easy to understand that when energy demand forecasting device 101 and data storage device 102 are integrated into the same device, the communication between them is based on communication between modules within that device. In this case, the communication process is the same as the communication process between energy demand forecasting device 101 and data storage device 102 when they are independent.

[0053] In one achievable method, the energy demand forecasting device 101 may be deployed with: a data input and preprocessing module, a high-dimensional mapping and Koopman modeling module, an adaptive window adjustment module, a long-term and short-term modeling and attention mechanism module, a prediction output and inverse mapping module, an environmental data integration module, a data visualization module, and an intelligent energy management platform module.

[0054] Among them, the data input and preprocessing module is used to obtain energy demand time series data (such as natural gas demand time series data) in the historical time period, that is, to receive energy demand time series data (such as natural gas demand time series data) and perform standardization processing, and to perform feature decomposition on the energy demand time series data in the historical time period through an adaptive Fourier-wavelet filter.

[0055] The high-dimensional mapping and Koopman modeling module is used to infer the global Koopman operator and local Koopman operator of the measurement function, and perform high-dimensional mapping on the energy demand time series data through the measurement function, and process the first subsequence data and the second subsequence data (i.e., short-term fluctuations) through the global and local Koopman operators respectively.

[0056] The adaptive window adjustment module is used to dynamically adjust the window length of energy demand time series data through a deep reinforcement learning algorithm to ensure the high sensitivity of the model to fluctuations in energy demand time series data.

[0057] The long-term and short-term modeling and attention mechanism module is used to perform long-term and short-term modeling of energy demand time series data based on the Mamba model, and enhance the processing capability of complex and dynamic energy demand time series data through the attention mechanism.

[0058] The prediction output and inverse mapping module is used to map the overall energy demand prediction results in the first-dimensional linear space (i.e., high-dimensional linear space) back to the second-dimensional nonlinear space (i.e., the original nonlinear space, also called low-dimensional linear space) to obtain the energy demand prediction results for the target time period.

[0059] The environmental data integration module is used to fuse multimodal data (e.g., energy demand time series data combined with meteorological data and socioeconomic data) to improve the model’s generalization ability and adaptability to external influences.

[0060] The data visualization module is used to display the energy demand forecast results for the target time period in real time through charts (such as heat maps), so that users can intuitively understand and apply the energy demand forecast information for the target time period.

[0061] The intelligent energy management platform module is used to integrate with the Internet of Things to respond to changes in energy demand in real time to optimize energy management.

[0062] For ease of understanding, this application uses the example of the energy demand prediction device 101 and the data storage device 102 being independent of each other for illustration.

[0063] The energy demand forecasting device 101 includes: Figure 2 The following are the components included. Figure 2 Taking the energy demand forecasting device shown in FIG. 1 as an example, the hardware structure of the energy demand forecasting device 101 is introduced.

[0064] like Figure 2 FIG2 is a schematic diagram of the hardware structure of an energy demand forecasting device provided in an embodiment of the present application. The energy demand forecasting device includes a processor 21, a memory 22, a communication interface 23, and a bus 24. The processor 21, the memory 22, and the communication interface 23 can be connected via the bus 24.

[0065] Processor 21 is the control center of the energy demand forecasting device and can be a single processor or a collection of multiple processing elements. For example, processor 21 can be a general-purpose central processing unit (CPU) or other general-purpose processor. A general-purpose processor can be a microprocessor or any conventional processor.

[0066] As an embodiment, the processor 21 may include one or more CPUs, such as Figure 2 CPU0 and CPU1 are shown in the figure.

[0067] The memory 22 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0068] In one possible implementation, memory 22 may exist independently of processor 21 and may be connected to processor 21 via bus 24 to store instructions or program code. When processor 21 calls and executes the instructions or program code stored in memory 22, the energy demand forecasting method provided in the following embodiments of this application can be implemented.

[0069] In the embodiment of the present application, the energy demand forecasting device has different software programs stored in the memory 22, so the energy demand forecasting device implements different functions. The functions performed by each device will be described in conjunction with the following flowchart.

[0070] In another possible implementation, the memory 22 may also be integrated with the processor 21 .

[0071] The communication interface 23 is used to connect the energy demand forecasting device to other devices via a communication network, which may be Ethernet, a wireless access network, a wireless local area network (WLAN), etc. The communication interface 23 may include a receiving unit for receiving data and a sending unit for sending data.

[0072] The bus 24 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of presentation, Figure 2 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0073] It should be pointed out that Figure 2 The structure shown in the figure does not constitute a limitation on the energy demand forecasting device, except Figure 2 In addition to the components shown, the energy demand forecasting device may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0074] The energy demand forecasting method provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0075] The energy demand forecasting method provided in the embodiment of the present application is applied to Figure 1 The energy demand forecasting device 101 in the energy demand forecasting system shown in FIG. Figure 3 As shown, the energy demand forecasting method provided in the embodiment of the present application includes:

[0076] S301. An energy demand forecasting device obtains energy demand time series data for a historical period.

[0077] Specifically, in order to accurately predict the energy demand forecast result for the target time period, the energy demand forecasting device may obtain energy demand time series data for the historical time period.

[0078] Optionally, the energy demand time series data may be energy demand time series data in a certain time period (eg, a historical time period).

[0079] For example, the historical time period may be one year, two years, or ten years, etc., which is not limited here.

[0080] Optionally, the energy demand time series data may be time series data of demand for a certain energy source, such as natural gas, oil, or coal, which is not limited here.

[0081] S302 : The energy demand forecasting device separates the energy demand time series data of the historical time period to obtain first subsequence data and second subsequence data.

[0082] Specifically, in order to predict the historical energy demand time series data in multiple different dimensions and obtain more accurate energy demand prediction results, the energy demand prediction device can separate the energy demand time series data of the historical time period to obtain first subsequence data and second subsequence data.

[0083] The first subsequence data is used to represent the changing trend of energy demand in the first cycle of the historical time period (i.e., the long-term trend); the second subsequence data is used to represent the fluctuation of energy demand in the second cycle of the historical time period (i.e., the short-term fluctuation and seasonal components); the cycle length of the first cycle is greater than the cycle length of the second cycle.

[0084] For example, the first cycle can be a quarter, a year, or two years, and the second cycle can be a day, a week, or a month, as long as the cycle length of the first cycle is greater than the cycle length of the second cycle.

[0085] Optionally, when the energy demand forecasting device separates the energy demand time series data of the historical time period, the data separation may be performed through an adaptive Fourier-wavelet filter.

[0086] When using adaptive Fourier-wavelet filters to separate energy demand time series data, the Python PyWavelets library provides a convenient tool for using wavelet transforms. Adaptive Fourier-wavelet filters are built on wavelet and Fourier transforms. The PyWavelets library enables basic wavelet transform operations. For example, when building an adaptive Fourier-wavelet filter, the wavedec function in the PyWavelets library may be used to perform wavelet decomposition of the signal.

[0087] Exemplarily, the standardized historical energy demand time series data is decomposed by an adaptive Fourier-wavelet filter to obtain first subsequence data and second subsequence data:

[0088] X inv ,X var =AdaptiveWaveletFourierFilter(X);

[0089] in, is the adaptive Fourier-wavelet filter; X inv is the first subsequence data, i.e., the long-term trend, which includes annual changes, such as an increase in demand in winter and a decrease in summer; X var The second subseries data, short-term fluctuations, reflects daily and weekly demand fluctuations, such as slightly higher demand on weekends.

[0090] S303: The energy demand prediction device performs first dimension mapping and state transfer on the first subsequence data and the second subsequence data respectively to obtain energy demand prediction results corresponding to the first subsequence data and energy demand prediction results corresponding to the second subsequence data.

[0091] The first dimension is larger than the preset dimension, and may also be referred to as a high dimension, that is, the first dimension mapping is a high-dimensional mapping (eg, a three-dimensional mapping).

[0092] Specifically, since the first subsequence data and the second subsequence data are usually in a low-dimensional nonlinear relationship, it is impossible to accurately predict the energy demand prediction result. Therefore, in order to obtain the linear relationship between the first subsequence data and the second subsequence data, and then predict the energy demand prediction result based on the linear relationship, the energy demand prediction device can perform first-dimensional mapping and state transfer on the first subsequence data and the second subsequence data.

[0093] Optionally, when performing first-dimensional mapping on the first subsequence data and the second subsequence data, they may be mapped to any higher dimension, as long as the first subsequence data and the second subsequence data are linear in this dimension.

[0094] S304: The energy demand prediction device determines an energy demand prediction result for a target time period according to the energy demand prediction result of the first subsequence data and the energy demand prediction result of the second subsequence data.

[0095] Specifically, in order to effectively improve the accuracy of the energy demand forecast results for the target time period, the energy demand forecasting device can combine the multi-dimensional energy demand forecast results, that is, determine the energy demand forecast results for the target time period based on the energy demand forecast results of the first subsequence data and the energy demand forecast results of the second subsequence data.

[0096] The target time period is a time period after the historical time period, which may also be referred to as a future time period. For example, the future time period may be one day, one week, or one month after the historical time period, and is not limited thereto.

[0097] In some embodiments, in the above S303, the energy demand forecasting device performs first dimension mapping and state transfer on the first subsequence data and the second subsequence data respectively to obtain the energy demand forecast result corresponding to the first subsequence data and the energy demand forecast result corresponding to the second subsequence data, specifically including:

[0098] The energy demand forecasting device performs first-dimensional mapping on the first subsequence data and the second subsequence data based on the measurement function to obtain the first-dimensional linear relationship corresponding to the first subsequence data and the first-dimensional linear relationship of the second subsequence data.

[0099] Specifically, in order to obtain the first dimensional linear relationship corresponding to the first subsequence data and the first dimensional linear relationship corresponding to the second subsequence data, the energy demand forecasting device may perform first dimensional mapping through a measurement function.

[0100] Optionally, when performing first-dimensional mapping on the first subsequence data and the second subsequence data, the first subsequence data and the second subsequence data can be mapped to any higher dimension based on the measurement function, as long as the first subsequence data and the second subsequence data can be linear in this dimension.

[0101] The measurement function can be obtained by express.

[0102] For example, taking the first subsequence data as an example, by measuring the function The first subsequence data can be mapped to a three-dimensional space (i.e., a high-dimensional mapping). The data after the high-dimensional mapping, i.e., the first-dimensional linear relationship corresponding to the first subsequence data, can satisfy the following formula:

[0103] .

[0104] Similarly, the linear relationship of the first dimension corresponding to the second subsequence data can also be calculated using the above formula, which will not be repeated here.

[0105] The energy demand forecasting device performs state transition on the first-dimensional linear relationship corresponding to the first subsequence data based on the global Koopman operator to obtain an energy demand forecast result of the first subsequence data.

[0106] Among them, the Koopman operator is a linear operator defined on the Hilbert space, which acts on the observable function space to obtain its linear relationship and make predictions.

[0107] In an embodiment of the present application, since the first subsequence data is used to represent the changing trend of energy demand within the first cycle of the historical time period (i.e., the long-term trend), the energy demand forecasting device can perform a state transition on the first-dimensional linear relationship corresponding to the first subsequence data based on the global Koopman operator to obtain the energy demand forecast result of the first subsequence data.

[0108] For example, the energy demand forecast result of the first subsequence data (for example, January 2024) may satisfy the following formula:

[0109]

[0110] in, is the energy demand prediction result of the first subsequence data, is the global Koopman operator.

[0111] Among them, the global Koopman operator The specific value of can be pre-calculated or set according to manual experience.

[0112] For example, assuming that high-dimensional space is mapped to three-dimensional space, then It is a 3×3 matrix, and its specific value can be:

[0113] .

[0114] The energy demand forecasting device performs state transfer on the first-dimensional linear relationship corresponding to the second subsequence data based on the local Koopman operator to obtain an energy demand forecast result of the second subsequence data.

[0115] In an embodiment of the present application, since the second subsequence data is used to represent the fluctuation of energy demand within the second cycle of the historical time period (i.e., short-term fluctuation), the energy demand forecasting device can perform a state transition on the first-dimensional linear relationship corresponding to the second subsequence data based on the local Koopman operator to obtain the energy demand forecast result of the second subsequence data.

[0116] Exemplarily, the energy demand prediction result of the second subsequence data may satisfy the following formula:

[0117]

[0118] in, is the energy demand prediction result of the second subsequence data, is the local Koopman operator.

[0119] In some embodiments, the global Koopman operator and the local Koopman operator can be determined by energy demand time series data of a preset time window and the energy demand forecast result corresponding to the energy demand time series data of the preset time window. In this case, the energy demand forecasting method provided by the present application also includes:

[0120] The energy demand forecasting device obtains energy demand time series data of a preset time window in a historical time period.

[0121] Optionally, the preset time window may be any time span in the historical time period.

[0122] Exemplarily, the preset time window may be a month, a year, etc. in the historical time period, which is not limited here.

[0123] The energy demand forecasting device inputs the energy demand time series data of the preset time window into the pre-trained Mamba model to obtain the energy demand forecast result corresponding to the energy demand time series data of the preset time window.

[0124] Specifically, in order to determine the Koopman operator, it is necessary to obtain the energy demand forecast result corresponding to the energy demand time series data in a preset time window.

[0125] The energy demand forecasting device determines a Koopman operator according to the energy demand time series data of the preset time window and the energy demand forecasting result corresponding to the energy demand time series data of the preset time window.

[0126] The Koopman operator is a global Koopman operator or a local Koopman operator.

[0127] Specifically, when energy demand time series data is used to represent long-term trends, the Koopman operator is a global Koopman operator. Because the global Koopman operator is determined based on the long-term trend energy demand time series data and its corresponding energy demand forecast results, the global Koopman operator can characterize the long-term trend of energy demand changes, facilitating the subsequent accurate prediction of the energy demand forecast results for the first subsequence data using the global Koopman operator.

[0128] Accordingly, when energy demand time series data is used to represent short-term fluctuations, the Koopman operator is a local Koopman operator. Because the local Koopman operator is determined based on the short-term fluctuating energy demand time series data and its corresponding energy demand forecast results, the local Koopman operator can characterize short-term fluctuations in energy demand changes, facilitating the subsequent accurate prediction of the energy demand forecast results for the second subsequence data based on the local Koopman operator.

[0129] For example, assuming that the preset time window is a monthly window (for example, the energy demand time series data of a city in December 2023), the energy demand time series data of December 2023 and the energy demand forecast results corresponding to the energy demand time series data of December 2023 are fitted to determine the local Koopman operator:

[0130] ;

[0131] in, This is the energy demand forecast result corresponding to the energy demand time series data in December 2023. It can capture the demand variation characteristics (i.e. short-term fluctuations) during the heating period in winter (i.e. December) in a certain city.

[0132] In some embodiments, the pre-trained Mamba model is obtained by training the original Mamba model using a training sample set. In this case, the energy demand forecasting method provided by the present application further includes:

[0133] The energy demand forecasting device obtains the training sample set, trains the original Mamba model, and obtains a trained Mamba model.

[0134] The training sample set includes multiple training samples and a label for each training sample; the training samples include energy demand time series data of multiple sample time windows in a historical time period; the labels of the training samples include energy demand time series data of a target time window in the historical time period; and the target time window is located after the multiple sample time windows.

[0135] Exemplarily, the sample time window may be one month in the historical time period, which is not limited here.

[0136] Optionally, the energy demand forecasting device can adaptively select the optimal sample time window size through reinforcement learning and based on multimodal data, thereby improving sensitivity to changes in energy demand and forecasting accuracy.

[0137] Specifically, in order to make the Mamba training model more sensitive to multimodal data, the energy demand forecasting device can dynamically adjust the sample time window size through reinforcement learning.

[0138] Optionally, the reinforcement learning can be a deep reinforcement learning network (Deep Q-Network, DQN) to adaptively adjust the sample time window size.

[0139] Optionally, the multimodal data may be historical energy demand time series data with seasonal variations, or historical energy demand time series data affected by other factors.

[0140] For example, in a city's winter (December 2022 to February 2023), energy demand time series data fluctuates significantly. Therefore, a shorter sample window (30 days) is chosen to more sensitively capture rapidly changing demand characteristics. In contrast, in seasons with relatively stable energy demand time series data, such as summer (June to August 2023), a longer sample window (90 days) can reduce modeling complexity.

[0141] In some embodiments, the training of the original Mamba model based on the training sample set to obtain the trained Mamba model specifically includes:

[0142] The energy demand forecasting device determines the weight of each sample time window based on the model parameters of the original Mamba model and the long-short-term attention mechanism.

[0143] Specifically, in order to enhance the Mamba model's modeling capabilities for complex dynamic systems, the energy demand forecasting device can introduce a long-short-term attention mechanism to determine the weight of each sample time window.

[0144] Alternatively, the calculation formula of the long-term and short-term attention mechanism of the Mamba model in the energy demand forecasting device can be:

[0145] ;

[0146] in, and are the query vector and key vector in the Mamba model, is the scaling factor in the Mamba model.

[0147] The energy demand forecasting device updates the training samples based on the weight of each sample time window, and trains the original Mamba model based on the updated training samples to obtain a trained Mamba model.

[0148] Optionally, the fitted value of the actual result of energy demand satisfies the following formula:

[0149] ;

[0150] in, is the fitted value of the actual result of energy demand, The first hidden states, is the dynamic weight, t is the time step of the preset time window, and T is the duration of the preset time window.

[0151] In some embodiments, the trained Mamba model can be updated in real time. In this case, the energy demand forecasting method provided by the present application further includes:

[0152] The energy demand forecasting device obtains the actual results of energy demand in the target time period.

[0153] The energy demand prediction device updates the model parameters of the trained Mamba model according to the energy demand prediction result of the target time period and the loss value of the actual energy demand result of the target time period.

[0154] Specifically, in order to enable the trained Mamba model to obtain more accurate energy demand forecast data, the energy demand forecasting device may update the model parameters of the trained Mamba model through the energy demand forecast results and the actual energy demand results.

[0155] Alternatively, end-to-end training can be performed using a deep learning framework (such as TensorFlow or PyTorch), and model parameters can be updated by minimizing the mean squared error (MSE) loss function, where the loss function satisfies the following formula:

[0156] ;

[0157] Where L is the loss value, is the number of training samples, t is the time step of the target time period, For the real result of energy demand, Energy demand forecast results.

[0158] Specifically, in order to enable the trained Mamba model to obtain more accurate energy demand forecast data, the energy demand forecasting device can optimize the model parameters through optimization algorithms and other technologies.

[0159] Optionally, the energy demand forecasting device may use an Adaptive Moment Estimation (Adam) optimization algorithm to optimize the model parameters.

[0160] Optionally, the energy demand forecasting device can use multi-level residual learning and gradient clipping techniques to prevent gradient explosion or vanishing problems and ensure the stability and fast convergence of the model in long sequence modeling.

[0161] In some embodiments, determining the overall prediction result for the target time period based on the energy demand prediction result of the first subsequence data and the energy demand prediction result of the second subsequence data specifically includes:

[0162] The energy demand prediction device combines the energy demand prediction result of the first subsequence data and the energy demand prediction result of the second subsequence data to obtain an overall prediction result for the target time period.

[0163] For example, assuming that the application needs to predict the natural gas demand on January 1, 2025 (i.e., the target time period), the energy demand forecasting device can combine the energy demand forecast results corresponding to the first subsequence data and the second subsequence data to obtain the overall forecast result for the target time period:

[0164] ;

[0165] in, The overall prediction results.

[0166] The energy demand forecasting device maps the overall forecast result to a second dimension by measuring the inverse function to obtain the energy demand forecast result for the target time period.

[0167] The second dimension is smaller than the preset dimension and can also be called a low dimension, that is, the second dimension mapping is a low-dimensional mapping (for example, a two-dimensional mapping).

[0168] For example, by measuring the inverse function The overall energy demand forecast result in the high-dimensional space is mapped back to the original dimension (i.e., the second dimension) to obtain the demand on January 1, 2024 (i.e., the energy demand forecast result for the target time period). , the calculation formula is:

[0169] ;

[0170] in, It is the energy demand forecast result for the target time period.

[0171] The experimental verification shows that the energy demand forecast results for the target time period are consistent with the actual historical energy demand, indicating that the model's prediction has good reliability.

[0172] In some embodiments, obtaining the energy demand time series data for a historical period specifically includes:

[0173] The energy demand forecasting device obtains the original data of energy demand at each time point in the historical time period.

[0174] In some embodiments, the raw energy demand data at each time point is multimodal data.

[0175] Optionally, the multimodal data may be data affected by certain external factors, such as temperature changes.

[0176] For example, the daily natural gas demand data is:

[0177] January 1, 2019: x1=20 mcm;

[0178] January 2, 2019: x2=18 mcm;

[0179] January 3, 2019: x3=22 mcm.

[0180] The energy demand forecasting device preprocesses the raw energy demand data at each time point and sorts the preprocessed energy demand data according to the time series to obtain the energy demand time series data of the historical time period; the preprocessing includes standardization processing and / or noise reduction processing.

[0181] Specifically, in order to effectively remove high-frequency noise in the preprocessing of energy demand time series data and improve the accuracy and robustness of the model for energy demand prediction, the energy demand forecasting device can introduce an adaptive noise suppression mechanism.

[0182] For example, historical natural gas demand data is obtained from a city's natural gas supply company. The data covers daily natural gas demand from January 1, 2019, to December 31, 2023, in units of million cubic meters (mcm). In addition, this application can obtain the daily average temperature (°C) and the Industrial Production Index (IPI) of a city as an indicator of economic activity. The daily natural gas demand is normalized:

[0183] ;

[0184] in, is the standardized energy demand data, is the original energy demand data, is the average value, is the standard deviation.

[0185] Assume that the average natural gas demand is =15 mcm, with a standard deviation of =5mcm;

[0186] Then, the standardized energy demand data is:

[0187] ;

[0188] ;

[0189] ;

[0190] Then the energy demand time series data is:

[0191] X={x1',x2'…x t '}.

[0192] Through the above-described implementation, utilizing natural gas demand data from a specific city from 2019 to 2023, the present invention significantly improves forecasting accuracy. For example, in the winter of 2023, the mean squared error of the forecasted demand was reduced to 2.8, a significant reduction compared to the traditional ARIMA model (MSE of 4.5) and the LSTM model (MSE of 3.7). The model's adaptability to demand fluctuations under factors such as extreme weather conditions is significantly enhanced. For example, the forecast error was reduced by approximately 35% to cope with peak demand during cold waves. The adaptive time window adjustment mechanism makes the model more sensitive to seasonal fluctuations. For example, when demand surges due to a sudden drop in winter temperatures, the model can quickly capture demand changes by shortening the time window, while expanding the time window during the summer when demand is stable to reduce the impact of fluctuations on the forecast, thereby achieving efficient and accurate demand forecasting. The Koopman theory provides a novel and effective solution for nonlinear modeling of time series by mapping nonlinear systems into high-dimensional linear systems. The Mamba model is a selective structural state-space model designed specifically for long-sequence modeling tasks. It features a global receptive field and a dynamic weighting mechanism, effectively alleviating the limitations of convolutional neural networks in sequence modeling. It also provides advanced modeling capabilities similar to Transformers, improving long-sequence forecasting capabilities and enhancing the model's dynamic adaptability. By combining Koopman theory with the Mamba model, this paper successfully addresses the complex nonlinearities and nonstationarities in natural gas demand forecasting, better handling the complex dynamics and long-term dependencies in natural gas demand. It demonstrates extremely high forecasting performance across different time scales, ensuring the sustainability and reliability of natural gas supply.

[0193] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0194] In the embodiment of the present application, the energy demand forecasting device can be divided into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, other division methods can be used.

[0195] like Figure 4 , which is a structural diagram of another energy demand forecasting device provided in an embodiment of the present application. Figure 4 The energy demand prediction device shown includes: a communication unit 401 and a processing unit 402 .

[0196] The communication unit 401 is used to obtain energy demand time series data of a historical time period.

[0197] Processing unit 402 is used to separate the energy demand time series data of the historical time period to obtain first subsequence data and second subsequence data; the first subsequence data is used to represent the changing trend of energy demand in the first cycle of the historical time period; the second subsequence data is used to represent the fluctuation of energy demand in the second cycle of the historical time period; the cycle length of the first cycle is greater than the cycle length of the second cycle.

[0198] The processing unit 402 is further configured to perform first dimension mapping and state transfer on the first subsequence data and the second subsequence data, respectively, to obtain an energy demand prediction result corresponding to the first subsequence data and an energy demand prediction result corresponding to the second subsequence data; the first dimension is greater than a preset dimension.

[0199] The processing unit 402 is further configured to determine an energy demand prediction result for a target time period according to the energy demand prediction result of the first subsequence data and the energy demand prediction result of the second subsequence data.

[0200] In some embodiments, the processing unit 402 is specifically used to: perform first-dimensional mapping on the first subsequence data and the second subsequence data based on the measurement function to obtain a first-dimensional linear relationship corresponding to the first subsequence data and a first-dimensional linear relationship of the second subsequence data; perform state transfer on the first-dimensional linear relationship corresponding to the first subsequence data based on the global Koopman operator to obtain an energy demand prediction result of the first subsequence data; perform state transfer on the first-dimensional linear relationship corresponding to the second subsequence data based on the local Koopman operator to obtain an energy demand prediction result of the second subsequence data.

[0201] In some embodiments, the communication unit 401 is further configured to obtain energy demand time series data of a preset time window in a historical time period.

[0202] The processing unit 402 is further configured to input the energy demand time series data of the preset time window into the pre-trained Mamba model to obtain an energy demand prediction result corresponding to the energy demand time series data of the preset time window.

[0203] The processing unit 402 is further configured to determine a Koopman operator based on the energy demand time series data of the preset time window and the energy demand forecast result corresponding to the energy demand time series data of the preset time window; the Koopman operator is a global Koopman operator or a local Koopman operator.

[0204] In some embodiments, the communication unit 401 is also used to obtain a training sample set, which includes multiple training samples and a label for each training sample; the training samples include energy demand data of multiple sample time windows in a historical time period; the labels of the training samples include energy demand data of a target time window in the historical time period; the target time window is located after the multiple sample time windows.

[0205] The processing unit 402 is further configured to train the original Mamba model based on the training sample set to obtain a trained Mamba model.

[0206] In some embodiments, the processing unit 402 is specifically used to: determine the weight of each sample time window based on the model parameters of the original Mamba model and the long-short-term attention mechanism; update the training samples based on the weight of each sample time window, and train the original Mamba model based on the updated training samples to obtain a trained Mamba model.

[0207] In some embodiments, the communication unit 401 is further configured to obtain actual energy demand results during a target time period.

[0208] The processing unit 402 is further configured to update the model parameters of the trained Mamba model according to the energy demand prediction result of the target time period and the loss value of the actual energy demand result of the target time period.

[0209] In some embodiments, the processing unit 402 is specifically used to: combine the energy demand prediction results of the first subsequence data and the energy demand prediction results of the second subsequence data to obtain an overall prediction result for the target time period; map the overall prediction result to a second dimension through a measurement inverse function to obtain an energy demand prediction result for the target time period; the second dimension is smaller than a preset dimension.

[0210] In some embodiments, the communication unit 401 is specifically used to: obtain the original data of energy demand at each time point in the historical time period; preprocess the original data of energy demand at each time point, and sort the preprocessed energy demand data according to the time series to obtain the energy demand time series data of the historical time period; the preprocessing includes standardization processing and / or noise reduction processing.

[0211] In some embodiments, the raw energy demand data at each time point is multimodal data.

[0212] An embodiment of the present application further provides a computer-readable storage medium, which includes computer-executable instructions. When the computer-executable instructions are executed on a computer, the computer executes the energy demand forecasting method provided in the above embodiment.

[0213] An embodiment of the present application also provides a computer program that can be directly loaded into a memory and contains software code. After being loaded and executed by a computer, the computer program can implement the energy demand forecasting method provided in the above embodiment.

[0214] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solutions of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

[0215] The system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be further decomposed or combined. For example, the modules in the above embodiment can be combined into one module or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the modules or steps and are not to be regarded as improper limitations of the present invention.

[0216] Those skilled in the art will appreciate that, in one or more of the examples above, the functions described herein can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer-readable storage media and communication media, wherein communication media include any medium that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0217] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0218] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0219] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in either hardware or software functional units. If the integrated units are implemented as software functional units and sold or used as independent products, they may be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application, or the portion that contributes to the general technology, or all or part of the technical solutions, may be embodied in the form of a software product, stored in a storage medium and including instructions for causing a device (such as a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include various media capable of storing program code, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0220] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for predicting energy demand, characterized in that: include: Obtain energy demand time series data for historical time periods; Separating the energy demand time series data of the historical time period to obtain first subsequence data and second subsequence data; The first subsequence data is used to represent a changing trend of the energy demand in a first cycle of the historical time period; the second subsequence data is used to represent a fluctuation of the energy demand in a second cycle of the historical time period; the cycle length of the first cycle is greater than the cycle length of the second cycle; performing first-dimensional mapping on the first subsequence data and the second subsequence data based on a measurement function to obtain a first-dimensional linear relationship corresponding to the first subsequence data and a first-dimensional linear relationship corresponding to the second subsequence data; the first dimension is greater than a preset dimension; Obtaining energy demand time series data for a preset time window in the historical time period; Inputting the energy demand time series data of the preset time window into the pre-trained Mamba model to obtain an energy demand prediction result corresponding to the energy demand time series data of the preset time window; Determining a Koopman operator based on the energy demand time series data of the preset time window and an energy demand forecast result corresponding to the energy demand time series data of the preset time window; the Koopman operator is a global Koopman operator or a local Koopman operator; Performing a state transition on the first-dimensional linear relationship corresponding to the first subsequence data based on the global Koopman operator to obtain an energy demand prediction result of the first subsequence data; Performing a state transition on the first-dimensional linear relationship corresponding to the second subsequence data based on the local Koopman operator to obtain an energy demand prediction result of the second subsequence data; An energy demand prediction result for a target time period is determined according to the energy demand prediction result of the first subsequence data and the energy demand prediction result of the second subsequence data.

2. The method according to claim 1, characterized in that Also includes: Obtaining a training sample set, where the training sample set includes multiple training samples and a label for each training sample; The training sample includes energy demand data of multiple sample time windows in the historical time period; the label of the training sample includes energy demand data of a target time window in the historical time period; the target time window is located after the multiple sample time windows; Based on the training sample set, the original Mamba model is trained to obtain the trained Mamba model.

3. The method according to claim 2, characterized in that The training of the original Mamba model based on the training sample set to obtain the trained Mamba model includes: Determining the weight of each sample time window based on the model parameters of the original Mamba model and the long-short-term attention mechanism; The training samples are updated based on the weight of each sample time window, and the original Mamba model is trained according to the updated training samples to obtain the trained Mamba model.

4. The method according to claim 1, wherein Also includes: Obtaining actual energy demand results for the target time period; The model parameters of the trained Mamba model are updated according to the energy demand prediction result of the target time period and the loss value of the actual energy demand result of the target time period.

5. The method according to claim 1, wherein Determining the energy demand forecast result for the target time period based on the energy demand forecast result of the first subsequence data and the energy demand forecast result of the second subsequence data includes: combining the energy demand forecast result of the first subsequence data and the energy demand forecast result of the second subsequence data to obtain an overall forecast result for the target time period; The overall prediction result is mapped to a second dimension by measuring an inverse function to obtain an energy demand prediction result for the target time period; the second dimension is smaller than the preset dimension.

6. The method according to claim 1, characterized in that The obtaining of energy demand time series data for a historical period includes: Obtaining raw energy demand data at each time point in the historical time period; The raw energy demand data at each time point is preprocessed, and the preprocessed energy demand data is sorted according to the time series to obtain the energy demand time series data of the historical time period; the preprocessing includes standardization processing and / or noise reduction processing.

7. The method according to claim 6, characterized in that The raw energy demand data at each time point is multimodal data.

8. An energy demand forecasting device, characterized in that: include: A processor and a memory; wherein the memory is used to store one or more programs, and the one or more programs include computer-executable instructions. When the energy demand forecasting device is running, the processor executes the computer-executable instructions stored in the memory to enable the energy demand forecasting device to perform the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Time series data prediction method and device, equipment and storage medium

    CN116933125A

  • Global and local Koopman PM2.5 prediction method and system

    CN119830139A