Energy consumption prediction method and device for multi-user system

Through the energy consumption prediction model of multi-task learning and attention channel mechanism, the problem of inaccurate total energy consumption prediction of multi-user energy systems is solved, more accurate energy consumption prediction and resource optimization are achieved, and monitoring and early warning capabilities of equipment operation are improved.

CN120354997APending Publication Date: 2025-07-22SIEMENS (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510352970.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

The prior art is difficult to accurately predict the total energy consumption of multi-user energy systems, resulting in poor supply and demand balance and resource allocation, and lack of real-time monitoring and early warning capabilities for equipment operation.

Method used

The energy consumption prediction model is adopted with a multi-task learning and attention channel mechanism. By obtaining the historical energy consumption data of multi-user energy equipment, the energy consumption prediction model is trained to predict total energy consumption as the main task and single-user energy consumption as the auxiliary task. The channel attention layer is used to dynamically adjust the weight to highlight key channel information, suppress noise interference, and improve prediction accuracy and stability.

Benefits of technology

It improves the accuracy and stability of energy consumption prediction of multi-user energy systems, optimizes resource allocation strategies, enhances the modeling ability of complex load characteristics, and realizes real-time monitoring and early warning of equipment operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120354997A_ABST
    Figure CN120354997A_ABST
Patent Text Reader

Abstract

The invention provides an energy consumption prediction method for a multi-user energy system. The method comprises the following steps: acquiring historical energy consumption data of multiple users on multiple energy devices of the energy system; segmenting the historical energy consumption data into historical energy consumption time sequence data according to users; predicting the total energy consumption of the energy system as a main task, predicting the energy consumption of a single user as an auxiliary task, and training an energy consumption prediction model by using the historical energy consumption time sequence data of the user according to a multi-task learning mode and an attention channel mechanism; the energy consumption prediction model predicts the total energy consumption of the multi-user energy system based on the real-time energy consumption data of multiple users on the energy equipment of the energy system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure mainly relates to the field of industrial digitization, and particularly to a method and device for predicting energy consumption of a multi-user energy system. Background Art

[0002] The prediction of energy consumption in a multi-user energy system (such as the demand for compressed air in the steel industry) is directly related to production planning and project management. Accurately predicting the energy consumption of a multi-user energy system can ensure the balance between supply and demand, achieve efficient energy distribution and cost control, and thus improve environmental sustainability and resource utilization rate. In addition, real-time prediction can also monitor the operation of equipment and issue early warnings to avoid production interruptions and equipment damage.

[0003] At present, some progress has been made in energy consumption prediction based on machine learning technology. However, the current energy consumption prediction mainly focuses on individual energy equipment, and the prediction effect of the total energy consumption of a multi-user energy system is not good. Summary of the Invention

[0004] To solve the above technical problems, the present disclosure provides a method and device for predicting energy consumption of a multi-user energy system.

[0005] To achieve the above object, the present disclosure proposes a method for predicting energy consumption of a multi-user energy system, the method comprising:

[0006] Obtaining historical energy consumption data of multiple users on multiple energy devices in the energy system;

[0007] Segmenting the historical energy consumption data into historical energy consumption time series data according to users;

[0008] Taking predicting the total energy consumption of the energy system as the main task and predicting the energy consumption of a single user as the auxiliary task, and training an energy consumption prediction model using the historical energy consumption time series data according to users in a multi-task learning manner and an attention channel mechanism;

[0009] The energy consumption prediction model predicts the total energy consumption of the multi-user energy system based on the real-time energy consumption data of multiple users on the energy devices in the energy system.

[0010] To this end, embodiments of the present disclosure propose an energy consumption prediction method for a multi-user energy system. Through multi-task learning, the method takes into account the interdependence and mutual influence of energy consumption among multiple users, as well as the correlation between the total energy consumption and the energy consumption of multiple users. The channel attention layer dynamically adjusts the weights according to user-specific features to determine the influence degree of a single user in the overall energy consumption prediction. It assigns different attention weights to each channel of the feature map, strengthens the information expression of key channels, and suppresses the interference of secondary or noisy channels, thereby improving the focusing ability of the model. This mechanism can not only effectively reduce the noise impact caused by some abnormal or low-power users, but also highlight the main contribution of high-load users to the overall energy consumption, improving the accuracy and stability of energy consumption prediction. In addition, through this adaptive weight allocation method, the model can more accurately depict the energy consumption patterns of different users, enhance the modeling ability for complex load characteristics, and thus optimize the scheduling and resource allocation strategies.

[0011] Optionally, the energy consumption prediction model includes a shared layer, multiple user-specific layers, and a channel attention layer, where each user-specific layer corresponds to the prediction task of a single user; training the energy consumption prediction model using the historical energy consumption time series data of each user in the manner of multi-task learning and the attention channel mechanism includes:

[0012] The shared layer extracts shared features from the historical energy consumption time series data of each user;

[0013] Each user-specific layer extracts user-specific features according to the shared features and the user prediction task;

[0014] The channel attention layer determines the weight of the predicted energy consumption of a single user in the total energy consumption according to the user-specific features.

[0015] Optionally, the channel attention layer includes a time-domain channel attention module and a frequency-domain channel attention module. The channel attention layer determining the weight of the predicted energy consumption of a single user in the total energy consumption includes:

[0016] The time-domain channel attention module determines the first feature weights of each channel in the time domain;

[0017] The frequency-domain channel attention module determines the second feature weights of each channel in the frequency domain;

[0018] Fuse the first feature weights and the second feature weights of each channel.

[0019] Optionally, the time-domain channel attention module determining the first feature weights of each channel in the time domain and the frequency-domain channel attention module determining the second feature weights of each channel in the frequency domain include:

[0020] Perform global average pooling on the input features of each channel to obtain an average description of the global features;

[0021] Input the average description into a fully connected layer, calculate the weights of each channel, and obtain the first feature weights or the second feature weights;

[0022] Map the first feature weights or the second feature weights to each channel of the input features, re-weight the features, and obtain channel-enhanced features.

[0023] Optionally, the method further includes:

[0024] Preprocess the historical energy consumption data;

[0025] Slice the preprocessed historical energy consumption data into historical energy consumption time series data according to users.

[0026] Optionally, use the MSE loss function to update the prediction model.

[0027] The present disclosure also provides an energy consumption prediction device for a multi-user energy system, the device includes:

[0028] An acquisition module that acquires historical energy consumption data of multiple users on multiple energy devices in the energy system;

[0029] A slicing module that slices the historical energy consumption data into historical energy consumption time series data according to users;

[0030] A training module that uses the historical energy consumption time series data according to users to train an energy consumption prediction model in a multi-task learning manner and an attention channel mechanism, with predicting the total energy consumption of the energy system as the main task and predicting the energy consumption of a single user as the auxiliary task;

[0031] A prediction module that the energy consumption prediction model predicts the total energy consumption of the multi-user energy system based on real-time energy consumption data of multiple users on the energy devices in the energy system.

[0032] The present disclosure also provides an electronic device, including a processor, a memory, and instructions stored in the memory, wherein when the instructions are executed by the processor, the above-mentioned method is implemented.

[0033] The present disclosure also provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions execute the above-mentioned method when running.

[0034] The present disclosure also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the above-mentioned method is implemented. Description of the Drawings

[0035] The following drawings are only intended to illustrate and explain the present disclosure and do not limit the scope of the present disclosure. Among them,

[0036] Figure 1 is a flowchart of an energy consumption prediction method according to an embodiment of the present disclosure;

[0037] Figure 2 is a schematic diagram of an energy consumption prediction model according to an embodiment of the present disclosure;

[0038] Figure 3 is a schematic diagram of a time-domain channel attention module according to an embodiment of the present disclosure;

[0039] Figure 4 is a schematic diagram of a frequency-domain channel attention module according to an embodiment of the present disclosure;

[0040] Figure 5 is a schematic diagram of an energy consumption prediction device according to an embodiment of the present disclosure;

[0041] Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present disclosure.

[0042] Description of reference numerals

[0043] 100 Energy consumption prediction method

[0044] 110 - 140 Steps

[0045] 20 Energy consumption prediction model

[0046] 21 Shared layer

[0047] 22 - 1 First user-specific layer

[0048] 22 - 2 Second user-specific layer

[0049] 22 - n nth user-specific layer

[0050] 23 Channel attention layer

[0051] 231 Time-domain channel attention module

[0052] 232 LSTM layer

[0053] 233 Frequency-domain channel attention module

[0054] 30 Time-domain channel attention module

[0055] 31 Input layer

[0056] 32 Fully connected layer

[0057] 33 Fusion unit

[0058] 34 Output layer

[0059] 40 Frequency domain channel attention module

[0060] 41 Input layer

[0061] 42 Time-frequency conversion unit

[0062] 43 Fully connected layer

[0063] 44 Frequency-time conversion unit

[0064] 45 Fusion unit

[0065] 46 Output layer

[0066] 500 Energy consumption prediction device

[0067] 510 Acquisition module

[0068] 520 Segmentation module

[0069] 530 Training module

[0070] 540 Prediction module

[0071] 600 Electronic device

[0072] 610 Processor

[0073] 620 Memory Detailed implementation manners

[0074] In order to have a clearer understanding of the technical features, objectives, and effects of the present disclosure, the specific implementation manners of the present disclosure will now be described with reference to the accompanying drawings.

[0075] In the following description, many specific details are set forth in order to fully understand the present disclosure. However, the present disclosure may also be implemented in other ways different from those described herein. Therefore, the present disclosure is not limited by the specific embodiments set forth below.

[0076] As shown in the present disclosure and the claims, unless the context clearly indicates otherwise, the words "a", "an", "one", and / or "the" are not specifically singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0077] The present disclosure provides an energy consumption prediction method for a multi - user energy system. A multi - user energy system refers to an energy system that includes multiple users. The energy system includes multiple energy devices, and multiple users can use the multiple energy devices in the energy system. Taking an air compressor station as an example of the energy system, the air compressor station includes multiple air compressors, and the multiple air compressors are used by multiple users. The purpose of the present disclosure is to predict the total energy consumption of the multi - user energy system. Figure 1 It is a flowchart of an energy consumption prediction method 100 according to an embodiment of the present disclosure. As Figure 1 shown, the method 100 includes:

