A commercial building scene control method based on image recognition

By improving the YOLOv8 architecture and combining it with the GRU model for power optimization, the system accurately captures the flow patterns of people in commercial buildings, generates HVAC control parameters, and solves the problems of high energy consumption and insufficient comfort in HVAC systems during peak periods, thus achieving dynamic and coordinated control of energy efficiency and comfort.

CN121505544BActive Publication Date: 2026-04-28HUAMAO CLOUD (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAMAO CLOUD (BEIJING) TECH CO LTD
Filing Date
2025-11-18
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately capture the flow patterns of people in large spaces within commercial buildings, resulting in insufficient cooling or heating of HVAC systems during peak hours and excessive energy consumption during off-peak hours, making it impossible to achieve dynamic and coordinated control of energy efficiency and comfort.

Method used

By employing an improved YOLOv8 architecture model and a GRU architecture crowd behavior prediction model, combined with a power optimization model, the overall flow characteristics of the crowd are obtained through image recognition, generating control parameters for the HVAC system, thereby achieving accurate discovery of crowd flow trend patterns and dynamic regulation.

Benefits of technology

It enables precise control of HVAC systems in commercial buildings during peak periods, reducing energy consumption, improving comfort, and achieving dynamic and coordinated control of energy efficiency and comfort.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121505544B_ABST
    Figure CN121505544B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image recognition, and more particularly to a commercial building scene control method based on image recognition, which comprises: passing the monitoring image in the commercial building through a personal behavior recognition model based on an improved YOLOv8 architecture to generate a personal behavior position code, wherein the personal behavior recognition model comprises a coordinate attention enhanced backbone network and a variable convolution enhanced behavior detection head; passing the personal behavior position code through a crowd flow prediction model based on a GRU architecture to generate a crowd prediction scene flow trend; and passing the crowd prediction scene flow trend through a power optimization model based on energy efficiency indicators and crowd comfort to generate control parameters of the HVAC system of the commercial building. The present application improves the YOLOv8 architecture model, realizes accurate mining of the scene trend law of the crowd flow of the commercial building with peak aggregation and weekend passenger flow peak, and realizes dynamic collaborative control of energy efficiency and comfort through the power optimization model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition, and more particularly to a scene-based control method for commercial buildings based on image recognition. Background Technology

[0002] As public spaces with frequent pedestrian traffic and dynamic changes in environment, the effectiveness of heating, ventilation, and air conditioning (HVAC) systems in commercial buildings directly impacts energy consumption and occupant comfort. Statistics show that HVAC systems account for 40% to 60% of total building energy consumption in commercial buildings. Therefore, achieving energy conservation while meeting the diverse comfort needs of residents in various scenarios has become a core challenge for the industry.

[0003] In such buildings, crowd movement is not random and disorderly, but rather contains significant scene regularities in the time dimension. For example, during specific times in the morning and evening, if the crowd moves quickly, it is likely to be during the morning and evening peak hours of crowd flow in commercial buildings. At this time, there is likely to be a large flow of people for a period of time. If traditional infrared-based crowd counting methods are used to control the HVAC system during the morning and evening peak hours, it is difficult to accurately capture the overall flow characteristics of people in large public spaces. This makes it difficult to capture the regularity of the overall crowd flow in large spaces. Furthermore, the lack of pattern prediction can lead to periods of insufficient cooling or heating in the HVAC system, resulting in a less comfortable experience for people. In addition, failure to control and reduce the operation of the HVAC system in time during off-peak hours can lead to high energy consumption and a lack of energy conservation and environmental protection.

[0004] Therefore, how to combine image recognition to obtain the overall flow characteristics of people in large spaces within commercial buildings, and to explore the temporal patterns of these flows in order to predictively control HVAC systems and achieve dynamic and coordinated control of energy efficiency and comfort in commercial buildings, is a technical problem that needs to be solved. Summary of the Invention

[0005] To address this, the present invention provides a scene-based control method for commercial buildings based on image recognition. By improving the YOLOv8 architecture model, it enhances the attention to and adaptability of key personal action features, reduces glare interference and personal occlusion interference in commercial buildings, and achieves accurate discovery of scene trend patterns of commercial building crowd flow during peak gatherings and weekend peak passenger flow through a crowd behavior prediction model based on GRU architecture. Furthermore, it achieves dynamic coordinated control of energy efficiency and comfort through a power optimization model.

[0006] To achieve the above objectives, this invention proposes a scene-based control method for commercial buildings based on image recognition, comprising:

[0007] Acquire surveillance images of people in public spaces within commercial buildings, and input the surveillance images into a personal behavior recognition model based on an improved YOLOv8 architecture. The personal behavior recognition model sequentially passes through a backbone network enhanced by coordinate attention, a neck network based on a spatiotemporal feature pyramid architecture, and a behavior detection head enhanced by variable convolution to generate personal behavior location codes.

[0008] The location encoding of the individual's behavior is used to generate a crowd flow prediction model based on a GRU architecture to generate crowd prediction scenario traffic trends.

[0009] The predicted traffic trends of the crowds are used to generate control parameters for the HVAC system of commercial buildings through a power optimization model based on energy efficiency indicators and crowd comfort.

[0010] Furthermore, the process of generating personal behavior location codes through a personal behavior recognition model includes:

[0011] The surveillance images are passed through the initial convolutional layer of the backbone network and multiple coordinate attention-based improved C2f modules to generate personal coordinate-enhanced multi-scale features.

[0012] The personal coordinates are enhanced with multi-scale features and passed through the neck network to generate fused personal features;

[0013] The fused personal features are passed through the behavior detection head to generate the personal behavior location code;

[0014] The personal behavior recognition model also includes the neck network.

[0015] Furthermore, the process of enhancing multi-scale features by generating personal coordinates through a backbone network includes:

[0016] The monitored image is passed through the initial convolutional layer to generate compressed image features;

[0017] The compressed image features are passed through the module's initial convolutional layer to generate initial image features;

[0018] The initial image features are processed through a segmentation operation to generate initial segmentation features and then to process the segmentation features.

[0019] The processed segmentation features are passed through a bottleneck layer and coordinate attention respectively to generate human pose extraction features and coordinate background features. The human pose extraction features are then subtracted from the coordinate background features to generate coordinate-enhanced segmentation features.

[0020] The coordinate-enhanced segmentation features and the initial segmentation features are concatenated to generate concatenated output features, and the concatenated output features and the coordinate-enhanced segmentation features are passed through an output convolutional layer to generate output features.

[0021] The coordinate attention-based improved C2f module includes the module's initial convolutional layer, the segmentation operation, the bottleneck layer, the coordinate attention, the concatenation operation, and the output convolutional layer.

[0022] The output features are then passed through at least two layers of the coordinate attention-based improved C2f module to generate the personal coordinate-enhanced multi-scale features.

[0023] Furthermore, the process of generating coordinate background features through coordinate attention includes:

[0024] The processed segmentation features are passed through horizontal pooling layers and vertical pooling layers respectively to generate horizontal pooling features and vertical pooling features;

[0025] The horizontal pooling features and the vertical pooling features are respectively passed through a convolutional dimensionality reduction layer and a coordinate attention mapping layer to generate horizontal attention masks and vertical attention masks;

[0026] The product of the horizontal attention mask and the vertical attention mask is multiplied by the processed segmentation feature to generate the coordinate background feature.

[0027] Furthermore, the process of generating fused personal characteristics through the neck network includes:

[0028] The personal coordinates are enhanced multi-scale features and then passed through at least two levels of the spatiotemporal feature pyramid of the neck network to generate multi-level output features. The multi-level output features are multiplied with the convolution weight matrix of the corresponding level and normalized to generate dynamic hierarchical attention weights.

[0029] The multi-level output features and the dynamic level attention weights are multiplied and upsampled, then added to the personal coordinate enhanced multi-scale features, and passed through the pyramid output layer to generate the fused personal features.

[0030] Furthermore, the process of generating an individual's behavioral location code using a behavior detection head includes:

[0031] The fused personal features are then processed through variable convolution to generate personal pose enhancement features;

[0032] The personal posture enhancement features are passed through a behavior classification head to generate a personal behavior classification code;

[0033] The personal pose enhancement features are then passed through a location regression head to generate a personal location code;

[0034] The personal behavior classification code and the personal location code are concatenated to generate the personal behavior location code.

[0035] In particular, the C2f module with improved coordinate attention suppresses background interference and enhances the accurate localization of key points of the limbs of the crowd, realizing the extraction of behavioral features in occluded backgrounds in commercial buildings. The spatiotemporal feature pyramid of the neck network achieves multi-scale feature adaptive fusion through dynamic hierarchical attention weights, which not only preserves low-level limb details but also integrates high-level semantics of movement behavior. The behavior detection head, combined with the capture capability of variable convolution, can accurately characterize individual behavior and its spatial distribution, providing feature support for scene analysis.

[0036] Furthermore, the process of generating crowd prediction scenario traffic trends through crowd flow prediction models includes:

[0037] The location of the individual's behavior is encoded and passed through a short-term GRU layer to generate short-term behavioral features;

[0038] The location encoding of the individual's behavior is passed through a long-term GRU layer to generate long-term behavioral features;

[0039] The concatenated features of the short-term and long-term behavioral features are passed through the model output layer to generate the traffic trend of the crowd prediction scenario.

[0040] The crowd flow prediction model includes the short-term GRU layer, the long-term GRU layer, and the model output layer.

[0041] Furthermore, the scenario-based control methods for commercial buildings also include:

[0042] Construct a behavior classification loss term based on the mean square error of human keypoints;

[0043] Construct a prediction error loss term based on cross-entropy calculation of traffic trends in crowd prediction scenarios;

[0044] A comprehensive loss function is constructed based on the location encoding CIoU loss term, the behavior classification loss term, and the prediction error loss term. The comprehensive loss function is then used to collaboratively optimize and train the individual behavior recognition model and the crowd flow prediction model.

[0045] Furthermore, the process of generating control parameters for HVAC systems in commercial buildings through a power optimization model includes:

[0046] Calculate the predicted crowd density based on the traffic trend of the predicted crowd scenario;

[0047] The predicted temperature change is corrected based on the predicted population density to calculate the predicted HVAC energy consumption and predicted comfort, respectively.

[0048] The predicted HVAC energy consumption and the predicted comfort level are substituted into the power optimization model to generate the control parameters.

[0049] Furthermore, the process of generating control parameters for the power optimization model includes:

[0050] The power optimization model is solved using the MPC algorithm to generate the control parameters.

[0051] In particular, the crowd flow prediction model adopts a dual-path architecture with short-term GRU layer and long-term GRU layer to capture crowd activity patterns at different time scales. The comprehensive loss function achieves joint optimization of the personal behavior recognition model and the crowd flow prediction model through collaborative constraints. The power optimization model takes the crowd prediction density as the core input and constructs the correlation control logic of density, temperature, energy consumption and comfort, realizing the scene-based control of crowd flow in commercial building HVAC systems.

[0052] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0053] This invention improves the YOLOv8 architecture model, enhancing its focus on and adaptability to key personal action characteristics, reducing glare interference and personal obstruction in commercial buildings. Through a crowd behavior prediction model based on the GRU architecture, it accurately identifies the scene trends of crowd flow in commercial buildings during peak gatherings and weekend peak traffic. Furthermore, through a power optimization model, it achieves dynamic and coordinated control of energy efficiency and comfort.

