Energy consumption monitoring and optimizing method and system based on large model and multiple agents

Through the energy consumption monitoring and optimization method of large models and multi-agents, combined with Transformer model and hybrid neural network, the shortcomings of the energy consumption management system in the existing technology are solved in processing multimodal data and dynamic environments, and the building energy is realized Accurate prediction and optimized control of consumption improve energy management efficiency and environmental comfort.

CN118916778APending Publication Date: 2024-11-08山东浪潮智慧建筑科技有限公司
View PDF 0 Cites 71 Cited by

Patent Information

Application Number
CN202410785919.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

When handling complex environments and changing user needs, the existing building energy consumption management system lacks real-time response and dynamic optimization capabilities, making it difficult to effectively integrate multimodal data, resulting in unsatisfactory energy consumption management results.

Method used

Using energy consumption monitoring and optimization methods based on large models and multi-agents, data is collected in real time through multi-modal sensors, data fusion and energy consumption prediction are used using Transformer model and hybrid neural network, and multi-agent reinforcement learning system is designed for optimization Control, combined with adaptive pruning and continuous learning technology, achieve efficient operation of the system.

Benefits of technology

Accurate prediction and optimization control of building energy consumption is achieved, the efficiency of energy management and environmental comfort are improved, and the real-time and long-term stability of the system are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916778A_ABST
    Figure CN118916778A_ABST
Patent Text Reader

Abstract

The invention relates to the field of energy management and energy-saving optimization, in particular to an energy consumption monitoring and optimizing method and system based on a large model and multiple agents. According to the invention, a multi-modal sensor network is deployed in a building, and various environmental data such as temperature, illumination intensity and personnel activity and user behavior data are collected in real time. The method comprises the following steps of: preprocessing data, performing multi-modal data fusion by adopting a Transform model to generate a high-dimensional feature vector, inputting the fused feature vector into a mixed neural network model, and performing accurate energy consumption prediction by combining the advantages of a convolutional neural network (CNN) and a long-short term memory (LSTM) network. And based on a prediction result, a multi-agent reinforcement learning algorithm is utilized to carry out optimization control on energy consumption equipment such as air conditioners and illumination equipment, all agents work cooperatively, equipment operation parameters are dynamically adjusted, and global optimal control is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of energy management and energy-saving optimization, and specifically to intelligent building management systems, the Internet of Things, edge computing and artificial intelligence application technologies, especially a building energy consumption monitoring and optimization method based on multimodal data processing and reinforcement learning algorithms. Background Art

[0002] With the continuous growth of global energy demand and the improvement of environmental protection awareness, energy management and energy conservation and emission reduction have become the focus of attention of countries around the world. Building energy consumption accounts for a large proportion of total energy consumption, especially in urban areas. Efficient management of building energy consumption is crucial to achieve sustainable development. However, the existing building energy management system still faces many challenges in dealing with complex environments and changing user needs.

[0003] Traditional building energy management systems usually rely on a single or small number of data sources, such as environmental parameters such as temperature and humidity. These systems mostly use static rules or simple models based on experience to predict energy consumption and control equipment, lacking real-time response and dynamic optimization capabilities, resulting in unsatisfactory energy management results. In addition, these methods have difficulty in handling the complex relationships between multimodal data within buildings, and cannot fully reflect the impact of environmental changes and user behavior on energy consumption.

[0004] With the development of Internet of Things (IoT) technology, multimodal sensor networks are increasingly used in buildings. These sensors can collect a variety of environmental data and user behavior data including temperature, humidity, light intensity, CO2 concentration and human activities in real time. However, how to efficiently integrate and utilize these multimodal data remains a technical problem that needs to be solved.

[0005] On the other hand, artificial intelligence technologies such as deep learning and reinforcement learning have made significant progress in various fields. In particular, the Transformer model has performed well in tasks such as natural language processing and computer vision, and its powerful feature extraction and data fusion capabilities provide new ideas for solving multimodal data processing problems. In addition, multi-agent reinforcement learning achieves optimal control of complex systems through the collaborative work of multiple agents, demonstrating the potential for real-time decision-making and optimization in dynamic environments.

[0006] Although some studies have attempted to apply these advanced technologies to building energy management, there are still problems in practical applications, such as high model complexity, large computing resource requirements, lack of real-time and adaptability. Traditional deep learning models have high computational costs and difficult deployment when processing large-scale multimodal data, and are difficult to run efficiently on resource-constrained edge devices. Therefore, how to design an intelligent building energy management system that can efficiently process multimodal data, achieve accurate energy consumption prediction and optimization control, and adapt to complex dynamic environments has become a hot topic and difficulty in current research. Summary of the invention

[0007] In view of the defects of the prior art, the present invention provides an energy consumption monitoring and optimization method and system based on a large model and multi-agents. Through multimodal data fusion, accurate energy consumption prediction, and intelligent optimization control, it can achieve efficient management of energy-consuming equipment such as air conditioning and lighting inside the building, improve building energy efficiency, reduce energy consumption, and solve many deficiencies in the prior art.

[0008] In order to solve the technical problem, the technical solution adopted by the present invention is: an energy consumption monitoring and optimization method based on a large model and multi-agents, comprising the following steps: S01) Deploy multimodal sensors to collect real-time building internal environment data and user behavior data; S02), the data collected by the multimodal sensor is transmitted to the central data processing center, and the central data processing center pre-processes the received data, and the pre-processing includes cleaning, standardization and feature extraction; S03) The raw data collected by the multimodal sensor and the features extracted by preprocessing are input into the data fusion module. The data fusion module uses the Transformer model to perform multimodal data fusion and captures important features from different data sources through a multi-layer attention mechanism, thereby generating a high-dimensional feature vector. S04), the fused feature vector is input into the hybrid neural network model, the hybrid neural network model includes the convolution neural network CNN and the long short-term memory network LSTM, the convolution neural network CNN is used to extract spatial features and identify the environmental characteristics of each area, the long short-term memory network LSTM is used to capture time series features, identify the time series change law of energy consumption, and realize energy consumption prediction.

[0009] Furthermore, the process of multimodal data fusion by the data fusion module is as follows: S31), obtaining raw data collected by multimodal sensors and features extracted by preprocessing, and converting these data into a format suitable for the Transformer model, that is, aligning the data of each sensor and the features extracted by preprocessing according to timestamps to form a time series matrix, each row of the time series matrix represents multiple sensor data and preprocessing extracted features corresponding to a specific timestamp, and each column of the time series matrix represents a sensor data type or a preprocessing extracted feature; S32) Build a Transformer model and determine the number of layers of the Transformer model encoder, the number of heads of the attention mechanism, and the dimension of the hidden layer according to the building energy consumption scenario; S33) Based on the constructed Transformer model, multimodal data fusion is performed to generate a high-dimensional feature vector.