[0078] Step 110, obtaining historical energy consumption data of multiple users on multiple energy devices in the energy system;

[0079] The historical energy consumption data can be obtained from IOT devices connected to multiple energy devices in the energy system. The historical energy consumption data contains user information and time information.

[0080] Step 120, splitting the historical energy consumption data into historical energy consumption time - series data according to users;

[0081] The historical energy consumption data contains user information and time information. The historical energy consumption data can be split into historical energy consumption time - series data according to users based on the user information and time information in the historical energy consumption data. For historical energy consumption data of m time steps, it can be expressed as Y(t1,t2…t m ). If the energy system includes n users, the historical energy consumption data of any user i can be expressed as X i (t1,t2…t m ), i=(1,2…n). The total energy consumption is the sum of the energy consumptions of each user, and can be expressed as

[0082] Step 130, taking predicting the total energy consumption of the energy system as the main task and predicting the energy consumption of a single user as the auxiliary task, and training an energy consumption prediction model using the historical energy consumption time - series data according to users in the manner of multi - task learning and the attention channel mechanism;

[0083] Multi-Task Learning (MTL) is a machine learning approach that enables a model to share features among different subtasks, improving generalization ability and reducing overfitting in single tasks. To enhance the accuracy of predicting the total energy consumption from each individual user. The basic principle of multi-task learning is to allow the model to share feature representations among different tasks during the learning process, enabling the model to learn more general and representative features from multiple tasks. The Channel Attention Mechanism is a technique in deep learning used to enhance the model's ability to perceive the importance of feature channels. By learning, it automatically assigns different weights to each channel of the feature map to highlight important channels and suppress unimportant ones.