[0054] In particular, this invention employs a coordinate attention-enhanced C2f module to suppress background interference and enhance the accurate localization of key points of limbs in crowds. It enables the extraction of behavioral features against occluded backgrounds in commercial buildings. The spatiotemporal feature pyramid of the neck network achieves multi-scale feature adaptive fusion through dynamic hierarchical attention weights, preserving low-level limb details while integrating high-level semantics of movement behavior. The behavior detection head, combined with the capture capability of variable convolution, can accurately characterize individual behavior and its spatial distribution, providing feature support for scene analysis.

[0055] In particular, this invention employs a dual-path architecture of short-term GRU layer and long-term GRU layer in the crowd flow prediction model to specifically capture crowd activity patterns at different time scales. The comprehensive loss function achieves joint optimization of the personal behavior recognition model and the crowd flow prediction model through collaborative constraints. The power optimization model uses the predicted crowd density as the core input to construct the correlation and control logic of density, temperature, energy consumption, and comfort, thereby realizing the scenario-based control of crowd flow in commercial building HVAC systems. Attached Figure Description

[0056] Figure 1This is a flowchart illustrating the scene-based control method for commercial buildings based on image recognition, according to an embodiment of the present invention.

[0057] Figure 2 This is a flowchart illustrating the personal behavior recognition model of the YOLOv8 architecture in the image recognition-based commercial building scene control method according to an embodiment of the present invention.