[0010] Furthermore, the process of energy consumption prediction using the hybrid neural network model is as follows: S41), the shape of the high-dimensional feature vector output by the data fusion module is [(batch size, time step number, high-dimensional feature number)]. These feature vectors have been fused with the spatial and temporal correlations of multimodal data through the Transformer model. These high-dimensional feature vectors are input into the convolutional neural network layer, which further extracts and compresses the spatial features of the high-dimensional feature vectors, specifically: A) Apply multiple one-dimensional convolution kernels to perform convolution operations. Each convolution kernel slides in the time step dimension to capture local features in different time steps. The output shape after the convolution operation is [(batch size, time step, number of convolution output channels)]; B) The pooling layer performs dimensionality reduction on the output of the convolutional layer. The pooling layer operates on the time step dimension, reducing the dimension of the feature map and retaining the main features. The output shape after pooling is [(batch size, time step, number of channels after dimensionality reduction)]; S42), input the pooled feature map into the long short-term memory network LSTM, which captures the long-term dependency and dynamic changes of the feature map in the dimension of time steps. The output of LSTM is the hidden state of each time step, and the shape is [(batch size, number of LSTM units)]; S43), the output of the long short-term memory network LSTM is connected to the fully connected layer. The fully connected layer combines and transforms the features in depth through linear transformation and nonlinear activation function, and finally generates the energy consumption prediction value; for regression tasks, the output layer uses a linear activation function to generate continuous energy consumption values; for classification tasks, the Softmax activation function is used to output the classification probability of the energy consumption state.

[0011] Furthermore, the method further includes step S05), energy consumption optimization, designing a multi-agent reinforcement learning system based on the energy consumption prediction results to optimize the operating parameters of energy-consuming equipment, each agent is responsible for a specific area or type of energy-consuming equipment, and the agent dynamically adjusts the operating parameters of the equipment according to real-time data, and achieves global optimal control by sharing experience and strategies; the state of each agent is composed of energy consumption prediction values ​​and environmental parameters, and the action includes adjusting the operating parameters of the equipment. In order to balance energy consumption optimization and user comfort, the reward function is designed as: , where α and β are weight parameters, i.e., using energy consumption reduction or user comfort improvement as reward signals to adjust the agent's behavior of optimizing energy-consuming equipment; The energy consumption is the energy consumption prediction result output by the hybrid neural network. The discomfort is calculated by comparing the deviation between the actual environmental parameters in the building and the established comfort threshold. The discomfort of different parameters is calculated separately, and then a comprehensive discomfort index is formed by weighted averaging. The comprehensive discomfort index is referenced in the reward function formula. Each intelligent agent adopts a distributed deep reinforcement learning algorithm to improve learning efficiency and effectiveness through experience replay and global strategy update. Experience replay means that each intelligent agent stores its interaction experience in an experience replay pool and samples it regularly for training. The global strategy is that the policy network and value network are updated through the gradient descent method. Each intelligent agent works together by sharing information and strategies.

[0012] Furthermore, the method also includes step S06), adaptive pruning, which optimizes the data fusion module and the hybrid neural network model. The adaptive pruning intelligently identifies and removes redundant parameters in the model, considers the contribution of different layers to the task, and automatically adjusts the specific pruning rate of each layer.

[0013] Furthermore, the method further comprises step S07), continuous learning, wherein continuous learning realizes adaptive continuous learning through online learning and transfer learning, wherein online learning is instant updating of the model upon receiving new sensor data, and transfer learning is accelerating the learning process of new tasks by using previously learned knowledge; The continuous learning module introduces both elastic weight integration and experience replay. Elastic weight integration is to regularize important parameters when training new tasks to ensure that important features of old tasks are not forgotten. Experience replay is to mix historical data with new data, regularly sample from the experience replay pool, and perform training and adjustments to ensure the stability and continuous performance of the model. The above models refer to the Transformer model and the hybrid neural network. Through continuous learning, the Transformer model and the hybrid neural network can adapt to the environment that changes over time and the evolving user needs.

[0014] Furthermore, the feature extraction in step S02) includes statistical feature extraction, frequency domain analysis, and dimensionality reduction. Statistical feature extraction calculates the sliding window statistics of time series data, frequency domain analysis uses fast Fourier transform FFT to extract the main frequency components of energy consumption data, and dimensionality reduction is used to extract the set main components from a complex data set.

[0015] Furthermore, the multimodal sensor includes a temperature sensor, a humidity sensor, a light intensity sensor, a CO2 concentration sensor and a human infrared sensor.

