Air conditioner load prediction method and device, computer equipment and storage medium
Through the artificial intelligence model combining multi-head self-attention mechanism and feedforward neural network structure, combined with working day and holiday data, the problem of low prediction accuracy of air conditioners in the existing technology is solved, and high accuracy is achieved in the case of small data volume Forecast, adapt to changes in users' power usage habits.
Patent Information
- Application Number
- CN202410958148.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-08
AI Technical Summary
The existing air conditioner load prediction methods have low prediction accuracy when the data volume is small, and various influencing factors cannot be effectively considered, especially holiday factors, which leads to inaccurate prediction results.
Adopt artificial intelligence models, including input layer, Transformer block, convolutional layer, global average pooling layer, fully connected layer and output layer, use multi-head self-attention mechanism and feedforward neural network structure, and train the model in combination with working day and holiday data. , identify peak electricity consumption periods, and improve prediction accuracy through abnormal point detection and standardized processing.
In the case of small amount of data, we can identify the peak electricity consumption period with high accuracy, dynamically correct the prediction error, improve the accuracy and robustness of air conditioner load prediction, and adapt to changes in user electricity usage habits.
Smart Images

Figure CN118912649A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of air conditioning technology, and in particular to an air conditioning load prediction method, device, computer equipment and storage medium. Background Art
[0002] Existing air-conditioning load forecasting includes time series method, regression analysis method and grey prediction method; time series method is to establish sample data and data model structure by analyzing historical air-conditioning load data over a period of time to realize air-conditioning load forecasting, but it cannot consider the changes of various influencing factors and has low prediction accuracy; grey prediction method is to use grey system theory to predict future air-conditioning load, and its accuracy is also low; regression analysis method is to establish the relationship between the dependent variable parameters and independent variable parameters of air-conditioning load data and list the regression equation. Although its accuracy is higher than that of time series method and grey prediction method, it requires a lot of data support and has high requirements on the accuracy and completeness of the data. Summary of the invention
[0003] The present application provides an air conditioning load prediction method, device, computer equipment and storage medium, which can identify the peak power consumption period with a small amount of data and achieve high-precision air conditioning load prediction.
[0004] In a first aspect, an embodiment of the present application provides an air conditioning load prediction method, comprising:
[0005] Obtain historical air-conditioning data of multiple air-conditioners, remove irrelevant features, and obtain air-conditioning load data;
[0006] Classify the air conditioning load data to obtain the weekday load data and holiday load data;
[0007] Get the predicted time of the target air conditioner;
[0008] If the time to be predicted is a working day, the artificial intelligence model is trained based on the working day load data, otherwise the artificial intelligence model is trained based on the holiday load data to obtain the prediction model;
[0009] Among them, the artificial intelligence model includes an input layer, a Transformer block, a convolutional layer, a global average pooling layer, a fully connected layer, and an output layer connected in sequence; the Transformer block includes a multi-head self-attention mechanism and a feedforward neural network structure;
[0010] The load data of the time to be predicted and the target air conditioner are input into the prediction model to obtain the predicted load value.
[0011] Furthermore, the air conditioner historical data includes device identifiers, power data, current data, voltage data, temperature data, operating status, operating hours, energy efficiency rating, device model, production date, installation date, manufacturer, installation location, communication protocol and communication address of multiple air conditioners.
[0012] Furthermore, irrelevant features include a device identifier, a manufacturer, a communication protocol, and a communication address of each air conditioner.
[0013] Furthermore, the method also includes:
[0014] Before training the AI model, outliers in the air conditioning load data are detected and removed.
[0015] Furthermore, the above-mentioned detection and removal of abnormal points of air conditioning load data includes:
[0016] Extracting operating data from the air conditioning load data, where the operating data is power data, voltage data, current data or temperature data, and removing the maximum value and the minimum value from the operating data;
[0017] Calculate the standard deviation and mean of the running data and add them together to get the detection threshold;
[0018] Remove outliers in the running data that are greater than the detection threshold.
[0019] Furthermore, the method also includes:
[0020] After removing the outliers, the average value of the data on both sides of the outliers is calculated as the replacement value of the outliers.
[0021] Furthermore, the method also includes:
[0022] After removing abnormal points, the air conditioning load data is standardized.
[0023] In a second aspect, an embodiment of the present application provides an air conditioning load prediction device, comprising:
[0024] A cleaning module is used to obtain air conditioning historical data of multiple air conditioners, remove irrelevant features, and obtain air conditioning load data;
[0025] A classification module is used to classify the air conditioning load data to obtain the workday load data and holiday load data;
[0026] An acquisition module is used to obtain the time to be predicted of the target air conditioner;
[0027] A training module is used to train the artificial intelligence model based on the load data of the working day when the time to be predicted is a working day, otherwise the artificial intelligence model is trained based on the load data of the holiday to obtain a prediction model;
[0028] Among them, the artificial intelligence model includes an input layer, a Transformer block, a convolutional layer, a global average pooling layer, a fully connected layer, and an output layer connected in sequence; the Transformer block includes a multi-head self-attention mechanism and a feedforward neural network structure;
[0029] The prediction module is used to input the load data of the target air conditioner and the time to be predicted into the prediction model to obtain the predicted load value.
[0030] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the air conditioning load prediction method of any of the above embodiments are performed.
[0031] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the air conditioning load prediction method as in any of the above embodiments.
[0032] In summary, compared with the prior art, the technical solution provided in the embodiment of the present application has at least the following beneficial effects:
[0033] An air-conditioning load prediction method provided in an embodiment of the present application takes into account the influence of holidays when training an artificial intelligence model. At the same time, the multi-head self-attention mechanism in the artificial intelligence model can focus on different parts of the sequence data, especially the capture of long-distance dependencies. Through this mechanism, peak electricity consumption periods can be identified when the amount of data is small, thereby correspondingly increasing the prediction strength for this time period and assigning a higher weight, so as to better fit the actual data, remember the user's electricity usage habits, dynamically correct the prediction error and tune the model parameters, and achieve high-precision air-conditioning load prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A flowchart of an air conditioning load prediction method provided for an exemplary embodiment of the present application.
[0035] Figure 2 A structural diagram of an artificial intelligence model provided for an exemplary embodiment of the present application.
[0036] Figure 3 A structural diagram of an air conditioning load prediction device provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0038] Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of this application.
[0039] See also Figure 1 , the embodiment of the present application provides an air conditioning load prediction method, comprising:
[0040] Step S1, acquiring air conditioning historical data of a plurality of air conditioners, removing irrelevant features, and obtaining air conditioning load data.
[0041] Among them, the air conditioning historical data is read from the load interaction platform database. The air conditioning historical data includes the device identifiers, power data, current data, voltage data, temperature data, operating status, operating hours, energy efficiency level, equipment model, production date, installation date, manufacturer, installation location, communication protocol and communication address of multiple air conditioners.
[0042] The irrelevant features include the device identifier, manufacturer, communication protocol and communication address of each air conditioner.
[0043] Specifically, the device identifier is an identifier used to uniquely identify a specific air conditioner; the power data is the power consumption of the air conditioner when the data is collected, in kilowatts (kW); the current data is the current of the air conditioner, in amperes (A); the voltage data is the power supply voltage of the air conditioner, in volts (V); the temperature data is the indoor / or outdoor air conditioning ambient temperature, in degrees Celsius (℃); the operating status includes on, off, cooling, heating, etc.; the operating time is the operating time of the air conditioner when the data is collected, in hours; the installation date is the date when the air conditioner is installed at the corresponding location; the manufacturer includes the name and contact information of the air conditioner manufacturer; the installation location is the specific installation location of the air conditioner, such as: building floor, room number; the communication address is the network address of the air conditioner.
[0044] In the specific implementation process, the collection of temperature data is based on weather factors, and the collection of installation location data is based on regional factors, so that the prediction model can take into account different influencing factors of the target air conditioner and improve the prediction accuracy.
[0045] Step S2, classifying the air conditioning load data to obtain weekday load data and holiday load data.
[0046] Specifically, the power data, current data, voltage data, temperature data, operating status, etc. obtained above all include a timestamp when the corresponding data is obtained, so as to facilitate the classification of various data into holidays and working days.
[0047] Step S3, obtaining the time to be predicted of the target air conditioner.
[0048] Step S4: if the time to be predicted is a working day, the artificial intelligence model is trained based on the working day load data; otherwise, the artificial intelligence model is trained based on the holiday load data to obtain a prediction model.
[0049] Among them, the artificial intelligence model includes an input layer, Transformer block, convolution layer, global average pooling layer, fully connected layer and output layer connected in sequence; the Transformer block includes a multi-head self-attention mechanism and a feedforward neural network structure.
[0050] See also Figure 2 , the artificial intelligence model can use TensorFlow and Keras. The Transformer block uses the multi-head self-attention mechanism and feedforward neural network structure to effectively process time series data. In particular, the multi-head self-attention mechanism can focus on different parts of the data, especially the capture of long-distance dependencies, which is very important in time series prediction. Through this mechanism, historical data features can be obtained to identify which time period in a day is the peak period of electricity consumption, so as to increase the prediction strength of this time period accordingly and give it a higher weight, so as to better fit the real data.
[0051] Step S5, inputting the load data of the target air conditioner and the time to be predicted into the prediction model to obtain the predicted load value.
[0052] The load data of the target air conditioner are also various types of data in the above-mentioned air conditioner load data.
[0053] The above-mentioned embodiment provides an air-conditioning load prediction method, which takes into account the influence of holidays when training the artificial intelligence model. At the same time, the multi-head self-attention mechanism in the artificial intelligence model can focus on different parts of the sequence data, especially the capture of long-distance dependencies. Through this mechanism, the peak electricity consumption period can be identified when the amount of data is small, thereby correspondingly increasing the prediction strength for this time period and assigning a higher weight, so as to better fit the actual data, remember the user's electricity consumption habits, dynamically correct the prediction error and tune the model parameters, and achieve high-precision air-conditioning load prediction.
[0054] In some embodiments, the method further comprises:
[0055] Before training the AI model, outliers in the air conditioning load data are detected and removed.
[0056] Specifically, operating data is extracted from the air-conditioning load data, where the operating data is power data, voltage data, current data or temperature data, and the maximum and minimum values in the operating data are removed; the standard deviation and the average value of the operating data are calculated and added to obtain a detection threshold; and abnormal points in the operating data that are greater than the detection threshold are removed.
[0057] Furthermore, after removing the outlier, the average value of the data on both sides of the outlier can be calculated as a replacement value of the outlier.
[0058] The above-mentioned embodiment can ensure that no abnormal air-conditioning data will appear in the training data through the detection, removal and filling of abnormal points, and can improve the accuracy and robustness of the air-conditioning load power prediction model.
[0059] In some embodiments, the method may further include:
[0060] After removing abnormal points, the air conditioning load data is standardized.
[0061] Specifically, MinMaxScaler can be used to standardize features and labels, avoiding the errors that may be caused by different dimensions in the air-conditioning load prediction model, making the training of the air-conditioning load power prediction model more efficient and accurate.
[0062] See also Figure 3 Another embodiment of the present application provides an air conditioning load prediction device, comprising:
[0063] The cleaning module 101 is used to obtain air-conditioning historical data of multiple air-conditioners, remove irrelevant features, and obtain air-conditioning load data.
[0064] The classification module 102 is used to classify the air conditioning load data to obtain the workday load data and the holiday load data.
[0065] The acquisition module 103 is used to acquire the time to be predicted of the target air conditioner.
[0066] The training module 104 is used to train the artificial intelligence model based on the load data of the working day when the time to be predicted is a working day, otherwise the artificial intelligence model is trained based on the load data of the holiday to obtain a prediction model.
[0067] Among them, the artificial intelligence model includes an input layer, Transformer block, convolution layer, global average pooling layer, fully connected layer and output layer connected in sequence; the Transformer block includes a multi-head self-attention mechanism and a feedforward neural network structure.
[0068] The prediction module 105 is used to input the load data of the target air conditioner and the time to be predicted into the prediction model to obtain the predicted load value.
[0069] In some embodiments, the apparatus may further include:
[0070] The abnormal point detection module is used to detect and remove abnormal points in air conditioning load data.
[0071] In some embodiments, the apparatus may further include:
[0072] A standardization module is used to standardize the air conditioning load data after removing the abnormal points.
[0073] The specific limitations on an air conditioning load prediction device provided in this embodiment can be found in the above embodiment on an air conditioning load prediction method, which will not be repeated here.
[0074] Each module in the above-mentioned air conditioning load prediction device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0075] An embodiment of the present application provides a computer device, which may include a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the processor executes the steps of an air conditioning load prediction method as in any of the above embodiments.
[0076] The working process, working details and technical effects of the computer equipment provided in this embodiment can be found in the above embodiment of an air conditioning load prediction method, which will not be described in detail here.
[0077] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of an air conditioning load prediction method as in any of the above embodiments are implemented. The computer-readable storage medium refers to a carrier for storing data, which may include but is not limited to a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash drive and / or a memory stick, etc. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The working process, working details and technical effects of the computer-readable storage medium provided in this embodiment can be found in the above embodiment of an air conditioning load prediction method, and will not be repeated here.
[0078] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0079] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0080] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for predicting air conditioning load, characterized in that: include: Obtain historical air-conditioning data of multiple air-conditioners, remove irrelevant features, and obtain air-conditioning load data; Classifying the air conditioning load data to obtain workday load data and holiday load data; Get the predicted time of the target air conditioner; If the time to be predicted is a working day, the artificial intelligence model is trained based on the working day load data, otherwise the artificial intelligence model is trained based on the holiday load data to obtain a prediction model; The artificial intelligence model includes an input layer, a Transformer block, a convolutional layer, a global average pooling layer, a fully connected layer and an output layer connected in sequence; the Transformer block includes a multi-head self-attention mechanism and a feedforward neural network structure; The load data of the time to be predicted and the target air conditioner are input into the prediction model to obtain a predicted load value.
2. The air conditioning load prediction method according to claim 1, characterized in that: The air conditioner history data includes device identifiers, power data, current data, voltage data, temperature data, operating status, operating time, energy efficiency rating, device model, production date, installation date, manufacturer, installation location, communication protocol and communication address of multiple air conditioners.
3. The air conditioning load prediction method according to claim 2, characterized in that: The irrelevant features include a device identifier, a manufacturer, a communication protocol and a communication address of each of the air conditioners.
4. The air conditioning load prediction method according to claim 2, characterized in that: Also includes: Before training the artificial intelligence model, abnormal points in the air-conditioning load data are detected and removed.
5. The air conditioning load prediction method according to claim 4, characterized in that: The detecting and removing of abnormal points of the air conditioning load data includes: Extracting operation data from the air-conditioning load data, where the operation data is the power data, the voltage data, the current data or the temperature data, and removing the maximum value and the minimum value from the operation data; Calculating the standard deviation and the mean value of the running data, and adding them together to obtain a detection threshold; Abnormal points in the operating data that are greater than the detection threshold are removed.
6. The air conditioning load prediction method according to claim 5, characterized in that: Also includes: After removing the outlier, the average value of the data on both sides of the outlier is calculated as the replacement value of the outlier.
7. The air conditioning load prediction method according to claim 4, characterized in that: Also includes: After removing the abnormal points, the air conditioning load data is standardized.
8. An air conditioning load prediction device, characterized in that: include: A cleaning module is used to obtain air conditioning historical data of multiple air conditioners, remove irrelevant features, and obtain air conditioning load data; A classification module, used to classify the air conditioning load data to obtain workday load data and holiday load data; An acquisition module is used to obtain the time to be predicted of the target air conditioner; A training module, used for training the artificial intelligence model based on the load data of the working day when the time to be predicted is a working day, otherwise, training the artificial intelligence model based on the load data of the holiday to obtain a prediction model; The artificial intelligence model includes an input layer, a Transformer block, a convolutional layer, a global average pooling layer, a fully connected layer and an output layer connected in sequence; the Transformer block includes a multi-head self-attention mechanism and a feedforward neural network structure; The prediction module is used to input the load data of the time to be predicted and the target air conditioner into the prediction model to obtain a predicted load value.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the air conditioning load prediction method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the air conditioning load prediction method according to any one of claims 1 to 7 are implemented.
