Energy consumption prediction method and device and storage medium

By dynamically adjusting the patch size of the energy consumption prediction model and using the Transformer network model, the problem of low energy consumption prediction accuracy in 5G-A factories is solved, achieving higher prediction accuracy and robustness.

CN119443360APending Publication Date: 2025-02-14CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411426682.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Existing energy consumption prediction methods are less accurate in 5G-A factories and cannot effectively capture the complex and variable factors affecting energy consumption.

Method used

By obtaining the training data characteristics of the first device, including historical energy consumption, environment and operating state characteristics, it is converted into time series characteristics and divided into sub-sequence characteristics, the statistical indicators of each sub-sequence characteristic are determined, and the patches of the energy consumption prediction model are dynamically adjusted. Size, trained using a transformer Transformer network model of multiple input channels to predict the energy consumption of the second device.

Benefits of technology

It improves the accuracy and robustness of the energy consumption prediction model, enhances the adaptability to noise and abnormal situations, and improves the computing efficiency and information processing accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443360A_ABST
    Figure CN119443360A_ABST
Patent Text Reader

Abstract

The invention provides an energy consumption prediction method and device and a storage medium, relates to the technical field of communication, and is used for solving the technical problem that a general energy consumption prediction method is relatively low in accuracy. The energy consumption prediction method comprises the following steps: acquiring training data features of first equipment; the training data features comprise historical energy consumption features used for representing historical energy consumption of the first equipment, historical environment features used for representing a historical environment where the first equipment is located, and historical state features used for representing a historical operation state of the first equipment; converting the training data features into time sequence features, and dividing the time sequence features into a plurality of sub-sequence features; determining a statistical index of each sub-sequence feature, and determining a patch of an energy consumption prediction model according to the statistical index; according to the patch and the training data features, training to obtain an energy consumption prediction model; the energy consumption prediction model is used for predicting the energy consumption of the second equipment; the second equipment and the first equipment have the same equipment type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to an energy consumption prediction method, device and storage medium. Background Art

[0002] At present, the evolved and enhanced version of the fifth generation of mobile communication technology (Advanced 5G, 5G-A) technology plays a vital role in 5G-A factories with its wide range of application fields and powerful capabilities.

[0003] 5G-A technology has realized the intelligent and automated upgrade of production processes, greatly promoted the high-speed transmission and real-time analysis of data, and brought unprecedented production efficiency and flexibility to 5G-A factories, but it also resulted in higher energy consumption. In order to effectively control the operating costs of 5G-A factories, it is necessary to predict the energy consumption of equipment in 5G-A factories (also called 5G-A equipment) so that the 5G-A equipment can be finely monitored and managed based on the energy consumption prediction results.

[0004] General energy consumption prediction methods often only use single data (such as historical energy consumption data) for prediction, which cannot accurately determine the energy consumption prediction results of 5G-A devices. Summary of the invention

[0005] The present application provides an energy consumption prediction method, device and storage medium, which are used to solve the technical problem that the general energy consumption prediction method has low accuracy.

[0006] In order to achieve the above purpose, this application adopts the following technical solutions:

[0007] In a first aspect, an energy consumption prediction method is provided, comprising: obtaining training data features of a first device; the training data features comprising: historical energy consumption features for representing historical energy consumption of the first device, historical environment features for representing historical environments in which the first device is located, and historical status features for representing historical operating states of the first device; converting the training data features into time series features, and dividing the time series features into a plurality of subsequence features; determining statistical indicators of each subsequence feature, and determining a patch of an energy consumption prediction model based on the statistical indicators; training an energy consumption prediction model based on the patch and the training data features; the energy consumption prediction model is used to predict the energy consumption of a second device; the second device is of the same device type as the first device.

[0008] Optionally, obtaining training data features of the first device includes: obtaining historical energy consumption data of the first device, historical environmental data of the first device, and historical operating status of the first device; the historical operating status of the first device includes operating status in different historical time periods; normalizing numerical features in the historical energy consumption data of the first device, the historical environmental data of the first device, and the historical operating status of the first device, and unique-hot encoding non-numerical features to obtain multiple data features; and concatenating multiple data features to obtain training data features.

[0009] Optionally, the energy consumption prediction model is a transformer network model with multiple input channels; among the multiple subsequence features, different subsequence features are used to input into different input channels of the transformer network model.

[0010] Optionally, the statistical indicators include: variance, mean value, change value, and change rate; determining the statistical indicators of each subsequence feature, and determining the patch of the energy consumption prediction model according to the statistical indicators, including:

[0011] The patch satisfies the following formula:

[0012]

[0013] Among them, p i is the patch, min_patch_size is the minimum patch, α, β, γ are the adjustment coefficients, is the variance, μ i is the average value, τ i is the change value, ρ i is the rate of change.

[0014] Optionally, the method also includes: obtaining data features to be predicted of the second device; the data features to be predicted include: current energy consumption features for representing the current energy consumption of the second device, current environment features for representing the current environment in which the second device is located, and current state features for representing the current operating state of the second device; inputting the data features to be predicted into the energy consumption prediction model to obtain the predicted energy consumption of the second device.

[0015] Optionally, the method further includes: determining an energy consumption state of the second device according to the predicted energy consumption of the second device and the current energy consumption of the second device.

[0016] Optionally, the first device and the second device are energy-consuming devices in a 5G-A factory, which is an evolved and enhanced version of the fifth generation mobile communication technology.