[0016] The present invention also discloses an energy consumption monitoring system based on a large model and multiple agents, comprising: Data collection layer: The data collection layer includes multimodal sensors and sensor management modules. Multimodal sensors collect real-time building internal environment data and user behavior data. The sensor management module is used to monitor the status of sensors and manage the real-time transmission of data. Data processing and fusion layer, the data processing and fusion layer includes data preprocessing module, data storage module and data fusion module. The data preprocessing module receives the data collected by multi-module sensors and performs preprocessing including cleaning, standardization and feature extraction. The data storage module stores the original data collected by multi-modal sensors and the features extracted by preprocessing. The data fusion module uses the Transformer model to fuse the original data collected by multi-modal sensors and the features extracted by preprocessing. Through the multi-layer attention mechanism, it captures the important features in different data sources to generate a high-dimensional feature vector. The data fusion process is: obtain the original data collected by the multi-modal sensor and the preprocessing Process the extracted features and convert them into a format suitable for the Transformer model, that is, align the data of each sensor according to the timestamp to form a time series matrix. Each row of the time series matrix represents multiple sensor data corresponding to a specific timestamp and the features extracted by preprocessing. Each column of the time series matrix represents the data type of a sensor or the features extracted by preprocessing. Build a Transformer model and determine the number of layers of the Transformer model encoder, the number of heads of the attention mechanism, and the dimension of the hidden layer according to the building energy consumption scenario. Perform multimodal data fusion based on the constructed Transformer model to generate a high-dimensional feature vector. Model prediction and optimization layer, the model prediction and optimization layer includes energy consumption prediction module, reinforcement learning module and continuous learning module. After the energy consumption prediction module obtains the high-dimensional feature vector through data fusion, it uses the energy consumption prediction module to predict the energy consumption. The energy consumption prediction module adopts a hybrid neural network. The process of energy consumption prediction is as follows: the high-dimensional feature vector is input into the convolutional neural network layer, and the convolutional neural network layer further extracts and compresses the spatial features of the high-dimensional feature vector. Specifically, A) multiple one-dimensional convolution kernels are applied for convolution operation. Each convolution kernel slides on the time step dimension to capture local features in different time steps. The output shape after convolution operation is [(batch size, time step, number of convolution output channels)]; B) the pooling layer performs dimensionality reduction operation on the output of the convolution layer. The pooling layer operates on the time step dimension to reduce the dimension of the feature map and retain the main features. The output shape after pooling is [(batch size, time step, The pooled feature map is input into the long short-term memory network LSTM, which captures the long-term dependency and dynamic changes of the feature map in the dimension of the number of time steps. The output of LSTM is the hidden state of each time step, and the shape is [(batch size, number of LSTM units)]. The output of the long short-term memory network LSTM is connected to the fully connected layer, which combines and transforms the features in depth through linear transformation and nonlinear activation function, and finally generates the energy consumption prediction value. For regression tasks, the output layer uses a linear activation function to generate continuous energy consumption values. For classification tasks, the Softmax activation function is used to output the classification probability of the energy consumption state. The reinforcement learning module uses a multi-agent reinforcement learning strategy. The energy consumption prediction results after hybrid neural network training will be used as the input of multi-agent reinforcement learning optimization to achieve energy consumption management and optimization. Each agent is responsible for managing a specific area or type of equipment. The state of the agent is composed of energy consumption prediction values ​​and environmental parameters. The action includes adjusting the operating parameters of the equipment. In order to balance energy consumption optimization and user comfort, the reward function is designed as: , where α and β are weight parameters; that is, the behavior of the intelligent agent to optimize energy-consuming equipment is adjusted by using energy consumption reduction or user comfort improvement as reward signals; The energy consumption is the energy consumption prediction result output by the hybrid neural network. The discomfort is calculated by comparing the deviation between the actual environmental parameters in the building and the established comfort threshold. The discomfort of different parameters is calculated separately, and then a comprehensive discomfort index is formed by weighted averaging. The comprehensive discomfort index is referenced in the reward function formula. Each agent uses a distributed deep reinforcement learning algorithm to improve learning efficiency and effectiveness through experience replay and global strategy update. Experience replay means that each agent stores its interaction experience in the experience replay pool and regularly samples it for training. The global strategy is that the policy network and value network are updated through the gradient descent method. Each agent works together by sharing information and strategies. The continuous learning module achieves adaptive continuous learning through online learning and transfer learning. Online learning is the instant update of the model when receiving new sensor data, and transfer learning is to accelerate the learning process of new tasks by using previously learned knowledge. The continuous learning module also introduces elastic weight integration and experience replay. Elastic weight integration is to apply regularization to important parameters when training new tasks to keep the important features of old tasks from being forgotten. Experience replay is to mix historical data with new data, regularly sample from the experience replay pool, and perform training and adjustment to ensure the stability and continuous performance of the model. The above models refer to Transformer models and hybrid neural networks. Through continuous learning, Transformer models and hybrid neural networks can adapt to the environment that changes over time and the evolving user needs. Application layer, the application layer includes real-time feedback and adjustment module, user behavior analysis module and system monitoring and management module.

[0017] Furthermore, the data fusion module also includes model training and evaluation adjustment, selecting the loss function and optimization algorithm suitable for building energy consumption prediction. For energy consumption prediction in regression tasks, the mean square error loss function is used, and for energy consumption scenarios in non-regression tasks, the cross entropy loss function is used. The optimization algorithm selects the Adam optimizer; During the model training process, the preprocessed high-dimensional feature vector is input into the Transformer model, and the model parameters are optimized through multiple rounds of iterations. After each round of training, the validation set data is used to evaluate the performance of the model, and the loss function evaluation index is calculated. According to the evaluation results, the model hyperparameters are adjusted, including the learning rate, the number of encoder layers, and the number of attention heads.

[0018] Beneficial effects of the invention: The invention ensures seamless connection from data collection to application implementation by integrating sensor networks, big data processing and deep learning technologies. In particular, by applying hybrid neural networks and multi-agent reinforcement learning technologies, the system not only optimizes energy consumption, but also improves environmental comfort and system response speed. In addition, the introduction of the continuous learning module enables the system to adapt to changing environmental conditions, ensuring the efficiency and stability of long-term operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a flow chart of the method described in Example 1; Figure 2This is a functional block diagram of the system described in Example 2. DETAILED DESCRIPTION

[0020] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0021] Example 1 This embodiment discloses an energy consumption monitoring and optimization method based on a large model and multiple agents, such as Figure 1 As shown, the following steps are included: S01) Deploy multimodal sensors to collect real-time building internal environment data and user behavior data; S02), the data collected by the multimodal sensor is transmitted to the central data processing center, and the central data processing center pre-processes the received data, and the pre-processing includes cleaning, standardization and feature extraction; S03) The raw data collected by the multimodal sensor and the features extracted in the preprocessing are input into the data fusion module. The data fusion module uses the Transformer model to perform multimodal data fusion and captures the important features in different data sources through a multi-layer attention mechanism, thereby generating a high-dimensional feature vector. S04), the fused feature vector is input into the hybrid neural network model, which includes the convolution neural network CNN and the long short-term memory network LSTM. The convolution neural network CNN is used to extract spatial features and identify the environmental characteristics of each area, such as the spatial distribution of temperature, humidity and light; the long short-term memory network LSTM is used to capture time series features and identify the temporal variation of energy consumption, such as the day and night cycle, the difference between weekdays and weekends, etc. This combination (combining the convolution neural network CNN and the long short-term memory network LSTM) enables the hybrid neural network model to more accurately predict future energy consumption demand; S05) Energy consumption optimization: Based on the energy consumption prediction results, a multi-agent reinforcement learning system is designed to optimize the operating parameters of energy-consuming equipment. Each agent is responsible for a specific area or type of energy-consuming equipment. The agent dynamically adjusts the operating parameters of the equipment according to real-time data and achieves global optimal control by sharing experience and strategies. S06) Adaptive pruning: Adaptive pruning is used to optimize the data fusion module and hybrid neural network model. Adaptive pruning intelligently identifies and removes redundant parameters in the model, considers the contribution of different layers to the task, and automatically adjusts the specific pruning rate of each layer.

[0022] S07) Continuous learning: Continuous learning achieves adaptive continuous learning through online learning and transfer learning. Online learning is the instant update of the model when receiving new sensor data, and transfer learning is to accelerate the learning process of new tasks by using previously learned knowledge; The continuous learning module introduces both elastic weight integration and experience replay. Elastic weight integration is to regularize important parameters when training new tasks to ensure that important features of old tasks are not forgotten. Experience replay is to mix historical data with new data, regularly sample from the experience replay pool, and perform training and adjustments to ensure the stability and continuous performance of the model. The above models refer to the Transformer model and the hybrid neural network. Through continuous learning, the Transformer model and the hybrid neural network can adapt to the environment that changes over time and the evolving user needs.

[0023] In this embodiment, the multimodal sensor includes a temperature sensor, a humidity sensor, a light intensity sensor, a CO2 concentration sensor and a human infrared sensor, which are used to collect temperature, humidity, light intensity, CO2 concentration and personnel activities, etc., which are the basis of energy consumption management. The multimodal sensors are installed in key locations such as offices, conference rooms, public areas, near windows, and at the entrance and exit of ventilation systems. These sensors transmit data to the central data processing center in real time through wireless networks (such as Wi-Fi or LoRa), and are equipped with local caching functions when the network is interrupted to ensure data integrity and continuity. The data processing center cleans, standardizes and extracts features from the collected data. The cleaning step removes noise and outliers, the standardization step converts different types of data into a unified scale, and the feature extraction step extracts key features to provide high-quality data input for subsequent large model data fusion.

[0024] The feature extraction in step S02) (before model training) does not involve machine learning models. It mainly uses statistical feature extraction (sliding window), frequency domain analysis combined with dimensionality reduction (PCA analysis) to supplement information that helps energy consumption prediction. First, the sliding window statistics (mean, median, standard deviation, minimum and maximum) of time series data can be calculated to capture short-term trends and volatility. These statistical features help the model understand the basic behavior of the data, such as intraday and seasonal energy consumption changes. Secondly, using frequency domain analysis (fast Fourier transform FFT) to extract the main frequency components of energy consumption data helps identify periodic change patterns in building energy consumption, such as periodic start and stop of HVAC systems. In addition, the application of principal component analysis (PCA) dimensionality reduction technology can extract the main components from complex data sets, reduce data redundancy, and retain the variables that have the greatest impact on energy consumption, thereby simplifying the calculation of subsequent models and improving processing speed. These processes not only reduce the computational burden of the model, but also help reduce the risk of overfitting, so that the model can focus more on the main trends in the data. When performing these feature extraction operations, care should be taken to keep the data preprocessing steps moderate to avoid excessive processing that leads to the loss of key information. Properly designed feature extraction steps can provide cleaner and more informative inputs to deep learning models, thereby improving prediction accuracy and model generalization capabilities.

