A method for controlling energy-saving equipment based on AI weather prediction

Through AI weather prediction technology and equipment control models, the problem of traditional intelligent equipment systems being unable to respond to weather changes in a timely manner is solved, intelligent and automated indoor environment adjustment is achieved, energy consumption and operating costs are reduced, and equipment life is extended.

CN118423809BActive Publication Date: 2024-10-18SHENZHEN GEMDALE BUILDING ENG CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410879822.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-10-18
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

Traditional smart device systems cannot respond to weather changes immediately, resulting in untimely indoor temperature adjustment, poor user comfort, energy waste and high operating costs.

Method used

AI weather prediction technology is used to collect data through environmental sensors, combined with weather API and user preferences, to train equipment control models, optimize equipment setting parameters, and achieve real-time environmental adjustment.

Benefits of technology

Ensure that the indoor environment is always in the best comfortable state, reduce energy consumption, reduce operating costs, extend equipment life, improve energy utilization efficiency, and promote environmental protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118423809B_ABST
    Figure CN118423809B_ABST
Patent Text Reader

Abstract

The present application relates to the field of AI prediction technology, and discloses a method for controlling energy-saving equipment based on AI prediction of weather. The method includes: collecting multiple indoor environmental parameter data and obtaining user comfort preference parameters; calling the meteorological API interface to obtain and preprocess preprocessed weather data and multiple historical environmental parameter data; training the initial AI model to obtain the equipment control parameter prediction model; calling the equipment control parameter prediction model for prediction to obtain the initial setting parameters; defining the objective function and optimizing the equipment setting parameters; sending the equipment setting parameters to the IoT platform through the cloud business integration system, and adjusting the energy-saving equipment in real time according to the equipment setting parameters to achieve indoor environmental regulation. The present application uses AI to predict the weather and thus improve the control accuracy of energy-saving equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of AI prediction technology, and in particular to a method for controlling energy-saving equipment based on AI weather prediction. Background Art

[0002] In traditional smart device systems, it mainly relies on manual settings or simple timing control by users. This approach has many shortcomings. Manual settings require users to make frequent adjustments, which is cumbersome and cannot respond to weather changes in real time, resulting in untimely indoor temperature adjustment. Secondly, the timing control method is difficult to accurately match the user's comfort needs, which may cause the indoor environment to be too cold or too hot, and the user experience is poor. In addition, due to the inability to adjust flexibly, the device may run unnecessarily for a long time, resulting in energy waste and increased operating costs. Untimely responses and inaccurate settings further affect user comfort.

[0003] Existing equipment control systems are unable to respond immediately and precisely to rapid weather changes, and are unable to provide the best indoor environment. Manual adjustments by users not only increase the complexity and inconvenience of operation, but also fail to guarantee energy-saving effects. These issues lead to poor user experience, high energy consumption, and shortened equipment life. Summary of the invention

[0004] The present application provides a method for controlling energy-saving equipment based on AI weather prediction. The present application uses AI to predict weather and thus improve the control accuracy of energy-saving equipment.

[0005] In a first aspect, the present application provides a method for controlling energy-saving equipment based on AI weather prediction, the method for controlling energy-saving equipment based on AI weather prediction comprising:

[0006] Installing multiple environmental sensors indoors and collecting corresponding multiple indoor environmental parameter data through the multiple environmental sensors, and obtaining user comfort preference parameters through energy-saving equipment;

[0007] The plurality of indoor environment parameter data are transmitted to the IoT platform using a preset communication protocol, and the plurality of indoor environment parameter data are pushed to the cloud business integration system;

[0008] Calling the meteorological API interface to obtain historical weather data, and performing data cleaning and sorting on the historical weather data to obtain pre-processed weather data, and at the same time, obtaining multiple historical environmental parameter data from the cloud business integration system;

[0009] Inputting the preprocessed weather data and the plurality of historical environmental parameter data into a preset initial AI model for model training to obtain a device control parameter prediction model, and deploying the device control parameter prediction model in the cloud business integration system;

[0010] Acquire real-time weather data through the meteorological API interface, and push the real-time weather data to the cloud business integration system, and at the same time, call the device control parameter prediction model to predict the device control parameters of the real-time weather data and the multiple indoor environment parameter data to obtain initial setting parameters;

[0011] Defining an objective function according to the plurality of indoor environment parameter data and the user comfort preference parameters, calculating an optimal device control strategy through an optimization algorithm and optimizing the initial setting parameters to generate corresponding device setting parameters;

[0012] The device setting parameters are sent to the IoT platform through the cloud business integration system, and the energy-saving device is adjusted in real time according to the device setting parameters to achieve indoor environmental regulation.

[0013] In a second aspect, the present application provides a device for controlling energy-saving equipment based on AI weather prediction, and the device for controlling energy-saving equipment based on AI weather prediction includes:

[0014] An acquisition module, used to install multiple environmental sensors indoors and collect corresponding multiple indoor environmental parameter data through the multiple environmental sensors, and to acquire user comfort preference parameters through energy-saving equipment;

[0015] A transmission module, used to transmit the plurality of indoor environmental parameter data to the IoT platform using a preset communication protocol, and push the plurality of indoor environmental parameter data to a cloud business integration system;

[0016] A sorting module is used to call the meteorological API interface to obtain historical weather data, and to clean and sort the historical weather data to obtain pre-processed weather data, and at the same time, to obtain multiple historical environmental parameter data from the cloud business integration system;

[0017] A training module, used for inputting the pre-processed weather data and the plurality of historical environmental parameter data into a preset initial AI model for model training, obtaining an equipment control parameter prediction model, and deploying the equipment control parameter prediction model in the cloud business integration system;

[0018] A prediction module, used to obtain real-time weather data through the meteorological API interface, and push the real-time weather data to the cloud business integration system, and at the same time, call the device control parameter prediction model to predict the device control parameters of the real-time weather data and the multiple indoor environment parameter data to obtain initial setting parameters;

[0019] A generation module, used to define an objective function according to the multiple indoor environment parameter data and the user comfort preference parameters, calculate an optimal device control strategy through an optimization algorithm, optimize the initial setting parameters, and generate corresponding device setting parameters;

[0020] The adjustment module is used to send the device setting parameters to the IoT platform through the cloud business integration system, and adjust the energy-saving device in real time according to the device setting parameters to achieve indoor environmental adjustment.

[0021] The third aspect of the present application provides a computer device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the computer device executes the above-mentioned method of controlling energy-saving equipment based on AI weather prediction.

[0022] In the technical solution provided by this application, the method of controlling energy-saving equipment based on AI weather prediction in this application predicts weather changes through AI and automatically adjusts equipment settings to ensure that the indoor environment is always in the best comfortable state. According to real-time weather data and forecasts, optimize equipment operating time and mode, reduce unnecessary energy consumption, and reduce operating costs. Utilize artificial intelligence and meteorological data to improve the automation and intelligence level of equipment systems and reduce the need for manual operations by users. Through intelligent control and optimized operation, reduce excessive use and wear of equipment and extend the service life of energy-saving equipment. By improving energy utilization efficiency and reducing energy consumption, reduce carbon emissions and promote environmental protection and sustainable development. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 This is a schematic diagram of an embodiment of a method for controlling energy-saving equipment based on AI weather prediction in an embodiment of the present application;

[0025] Figure 2 This is a schematic diagram of an embodiment of a device for controlling energy-saving equipment based on AI weather prediction in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The embodiment of the present application provides a method for controlling energy-saving equipment based on AI weather prediction. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] For ease of understanding, the specific process of the embodiment of the present application is described below. Figure 1 In the embodiment of the present application, an embodiment of the method for controlling energy-saving equipment based on AI weather prediction includes:

[0028] Step 101: Install multiple environmental sensors indoors and collect corresponding multiple indoor environmental parameter data through the multiple environmental sensors, and obtain user comfort preference parameters through energy-saving equipment;

[0029] It is understandable that the execution subject of the present application can be a device for controlling energy-saving equipment based on AI weather prediction, or a terminal or a server, which is not limited here. The embodiment of the present application is described by taking the server as the execution subject as an example.