[0058] Figure 3 This is a schematic diagram of the coordinate attention process of the image recognition-based scene-based control method for commercial buildings according to an embodiment of the present invention;

[0059] Figure 4 This is a flowchart illustrating the crowd flow prediction model based on an improved GRU architecture in the scene-based control method for commercial buildings based on image recognition, as described in an embodiment of the present invention. Detailed Implementation

[0060] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0061] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0062] It should be noted that in the description of this invention, the terms "upper", "lower", "left", "right", "inner", "outer", etc., which indicate directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description and is not intended to indicate or imply that the device or element must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of this invention.

[0063] Furthermore, it should be noted that, in the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0064] like Figures 1 to 4As shown, this invention provides a scene-based control method for commercial buildings based on image recognition. By improving the YOLOv8 architecture model, it enhances the attention to and adaptability of key personal action features, reduces glare interference and personal occlusion interference in commercial buildings, and achieves accurate mining of scene trend patterns of commercial building crowd flow during peak gatherings and weekend peak passenger flow through a crowd behavior prediction model based on GRU architecture. Furthermore, it achieves dynamic coordinated control of energy efficiency and comfort through a power optimization model.

[0065] like Figure 1 As shown, this embodiment proposes a scene-based control method for commercial buildings based on image recognition, including:

[0066] Acquire surveillance images of people in public spaces within commercial buildings, and input the surveillance images into a personal behavior recognition model based on an improved YOLOv8 architecture. The personal behavior recognition model sequentially passes through a backbone network enhanced by coordinate attention, a neck network based on a spatiotemporal feature pyramid architecture, and a behavior detection head enhanced by variable convolution to generate personal behavior location codes.

[0067] The location encoding of the individual's behavior is used to generate a crowd flow prediction model based on a GRU architecture to generate crowd prediction scenario traffic trends.

[0068] The predicted traffic trends of the crowds are used to generate control parameters for the HVAC system of commercial buildings through a power optimization model based on energy efficiency indicators and crowd comfort.

[0069] like Figure 2 As shown, the process of generating personal behavior location codes through a personal behavior recognition model further includes:

[0070] The surveillance images are passed through the initial convolutional layer of the backbone network and multiple coordinate attention-based improved C2f modules to generate personal coordinate-enhanced multi-scale features.

[0071] The personal coordinates are enhanced with multi-scale features and then passed through the neck network based on a spatiotemporal feature pyramid architecture to generate fused personal features.

[0072] The fused personal features are passed through the behavior detection head to generate the personal behavior location code;

[0073] The personal behavior recognition model also includes the neck network.

[0074] like Figure 3 As shown, the process of enhancing multi-scale features by generating personal coordinates through a backbone network further includes:

[0075] The monitored images are passed through the initial convolutional layer of the backbone network to generate compressed image features;

[0076] The compressed image features are passed through the module's initial convolutional layer to generate initial image features;

[0077] The initial image features are processed through a segmentation operation to generate initial segmentation features and then to process the segmentation features.

[0078] The processed segmentation features are passed through a bottleneck layer and coordinate attention respectively to generate human pose extraction features and coordinate background features. The human pose extraction features are then subtracted from the coordinate background features to generate coordinate-enhanced segmentation features.

[0079] The coordinate-enhanced segmentation features and the initial segmentation features are concatenated to generate concatenated output features, and the concatenated output features and the coordinate-enhanced segmentation features are passed through an output convolutional layer to generate output features.

[0080] The coordinate attention-based improved C2f module includes the module's initial convolutional layer, the bottleneck layer, the segmentation operation, the coordinate attention, the concatenation operation, and the output convolutional layer.

[0081] The output features are then passed through at least two layers of the coordinate attention-based improved C2f module to generate the personal coordinate-enhanced multi-scale features.

[0082] In particular, this invention employs a coordinate attention-enhanced C2f module to suppress background interference, enhance the accurate localization of key points of people's limbs, and realize the extraction of behavioral features against occluded backgrounds in commercial buildings.

[0083] Specifically, the process of generating output features can be represented as:

[0084]

[0085]

[0086]

[0087]

[0088]

[0089]