[0017] In a second aspect, an energy consumption prediction device is provided, including: a communication unit and a processing unit; the communication unit is used to obtain training data features of a first device; the training data features include: historical energy consumption features for representing the historical energy consumption of the first device, historical environment features for representing the historical environment in which the first device is located, and historical status features for representing the historical operating status of the first device; the processing unit is used to convert the training data features into time series features, and divide the time series features into multiple sub-sequence features; the processing unit is also used to determine the statistical indicators of each sub-sequence feature, and determine the patch of the energy consumption prediction model according to the statistical indicators; the processing unit is also used to train the energy consumption prediction model according to the patch and the training data features; the energy consumption prediction model is used to predict the energy consumption of a second device; the second device is of the same device type as the first device.

[0018] Optionally, the communication unit is specifically used to: obtain historical energy consumption data of the first device, historical environmental data of the first device, and historical operating status of the first device; the historical operating status of the first device includes operating status in different historical time periods; normalize the numerical features in the historical energy consumption data of the first device, the historical environmental data of the first device, and the historical operating status of the first device, and unique-hot encode the non-numerical features to obtain multiple data features; and concatenate multiple data features to obtain training data features.

[0019] Optionally, the energy consumption prediction model is a transformer network model with multiple input channels; among the multiple subsequence features, different subsequence features are used to input into different input channels of the transformer network model.

[0020] Optionally, statistical indicators include: variance, mean, change value, and change rate; the patch satisfies the following formula:

[0021] Variance, μ i is the average value, τ i is the change value, ρ i is the rate of change.

[0022] Optionally, the acquisition unit is also used to acquire the data characteristics to be predicted of the second device; the data characteristics to be predicted include: current energy consumption characteristics for representing the current energy consumption of the second device, current environment characteristics for representing the current environment in which the second device is located, and current state characteristics for representing the current operating state of the second device; optionally, the processing unit is also used to input the data characteristics to be predicted into the energy consumption prediction model to obtain the predicted energy consumption of the second device.

[0023] Optionally, the processing unit is further used to determine the energy consumption state of the second device according to the predicted energy consumption of the second device and the current energy consumption of the second device.

[0024] Optionally, the first device and the second device are energy-consuming devices in a 5G-A factory, which is an evolved and enhanced version of the fifth generation mobile communication technology.

[0025] In a third aspect, an energy consumption prediction 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 through a bus; when the energy consumption prediction device is running, the processor executes the computer execution instructions stored in the memory, so that the energy consumption prediction device executes the energy consumption prediction method described in the first aspect.

[0026] The energy consumption prediction device may be a network device, or a part of a network device, such as a chip system in a network device. The chip system is used to support the network device to implement the functions involved in the first aspect and any possible implementation thereof, for example, to obtain, determine, and send the data and / or information involved in the above-mentioned energy consumption prediction method. The chip system includes a chip, and may also include other discrete devices or circuit structures.

[0027] In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium comprising computer execution instructions, and when the computer execution instructions are executed on a computer, the computer executes the energy consumption prediction method described in the first aspect.

[0028] In a fifth aspect, a computer program product is also provided, which includes computer instructions. When the computer instructions are executed on an energy consumption prediction device, the energy consumption prediction device executes the energy consumption prediction method as described in the first aspect above.

[0029] It should be noted that the above 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 consumption prediction device, or may be packaged separately from the processor of the energy consumption prediction device, which is not limited in the embodiments of the present application.

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

[0031] In the embodiments of the present application, the name of the energy consumption prediction 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 the present application, they fall within the scope of the claims of the present application and their equivalent technologies.

[0032] The technical solution provided by this application brings at least the following beneficial effects:

[0033] Based on any of the above aspects, the present application proposes an energy consumption prediction method, which can obtain training data features of a first device. Among them, the training data features include: historical energy consumption features for representing the historical energy consumption of the first device, historical environment features for representing the historical environment in which the first device is located, and historical status features for representing the historical operating status of the first device. Then, the training data features can be converted into time series features, and the time series features can be divided into multiple sub-sequence features. Then, the statistical indicators of each sub-sequence feature can be determined, and the patch of the energy consumption prediction model can be determined based on the statistical indicators. Subsequently, an energy consumption prediction model can be trained based on the patch and the training data features. Among them, the energy consumption prediction model is used to predict the energy consumption of a second device (of the same device type as the first device).

[0034] From the above, it can be seen that the present application can convert the training data features into time series features and divide the time series features into multiple subsequence features, so as to determine the patch of the energy consumption prediction model according to the statistical indicators of each subsequence feature, that is, to adjust the patch size of the energy consumption prediction model using an adaptive method. In other words, the present application can dynamically adjust the patch size according to the data characteristics (i.e., statistical indicators), capture the short-term features and long-term trends in the training data, adapt to changes in different time periods, and enhance the adaptability of the energy consumption prediction model to noise and abnormal conditions. At the same time, through information compression and feature selection, the computing efficiency and the accuracy of information processing are improved, and then a more accurate and robust energy consumption prediction model can be trained, so as to quickly and accurately predict the energy consumption prediction results according to the energy consumption prediction model.

[0035] The beneficial effects of the first, second, third, fourth and fifth aspects of the present application can all be referred to the analysis of the above beneficial effects, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram of the structure of an energy consumption prediction system provided in an embodiment of the present application;