[0030] Specifically, multiple environmental sensors are installed indoors, including temperature sensors, humidity sensors, air quality sensors, and human infrared sensors. The temperature sensor is used to detect the indoor temperature, the humidity sensor is used to measure the humidity level in the air, the air quality sensor is used to evaluate the concentration of pollutants in the air, and the human infrared sensor is used to monitor the number of people in the room. These sensors work together to obtain multiple environmental sensor data including temperature data, humidity data, air quality data, and number of people data through real-time monitoring. Feature extraction is performed on multiple environmental sensor data to obtain an environmental sensor feature vector set. Vector sets that can represent the main features of the data are extracted from the original data. These feature vector sets contain key information of temperature, humidity, air quality, and number of people. An unsupervised clustering algorithm is used to classify multiple environmental sensor data to obtain sensor data classification results. The unsupervised clustering algorithm is a data classification method that does not require pre-defined category labels. By analyzing the inherent structure of the data, similar feature vectors are clustered into the same category, and finally the classification results of the sensor data are obtained. Based on the sensor data classification results, the multiple environmental sensor data are normalized to obtain multiple indoor environmental parameter data. Normalization processing refers to scaling data at a certain ratio so that it falls within a predetermined range, thereby eliminating the dimensional differences between different data and ensuring the accuracy and stability of subsequent algorithm processing. Through normalization processing, the data of temperature, humidity, air quality and number of people are converted into indoor environmental parameter data in a unified format. At the same time, the user operation log data of energy-saving equipment is preprocessed to obtain processed operation log data. Data preprocessing includes steps such as data cleaning, missing value filling, and outlier detection, aiming to improve the quality and reliability of data. According to the processed operation log data, the user comfort preference pattern is extracted through the pattern recognition algorithm to obtain the user comfort preference pattern set. The pattern recognition algorithm can identify the user's behavior pattern and preference from the historical operation data, analyze the user's operating habits under different environmental conditions, and then extract the user comfort preference pattern. Parameter mapping is performed according to the user comfort preference pattern set to obtain the user comfort preference parameters. The user's preference pattern is converted into specific equipment control parameters, such as temperature setting, humidity adjustment, and wind speed adjustment, to generate an equipment control strategy that meets user needs.

[0031] Step 102: using a preset communication protocol to transmit a plurality of indoor environment parameter data to the IoT platform, and pushing the plurality of indoor environment parameter data to a cloud business integration system;

[0032] Specifically, a plurality of indoor environmental parameter data are converted into data formats to obtain first environmental parameter data. Environmental data of various formats and types are uniformly converted into a predefined standard format to ensure the compatibility and consistency of subsequent processing. The first environmental parameter data is packaged through a preset communication protocol to obtain a packaged environmental parameter data packet. The converted environmental parameter data is encapsulated into a data packet in a certain structure and order for easy transmission and parsing. The packaged environmental parameter data packet is encrypted to obtain an encrypted environmental parameter data packet. A secure communication channel is established according to the communication protocol to obtain a secure communication link, wherein the communication protocol is any one of Wi-Fi, Zigbee, and LoRa. The encrypted environmental parameter data packet is transmitted to the IoT platform through the secure communication link, and the encrypted environmental parameter data packet is decrypted on the IoT platform to obtain a decrypted environmental parameter data packet. After decryption is completed, the decrypted environmental parameter data packet is unpacked on the IoT platform to obtain the unpacked environmental parameter data, and the unpacked environmental parameter data is converted into a data format on the IoT platform to obtain the second environmental parameter data. The purpose of data unpacking and format conversion is to restore the encrypted and packaged data to an initial, processable format. According to the preset data transmission protocol, the second environmental parameter data is pushed to the cloud business integration system on the IoT platform, and the data is stored in the cloud business integration system. The processed environmental parameter data is transmitted to the cloud business integration system to achieve centralized data management and analysis. The cloud business integration system is responsible for storing and managing the received data to facilitate subsequent AI model training and weather forecast analysis.

[0033] Step 103: Call the meteorological API interface to obtain historical weather data, clean and organize the historical weather data to obtain pre-processed weather data, and at the same time, obtain multiple historical environmental parameter data from the cloud business integration system;

[0034] Specifically, according to the required historical weather type and time range, an API request parameter set is constructed, and according to the API request parameter set, the meteorological API interface is called to send a historical weather data request to obtain historical weather data, which includes the temperature, humidity and air temperature of each time period and time point. The Python or Java programming language is used to convert the data format and clean the historical weather data to obtain the converted weather data. The original weather data is converted from the format returned by the API to a unified processing format. Data cleaning is to remove noise and errors in the data to ensure the accuracy and reliability of the data. In the data cleaning process, outlier detection is performed on the converted weather data to obtain an outlier detection result. Outlier detection is to identify unreasonable values ​​in the data, which may be caused by sensor failure or data transmission errors. According to the outlier detection results, the converted weather data is repaired to obtain the repaired weather data. The detected outliers are replaced or interpolated to make the data smoother and more reasonable, avoiding the influence of outliers on subsequent analysis. The repaired weather data is segmented into time series to obtain the segmented weather data set, and the segmented weather data set is normalized to obtain the normalized weather data set. Time series segmentation is to segment the data of a long time span into certain time intervals for short-term prediction and analysis. Data normalization is to scale the data into a standard range to eliminate the differences between different dimensions and improve the effect of model training. According to the required weather elements, the corresponding weather element data is extracted from the normalized weather data set to obtain the weather element data set. Weather element data includes specific parameters such as temperature, humidity and air temperature, which are important inputs for subsequent prediction model training. Feature engineering and data segmentation are performed on the weather element data set to obtain the training data set and the validation data set. Feature engineering is to extract and select features from the data to enhance the expression ability of the data and the generalization ability of the model. Data segmentation is to divide the data set into a training set and a validation set. The training set is used for model training, and the validation set is used for model evaluation. The training data set and the validation data set are output as preprocessed weather data. At the same time, in the embodiment of the present application, it is also necessary to obtain multiple historical environmental parameter data from the cloud business integration system.

[0035] Step 104: input the pre-processed weather data and multiple historical environmental parameter data into a preset initial AI model for model training to obtain a device control parameter prediction model, and deploy the device control parameter prediction model in a cloud business integration system;

[0036] Specifically, according to the characteristic dimensions of the preprocessed weather data and multiple historical environmental parameter data, the AI ​​model architecture is selected to obtain the initial AI model, which is a linear regression model or an LSTM neural network. The linear regression model is suitable for processing simple linear relationship data, while the LSTM neural network is more suitable for processing complex data with time series characteristics. The parameters of the initial AI model are randomly initialized to obtain an AI model with initialized parameters. By assigning random initial values ​​to the model parameters, the model is prevented from falling into a local optimal solution and the effect of model training is improved. Through the preset loss function, the AI ​​model with initialized parameters is trained on the training data set to obtain a training intermediate model. The loss function is used to measure the gap between the model prediction value and the true value. Common loss functions include mean square error, cross entropy, etc. By minimizing the loss function, the model can gradually adjust the parameters to improve the prediction accuracy. After obtaining the training intermediate model, the training intermediate model is evaluated on the validation data set to obtain the model evaluation index. Model evaluation is to test the performance of the model through the validation data set. Common evaluation indicators include accuracy, precision, recall, F1-score, etc. These indicators can comprehensively measure the prediction performance and generalization ability of the model. According to the model evaluation index, the hyperparameters of the training intermediate model are adjusted until the model evaluation index meets the preset conditions, and the equipment control parameter prediction model is obtained. Hyperparameter adjustment refers to optimizing the structure of the model and the control parameters in the training process, such as learning rate, batch size, number of iterations, etc. Through hyperparameter tuning, the performance of the model is improved to achieve the best performance on the validation data set. The equipment control parameter prediction model is compressed to obtain a compressed prediction model, which reduces the complexity of the model and the occupation of computing resources, and improves the operating efficiency of the model in actual deployment. Common compression methods include pruning, quantization, knowledge distillation, etc. Through model compression, the storage and computing costs of the model are significantly reduced, while maintaining a high prediction accuracy. The compressed prediction model is deployed to the cloud business integration system through the model deployment tool. The model deployment tool is used to convert the trained model into a form that can be run in the cloud, and load and call it to achieve real-time prediction and analysis of weather data.

[0037] Step 105: obtain real-time weather data through the meteorological API interface, and push the real-time weather data to the cloud business integration system. At the same time, call the device control parameter prediction model to predict the device control parameters of the real-time weather data and multiple indoor environment parameter data to obtain the initial setting parameters;

[0038] Specifically, a real-time API request parameter set is constructed according to the required real-time weather type and geographic location. By defining the specific real-time weather type and target geographic location, it is ensured that the API request can accurately obtain the required real-time weather information. According to the real-time API request parameter set, the meteorological API interface is periodically called to send a real-time weather data request to obtain real-time weather data. The real-time weather data is converted into a data format to obtain a first weather data stream, and the first weather data stream is cleaned in real time to obtain a second weather data stream. According to the data transmission protocol, the second weather data stream is pushed to the cloud business integration system, and in the cloud business integration system, the second weather data stream is feature engineered to obtain a real-time weather feature set. Feature engineering refers to extracting meaningful features from the original data, which can better describe the inherent laws and changing trends of weather data and multiple indoor environmental parameter data. Through this process, the expression ability of the data is enhanced and the prediction effect of the model is improved. The real-time weather feature set is feature encoded to obtain a coded weather feature set, and the coded weather feature set is vectorized to obtain a coded weather feature vector, and the multiple indoor environmental parameter data are vectorized to obtain a coded environmental parameter vector. Feature encoding is to convert the extracted features into a numerical form suitable for model input, while vector conversion is to convert the encoded features into a vector form to facilitate model calculation and processing. The encoded weather feature vector and the encoded environmental parameter vector are input into the device control parameter prediction model to predict the device control parameters and obtain the model prediction output. The device control parameter prediction model generates a prediction result for future weather conditions by calculating the input weather feature vector and the encoded environmental parameter vector. The rules and patterns learned by the model in the training phase are used to intelligently analyze and predict real-time weather data and multiple indoor environmental parameter data. The model prediction output is post-processed to obtain the initial setting parameters.