[0090] In the formula, , , , , , , These represent compressed image features, initial image features, initial segmentation features, processed segmentation features, coordinate-enhanced segmentation features, stitched output features, and output features, respectively. This represents the initial convolutional layer of the backbone network for processing the surveillance image X, preferably a 1x1 scale convolution operation. This refers to the initial convolutional layer of a module, which can be understood as the initial convolutional layer of a module and the bottleneck layer. These are all the original architectures of the C2f module. This indicates a splitting operation. Indicates coordinate attention, This represents the features extracted from human pose. This represents the coordinate background features. The bottleneck layer is used for deep processing of these features, enhancing those related to human limb movements and action states. Coordinate attention, through its spatial positioning capabilities, accurately captures and quantifies interfering information unrelated to the human frame, such as reflections or occlusions. The interfering components are removed from the subtraction of the outputs of the bottleneck layer and coordinate attention, resulting in more focused features. This indicates a splicing operation. Indicates the output convolutional layer, where This represents a 1x1 scale convolution operation at the output convolutional layer. This indicates element-wise multiplication to further enhance the limb contour features of the crowd posture and suppress residual interference.

[0091] Furthermore, the process of generating coordinate background features through coordinate attention includes:

[0092] The processed segmentation features are passed through horizontal pooling layers and vertical pooling layers respectively to generate horizontal pooling features and vertical pooling features;

[0093] The horizontal pooling features and the vertical pooling features are respectively passed through a convolutional dimensionality reduction layer and a coordinate attention mapping layer to generate horizontal attention masks and vertical attention masks;

[0094] The product of the horizontal attention mask and the vertical attention mask is multiplied by the processed segmentation feature to generate the coordinate background feature.

[0095] Specifically, the process of generating coordinate background features through coordinate attention can be represented as:

[0096]

[0097]

[0098]

[0099]

[0100]

[0101] In the formula, , These represent horizontal pooling features and vertical pooling features, respectively. , These represent horizontal pooling layers and vertical pooling layers, respectively. , , , This indicates the processing of segmentation features. , These represent the horizontal and vertical dimensionality reduction features, respectively. Let represent the C-th channel in the channel dimension, and r represent the compression ratio of the segmentation operation. , These represent the horizontal attention mask and the vertical attention mask, respectively. This represents the SIGMOD activation function. This represents the product of the horizontal attention mask and the vertical attention mask. Indicates the coordinate background features.

[0102] Furthermore, the process of generating fused personal characteristics through the neck network includes:

[0103] The personal coordinates are enhanced multi-scale features and then passed through at least two levels of the spatiotemporal feature pyramid of the neck network to generate multi-level output features. The multi-level output features are multiplied with the convolution weight matrix of the corresponding level and normalized to generate dynamic hierarchical attention weights.

[0104] The multi-level output features and the dynamic level attention weights are multiplied and upsampled, then added to the personal coordinate enhanced multi-scale features, and passed through the pyramid output layer to generate the fused personal features.

[0105] In particular, the spatiotemporal feature pyramid of the neck network achieves multi-scale feature adaptive fusion through dynamic hierarchical attention weights, which not only preserves low-level limb details but also integrates high-level semantics of movement behavior.

[0106] Specifically, the process of generating fused personal features through the neck network can be represented as follows:

[0107]

[0108]

[0109] In the formula, This represents the output of the i-th level of the spatiotemporal feature pyramid. The output of the i-th level is used as the input of the (i+1)-th level, and so on, until the output of the highest level is used as the fused personal feature. Indicates the output layer of the pyramid. This represents the input of the i-th level, where the input of the lowest level is the personal coordinates augmented multi-scale feature. This represents the output features of multiple levels above the i-th level, specifically the j-th level. Indicates an upsampling operation. This represents the dynamic hierarchical attention weight of level j to level i. Represents the convolution weight matrix The product of the multi-level output features.

[0110] Preferably, the spatiotemporal feature pyramid has three levels.

[0111] Furthermore, the process of generating an individual's behavioral location code using a behavior detection head includes:

[0112] The fused personal features are then processed through variable convolution to generate personal pose enhancement features;

[0113] The personal posture enhancement features are passed through a behavior classification head to generate a personal behavior classification code;

[0114] The personal pose enhancement features are then passed through a location regression head to generate a personal location code;

[0115] The personal behavior classification code and the personal location code are concatenated to generate the personal behavior location code.

[0116] In particular, the behavior detection head, combined with the capture capability of variable convolution, can accurately characterize individual behaviors and their spatial distribution, providing feature support for scene analysis.

[0117] Specifically, the process of generating an individual's behavioral location code can be represented as follows:

[0118]

[0119]

[0120]

[0121]

[0122]

[0123]

