Target equipment control method and device, electronic equipment and storage medium
By adopting the target fusion model in the cold/heat station system, combining long-term and short-term models, the problem of inaccurate prediction of the existing inter-cold/heat station system in the existing technology is solved, and a more accurate prediction of cold/heat demand is achieved. and equipment control reduces energy consumption.
Patent Information
- Application Number
- CN202411312642.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-14
Smart Images

Figure CN119310844A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of device control technology, and in particular to a control method, device, electronic device and storage medium for a target device. Background Art
[0002] The temperature control system of cold station and hot station is widely used in public places such as shopping malls. With the increase of urbanization and commercial activities, the energy consumption of public places such as shopping malls has received increasing attention. Traditional cold station systems usually use temperature adjustment methods based on manual experience and simple feedback control. These methods rely on fixed parameter settings and manual adjustments, but this may lead to energy waste and inaccurate temperature control.
[0003] At present, some advanced cold station systems use computer-based control systems. These systems collect data such as indoor and outdoor temperature and humidity through sensors, and automatically adjust the operating status of the cold station equipment according to preset control logic. In this way, the cold station equipment can automatically respond to environmental changes and perform control to a certain extent. However, the existing technology still has limitations on the real-time changes in equipment control. In particular, the existing technology is difficult to accurately respond to sudden environmental changes, resulting in inaccurate system prediction results. Summary of the invention
[0004] In view of this, the present application provides a control method, apparatus, electronic device and storage medium for a target device to solve the problem of inaccurate system prediction results in the prior art.
[0005] In a first aspect of the present application, a control method for a target device is provided, comprising: collecting current operating parameters of the target device, cleaning the current operating parameters, and obtaining current operating characteristics; inputting the current operating characteristics into a target fusion model for processing to obtain a demand forecast value for the target device to work in the next cycle, wherein the target fusion model comprises a target long-term model and a target short-term model, wherein the target long-term model is obtained by training based on long-term data, wherein the long-term data represents the historical operating data of the target device within a preset historical time period, and the target short-term model comprises historical short-term models arranged in chronological order, wherein the adjacent historical short-term model is obtained by training the adjacent historical short-term model based on the short-term data, and the short-term data is the historical operating data obtained when training the current historical short-term model; based on the demand forecast value, the control parameters of the target device are determined, and based on the control parameters, the operation of the target device is controlled.
[0006] According to a second aspect of the present application, a control device for a target device is provided, including: an acquisition module, configured to acquire current operating parameters of the target device, clean the current operating parameters, and obtain current operating characteristics; a prediction module, configured to input the current operating characteristics into a target fusion model for processing, and obtain a demand prediction value for the target device to work in the next cycle, the target fusion model includes a target long-term model and a target short-term model, the target long-term model is obtained by training based on long-term data, the long-term data represents the historical operating data of the target device within a preset historical time period, the target short-term model includes historical short-term models arranged in chronological order, and the adjacent historical short-term model is obtained by training the adjacent historical short-term model based on short-term data, and the short-term data is the historical operating data obtained when training the current historical short-term model; the control module is configured to determine the control parameters of the target device based on the demand prediction value, and control the operation of the target device based on the control parameters.
[0007] According to a third aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0008] According to a fourth aspect of the present application, a storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0009] At least one of the above technical solutions adopted in this application can achieve the following beneficial effects:
[0010] By collecting the current operating parameters of the target device, standardizing and characterizing the current operating parameters to obtain the current operating characteristics, and inputting the current operating characteristics into the pre-trained target fusion model for processing, the demand forecast value of the target device in the next cycle can be obtained based on the current operating characteristics. Then, based on the demand forecast value of the work, the control parameters of the device are calculated, and the target device is controlled to operate based on the control parameters. The target fusion model includes a long-term model and a short-term model for long-term prediction and short-term prediction. The long-term model can capture the overall operating rules and trends of the target device within a preset time period and provide robust predictions. The short-term model is trained based on short-term data and can quickly respond to recent environmental changes or changes in equipment parameters to ensure the sensitivity and rapid response capabilities of the system. In this way, based on the combination of long-term and short-term models, the overall trend prediction capability of the long-term model and the rapid response capability of the short-term model can be integrated, so that the fusion model can provide more comprehensive and accurate prediction results when facing demand changes in different situations, and adjust the parameters through the demand forecast value obtained by accurate prediction so that the target device can still operate stably and efficiently when facing environmental mutations. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0012] Figure 1 It is a flowchart of a control method of a target device provided in an embodiment of the present application;
[0013] Figure 2 is a flow chart of another method for controlling a target device provided in an embodiment of the present application;
[0014] Figure 3 is a flow chart of another method for controlling a target device provided in an embodiment of the present application;
[0015] Figure 4 is a structural schematic diagram of a control device of a target device provided in an embodiment of the present application;
[0016] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0018] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0019] In addition, it should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "includes..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0020] The present application scheme is a means of predicting the work demand forecast value of the target equipment, which can be applied in various fields. For example, in industrial production and manufacturing, by analyzing historical data and real-time sensor data, the work demand of equipment can be predicted to help prevent equipment failure and improve productivity; in energy management, the work demand of cooling equipment (such as cold stations) or heating equipment (such as hot stations) can be predicted to optimize the operation of the equipment.
[0021] Existing cold stations and hot stations usually use a single prediction model, which is difficult to capture the complex relationship between indoor and outdoor environmental parameters and cooling load demand, resulting in large errors in the prediction of cooling and heating demand. The expressive power of the traditional single model is limited and cannot fully explore the nonlinear relationship between the original input data and the prediction results, which limits the overall prediction performance. In addition, the existing methods do not fully utilize the diversity of various types of basic models, and cannot take advantage of ensemble learning to improve the prediction file line. Under the existing single model, it is difficult to respond to changes in indoor and outdoor environments or internal system failures and make adaptive adjustments, thereby affecting the stability and reliability of the system. This application uses the cold / hot station as an example to illustrate the control method of the target device.
[0022] A method and apparatus for controlling a target device according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0023] Figure 1 FIG. 1 is a flow chart of a method for controlling a target device provided in an embodiment of the present application. Figure 1 As shown, the control method of the target device includes:
[0024] S101, collecting current operating parameters of the target device, cleaning the current operating parameters, and obtaining current operating characteristics.
[0025] S102, input the current operation characteristics into the target fusion model for processing to obtain the demand forecast value of the target device in the next cycle. The target fusion model includes a target long-term model and a target short-term model. The target long-term model is trained based on long-term data. The long-term data represents the historical operation data of the target device in a preset historical time period. The target short-term model includes historical short-term models arranged in chronological order, and the adjacent historical short-term model is trained based on the short-term data for the adjacent historical short-term model. The short-term data is the historical operation data obtained when training the current historical short-term model.
[0026] Among them, the historical operating data corresponding to the long-term data and the short-term data can include historical operating parameters (i.e., historical environmental parameters and historical working parameters) and historical control parameters. The short-term data for training the short-term model can be the historical operating data within a short-term time period. The short-term time period is described in detail below.
[0027] S103, determining control parameters of the target device based on the demand forecast value, and controlling the operation of the target device based on the control parameters.
[0028] Specifically, the current operating parameters of the target device (such as a cold / hot station) can be first obtained, and the current operating parameters can be cleaned to obtain the current operating characteristics. The current operating parameters can include environmental parameters and equipment working parameters, and the environmental parameters and equipment working parameters can be cleaned (for example, filtering noise, removing missing values, detecting outliers, standardizing categorical variables, etc.). After that, the current motion characteristics can be input into the target fusion model, and the target long-term model and the target short-term model in the target fusion model can be used to calculate the demand forecast value of the target device in the next cycle (that is, the amount of cold / heat that needs to be output by the cold / hot station to achieve a specific effect or temperature in the next cycle). After obtaining the demand forecast value, the device parameters are calculated based on the demand forecast value, and the control parameters that need to be debugged for the cold / hot station to reach the demand forecast value in the next cycle are calculated, and then the operation of the cold / hot station is controlled based on the control parameters.
[0029] It should be understood that the "next cycle" can be set based on the adaptability of the target device to the specific working environment. For example, when the target device is a refrigeration station in a shopping mall and the equipment status update cycle is 1 hour, the "next cycle" can be based on the next hour from the current moment. At this time, the demand forecast value is the amount of cooling that the refrigeration station needs to output to meet the appropriate working needs within the next hour.
[0030] The specific cooling demand can be obtained from the current operating parameters and comprehensively predicted through the target fusion model, so that the long-term operating rules and short-term changes can be captured through the target long-term model and the target short-term model respectively.
[0031] The structure of the long-term model can be a decision tree, which is then trained using all historical data of the target device in the past 1-2 years to obtain a target long-term model that can capture long-term trends and periodic characteristics. The target short-term model can include multiple historical short-term models arranged in chronological order, with the most recent historical short-term model arranged as the model in the front, and the historical short-term model from a long time ago arranged as the model in the back. The target short-term model can be integrated from multiple historical short-term models, which can not only reflect environmental changes in different time periods, but also improve the stability of the overall prediction.
[0032] According to the solution provided by the above embodiment, by acquiring the current operating parameters of the target device, the current operating parameters are cleaned to obtain the current operating characteristics, and then the current operating characteristics are input into the target long-term model and the target short-term model to predict the work demand and obtain the demand prediction value. The control parameters of the target device are calculated based on the demand prediction value, and then the operation of the target device is controlled based on the control parameters. In this way, the target fusion model can not only capture the long-term operating laws and trends of the target device, but also help the target device to quickly respond to recent changes. By integrating multiple historical short-term models to obtain the target short-term model, it can help the target device to adjust and optimize the device operating status in real time, which can improve the reliability and stability of the target device operation system, thereby improving the accuracy of the demand prediction value.
[0033] In some embodiments, the target short-term model includes a preset number of historical short-term models, and the adjacent historical short-term model is obtained by training the adjacent historical short-term model based on short-term data, including: obtaining short-term data, the short-term data including a short-term training set and a short-term verification set; using the short-term training set to train the first historical short-term model to obtain the trained first historical short-term model, and using the short-term verification set to verify the trained first historical short-term model to obtain a second historical short-term model, the first historical short-term model represents the adjacent historical short-term model, and the second historical short-term model represents the adjacent historical short-term model; wherein, when the second historical short-term model is obtained, the target short-term model is updated to obtain a new target short-term model, and the new target short-term model represents a preset number of historical short-term models including the second historical short-term model.
[0034] Specifically, the target short-term model may include a preset number of historical short-term models, each of which can be trained based on the same model structure, that is, a short-term model structure is selected, trained, and the preset number of short-term models that meet the requirements are integrated to obtain the target short-term model. First, a suitable short-term model can be selected from the model library and applied to the control system of the target device. This process can be selected by the operator based on experience. The model library includes but is not limited to: artificial neural network model (such as Multi-Layer Perceptron, MLP), gradient boosting algorithm (such as Light Gradient Boosting Machine, LightGBM or eXtreme Gradient Boosting, XGBoost), decision tree (such as Classification and Regression Trees, CART), etc. After selecting the short-term model structure, the selected model structure is trained as a short-term model, and the trained short-term models that meet the preset conditions are integrated as historical short-term models to obtain the target short-term model. The preset condition indicates that the preset number (for example, 7) of historical short-term models closest to the current time are integrated to obtain the target short-term model, and the historical short-term model closest to the current time can be understood as the short-term model applied in the model update cycle at that time.
[0035] It should also be noted that the short-term model can be updated regularly, for example, the short-term data corresponding to the current time can be trained regularly every day to obtain a new short-term model.
[0036] The short-term data can be all the data of the target device in the last 22 days (i.e., a short-term time period), including the data from the 22nd day to the 2nd day as short-term training data, and the data from the previous day as short-term verification data. The short-term model is automatically trained at a fixed time point every day, and the short-term model before training (i.e., the first historical short-term model) is replaced to obtain a new short-term model (i.e., the second historical short-term model). The short-term models trained in the last 7 days are integrated to obtain the target short-term model. The short-term models of the last 7 days are respectively 7 historical short-term models. Of course, it is possible that the effect of the short-term model after training is not as good as the prediction effect of the short-term model before training. In this case, the short-term model before training will continue to be used. At this time, it can be considered that the same short-term model is used for two consecutive days. The short-term models of the past 7 days are still included in the target short-term model, but the short-term models of two of them are the same.
[0037] It should be noted that the acquired short-term data can be adaptively adjusted based on the specific situation. For example, if the target device has not been running in the past 22 days, you can obtain longer data. If there is no longer data, then directly apply the short-term model, and use the previous day's historical operation data for training on the next day. After the target device has been running for 21 days, obtain the past 21 days of data as short-term data for training, and integrate the historical short-term model of the target short-term model. Similarly, when the update does not obtain a sufficient number of historical short-term models, all recent short-term models will be integrated. After the update obtains a preset number of historical short-term models, the target short-term model will only contain the most recent preset number of historical short-term models.
[0038] Furthermore, when training the short-term model, the acquired short-term data can be divided into a short-term training set and a short-term verification set. For example, the short-term data of the past 22 days can be obtained, and the data from the previous 22 to the previous 2 days can be used as the short-term training set, and the data from the previous 1 day can be used as the short-term verification set. The short-term training set is used to train the currently applied short-term model to obtain the trained short-term model, and the short-term verification set is used to train the trained short-term model to obtain a new short-term model. The pre-trained short-term model in the system is replaced with the new short-term model. Of course, this satisfies the requirement that the prediction effect of the new short-term model is better than that of the pre-trained short-term model.
[0039] According to the solution provided in the above embodiment, by dividing short-term data into a short-term training set and a short-term validation set, the generalization ability of the model can be evaluated through the validation set to avoid overfitting. The short-term training set can enable the short-term model to learn the short-term changes in the data and then respond to short-term changes in the environment or target equipment. Integrating multiple historical short-term models to obtain a target short-term model can increase the robustness of the short-term model while capturing the latest patterns and trends of the data, thereby improving the accuracy and reliability of the target short-term model prediction.
[0040] In some embodiments, the target long-term model is obtained based on long-term data training, including: constructing an initial long-term model, adjusting the parameters of the initial long-term model using a preset method, and obtaining the adjusted initial long-term model; acquiring long-term data, the long-term data including a long-term training set and a long-term validation set; using the long-term validation set to train the adjusted initial long-term model to obtain the trained initial long-term model, and using the long-term validation set to evaluate the trained initial long-term model to obtain the target long-term model.
[0041] Specifically, the target long-term model can also select a suitable algorithm or structure (such as decision tree, random forest, support vector machine, neural network, etc.) from the model library as the initial long-term model, and use the long-term data to train the initial long-term model, and the target long-term model can only include one long-term model. The choice of the initial long-term model architecture can be based on the problem requirements. For example, if high precision is required, neural network, gradient boosting tree, etc. can be selected. If high interpretability is required, decision tree, linear regression, etc. can be selected. Other factors such as data characteristics can also be combined for selection, which are not limited here.
[0042] It should be understood that before model training, the initial long-term model can also be adjusted using a preset method to obtain the best hyperparameter combination. For example, the cross-validation method can be used: divide the long-term data into multiple subsets, use one of the subsets for validation, and the other subsets for training, and evaluate the average performance of the model, or the grid search method can be used: define the search range of the hyperparameters, exhaust all possible combinations, and evaluate the performance of each combination, which can find the hyperparameter combination that can optimize the performance of the initial long-term model.
[0043] Furthermore, the long-term data can be used to train the initial long-term model after parameter adjustment. The long-term data can be all the historical operation data of the target device in 1-2 years. The historical operation data of the past 1-2 years can be used as the long-term data for training the long-term model. The long-term data can also be divided into a long-term training set and a long-term verification set. For example, the data in the past 2 years based on the current time is used as the training set, and the data in the past 1 year is used as the verification set. The initial long-term model after parameter adjustment is trained and evaluated. When the long-term verification set is used to verify the trained initial long-term model, it can be verified based on the root mean square error or the mean absolute error. The root mean square error can be used to measure the root mean square of the square root error between the predicted value and the true value to reflect the actual size of the error; the mean absolute error can be used to measure the average value of the absolute error between the predicted value and the true value to reflect the average level of the error. Of course, verification can also be performed based on other verification methods. After verification, the target long-term model can be obtained, so that the target long-term model can be used to predict the long-term trend of the target device and help the system obtain accurate demand forecast values.
[0044] It should also be noted that after obtaining the target long-term model, an error analysis can be performed on the target long-term model to understand the circumstances under which the target long-term model performs poorly, analyze the source of the error, and improve the target long-term model based on the error analysis results. There is no restriction here.
[0045] According to the solution provided in the above embodiment, the initial long-term model can be trained by acquiring long-term data, and the parameters of the initial long-term model can be tuned before training, so that the initial long-term model can find the optimal hyperparameter combination to improve model performance, so that the performance of the model on different data sets is more stable and better, and then the initial long-term model after parameter adjustment is trained to obtain the target long-term model, so that the target long-term model can accurately capture the long-term trends and periodic characteristics of the system, thereby obtaining accurate demand forecast values.
[0046] In some embodiments, the current operating characteristics are input into the target fusion model for processing to obtain a demand forecast value for the target device in the next cycle, including: inputting the current operating characteristics into the target long-term model for processing to obtain a long-term prediction result output by the long-term model; inputting the current operating characteristics into the target short-term model for processing to obtain a prediction result of the target short-term model, the prediction result of the target short-term model includes short-term prediction results output by a preset number of historical short-term models; adding the long-term prediction result to each short-term prediction result according to the target weight ratio to obtain a demand forecast value.
[0047] Specifically, the current operating characteristics can be processed by the target fusion model to obtain the demand forecast value of the target equipment in the next cycle. For example, the current operating characteristics of the cold station equipment are input into the target fusion model to obtain the cold demand forecast result of the cold station in the next cycle (for example, within 1 hour).
[0048] Since the target fusion model is a fusion of the target long-term model and the target short-term model, the current operation characteristics can be input into the target long-term model to obtain the long-term prediction results, and input into the target short-term model to obtain the short-term prediction results output by each historical short-term model. After that, the long-term prediction results and each short-term prediction results are added according to the target weight ratio to obtain the final demand forecast value. The demand forecast value is obtained by comprehensively considering the long-term operation trend and short-term mutation.
[0049] According to the scheme provided by the above embodiment, the prediction results of the long-term model and the short-term model can be weighted and fused to fully utilize the long-term and short-term data characteristics and improve the prediction accuracy. That is, the target short-term model can quickly respond to sudden changes in the environment and operating parameters, while the long-term model can stably capture long-term trends. In this way, the fusion of long-term and short-term models can achieve accurate and adaptive prediction of the target equipment's working requirements.
[0050] In some embodiments, before adding the long-term prediction result and each short-term prediction result according to the target weight ratio to obtain the demand prediction value, it also includes: using the long-term verification set to calculate the prediction error of the target long-term model to obtain the long-term prediction error; using the short-term verification set to calculate the prediction error of each historical short-term model in the target short-term model to obtain the short-term prediction error corresponding to each historical short-term model in the target short-term model; based on a preset initial weight ratio, adding the long-term prediction error and each short-term prediction error to obtain the initial prediction error sum; using a preset optimization algorithm to calculate the target value of the initial prediction error sum, and adjusting the initial weight ratio based on the target value to obtain the target weight ratio.
[0051] Specifically, the target weight ratio can be obtained by calculating the sum of errors of the output results of the target long-term model and the target short-term model and minimizing the sum of errors. The target weight ratio can be understood as the ratio of the corresponding weights of the target long-term model and each historical short-term model, and the sum of the weights is 1.
[0052] First, the initial weight ratio of the target long-term model and each historical short-term model can be set based on experience or prior knowledge. The sum of the initial weight ratios is 1. We can first assume that the target short-term model includes 7 historical short-term models, and the weight of the historical short-term model is w. s1 ,w s2 ,…,w s7 , the weight of the long-term model is w l In this way, the contribution of each historical short-term model and the target long-term model in the fusion prediction can be preliminarily balanced according to the setting of the initial weight ratio.
[0053] Furthermore, the long-term prediction error and short-term prediction error can be obtained by calculating the prediction error of each model on the validation set. Assume that the error of the historical short-term model is expressed as E s1 ,E s2 ,…,E s7 , the long-term prediction error obtained by the target long-term model is expressed as E l , where each error can be calculated by the root mean square error or the mean absolute error.
[0054] Furthermore, the errors can be weighted and fused, and the weights of each model can be adjusted using an optimization algorithm (such as grid search or Bayesian optimization) to minimize the sum of the errors of the weighted prediction results on the validation set, and obtain the optimal weight combination, i.e., the target weight ratio. The error weighted fusion calculation can be expressed as:
[0055]
[0056] Among them, E total It can be expressed as the weighted sum of the errors of each model, wsl
[0057] It can represent the weight value corresponding to the historical short-term model, where i can represent the number of historical short-term models, E si It can represent the short-term forecast error calculated based on the output results of each historical short-term model, w l It can represent the weight of the target long-term model, E l It can represent the long-term forecast error calculated based on the target long-term model output results.
[0058] After obtaining the optimal target weight ratio, the prediction performance of the target fusion model can be evaluated again on the validation set, which is the corresponding long-term validation set and short-term validation set.
[0059] According to the scheme provided in the above embodiment, the prediction results of the long-term model and the short-term model can be fused through the optimal weighted average method, which can make full use of the information of long-term trends and short-term changes, improve the accuracy and stability of the prediction, and find the optimal weight combination through the steps of initial weight setting, model error calculation, optimization algorithm selection and weight adjustment, so that the weighted prediction error is minimized. Finally, the performance of the target fusion model is evaluated on the verification set to ensure the efficiency and reliability of the fusion model in practical applications.
[0060] In some embodiments, current operating parameters of the target device are collected, and the current operating parameters are cleaned to obtain current operating characteristics, including: obtaining the current operating parameters in real time, the current operating parameters include current environmental parameters and current operating parameters of the target device; and constructing and standardizing features of the current environmental parameters and the current operating parameters to obtain current operating characteristics.
[0061] Specifically, the current operating parameters of the target device can be acquired in real time through sensors, and feature construction and standardization processing can be performed on the current operating parameters to obtain current operating features.
[0062] Taking the cold / hot station as an example, the current operating parameters may include the current environmental parameters and the current working parameters, wherein the current environmental parameters may include the external environmental conditions of the cold / hot station and the external data involved in the operation process, and capture the impact of environmental changes on the operation of the target equipment in turn, such as time, indoor and outdoor temperature, humidity, traffic, wind speed, weather, etc., and based on this, obtain date and time characteristics, indoor temperature and humidity, wet-bulb temperature, indoor and outdoor temperature difference, etc.
[0063] Working parameters may include data generated and collected during the operation of the cooling station or heating station to reflect the working status and performance of the cooling station or heating station, such as cooling machine power, water pump frequency, cold / hot pipe supply and return water temperature, cold / hot pipe supply and return water pressure, cold / hot pipe supply and return water flow, etc., to obtain cooling capacity data, cumulative 1-hour cooling capacity, cold source system temperature difference characteristics, tilt characteristics, and classification variables. The processing of the above parameters can be based on the following steps:
[0064] 1. Cold / heat negative value truncation: Process the collected cold / heat data and truncate the negative values to zero to ensure the rationality and accuracy of the cold and heat data.
[0065] 2. Construct date and time features: Based on the collected time information, construct additional date and time features, including whether it is a holiday, whether it is a holiday adjustment, the number of days to the holiday, the number of days to the summer solstice (winter solstice), business hours, store opening and closing times, etc. These features can help the model better capture time-related influences.
[0066] 3. Calculate the cumulative cooling / heating volume for one hour: Accumulate the cooling / heating volume data and calculate the cumulative cooling / heating volume per hour to provide more stable characteristics.
[0067] 4. Indoor temperature and humidity electronic design automation (EDA) and statistics, filtering abnormal sensors: Perform exploratory data analysis on indoor temperature and humidity data, extract statistical features, and filter out abnormal sensor data to ensure data accuracy and reliability.
[0068] 5. Calculate wet-bulb temperature: Based on the collected indoor temperature and humidity data, calculate the wet-bulb temperature as an additional feature to more comprehensively reflect the state of the indoor environment.
[0069] 6. Construct indoor and outdoor temperature difference characteristics and cold / heat source system temperature difference characteristics: Construct indoor and outdoor temperature difference characteristics and cold / heat source system temperature difference characteristics to capture the impact of ambient temperature changes on cold / heat loads.
[0070] 7. Processing of skewed features: Processing skewed features may include transformation (such as logarithmic transformation, square root transformation), normalization or truncation to ensure the stability and availability of the features. For example, if there are features with skewed distribution in the dataset, the skewed distribution may affect the performance of the model and the accuracy of the prediction, so the features can be processed.
[0071] 8. OneHot encoding: OneHot encoding is used to convert categorical variables into numerical features so that they can be processed by machine learning models. Categorical variables can represent categories or classification information, such as seasons, operating modes, equipment types, etc. OneHot encoding can be performed on them to convert each category into a binary feature with a feature value of 0 or 1. Of course, other encoding methods can also be selected based on other data types, such as label encoding, target encoding, etc. This allows the features to be effectively utilized.
[0072] In some embodiments, based on the demand prediction value, the control parameters of the target device are determined, including: inputting the demand prediction value into the control strategy generation module for processing to obtain the control parameters; then, controlling the operation of the target device based on the control parameters, and storing the demand prediction value in the database in the form of a time series.
[0073] Specifically, the final demand prediction value can be input into the control strategy generation module to obtain the control parameters of the target device. The control parameters may include the start-up time, operation mode, power setting, etc. of the target device to meet the corresponding demand prediction value. Based on the generated control parameters, the actual operation of the target device can be controlled to ensure that the target device operates in an appropriate manner at an appropriate time. That is, after finally obtaining the cold / heat demand that the cold / heat station needs to output in the next cycle, the cold / heat demand is sent to the control strategy generation module to obtain the working parameters of the cold / heat station to ensure that the operating parameters can generate sufficient cold / heat demand in the next cycle. It should be understood that if the target device is in the power-on state, the current operating parameters can be obtained regularly (such as once an hour) for prediction, and the target device parameters can be adjusted based on the demand prediction value. If the target device is in the power-off state, the current operating parameters can be obtained at the corresponding time based on the pre-set scheduled power-on operation to control the target device to start up and operate in an appropriate manner.
[0074] Afterwards, the demand forecast value can be stored in the database in the form of a time series, so that the stored data can be used for future analysis and optimization. For example, the short-term data and long-term data mentioned above can be extracted from the database based on this storage form.
[0075] According to the above embodiment, by inputting the demand forecast value into the control strategy generation module, the control parameters can be generated more accurately, thereby improving the efficiency and accuracy of the equipment operation. Accurate control and parameters can enable the target equipment to operate in an appropriate manner at the appropriate time, avoiding unnecessary energy consumption. Accurate demand forecasting can also reduce costs. The optimized control strategy can effectively reduce the energy consumption of the equipment, thereby saving costs. Based on this, the process of determining the control parameters through the demand forecast value can significantly improve the operating efficiency and accuracy of the target equipment, save energy, and improve the overall performance of the system through data-driven continuous optimization.
[0076] Figure 2 This is a flow chart of another method for controlling a target device provided in an embodiment of the present application. Figure 2 The embodiments of the present application are described.
[0077] It can be seen that the fusion model is obtained by fusing a long-term model and 7 short-term models. Each model can be selected from the model library, which includes but is not limited to the following models: Lasso, TabNet, Adaboost, CatBoost, Ridge, SVM, RandomForest, LightGBM, Elastic-Net, CART, MLP, and XGBoost.
[0078] After selecting the corresponding long-term model and short-term model respectively, the hyperparameters of each model are tuned, and then the corresponding long-term data or short-term data can be selected for training. The long-term data can be the operation time of the equipment in the last long-term cycle, such as the preset long-term time (for example, 90 days) before the last day of the last heating / cooling of the heating and cooling station. Of course, the long-term data can be divided into a training set and a validation set. For example, the 14 days before the last day of the last long-term cycle are used as a validation set, and the period from 14 days to the 90th day is used as a training set.
[0079] Similarly, the short-term model can select the data of 22 days before the application time of the corresponding short-term model as the short-term data, and use the earliest 21 days as the training set, and the data of the day closest to the current time as the validation set, and the short-term data of the seven models are deduced in the same way. The training set is used for model training, and the validation set is used for performance evaluation, and then the target long-term model and target short-term model are obtained, that is, one long-term model and seven short-term models, and they are fused to obtain the target fusion model, which will not be expanded here.
[0080] Figure 3 This is a flow chart of another method for controlling a target device provided in an embodiment of the present application. Figure 3 Further explanation of this application:
[0081] The algorithm structures corresponding to the long-term model and the short-term model are selected from the model library to obtain the initial long-term model and the initial short-term model, and the parameters of the models are tuned respectively. The target long-term model and the target short-term model are further trained to obtain the target long-term model and the target short-term model, and the target long-term model and the target short-term model are fused based on the target weights determined in the previous article to obtain the target fusion model. The target fusion model is used to process the processed current operating characteristics to obtain the working demand forecast value of the target equipment in the next cycle.
[0082] The current operation characteristics can be obtained by collecting the current operation parameters (i.e., collecting environmental parameters and equipment operation status) through the data acquisition module, and obtaining the environmental parameters and equipment operation status according to the preset processing steps. When the target equipment is a cold / hot station, the environmental parameters may include: indoor and outdoor temperature, human flow, wind force and speed, weather, and the equipment operation status may include: equipment power, water pump frequency, cold / hot pipe supply and return water temperature, cold / hot pipe supply and return water pressure, cold / hot pipe supply and return water flow, and then the data preprocessing module can be used to process the above parameters according to the preset steps, such as: cold / heat negative value truncation; construct date and time characteristics (wherein the date and time characteristics can be obtained based on the comprehensive construction of holiday characteristics, summer / winter solstice days and business hours characteristics, where the business hours characterize the working hours of the cold / hot station equipment operation site, If the cold / hot station is not used in shopping malls, the operating time of the equipment in a fixed time period can be used as the business hours feature); calculate the cumulative cold / hot amount in 1 hour; set the water supply temperature range of the cold / hot pipe; EDA and statistics of indoor humidity; EDA and statistics of indoor temperature; weather data processing; splicing traffic data; calculating wet-bulb temperature; constructing indoor and outdoor temperature difference features; constructing temperature difference features of the cold / hot source system; tilt feature processing; OneHot encoding; in this way, the current operating features are obtained, and the operating features are input into the target fusion model for processing to obtain the online predicted cold / hot demand forecast value of the cold / hot station equipment in the next hour.
[0083] Finally, the operating parameters, operating characteristics, and corresponding work demand forecast values can be input into the database for storage, and the stored data can be used as a training set for updating the model. That is, based on the data accumulation in the database, the short-term model is updated regularly, and obtaining a new short-term model can be understood as obtaining a new target short-term model. Referring to the previous article, the target short-term model includes 7 historical short-term models arranged in chronological order, and each historical short-term model arranged in front is obtained by updating the historical short-term model arranged behind regularly (such as daily) based on short-term data.
[0084] In this way, the corresponding historical short-term model can be obtained by regularly updating the short-term model, that is, the target short-term model, which improves the adaptability and prediction effect of the system. Through the fusion of long-term and short-term models, the ability of the long-term model to capture long-term trends and the ability of the short-term model to make high-precision predictions can be combined, so that the target fusion model can obtain accurate work demand prediction values.
[0085] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0086] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0087] Figure 4 Schematic diagram of a control device of a target device provided in an embodiment of the present application. Figure 4 As shown, the control device of the target device includes:
[0088] The collection module 401 is configured to collect current operating parameters of the target device, clean the current operating parameters, and obtain current operating characteristics;
[0089] The prediction module 402 is configured to input the current operation characteristics into the target fusion model for processing to obtain the demand prediction value of the target device in the next cycle. The target fusion model includes a target long-term model and a target short-term model. The target long-term model is obtained by training based on long-term data. The long-term data represents the historical operation data of the target device in a preset historical time period. The target short-term model includes historical short-term models arranged in chronological order, and the adjacent historical short-term model is obtained by training the adjacent historical short-term model based on the short-term data. The short-term data is the historical operation data obtained when training the current historical short-term model.
[0090] The control module 403 is configured to determine the control parameters of the target device based on the demand prediction value, and control the operation of the target device based on the control parameters.
[0091] In some embodiments, the prediction module 402 is specifically used to obtain the short-term data, which includes a short-term training set and a short-term verification set; the short-term training set is used to train the first historical short-term model to obtain the trained first historical short-term model, and the short-term verification set is used to verify the trained first historical short-term model to obtain a second historical short-term model, the first historical short-term model represents the adjacent historical short-term model, and the second historical short-term model represents the adjacent historical short-term model; wherein, when the second historical short-term model is obtained, the target short-term model is updated to obtain a new target short-term model, and the new target short-term model represents a preset number of historical short-term models including the second historical short-term model.
[0092] In some embodiments, the prediction module 402 is specifically used to construct an initial long-term model, adjust the parameters of the initial long-term model using a preset method, and obtain the adjusted initial long-term model; obtain long-term data, and the long-term data includes a long-term training set and a long-term verification set; use the long-term verification set to train the adjusted initial long-term model to obtain the trained initial long-term model, and use the long-term verification set to evaluate the trained initial long-term model to obtain the target long-term model.
[0093] In some embodiments, the prediction module 402 is specifically used to input the current operating characteristics into the target long-term model for processing to obtain the long-term prediction results output by the long-term model; input the current operating characteristics into the target short-term model for processing to obtain the prediction results of the target short-term model, and the prediction results of the target short-term model include the short-term prediction results output by each historical short-term model; add the long-term prediction results and each short-term prediction results according to the target weight ratio to obtain the demand prediction value.
[0094] In some embodiments, the prediction module 402 is specifically used to use the long-term validation set to calculate the prediction error of the target long-term model to obtain the long-term prediction error; use the short-term validation set to calculate the prediction error of each historical short-term model in the target short-term model to obtain the short-term prediction error corresponding to each historical short-term model in the target short-term model; based on a preset initial weight ratio, add the long-term prediction error and each short-term prediction error to obtain the initial prediction error sum; use a preset optimization algorithm to calculate the target value of the initial prediction error sum, and adjust the initial weight ratio based on the target value to obtain the target weight ratio.
[0095] In some embodiments, the acquisition module 401 is specifically used to obtain current operating parameters in real time, including current environmental parameters and current operating parameters of the target device; and construct and standardize the current environmental parameters and current operating parameters to obtain current operating characteristics.
[0096] In some embodiments, the control module 403 is specifically used to input the demand prediction value into the control strategy generation module for processing to obtain the control parameters; then, the operation of the target device is controlled based on the control parameters, and the demand prediction value is stored in the database in the form of a time series.
[0097] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0098] Figure 5 Schematic diagram of an electronic device 5 provided in an embodiment of the present application. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program 503, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 501 executes the computer program 503, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0099] The electronic device 5 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 5 may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that Figure 5 The electronic device 5 is merely an example and does not limit the electronic device 5 , and may include more or less components than those shown in the figure, or different components.
[0100] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0101] The memory 502 may be an internal storage unit of the electronic device 5, for example, a hard disk or memory of the electronic device 5. The memory 502 may also be an external storage device of the electronic device 5, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. The memory 502 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 502 is used to store computer programs and other programs and data required by the electronic device.
[0102] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, 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 software functional units.
[0103] If the integrated module / 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 storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0104] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for controlling a target device, characterized in that: include: Collecting current operating parameters of the target device, cleaning the current operating parameters, and obtaining current operating characteristics; The current operation characteristics are input into the target fusion model for processing to obtain the demand forecast value of the target device in the next cycle, the target fusion model includes a target long-term model and a target short-term model, the target long-term model is obtained by training based on long-term data, the long-term data represents the historical operation data of the target device in a preset historical time period, the target short-term model includes historical short-term models arranged in chronological order, and the adjacent historical short-term model is obtained by training the adjacent historical short-term model based on the short-term data, and the short-term data is the historical operation data obtained when training the current historical short-term model; Based on the demand prediction value, a control parameter of the target device is determined, and based on the control parameter, the operation of the target device is controlled.
2. The method according to claim 1, characterized in that The target short-term model includes a preset number of historical short-term models, and the adjacent previous historical short-term model is obtained by training the adjacent subsequent historical short-term model based on short-term data, including: Acquire the short-term data, wherein the short-term data includes a short-term training set and a short-term verification set; Using the short-term training set to train a first historical short-term model to obtain a trained first historical short-term model, and using the short-term validation set to validate the trained first historical short-term model to obtain a second historical short-term model, wherein the first historical short-term model represents the adjacent subsequent historical short-term model, and the second historical short-term model represents the adjacent previous historical short-term model; When the second historical short-term model is obtained, the target short-term model is updated to obtain a new target short-term model, and the new target short-term model represents a preset number of historical short-term models including the second historical short-term model.
3. The method according to claim 2, characterized in that The target long-term model is obtained based on long-term data training, including: Constructing an initial long-term model, and adjusting the parameters of the initial long-term model using a preset method to obtain an initial long-term model after parameter adjustment; Acquire the long-term data, wherein the long-term data includes the long-term training set and the long-term validation set; The long-term validation set is used to train the adjusted initial long-term model to obtain the trained initial long-term model, and the long-term validation set is used to evaluate the trained initial long-term model to obtain the target long-term model.
4. The method according to claim 3, characterized in that The step of inputting the current operation characteristics into the target fusion model for processing to obtain a demand forecast value for the target device in the next cycle includes: Inputting the current operation characteristics into the target long-term model for processing to obtain a long-term prediction result output by the long-term model; Inputting the current operation characteristics into the target short-term model for processing to obtain a prediction result of the target short-term model, wherein the prediction result of the target short-term model includes short-term prediction results respectively output by the preset number of historical short-term models; The long-term forecast result and each short-term forecast result are added according to the target weight ratio to obtain the demand forecast value.
5. The method according to claim 4, characterized in that Before adding the long-term prediction result and each of the short-term prediction results according to the target weight ratio to obtain the demand forecast value, the method further includes: Using the long-term validation set, calculating the prediction error of the target long-term model to obtain a long-term prediction error; Using the short-term validation set, calculating the prediction error of each historical short-term model in the target short-term model, and obtaining the short-term prediction error corresponding to each historical short-term model in the target short-term model; Based on a preset initial weight ratio, the long-term prediction error is added to each of the short-term prediction errors to obtain an initial prediction error sum; The target value of the initial prediction error and is calculated using a preset optimization algorithm, and the initial weight ratio is adjusted based on the target value to obtain the target weight ratio.
6. The method according to claim 1, characterized in that The collecting current operating parameters of the target device and cleaning the current operating parameters to obtain current operating characteristics include: Acquire the current operating parameters in real time, wherein the current operating parameters include current environmental parameters and current operating parameters of the target device; The current environmental parameters and the current operating parameters are subjected to feature construction and standardization to obtain the current operating features.
7. The method according to claim 1, characterized in that The determining the control parameter of the target device based on the demand prediction value includes: Inputting the demand forecast value into a control strategy generation module for processing to obtain the control parameter; Afterwards, the target device is controlled to operate based on the control parameters, and the demand forecast value is stored in a database in the form of a time series.
8. A control device for a target device, characterized in that: include: A collection module is configured to collect current operating parameters of the target device, clean the current operating parameters, and obtain current operating characteristics; A prediction module is configured to input the current operation characteristics into a target fusion model for processing to obtain a demand prediction value for the target device to work in the next cycle, wherein the target fusion model includes a target long-term model and a target short-term model, wherein the target long-term model is obtained by training based on long-term data, wherein the long-term data represents the historical operation data of the target device in a preset historical time period, and the target short-term model includes historical short-term models arranged in chronological order, wherein the adjacent historical short-term model is obtained by training the adjacent historical short-term model based on the short-term data, and the short-term data is the historical operation data obtained when training the current historical short-term model; The control module is configured to determine the control parameters of the target device based on the demand prediction value, and control the operation of the target device based on the control parameters.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Battery compartment cycle efficiency prediction method, equipment and medium
CN122345800A