[0039] The encoded weather feature vector and the encoded environmental parameter vector are subjected to tensor conversion and feature fusion to obtain input features in the form of tensors. Tensor conversion is to convert the encoded weather feature vector and the encoded environmental parameter vector into a multidimensional array to facilitate the calculation and processing of the model. The input features are passed to the input layer of the device control parameter prediction model, and the input features are nonlinearly transformed according to the hidden layer weight matrix and the hidden layer bias vector in the hidden layer of the device control parameter prediction model to obtain the hidden layer output. The hidden layer transforms the input features by applying nonlinear activation functions such as ReLU or tanh to extract complex features and patterns in the data. The outputs of all hidden layers are calculated in sequence, and the outputs of all hidden layers are used as the inputs of the output layer of the device control parameter prediction model. In each hidden layer, the output is weighted summed by the weight matrix and the bias vector, and then transformed by the nonlinear activation function to obtain the input of the next layer. This process is progressive layer by layer, so that the model can capture the deep-level features and laws in the data. In the output layer of the device control parameter prediction model, the outputs of all hidden layers are weighted summed according to the output layer weight matrix and the output layer bias vector to obtain the model prediction output. The output layer integrates the comprehensive information of the hidden layer and generates the final prediction result through linear transformation. The activation function is calculated on the model prediction output to obtain the activated prediction output, and the activated prediction output is denormalized to obtain the unscaled prediction output. The activation function calculation is a nonlinear transformation of the output layer result to ensure that the prediction value is within a reasonable range, while the denormalization process is to restore the normalized data in the standardization process to the actual physical value to ensure that the prediction result has practical significance. The unscaled prediction output is decoded to obtain temperature prediction data, humidity prediction data, air pressure prediction data, wind speed prediction data and wind direction prediction data. The numerical output of the model is converted into specific weather element parameters for easy understanding and application. These prediction data represent the information of temperature, humidity, air pressure, wind speed and wind direction at future time points respectively. The temperature prediction data, humidity prediction data, air pressure prediction data, wind speed prediction data and wind direction prediction data are fused to obtain the fused initial setting parameters. The individual prediction data are processed comprehensively to generate a complete weather forecast picture. The fused initial setting parameters are split into time series to obtain the initial setting parameters at different future time points. The forecast data with a long time span is segmented by time points to generate detailed weather forecasts for each future time point.

[0040] Step 106: define an objective function according to the plurality of indoor environment parameter data and the user comfort preference parameters, calculate an optimal device control strategy through an optimization algorithm, optimize the initial setting parameters, and generate corresponding device setting parameters;

[0041] Specifically, according to the initial setting parameters, the weather factors affecting the indoor environment are modeled to obtain the weather impact model. The weather impact model establishes the influence relationship between the temperature, humidity, wind speed and wind direction in the initial setting parameters. A comfort evaluation function is constructed according to multiple indoor environmental parameter data and user comfort preference parameters. The comfort evaluation function is to establish a quantitative evaluation standard by comprehensively considering parameters such as indoor temperature, humidity, air quality and user preferences to evaluate the comfort of the current environment. The weather impact model and the comfort evaluation function are combined to define the objective function, and the constraints of the control variables are determined according to the working parameter range of the energy-saving device. The definition of the objective function aims to maximize the user's comfort and minimize energy consumption, while taking into account the actual working range and performance limitations of the energy-saving device. By setting reasonable constraints, it is ensured that the optimization process is carried out within the actual equipment operation range. Through the preset optimization algorithm, the objective function is solved under the constraints to obtain the optimization solution, and the optimization algorithm is any one of the PID control algorithm, the linear programming algorithm and the genetic algorithm. The optimization algorithm is used to find the optimal solution in a complex multivariable space. The PID control algorithm is suitable for dynamic adjustment. The linear programming algorithm is suitable for optimization problems of linear relationships. The genetic algorithm can perform well in large-scale nonlinear optimization problems. By selecting a suitable optimization algorithm, the objective function can be effectively solved and the optimal device control strategy can be obtained. According to the optimization solution, the corresponding device setting parameters are generated. The device setting parameters include temperature setting values, wind speed setting values, and humidity setting values. These setting parameters are specific control instructions used to adjust the operating state of energy-saving equipment to achieve optimized indoor environment adjustment. The feasibility analysis of the device setting parameters is carried out and the infeasible parameters are eliminated to obtain a set of feasible device setting parameters. According to the preset priority rules, the optimal device setting parameters are selected from the set of feasible device setting parameters. The optimal device setting parameters are parameter mapped to obtain a control instruction set, and the corresponding optimal device control strategy is generated according to the control instruction set. Parameter mapping converts the optimized setting parameters into specific control instructions to ensure that the energy-saving equipment can be adjusted and operated according to the predetermined strategy.

[0042] Step 107: Send the device setting parameters to the IoT platform through the cloud business integration system, and adjust the energy-saving devices in real time according to the device setting parameters to achieve indoor environment adjustment.

[0043] Specifically, the cloud business integration system receives and processes the device setting parameters generated from the device control parameter prediction model and the user comfort preference model, including temperature setting value, wind speed setting value and humidity setting value. After receiving these parameters, the cloud business integration system verifies and converts the parameters to ensure that they comply with the communication protocol and control requirements of the IoT platform and the energy-saving device. The cloud business integration system establishes a connection with the IoT platform through a secure communication channel. HTTPS or other encryption protocols are used to prevent data from being intercepted or tampered with during transmission. The cloud business integration system encapsulates the processed device setting parameters into standard data packets that follow predefined communication protocols such as MQTT, CoAP or HTTP to meet the needs of the IoT platform. The encapsulated data packets are sent to the IoT platform through the cloud business integration system. On the IoT platform, the received data packets are parsed to extract the device setting parameters. The IoT platform is usually equipped with powerful data processing and distribution capabilities, and can further optimize and adjust the received setting parameters based on the status of the device and real-time environmental data. The parsed setting parameters are sent to each connected energy-saving device through the command control module of the IoT platform. When the energy-saving device receives the setting parameters from the IoT platform, it adjusts its operating status according to the specific control instructions. For example, the temperature sensor will adjust the cooling or heating mode according to the new temperature setting value, the wind speed control module will adjust the fan speed according to the wind speed setting value, and the humidity controller will turn on or off the humidification or dehumidification function according to the humidity setting value.

[0044] In the embodiments of the present application, the method of controlling energy-saving equipment based on AI weather prediction of the present application predicts weather changes through AI, automatically adjusts equipment settings, and ensures that the indoor environment is always in the best comfortable state. According to real-time weather data and forecasts, optimize equipment operation time and mode, reduce unnecessary energy consumption, and reduce operating costs. Utilize artificial intelligence and meteorological data to improve the automation and intelligence level of equipment systems and reduce the need for manual operation by users. Through intelligent control and optimized operation, reduce excessive use and wear of equipment and extend the service life of energy-saving equipment. By improving energy utilization efficiency and reducing energy consumption, reduce carbon emissions, and promote environmental protection and sustainable development.

[0045] In a specific embodiment, the process of executing step 101 may specifically include the following steps:

[0046] (1) Install multiple environmental sensors indoors, including temperature sensors, humidity sensors, air quality sensors, and human infrared sensors;

[0047] (2) Using multiple environmental sensors to monitor the indoor temperature, humidity, air quality, and number of people in real time, and obtain multiple environmental sensor data, including temperature data, humidity data, air quality data, and number of people data;

[0048] (3) Extract features from multiple environmental sensor data to obtain an environmental sensor feature vector set;

[0049] (4) Based on the environmental sensor feature vector set, multiple environmental sensor data are classified through an unsupervised clustering algorithm to obtain the sensor data classification result;

[0050] (5) Based on the classification results of the sensor data, multiple environmental sensor data are normalized to obtain multiple indoor environmental parameter data;

[0051] (6) Preprocessing the user operation log data of the energy-saving equipment to obtain processed operation log data;

[0052] (7) Based on the processed operation log data, the user comfort preference pattern is extracted through the pattern recognition algorithm to obtain the user comfort preference pattern set;

[0053] (8) Parameter mapping is performed according to the user comfort preference pattern set to obtain the user comfort preference parameters.