[0037] Figure 2 A schematic diagram of the hardware structure of an energy consumption prediction device provided in an embodiment of the present application Figure 1 ;

[0038] Figure 3 A schematic diagram of the hardware structure of an energy consumption prediction device provided in an embodiment of the present application Figure 2 ;

[0039] Figure 4A schematic diagram of a method for predicting energy consumption provided in an embodiment of the present application Figure 1 ;

[0040] Figure 5 A schematic diagram of a method for predicting energy consumption provided in an embodiment of the present application Figure 2 ;

[0041] Figure 6 A schematic diagram of a method for predicting energy consumption provided in an embodiment of the present application Figure 3 ;

[0042] Figure 7 A schematic diagram of a method for predicting energy consumption provided in an embodiment of the present application Figure 4 ;

[0043] Figure 8 A schematic diagram of the structure of an energy consumption prediction device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0045] It should be noted that, in the embodiments of the present 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 the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0046] 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 substantially 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 order of execution.

[0047] With the development of the fifth generation mobile communication network (5G) and Industry 4.0, 5G-A technology plays a vital role in 5G-A factories with its wide range of application fields and powerful capabilities. It not only realizes the intelligent and automated upgrade of the production process, but also greatly promotes the high-speed transmission and real-time analysis of data, bringing unprecedented production efficiency and flexibility to 5G-A factories. Although 5G-A technology enables all aspects of the production process, including but not limited to intelligent production lines, high-precision robots, and IoT monitoring, it also brings higher energy consumption. For modern factories that pursue both sustainable development and cost-effectiveness, how to effectively manage the energy consumption of these high-tech equipment (i.e., 5G-A equipment) has become the key to optimizing operating costs and enhancing market competitiveness.

[0048] Therefore, energy consumption management of 5G-A equipment has become an important consideration for daily operations of enterprises. This is not limited to the monitoring and optimization of traditional high-energy consumption equipment (such as air-conditioning system equipment), but also needs to cover all production equipment, efficient lighting systems, intelligent ventilation facilities and automated logistics systems connected and controlled by 5G-A technology. Through refined energy consumption monitoring, analysis and management, 5G-A factories can ensure that while enjoying the efficiency and convenience brought by 5G-A technology, they can also effectively control costs and improve overall energy efficiency.

[0049] In this case, the refinement and intelligence of 5G-A factory energy consumption management becomes particularly important. However, traditional energy consumption prediction methods are often limited to a single data source, such as historical energy consumption records or environmental parameters. Such prediction models are difficult to fully capture and analyze the complex and variable factors that affect energy consumption, such as production load changes, equipment aging, and fluctuations in external climate conditions. This may lead to significant deviations between the prediction results and actual energy consumption, affecting energy efficiency and the formulation of cost control strategies.

[0050] Although general technology can also predict energy consumption through artificial intelligence models (such as Transformer networks, PatchTST models, etc.), general Transformer networks are usually based on point-based attention, and when it comes to time series, the energy consumption prediction results are not ideal. Secondly, the historical energy consumption data used by general Transformer networks is usually obtained by calculating correlations, extracting the first N dimensions, and calculating the person correlation coefficient to obtain secondary features. Some useful information implicit in the data may be hidden, which may increase the risk of overfitting, reduce interpretability, and make it difficult to identify potential energy anomalies. Thirdly, general Transformer networks can only predict energy consumption and cannot detect anomalies.

[0051] In addition, although the general PatchTST model has achieved better results than the traditional point-wise attention, its patch is fixed and its flexibility needs to be enhanced. In addition, the patch is related to computing time and memory, and a large patch will increase the time and space complexity.

[0052] In response to the above problems, the present application proposes an energy consumption prediction method, which can obtain training data features of a first device. Among them, the training data features include: historical energy consumption features for representing the historical energy consumption of the first device, historical environment features for representing the historical environment in which the first device is located, and historical status features for representing the historical operating status of the first device. Then, the training data features can be converted into time series features, and the time series features can be divided into multiple sub-sequence features. Then, the statistical indicators of each sub-sequence feature can be determined, and the patch of the energy consumption prediction model can be determined based on the statistical indicators. Subsequently, the energy consumption prediction model can be trained based on the patch and the training data features. Among them, the energy consumption prediction model is used to predict the energy consumption of a second device (of the same device type as the first device).

[0053] From the above, it can be seen that the present application can convert the training data features into time series features and divide the time series features into multiple subsequence features, so as to determine the patch of the energy consumption prediction model according to the statistical indicators of each subsequence feature, that is, to adjust the patch size of the energy consumption prediction model using an adaptive method. In other words, the present application can dynamically adjust the patch size according to the data characteristics (i.e., statistical indicators), capture the short-term features and long-term trends in the training data, adapt to changes in different time periods, and enhance the adaptability of the energy consumption prediction model to noise and abnormal conditions. At the same time, through information compression and feature selection, the computing efficiency and the accuracy of information processing are improved, and then a more accurate and robust energy consumption prediction model can be trained, so as to quickly and accurately predict the energy consumption prediction results according to the energy consumption prediction model.

[0054] The energy consumption prediction method is suitable for an energy consumption prediction system. Figure 1 Figure 2 shows a structure of the energy consumption prediction system. Figure 1 As shown, the energy consumption prediction system includes: an electronic device 101 and a data providing device 102 which are communicatively connected to each other.