[0084] This disclosure trains an energy consumption prediction model in accordance with the multi-task learning approach and the attention channel mechanism. Taking the prediction of the total energy consumption of the energy system as the main task, the common features of all prediction tasks can be extracted. Taking the prediction of the energy consumption of individual users as the auxiliary task, specific prediction tasks for individual users can be performed based on the common features. Through the multi-task learning approach, the energy consumption interdependence and mutual influence among multiple users, as well as the correlation between the total energy consumption and the energy consumption of multiple users, are considered. In addition, through the attention channel mechanism, it is possible to focus on important feature channels and improve the performance of the energy consumption prediction model.

[0085] Step 140, the energy consumption prediction model predicts the total energy consumption of the multi-user energy system based on the real-time energy consumption data of multiple users on the energy devices in the energy system.

[0086] Steps 110 - 130 are the training stage of the energy consumption prediction model. After the training of the energy consumption prediction model is completed, the total energy consumption of the multi-user energy system can be predicted based on the real-time energy consumption data of multiple users on the energy devices in the energy system. The output of the energy consumption prediction model can be expressed as the predicted total energy consumption Y(t m+1 ,t m+2 …t m+k ), that is, the total energy consumption of the energy system for the next K time steps.

[0087] To this end, embodiments of the present disclosure propose an energy consumption prediction method for a multi-user energy system. Through multi-task learning, it takes into account the interdependence and mutual influence of energy consumption among multiple users, as well as the correlation between total energy consumption and the energy consumption of multiple users. The channel attention layer dynamically adjusts weights according to user-specific features to determine the influence degree of a single user in the overall energy consumption prediction. It assigns different attention weights to each channel of the feature map, strengthens the information expression of key channels, and simultaneously suppresses the interference of secondary or noisy channels, thereby enhancing the focusing ability of the model. This mechanism can not only effectively reduce the noise impact brought by some abnormal or low-power users, but also highlight the main contribution of high-load users to the overall energy consumption, improving the accuracy and stability of energy consumption prediction. In addition, through this adaptive weight allocation method, the model can more accurately depict the energy consumption patterns of different users, enhance the modeling ability for complex load characteristics, and thus optimize the scheduling and resource allocation strategies.