[0054] Specifically, select and install appropriate sensors. The temperature sensor is used to measure the temperature of indoor air; the humidity sensor is used to measure the water vapor content in the air; the air quality sensor is used to detect the concentration of pollutants in the indoor air, such as PM2.5, carbon dioxide, etc.; the human infrared sensor is used to detect the number and distribution of indoor personnel. These sensors are installed in reasonable locations to ensure the accuracy and coverage of the data. For example, the temperature and humidity sensors should be installed in the middle of the room to avoid direct sunlight and the influence of vents; the air quality sensor should be installed near the human breathing zone; the human infrared sensor should be installed on the ceiling or wall to obtain the best detection angle. When the sensor is installed, the indoor temperature, humidity, air quality and number of people are monitored in real time to generate multiple environmental sensor data, including temperature data, humidity data, air quality data and number of people data. Feature extraction is performed on multiple environmental sensor data to obtain a set of environmental sensor feature vectors. The raw data is converted into a more representative and easy-to-process feature vector. For example, for temperature data, extract features such as the average daily temperature, maximum temperature, and minimum temperature; for humidity data, extract features such as average humidity and humidity fluctuation range; for air quality data, extract features such as average PM2.5 concentration and maximum carbon dioxide concentration; for personnel quantity data, extract features such as average number of personnel and peak number of personnel. According to the environmental sensor feature vector set, classify multiple environmental sensor data through an unsupervised clustering algorithm to obtain the sensor data classification result. For example, the K-means algorithm divides the data into K clusters so that the distance between data points in each cluster is minimized. Assume ,in Indicates feature vectors, the goal of the K-means algorithm is to minimize the sum of squared errors within the cluster (WCSS):

[0055] ;

[0056] in, It is Clusters, It is The centroid of each cluster. Through cluster analysis, different patterns of indoor environmental data are identified, such as temperature change patterns and air quality change patterns in different time periods. According to the classification results of sensor data, multiple environmental sensor data are normalized to obtain multiple indoor environmental parameter data. The dimension difference of data is eliminated so that data with different characteristics can be compared and analyzed on the same scale. Data preprocessing is performed on the user operation log data of energy-saving equipment to obtain processed operation log data. User operation log data records various operations of users on energy-saving equipment, such as temperature setting, wind speed adjustment, mode switching, etc. Data preprocessing includes steps such as data cleaning, missing value filling, and outlier detection. Data cleaning is to remove redundant information and noise in the operation log, missing value filling is to fill missing data by interpolation or other methods, and outlier detection is to identify and process abnormal operation records in the log. According to the processed operation log data, the user comfort preference pattern is extracted through the pattern recognition algorithm to obtain the user comfort preference pattern set. For example, the K nearest neighbor algorithm finds the nearest K neighbors by calculating the distance between the new data point and each data point in the training set, and determines the category of the new data point through a voting mechanism. Parameter mapping is performed based on the user comfort preference mode set to obtain the user comfort preference parameters. The user's preference mode is converted into specific equipment control parameters, such as temperature setting value, wind speed setting value, etc. These parameters will be used as part of the energy-saving equipment control strategy to ensure that the equipment can be intelligently adjusted according to user preferences and real-time environmental data.

[0057] In a specific embodiment, the process of executing step 102 may specifically include the following steps:

[0058] (1) performing data format conversion on a plurality of indoor environmental parameter data to obtain first environmental parameter data, and packaging the first environmental parameter data through a preset communication protocol to obtain a packaged environmental parameter data packet;

[0059] (2) encrypting the packaged environmental parameter data packet to obtain an encrypted environmental parameter data packet, and establishing a secure communication channel according to a communication protocol to obtain a secure communication link, wherein the communication protocol is any one of Wi-Fi, Zigbee, and LoRa;

[0060] (3) Transmitting the encrypted environmental parameter data packet to the IoT platform through a secure communication link, and decrypting the encrypted environmental parameter data packet on the IoT platform to obtain a decrypted environmental parameter data packet;

[0061] (4) unpacking the decrypted environmental parameter data packet on the IoT platform to obtain unpacked environmental parameter data, and converting the data format of the unpacked environmental parameter data on the IoT platform to obtain second environmental parameter data;

[0062] (5) According to a preset data transmission protocol, the second environmental parameter data is pushed to the cloud business integration system on the IoT platform, and the data is stored in the cloud business integration system.

[0063] Specifically, the data format of the indoor environmental parameter data is converted. The data collected by different sensors are unified into a standard format for subsequent processing. For example, the data of temperature, humidity, air quality and number of people are converted into a unified JSON format to make it easier to package and transmit. After completing the data format conversion, the first environmental parameter data is packaged using a preset communication protocol. Multiple sensor data are integrated into a data packet to reduce the number of transmissions and improve transmission efficiency. For example, multiple JSON format data are integrated into a larger JSON object, or compressed and packaged using a binary format to reduce the size of the data packet. The packaged environmental parameter data packet is encrypted to ensure that the data is not stolen or tampered with during transmission. Common encryption algorithms include AES, RSA, etc. Establish a secure communication channel. Select a communication protocol from Wi-Fi, Zigbee or LoRa, depending on the specific application scenario and transmission distance requirements. For example, Wi-Fi is suitable for short-distance, large data volume transmission, Zigbee is suitable for medium-distance, low-power transmission, and LoRa is suitable for long-distance, low-data volume transmission. Establish a secure communication link through these protocols to ensure that the data packet can be safely and stably transmitted to the target platform. The encrypted environmental parameter data packet is transmitted to the IoT platform through a secure communication link. After receiving the data packet, the IoT platform decrypts the data. The decryption process uses the same algorithm and key as the encryption process to ensure that the data can be accurately restored. The decrypted data packet is restored to the original environmental parameter data. On the IoT platform, the decrypted environmental parameter data packet is unpacked to restore the original data of each sensor. The information in the data packet is split into independent sensor data so that it can be processed and analyzed separately. The unpacked environmental parameter data is converted into a data format to obtain the second environmental parameter data. The data is converted into a format that can be directly used by the IoT platform and the cloud business integration system. For example, the data in JSON format is converted into a platform-specific protocol format or a database-compatible format. According to the preset data transmission protocol, the IoT platform pushes the second environmental parameter data to the cloud business integration system. The data transmission protocol can be MQTT, HTTP or other protocols suitable for large-scale data transmission to ensure that the data can be transmitted to the cloud stably and efficiently. After receiving the data, the cloud business integration system processes and stores the data for subsequent analysis and application. In the cloud business integration system, the received second environmental parameter data will be stored in the database. These data can be used for real-time monitoring, historical data analysis, predictive model training and other applications to help users optimize equipment control strategies, improve indoor environmental comfort and energy saving effects.

[0064] In a specific embodiment, the process of executing step 103 may specifically include the following steps:

[0065] (1) Construct an API request parameter set based on the required historical weather type and time range, and call the meteorological API interface to send a historical weather data request based on the API request parameter set to obtain historical weather data. The historical weather data includes: temperature, humidity, and air temperature at each time point of each day;

[0066] (2) Use Python or Java to convert the data format and clean the data of historical weather data to obtain the converted weather data, and perform outlier detection on the converted weather data to obtain the outlier detection results;

[0067] (3) According to the outlier detection results, the converted weather data is repaired to obtain the repaired weather data;

[0068] (4) Segment the repaired weather data into time series to obtain a segmented weather data set, and perform data normalization on the segmented weather data set to obtain a normalized weather data set;

[0069] (5) According to the required weather elements, extract the corresponding weather element data from the normalized weather data set to obtain the weather element data set;

[0070] (6) Perform feature engineering and data segmentation on the weather element dataset to obtain a training dataset and a validation dataset, and output the training dataset and the validation dataset as preprocessed weather data.

[0071] Specifically, determine the specific weather type and time range. For example, if you need temperature, humidity, and air temperature data for every hour of every day in the past year, build an API request parameter set based on these requirements. The request parameter set usually includes information such as the start date, end date, location coordinates, and the required data type. Call the meteorological API interface to send the request. The obtained data contains the required historical weather data, which includes temperature, humidity, and air temperature information for each time period and time point of each day. Perform data format conversion and data cleaning on the obtained historical weather data. The purpose of data format conversion is to convert the data returned by the API into a format that is easier to handle, such as converting the data from JSON format to a table format for subsequent processing and analysis. The purpose of data cleaning is to remove invalid data, handle missing values, etc., to ensure the accuracy and completeness of the data. For example, remove all data rows containing invalid temperature readings, or use interpolation methods to fill in missing humidity data. After completing data cleaning, perform outlier detection on the data to identify unreasonable values ​​in the data, which may be caused by sensor failure or data transmission errors. The detection method can be based on statistical methods, such as calculating the Z-score of each data point and marking points that exceed a certain threshold as outliers. In this way, outliers in temperature, humidity or air temperature data are identified. According to the results of outlier detection, outlier repair is performed on the data. The appropriate method is selected according to the specific situation. For example, the detected outliers are replaced with the average of adjacent data points using interpolation methods, or the outliers are replaced with historical average values. The repaired data will be smoother and more reasonable, which will help improve the accuracy of subsequent analysis. The repaired weather data is segmented into time series, and the long-span data is segmented at certain time intervals for subsequent analysis and modeling. For example, it can be segmented by day, week or month, and each segment will contain the average temperature, humidity and air temperature data within a time period. The segmented data is normalized to eliminate the differences between different feature dimensions so that data with different features can be compared and analyzed on the same scale. Common normalization methods include minimum-maximum normalization and standardization. The normalized data will be easier for subsequent machine learning modeling and analysis. According to the required weather elements, the corresponding weather element data is extracted from the normalized weather data set to obtain the weather element data set. Feature engineering and data segmentation are performed on the weather element data set. Feature engineering includes generating new features and selecting important features to improve the performance of the model. For example, generating interactive features of temperature and humidity, or selecting features that best represent weather changes. Data segmentation is to divide the data into training sets and validation sets, usually in an 8:2 ratio. The training set is used for model training, and the validation set is used for model evaluation. The training data set and validation data set are output as preprocessed weather data for subsequent model training and validation.