[0055] In the embodiment of the present application, the electronic device 101 is used to obtain training data from the data providing device 102, and obtain an energy consumption prediction model through training based on the training data.

[0056] Optionally, the physical device of the electronic device 101 and the data providing device 102 may be a server, a terminal, or other types of electronic devices, which is not limited in the embodiments of the present application.

[0057] Optionally, the terminal may be a device that provides voice and / or data connectivity to a user, a handheld device with wireless connection function, or other processing device connected to a wireless modem. The wireless terminal may communicate with one or more core networks via a radio access network (RAN). The 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 language and / or data with a radio access network, such as a mobile phone, tablet computer, laptop computer, netbook, personal digital assistant (PDA).

[0058] 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 the embodiments of the present application.

[0059] Optionally, in the 5G-A scenario, the data providing device 102 may also be key production equipment in a 5G-A factory (also referred to as 5G-A equipment), such as a 5G-A base station, a 5G-A industrial router / gateway, a 5G-A intelligent robot, a 5G-A AGV (automatic guided vehicle), a 5G-A PLC (programmable logic controller), and a 5G-A ultra-high-definition camera.

[0060] The above-mentioned 5G-A devices can be installed with high-precision, low-power 5G-A IoT module energy consumption sensors. These sensors can collect relevant data of 5G-A devices in real time and accurately, such as energy consumption data, environmental data, operating status data, etc.

[0061] Optionally, the energy consumption data may include but are not limited to the use of energy such as electricity, heat, gas, and water. The environmental data may include but are not limited to data such as temperature, humidity, air pressure, and vibration. The operating status data may include but are not limited to data such as equipment operating status, operating hours on weekdays, and operating hours on holidays.

[0062] The electronic device 101 can communicate with the 5G-A device to obtain various data of the 5G-A device. To ensure the efficiency and real-time performance of the electronic device in collecting various data of the 5G-A device, the electronic device 101 can perform local collection through the 5G-A low-power IoT module.

[0063] The 5G-A low-power IoT module makes full use of the large bandwidth and low latency characteristics of 5G-A technology, and realizes the rapid and stable collection of multi-source data based on the edge-cloud collaborative solution. At the data transmission level, the 5G-A low-power IoT module can rely on the powerful wireless communication capabilities of 5G-A to stably connect to the data transmission network elements in the 5G-A network, and push the data to the cloud platform (i.e., electronic device 101) securely and quickly through the network architecture composed of efficient switches and routers. It not only ensures the real-time and integrity of the data, but also lays the foundation for subsequent model training, data analysis, learning algorithm application and other functions.

[0064] The basic hardware structure of the electronic device 101 includes: Figure 2 or Figure 3 The energy consumption prediction device shown in FIG. Figure 2 and Figure 3 Taking the energy consumption prediction device shown as an example, the hardware structure of the electronic device 101 is introduced.

[0065] like Figure 2 , which is a schematic diagram of a hardware structure of an energy consumption prediction device provided in an embodiment of the present application. The energy consumption prediction 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 a bus 24.

[0066] The processor 21 is the control center of the energy consumption prediction device, which can be a processor or a general term for multiple processing elements. For example, the processor 21 can be a general-purpose central processing unit (CPU) or other general-purpose processors. Among them, the general-purpose processor can be a microprocessor or any conventional processor.

[0067] As an embodiment, the processor 21 may include one or more CPUs, such as Figure 2 CPU 0 and CPU 1 are shown in .

[0068] 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 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.

[0069] In a possible implementation, the memory 22 may exist independently of the processor 21, and the memory 22 may be connected to the processor 21 via a bus 24 to store instructions or program codes. When the processor 21 calls and executes the instructions or program codes stored in the memory 22, the energy consumption prediction method provided in the following embodiments of the present application can be implemented.

[0070] In the embodiment of the present application, for the electronic device 101, the software programs stored in the memory 22 are different, so the functions implemented by the electronic device 101 are different. The functions performed by each device will be described in conjunction with the following flowchart.

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

[0072] The communication interface 23 is used to connect the energy consumption prediction device to other devices through a communication network, and the communication network may be Ethernet, wireless access network, 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.

[0073] The bus 24 may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 2 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0074] Figure 3 FIG. 2 shows another hardware structure of the energy consumption prediction device in the embodiment of the present application. Figure 3 As shown, the energy consumption prediction device may include a processor 31 and a communication interface 32. The processor 31 is coupled to the communication interface 32.

[0075] The functions of the processor 31 may refer to the description of the processor 21. In addition, the processor 31 also has a storage function and can function as the memory 22 described above.

[0076] The communication interface 32 is used to provide data to the processor 31. The communication interface 32 may be an internal interface of the energy consumption prediction device, or an external interface of the energy consumption prediction device (equivalent to the communication interface 23).

[0077] It should be pointed out that Figure 2 (or Figure 3 ) does not constitute a limitation on the energy consumption prediction device, except Figure 2 (or Figure 3 ) In addition to the components shown in the figure, the energy consumption prediction device may include more or fewer components than those shown in the figure, or combine certain components, or arrange the components differently.

[0078] The energy consumption prediction method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.

[0079] The energy consumption prediction method provided in the embodiment of the present application is applied to Figure 1 The electronic device 101 in the energy consumption prediction system shown. Figure 4 As shown, the energy consumption prediction method includes:

[0080] S401: The electronic device obtains training data features of the first device.