[0088] In some embodiments of the present disclosure, the energy consumption prediction model includes a shared layer, multiple user-specific layers, and a channel attention layer, where each user-specific layer corresponds to the prediction task of a single user; training the energy consumption prediction model using the historical energy consumption time series data of each user in the manner of multi-task learning and the attention channel mechanism includes: the shared layer extracts shared features from the historical energy consumption time series data of each user; each user-specific layer extracts user-specific features according to the shared features and the user prediction task; the channel attention layer determines the weight of the predicted energy consumption of a single user in the total energy consumption according to the user-specific features.

[0089] Figure 2 is a schematic diagram of an energy consumption prediction model according to an embodiment of the present disclosure. As Figure 2 shown, the energy consumption prediction model 20 includes a shared layer 21, multiple user-specific layers 22-1, 22-2,..., 22-n, and a channel attention layer 23. The shared layer 21, multiple user-specific layers 22-1, 22-2,..., 22-n, and the channel attention layer 23 can be based on the LSTM architecture. The historical energy consumption data of each user, including the historical energy consumption data X1(t1, t2...t m ), the historical energy consumption data X2(t1, t2...t m ),..., the historical energy consumption data X n (t1, t2...t m ), is input into the shared layer 21. The shared layer 21 extracts shared features based on the historical energy consumption data of each user, thereby obtaining the parameters of the shared layer. Subsequently, the historical energy consumption data of each user is input into the corresponding user-specific layer to determine the user-specific features of each user-specific layer, thereby obtaining the parameters of each user-specific layer. For example, the historical energy consumption data X1(t1, t2...t m) is input into the first user-specific layer 22-1 to determine the user-specific features of the first user-specific layer, thereby obtaining the parameters of the first user-specific layer. The second user historical energy consumption data X2(t1,t2…t m ) is input into the second user-specific layer 22-2 to determine the user-specific features of the second user-specific layer, thereby obtaining the parameters of the second user-specific layer. And so on, until the nth user historical energy consumption data X n (t1,t2…t m ) is input into the nth user-specific layer 22-n to determine the user-specific features of the nth user-specific layer, thereby obtaining the parameters of the nth user-specific layer. The outputs of each user-specific layer are input into the channel attention layer 23. The channel attention layer determines the weight of the single-user predicted energy consumption in the total energy consumption according to the user-specific features, assigns different weights to each channel of the feature map to highlight the important channels and suppress the unimportant channels. The difference between the user-specific prediction result and the real result can be measured by the user-specific loss function. For example, the difference between the first user-specific prediction result and the real result is measured by the first user-specific loss function MSE_Loss_1, and the difference between the nth user-specific prediction result and the real result is measured by the nth user-specific loss function MSE_Loss_n. The difference between the predicted result of the total energy consumption of the energy consumption prediction model and the real result is measured by the total loss function.