[0072] In a specific embodiment, the process of executing step 104 may specifically include the following steps:

[0073] (1) According to the characteristic dimensions of the preprocessed weather data and multiple historical environmental parameter data, the AI ​​model architecture is selected to obtain the initial AI model, which is a linear regression model or an LSTM neural network;

[0074] (2) Randomly initialize the parameters of the initial AI model to obtain an AI model with initialized parameters;

[0075] (3) Using the preset loss function, the AI ​​model with initialized parameters is trained on the training data set to obtain a training intermediate model;

[0076] (4) Evaluate the training intermediate model on the validation data set to obtain the model evaluation index;

[0077] (5) According to the model evaluation index, the hyperparameters of the training intermediate model are adjusted until the model evaluation index meets the preset conditions, and the equipment control parameter prediction model is obtained;

[0078] (6) Compress the equipment control parameter prediction model to obtain a compressed prediction model, and deploy the compressed prediction model to the cloud business integration system through a model deployment tool.

[0079] Specifically, the feature dimensions of the preprocessed weather data and multiple historical environmental parameter data are analyzed. The preprocessed weather data usually contains multiple features, such as temperature, humidity, air pressure, etc. The data types and time series characteristics of these features determine the AI ​​model architecture selected by the system. The linear regression model is suitable for processing data with linear relationships and is suitable for situations with fewer features and simpler relationships. The LSTM neural network is suitable for processing complex data with time series characteristics, especially when the time dependence of the data is strong. After selecting the AI ​​model architecture, the parameters of the initial AI model are randomly initialized to break the symmetry of the parameters and ensure the effectiveness of model training. In the LSTM neural network, this includes randomly initializing the weight matrix and bias vector of each layer. The initialized model is called the AI ​​model with initialized parameters. The AI ​​model with initialized parameters is trained on the training data set through the preset loss function. The loss function is used to measure the difference between the model prediction value and the true value. Commonly used loss functions include mean square error (MSE) and cross entropy loss. For regression problems, mean square error is a common choice. During the training process, the model parameters are continuously adjusted through the back propagation algorithm to minimize the loss function. Assume is the model prediction value, is the true value, and the calculation formula of the mean square error is:

[0080] ;

[0081] in, is the sample size, It is The predicted value of samples, It is The true value of samples. After multiple iterations of training, the training intermediate model is obtained. The training intermediate model is evaluated on the validation data set to obtain the model evaluation index. The evaluation index is used to measure the performance of the model on unseen data. Common evaluation indicators include mean square error, mean absolute error, etc. The evaluation results can help the system understand the generalization ability of the model, so as to determine whether the model is overfitting or underfitting. According to the model evaluation index, the hyperparameters of the training intermediate model are adjusted until the model evaluation index meets the preset conditions. Hyperparameters are key parameters in the model structure and training process, such as learning rate, batch size, number of LSTM layers, etc. Hyperparameter adjustment is usually performed through grid search or random search to find the optimal hyperparameter combination. For example, if the initial LSTM model has a high mean square error on the validation set, you can try to adjust the learning rate or increase the number of LSTM layers to improve the model performance. When the model evaluation index meets the preset conditions, the final device control parameter prediction model is obtained. The device control parameter prediction model is compressed to reduce the computational complexity and storage requirements of the model. Model compression techniques include pruning, quantization, and knowledge distillation. Pruning simplifies the model structure by removing unimportant parameters or neurons; quantization reduces storage requirements by reducing the numerical precision of model parameters; knowledge distillation reduces the computational complexity of the model by transferring the knowledge of a complex model to a simple model.

[0082] In a specific embodiment, the process of executing step 105 may specifically include the following steps:

[0083] (1) Construct a real-time API request parameter set based on the required real-time weather type and geographic location;

[0084] (2) According to the real-time API request parameter set, the meteorological API interface is periodically called to send real-time weather data requests to obtain real-time weather data;

[0085] (3) performing data format conversion on the real-time weather data to obtain a first weather data stream, and performing real-time data cleaning on the first weather data stream to obtain a second weather data stream;

[0086] (4) According to the data transmission protocol, the second weather data stream is pushed to the cloud business integration system, and feature engineering is performed on the second weather data stream in the cloud business integration system to obtain a real-time weather feature set;

[0087] (5) performing feature encoding on the real-time weather feature set to obtain a coded weather feature set, performing vector conversion on the coded weather feature set to obtain a coded weather feature vector, and performing vector conversion on multiple indoor environment parameter data to obtain a coded environment parameter vector;

[0088] (6) Inputting the encoded weather feature vector and the encoded environmental parameter vector into the device control parameter prediction model to predict the device control parameters, obtaining the model prediction output, and post-processing the model prediction output to obtain the initial setting parameters.

[0089] Specifically, determine the specific weather type and geographic location. Weather types may include temperature, humidity, rainfall, wind speed, etc., while geographic locations are represented by specific latitude and longitude coordinates or city names. Assuming that real-time temperature, humidity, and rainfall data of a city are obtained, an API request parameter set is constructed, including an API key, a geographic location parameter, and the required data type. This parameter set is used to call the meteorological API interface. According to the real-time API request parameter set, the meteorological API interface is periodically called to send real-time weather data requests to obtain real-time weather data. Set a scheduled task to automatically send requests every certain period of time (for example, every hour). The obtained real-time weather data will include information such as temperature, humidity, and rainfall at the current time. Convert the data format of the real-time weather data to obtain the first weather data stream. Convert the JSON format data returned by the API into a format that is easier to process and analyze, such as converting the data into a table or other structured data format. After obtaining the first weather data stream, perform real-time data cleaning on it to obtain the second weather data stream. Data cleaning includes steps such as removing invalid data, processing missing values, and detecting outliers. Invalid data may be caused by sensor failure or network problems and need to be removed from the data set; missing values ​​can be filled by interpolation or mean substitution; outliers can be detected and corrected by statistical methods. Data cleaning ensures data quality and reliability. The cleaned second weather data stream is pushed to the cloud business integration system according to the predefined data transmission protocol. The data transmission protocol can be HTTP, MQTT or other protocols suitable for real-time data transmission to ensure that the data can be transmitted to the cloud stably and efficiently. In the cloud business integration system, the second weather data stream is feature engineered to obtain a real-time weather feature set. Feature engineering includes operations such as feature selection, feature generation, and feature scaling to extract information useful for the prediction model. Feature encoding is performed on the real-time weather feature set to obtain an encoded weather feature set. The original features are converted into numerical forms that can be processed by the model, such as converting the category features into one-hot encoding or embedding vectors. The encoded weather feature set is vectorized to obtain an encoded weather feature vector. Multiple indoor environmental parameter data are vectorized to obtain an encoded environmental parameter vector, and the encoded feature sets are combined into a complete feature vector for use as input to the prediction model. The encoded weather feature vector and the encoded environmental parameter vector are input into the device control parameter prediction model to predict the device control parameters and obtain the model prediction output. The prediction model can be a linear regression model, a decision tree model, or an LSTM neural network. According to the structure and training process of the model, the input feature vector is calculated to generate the prediction result of future weather. The model prediction output is post-processed to obtain the final initial setting parameters. Post-processing includes converting the predicted value output by the model back to the original scale (for example, reverse normalizing the normalized predicted value), smoothing to eliminate the sharp fluctuation of the predicted value, etc.The purpose of post-processing is to make the prediction results closer to the actual situation and easier to understand and apply.

[0090] In a specific embodiment, the step of inputting the encoded weather feature vector and the encoded environmental parameter vector into the device control parameter prediction model to predict the device control parameters, obtaining the model prediction output, and post-processing the model prediction output to obtain the initial setting parameters may specifically include the following steps:

[0091] (1) Perform tensor conversion and feature fusion on the encoded weather feature vector and the encoded environmental parameter vector to obtain input features in tensor form;

[0092] (2) passing the input features to the input layer of the device control parameter prediction model, and performing nonlinear transformation on the input features in the hidden layer of the device control parameter prediction model according to the hidden layer weight matrix and the hidden layer bias vector to obtain the hidden layer output;

[0093] (3) Calculate the outputs of all hidden layers in sequence, and use the output device control parameters of all hidden layers to predict the input of the output layer of the model;

[0094] (4) In the output layer of the device control parameter prediction model, the outputs of all hidden layers are weighted summed according to the output layer weight matrix and the output layer bias vector to obtain the model prediction output;

[0095] (5) Calculate the activation function on the model prediction output to obtain the activated prediction output, and perform denormalization on the activated prediction output to obtain the unscaled prediction output;

[0096] (6) decoding the unscaled prediction output to obtain temperature prediction data, humidity prediction data, air pressure prediction data, wind speed prediction data, and wind direction prediction data;

