An edge-computing-based multi-sensor fusion intelligent door and window adaptive control method and system
Patent Information
- Application Number
- CN202611186706.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-11-03
AI Technical Summary
Existing multi-sensor smart door and window control schemes are difficult to effectively unify the physical coupling relationship of heterogeneous sensor data, leading to decision conflicts. Furthermore, they lack dynamic reliability assessment and environmental change trend prediction capabilities, making it difficult to achieve reasonable multi-objective door and window control.
An edge computing-based multi-sensor fusion intelligent door and window adaptive control method is adopted. It is executed locally through an edge intelligent gateway, and the physical coupling relationship of sensors is used to perform unified data representation and dynamic reliability assessment. It combines a temporal causal convolutional network to predict environmental change trends and adopts a Pareto front decision framework for multi-objective trade-off decision-making.
It achieves unified representation and dynamic reliability assessment of heterogeneous sensor data, enabling proactive door and window control in edge computing environments, reducing decision-making conflicts, improving response speed and decision rationality, and protecting user privacy.
Smart Images

Figure CN123029791A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent building environment control technology, and in particular to a multi-sensor fusion intelligent door and window adaptive control method and system based on edge computing. Background Technology
[0002] With the development of sensor technology and the smart home industry, smart door and window control systems are gradually evolving from a threshold triggering mode based on a single sensor to a comprehensive control mode based on multi-sensor collaborative perception. In indoor environmental management scenarios such as residences, office buildings, and laboratories, it is often necessary to deploy multiple types of sensors simultaneously, including those for temperature, humidity, CO2, PM2.5, wind speed, light intensity, rainfall, noise, and human presence, to comprehensively assess the status of indoor thermal comfort, air quality, safety protection, and energy consumption management, thereby driving the door and window actuators to perform corresponding opening and closing actions.
[0003] Existing multi-sensor smart door and window control solutions mainly include three technical approaches: cloud-based centralized control, local rule engine control, and independent sensor threshold triggering. The cloud-based centralized control solution uploads raw data from various sensors to a remote server, where a cloud model calculates and issues control commands. However, the response latency of its complete communication link can reach several seconds in weak network environments, making it difficult to meet the real-time window-closing requirements during sudden storms. Furthermore, the continuous transmission of temperature, humidity, and occupant activity data collected by sensors around the clock poses a privacy risk. The local rule engine control solution deploys predefined conditional triggering rules on the home gateway. However, when the number of sensor types expands to eight or more, the number of rule combinations grows exponentially, becoming unmaintainable. Fixed rules also cannot handle the nonlinear coupling relationships between sensor data determined by building thermal processes. While the independent sensor threshold triggering solution has a simple structure, the independent judgment of each sensor inevitably generates conflicting control commands. For example, if CO2 exceedances require opening windows while PM2.5 exceedances require closing windows simultaneously, a simple prioritization will completely ignore environmental requirements in one dimension.
[0004] The common problem faced by the above three technical approaches is that the data output by heterogeneous sensors have fundamental differences in physical dimensions, numerical range, data type, and sampling frequency. Existing solutions either perform simple normalization and splicing processing on these heterogeneous data, thereby losing the coupling information between sensors determined by physical laws, or treat the readings of all sensors with static fixed weights, ignoring the fact that the measurement accuracy of the same sensor may drift significantly under different environmental conditions. In addition, the lack of predictive ability for environmental change trends means that only passive "snapshot" responses can be made. As a result, the system is unable to make reasonable door and window control decisions that take into account multiple objectives such as health, comfort, safety, and energy saving in complex scenarios with conflicting sensor data. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing intelligent door and window control schemes, such as the lack of unified semantic representation and dynamic reliability assessment mechanism for heterogeneous sensor data oriented towards physical coupling relationships, and the lack of predictable and interpretable localized solution methods for multi-objective decision conflicts. This invention provides an adaptive control method and system for intelligent doors and windows based on edge computing and multi-sensor fusion, which can achieve unified representation of heterogeneous sensor data, online dynamic assessment of sensor reliability, forward-looking prediction of environmental change trends, and situational adaptive trade-off decision-making between multiple conflicting objectives under fully localized computational constraints.
[0006] To achieve the above objectives, the present invention adopts the following technical solution.
[0007] An edge computing-based multi-sensor fusion intelligent door and window adaptive control method, the method being executed locally by an edge intelligent gateway, includes the following steps: Acquire sampling data from multiple heterogeneous sensors during the current control cycle. The heterogeneous sensors include at least a temperature sensor, a humidity sensor, a carbon dioxide sensor, a fine particulate matter concentration sensor, a wind speed sensor, a light sensor, a rain sensor, and a window position encoder. Based on the coupling relationships between the physical processes represented by each sensor, the heterogeneous sensors are divided into several physical coupling groups. For continuous sensors, local temporal feature vectors are extracted from their reading sequences within a preset-length historical window through one-dimensional convolution. For discrete sensors, feature vectors with the same dimension as the local temporal feature vectors are mapped using an embedded lookup table. Multi-head self-attention operations are used to fuse the feature vectors of each sensor. Specifically, the scaled dot product between the query vector and the key vector obtained by linear transformation of the feature vectors of each sensor is scored. First, normalization is performed on all key sensors corresponding to each query sensor to obtain an attention weight matrix. Then, the attention weight matrix is multiplied element-wise by the attention mask matrix, and the multiplication result is processed according to each query sensor. All corresponding key sensors are renormalized, and finally, the value vectors of each sensor are weighted and summed using the attention weights obtained from the renormalization. The attention mask matrix is a non-negative matrix with elements ranging from zero to one. The mask elements between sensors within the same physical coupling group and between each sensor and itself are set to preset fixed values. The mask elements between sensors with known cross-group physical coupling relationships are set to trainable parameters initialized with physical prior values and constrained to the zero-to-one range. The mask elements between other sensors are set to zero, so that the attention weights obtained from the renormalization between sensors without known physical coupling relationships are always zero. The fusion results corresponding to each physical coupling group are concatenated and mapped to an environmental semantic embedding vector of a preset dimension through a projection layer. Thus, heterogeneous sensor data with different physical dimensions are uniformly mapped to the same low-dimensional semantic space, and the structure of the embedding space is constrained by prior knowledge of architectural physics. Each dimension corresponds to interpretable environmental factors semantically, avoiding the loss of coupling information caused by simple normalization concatenation. Meanwhile, since the attention weights applied by the mask gating to the normalized attention weights are renormalized after the gating, the attention links between sensors that do not have known physical coupling are completely severed, while the mask elements between sensors that have cross-group coupling directly characterize the passage ratio of the link, so that the physical prior constraint on the interaction strength is mathematically exact.
[0008] For each sensor, the dynamic reliability weight of that sensor in the current control cycle is determined by the product of the basic reliability, the environmental condition attenuation factor, and the health status factor. The environmental condition attenuation factor is determined by the amount of interference in the environment corresponding to that sensor type according to a preset attenuation relationship. The health status factor is determined by the standardized deviation obtained by dividing the difference between the sensor's current reading and its historical moving average by the sum of the historical moving standard deviation and a preset positive constant. The dynamic reliability weight is used to weight and correct the feature contributions of each sensor in the environmental semantic embedding vector generation process. The introduction of the preset positive constant ensures that the calculation of the standardized deviation remains stable even when the sensor reading remains constant for a long time, causing the historical moving standard deviation to approach zero.
[0009] The environmental semantic embedding vectors of multiple consecutive control cycles are arranged into an input sequence according to time and fed into a temporal causal convolutional network. The output is the basic prediction embedding vector for several future time steps under the condition that the current window opening remains unchanged.
[0010] Multiple discrete candidate window opening values are selected within a preset opening range. For each candidate opening value, the environmental semantic embedding vector of the current control cycle, the candidate opening value, and the current actual window opening are used as inputs to obtain a control correction amount through a control correction network. The control correction amount is then superimposed on the basic prediction embedding vector to obtain a conditional prediction embedding vector coupled with the candidate opening value. This conditional prediction embedding vector is then mapped to a predicted physical quantity with physical dimensions through a semantic decoding network. Thus, the differentiated impacts of different candidate control actions on the future environmental state are explicitly modeled, providing a causal coupling basis between actions and states for subsequent multi-objective optimization.
[0011] Based on the predicted physical quantities corresponding to each candidate opening value, the objective function values for health, comfort, safety, and energy saving are calculated respectively. Then, a non-dominated sort is performed on all candidate opening values to obtain the Pareto front solution set composed of candidate opening values that are not dominated by the other candidate opening values.
[0012] Based on the environmental context determined by the current sampling data and the information of the current time period, a target opening value is selected from the Pareto front solution set. After applying a preset rate-of-change limit to the change of the target opening value relative to the output value of the previous control cycle, it is output to the door and window actuator. The complete preservation of the Pareto front solution set ensures that the real conflict relationship between the objectives is not obscured by weighted summation, and the context-driven compromise selection allows the decision-making focus to automatically adjust according to the environmental state.
[0013] As a preferred embodiment of the present invention, the physical coupling group includes a thermal environment group, an air quality group, an external environment group, and an independent group. The thermal environment group includes the temperature sensor and the humidity sensor. The air quality group includes the carbon dioxide sensor and the fine particulate matter concentration sensor. The external environment group includes the wind speed sensor, the light sensor, and the rainfall sensor. The independent group includes a noise sensor, a human infrared sensor, and the window position encoder.
[0014] As a preferred embodiment of the present invention, the environmental condition attenuation factor is determined according to the sensor type. Specifically, the environmental condition attenuation factor of the temperature sensor is determined by the solar radiation intensity, and it takes full value when the solar radiation intensity is below a first radiation threshold, decreases linearly with the solar radiation intensity when the solar radiation intensity is between the first and second radiation thresholds, and decreases exponentially with the solar radiation intensity when the solar radiation intensity is not lower than the second radiation threshold. The environmental condition attenuation factor of the humidity sensor is determined by the rate of change of indoor temperature according to a piecewise decreasing relationship. The environmental condition attenuation factors of the carbon dioxide sensor and the fine particulate matter concentration sensor recover from their attenuation values exponentially with the duration of window opening when the window is open, and the time constant of the exponential relationship is determined according to the sensor's measurement principle. The environmental condition attenuation factor of the rainfall sensor is assigned a graded value based on the consistency of its multiple consecutive detection results. This classification modeling method can characterize the gradual accuracy drift of normally functioning sensors under adverse conditions, and is not limited to binary discrimination of sensor faults.
[0015] As a preferred embodiment of the present invention, the historical moving average and the historical moving standard deviation are obtained by statistically analyzing the sampling data of the sensor within a preset backtracking time, and the sampling data during the transition period after the door and window actions are excluded during the statistical analysis; the health status factor takes full value when the absolute value of the standardized deviation is less than the first deviation threshold, decreases exponentially with the absolute value when the absolute value of the standardized deviation is between the first deviation threshold and the second deviation threshold, and takes zero when the absolute value of the standardized deviation is not less than the second deviation threshold.
[0016] As a preferred embodiment of the present invention, the temporal causal convolutional network includes multiple cascaded causal convolutional modules. Each causal convolutional module comprises a one-dimensional causal convolutional layer, a weight normalization layer, a modified linear activation layer, and a random dropout layer. The dilation factor of each causal convolutional module increases progressively in powers of two, and the total receptive field determined by the sum of the dilation factors of each causal convolutional module and the kernel size is not less than the length of the input sequence. The output of the temporal causal convolutional network includes residual connections derived from the input sequence and fully connected layers that map the feature dimension to the product of the prediction time step and the embedding dimension. This structure ensures that the receptive field of the top-level neurons completely covers the input sequence while making the output depend only on the current and previous inputs, thus meeting the causal requirements of online real-time inference.
[0017] As a preferred embodiment of the present invention, the control correction network is a fully connected network containing at least two hidden layers. It is trained using the environmental state differences caused by changes in window opening in historical sampling data as a supervision signal, and the control correction amount for all candidate opening values is calculated in parallel. The semantic decoding network and the generation process of the environmental semantic embedding vector constitute an autoencoder structure and are jointly trained with reconstruction loss. The output components of the semantic decoding network correspond to indoor temperature, indoor relative humidity, carbon dioxide concentration, fine particulate matter concentration, outdoor wind speed, and rainfall status, respectively. By adopting a two-stage structure that separates basic prediction and control correction, the complete temporal convolutional inference can be avoided for each candidate action while obtaining action condition prediction.
[0018] As a preferred embodiment of the present invention, the health objective function value decreases as the carbon dioxide concentration and the fine particulate matter concentration exceed their respective health thresholds; the comfort objective function value decreases as the absolute value of the predicted average voting index determined by the indoor temperature and the indoor relative humidity increases; the safety objective function value decreases as the product of the rainfall state quantity and the candidate opening value increases, and also decreases as the product of the outdoor wind speed exceeding the safe wind speed threshold and the candidate opening value increases; the energy efficiency objective function value decreases as the absolute value of the difference between the indoor temperature and the HVAC set temperature and the candidate opening value increases when the HVAC is in operation, and takes a constant value when the HVAC is in a stopped state. The operating status of the HVAC is obtained by querying through the communication interface of the edge intelligent gateway or inferred from the changing trend of the temperature sensor readings.
[0019] As a preferred embodiment of the present invention, the step of selecting the target opening value from the Pareto front solution set based on the environmental context includes: when the sampling data indicates that rainfall is occurring or the wind speed exceeds the safe wind speed threshold, sorting the Pareto front solution set according to the safety objective function value and selecting the candidate opening value that ranks first in the sorting; when the current time period information indicates that it is nighttime and the human infrared sensor indicates that there are people indoors, sorting the Pareto front solution set according to the comfort objective function value and selecting the candidate opening value that ranks first in the sorting; in other cases, selecting the candidate opening value with the largest distribution entropy of the four objective function values in the Pareto front solution set.
[0020] A multi-sensor fusion intelligent door and window adaptive control system based on edge computing includes an edge intelligent gateway and a door and window actuator connected to the output end of the edge intelligent gateway. The edge intelligent gateway is provided with a perception coding layer, a dynamic credibility evaluation layer, a temporal causal convolution prediction layer and a Pareto front decision layer that are cascaded in sequence. The perceptual coding layer includes a one-dimensional convolutional feature extraction unit, an embedding query mapping unit, an intra-group multi-head self-attention fusion unit, and a cross-group semantic projection unit. The one-dimensional convolutional feature extraction unit extracts local temporal feature vectors from the reading sequence of continuous sensors within a preset-length historical window. The embedding query mapping unit maps the state values of discrete sensors to feature vectors with the same dimension as the local temporal feature vectors. The intra-group multi-head self-attention fusion unit divides each sensor into a physical coupling group according to the physical process coupling relationship, fuses the feature vectors of each sensor using multi-head self-attention operations, and also uses the normalized attention weight matrix obtained in the multi-head self-attention operations to... The attention mask matrix is multiplied element by element, and the result of the multiplication is normalized according to all key sensors corresponding to each query sensor. Then, the result is weighted and summed with the value vector of each sensor. The attention mask matrix is a non-negative matrix with element values in the interval between zero and one. The mask elements between sensors in the same physical coupling group and between each sensor and itself are taken as preset fixed values. The mask elements between sensors with known cross-group physical coupling relationships are taken as trainable parameters initialized with physical prior values and constrained to the interval between zero and one. The mask elements between other sensors are taken as zero. The cross-group semantic projection unit is used to stitch together the fusion results of each physical coupling group and map them into an environmental semantic embedding vector of a preset dimension. The dynamic reliability assessment layer includes a basic reliability calibration unit, an environmental condition attenuation calculation unit, and a sensor health status monitoring unit. It is used to determine the dynamic reliability weight of each sensor by multiplying the outputs of the three units. The sensor health status monitoring unit determines the health status factor by dividing the difference between the current sensor reading and its historical moving average by the sum of the historical moving standard deviation and a preset positive constant. The dynamic reliability weight is fed back to the perception coding layer to perform weighted correction on the feature contribution of each sensor. The temporal causal convolutional prediction layer is used to form an input sequence from the environmental semantic embedding vectors of multiple consecutive control cycles in a temporal order, and output the basic prediction embedding vector for several future time steps under the condition that the current window opening remains unchanged. The Pareto front decision layer includes a control effect correction unit, a semantic decoding unit, an objective function calculation unit, a fast non-dominated sorting unit, a situation adaptive selection unit, and a control action smoothing unit connected in sequence. The control effect correction unit calculates control correction amounts for each discrete candidate opening value within a preset opening range and superimposes them onto the basic prediction embedding vector to obtain a conditional prediction embedding vector coupled with each candidate opening value. The semantic decoding unit maps the conditional prediction embedding vector to predicted physical quantities with physical dimensions. The objective function calculation unit calculates four objective function values—health, comfort, safety, and energy saving—based on the predicted physical quantity values. The fast non-dominated sorting unit performs non-dominated sorting on all candidate opening values to obtain a Pareto front solution set. The situation adaptive selection unit selects a target opening value from the Pareto front solution set based on the current environmental situation. The control action smoothing unit applies a preset rate of change limit to the change of the target opening value relative to the output value of the previous control cycle and outputs the limited opening command to the door and window actuator. All operations of the above layers and units are completed locally on the edge smart gateway. The original sensor data, environmental semantic embedding vectors, and intermediate operation results of each layer are not transmitted to the external network.
[0021] As a preferred embodiment of the present invention, the edge intelligent gateway further includes a federated meta-learning update module. This module performs local training on the global model parameters using local historical sampling data, and uploads the locally trained model gradients, after pruning and noise injection, to the federated aggregation server. It does not upload the original sensor data, environmental semantic embedding vectors, or intermediate decision results. Furthermore, when the edge intelligent gateway is first connected, the module loads the meta-parameters obtained by the federated aggregation server through inner and outer double-layer cyclic meta-learning as the initial model parameters, and performs a preset number of gradient updates using locally collected sampling data to achieve adaptive behavior. Thus, the newly deployed edge intelligent gateway can adapt to the unique thermal characteristics of the building without manual reconfiguration of control rules.
[0022] The beneficial effects of this invention are as follows: A structured embedded encoder is built on the edge intelligent gateway. Prior constraints are imposed on the embedding space using known coupling relationships between sensors in building physics, mapping sensor data from more than ten different physical quantities to embedding vectors in the same low-dimensional semantic space. Based on this unified representation, combined with an environmental condition attenuation model and sensor health status monitoring, the dynamic reliability weights of each sensor are output in real time. This eliminates the decision bias caused by neglecting sensor accuracy drift in traditional equal-weighted fusion methods. At the decision layer, a Pareto front multi-objective optimization framework is adopted. The complete non-dominated solution set structure is preserved for the four objective functions of health, comfort, safety, and energy efficiency. A situation-adaptive selection mechanism dynamically selects a compromise solution from the Pareto front solution set based on the urgency of the current environmental state, avoiding the complete suppression of low-priority objectives by fixed priority rules. A lightweight temporal causal convolutional network is deployed in the prediction layer. It uses environmental semantic embedding vector sequences from past time steps to predict future environmental change trends. A control effect correction mechanism causally couples the prediction results with candidate control actions, transforming door and window control from a passive response to a proactive, continuous opening adjustment, reducing the frequency of repeated opening and closing of doors and windows near critical conditions. All the above calculations are performed locally on the edge smart gateway; raw sensor data and intermediate decision results are not transmitted to external networks, ensuring user privacy while meeting real-time decision-making requirements. Attached Figure Description
[0023] Figure 1 A schematic diagram of the architecture of the multi-sensor fusion intelligent door and window adaptive control system based on edge computing provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating the multi-sensor fusion intelligent door and window adaptive control method based on edge computing provided in an embodiment of the present invention.
[0024] The reference numerals in the attached figures are explained as follows: 100. Edge Intelligent Gateway; 200. Perceptual Encoding Layer; 210. One-Dimensional Convolutional Feature Extraction Unit; 220. Embedded Query Mapping Unit; 230. Intra-Group Multi-Head Self-Attention Fusion Unit; 240. Cross-Group Semantic Projection Unit; 300. Dynamic Credibility Assessment Layer; 310. Basic Credibility Calibration Unit; 320. Environmental Condition Attenuation Calculation Unit; 330. Sensor Health Status Monitoring Unit; 400. Temporal Causal Convolutional Prediction Layer; 500. Pareto Front Decision Layer; 505. Control Effect Correction Unit; 506. Semantic Decoding Unit; 510. Objective Function Calculation Unit; 520. Fast Non-Dominated Ranking Unit; 530. Context Adaptive Selection Unit; 540. Control Action Smoothing Unit; 600. Federated Meta-Learning Update Module; 700. Door and Window Actuator. Detailed Implementation
[0025] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the following embodiments are only used to illustrate the technical solution of the present invention, and are not intended to limit the scope of protection of the present invention.
[0026] like Figure 1 As shown, the multi-sensor fusion intelligent door and window adaptive control system based on edge computing provided by this invention is deployed on an edge intelligent gateway 100 and consists of four functional layers cascaded from bottom to top: a perception coding layer 200, a dynamic credibility evaluation layer 300, a temporal causal convolutional prediction layer 400, and a Pareto front decision layer 500. The edge intelligent gateway 100 also includes a federated meta-learning update module 600, used to achieve distributed model collaborative evolution among multiple edge intelligent gateways 100 of the same type of building. The output of the Pareto front decision layer 500 is connected to a door and window actuator 700, which includes an electric push rod or motor drive component for receiving control commands and realizing continuously adjustable execution of door and window opening. All computation processes in this four-layer architecture are completed locally on the edge intelligent gateway 100. Raw sensor data, embedded vectors, and intermediate computation results of each layer are not transmitted to external networks, thus ensuring localized data processing and a secure boundary for residential privacy at the structural level.
[0027] The perception coding layer 200 is responsible for performing unified semantic representation on various heterogeneous sensors connected to the edge smart gateway 100. The sensor types supported by this invention include, but are not limited to, the following ten categories: temperature sensor S1, outputting continuous floating-point data in °C with a sampling frequency of 1 Hz; humidity sensor S2, outputting continuous floating-point data in %RH with a sampling frequency of 1 Hz; carbon dioxide sensor S3, outputting continuous floating-point data in ppm with a sampling frequency of 0.2 Hz; and fine particulate matter concentration sensor S4, outputting continuous floating-point data in μg / m³. 3The following sensors are used for the signal processing: a wind speed sensor (S5) outputs continuous floating-point data in m / s at a sampling frequency of 1 Hz; a light sensor (S6) outputs continuous floating-point data in lux at a sampling frequency of 1 Hz; a rain sensor (S7) outputs discrete state values or continuous rainfall values in Boolean or mm / h, updated via event triggering; a noise sensor (S8) outputs continuous floating-point data in dB at a sampling frequency of 1 Hz; a human infrared sensor (S9) outputs Boolean data indicating the presence of people indoors, updated via event triggering; and a window position encoder (S10) outputs continuous floating-point data representing the current window opening percentage at a sampling frequency of 10 Hz. The data output by the above ten types of sensors differ significantly in terms of physical dimensions, numerical range, sampling frequency, and data type. If the raw readings of each sensor are simply normalized and concatenated into a feature vector and fed into the decision model, on the one hand, the coupling information that naturally exists between sensor data due to physical laws will be lost, and on the other hand, it will be difficult to provide a semantic expression with sufficient discriminative power for subsequent multi-objective optimization.
[0028] To this end, the perception coding layer 200 adopts a structured embedding coding scheme. Its core concept is to apply prior constraints to the structure of the embedded space by utilizing known sensor coupling relationships from building physics. Specifically, the perception coding layer 200 divides the ten types of sensors into four physical coupling groups based on the inherent correlation between the physical processes reflected by the sensors. The thermal environment group includes temperature sensor S1 and humidity sensor S2, which share the constraints of the thermal comfort equation; that is, in the calculation system for predicting the average voting index, temperature and humidity exhibit a product coupling characteristic. The air quality group includes carbon dioxide sensor S3 and fine particulate matter concentration sensor S4, which have a positive correlation coupling characteristic in the calculation framework for indoor air age and air exchange rate. The external environment group includes wind speed sensor S5, light sensor S6, and rainfall sensor S7, which together describe the outdoor weather conditions and are mutually constrained by the heat transfer model and ventilation model of the building envelope. The independent group includes noise sensor S8, human infrared sensor S9, and window position encoder S10. The physical processes of each sensor in this group are relatively independent, but they still participate in subsequent coding as an important supplementary dimension of environmental semantics.
[0029] After completing the sensor grouping, the one-dimensional convolutional feature extraction unit 210 within the sensing coding layer 200 performs local feature extraction on the recent time-series readings of each continuous sensor. For any continuous sensor... One-dimensional convolutional feature extraction unit 210 in the past Sensor reading sequence at each time step As input, a one-dimensional convolution operation with a kernel size of 3 and a filter count of 8 is used to extract the local temporal feature vector of the sensor. , here The default value is set to 16 time steps. This one-dimensional convolution operation can be expressed as:
[0030] For discrete sensors, namely rain sensor S7 and human infrared sensor S9, the embedding query mapping unit 220 in the perception coding layer 200 maps their discrete state values to an 8-dimensional vector representation consistent with the feature dimension of the continuous sensor in a learnable embedding lookup table manner, thereby aligning the heterogeneous sensors in the dimension of the feature space.
[0031] After obtaining the local temporal feature vectors of each sensor, the intra-group multi-head self-attention fusion unit 230 within the perception coding layer 200 performs multi-head self-attention operation on the feature vectors of all connected sensors. It utilizes a structured attention mask matrix to achieve strong coupling modeling within the same physical coupling group and controlled coupling penetration between sensors with known cross-group physical coupling relationships, thereby learning the nonlinear interaction relationships between sensors. Let the set of feature vectors of all connected sensors be... The multi-head self-attention fusion unit 230 within the group queries the matrix. Key matrix Sum matrix The query vector is obtained by performing linear transformations on the feature vector set. Key vector Sum value vector The fused features are obtained according to the following attention calculation formula:
[0032] in Let M be the dimension of the key vector. The attention operation described above is performed within the scope of all sensor feature vectors accessed, and the attention weights are gated element-wise by the structured mask matrix M, thus making the interaction strength between different sensors subject to physical priors. It is important to clarify the application of the mask matrix M: the mask matrix M is not applied to the attention scoring matrix before normalization, but rather to the normalized attention weight matrix, and after application, it must be re-normalized according to all key sensors corresponding to each query sensor. This is because if mask elements with values of zero are applied to the scoring matrix before normalization through element-wise multiplication or addition, the scores at the corresponding positions will be set to zero or remain unchanged. After exponential operation, these positions will still receive non-zero weights (e raised to the power of zero equals 1). This not only fails to sever the attention links between sensors without physical coupling, but may also give them weights higher than those of strongly coupled sensor pairs with negative scores, contradicting the design intention of constraining the interaction strength between sensors with physical priors. Therefore, the multi-head self-attention fusion unit 230 within the group calculates the mask-gated attention output using the following formula:
[0033]
[0034] In the above formula, N represents the total number of sensors connected to the edge intelligent gateway 100; q, k, and v represent the query vector, key vector, and value vector obtained by linear transformation of the sensor feature vectors, respectively; subscripts i and j represent the serial numbers of the query sensor and the key sensor, respectively; α is the original attention weight obtained by normalizing all key sensors corresponding to each query sensor; M is the mask element of the corresponding sensor pair in the mask matrix; α with a tilde is the attention weight after mask gating and renormalization; and o is the attention output of the corresponding query sensor. Since all mask elements are non-negative, and the mask elements between each sensor and itself are 1, the denominator of the above formula is always positive, and there is no numerical singularity in the renormalization process; in engineering implementation, a very small positive constant can be superimposed on the denominator to further ensure numerical stability. For sensor pairs with a mask element of zero, the gated attention weights are strictly zero, thus completely severing the attention links between sensors that have no physical coupling. For cross-group coupled sensor pairs with a mask element that is a trainable parameter, the mask element directly represents the proportion of attention weights passing through this pair of sensors. For example, a value of 0.3 indicates that the cross-group coupling link participates in the fusion with approximately 30% strength, giving the strength of the physical prior a clear and interpretable meaning mathematically. To maintain the above gating semantics and ensure numerical stability during training, the trainable parameter is constrained to the range of 0 to 1. This can be achieved by performing truncated projection after each gradient update, or by parameterizing it as the value of an unconstrained real parameter mapped by a sigmoid function.
[0035] As an alternative implementation, when it is not necessary to retain the continuous values of cross-group coupling strength, i.e., the mask matrix degenerates into a binary matrix containing only 0 and 1 values, the mask can also be applied additively to the scoring matrix before normalization. That is, a negative constant with a sufficiently large absolute value (usually -10 to the power of 9 instead of negative infinity in engineering implementation) is superimposed on the attention score of sensor pairs with mask elements set to zero, so that the attention weights after normalization tend to be zero. This implementation is equivalent to the aforementioned method of applying gating to the normalized weights in the case of binary masks, but it cannot express the continuous adjustment of cross-group coupling strength. Therefore, this embodiment preferably adopts the method of applying gating to the normalized attention weights and then re-normalizing them.
[0036] A key design feature of the multi-head self-attention fusion unit 230 within the group is its attention mask matrix. The initialization method differs from traditional self-attention mechanisms that use all-one matrices or random initialization. This invention utilizes prior physical knowledge to initialize the mask matrix. Perform structured initialization: if the sensor and sensors If they come from the same physical coupling group, then If the sensor and sensors There exist known but not directly co-located physical coupling relationships, such as temperature indirectly affecting carbon dioxide concentration through human activity. Initialize to a trainable parameter The initial value of this parameter is given by knowledge from the field of building physics, with typical values such as initializing the coupling strength between temperature and carbon dioxide to 0.3; if the sensor and sensors If there is no known physical coupling relationship between them, then In the subsequent model training process, trainable parameters The embedding space is fine-tuned with gradient updates, enabling it to maintain its physical prior structure while possessing data-driven adaptability. Furthermore, the diagonal elements of the mask matrix are always 1, ensuring that the attention links between each sensor and itself are always fully preserved, thus guaranteeing that the denominator of the aforementioned renormalization operation is always positive.
[0037] After the overall self-attention operation with mask constraints by the multi-head self-attention fusion unit 230 within the group, each sensor obtains an attention output that fuses strong coupling information within the group and physical coupling information across groups. The attention outputs of each sensor are then grouped according to their respective physical coupling groups to obtain the fused feature representation corresponding to each physical coupling group. The attention output of the thermal environment group is denoted as... The attention output of the air quality group is denoted as The attention output of the external environment group is denoted as The attention output of the independent group is denoted as The four symbols mentioned above represent the feature tensors output by the sensors belonging to their respective coupling groups after processing by the multi-head self-attention fusion unit 230 within the group. The cross-group semantic projection unit 240 concatenates the above four attention outputs along the feature dimension, and then maps them to a unified 64-dimensional semantic space through a fully connected projection layer to obtain the time step. Contextual semantic embedding vector Its mathematical expression is:
[0038] in This is a unified semantic representation of the current environmental state, which will serve as the common input basis for the subsequent dynamic credibility evaluation layer 300, the temporal causal convolutional prediction layer 400, and the Pareto front decision layer 500. Due to physical prior constraints, each dimension of this embedding vector semantically corresponds to interpretable environmental factors, exhibiting higher information density and physical consistency compared to traditional simple concatenation features.
[0039] The dynamic reliability assessment layer 300 sits above the perception coding layer 200. Its function is to evaluate the reliability of data from each sensor under the current operating conditions in real time during each control cycle, and output corresponding dynamic reliability weights to correct the environmental semantic embedding vector output by the perception coding layer 200. In actual deployment environments, the measurement accuracy of sensors of the same model may vary significantly under different environmental conditions. For example, the reading deviation of an infrared temperature sensor can reach 3-5°C under direct sunlight, and the response time of a capacitive humidity sensor can degrade from seconds to minutes under conditions of drastic temperature fluctuations. If the reliability of such dynamic changes is not modeled, and all sensor outputs are treated as equally weighted reliable data, the subsequent decision-making model will make inappropriate judgments when sensor accuracy degrades.
[0040] Dynamic reliability assessment layer 300 pairs for each sensor At any moment Dynamic credibility weight The calculation is determined by the product of three multiplicative factors:
[0041] in The basic confidence level of the sensor is given by the basic confidence level calibration unit 310. This value is determined by the sensor's factory calibration parameters and installation location characteristics. It is calibrated and stored in the local configuration file of the edge smart gateway 100 during the initial deployment of the system. The environmental condition reliability attenuation factor output by the environmental condition attenuation calculation unit 320 reflects the gradual drift of sensor accuracy as current environmental conditions change. The sensor health status factor output by the sensor health status monitoring unit 330 reflects whether the sensor itself has any abnormalities.
[0042] The environmental condition attenuation calculation unit 320 constructs attenuation function models between environmental conditions and measurement accuracy for different types of sensors. For temperature sensor S1, its environmental condition reliability attenuation factor is related to solar radiation intensity. The relationship between them is modeled as follows: when hour, ;when hour, ;when hour, Solar radiation intensity here It can be calculated by combining the readings of the light sensor S6 with the current time and geographical location information. The above piecewise function is constructed based on the fact that when solar radiation is at a low level, the measurement accuracy of the temperature sensor is not affected, the accuracy decreases linearly as radiation increases, and the accuracy decreases exponentially when radiation reaches an extremely high level, thus characterizing the interference characteristics of solar radiation on the temperature sensor in a gradual manner.
[0043] For humidity sensor S2, the environmental condition attenuation calculation unit 320 calculates the rate of temperature change. As the dominant factor in credibility decay. When hour, ;when hour, ;when hour, The physical basis for this modeling is that when the indoor temperature changes rapidly, such as when a window is suddenly opened for ventilation and hot and cold air is exchanged, the response of the capacitive humidity sensor is significantly delayed, and the transient accuracy of its readings is greatly reduced.
[0044] For the carbon dioxide sensor S3 and the fine particulate matter concentration sensor S4, the environmental condition attenuation calculation unit 320 uses the window opening status and opening duration as key variables for reliability attenuation. Taking the carbon dioxide sensor S3 as an example, its attenuation model is as follows:
[0045] in For indicator functions, This represents the time elapsed since the window was opened. Let be the airflow recovery time constant of the sensor. For a carbon dioxide sensor employing the non-dispersive infrared principle, The typical value is about 30 seconds; for fine particulate matter concentration sensors that use the laser scattering principle, The typical value is about 15 seconds. The physical fact reflected by this model is that when doors and windows are opened, the influx of outdoor air will disturb the measurement cavity of these two types of sensors, and the sensors need a period of time to stabilize before their readings recover to a reliable level.
[0046] For the rainfall sensor S7, the environmental condition attenuation calculation unit 320 adopts a discrete reliability assignment method based on detection consistency: if three consecutive detection results are consistent, then... If only the one or two most recent results are consistent, then If the detection results fluctuate, for example due to false triggering caused by wind disturbance or occasional water droplet splashing, then This design can effectively suppress false rainfall signals from rain gauges caused by non-raindrop impacts during windy weather.
[0047] The sensor health status monitoring unit 330 uses the historical statistical characteristics of the output values of each sensor to perform online anomaly detection. For sensors... The sensor health status monitoring unit 330 calculates its status at time... Standardized deviation values:
[0048] in and Sensors The moving mean and moving standard deviation of the data collected during the past 24 hours of normal operation have been calculated, excluding non-steady-state data during the transition period following door and window operations. To prevent extremely small positive constants from being divided by zero, the value is set to [value]. Introduction The necessity lies in the fact that the output values of some sensors may remain constant for a long period of time under specific operating conditions (such as the rain sensor S7 continuously outputting a zero value during periods of no rainfall, or the human infrared sensor S9 continuously outputting a zero value during periods of no indoor activity, etc.). In this case, the sliding standard deviation... The value will approach zero, and without numerical protection, it will cause arithmetic anomalies. Based on the above standardized deviation value, the health status factor output by the sensor health status monitoring unit 330 is: when hour, ;when hour, ;when hour, This means that the sensor is considered to be in a severely abnormal state, and its readings are no longer used in subsequent decision-making. This continuous decay mechanism based on statistical bias is more refined than traditional binary fault detection, capable of capturing the gradual process of the sensor changing from normal to abnormal, and proportionally reducing its influence on the decision during this process.
[0049] The dynamic reliability weights of each sensor calculated by the dynamic reliability evaluation layer 300 The data is fed back to the perceptual coding layer 200 for use in embedding vectors into the context semantics. During the generation process, the feature contributions of each sensor are weighted and corrected. The weight of sensor features with lower confidence in the embedding vector is reduced accordingly, thereby avoiding deviations in the overall environmental semantic representation due to the accuracy degradation of a certain sensor under adverse conditions. Specifically, the dynamic confidence weight is applied to the attention weight matrix within the multi-head self-attention fusion unit 230 in the same way as the aforementioned mask gating, that is, the attention weight with a certain sensor as the key is multiplied by the mask element at that position and the dynamic confidence weight of that sensor, and then the product result is renormalized according to all key sensors corresponding to each query sensor:
[0050] Where ε is the extremely small positive constant used to prevent division by zero, as mentioned above. Therefore, when the dynamic reliability weight of a sensor decreases, the proportion of its information in the fusion result decreases proportionally, while the relative proportion of other reliable sensors automatically increases. The normalization property of the attention weight along the bond direction is maintained after weighting correction. When the health status factor of a sensor is zero, resulting in a zero dynamic reliability weight, the sensor is completely excluded from the fusion process of this control cycle. As an alternative implementation, the dynamic reliability weight can also be directly multiplied by the local temporal feature vector of the sensor before being fed into the multi-head self-attention fusion unit 230 within the group for fusion. Furthermore, since the calculation of the dynamic reliability evaluation layer 300 only depends on the current raw readings and historical statistics of each sensor, and does not depend on the environmental semantic embedding vector, its operation can be performed before or in parallel with the perception coding layer 200 in each control cycle. Its output acts as feedback on the feature weighting stage of the perception coding layer 200, and there is no computational circular dependency between the two.
[0051] The temporal causal convolutional prediction layer 400 sits atop the dynamic credibility evaluation layer 300. Its function is to predict the environmental evolution trend over several future time steps under the current control state, based on recent environmental semantic embedding vector sequences. This provides forward-looking information input to the Pareto front decision layer 500, enabling control actions to shift from passive response to predictive adjustment. The temporal causal convolutional prediction layer 400 employs a lightweight temporal causal convolutional network architecture, allowing for efficient inference on an edge intelligent gateway 100 configured with a general-purpose low-power processor.
[0052] The input to the temporal causal convolutional prediction layer 400 is a sequence of environmental semantic embedding vectors from the past 120 time steps. The dimension of the input tensor is The temporal causal convolutional prediction layer 400 consists of six cascaded causal convolutional modules. Each module includes a one-dimensional causal convolution operation, weight normalization, corrected linear activation, and a random dropout operation with a dropout rate of 0.1. The kernel size of all six modules is set to 3, the number of channels is 64, and their dilation factors are set to 1, 2, 4, 8, 16, and 32, respectively, increasing in powers of 2. Based on the formula for calculating the receptive field of a one-dimensional causal convolution, the total receptive field of the six-layer network is... Each time step covers all 120 input time steps, corresponding to a time span of approximately 2 minutes at a sampling frequency of 1 Hz. This allows for the simultaneous capture of transient patterns on the order of seconds (such as sudden gusts of wind) and gradual trends on the order of minutes (such as a slow rise in outdoor temperature). The causal convolution property ensures that the time steps are accurately captured. The output at that point depends only on time. By carefully considering the input data and its preceding data, leakage of future information is strictly avoided, ensuring the online availability of the network in real-time inference scenarios. A residual connection is introduced at the output of the six-layer causal convolutional module, directly adding the information of the input sequence to the convolutional output to alleviate the gradient decay problem in deep networks. After the residual connection, a fully connected linear layer maps the 64-dimensional features to... Dimensional output and reshaping into The tensor shape is used to obtain the future. The basic predictive environment semantic embedding vector sequence at each time step This basic prediction characterizes the natural evolution of the environmental state under the assumption that the current window opening remains constant. In typical residential applications, The value ranges from 5 to 30, corresponding to a prediction window of 5 to 30 seconds in the future. In applications with longer sampling periods, it can effectively cover trend prediction of 2 to 5 minutes.
[0053] The training of the temporal causal convolutional prediction layer 400 employs a joint optimization strategy of multi-scale prediction loss and physical consistency regularization term, and its loss function is expressed as:
[0054] Among them, the predicted loss item The weighted summation of the mean square errors at each prediction time step:
[0055] Weighting coefficient As the prediction step size decreases, the prediction accuracy for the near future is given higher optimization priority. Physical consistency regularization term. The prediction results are constrained by fundamental physical relationships. The calculation of this regularization term relies on the mapping function from the embedding space to the physical quantity space provided by the semantic decoding unit 506 (which will be detailed in the Pareto front decision layer 500 section). ,remember The physical quantity vector is obtained by mapping the predicted embedding vector through the semantic decoding unit 506. Each component corresponds to measurable values such as temperature, humidity, and carbon dioxide concentration. The specific form is as follows:
[0056] in To predict the values of each component in the physical quantity vector directly output by the semantic decoding unit 506, This is a consistency check function applied to the above values based on known physical laws. Taking temperature-humidity coupling as an example, Predicted temperature Substituting the values into the Clausius-Clapeyron equation, the corresponding saturated vapor pressure is calculated. From this, the theoretical relative humidity value under the current absolute moisture content constraint is derived. This theoretical value is then compared with the predicted relative humidity value directly decoded and output by the semantic decoding unit 506. Similarly, for carbon dioxide concentration, Based on the mass conservation law, the predicted rate of change in carbon dioxide concentration is validated against the ventilation volume determined by the current opening degree of doors and windows and the number of people indoors. This regularization term enables the temporal causal convolutional prediction layer 400 to output physically reasonable prediction results even in edge scenarios with limited training data.
[0057] The Pareto frontier decision layer 500 is located at the top of the system architecture, and its function is to receive the current moment's context semantic embedding vector. The sequence of base prediction vectors output by the temporal causal convolutional prediction layer 400 It makes multi-objective decisions among four potentially conflicting optimization goals: health, comfort, safety, and energy conservation, and outputs the current optimal window opening control value. The Pareto front decision layer 500 contains, in sequence, a control effect correction unit 505, a semantic decoding unit 506, an objective function calculation unit 510, a fast non-dominated sorting unit 520, a situation adaptive selection unit 530, and a control action smoothing unit 540.
[0058] The control effect correction unit 505 corrects the base prediction vector, which is independent of the control action, output by the temporal causal convolutional prediction layer 400, into a conditional prediction vector coupled with each candidate control action. This allows subsequent multi-objective optimization to correctly assess the differentiated impact of different window openings on the future environmental state. The necessity of this mechanism lies in the fact that the input to the temporal causal convolutional prediction layer 400 is only the historical sequence of embedding vectors from past time steps, and its output is the base prediction vector. It reflects the natural evolution of the environment under the current control state and does not include candidate control actions. The causal effect is that if the objective function values for all candidate actions are directly calculated using the same basic prediction vector, then objective functions such as health and comfort, which depend on environmental state predictions, will give the same evaluation results for all candidate actions, causing multi-objective optimization to degenerate into an incomplete operation only affected by the linear terms of control variables. Therefore, the control effect correction unit 505 employs a lightweight fully connected network. The basic predictions are modified with control conditions. The network uses the current time-instance environmental semantic embedding vector. Candidate window opening and the current actual window opening As input, the output is a correction vector with the same dimension as the embedding vector. This is then superimposed onto the base prediction vector to obtain the candidate action. Conditional prediction vector under the influence of:
[0059] in This is a fully connected network with two hidden layers (32 and 64 dimensions respectively), using a modified linear activation function between them. During training, the network learns by using the differences in environmental states caused by variations in window openings in historical data as supervisory signals. Its parameter count is significantly smaller than the main network with 400 temporal causal convolutional prediction layers. During inference, parallel computation of 21 candidate window opening values can be completed within 2 ms on an edge smart gateway 100. This two-stage architecture of "basic prediction plus control correction" ensures the action-state causal coupling required for model prediction and control while avoiding the computational overhead of repeatedly performing complete temporal convolutional inference for each candidate action.
[0060] The semantic decoding unit 506 is responsible for mapping the 64-dimensional environment semantic embedding vector back to the numerical values of various environment parameters with explicit physical dimensions, providing the necessary physical quantity inputs for the subsequent calculation of the objective function. The semantic decoding unit 506 consists of a fully connected decoding network. In practice, the network takes a 64-dimensional embedding vector as input, passes it through an intermediate layer with a hidden layer dimension of 48, and outputs a physical quantity vector. The components correspond to indoor temperature (°C), indoor relative humidity (%RH), carbon dioxide concentration (ppm), and fine particulate matter concentration (μg / m³), respectively. 3 Physical quantities such as outdoor wind speed (m / s) and probability of rainfall are included. The semantic decoding unit 506 is jointly optimized with the perceptual coding layer 200 during the training phase. Specifically, the encoder encodes the raw sensor data into an embedding vector, and the decoder reconstructs the embedding vector into an approximation of the raw sensor data. Together, they form an autoencoder structure, using the reconstruction loss as the training signal. During the inference phase, for each conditional prediction vector output by the control effect correction unit 505... The semantic decoding unit 506 maps it to the corresponding predicted physical quantity value. Extract the predicted indoor temperature from it. Predicted relative humidity Predicted carbon dioxide concentration Predicted fine particulate matter concentration Predicted wind speed and the predicted rainfall status These values are provided to the objective function calculation unit 510.
[0061] The objective function calculation unit 510 formalizes the door and window control problem into a problem of simultaneously maximizing four objective functions. The input to each objective function is the predicted physical quantity output by the semantic decoding unit 506 for each candidate opening value. The health objective function is defined as:
[0062] in and These are the health thresholds for carbon dioxide and fine particulate matter concentrations, respectively. and This corresponds to the penalty coefficient. The objective requires that the candidate opening... Under these conditions, the concentrations of carbon dioxide and fine particulate matter in indoor air should be kept as low as possible below their respective health limits. The comfort objective function is defined as:
[0063] in The predicted average vote thermal comfort evaluation index, defined in relevant International Organization for Standardization (ISO) standards, has a target value of 0, representing a neutral thermal sensation state. The inverse form of this objective function ensures that the closer the indoor thermal environment is to a neutral thermal sensation state, the larger the comfort objective function value. The safety objective function is defined as follows:
[0064] in For candidate window opening, For a safe wind speed threshold, 10 m / s is used in typical residential scenarios. and Here are the penalty coefficients for each item. This objective function reflects the physical fact that a larger window opening poses a higher safety risk during rainfall or strong winds. The energy efficiency objective function is defined as:
[0065] in The set temperature for HVAC systems. The heat transfer coefficient for window ventilation. This is the energy consumption penalty coefficient. This is a function indicating the operating status of the HVAC system. It takes a value of 1 when the HVAC system is running, and a value of 0 otherwise. The operating status of the HVAC system is obtained through the smart home communication interface of the edge smart gateway 100. The edge smart gateway 100 can communicate with the HVAC controller via a low-power short-range wireless protocol or a wireless LAN protocol to query the status. In scenarios where the HVAC controller does not support direct status reporting, it can also be indirectly inferred by observing the deviation between the reading trend of temperature sensor S1 and the set temperature. The physical meaning of this objective function is: when the HVAC system is running, the window opening degree... The larger the window opening, the greater the energy loss from air conditioning due to ventilation and heat exchange. Therefore, the energy efficiency objective function value increases with... The increase in this becomes more negative, effectively penalizing unnecessary window opening within the maximization optimization framework. When the HVAC system is not running, When the energy-saving objective function value is always zero, the window opening does not incur air conditioning energy costs, and the energy-saving objective does not participate in the constraint on decision-making.
[0066] The decision variable for the Pareto frontier 500 is the window opening. ,in Indicates complete shutdown. Indicates fully open. This represents a continuously adjustable intermediate opening state. The four objective functions described above relate to the decision variables. This constitutes a typical multi-objective optimization problem:
[0067] The fast non-dominated sorting unit 520 employs a Pareto front solution algorithm suitable for efficient execution under edge computing resource constraints. This algorithm considers decision variables... exist The interval is discretized into 21 candidate points with equal spacing, forming a candidate set. For each candidate open value in the candidate set... The conditional physical quantity prediction corresponding to the candidate value is obtained through the control effect correction unit 505 and the semantic decoding unit 506, and then the four objective function values are calculated by the objective function calculation unit 510. After the objective function calculation of all candidate values is completed, the fast non-dominated sorting unit 520 performs fast non-dominated sorting on the 21 candidate solutions: for each candidate solution Statistical candidate concentration dominance Number of solutions and being The set of solutions governed All satisfy The candidate solutions constitute the Pareto front set. In other words, no other candidate solution can dominate these solutions. The condition for determining the dominance relationship is: a candidate solution is considered to dominate the other if and only if a candidate solution's values on all four objective functions are not inferior to those of another candidate solution, and it is strictly superior to that other candidate solution on at least one objective function. Since there are only 21 candidate points, the computation time of this sorting process on the edge smart gateway 100 is no more than 1 ms.
[0068] Context-adaptive selection unit 530 selects from Pareto front set The final compromise control scheme is selected from the set of objectives. Unlike the traditional approach of reducing multi-objective weighted summation to a single objective, the situation-adaptive selection unit 530 retains the complete Pareto front structure and dynamically switches the compromise strategy according to the characteristics of the current environmental state. When there is a situation in the environmental state where hard constraints are violated, such as when the data from the rain sensor S7 and the wind speed sensor S5 indicate that heavy rain or strong winds are about to occur, the situation-adaptive selection unit 530 selects the Pareto front set. Prioritize according to the safety objective function The optimal solution is selected by sorting. When the system determines that it is currently nighttime and the human infrared sensor S9 indicates that there are people present indoors, the situation adaptive selection unit 530 selects the Pareto front set. In the middle, the comfort objective function is prioritized. The optimal solution is selected by sorting. In general cases other than the special scenarios described above, the scenario adaptive selection unit 530 selects the Pareto front set. The candidate solution with the largest distribution entropy of the four objective function values is taken as a compromise. Since the four objective functions have different dimensions and numerical ranges, and their values are all no greater than zero, the above distribution entropy is defined and calculated as follows: First, the values of each objective function are normalized for extreme values within the Pareto front set.
[0069] The values of each objective function are mapped to the interval between 0 and 1, where the subscript m represents the m-th objective function, and ε is the minimal positive constant mentioned earlier; then, for each candidate solution, its four normalized objective values are converted into a discrete distribution whose sum is one.
[0070] And calculate the distribution entropy of the candidate solution according to the definition of Shannon entropy.
[0071] The candidate solution with the largest distribution entropy is selected as the final compromise. The physical meaning of this selection criterion is to ensure that the final decision is distributed as evenly as possible across the four objective dimensions, minimizing extreme bias towards a single objective at the expense of the others. This context-driven compromise selection mechanism empowers the system to automatically adjust its decision-making focus in different scenarios, enabling differentiated decision-making behavior under the same objective function framework in various situations.
[0072] The motion smoothing unit 540 controls the optimal opening value output by the situation adaptive selection unit 530. Execution smoothing is performed to prevent overshoot or mechanical shock from abrupt changes in control commands to the window actuator. The smoothing strategy of the control motion smoothing unit 540 is as follows:
[0073] in The maximum permissible rate of change of window opening. The window opening command processed by the control motion smoothing unit 540. The output is sent to the door and window actuator 700 for execution. The door and window actuator 700 drives the electric push rod or motor to adjust the window sash to the target position according to the received continuous opening command. The window position encoder S10 provides real-time feedback on the actual position of the window sash, forming a closed-loop control.
[0074] The Federated Meta-Learning Update Module 600 is deployed within the Edge Smart Gateway 100 to achieve distributed collaborative optimization of the model among multiple Edge Smart Gateways 100 in similar building scenarios, while strictly maintaining the locality of the raw sensor data. The federated communication process of the Federated Meta-Learning Update Module 600 typically occurs once daily during the low-load period in the early morning. In each round of federated communication, each participating Edge Smart Gateway 100 uses its local sensor log data from the past 24 hours to update the current global model parameters. Perform local training to obtain locally updated model parameters. ,in For learning rate, For the first The local loss function is implemented on each edge smart gateway 100. Subsequently, each edge smart gateway 100 only uploads the model update amount. The process to the federated aggregation server does not involve the transmission of any raw sensor data, embedding vectors, or intermediate decision results, and the uploaded model updates undergo differential privacy processing as described later before uploading. The federated aggregation server uses a federated averaging algorithm, weighted by the number of samples from each edge smart gateway participating in this round of training, to weight the uploaded model updates, resulting in the updated global model parameters.
[0075] in For the first The number of samples from 100 edge smart gateways participating in this round of training. This represents the total number of samples from all participants. To further enhance privacy protection, the Federated Meta-Learning Update Module 600 incorporates a differential privacy mechanism before uploading the model update data. This involves performing pruning and noise injection operations on the model update data and replacing the original model update data with the processed result.
[0076] in The gradient clipping threshold, This is the noise multiplier, configured by default. This configuration can meet the requirements. Differential privacy guarantees are provided. Since the sum of the aggregation weights of all participants is one, the aforementioned aggregation formula is equivalent to the federated average form, which directly weights the local model parameters of each participant according to the number of samples.
[0077] The Federated Meta-Learning Update Module 600 also includes a fast adaptive mechanism based on a model-independent meta-learning strategy, which functions when a new edge smart gateway 100 is first added to the system. The meta-learning phase is pre-executed on the federated aggregation server: using federated global model parameters... Starting with the first step, the inner loop performs several steps of stochastic gradient descent on the local data of each existing building to obtain task-specific parameters for each building scenario. The outer loop uses the sum of the losses of all task-specific parameters on their respective new data as the meta-objective for optimization, ultimately obtaining a set of meta-parameters with good generalization initialization properties. When the newly deployed edge smart gateway 100 is connected to the system, it will... As initial model parameter loading, only 5 to 10 gradient updates are needed using a small amount of sensor data collected in the first 24 to 48 hours of the new building. The model can then quickly adapt to the building’s unique thermal characteristics, including differences in building orientation, window-to-wall area ratio, and thermal inertia of building envelope materials, without the need for manual reconfiguration of control rules or training of the model from scratch.
[0078] like Figure 2 As shown, the multi-sensor fusion intelligent door and window adaptive control method based on edge computing provided by this invention executes according to the following process in each control cycle. The edge intelligent gateway 100 runs the main control loop at a main control frequency of 1 Hz. When the system starts, it completes the loading and parameter initialization of each model of the perception coding layer 200, the dynamic credibility evaluation layer 300, the temporal causal convolutional prediction layer 400, and the Pareto front decision layer 500, and opens a historical embedding vector buffer queue with a capacity of 120 time steps.
[0079] At the beginning of each control cycle, the edge smart gateway 100 reads the raw sampling data of the current moment from all ten types of sensors through its communication interface, and aggregates it into a raw data set containing the identifiers of each sensor and their corresponding readings. For sensors with sampling frequencies lower than the main control frequency (such as the carbon dioxide sensor S3 and the fine particulate matter concentration sensor S4, whose sampling frequency is 0.2 Hz), the most recent valid reading is used to fill in control cycles in which no new sampling values are generated. For sensors that are updated in an event-triggered manner (such as the rain sensor S7 and the human infrared sensor S9), their most recent state value is maintained in control cycles in which no event is triggered.
[0080] After the raw data acquisition is completed, the dynamic reliability assessment layer 300 performs reliability calculation on each sensor reading in the current control cycle. It takes the sensor identifier, the current reading value, and environmental context information including time information, outdoor weather conditions, and historical statistical characteristics of the sensor as input. The results are then calculated by the basic reliability calibration unit 310, the environmental condition attenuation calculation unit 320, and the sensor health status monitoring unit 330 in sequence, and outputs the dynamic reliability weight of the sensor at the current time.
[0081] The perceptual coding layer 200 receives raw sensor data and dynamic confidence weights for each sensor. It extracts features from continuous and discrete sensors using a one-dimensional convolutional feature extraction unit 210 and an embedding query mapping unit 220, respectively. Then, through an intra-group multi-head self-attention fusion unit 230 and a cross-group semantic projection unit 240, it models the coupling relationships between sensors and performs unified cross-group semantic projection, ultimately generating a 64-dimensional environmental semantic embedding vector at the current time, corrected by confidence weighting. The embedding vector is appended to the end of the historical embedding vector buffer queue.
[0082] When the number of valid vectors accumulated in the historical embedding vector buffer queue reaches 120, the temporal causal convolutional prediction layer 400 reads the complete sequence in the buffer queue as input to perform forward inference and outputs the future... The basic predicted embedding vector sequence at each time step. In the early stages of system startup, before the buffer queue is full, the temporal causal convolutional prediction layer 400 simply repeats the embedding vector at the current time step. This is used as a transitional prediction output, and it will automatically switch to the normal time series prediction mode once the buffer queue is full.
[0083] Pareto front decision layer 500 receives the current embedding vector Basic prediction embedding vector sequence The system receives the actual window opening and an environmental context label determined by combining raw sensor data and current time information. The control effect correction unit 505 calculates control correction values for each of the 21 candidate opening values and superimposes them onto the base prediction vector to obtain the conditional prediction vector for each candidate action. The semantic decoding unit 506 decodes each conditional prediction vector into a physical quantity prediction value. The objective function calculation unit 510 calculates four objective function values accordingly. The fast non-dominated sorting unit 520 obtains the Pareto front set. The context adaptive selection unit 530 selects the optimal compromise solution based on the current context. The control action smoothing unit 540 applies an opening change rate limit and outputs the final window opening control command. The door and window actuator 700 receives this command and drives the window sash to the target position. This completes one control cycle, and the system waits for the next control cycle.
[0084] At the hardware deployment level, the Edge Smart Gateway 100 recommends using an embedded computing platform with an octa-core processor architecture (four high-performance cores and four high-efficiency cores), such as a system-on-a-chip (SoC) with a neural network acceleration unit of at least 6 TOPS, to accelerate the inference process of the embedded encoder in the perceptual coding layer 200 and the temporal causal convolutional prediction layer 400. The Edge Smart Gateway 100 is configured with at least 4 GB of low-power double data rate memory to meet the storage requirements of model parameters and runtime data, and at least 32 GB of embedded multimedia storage card for storing model files and 7-day rolling sensor logs. Regarding communication interfaces, the Edge Smart Gateway 100 integrates a wireless LAN, a low-power short-range wireless protocol, and a low-power Bluetooth communication module for wireless access to various sensors, and a wired Ethernet interface for federated communication with the federated meta-learning update module 600. All deep learning models are expressed using the Open Neural Exchange Format (ONF) before deployment and quantized to 8-bit integer precision, keeping the total model file size below 15 MB. With the above hardware configuration, the edge intelligent gateway 100 takes no more than 50 ms to complete a full control cycle inference process. Among them, the embedding encoding inference of the perception encoding layer 200 takes about 8 ms, the prediction inference of the temporal causal convolutional prediction layer 400 takes about 15 ms, the parallel correction and decoding of 21 candidate values by the control effect correction unit 505 and the semantic decoding unit 506 takes about 4 ms, and the Pareto search of the fast non-dominated sorting unit 520 takes about 3 ms. This is far below the system's set decision response limit of 200 ms, ensuring the real-time response capability to sudden environmental changes.
[0085] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. All equivalent transformations and modifications made based on the technical concept of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A multi-sensor fusion intelligent door and window adaptive control method based on edge computing, characterized in that, The method is executed locally by the edge smart gateway and includes the following steps: Acquire sampling data from multiple heterogeneous sensors during the current control cycle. The heterogeneous sensors include at least a temperature sensor, a humidity sensor, a carbon dioxide sensor, a fine particulate matter concentration sensor, a wind speed sensor, a light sensor, a rain sensor, and a window position encoder. Based on the coupling relationships between the physical processes represented by each sensor, the heterogeneous sensors are divided into several physical coupling groups. For continuous sensors, local temporal feature vectors are extracted from their reading sequences within a preset-length historical window through one-dimensional convolution. For discrete sensors, feature vectors with the same dimension as the local temporal feature vectors are mapped using an embedded lookup table. Multi-head self-attention operations are used to fuse the feature vectors of each sensor. Specifically, the scaled dot product between the query vector and the key vector obtained by linear transformation of the feature vectors of each sensor is scored. First, normalization is performed on all key sensors corresponding to each query sensor to obtain an attention weight matrix. Then, the attention weight matrix is multiplied element-wise by the attention mask matrix, and the multiplication result is processed according to each query sensor. All corresponding key sensors are renormalized, and finally, the value vectors of each sensor are weighted and summed using the attention weights obtained from the renormalization. The attention mask matrix is a non-negative matrix with elements ranging from zero to one. The mask elements between sensors within the same physical coupling group and between each sensor and itself are set to preset fixed values. The mask elements between sensors with known cross-group physical coupling relationships are set to trainable parameters initialized with physical prior values and constrained to the range of zero to one. The mask elements between other sensors are set to zero, so that the attention weights obtained from the renormalization between sensors without known physical coupling relationships are always zero. The fusion results corresponding to each physical coupling group are concatenated and mapped to an environmental semantic embedding vector of a preset dimension through a projection layer. For each sensor, the dynamic reliability weight of the sensor in the current control cycle is determined by the product of the basic reliability, the environmental condition attenuation factor, and the health status factor. The environmental condition attenuation factor is determined by the amount of interference environment corresponding to the sensor type according to a preset attenuation relationship. The health status factor is determined by the standardized deviation obtained by dividing the difference between the current reading of the sensor and its historical moving average by the sum of the historical moving standard deviation and a preset positive constant. The feature contribution of each sensor in the environmental semantic embedding vector generation process is weighted and corrected using the dynamic reliability weight. The environmental semantic embedding vectors of multiple consecutive control cycles are arranged into an input sequence in time and fed into a temporal causal convolutional network. The output is the basic prediction embedding vector for several future time steps under the condition that the current window opening remains unchanged. Multiple discrete candidate window opening values are selected within a preset opening range. For each candidate window opening value, the environmental semantic embedding vector of the current control cycle, the candidate window opening value, and the current actual window opening are used as inputs to obtain a control correction amount through a control correction network. The control correction amount is superimposed on the basic prediction embedding vector to obtain a conditional prediction embedding vector coupled with the candidate window opening value. The conditional prediction embedding vector is then mapped to a physical quantity prediction value with physical dimensions through a semantic decoding network. Based on the predicted physical quantities corresponding to each candidate opening value, the objective function values for health, comfort, safety, and energy saving are calculated respectively. Then, a non-dominated sort is performed on all candidate opening values to obtain the Pareto front solution set composed of candidate opening values that are not dominated by the other candidate opening values. Based on the environmental context determined by the current sampling data and the current time period information, a target opening value is selected from the Pareto front solution set. After applying a preset rate of change limit to the change of the target opening value relative to the output value of the previous control cycle, it is output to the door and window actuator.
2. The multi-sensor fusion intelligent door and window adaptive control method based on edge computing according to claim 1, characterized in that: The physical coupling group includes a thermal environment group, an air quality group, an external environment group, and an independent group. The thermal environment group includes the temperature sensor and the humidity sensor. The air quality group includes the carbon dioxide sensor and the fine particulate matter concentration sensor. The external environment group includes the wind speed sensor, the light sensor, and the rainfall sensor. The independent group includes a noise sensor, a human infrared sensor, and the window position encoder.
3. The multi-sensor fusion intelligent door and window adaptive control method based on edge computing according to claim 1, characterized in that: The environmental condition attenuation factor is determined according to the sensor type. The environmental condition attenuation factor of the temperature sensor is determined by the solar radiation intensity. It takes full value when the solar radiation intensity is lower than the first radiation threshold, decreases linearly with the solar radiation intensity when the solar radiation intensity is between the first radiation threshold and the second radiation threshold, and decreases exponentially with the solar radiation intensity when the solar radiation intensity is not lower than the second radiation threshold. The environmental attenuation factor of the humidity sensor is determined by the rate of change of indoor temperature according to a piecewise decreasing relationship. The environmental condition attenuation factors of the carbon dioxide sensor and the fine particulate matter concentration sensor recover from their values exponentially with the duration of the window being open, and the time constant of the exponential relationship is determined according to the measurement principle of the sensor. The environmental condition attenuation factor of the rain sensor is assigned a graded value based on the consistency of its continuous multiple detection results.
4. The multi-sensor fusion intelligent door and window adaptive control method based on edge computing according to claim 1, characterized in that: The historical moving average and the historical moving standard deviation are obtained by statistically analyzing the sampled data of the sensor within a preset backtracking period, and the sampled data during the transition period after the door and window actions are excluded during the statistical analysis; the health status factor takes full value when the absolute value of the standardized deviation is less than the first deviation threshold, decreases exponentially with the absolute value when the absolute value of the standardized deviation is between the first deviation threshold and the second deviation threshold, and takes zero when the absolute value of the standardized deviation is not less than the second deviation threshold.
5. The multi-sensor fusion intelligent door and window adaptive control method based on edge computing according to claim 1, characterized in that: The temporal causal convolutional network includes multiple cascaded causal convolutional modules. Each causal convolutional module contains a one-dimensional causal convolutional layer, a weight normalization layer, a modified linear activation layer, and a random dropout layer. The dilation factor of each causal convolutional module increases progressively in powers of two, and the total receptive field determined by the sum of the dilation factors of each causal convolutional module and the kernel size is not less than the length of the input sequence. The output of the temporal causal convolutional network is provided with a residual connection derived from the input sequence and a fully connected layer that maps the feature dimension to the product of the prediction time step and the embedding dimension.
6. The multi-sensor fusion intelligent door and window adaptive control method based on edge computing according to claim 1, characterized in that: The control correction network is a fully connected network containing at least two hidden layers. It is trained using the environmental state differences caused by changes in window opening in historical sampling data as a supervision signal, and the control correction amount for all candidate opening values is calculated in parallel. The semantic decoding network and the generation process of the environmental semantic embedding vector constitute an autoencoder structure and are jointly trained with reconstruction loss. The output components of the semantic decoding network correspond to indoor temperature, indoor relative humidity, carbon dioxide concentration, fine particulate matter concentration, outdoor wind speed, and rainfall status, respectively.
7. The multi-sensor fusion intelligent door and window adaptive control method based on edge computing according to claim 6, characterized in that: The health objective function value decreases as the carbon dioxide concentration and the fine particulate matter concentration exceed their respective health thresholds. The value of the comfort objective function decreases as the absolute value of the predicted average voting index determined by the indoor temperature and the indoor relative humidity increases; The safety objective function value decreases as the product of the rainfall state quantity and the candidate opening value increases, and also decreases as the product of the portion of the outdoor wind speed exceeding the safe wind speed threshold and the candidate opening value increases. The energy-saving objective function value decreases as the product of the absolute value of the difference between the indoor temperature and the set temperature of the HVAC system and the candidate opening value increases when the HVAC system is in operation. It takes a constant value when the HVAC system is in a stopped state. The operating state of the HVAC system is obtained by querying through the communication interface of the edge intelligent gateway or by inferring from the changing trend of the temperature sensor readings.
8. The multi-sensor fusion intelligent door and window adaptive control method based on edge computing according to claim 1, characterized in that: The step of selecting the target opening value from the Pareto front solution set based on the environmental situation includes: when the sampling data indicates that the rainfall state is established or the wind speed exceeds the safe wind speed threshold, sorting the candidates in the Pareto front solution set according to the safety objective function value and selecting the candidate opening value that ranks first in the sorting. When the current time period information indicates that it is nighttime and the human infrared sensor indicates that there are people indoors, the candidate opening value is selected by sorting the comfort objective function values in the Pareto front solution set and selecting the first candidate opening value. In other cases, the candidate opening value with the largest distribution entropy of the four objective function values in the Pareto front solution set is selected.
9. A multi-sensor fusion intelligent door and window adaptive control system based on edge computing, characterized in that, It includes an edge smart gateway (100) and a door and window actuator (700) connected to the output of the edge smart gateway (100). The edge smart gateway (100) is provided with a perception coding layer (200), a dynamic credibility evaluation layer (300), a temporal causal convolution prediction layer (400) and a Pareto front decision layer (500) that are cascaded in sequence. The perceptual coding layer (200) includes a one-dimensional convolutional feature extraction unit (210), an embedding query mapping unit (220), an intra-group multi-head self-attention fusion unit (230), and a cross-group semantic projection unit (240). The one-dimensional convolutional feature extraction unit (210) is used to extract local temporal feature vectors from the reading sequence of continuous sensors within a preset-length historical window. The embedding query mapping unit (220) is used to map the state values of discrete sensors to feature vectors with the same dimension as the local temporal feature vectors. The intra-group multi-head self-attention fusion unit (230) is used to divide each sensor into a physical coupling group according to the physical process coupling relationship, and to fuse the feature vectors of each sensor using multi-head self-attention operation, and is also used to integrate the multi-head self-attention... In the operation, the attention weight matrix obtained after normalization is multiplied element by element with the attention mask matrix, and then the result of the multiplication is normalized again according to all key sensors corresponding to each query sensor and then weighted and summed with the value vector of each sensor. The attention mask matrix is a non-negative matrix whose element values are in the range of zero to one. The mask elements between sensors in the same physical coupling group and between each sensor and itself are taken as preset fixed values. The mask elements between sensors with known cross-group physical coupling relationship are taken as trainable parameters initialized with physical prior values and constrained to the range of zero to one. The mask elements between other sensors are taken as zero. The cross-group semantic projection unit (240) is used to stitch together the fusion results of each physical coupling group and map them into an environmental semantic embedding vector of preset dimension. The dynamic reliability assessment layer (300) includes a basic reliability calibration unit (310), an environmental condition attenuation calculation unit (320), and a sensor health status monitoring unit (330), and is used to determine the dynamic reliability weight of each sensor by multiplying the outputs of the three. The sensor health status monitoring unit (330) determines the health status factor by dividing the difference between the current reading of the sensor and its historical moving average by the sum of the historical moving standard deviation and a preset positive constant. The dynamic reliability weight is fed back to the perception coding layer (200) to perform weighted correction on the feature contribution of each sensor. The temporal causal convolutional prediction layer (400) is used to form an input sequence from the environmental semantic embedding vectors of multiple consecutive control cycles in a temporal order, and output the basic prediction embedding vectors for several future time steps under the condition that the current window opening remains unchanged. The Pareto front decision layer (500) includes a control effect correction unit (505), a semantic decoding unit (506), an objective function calculation unit (510), a fast non-dominated ranking unit (520), a situation adaptive selection unit (530), and a control action smoothing unit (540) connected in sequence. The control effect correction unit (505) is used to calculate the control correction amount for each discrete candidate opening value within a preset opening interval and superimpose it onto the basic prediction embedding vector to obtain a conditional prediction embedding vector coupled with each candidate opening value. The semantic decoding unit (506) is used to map the conditional prediction embedding vector into a physical quantity. The physical quantity prediction value, the objective function calculation unit (510) is used to calculate four objective function values of health, comfort, safety and energy saving based on the physical quantity prediction value, the fast non-dominated sorting unit (520) is used to perform non-dominated sorting on all candidate opening values to obtain the Pareto front solution set, the situation adaptive selection unit (530) is used to select the target opening value from the Pareto front solution set according to the current environmental situation, and the control action smoothing unit (540) is used to apply a preset change rate limit to the change of the target opening value relative to the output value of the previous control cycle and output the limited opening command to the door and window actuator (700).
10. The multi-sensor fusion intelligent door and window adaptive control system based on edge computing according to claim 9, characterized in that: The edge intelligent gateway (100) is also provided with a federated meta-learning update module (600). The federated meta-learning update module (600) is used to perform local training on the global model parameters with local historical sampling data and upload the model gradient obtained from the local training to the federated aggregation server after pruning and noise injection. However, it does not upload the original sensor data, environmental semantic embedding vectors, and intermediate decision results. The federated meta-learning update module (600) is also used to load the meta-parameters obtained by the federated aggregation server through inner and outer double-layer cyclic meta-learning as the initial model parameters when the edge intelligent gateway (100) is first connected, and perform gradient updates of a preset number of steps with the locally collected sampling data to complete the adaptation.