[0090] In some embodiments of the present disclosure, the channel attention layer includes a time-domain channel attention module and a frequency-domain channel attention module. The channel attention layer determines the weight of the single-user predicted energy consumption in the total energy consumption according to the user-specific features, including: the time-domain channel attention module determines the first feature weight of each channel in the time domain; the frequency-domain channel attention module determines the second feature weight of each channel in the frequency domain; and fuses the first feature weight and the second feature weight of each channel.

[0091] As Figure 2 shown, the channel attention layer includes a time-domain channel attention module 231, a plurality of LSTM layers 232, and a frequency-domain channel attention module 233. The time-domain channel attention module 231 determines the first feature weight of each channel, that is, each user-specific layer, in the time domain; after feature extraction by a plurality of LSTM layers, the frequency-domain channel attention module 233 determines the second feature weight of each channel in the frequency domain.

[0092] In some embodiments of the present disclosure, the time-domain channel attention module determines the first feature weights of each channel in the time domain, and the frequency-domain channel attention module determines the second feature weights of each channel in the frequency domain, including: performing global average pooling on the input features of each channel to obtain an average description of the global features; inputting the average description into a fully connected layer to calculate the weights of each channel, obtaining the first feature weights or the second feature weights; mapping the first feature weights or the second feature weights to each channel of the input features to re-weight the features, obtaining channel-enhanced features.

[0093] Figure 3 is a schematic diagram of a time-domain channel attention module according to an embodiment of the present disclosure. As Figure 3 shown, the time-domain channel attention module includes an input layer 31, a fully connected layer 32, a fusion unit 33, and an output layer 34. The prediction data of each user-specific layer is input into the input layer 31 for global average pooling to obtain an average description of the global features. The average description is input into the fully connected layer 32 to calculate the weights of each channel, obtaining the first feature weights of each channel. The fusion unit 33 maps the first feature weights to the channels of the input features to re-weight the features, obtaining the first channel-enhanced features. The output layer 34 outputs the first channel-enhanced features.