[0025] In this embodiment, the data input into the Transformer model includes not only the original data dimensions, but also the features extracted by preprocessing.

[0026] After preprocessing, the data enters the data fusion module of the large model. The Transformer model is used for multimodal data fusion. Through the multi-layer attention mechanism, the model can effectively capture the important features of different data sources, ignore redundant information, and thus generate high-dimensional feature vectors. These feature vectors fully reflect the environmental changes and personnel activities inside the building, providing a solid data foundation for energy consumption prediction and optimization. In this embodiment, the process of multimodal data fusion by the data fusion module is as follows: S31), obtain the preprocessed data (including temperature, humidity, light intensity, CO2 concentration and human activity data), and convert these data into a format suitable for the Transformer model, that is, align the data of each sensor according to the timestamp to form a time series matrix. Each row of the time series matrix represents multiple sensor data corresponding to a specific timestamp. Multiple sensor data can be represented as a multidimensional vector: [temperature, humidity, light intensity, CO2 concentration, human activity, feature]. Each column of the time series matrix represents the data type of a sensor or the feature extracted by preprocessing; for example, the first column represents the data of the temperature sensor, and the second column represents the data of the humidity sensor.

[0027] S32) Build a Transformer model and determine the number of layers of the Transformer model encoder, the number of heads of the attention mechanism, and the dimension of the hidden layer according to the building energy consumption scenario.

[0028] The number of encoder layers determines the complexity and depth that the model can handle. For typical building energy consumption scenarios (office buildings, residences, shopping malls, etc. due to the use of air conditioning, lighting, heating, etc.), this embodiment selects a 6-layer encoder, which can capture multi-level spatiotemporal features. Secondly, the number of heads of the multi-head attention mechanism determines the number of different features that the model can focus on at the same time. This embodiment selects an 8-head attention mechanism so that the model can process different environmental features in parallel, such as the interaction between temperature and humidity. Finally, the size of the hidden layer determines the output dimension of each layer of the encoder. Selecting a hidden layer size of 512 dimensions can not only ensure the expressiveness of the model, but also strike a balance between computational complexity and performance.

[0029] S33) Based on the constructed Transformer model, multimodal data fusion is performed to generate a high-dimensional feature vector.

[0030] In this embodiment, the Transformer model is also trained and evaluated. First, a loss function and optimization algorithm suitable for building energy consumption prediction are selected. For energy consumption prediction in regression tasks, the commonly used loss function is the mean square error (MSE), which can effectively measure the difference between the predicted value and the actual value and reduce the impact of large errors. For non-regression tasks (discrete types) energy consumption scenarios such as classification type energy consumption prediction of high energy consumption and low energy consumption states, the cross entropy loss function is used. The optimization algorithm selects the Adam optimizer, which is an adaptive learning rate optimization algorithm that can quickly converge and adapt to the learning needs of different model parameters to ensure the efficient performance of the model in building energy consumption management tasks. During the model training process, the preprocessed high-dimensional feature vector is input into the Transformer model, and the model parameters are optimized through multiple rounds of iterations. After each round of training, the performance of the model is evaluated using the validation set data, and evaluation indicators such as MSE are calculated. According to the evaluation results, the model hyperparameters, such as the learning rate, the number of encoder layers, and the number of attention heads, are adjusted to ensure the prediction accuracy and generalization ability of the model. If it is found that the model performs well on the training set but poorly on the validation set, there may be an overfitting problem. At this time, the model complexity can be appropriately reduced (reducing the number of layers in the model, reducing the number of heads in the multi-head attention mechanism, adjusting the dimension of the hidden layer), or increasing the regularization term; in order to improve the stability and robustness of the model, this embodiment also introduces a cross-validation method to evaluate the model performance under different training-validation set divisions to ensure the stable performance of the model under various data distributions. In addition, the changing trend of the loss function during the training process is continuously monitored to avoid gradient explosion or vanishing problems, and the parameters or model structure of the optimization algorithm are adjusted when necessary. Through these steps, the efficient and accurate prediction of the Transformer model in the building energy consumption scenario is ensured to support intelligent energy consumption optimization control.

[0031] After the Transformer fuses the multimodal data to obtain a high-dimensional feature vector, this embodiment uses the vector through a hybrid neural network to predict energy consumption. The specific process of energy consumption prediction is: S41), the shape of the high-dimensional feature vector output by the data fusion module is [(batch size, time step number, high-dimensional feature number)]. These feature vectors have been fused with the spatial and temporal correlations of multimodal data through the Transformer model. These high-dimensional feature vectors are input into the convolutional neural network layer, which further extracts and compresses the spatial features of the high-dimensional feature vectors, specifically: A) Apply multiple one-dimensional convolution kernels to perform convolution operations. Each convolution kernel slides in the time step dimension to capture local features in different time steps. The output shape after the convolution operation is [(batch size, time step, number of convolution output channels)]; B) The pooling layer performs dimensionality reduction on the output of the convolutional layer. The pooling layer (such as maximum pooling or average pooling) operates on the time step dimension to reduce the dimension of the feature map and retain the main features. The output shape after pooling is [(batch size, time step, number of channels after dimensionality reduction)]; S42), input the pooled feature map into the long short-term memory network LSTM, which captures the long-term dependency and dynamic changes of the feature map in the dimension of time steps. The output of LSTM is the hidden state of each time step, and the shape is [(batch size, number of LSTM units)]; S43) In order to further integrate the information in the time series, the output of the long short-term memory network LSTM is connected to the fully connected layer, which combines and transforms the features in depth through linear transformation and nonlinear activation function, and finally generates the energy consumption prediction value; for regression tasks, the output layer uses linear activation function to generate continuous energy consumption values; for classification tasks, the Softmax activation function is used to output the classification probability of energy consumption status. In the end, this hybrid neural network architecture can not only accurately predict the energy consumption of buildings, but also respond to environmental changes in real time, and realize intelligent energy consumption management and optimization.

[0032] In this embodiment, the data collected by the multimodal sensor is used for different types of prediction tasks according to its application target. For regression tasks, including directly predicting the energy consumption of the building (e.g., kilowatt-hours per hour), the data input includes temperature, humidity, light intensity, and time information, etc., which reflect the key environmental factors and time periodicity that affect energy consumption. The regression model using these data aims to output specific energy consumption values, and the mean square error (MSE) is usually used as the loss function to optimize the prediction accuracy. Non-regression tasks include classification or threshold determination of energy consumption, such as determining whether the energy consumption exceeds a set threshold in a specific period of time, or grading energy consumption into high, medium, and low levels. The data input of this type of task includes personnel activity monitoring, door and window status (affecting air conditioning and heating efficiency), and the operating status of specific equipment (key equipment such as elevators, water pumps, and large printers), etc. These data help evaluate the usage status of the building and potential energy consumption peaks. The non-regression model uses the cross entropy loss function to handle this type of classification or discrimination task, which helps to optimize the accuracy of the classification results.