[0097] (7) Fusing the temperature prediction data, humidity prediction data, air pressure prediction data, wind speed prediction data, and wind direction prediction data to obtain the fused initial setting parameters;

[0098] (8) The time series of the fused initial setting parameters are split to obtain the initial setting parameters at different future time points.

[0099] Specifically, the encoded weather feature vector and the encoded environmental parameter vector are converted from one-dimensional arrays to multi-dimensional tensors in order to meet the input requirements of the deep learning model. Tensors are multi-dimensional arrays that can represent complex data structures. For time series prediction tasks, the input tensor usually contains three dimensions: batch size, time step, and feature dimension. The input features are passed to the input layer of the device control parameter prediction model, and in the hidden layer of the device control parameter prediction model, the input features are nonlinearly transformed according to the hidden layer weight matrix and the hidden layer bias vector to obtain the hidden layer output. Taking the LSTM neural network as an example, each hidden layer is composed of multiple LSTM units, and each unit calculates the input through its weight matrix and bias vector. The calculation of the LSTM unit includes the operations of the input gate, the forget gate, and the output gate, which are implemented by nonlinear activation functions (such as sigmoid and tanh). In the input layer, the input features is passed to the first LSTM unit, and the data at each time step is input into the unit. For each time step, the LSTM unit calculates , the hidden state of the previous time step and memory cell status The calculation formula is as follows:

[0100] ;

[0101] in, , , are the activation values ​​of the forget gate, input gate, and output gate, respectively. is the memory cell state, is a hidden state, and is the weight matrix, is the bias vector, represents the sigmoid function, represents the tanh function, Represents element-wise multiplication. The outputs of all hidden layers are calculated in sequence, and the outputs of all hidden layers are used as the inputs of the output layer of the device control parameter prediction model. The output of each layer is used as the input of the next layer, and the deep features in the data are extracted through multi-layer calculations. In the output layer of the device control parameter prediction model, the outputs of all hidden layers are weighted and summed according to the output layer weight matrix and the output layer bias vector to obtain the model prediction output. Assume is the hidden state matrix of the last layer, is the weight matrix of the output layer, is the bias vector of the output layer, and the model predicts the output The calculation formula is:

[0102] ;

[0103] The activation function is calculated on the model prediction output to obtain the activated prediction output, and the activated prediction output is denormalized to obtain the unscaled prediction output. The activation function is used to introduce nonlinearity. Common activation functions include ReLU, sigmoid, etc. Denormalization is to convert the standardized prediction value back to the original scale. The unscaled prediction output is decoded to obtain temperature prediction data, humidity prediction data, air pressure prediction data, wind speed prediction data, and wind direction prediction data. The numerical output of the model is converted into specific weather elements for easy understanding and application. These prediction data are fused to obtain the fused initial setting parameters. The fused initial setting parameters are split into time series to obtain the initial setting parameters at different future time points. The long-span prediction data is segmented by time points to generate detailed weather forecasts for each future time point.

[0104] In a specific embodiment, the process of executing step 106 may specifically include the following steps:

[0105] (1) Model the weather factors that affect the indoor environment based on the initial setting parameters to obtain a weather impact model;

[0106] (2) Construct a comfort evaluation function based on multiple indoor environmental parameter data and user comfort preference parameters;

[0107] (3) Combine the weather impact model and the comfort evaluation function to define the objective function, and determine the constraints of the control variables based on the working parameter range of the energy-saving equipment;

[0108] (4) Solving the objective function under constraints through a preset optimization algorithm to obtain an optimized solution. The optimization algorithm is any one of a PID control algorithm, a linear programming algorithm, and a genetic algorithm;

[0109] (5) Generate corresponding equipment setting parameters according to the optimization solution, where the equipment setting parameters include temperature setting value, wind speed setting value and humidity setting value;

[0110] (6) Perform feasibility analysis on the equipment setting parameters and eliminate infeasible parameters to obtain a set of feasible equipment setting parameters, and select the optimal equipment setting parameters from the set of feasible equipment setting parameters according to the preset priority rules;

[0111] (7) Parameter mapping is performed on the optimal device setting parameters to obtain a control instruction set, and based on the control instruction set, a corresponding optimal device control strategy is generated.

[0112] Specifically, analyze and identify which weather factors have a significant impact on the indoor environment. Common influencing factors include outdoor temperature, humidity, wind speed, and solar radiation. By initially setting parameters, a mathematical model is established to describe how these factors affect indoor environmental parameters. Based on multiple indoor environmental parameter data and user comfort preference parameters, a comfort evaluation function is constructed. The comfort evaluation function is used to quantify the user's comfort with the current environment. Commonly used comfort indicators include PMV (Predicted Mean Vote) and PPD (Predicted Percentage of Dissatisfied). Combine the weather impact model and the comfort evaluation function, define the objective function, and determine the constraints of the control variables based on the working parameter range of the energy-saving equipment. Objective function The purpose is to minimize user discomfort while taking into account factors such as energy consumption. Assume that the operating parameters of the energy-saving device include the temperature setting value , Wind speed setting value and humidity setpoint , the objective function can be expressed as:

[0113] ;

[0114] in, , β and γ are the weights of different factors, represents the energy consumption function of the energy-saving device. The constraints of the control variables can be based on the physical limitations and operating range of the energy-saving device, such as the upper and lower limits of the temperature setting value, the maximum and minimum values ​​of the wind speed, etc. The objective function is solved under the constraints by the preset optimization algorithm to obtain the optimized solution. The optimization algorithm can be selected from one of the PID control algorithm, the linear programming algorithm, or the genetic algorithm. For example, the linear programming algorithm finds the optimal solution by solving a system of linear equations, while the genetic algorithm iteratively generates a better solution by simulating the natural selection process. Assuming that the genetic algorithm is selected, its optimization process includes selection, crossover, and mutation operations to gradually approach the optimal solution of the objective function. According to the optimized solution, the corresponding device setting parameters are generated, which include the temperature setting value, the wind speed setting value, and the humidity setting value. These parameters are used to guide the operation of the energy-saving device to achieve the best indoor environment adjustment effect. The feasibility analysis of the device setting parameters is performed and the infeasible parameters are eliminated to obtain a set of feasible device setting parameters. The feasibility analysis ensures that the generated setting parameters are feasible in actual operation, such as the temperature setting value does not exceed the operating range of the energy-saving device and the wind speed setting value is within a safe range. After eliminating infeasible parameters, select the optimal device setting parameters from the feasible device setting parameter set according to the preset priority rules. For example, the setting parameters with the lowest energy consumption or the setting parameters with the highest user comfort are given priority. Parameter mapping is performed on the optimal device setting parameters to obtain a control instruction set, and the corresponding optimal device control strategy is generated based on the control instruction set. The optimized setting parameters are converted into specific control instructions so that the energy-saving device can execute them. For example, the temperature setting value, wind speed setting value, and humidity setting value are converted into operation instructions on the device control panel. The generated optimal device control strategy ensures that the energy-saving device operates according to the optimization results and provides a comfortable indoor environment.

[0115] The above describes the method for controlling energy-saving equipment based on AI weather prediction in the embodiment of the present application. The following describes the device for controlling energy-saving equipment based on AI weather prediction in the embodiment of the present application. Figure 2 In the embodiment of the present application, an embodiment of the device for controlling energy-saving equipment based on AI weather prediction includes:

[0116] The acquisition module 201 is used to install multiple environmental sensors indoors and collect corresponding multiple indoor environmental parameter data through the multiple environmental sensors, and to obtain user comfort preference parameters through energy-saving devices;

[0117] The transmission module 202 is used to transmit the multiple indoor environment parameter data to the IoT platform using a preset communication protocol, and push the multiple indoor environment parameter data to the cloud business integration system;

[0118] The sorting module 203 is used to call the meteorological API interface to obtain historical weather data, and to clean and sort the historical weather data to obtain pre-processed weather data. At the same time, multiple historical environmental parameter data are obtained from the cloud business integration system;

[0119] A training module 204 is used to input the pre-processed weather data and multiple historical environmental parameter data into a preset initial AI model for model training, obtain a device control parameter prediction model, and deploy the device control parameter prediction model in a cloud business integration system;

[0120] The prediction module 205 is used to obtain real-time weather data through the meteorological API interface and push the real-time weather data to the cloud business integration system. At the same time, the device control parameter prediction model is called to predict the device control parameters of the real-time weather data and multiple indoor environment parameter data to obtain the initial setting parameters;

[0121] A generation module 206 is used to define an objective function according to the plurality of indoor environment parameter data and the user comfort preference parameters, calculate an optimal device control strategy through an optimization algorithm, optimize the initial setting parameters, and generate corresponding device setting parameters;

[0122] The adjustment module 207 is used to send the device setting parameters to the IoT platform through the cloud business integration system, and adjust the energy-saving devices in real time according to the device setting parameters to achieve indoor environment adjustment.