[0094] Figure 4 is a schematic diagram of a frequency-domain channel attention module according to an embodiment of the present disclosure. As Figure 4 shown, the frequency-domain channel attention module 40 includes an input layer 41, a time-frequency conversion unit 42, a fully connected layer 43, a frequency-time conversion unit 44, a fusion unit 45, and an output layer 46. The prediction data of each user-specific layer is input into the input layer 31. The time-frequency conversion unit 42 converts the prediction data in the time domain into prediction data in the frequency domain. The time-frequency conversion unit 42 can use the Discrete Cosine Transform (DCT) to convert the prediction data in the time domain into prediction data in the frequency domain. The prediction data in the frequency domain is subjected to global average pooling to obtain an average description of the global features. The average description is input into the fully connected layer 43 to calculate the weights of each channel, obtaining the second feature weights of each channel. The frequency-time conversion unit 44 converts the prediction data output by the fully connected layer 43 into time-domain data. The frequency-time conversion unit 44 can use the Inverse Discrete Cosine Transform (IDCT) to convert the prediction data output by the fully connected layer 43 into time-domain data. The fusion unit 45 maps the second feature weights to the channels of the input features to re-weight the features, obtaining the second channel-enhanced features. The output layer 46 outputs the first channel-enhanced features.

[0095] In some embodiments of the present disclosure, the method further includes: preprocessing historical energy consumption data; and splitting the preprocessed historical energy consumption data into historical energy consumption time series data according to users. Preprocessing the historical energy consumption data may include filling in missing data and removing significantly incorrect data. By preprocessing the historical energy consumption data, the accuracy and integrity of the historical energy consumption data can be improved, thereby improving the accuracy and integrity of the energy consumption prediction model.

[0096] In some embodiments of the present disclosure, the energy consumption prediction model is updated using the MSE loss function.

[0097] The present disclosure also proposes an energy consumption prediction device for a multi-user energy system. Figure 5 is a schematic diagram of an energy consumption prediction device 500 according to an embodiment of the present disclosure. As Figure 5 shown, the device 500 includes:

[0098] An acquisition module 510 that acquires historical energy consumption data of multiple users on multiple energy devices in the energy system;

[0099] A splitting module 520 that splits the historical energy consumption data into historical energy consumption time series data according to users;

[0100] A training module 530 that uses the total energy consumption of the energy system as the main task and the energy consumption of a single user as the auxiliary task, and trains the energy consumption prediction model using the historical energy consumption time series data according to users in a multi-task learning manner and an attention channel mechanism;

[0101] A prediction module 540 that predicts the total energy consumption of the multi-user energy system based on the real-time energy consumption data of multiple users on the energy devices in the energy system.

[0102] The present disclosure also proposes an electronic device 600. Figure 6 is a schematic diagram of an electronic device 600 according to an embodiment of the present disclosure. As Figure 6 shown, the electronic device 600 includes a processor 610 and a memory 620. The memory 620 stores instructions, and when the instructions are executed by the processor 610, the method 100 described above is implemented.

[0103] The present disclosure also proposes a computer-readable storage medium, on which computer instructions are stored, and when the computer instructions are run, the method 100 described above is executed.

[0104] The present disclosure also proposes a computer program product, including a computer program, and when the computer program is executed by a processor, the method 100 described above is implemented.

[0105] Some aspects of the methods and apparatuses of the present disclosure may be executed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as a "block", "module", "engine", "unit", "component", or "system". The processor may be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLCs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or combinations thereof. In addition, aspects of the present disclosure may be embodied as a computer product located on one or more computer-readable media, the product including computer-readable program code. For example, the computer-readable media may include, but is not limited to, magnetic storage devices (e.g., hard disks, floppy disks, magnetic tapes...), optical disks (e.g., compact discs (CDs), digital versatile discs (DVDs)...), smart cards, and flash memory devices (e.g., cards, sticks, key drives...).

[0106] Flowcharts are used herein to illustrate the operations performed by the methods according to embodiments of the present disclosure. It should be understood that the foregoing operations are not necessarily performed precisely in order. Instead, various steps may be processed in reverse order or simultaneously. Also, one or more other operations may be added to these processes, or one or more steps may be removed from these processes.

[0107] It should be understood that although this specification is described in terms of various embodiments, not every embodiment contains only one independent technical solution. This narrative manner of the specification is only for clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions in the various embodiments may also be appropriately combined to form other implementations that can be understood by those skilled in the art.