[0033] This embodiment designs a multi-agent reinforcement learning system for optimizing the operating parameters of energy-consuming equipment such as air-conditioning systems and lighting systems. Each agent is responsible for a specific device and optimizes the control through a distributed deep reinforcement learning algorithm. The agent dynamically adjusts the operating parameters of the equipment based on real-time data, and achieves global optimal control by sharing experience and strategies. For example, when the number of people in an office suddenly increases, the human infrared sensor will detect this change, and adjust the operating state of the air conditioner through the multi-agent system to improve the cooling or heating efficiency to maintain a comfortable indoor environment. The multi-agent reinforcement learning algorithm used by the system can handle complex multi-device collaborative optimization problems, significantly improving the optimization efficiency and response speed of the system.

[0034] Specifically, the state of each agent consists of energy consumption prediction and environmental parameters, and the action includes adjusting the operating parameters of the equipment. In order to balance energy consumption optimization and user comfort, the reward function is designed as follows: , where α and β are weight parameters, that is, the behavior of the intelligent agent to optimize energy consumption equipment is adjusted by reducing energy consumption or improving user comfort as reward signals.

[0035] Discomfort is calculated by comparing the deviation of the actual environmental parameters (temperature, humidity, light intensity, etc.) in the building with the established comfort thresholds (such as the ideal indoor temperature of 22°C, humidity of 50%, and light of 500 lumens). These deviations can be calculated separately and then combined into a comprehensive discomfort index by weighted average, where the weight of each parameter is set according to its impact on the comfort of the occupants. For example, the deviation of temperature may be given a higher weight than that of light. In addition, this discomfort index is usually standardized to a range of 0 to 100 to more intuitively reflect the comfort level, where 0 represents complete comfort and 100 represents extreme discomfort.

[0036] Energy consumption is the energy consumption prediction result output by the neural network. The energy consumption prediction in the system is generated based on the neural network model of historical energy consumption data and environmental parameters. These predictions help managers optimize energy use and achieve the dual goals of energy saving and comfort. If the model predicts that energy consumption will increase in a certain period of time in the future while the comfort level is low, the system may recommend lowering the heating setting to reduce energy consumption while maintaining appropriate comfort, thereby scientifically adjusting the building energy management strategy to ensure the optimization of energy efficiency and living comfort.

[0037] In this way, discomfort and energy consumption prediction data jointly support the intelligent building management system to make more reasonable energy usage decisions, achieving the dual goals of energy saving and improving occupant comfort.

[0038] Each intelligent agent adopts a distributed deep reinforcement learning algorithm to improve learning efficiency and effectiveness through experience replay and global strategy update. Experience replay means that each intelligent agent stores its interaction experience in an experience replay pool and samples it regularly for training. The global strategy is that the policy network and value network are updated through the gradient descent method. Each intelligent agent works together by sharing information and strategies.

[0039] In order to further improve the computing efficiency and resource utilization of the system, the present invention introduces lightweight model pruning technology. Through the adaptive pruning strategy, the redundant parameters in the model are intelligently identified and removed, and the pruning rate of each layer is dynamically adjusted, which significantly reduces the computing requirements and resource consumption of the model. The adaptive pruning strategy takes into account the contribution of different layers to the task, automatically adjusts the specific pruning rate of each layer, and ensures that while retaining key features, the redundant parameters are minimized to the maximum extent. This intelligent pruning method improves the pruning efficiency and effect of the model, so that the model can run efficiently on resource-constrained edge devices. At the same time, in order to enable the Transformer model and hybrid neural network to adapt to environmental changes in the long term, this embodiment introduces transfer learning, elastic weight consolidation (Elastic Weight Consolidation, EWC) and experience replay technology, so that the Transformer model and hybrid neural network can continue to learn and update when receiving new data and new tasks, ensuring the timeliness and effectiveness of the energy management strategy. Transfer learning enables pre-trained models to quickly adapt to new environments. EWC technology avoids forgetting knowledge of old tasks by applying regularization to important parameters when training new tasks. Experience replay technology helps Transformer models and hybrid neural networks retain memory of old knowledge by training with a mixture of historical data and new data.

[0040] Example 2 This embodiment discloses an energy consumption monitoring and optimization system based on a large model and multiple agents, such as Figure 2 As shown in Figure 1, the system has four main layers of architecture: data collection layer, data processing and fusion layer, model prediction and optimization layer, and application layer, to ensure smooth data transmission and efficient processing. Figure 2 ) provide detailed descriptions of specific implementation methods.

[0041] First, at the data collection layer, the system has a sensor network module and a sensor management module. The sensor network module is responsible for collecting environmental data inside and outside the building and user behavior data, such as temperature, humidity, light intensity, CO2 concentration, and personnel activities, which are the basis of energy consumption management. The sensor management module monitors the status of the sensor, manages the real-time transmission of data, and ensures the continuity and accuracy of data collection.

[0042] Enter the data processing and fusion layer, which includes a data preprocessing module, a data storage module and a data fusion module. The data preprocessing module cleans, standardizes and extracts features from the collected multimodal data, removes noise and improves data quality. The data storage module uses efficient big data technology to store processed data, supporting fast access and large-scale data management. The data fusion module is one of the key technical implementations, and the specific operation is as follows: After obtaining the cleaned multimodal data (including temperature, humidity, light intensity, CO2 concentration and personnel activities), these data are converted into a format suitable for the Transformer model, that is, the data of each sensor is aligned according to the timestamp to form a time series matrix. Each row of the matrix represents a specific timestamp, which can be expressed as a multidimensional vector: [temperature, humidity, light intensity, CO2 concentration, personnel activities]. Each column of the matrix represents the data type of a sensor. Next, the Transformer model is constructed, and the number of encoder layers determines the complexity and depth that the model can handle. For typical building energy consumption scenarios (office buildings, residences, shopping malls, etc. due to the use of air conditioning, lighting, heating, etc.), this embodiment selects a 6-layer encoder to capture multi-level spatiotemporal features. Secondly, the number of heads in the multi-head attention mechanism determines the number of different features that the model can focus on at the same time. This embodiment selects an 8-head attention mechanism so that the model can process different environmental features in parallel, such as the interaction between temperature and humidity. Finally, the size of the hidden layer determines the output dimension of each layer of encoder. Choosing a hidden layer size of 512 dimensions can not only ensure the expressiveness of the model, but also strike a balance between computational complexity and performance.