[0124] In the formula, This represents the offset of the variable convolution. It indicates the integration of personal characteristics. Represents variable convolution. Represents variable convolutional features. This indicates an enhanced personal posture characteristic. This indicates element-wise addition. Indicates personal location code, Let represent a multilayer perceptron, and c represent the centroid of the bounding box in the personal pose augmentation feature map. Indicates the classification code of personal behavior, The movement speed of the bounding box in the personal pose augmentation feature map indicates the speed at which the bounding box moves. This indicates the acceleration speed of the bounding box movement in the personal pose augmentation feature map. This indicates the dwell time of the bounding box in the personal pose augmentation feature map. This indicates the location code of an individual's behavior.

[0125] Therefore, by classifying and coding individual behaviors based on movement speed and dwell time, scenario-based behavioral codes can be generated, including fast movement, medium-speed browsing movement, and long-term dwelling. Then, a crowd flow prediction model can be used to generate predicted crowd flow trends for scenarios such as fast passage, medium-speed browsing movement, and long-term dwelling. This allows for the control of the HVAC (heating, ventilation, and air conditioning) system based on the overall scenario-based movement trends of the crowd as reflected in image recognition. This enables the system to adjust its operating power according to the overall scenario-based movement trends of the crowd, making its operating power more accurate and timely, and achieving greater energy efficiency and environmental friendliness while meeting the overall comfort needs of the crowd.

[0126] like Figure 4 As shown, the process of generating crowd prediction scenario traffic trends through the crowd traffic prediction model further includes:

[0127] The location of the individual's behavior is encoded and passed through a short-term GRU layer to generate short-term behavioral features;

[0128] The location encoding of the individual's behavior is passed through a long-term GRU layer to generate long-term behavioral features;

[0129] The concatenated features of the short-term and long-term behavioral features are passed through the model output layer to generate the traffic trend of the crowd prediction scenario.

[0130] The crowd flow prediction model includes the short-term GRU layer, the long-term GRU layer, and the model output layer.

[0131] In particular, the crowd flow prediction model adopts a dual-path architecture with short-term GRU layers and long-term GRU layers to specifically capture crowd activity patterns at different time scales.

[0132] Specifically, the process of generating traffic trends for crowd prediction scenarios can be represented as:

[0133]

[0134]

[0135] In the formula, , These represent short-term and long-term behavioral characteristics, respectively. This represents the short-term hidden state of the short-term GRU layer. This represents the long-term hidden state of the long-term GRU layer. This represents the concatenation feature of the short-term and long-term behavioral characteristics at time step t. This represents the splicing characteristics of all time steps. , These represent the learnable weight matrix and bias term of the model's output layer, respectively. express function, This represents the traffic trend in a crowd prediction scenario. Therefore, a short-term GRU layer can handle crowd behavior characteristics at the second level, specifically movement within 10 seconds, while a long-term GRU layer can handle crowd behavior characteristics at the minute level, specifically crowd movement trends within 1 or 2 minutes.

[0136] Furthermore, the scenario-based control methods for commercial buildings also include:

[0137] Construct a behavior classification loss term based on the mean square error of human keypoints;

[0138] Construct a prediction error loss term based on cross-entropy calculation of traffic trends in crowd prediction scenarios;

[0139] A comprehensive loss function is constructed based on the location encoding CIoU loss term, the behavior classification loss term, and the prediction error loss term. The comprehensive loss function is then used to collaboratively optimize and train the individual behavior recognition model and the crowd flow prediction model.

[0140] In particular, the integrated loss function achieves joint optimization of the individual behavior recognition model and the crowd flow prediction model through collaborative constraints.

[0141] Specifically, the comprehensive loss function can be expressed as:

[0142]

[0143]

[0144]

[0145] In the formula, , , These represent the location encoding CIoU loss term, the behavior classification loss term, the prediction error loss term, and the comprehensive loss function, respectively. Indicates the number of visible keypoints. This represents key points on the human body. A value of 1 indicates a key point is visible, while a value of 0 indicates a key point is occluded. These represent the coordinates of the keypoints in the bounding box of the personal pose enhancement feature mapping and the coordinates of the ground truth keypoints in the sample, respectively. Indicates batch size. Represents cross-entropy. These represent the traffic trend in the predicted population scenario and the actual population traffic in the sample, respectively. , , These are the weighting coefficients.

[0146] Furthermore, the process of generating control parameters for HVAC systems in commercial buildings through a power optimization model includes:

[0147] Calculate the predicted crowd density based on the traffic trend of the predicted crowd scenario;

[0148] The predicted temperature change is corrected based on the predicted population density to calculate the predicted HVAC energy consumption and predicted comfort, respectively.

[0149] The predicted HVAC energy consumption and the predicted comfort level are substituted into the power optimization model to generate the control parameters.

[0150] Furthermore, the process of generating control parameters for the power optimization model includes:

[0151] The power optimization model is solved using the MPC algorithm to generate the control parameters.

[0152] In particular, the power optimization model uses the predicted population density as the core input to construct a correlation control logic for density, temperature, energy consumption, and comfort, thereby realizing the scenario-based control of population flow in commercial building HVAC systems.

[0153] Specifically, the process of generating the control parameters can be represented as follows:

[0154]

[0155]

[0156]

[0157]

[0158] In the formula, , These represent the predicted HVAC energy consumption and the predicted comfort level, respectively, where K represents all HVAC systems in a specific area of ​​the commercial building. Let these represent the actual temperature of a specific region and the expected temperature before time t, respectively. This represents the maximum suitable value for the rate of temperature change in a specific area. Indicates the predicted population density. This indicates the power correction value for the HVAC system. This represents the specific heat capacity of air at constant pressure, and is a constant. These represent the output power of the HVAC system and the set power before time t, respectively. Represents the building thermal time constant. Indicates the control time step. Indicates the energy efficiency of the HVAC system. This represents the power optimization model. Represents time t to time t. The optimal control parameters at time t, which include The set power (including cooling or heating power), air volume, fan operating frequency, ventilation valve opening degree, and ventilation pump speed executed within the time period. Indicates the length of the prediction time window. This represents the weighting factor, which is set from 0.4 to 0.6 depending on the different areas of the commercial building. This indicates the control penalty item.

[0159] In this embodiment, the improved YOLOv8 architecture model enhances the attention to and adaptability of key individual action features, reducing glare interference and occlusion interference in commercial buildings. A crowd behavior prediction model based on the GRU architecture accurately identifies the scene trends of crowd flow in commercial buildings during peak periods and weekend traffic peaks. A power optimization model achieves dynamic coordinated control of energy efficiency and comfort. An improved C2f module with coordinate attention suppresses background interference and enhances the accurate localization of key points on the limbs, enabling behavioral feature extraction in occluded backgrounds in commercial buildings. The spatiotemporal feature pyramid of the neck network achieves multi-scale feature adaptive fusion through dynamic hierarchical attention weights, preserving low-level limb details while integrating high-level semantics of movement behavior. The behavior detection head, combined with the capture capability of variable convolution, accurately characterizes individual behavior and its spatial distribution, providing feature support for scene analysis. The crowd flow prediction model employs a dual-path architecture with short-term and long-term GRU layers to specifically capture crowd activity patterns at different time scales. The comprehensive loss function, through collaborative constraints, achieves joint optimization of the individual behavior recognition model and the crowd flow prediction model. The power optimization model, with crowd prediction density as the core input, constructs a correlation control logic for density, temperature, energy consumption, and comfort, realizing scenario-based control of crowd flow in commercial building HVAC systems.

[0160] Those skilled in the art will recognize that the modules and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0161] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.