[0108] The foregoing are only illustrative specific embodiments of the present disclosure and are not intended to limit the scope of the present disclosure. Any equivalent changes, modifications, and combinations made by those skilled in the art without departing from the concept and principles of the present disclosure shall fall within the scope of protection of the present disclosure.

[0109] In this patent application, nouns and pronouns related to people are not limited to a specific gender.

Claims

1. A method (100) for predicting energy consumption of a multi - user energy system, characterized in that, The method (100) includes: Obtaining historical energy consumption data (110) of multiple users on multiple energy devices of the energy system; Slicing the historical energy consumption data into historical energy consumption time series data (120) according to users; Using the historical energy consumption time series data sliced by user as the main task of predicting the total energy consumption of the energy system and the energy consumption of a single user as an auxiliary task, training an energy consumption prediction model (130) in a multi-task learning manner and an attention channel mechanism; The energy consumption prediction model predicts the total energy consumption of the multi-user energy system based on real-time energy consumption data of multiple users on the energy devices of the energy system (140).

2. The method (100) according to claim 1, characterized in that, The energy consumption prediction model includes a shared layer, multiple user-specific layers, and a channel attention layer, where each user-specific layer corresponds to the prediction task of a single user; Training the energy consumption prediction model using the historical energy consumption time series data sliced by user in a multi-task learning manner and an attention channel mechanism includes: The shared layer extracts shared features from the historical energy consumption time series data of each user; Each user-specific layer extracts user-specific features according to the shared features and the user prediction task; The channel attention layer determines the weight of the predicted energy consumption of a single user in the total energy consumption according to the user-specific features.

3. The method (100) according to claim 2, characterized in that, The channel attention layer includes a time-domain channel attention module and a frequency-domain channel attention module. The channel attention layer determining the weight of the predicted energy consumption of a single user in the total energy consumption includes: The time-domain channel attention module determines the first feature weight of each channel in the time domain; The frequency-domain channel attention module determines the second feature weight of each channel in the frequency domain; Fusing the first feature weight and the second feature weight of each channel.

4. The method (100) according to claim 3, characterized in that, The time-domain channel attention module determining the first feature weight of each channel in the time domain and the frequency-domain channel attention module determining the second feature weight of each channel in the frequency domain includes: Performing global average pooling on the input features of each channel to obtain an average description of the global features; Inputting the average description into a fully connected layer, calculating the weight of each channel, and obtaining the first feature weight or the second feature weight; Mapping the first feature weight or the second feature weight to each channel of the input features, re-weighting the features, and obtaining channel-enhanced features.

5. The method (100) according to claim 1, characterized in that, The method (100) further includes: Preprocessing the historical energy consumption data; Slicing the preprocessed historical energy consumption data into historical energy consumption time series data according to users.

6. The method (100) according to claim 1, characterized in that, Updating the prediction model using the MSE loss function.

7. An energy consumption prediction device (500) for a multi-user energy system, characterized in that, The device (500) includes: An acquisition module (510) that acquires historical energy consumption data of multiple users on multiple energy devices of the energy system; A slicing module (520) that slices the historical energy consumption data into historical energy consumption time series data according to users; A training module (530) that uses the historical energy consumption time series data sliced by user as the main task of predicting the total energy consumption of the energy system and the energy consumption of a single user as an auxiliary task, and trains an energy consumption prediction model in a multi-task learning manner and an attention channel mechanism; A prediction module (540), wherein the energy consumption prediction model predicts the total energy consumption of the multi-user energy system based on real-time energy consumption data of multiple users on energy devices of the energy system.

8. An electronic device (600), comprising a processor (610), a memory (620), and instructions stored in the memory (620), wherein when the instructions are executed by the processor (610), the method (100) according to any one of claims 1-6 is implemented.

9. A computer-readable storage medium, having computer instructions stored thereon, wherein the computer instructions, when run, execute the method (100) according to any one of claims 1-6.

10. A computer program product, characterized in that, It includes a computer program, and when the computer program is executed by a processor, the method (100) according to any one of claims 1-6 is implemented.