[0043] The next step is model training and evaluation adjustment: This embodiment selects a loss function and optimization algorithm suitable for building energy consumption prediction. For energy consumption prediction in regression tasks, the commonly used loss function is the mean square error (MSE), which can effectively measure the difference between the predicted value and the actual value and reduce the impact of large errors. For non-regression tasks (discrete types) energy consumption scenarios such as classification type energy consumption prediction of high energy consumption and low energy consumption states, this embodiment can use the cross entropy loss function. The optimization algorithm selects the Adam optimizer, which is an adaptive learning rate optimization algorithm that can quickly converge and adapt to the learning needs of different model parameters to ensure the high performance of the model in building energy consumption management tasks. During the model training process, this embodiment inputs the preprocessed high-dimensional feature vector into the Transformer model and optimizes the model parameters through multiple rounds of iterations. After each round of training, the performance of the model is evaluated using the validation set data, and evaluation indicators such as MSE are calculated. According to the evaluation results, adjust the model hyperparameters, such as the learning rate, the number of encoder layers, and the number of attention heads, to ensure the prediction accuracy and generalization ability of the model. If it is found that the model performs well on the training set but poorly on the validation set, there may be an overfitting problem. At this time, the model complexity can be appropriately reduced (reducing the number of layers in the model, reducing the number of heads in the multi-head attention mechanism, adjusting the dimension of the hidden layer), or increasing the regularization term; in order to improve the stability and robustness of the model, this embodiment also introduces a cross-validation method to evaluate the model performance under different training-validation set divisions to ensure the stable performance of the model under various data distributions. In addition, the changing trend of the loss function during the training process is continuously monitored to avoid gradient explosion or vanishing problems, and the parameters or model structure of the optimization algorithm are adjusted when necessary. Through these steps, the efficient and accurate prediction of the Transformer model in the building energy consumption scenario is ensured to support intelligent energy consumption optimization control.

[0044] The model prediction and optimization layer has three modules: energy consumption prediction module, reinforcement learning optimization control module, and continuous learning module. The energy consumption prediction module is one of the key technical implementations. After the Transformer fuses multimodal data to obtain a high-dimensional feature vector, this embodiment uses a hybrid neural network to predict energy consumption. First, the shape of the obtained high-dimensional feature vector is [(batch size, time step number, high-dimensional feature number)]. These feature vectors have integrated the spatial and temporal correlations of multimodal data through the Transformer model. These high-dimensional feature vectors are input into the convolutional neural network (CNN) layer, and the CNN layer is used to further extract and compress the spatial features of the high-dimensional feature vectors. The specific operation includes applying multiple one-dimensional convolution kernels for convolution operations. Each convolution kernel will slide on the time step dimension to capture local features in different time steps. The output shape after the convolution operation is [(batch size, time step number, number of convolution output channels)]. Then, the output of the convolutional layer is reduced in dimension through the pooling layer. The pooling layer (such as maximum pooling or average pooling) operates on the time step dimension to reduce the dimension of the feature map and retain the main features. The output shape after pooling is still [(batch size, time step, number of channels after dimension reduction)]. Next, the pooled feature map is input into the long short-term memory network (LSTM) layer. The LSTM layer is used to capture the long-term dependencies and dynamic changes of the feature map in the time step dimension. The output of the LSTM is the hidden state of each time step, and the shape is [(batch size, number of LSTM units)]. In order to further integrate the information in the time series, the output of the LSTM layer is connected to the fully connected layer. The fully connected layer combines and transforms the features in depth through linear transformation and nonlinear activation function, and finally generates the energy consumption prediction value. For regression tasks, the output layer uses a linear activation function to generate continuous energy consumption values; for classification tasks, the Softmax activation function is used to output the classification probability of the energy consumption state. Ultimately, this hybrid neural network architecture can not only accurately predict the energy consumption of buildings, but also respond to environmental changes in real time to achieve intelligent energy management and optimization.

[0045] The reinforcement learning optimization control module is also one of the key technologies: using multi-agent reinforcement learning strategies. The energy consumption prediction results after hybrid neural network training will be used as the input of multi-agent reinforcement learning optimization to achieve efficient energy consumption management and optimization. Each agent is responsible for managing a specific area or type of equipment, such as the air conditioning system or lighting system on a floor. The state of the agent consists of the energy consumption prediction value and environmental parameters (such as temperature, humidity, light intensity, etc.), and the action includes adjusting the operating parameters of the equipment (air conditioning temperature set point, fan speed, lighting brightness, etc.). In order to balance energy consumption optimization and user comfort, the reward function is designed as: [R = -(α⋅energy consumption + β⋅discomfort], where α and β are weight parameters. Each agent uses the distributed deep reinforcement learning algorithm MADDPG (Multi-Agent Deep Deterministic PolicyGradient) to improve learning efficiency and effect through experience replay and global policy update. Each agent stores its interaction experience in the experience replay pool and samples it regularly for training to break the time correlation. The policy network and value network are updated by the gradient descent method to ensure that the agent can make the best decision in a complex environment. According to the real-time environmental data and energy consumption prediction results, each agent dynamically adjusts the equipment operation parameters. For example, when the floor temperature and personnel activity data change, the air conditioning system's agent will instantly adjust the temperature set point and fan speed to maintain comfort and optimize energy consumption. Agents work together by sharing information and strategies to avoid control conflicts and resource waste, ensure that the system can respond to environmental changes in real time, and provide efficient energy consumption optimization solutions. This method not only significantly reduces the energy consumption of the building, but also improves user comfort, demonstrating stability and efficiency in complex and changing environments.

[0046] The continuous learning module ensures that the system can adapt to changes in the environment and needs. It continuously updates and improves the model by continuously receiving new data and tasks, thereby enhancing the adaptability and flexibility of the system. In order to achieve adaptive continuous learning, the system uses online learning and transfer learning technologies to continuously update model parameters. Online learning technology enables the model to be updated instantly when new sensor data is received, avoiding the problem of model performance degradation when the environment changes. Transfer learning technology accelerates the learning process of new tasks by using previously learned knowledge (such as pre-trained models), thereby improving the adaptability of the model. In addition, in order to prevent the model from forgetting old knowledge during the update process, the system introduces Elastic Weight Consolidation (EWC) technology, which keeps the important features of old tasks from being forgotten by applying regularization to important parameters when training new tasks. Experience replay technology is also key. By mixing historical data with new data, the model can adapt to new environments and tasks while maintaining memory of old knowledge. In specific operations, the system will regularly sample from the experience replay pool for training and adjustment to ensure the stability and continuous performance of the model. Through this adaptive continuous learning and adjustment technology, the building energy management system can optimize energy consumption strategies in real time in a dynamically changing environment, improve energy utilization efficiency and ensure user comfort.

[0047] In this embodiment, reinforcement learning is used to optimize the operation of energy-consuming devices, including HVAC systems, lighting systems, and other key devices. Through this learning method, the system is able to learn the optimal control strategy through real-time interaction with the environment to reduce energy consumption and improve efficiency. Specifically, the reinforcement learning model continuously explores and utilizes different device control strategies through trial and error methods, and adjusts its behavior based on reward signals such as reduced energy consumption or improved user comfort. This enables the system to dynamically adjust operating parameters in response to changes in the external environment and changes in internal usage conditions, achieving optimal use of energy and effective control of costs.

[0048] Continuous learning focuses on the adaptability and evolution of the entire system, especially the core models used for prediction and analysis in the system, namely the Transformer model and hybrid neural network. The goal of continuous learning is to enable these prediction models to adapt to the changing environment and evolving user needs over time. Through online learning and model update mechanisms, these models continuously learn from new data and adjust their internal parameters to reflect the latest data trends and patterns. This learning strategy ensures the continued accuracy of model predictions and the real-time nature of related decision support. For example, as the seasons change, the building usage changes, or new technologies are implemented, the continuous learning mechanism can update the model in a timely manner, so that the system remains sensitive and responsive to new situations, thereby maintaining the effectiveness and foresight of energy management strategies.

[0049] The application layer includes the real-time feedback and adjustment module, the user behavior analysis module, and the system monitoring and management module. The real-time feedback and adjustment module uses edge computing technology to quickly process data, adjust system settings in a timely manner, and improve the system's response speed and operating efficiency. The user behavior analysis module uses attention mechanisms and recurrent neural networks to deeply analyze user behavior patterns and preferences, provide personalized energy consumption optimization suggestions, and enhance user satisfaction. The system monitoring and management module comprehensively monitors the system's operating status, and supports managers in real-time decision-making and system performance optimization through data visualization and report generation.

[0050] This invention describes an advanced intelligent building energy management system that uses a layered architecture to achieve accurate data collection, efficient processing, dynamic prediction, and intelligent optimization. The system ensures seamless integration from data collection to application implementation by integrating sensor networks, big data processing, and deep learning technologies. In particular, by applying hybrid neural networks and multi-agent reinforcement learning technologies, this system not only optimizes energy consumption, but also improves environmental comfort and system response speed. In addition, the introduction of a continuous learning module enables the system to adapt to changing environmental conditions, ensuring efficiency and stability in long-term operation. The design and implementation of this system demonstrates how to achieve effective management and optimization of energy consumption through technological innovation in the field of intelligent buildings.

[0051] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes, or a transient storage medium.

[0052] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method or device including the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0053] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. The technicians may clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0054] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically separately, or two or more units may be integrated in one unit.