[0081] The training data features include: historical energy consumption features for representing historical energy consumption of the first device, historical environment features for representing the historical environment in which the first device is located, and historical status features for representing the historical operating status of the first device.

[0082] In one practicable manner, a method for an electronic device to obtain a training data feature of a first device specifically includes:

[0083] S401-1. The electronic device obtains historical energy consumption data of a first device, historical environment data of the first device, and historical operating status of the first device.

[0084] The historical operating status of the first device includes operating status in different historical time periods.

[0085] Specifically, in order to train an energy consumption prediction model, the electronic device needs to obtain a large amount of training data for training. Therefore, the electronic device can obtain the training data of the first device, that is, the historical energy consumption data of the first device, the historical environmental data of the first device, and the historical operating status of the first device.

[0086] Optionally, the first device can be one device, or multiple devices of the same type (for example, 5G-A devices of the same model but in different locations), or multiple devices of different types (for example, 5G-A base stations, 5G-A industrial routers / gateways, etc.).

[0087] Optionally, the above historical energy consumption data may include but is not limited to the use of electricity, heat, gas, water and other energy sources by the first device in the historical time period. The historical environment data may include but is not limited to the temperature, humidity, air pressure, vibration, weather conditions and other data of the environment in which the first device is located in the historical time period. The historical operating status may include but is not limited to the device operating status of the first device in the historical time period (such as normal operation, normal shutdown, normal standby, abnormal operation, abnormal shutdown, etc.), working day operating time, holiday operating time (because the working day and holiday operating time may be different, so the working day operating time and holiday operating time are counted as training data, which can more accurately predict the energy consumption of the device) and other data.

[0088] S401-2. The electronic device normalizes the historical energy consumption data of the first device, the historical environment data of the first device, and the numerical features in the historical operating state of the first device, and unique-hot encodes the non-numerical features to obtain multiple data features.

[0089] Specifically, after acquiring the training data, since different training data have different dimensions, it is necessary to perform feature extraction on the training data, so as to obtain multiple data features of the first device.

[0090] Exemplarily, taking the first device as a 5G-A device, the historical operation status of the first device can be represented by a numerical value, for example, 0 represents normal, and 1 represents abnormal. Further, the historical operation status of the first device can also be represented by a double-digit number, for example, 01 represents normal operation, 00 represents normal shutdown, 11 represents abnormal operation, and 10 represents abnormal shutdown.

[0091] Electronic devices can normalize numerical features (such as electrical energy, thermal energy, gas energy, and water energy in historical energy consumption data, and temperature, humidity, air pressure, vibration, etc. in historical environmental data) to obtain normalized data features.

[0092] Furthermore, the electronic device may perform one-hot encoding on non-numeric features (eg, weekday operating hours, holiday operating hours, weather conditions, etc. in historical environmental data) to obtain multiple data features.

[0093] S401-3. The electronic device concatenates multiple data features to obtain training data features.

[0094] Specifically, after obtaining multiple data features, in order to subsequently convert the training data features into time series features, the electronic device can splice the multiple data features and fuse them into a new feature matrix (x1,…,x T ), each x t At time step t, it is a vector of dimension M (number of features), and the feature matrix time length is T.

[0095] For example, assuming that the number of data features M is 100, the time step t is 1 minute, and the time length T is 1 hour, then the training data feature x at the 10th minute 10 It includes 100 data features at the 10th minute, namely, 100 data features including historical energy consumption data, historical environmental data, historical operating status, etc. of the first device at the 10th minute.

[0096] S402: The electronic device converts the training data features into time series features, and divides the time series features into a plurality of subsequence features.

[0097] Specifically, after obtaining the training data features, since the training data features are training data features within a historical period of time, that is, the training data features are training data features involving time series, in order to enable the trained energy consumption prediction model to learn the useful information implicit in the time series, strengthen the energy consumption prediction model's understanding of the characteristics of time continuity, and reduce the risk of overfitting, the electronic device can convert the training data features into time series features and divide the time series features into multiple subsequence features.

[0098] In combination with the above example, the electronic device can represent the i-th univariate sequence of length T starting from index 1 as Where i=1,...,M.

[0099] That is to say, the input of the energy consumption prediction model (x1,...,x T ) can be separated into M univariate sequences x (i) ∈R 1 ×T , where each sequence can use an independent channel to enter the energy consumption prediction model, such as the Transformer network.

[0100] Next, the electronic device can convert each input univariate time series x in the above sequence into (i) Divide into multiple segments according to a certain window length, each window length is L, that is, x (i) A series of one-dimensional window vectors X of length L can be generated i ∈R 1×L , that is, dividing the time series features into multiple sub-sequence features.

[0101] S403: The electronic device determines a statistical index of each subsequence feature, and determines a patch of an energy consumption prediction model according to the statistical index.

[0102] Specifically, after dividing the time series feature into multiple subsequence features, in order to accurately learn the potential semantics of each subsequence feature, the electronic device can determine the statistical index of each subsequence feature, and determine the patch of the energy consumption prediction model according to the statistical index.

[0103] In some embodiments, the statistical indicators include: variance, average value, change value (also called trend), and change rate.

[0104] Combining the above examples, for a given window X i The variance of the time series (length L) Average value μ i , the change value τ i , rate of change ρ i Satisfies the following formula:

[0105]

[0106]

[0107] τ i =x i,L -x i,1 ;

[0108]

[0109] Among them, x i,t is the (t)th data point in the window, is the average value of the window.