[0162] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A scene-based control method for commercial buildings based on image recognition, characterized in that, include: Acquire surveillance images of people in public spaces within commercial buildings, and input these images into a personal behavior recognition model based on an improved YOLOv8 architecture. This model sequentially passes through a coordinate attention-enhanced backbone network, a neck network based on a spatiotemporal feature pyramid architecture, and a variable convolution-enhanced behavior detection head to generate personal behavior location codes, including: The surveillance images are passed through the initial convolutional layer of the backbone network and multiple coordinate attention-based improved C2f modules to generate personal coordinate-enhanced multi-scale features, including: The monitored image is passed through the initial convolutional layer to generate compressed image features; The compressed image features are passed through the module's initial convolutional layer to generate initial image features; The initial image features are processed through a segmentation operation to generate initial segmentation features and then to process the segmentation features. The processed segmentation features are passed through a bottleneck layer and coordinate attention respectively to generate human pose extraction features and coordinate background features. The human pose extraction features are then subtracted from the coordinate background features to generate coordinate-enhanced segmentation features. The coordinate-enhanced segmentation features and the initial segmentation features are concatenated to generate concatenated output features, and the concatenated output features and the coordinate-enhanced segmentation features are passed through an output convolutional layer to generate output features. The coordinate attention-based improved C2f module includes the module's initial convolutional layer, the segmentation operation, the bottleneck layer, the coordinate attention, the concatenation operation, and the output convolutional layer. The output features are then passed through at least two layers of the coordinate attention-based improved C2f module to generate the personal coordinate-enhanced multi-scale features. The process of passing the personal coordinates enhanced multi-scale features through the neck network to generate fused personal features includes: passing the personal coordinates enhanced multi-scale features through at least two levels of the spatiotemporal feature pyramid of the neck network to generate multi-level output features respectively; multiplying the multi-level output features with the convolution weight matrix of the corresponding level and performing normalization calculation to generate dynamic hierarchical attention weights. The multi-level output features and the dynamic level attention weights are multiplied and upsampled, then added to the personal coordinate enhanced multi-scale features, and passed through the pyramid output layer to generate the fused personal features. The fused personal features are passed through the behavior detection head to generate the personal behavior location code, including: The fused personal features are then processed through variable convolution to generate personal pose enhancement features; The personal posture enhancement features are passed through a behavior classification head to generate a personal behavior classification code. ,in Indicates the classification code of personal behavior, The movement speed of the bounding box in the personal pose augmentation feature map indicates the speed at which the bounding box moves. This indicates the acceleration speed of the bounding box movement in the personal pose augmentation feature map. This indicates an enhanced personal posture characteristic. The duration of the bounding box in the personal pose augmentation feature map; The personal pose enhancement features are then passed through a location regression head to generate a personal location code; The personal behavior classification code and the personal location code are concatenated to generate the personal behavior location code; The location encoding of the individual's behavior is used through a crowd flow prediction model based on a GRU architecture to generate crowd prediction scenario traffic trends, including: The location of the individual's behavior is encoded and passed through a short-term GRU layer to generate short-term behavioral features; The location encoding of the individual's behavior is passed through a long-term GRU layer to generate long-term behavioral features; The concatenated features of the short-term and long-term behavioral features are passed through the model output layer to generate the traffic trend of the predicted crowd scenario. The crowd flow prediction model includes the short-term GRU layer, the long-term GRU layer, and the model output layer. The predicted traffic flow trend of the crowd is used to generate control parameters for the HVAC system of commercial buildings through a power optimization model based on energy efficiency indicators and crowd comfort.

2. The commercial building scene-based control method based on image recognition according to claim 1, characterized in that, The process of generating coordinate background features through coordinate attention includes: The processed segmentation features are passed through horizontal pooling layers and vertical pooling layers respectively to generate horizontal pooling features and vertical pooling features; The horizontal pooling features and the vertical pooling features are respectively passed through a convolutional dimensionality reduction layer and a coordinate attention mapping layer to generate horizontal attention masks and vertical attention masks; The product of the horizontal attention mask and the vertical attention mask is multiplied by the processed segmentation feature to generate the coordinate background feature.

3. The commercial building scene-based control method based on image recognition according to claim 1, characterized in that, Also includes: Construct a behavior classification loss term based on the mean square error of human keypoints; Construct a prediction error loss term based on cross-entropy calculation of traffic trends in crowd prediction scenarios; A comprehensive loss function is constructed based on the location encoding CIoU loss term, the behavior classification loss term, and the prediction error loss term. The personal behavior recognition model and the crowd flow prediction model are then collaboratively optimized and trained using the comprehensive loss function.

4. The commercial building scene-based control method based on image recognition according to any one of claims 1 to 3, characterized in that, The process of generating control parameters for HVAC systems in commercial buildings using a power optimization model includes: Calculate the predicted crowd density based on the traffic trend of the predicted crowd scenario; The predicted temperature change is corrected based on the predicted population density to calculate the predicted HVAC energy consumption and predicted comfort, respectively. The predicted HVAC energy consumption and the predicted comfort level are substituted into the power optimization model to generate the control parameters.

5. The commercial building scene-based control method based on image recognition according to claim 4, characterized in that, The process of generating control parameters from a power optimization model includes: The power optimization model is solved using the MPC algorithm to generate the control parameters.

Citation Information

Patent Citations

  • Air conditioner control method and device and air conditioner

    CN110925968A

  • Urban crowd flow prediction system and method based on space-time potential energy field

    CN115730519A