[0055] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A method for energy consumption monitoring and optimization based on a large model and multiple agents, characterized by: The following steps are involved: S01) Deploy multimodal sensors to collect real-time building internal environment data and user behavior data; S02), the data collected by the multimodal sensor is transmitted to the central data processing center, and the central data processing center pre-processes the received data, and the pre-processing includes cleaning, standardization and feature extraction; S03) The raw data collected by the multimodal sensor and the features extracted by preprocessing are input into the data fusion module. The data fusion module uses the Transformer model to perform multimodal data fusion and captures important features from different data sources through a multi-layer attention mechanism, thereby generating a high-dimensional feature vector. S04), the fused feature vector is input into the hybrid neural network model, the hybrid neural network model includes the convolution neural network CNN and the long short-term memory network LSTM, the convolution neural network CNN is used to extract spatial features and identify the environmental characteristics of each area, the long short-term memory network LSTM is used to capture time series features, identify the time series change law of energy consumption, and realize energy consumption prediction.

2. The energy consumption monitoring and optimization method based on large model and multi-agent according to claim 1 is characterized in that: The process of multimodal data fusion by the data fusion module is as follows: S31), obtaining raw data collected by multimodal sensors and features extracted by preprocessing, and converting these data into a format suitable for the Transformer model, that is, aligning the data of each sensor and the features extracted by preprocessing according to timestamps to form a time series matrix, each row of the time series matrix represents multiple sensor data and preprocessing extracted features corresponding to a specific timestamp, and each column of the time series matrix represents a sensor data type or a preprocessing extracted feature; S32) Build a Transformer model and determine the number of layers of the Transformer model encoder, the number of heads of the attention mechanism, and the dimension of the hidden layer according to the building energy consumption scenario; S33) Based on the constructed Transformer model, multimodal data fusion is performed to generate a high-dimensional feature vector.

3. The energy consumption monitoring and optimization method based on large model and multi-agent according to claim 1 is characterized in that: The process of energy consumption prediction using the hybrid neural network model is as follows: S41), the shape of the high-dimensional feature vector output by the data fusion module is [(batch size, time step number, high-dimensional feature number)]. These feature vectors have been fused with the spatial and temporal correlations of multimodal data through the Transformer model. These high-dimensional feature vectors are input into the convolutional neural network layer, which further extracts and compresses the spatial features of the high-dimensional feature vectors, specifically: A) Apply multiple one-dimensional convolution kernels to perform convolution operations. Each convolution kernel slides in the time step dimension to capture local features in different time steps. The output shape after the convolution operation is [(batch size, time step, number of convolution output channels)]; B) The pooling layer performs dimensionality reduction on the output of the convolutional layer. The pooling layer operates on the time step dimension, reducing the dimension of the feature map and retaining the main features. The output shape after pooling is [(batch size, time step, number of channels after dimensionality reduction)]; S42), input the pooled feature map into the long short-term memory network LSTM, which captures the long-term dependency and dynamic changes of the feature map in the dimension of time steps. The output of LSTM is the hidden state of each time step, and the shape is [(batch size, number of LSTM units)]; S43), the output of the long short-term memory network LSTM is connected to the fully connected layer. The fully connected layer combines and transforms the features in depth through linear transformation and nonlinear activation function, and finally generates the energy consumption prediction value; for regression tasks, the output layer uses a linear activation function to generate continuous energy consumption values; for classification tasks, the Softmax activation function is used to output the classification probability of the energy consumption state.

4. The energy consumption monitoring and optimization method based on large model and multi-agent according to claim 1 is characterized in that: The system also includes step S05), energy consumption optimization, designing a multi-agent reinforcement learning system based on the energy consumption prediction results to optimize the operating parameters of energy-consuming equipment. Each agent is responsible for a specific area or type of energy-consuming equipment. The agent dynamically adjusts the operating parameters of the equipment according to real-time data, and achieves global optimal control by sharing experience and strategies. The state of each agent is composed of energy consumption prediction values ​​and environmental parameters, and the action includes adjusting the operating parameters of the equipment. In order to balance energy consumption optimization and user comfort, the reward function is designed as: , where α and β are weight parameters, i.e., using energy consumption reduction or user comfort improvement as reward signals to adjust the agent's behavior of optimizing energy-consuming equipment; The energy consumption is the energy consumption prediction result output by the hybrid neural network. The discomfort is calculated by comparing the deviation between the actual environmental parameters in the building and the established comfort threshold. The discomfort of different parameters is calculated separately, and then a comprehensive discomfort index is formed by weighted averaging. The comprehensive discomfort index is referenced in the reward function formula. Each intelligent agent adopts a distributed deep reinforcement learning algorithm to improve learning efficiency and effectiveness through experience replay and global strategy update. Experience replay means that each intelligent agent stores its interaction experience in an experience replay pool and samples it regularly for training. The global strategy is that the policy network and value network are updated through the gradient descent method. Each intelligent agent works together by sharing information and strategies.

5. The energy consumption monitoring and optimization method based on large model and multi-agent according to claim 1 is characterized in that: The method also includes step S05), adaptive pruning, which optimizes the data fusion module and the hybrid neural network model. The adaptive pruning intelligently identifies and removes redundant parameters in the model, considers the contribution of different layers to the task, and automatically adjusts the specific pruning rate of each layer.

6. The energy consumption monitoring and optimization method based on large model and multi-agent according to claim 1 is characterized in that: The method further comprises step S07), continuous learning, wherein continuous learning realizes adaptive continuous learning through online learning and transfer learning, wherein online learning is instant updating of the model upon receiving new sensor data, and transfer learning is accelerating the learning process of new tasks by using previously learned knowledge; The continuous learning module introduces both elastic weight integration and experience replay. Elastic weight integration is to regularize important parameters when training new tasks to ensure that important features of old tasks are not forgotten. Experience replay is to mix historical data with new data, regularly sample from the experience replay pool, and perform training and adjustments to ensure the stability and continuous performance of the model. The above models refer to the Transformer model and the hybrid neural network. Through continuous learning, the Transformer model and the hybrid neural network can adapt to the environment that changes over time and the evolving user needs.