[0110] After determining the statistical indicators of each subsequence feature, the electronic device can dynamically adjust the patch size and generate an adaptive patch sequence, that is, the patch satisfies the following formula:

[0111]

[0112] Among them, p iis the patch, min_patch_size is the minimum patch, α, β, γ are adjustment coefficients (used to adjust the weight of the influence of different statistical indicators on the patch size), is the variance, μ i is the average value, τ i is the change value, ρ i is the rate of change, min_patch_size is the minimum patch size, ensuring that each patch has at least one minimum value.

[0113] From the above, we can see that in this application, the patch length can be recorded as p i , a patch sequence can be determined by the above method Where N is the number of patches generated.

[0114] S404: The electronic device obtains an energy consumption prediction model through training based on the patch and training data features.

[0115] The energy consumption prediction model is used to predict the energy consumption of the second device; the second device is of the same device type as the first device.

[0116] In some embodiments, the energy consumption prediction model is a transformer (Transformer network model) with multiple input channels; among the multiple subsequence features, different subsequence features are used to input into different input channels of the Transformer network model.

[0117] Continuing with the above example, the electronic device can map each patch obtained in S403 to a potential representation through linear embedding to become an embedding vector of fixed length as the input of the Transformer model, that is, mapping the observed signal to the potential representation.

[0118] That is, when training the energy consumption prediction model, a linear embedding layer can be created to map the input data from the input dimension to the dimension of the potential representation. Then, given a batch of input data, a fixed-length embedding vector is obtained through this linear embedding layer as the potential representation, which can be used as the input of the Transformer model.

[0119] For observed signals, similar approaches can be used, depending on the characteristics and data type of the signal. If the signal is time series data, you can consider using a one-dimensional convolutional layer or a recurrent neural network (RNN) to perform preliminary processing before mapping it to a latent representation through a linear embedding layer.

[0120] Next, the electronic device uses a trainable linear projection W p ∈R D×Pi , and a learnable additive positional encoding Wpos ∈R D×N , maps the patch to the Transformer latent space of dimension D, which is used to monitor the time sequence of the patch:

[0121] in, Represents the input to the Transformer encoder, which is a vector of fixed dimension.

[0122] Next, the device can build a Transformer encoder model with a multi-head attention mechanism, using a fully connected layer with a linear head to obtain predictions for future time steps.

[0123] Multi-head attention h=1,...,H, electronic devices can transform it into:

[0124] Query Matrix

[0125] Key Matrix

[0126] Value Matrix

[0127] in,

[0128] Afterwards, the electronic device can obtain the attention output in a proportional manner. (i) ∈R D×N , d k is the word embedding dimension and serves as the scaling factor of the mapping, and d is the magnification factor.

[0129] The attention mechanism calculation process is as follows:

[0130]

[0131] The aggregate value matrix is ​​z (i) ∈R (D×N) .

[0132] Next, the electronic device can use a fully connected layer with a linear head to obtain the prediction results for the next L time period

[0133] Subsequently, the electronic device may divide the sequence sample data set consisting of the energy consumption time series data features (ie, training data features) into a training set and a test set in a ratio of 8:2, and input the data into the Transformer model for training to obtain an energy consumption prediction model.

[0134] The detailed process of training the electronic device to obtain the energy consumption prediction model based on the patch and training data features can refer to the general model training process and will not be repeated here.

[0135] In some embodiments, Figure 5 As shown, the energy consumption prediction method provided by the present application also includes:

[0136] S501: The electronic device obtains a feature of data to be predicted from a second device.

[0137] The data features to be predicted include: current energy consumption features for representing the current energy consumption of the second device, current environment features for representing the current environment in which the second device is located, and current state features for representing the current operating state of the second device.

[0138] The detailed process of the electronic device acquiring the to-be-predicted data features of the second device may refer to the detailed process of the electronic device acquiring the training data features of the first device in S401, which will not be described in detail here.

[0139] In some embodiments, the first device and the second device are energy consuming devices in a 5G-A factory.

[0140] S502: The electronic device inputs the characteristics of the data to be predicted into an energy consumption prediction model to obtain the predicted energy consumption of the second device.

[0141] In combination with the above example, the electronic device can input the new data samples that need energy consumption prediction (ie, the data features to be predicted of the second device) into the trained Transformer model (ie, the energy consumption prediction model) to complete the energy consumption prediction.

[0142] In some embodiments, in combination Figure 5 ,like Figure 6 As shown, the energy consumption prediction method provided by the present application also includes:

[0143] S601: The electronic device determines an energy consumption state of the second device according to the predicted energy consumption of the second device and the current energy consumption of the second device.

[0144] Specifically, since the predicted energy consumption has a certain linear relationship with the current energy consumption, after predicting the predicted energy consumption of the second device, the electronic device can compare the difference between the predicted energy consumption of the second device and the current energy consumption of the second device to determine the energy consumption state of the second device.

[0145] Exemplarily, when the difference between the predicted energy consumption of the second device and the current energy consumption of the second device is greater than a preset difference value (set according to human experience), it indicates that the energy consumption state of the second device is in an abnormal state. Correspondingly, when the difference between the predicted energy consumption of the second device and the current energy consumption of the second device is less than or equal to the preset difference value, it indicates that the energy consumption state of the second device is in a normal state.

[0146] In some embodiments, Figure 7 As shown, the energy consumption prediction method provided in the embodiment of the present application includes:

[0147] S701: Obtain features of data to be predicted.

[0148] like Figure 7 As shown, the data features to be predicted include feature 1, feature 2, feature 3, feature 4 and feature 5.

[0149] Optionally, when obtaining features of the data to be predicted, a feature matrix, that is, the features of the data to be predicted, may be obtained through data collection, normalization, and one-hot encoding preprocessing.

[0150] S702: Perform feature independent processing on the data feature to be predicted to obtain multiple independent sub-features.

[0151] like Figure 7 As shown, by performing feature independent processing on the features of the data to be predicted, five independent sub-features can be obtained: independent feature 1, independent feature 2, independent feature 3, independent feature 4 and independent feature 5.

[0152] The purpose of feature independent processing is to divide the features of the data to be predicted into independent features that correspond one-to-one to the channels of the Transformer network architecture, so that when inputting the Transformer network, independent channels can be used, and each input token (i.e., independent sub-feature) only contains information from the same channel. In this way, the original signal can be fully utilized without complex preprocessing.

[0153] S703: Input multiple sub-features into the Transformer network architecture to obtain multiple independent prediction features.

[0154] like Figure 7 As shown, the multiple independent prediction features include: prediction feature 1, prediction feature 2, prediction feature 3, prediction feature 4 and prediction feature 5.

[0155] The Transformer network architecture is the energy consumption prediction model in the embodiment of the present application. Its training process needs to be obtained by inputting a univariate sequence (i.e., multiple subsequence features), adaptive patch, linear embedding, Transformer encoder, linear head fully connected layer, and outputting a univariate sequence training. The Transformer encoder includes: multi-head attention mechanism, residual connection + layer normalization, feedforward neural network, etc. The specific method can refer to the detailed description of S401-S403 above.

[0156] S704: Multiple prediction features are concatenated to obtain a prediction sequence, that is, an energy consumption prediction result.

[0157] From the above, it can be seen that the present application utilizes patch-wise attention to enhance the position information, and can realize the capture of local semantic information in the sequence signal. Moreover, the multivariate time series in the present application is a multi-channel signal, using independent channels, and each input token only contains information from the same channel. The original signal can be fully utilized without complex preprocessing. Secondly, the present application can also identify potential energy problems or abnormal conditions in advance, and use an adaptive method to adjust the patch size. It can dynamically adjust the patch size according to the characteristics of the data, capture short-term features and long-term trends, adapt to changes in different time periods, and enhance the model's adaptability to noise and abnormal conditions. At the same time, through information compression and feature selection, the computational efficiency and information processing accuracy are improved.

[0158] That is to say, this application designs an adaptive segmentation strategy that dynamically adjusts the patch size based on the characteristics of time series data (such as variance, mean, trend, rate of change), and uses characteristic indicators (variance, mean, trend, rate of change) to adaptively adjust the specific rules and formulas of the patch size. The time series data of electricity, gas, heat, water, etc. consumed in the production process and other one-dimensional signals (such as weather conditions, temperature, humidity, air pressure, equipment conditions, holidays and working days, etc.) are effectively integrated, and the fused features are still kept as one-dimensional time series features, thereby improving the computational efficiency and information processing accuracy.

[0159] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the 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 realize 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 the form of hardware or computer software driving hardware 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 exceed the scope of the present application.

[0160] The embodiment of the present application can divide the functional modules of the energy consumption prediction device 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 module can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0161] like Figure 8 , which is a schematic diagram of the structure of an energy consumption prediction device provided in an embodiment of the present application. Figure 8 The energy consumption prediction device shown includes: a communication unit 801 and a processing unit 802;

[0162] The communication unit 801 is used to obtain training data features of the first device; the training data features include: historical energy consumption features for representing historical energy consumption of the first device, historical environment features for representing historical environments in which the first device is located, and historical status features for representing historical operating states of the first device;

[0163] A processing unit 802 is used to convert the training data features into time series features, and divide the time series features into multiple subsequence features;

[0164] The processing unit 802 is further used to determine the statistical index of each subsequence feature, and determine the patch of the energy consumption prediction model according to the statistical index;

[0165] The processing unit 802 is further used to obtain an energy consumption prediction model through training according to the patch and training data features; the energy consumption prediction model is used to predict the energy consumption of the second device; the second device is of the same device type as the first device.

[0166] Optionally, the communication unit 801 is specifically configured to:

[0167] Acquire historical energy consumption data of the first device, historical environment data of the first device, and historical operating status of the first device; the historical operating status of the first device includes operating status in different historical time periods;

[0168] Normalizing the historical energy consumption data of the first device, the historical environment data of the first device, and the numerical features in the historical operating state of the first device, and performing one-hot encoding on the non-numerical features to obtain a plurality of data features;

[0169] Multiple data features are concatenated to obtain training data features.

[0170] Optionally, the energy consumption prediction model is a transformer network model with multiple input channels; among the multiple subsequence features, different subsequence features are used to input into different input channels of the transformer network model.

[0171] Optionally, statistical indicators include: variance, mean, change value, and change rate; the patch satisfies the following formula:

[0172] Variance, μ i is the average value, τ i is the change value, ρ i is the rate of change.

[0173] Optionally, the acquisition unit 801 is further used to acquire the data features to be predicted of the second device; the data features to be predicted include: current energy consumption features for indicating the current energy consumption of the second device, current environment features for indicating the current environment in which the second device is located, and current state features for indicating the current operating state of the second device;