[0123] Through the collaborative cooperation of the above-mentioned components, the method of controlling energy-saving equipment based on AI weather prediction in this application predicts weather changes through AI and automatically adjusts equipment settings to ensure that the indoor environment is always in the best comfortable state. According to real-time weather data and forecasts, optimize equipment operating time and mode, reduce unnecessary energy consumption, and reduce operating costs. Utilize artificial intelligence and meteorological data to improve the automation and intelligence level of equipment systems and reduce the need for manual operations by users. Through intelligent control and optimized operation, reduce excessive use and wear of equipment and extend the service life of energy-saving equipment. By improving energy utilization efficiency and reducing energy consumption, reduce carbon emissions and promote environmental protection and sustainable development.

[0124] The present application also provides a computer device, which includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the method for controlling energy-saving equipment based on AI weather prediction in the above-mentioned embodiments.

[0125] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0126] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0127] As described above, 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. However, 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.

Claims

1. A method for controlling energy-saving equipment based on AI weather prediction, characterized in that: The method for controlling energy-saving equipment based on AI weather prediction includes: Install multiple environmental sensors indoors and collect corresponding multiple indoor environmental parameter data through the multiple environmental sensors, and obtain user comfort preference parameters through energy-saving equipment; specifically including: installing multiple environmental sensors indoors, the multiple environmental sensors include temperature sensors, humidity sensors, air quality sensors and human infrared sensors; using the multiple environmental sensors to monitor the indoor temperature, humidity, air quality and number of people in real time to obtain multiple environmental sensor data, the multiple environmental sensor data include: temperature data, humidity data, air quality data and number of people data; extracting features from the multiple environmental sensor data to obtain an environmental sensor feature vector set; classifying the multiple environmental sensor data through an unsupervised clustering algorithm according to the environmental sensor feature vector set to obtain sensor data classification results; normalizing the multiple environmental sensor data according to the sensor data classification results to obtain multiple indoor environmental parameter data; performing data preprocessing on the user operation log data of the energy-saving equipment to obtain processed operation log data; extracting the user comfort preference pattern through a pattern recognition algorithm according to the processed operation log data to obtain a user comfort preference pattern set; performing parameter mapping according to the user comfort preference pattern set to obtain user comfort preference parameters; The method comprises: transmitting the plurality of indoor environmental parameter data to the IoT platform by using a preset communication protocol, and pushing the plurality of indoor environmental parameter data to the cloud business integration system; specifically comprising: performing data format conversion on the plurality of indoor environmental parameter data to obtain first environmental parameter data, and packaging the first environmental parameter data through a preset communication protocol to obtain a packaged environmental parameter data packet; encrypting the packaged environmental parameter data packet to obtain an encrypted environmental parameter data packet, and establishing a secure communication channel according to the communication protocol to obtain a secure communication link, wherein the communication protocol is any one of Wi-Fi, Zigbee, and LoRa. A method of transmitting the encrypted environmental parameter data packet to the IoT platform through the secure communication link, decrypting the encrypted environmental parameter data packet on the IoT platform to obtain a decrypted environmental parameter data packet; unpacking the decrypted environmental parameter data packet on the IoT platform to obtain unpacked environmental parameter data, and converting the data format of the unpacked environmental parameter data on the IoT platform to obtain second environmental parameter data; pushing the second environmental parameter data to the cloud business integration system on the IoT platform according to a preset data transmission protocol, and storing the data in the cloud business integration system; Call the meteorological API interface to obtain historical weather data, clean and organize the historical weather data to obtain pre-processed weather data, and at the same time, obtain multiple historical environmental parameter data from the cloud business integration system; specifically include: constructing an API request parameter set according to the required historical weather type and time range, and calling the meteorological API interface to send a historical weather data request according to the API request parameter set to obtain historical weather data, the historical weather data including: temperature, humidity and air temperature at the time period and time point of each day; converting the data format and cleaning the historical weather data through Python or Java to obtain converted weather data, and performing outlier detection on the converted weather data to obtain outliers detection result; according to the outlier detection result, repairing the outliers on the converted weather data to obtain repaired weather data; segmenting the repaired weather data into time series to obtain a segmented weather data set, and performing data normalization processing on the segmented weather data set to obtain a normalized weather data set; extracting corresponding weather element data from the normalized weather data set according to required weather elements to obtain a weather element data set; performing feature engineering processing and data segmentation on the weather element data set to obtain a training data set and a verification data set, and outputting the training data set and the verification data set as preprocessed weather data, and at the same time, obtaining multiple historical environmental parameter data from the cloud business integration system; Input the preprocessed weather data and the multiple historical environmental parameter data into a preset initial AI model for model training to obtain a device control parameter prediction model, and deploy the device control parameter prediction model in the cloud-based business integration system; specifically including: selecting an AI model architecture according to the feature dimensions of the preprocessed weather data and the multiple historical environmental parameter data to obtain an initial AI model, wherein the initial AI model is a linear regression model or an LSTM neural network; randomly initializing the parameters of the initial AI model to obtain an AI model with initialized parameters; performing model training on the AI ​​model with initialized parameters on the training data set through a preset loss function to obtain a training intermediate model; performing model evaluation on the training intermediate model on the verification data set to obtain a model evaluation index; adjusting the hyperparameters of the training intermediate model according to the model evaluation index until the model evaluation index meets the preset conditions to obtain a device control parameter prediction model; performing model compression on the device control parameter prediction model to obtain a compressed prediction model, and deploying the compressed prediction model to the cloud-based business integration system through a model deployment tool; The real-time weather data is obtained through the meteorological API interface, and the real-time weather data is pushed to the cloud-based business integration system. At the same time, the device control parameter prediction model is called to predict the device control parameters of the real-time weather data and the multiple indoor environmental parameter data to obtain the initial setting parameters; specifically including: constructing a real-time API request parameter set according to the required real-time weather type and geographical location; periodically calling the meteorological API interface to send real-time weather data requests according to the real-time API request parameter set to obtain real-time weather data; performing data format conversion on the real-time weather data to obtain a first weather data stream, and performing real-time data cleaning on the first weather data stream to obtain a second weather data stream; according to the data transmission protocol, the second weather data stream is pushed to the cloud-based business integration system, and in the cloud-based business integration system, the second weather data stream is subjected to feature engineering processing to obtain a real-time weather feature set; feature encoding is performed on the real-time weather feature set to obtain a coded weather feature set, and the coded weather feature set is vectorized to obtain a coded weather feature vector, and the multiple indoor environmental parameter data are vectorized to obtain a coded environmental parameter vector; the coded weather feature vector and the coded environment parameter vector are vectorized The environment parameter vector is subjected to tensor conversion and feature fusion to obtain input features in tensor form; the input features are passed to the input layer of the device control parameter prediction model, and in the hidden layer of the device control parameter prediction model, the input features are subjected to nonlinear transformation according to the hidden layer weight matrix and the hidden layer bias vector to obtain the hidden layer output; the outputs of all hidden layers are calculated in sequence, and the outputs of all hidden layers are input to the output layer of the device control parameter prediction model; in the output layer of the device control parameter prediction model, the outputs of all hidden layers are subjected to weighted summation operation according to the output layer weight matrix and the output layer bias vector to obtain the model model prediction output; performing activation function calculation on the model prediction output to obtain an activated prediction output, and performing denormalization processing on the activated prediction output to obtain an unscaled prediction output; decoding the unscaled prediction output to obtain temperature prediction data, humidity prediction data, air pressure prediction data, wind speed prediction data, and wind direction prediction data; fusing the temperature prediction data, humidity prediction data, air pressure prediction data, wind speed prediction data, and wind direction prediction data to obtain fused initial setting parameters; performing time series splitting on the fused initial setting parameters to obtain initial setting parameters at different future time points; The objective function is defined according to the multiple indoor environmental parameter data and the user comfort preference parameters, and the optimal device control strategy is calculated through an optimization algorithm and the initial setting parameters are optimized to generate corresponding device setting parameters; specifically, the following steps are used: according to the initial setting parameters, the weather factors affecting the indoor environment are modeled to obtain a weather impact model; according to the multiple indoor environmental parameter data and the user comfort preference parameters, a comfort evaluation function is constructed; the weather impact model and the comfort evaluation function are combined to define the objective function, and the constraint conditions of the control variables are determined according to the working parameter range of the energy-saving device ... The objective function is solved under the constraint conditions to obtain an optimized solution, wherein the optimized algorithm is any one of a PID control algorithm, a linear programming algorithm, and a genetic algorithm; according to the optimized solution, corresponding equipment setting parameters are generated, wherein the equipment setting parameters include a temperature setting value, a wind speed setting value, and a humidity setting value; a feasibility analysis is performed on the equipment setting parameters and infeasible parameters are eliminated to obtain a feasible equipment setting parameter set, and according to a preset priority rule, the optimal equipment setting parameters are selected from the feasible equipment setting parameter set; parameter mapping is performed on the optimal equipment setting parameters to obtain a control instruction set, and according to the control instruction set, a corresponding optimal equipment control strategy is generated; The device setting parameters are sent to the IoT platform through the cloud business integration system, and the energy-saving device is adjusted in real time according to the device setting parameters to achieve indoor environmental regulation.