7. The energy consumption monitoring and optimization method based on large model and multi-agent according to claim 1 is characterized in that: The feature extraction in step S02) includes statistical feature extraction, frequency domain analysis, and dimensionality reduction. Statistical feature extraction calculates the sliding window statistics of time series data. Frequency domain analysis uses fast Fourier transform (FFT) to extract the main frequency components of energy consumption data. Dimension reduction is used to extract the set main components from complex data sets.

8. The energy consumption monitoring and optimization method based on large model and multi-agent according to claim 1 is characterized in that: The multimodal sensor includes a temperature sensor, a humidity sensor, a light intensity sensor, a CO2 concentration sensor and a human infrared sensor.

9. An energy consumption monitoring system based on a large model and multiple agents, characterized in that: include: Data collection layer: The data collection layer includes multimodal sensors and sensor management modules. Multimodal sensors collect real-time building internal environment data and user behavior data. The sensor management module is used to monitor the status of sensors and manage the real-time transmission of data. Data processing and fusion layer, the data processing and fusion layer includes data preprocessing module, data storage module and data fusion module. The data preprocessing module receives the data collected by multi-module sensors and performs preprocessing including cleaning, standardization and feature extraction. The data storage module stores the original data collected by multi-modal sensors and the features extracted by preprocessing. The data fusion module uses the Transformer model to fuse the original data collected by multi-modal sensors and the features extracted by preprocessing. Through the multi-layer attention mechanism, it captures the important features in different data sources to generate a high-dimensional feature vector. The data fusion process is: obtain the original data collected by the multi-modal sensor and the preprocessing Process the extracted features and convert them into a format suitable for the Transformer model, that is, align the data of each sensor according to the timestamp to form a time series matrix. Each row of the time series matrix represents multiple sensor data corresponding to a specific timestamp and the features extracted by preprocessing. Each column of the time series matrix represents the data type of a sensor or the features extracted by preprocessing. Build a Transformer model and determine the number of layers of the Transformer model encoder, the number of heads of the attention mechanism, and the dimension of the hidden layer according to the building energy consumption scenario. Perform multimodal data fusion based on the constructed Transformer model to generate a high-dimensional feature vector. Model prediction and optimization layer, the model prediction and optimization layer includes energy consumption prediction module, reinforcement learning module and continuous learning module. After the energy consumption prediction module obtains the high-dimensional feature vector through data fusion, it uses the energy consumption prediction module to predict the energy consumption. The energy consumption prediction module adopts a hybrid neural network. The process of energy consumption prediction is as follows: the high-dimensional feature vector is input into the convolutional neural network layer, and the convolutional neural network layer further extracts and compresses the spatial features of the high-dimensional feature vector. Specifically, A) multiple one-dimensional convolution kernels are applied for convolution operation. Each convolution kernel slides on the time step dimension to capture local features in different time steps. The output shape after convolution operation is [(batch size, time step, number of convolution output channels)]; B) the pooling layer performs dimensionality reduction operation on the output of the convolution layer. The pooling layer operates on the time step dimension to reduce the dimension of the feature map and retain the main features. The output shape after pooling is [(batch size, time step, The pooled feature map is input into the long short-term memory network LSTM, which captures the long-term dependency and dynamic changes of the feature map in the dimension of the number of time steps. The output of LSTM is the hidden state of each time step, and the shape is [(batch size, number of LSTM units)]. The output of the long short-term memory network LSTM is connected to the fully connected layer, which combines and transforms the features in depth through linear transformation and nonlinear activation function, and finally generates the energy consumption prediction value. For regression tasks, the output layer uses a linear activation function to generate continuous energy consumption values. For classification tasks, the Softmax activation function is used to output the classification probability of the energy consumption state. The reinforcement learning module uses a multi-agent reinforcement learning strategy. The energy consumption prediction results after hybrid neural network training will be used as the input of multi-agent reinforcement learning optimization to achieve energy consumption management and optimization. Each agent is responsible for managing a specific area or type of equipment. The state of the agent is composed of energy consumption prediction values ​​and environmental parameters. The action includes adjusting the operating parameters of the equipment. In order to balance energy consumption optimization and user comfort, the reward function is designed as: , where α and β are weight parameters; , that is, the behavior of the intelligent agent to optimize energy-consuming equipment is adjusted by using energy consumption reduction or user comfort improvement as reward signals; The energy consumption is the energy consumption prediction result output by the hybrid neural network. The discomfort is calculated by comparing the deviation between the actual environmental parameters in the building and the established comfort threshold. The discomfort of different parameters is calculated separately, and then a comprehensive discomfort index is formed by weighted averaging. The comprehensive discomfort index is referenced in the reward function formula. Each agent uses a distributed deep reinforcement learning algorithm to improve learning efficiency and effectiveness through experience replay and global strategy update. Experience replay means that each agent stores its interaction experience in the experience replay pool and regularly samples it for training. The global strategy is that the policy network and value network are updated through the gradient descent method. Each agent works together by sharing information and strategies. The continuous learning module implements adaptive continuous learning through online learning and transfer learning. Online learning is the instant update of the model when receiving new sensor data, and transfer learning is to accelerate the learning process of new tasks by using previously learned knowledge; The continuous learning module introduces elastic weight integration and experience replay. Elastic weight integration is to regularize important parameters when training new tasks to ensure that important features of old tasks are not forgotten. Experience replay is to mix historical data with new data, regularly sample from the experience replay pool, and perform training and adjustment to ensure the stability and continuous performance of the model. The above models refer to the Transformer model and the hybrid neural network. Through continuous learning, the Transformer model and the hybrid neural network can adapt to the environment that changes over time and the evolving user needs. Application layer, the application layer includes real-time feedback and adjustment module, user behavior analysis module and system monitoring and management module.

10. The energy consumption monitoring and optimization method based on large model and multi-agent according to claim 9 is characterized in that: The data fusion module also includes model training and evaluation adjustment, selecting loss functions and optimization algorithms suitable for building energy consumption prediction. For energy consumption prediction in regression tasks, the mean square error loss function is used, and for energy consumption scenarios in non-regression tasks, the cross entropy loss function is used. The optimization algorithm selects the Adam optimizer; During the model training process, the preprocessed high-dimensional feature vector is input into the Transformer model, and the model parameters are optimized through multiple rounds of iterations. After each round of training, the validation set data is used to evaluate the performance of the model, and the loss function evaluation index is calculated. According to the evaluation results, the model hyperparameters are adjusted, including the learning rate, the number of encoder layers, and the number of attention heads.

Citation Information

Cited By

  • Frequency control method and system for power grid tool management RFID system

    CN119150898A

  • A frequency control method and system for power grid tool management RFID system

    CN119150898B

  • Self-adaptive container expansion method, system, equipment and medium

    CN119179552A

  • Time sequence similarity measurement method based on twin neural network and terminal

    CN119357707A

  • Manned submersible observation window stress prediction method based on machine learning

    CN119378337A