[0174] Optionally, the processing unit 802 is further configured to input the characteristics of the data to be predicted into the energy consumption prediction model to obtain the predicted energy consumption of the second device.

[0175] Optionally, the processing unit 802 is further configured to determine an energy consumption state of the second device according to the predicted energy consumption of the second device and the current energy consumption of the second device.

[0176] Optionally, the first device and the second device are energy-consuming devices in a 5G-A factory, which is an evolved and enhanced version of the fifth generation mobile communication technology.

[0177] An embodiment of the present application further provides a computer-readable storage medium, which includes computer execution instructions. When the computer execution instructions are executed on a computer, the computer executes the energy consumption prediction method provided in the above embodiment.

[0178] An embodiment of the present application also provides a computer program, which 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 consumption prediction method provided in the above embodiment.

[0179] Those skilled in the art should be aware that in one or more of the above examples, the functions described in this application 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 media that facilitates the transmission of computer programs from one place to another. Storage media can be any available media that can be accessed by general or special-purpose computers.

[0180] 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.

[0181] In several embodiments provided in the present 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 only schematic, for example, the division of the modules or units is only 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 coupling or direct coupling or communication connection between each other 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 unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be a physical unit or multiple physical units, that is, it may be located in one place, or it 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.

[0182] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk.

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

Claims

1. A method for predicting energy consumption, characterized in that: include: Obtaining training data features of the first device; The training data features include: historical energy consumption features for representing historical energy consumption of the first device, historical environment features for representing historical environments in which the first device is located, and historical status features for representing historical operating states of the first device; Converting the training data features into time series features, and dividing the time series features into multiple subsequence features; Determine the statistical index of each subsequence feature, and determine the patch of the energy consumption prediction model according to the statistical index; The energy consumption prediction model is obtained by training according to the patch and the training data features; the energy consumption prediction model is used to predict the energy consumption of a second device; the second device is of the same device type as the first device.

2. The energy consumption prediction method according to claim 1, characterized in that: The obtaining of the training data feature of the first device includes: Acquire historical energy consumption data of the first device, historical environment data of the first device, and historical operating status of the first device; the historical operating status of the first device includes operating status in different historical time periods; Normalizing the historical energy consumption data of the first device, the historical environment data of the first device, and the numerical features in the historical operating state of the first device, and performing one-hot encoding on the non-numerical features to obtain a plurality of data features; The multiple data features are concatenated to obtain the training data features.

3. The energy consumption prediction method according to claim 1, characterized in that: The energy consumption prediction model is a transformer network model with multiple input channels; among the multiple subsequence features, different subsequence features are used to be input into different input channels of the transformer network model.

4. The energy consumption prediction method according to claim 1, characterized in that: The statistical indicators include: variance, mean value, change value, and change rate; the statistical indicators for determining the characteristics of each subsequence, and determining the patch of the energy consumption prediction model according to the statistical indicators, include: The patch satisfies the following formula: Among them, p i is the patch, min_patch_size is the minimum patch, α, β, γ are the adjustment coefficients, is the variance, μ i is the average value, τ i is the change value, ρ i is the rate of change.

5. The energy consumption prediction method according to claim 1, characterized in that: The method further comprises: Acquire the data features to be predicted of the second device; the data features to be predicted include: current energy consumption features for indicating the current energy consumption of the second device, current environment features for indicating the current environment in which the second device is located, and current state features for indicating the current operating state of the second device; The characteristics of the data to be predicted are input into the energy consumption prediction model to obtain the predicted energy consumption of the second device.

6. The energy consumption prediction method according to claim 5, characterized in that: Also includes: An energy consumption state of the second device is determined according to the predicted energy consumption of the second device and the current energy consumption of the second device.

7. The energy consumption prediction method according to any one of claims 1 to 6, characterized in that: The first device and the second device are energy-consuming devices in a 5G-A factory, which is an evolved and enhanced version of the fifth generation mobile communication technology.

8. An energy consumption prediction device, characterized in that: include: a communication unit and a processing unit; The communication unit is used to obtain the training data characteristics of the first device; The training data features include: historical energy consumption features for representing historical energy consumption of the first device, historical environment features for representing historical environments in which the first device is located, and historical status features for representing historical operating states of the first device; The processing unit is used to convert the training data features into time series features, and divide the time series features into multiple subsequence features; The processing unit is further used to determine a statistical index of each subsequence feature, and determine a patch of the energy consumption prediction model according to the statistical index; The processing unit is further used to train the energy consumption prediction model according to the patch and the training data features; the energy consumption prediction model is used to predict the energy consumption of a second device; the second device is of the same device type as the first device.

9. An energy consumption prediction device, characterized in that: It includes a memory and a processor; the memory is used to store computer execution instructions, and the processor is connected to the memory through a bus; when the energy consumption prediction device is running, the processor executes the computer execution instructions stored in the memory, so that the energy consumption prediction device executes the energy consumption prediction method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes computer-executable instructions. When the computer-executable instructions are executed on a computer, the computer is enabled to execute the energy consumption prediction method according to any one of claims 1 to 7.

11. A computer program product comprising instructions, characterized in that When the instruction is executed on an energy consumption prediction device, the energy consumption prediction device is enabled to execute the energy consumption prediction method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Factory operation state-based energy consumption simulation and prediction method, system, equipment and medium

    CN120633404A