2. A device for controlling energy-saving equipment based on AI weather prediction, used to execute the method for controlling energy-saving equipment based on AI weather prediction as claimed in claim 1, characterized in that: The device for controlling energy-saving equipment based on AI weather prediction includes: The acquisition module is used to install multiple environmental sensors indoors and collect corresponding multiple indoor environmental parameter data through the multiple environmental sensors, and obtain user comfort preference parameters through energy-saving equipment; specifically includes: installing multiple environmental sensors indoors, the multiple environmental sensors include temperature sensors, humidity sensors, air quality sensors and human infrared sensors; using the multiple environmental sensors to monitor the indoor temperature, humidity, air quality and number of people in real time to obtain multiple environmental sensor data, the multiple environmental sensor data include: temperature data, humidity data, air quality data and number of people data; feature extraction of the multiple environmental sensor data , obtain an environmental sensor feature vector set; classify the multiple environmental sensor data through an unsupervised clustering algorithm according to the environmental sensor feature vector set to obtain a sensor data classification result; normalize the multiple environmental sensor data according to the sensor data classification result to obtain multiple indoor environmental parameter data; perform data preprocessing on the user operation log data of the energy-saving device to obtain processed operation log data; extract the user comfort preference pattern through a pattern recognition algorithm according to the processed operation log data to obtain a user comfort preference pattern set; perform parameter mapping according to the user comfort preference pattern set to obtain user comfort preference parameters; The transmission module is used to transmit the multiple indoor environmental parameter data to the IoT platform using a preset communication protocol, and push the multiple indoor environmental parameter data to the cloud business integration system; specifically includes: performing data format conversion on the multiple indoor environmental parameter data to obtain first environmental parameter data, and packaging the first environmental parameter data through a preset communication protocol to obtain a packaged environmental parameter data packet; encrypting the packaged environmental parameter data packet to obtain an encrypted environmental parameter data packet, and establishing a secure communication channel according to the communication protocol to obtain a secure communication link, wherein the communication protocol is Wi-Fi, Zigbee, LoR Any one of a; transmitting the encrypted environmental parameter data packet to the IoT platform through the secure communication link, and decrypting the encrypted environmental parameter data packet on the IoT platform to obtain a decrypted environmental parameter data packet; unpacking the decrypted environmental parameter data packet on the IoT platform to obtain unpacked environmental parameter data, and performing data format conversion on the unpacked environmental parameter data on the IoT platform to obtain second environmental parameter data; according to a preset data transmission protocol, pushing the second environmental parameter data to the cloud business integration system on the IoT platform, and storing data in the cloud business integration system; The sorting module is used to call the meteorological API interface to obtain historical weather data, and perform data cleaning and sorting on the historical weather data to obtain pre-processed weather data, and at the same time, obtain multiple historical environmental parameter data from the cloud business integration system; specifically includes: constructing an API request parameter set according to the required historical weather type and time range, and calling the meteorological API interface to send a historical weather data request according to the API request parameter set to obtain historical weather data, and the historical weather data includes: temperature, humidity and air temperature at the time point of each day; performing data format conversion and data cleaning on the historical weather data through Python or Java to obtain converted weather data, and performing outlier detection on the converted weather data to obtain to the outlier detection result; according to the outlier detection result, the converted weather data is repaired for outliers to obtain the repaired weather data; the repaired weather data is segmented into time series to obtain a segmented weather data set, and the segmented weather data set is normalized to obtain a normalized weather data set; according to the required weather elements, the corresponding weather element data is extracted from the normalized weather data set to obtain a weather element data set; the weather element data set is feature engineered and data segmented to obtain a training data set and a verification data set, and the training data set and the verification data set are output as pre-processed weather data, and at the same time, a plurality of historical environmental parameter data are obtained from the cloud-based business integration system; A training module is used to input the pre-processed weather data and the multiple historical environmental parameter data into a preset initial AI model for model training to obtain a device control parameter prediction model, and deploy the device control parameter prediction model in the cloud-based business integration system; specifically comprising: selecting an AI model architecture according to the feature dimensions of the pre-processed weather data and the multiple historical environmental parameter data to obtain an initial AI model, wherein the initial AI model is a linear regression model or an LSTM neural network; randomly initializing the parameters of the initial AI model to obtain an AI model with initialized parameters; performing model training on the AI ​​model with initialized parameters on the training data set through a preset loss function to obtain a training intermediate model; performing model evaluation on the training intermediate model on the verification data set to obtain a model evaluation index; adjusting the hyperparameters of the training intermediate model according to the model evaluation index until the model evaluation index meets the preset conditions to obtain a device control parameter prediction model; performing model compression on the device control parameter prediction model to obtain a compressed prediction model, and deploying the compressed prediction model to the cloud-based business integration system through a model deployment tool; The prediction module is used to obtain real-time weather data through the meteorological API interface, and push the real-time weather data to the cloud business integration system. At the same time, the device control parameter prediction model is called to predict the device control parameters of the real-time weather data and the multiple indoor environmental parameter data to obtain initial setting parameters; specifically including: constructing a real-time API request parameter set according to the required real-time weather type and geographical location; periodically calling the meteorological API interface to send real-time weather data requests according to the real-time API request parameter set to obtain real-time weather data; performing data format conversion on the real-time weather data to obtain a first weather data stream, and performing real-time data cleaning on the first weather data stream to obtain a second weather data stream; according to the data transmission protocol, pushing the second weather data stream to the cloud business integration system, and in the cloud business integration system, performing feature engineering processing on the second weather data stream to obtain a real-time weather feature set; feature encoding the real-time weather feature set to obtain a coded weather feature set, and vector conversion of the coded weather feature set to obtain a coded weather feature vector, and vector conversion of the multiple indoor environmental parameter data to obtain a coded environmental parameter vector; The encoded environment parameter vector is subjected to tensor conversion and feature fusion to obtain input features in tensor form; the input features are passed to the input layer of the device control parameter prediction model, and in the hidden layer of the device control parameter prediction model, the input features are subjected to nonlinear transformation according to the hidden layer weight matrix and the hidden layer bias vector to obtain the hidden layer output; the outputs of all hidden layers are calculated in sequence, and the outputs of all hidden layers are input to the output layer of the device control parameter prediction model; in the output layer of the device control parameter prediction model, the outputs of all hidden layers are subjected to weighted summation operation according to the output layer weight matrix and the output layer bias vector to obtain Model prediction output; performing activation function calculation on the model prediction output to obtain an activated prediction output, and performing denormalization processing on the activated prediction output to obtain an unscaled prediction output; decoding the unscaled prediction output to obtain temperature prediction data, humidity prediction data, air pressure prediction data, wind speed prediction data, and wind direction prediction data; fusing the temperature prediction data, humidity prediction data, air pressure prediction data, wind speed prediction data, and wind direction prediction data to obtain fused initial setting parameters; performing time series splitting on the fused initial setting parameters to obtain initial setting parameters at different future time points; The generation module is used to define an objective function according to the multiple indoor environmental parameter data and the user comfort preference parameters, and calculate the optimal device control strategy through an optimization algorithm and optimize the initial setting parameters to generate corresponding device setting parameters; specifically including: modeling the weather factors affecting the indoor environment according to the initial setting parameters to obtain a weather impact model; constructing a comfort evaluation function according to the multiple indoor environmental parameter data and the user comfort preference parameters; combining the weather impact model with the comfort evaluation function to define an objective function, and determining the constraint conditions of the control variables according to the working parameter range of the energy-saving device; and Method, solving the objective function under the constraint conditions to obtain an optimized solution, wherein the optimized algorithm is any one of a PID control algorithm, a linear programming algorithm, and a genetic algorithm; generating corresponding equipment setting parameters according to the optimized solution, wherein the equipment setting parameters include a temperature setting value, a wind speed setting value, and a humidity setting value; performing a feasibility analysis on the equipment setting parameters and eliminating infeasible parameters to obtain a feasible equipment setting parameter set, and selecting the optimal equipment setting parameters from the feasible equipment setting parameter set according to a preset priority rule; performing parameter mapping on the optimal equipment setting parameters to obtain a control instruction set, and generating a corresponding optimal equipment control strategy according to the control instruction set; The adjustment module is used to send the device setting parameters to the IoT platform through the cloud business integration system, and adjust the energy-saving device in real time according to the device setting parameters to achieve indoor environmental adjustment.

3. A computer device, characterized in that: The computer device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the computer device to execute the method for controlling energy-saving equipment based on AI weather prediction as described in claim 1.

Citation Information

Patent Citations

  • Intelligent cloud gateway of industrial IoT (Internet of Things) and communication method of gateway

    CN109150703A

  • Urban building energy hub optimization method and system considering human body temperature comfort

    CN111144610A

  • Online learning based air conditioning temperature non-inductive control method

    CN111486554A

  • Urban traffic flow prediction model construction method based on heterogeneous data fusion

    CN116434538A

  • Tail end air conditioner energy saving method and system based on accurate recommendation equipment control parameters

    CN117387172A