Building energy management method and system based on video monitoring

Through a building energy management method based on video surveillance, combined with multi-source data and reinforcement learning, the lighting control strategy is dynamically adjusted to solve the shortcomings of the existing system in personnel positioning and energy consumption management, and achieve a more efficient energy management and lighting system. energy saving effect.

CN118368791BActive Publication Date: 2024-09-17CHINA RAILWAY CONSTR ENG GRP FOURTH CONSTR CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410788274.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-09-17
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

Existing building energy management systems have deficiencies in personnel positioning, lighting control strategies, trade-offs between energy consumption and comfort, real-time monitoring and dynamic adjustment, and energy-saving effect evaluation. It is difficult to accurately adapt to the actual distribution and movement of personnel in the building, resulting in Wasted energy or insufficient lighting comfort.

Method used

Adopting a building energy management method based on video surveillance, by obtaining the building topology structure diagram and personnel movement paths, combined with lighting data, dynamically construct a lighting control strategy to achieve on-demand allocation and real-time monitoring of lighting resources, using reinforcement learning and multi-source heterogeneity Sensing data improves positioning accuracy and strategy optimization.

Benefits of technology

It achieves more efficient energy management, reduces lighting electricity consumption, improves the energy-saving effect of the lighting system, and improves user experience and comfort in the building through intelligent control strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118368791B
    Figure CN118368791B
Patent Text Reader

Abstract

The present invention discloses a building energy management method and system based on video surveillance, including an upper control system, a video surveillance acquisition unit and a lighting system, wherein the upper control system is arranged in a building control room; the upper control system is provided with a pre-trained lighting information preprocessing unit and a lighting control strategy generating unit; the video surveillance acquisition unit is arranged in a building, and its field of view covers at least a corridor and a part of a working area; the lighting system includes a lighting unit, a power switch connected in series with the lighting unit, a lower control unit connected in communication with the power switch, the lower control unit is connected in communication with the upper control system, and the lower control unit is connected in communication with a memory. The present invention obtains the illuminance and the personnel position distribution and the moving path information through the video surveillance acquisition unit, changes the working state of the lighting system, and ensures that the lighting resources are allocated on demand.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of energy management, in particular to the renovation of building lighting systems, and specifically relates to a building energy management method and a building energy management system based on video monitoring. Background Art

[0002] With the acceleration of urbanization, the problem of building energy consumption has become increasingly prominent, especially in lighting systems. Traditional building lighting management mostly uses timer switches or simple sensor control, which often cannot accurately adapt to the actual distribution and movement of people in the building, resulting in energy waste or insufficient lighting comfort. In other words, existing lighting control systems mostly use static or reactive control strategies, lacking in-depth understanding and prediction of people's behavior patterns.

[0003] To this end, engineers explored and applied for the following patents: CN102305381A, a hybrid integrated lighting and daylight intelligent lighting system and its control method; CN114900931A, a smart city lighting management method and system; CN203463973U, a building lighting energy-saving system; CN108278554A, a solar-powered integrated lighting system for buildings. These solutions explored building energy conservation, especially energy conservation of lighting systems, and proposed several energy-saving lighting systems. However, these lighting systems mainly save energy through daylight or solar energy, and there is relatively little exploration of dynamically adjusting building lights.

[0004] In short, the existing building energy management has obvious deficiencies in personnel positioning, lighting control strategies, trade-offs between energy consumption and comfort, real-time monitoring and dynamic adjustment, and energy-saving effect evaluation.

[0005] Therefore, new technologies or solutions are needed to overcome these problems and achieve more efficient and intelligent energy management. Summary of the invention

[0006] The purpose of the invention is to provide a building energy management method and system based on video surveillance, in order to solve one of the above-mentioned problems existing in the prior art.

[0007] A technical solution provides a control method based on the above building energy management system, comprising the following steps:

[0008] S1. Obtain or construct a building topology diagram and the installation position of the lighting unit, set the video monitoring acquisition unit layout points based on the building topology diagram, calculate the lighting area according to the installation position of the lighting unit, and form a connected lighting space;

[0009] S2. Generate a set of pedestrian movement paths based on the building topology diagram, compare the overlap ratio between the pedestrian movement paths and each lighting space in the connected lighting spaces, and assign a weight to each lighting space according to the overlap ratio;

[0010] S3. Collect the number of people in each area of ​​the building and the lighting distribution map inside the building within a predetermined time period, and analyze and predict the distribution of personnel positions in combination with the pedestrian movement path; based on the lighting data and personnel position distribution data, train the lighting control strategy generation unit and configure it in the upper control system;

[0011] S4. When in use, based on the video frame data collected by the video surveillance acquisition unit, the pedestrian movement path set is extracted, the personnel location distribution is predicted, and the lighting control strategy is generated by the lighting control strategy generation unit; the lower control unit calls the lighting control strategy and executes it. During the execution process, the lighting energy consumption is continuously monitored and analyzed to generate an energy-saving report.

[0012] According to one aspect of the present application, a building energy management system based on video surveillance is also provided, which is used to implement the above method, including:

[0013] The upper control system is arranged in the building control room; the upper control system is equipped with a pre-trained lighting information pre-processing unit and a lighting control strategy generating unit;

[0014] A video surveillance acquisition unit is installed in the building, and its field of view covers at least the corridor and part of the working area;

[0015] A lighting system, comprising a lighting unit, a power switch connected in series with the lighting unit, a lower control unit communicatively connected with the power switch, the lower control unit communicatively connected with an upper control system, and the lower control unit communicatively connected with a memory;

[0016] At every predetermined period, the upper control system extracts the video frame data of the video surveillance acquisition unit, and processes it through the lighting information preprocessing unit to generate lighting information. The lighting control strategy generation unit generates a lighting strategy based on the lighting information and sends it to the memory of the lighting system. The lower control unit calls the lighting strategy and changes the working status of each lighting unit in the lighting system by controlling the switch.

[0017] Beneficial effect, based on the video surveillance acquisition unit, the light intensity (illuminance) and personnel information of each area of ​​the building are obtained, and then the personnel distribution and light intensity are reasonably allocated. In other words, by locating the position of personnel and predicting their movement path, the lighting control strategy is dynamically constructed to ensure that lighting resources are allocated on demand.

[0018] This application realizes building energy conservation and reduces lighting electricity consumption. On this basis, the obtained algorithm module can also be configured in existing buildings to upgrade and transform the lighting system, thereby achieving building energy conservation. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a topological structure diagram of the present invention.

[0020] Figure 2 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0021] like Figure 1 As shown, according to one aspect of the present application,

[0022] Building energy management system based on video surveillance, including:

[0023] The upper control system is arranged in the building control room; the upper control system is equipped with a pre-trained lighting information pre-processing unit and a lighting control strategy generating unit;

[0024] A video surveillance acquisition unit is installed in the building, and its field of view covers at least the corridor and part of the working area;

[0025] A lighting system, comprising a lighting unit, a power switch connected in series with the lighting unit, a lower control unit communicatively connected with the power switch, the lower control unit communicatively connected with an upper control system, and the lower control unit communicatively connected with a memory;

[0026] At every predetermined period, the upper control system extracts the video frame data of the video surveillance acquisition unit, and processes it through the lighting information preprocessing unit to generate lighting information. The lighting control strategy generation unit generates a lighting strategy based on the lighting information and sends it to the memory of the lighting system. The lower control unit calls the lighting strategy and changes the working status of each lighting unit in the lighting system by controlling the switch.

[0027] According to one aspect of the present application, the upper control system is also configured with a pre-trained lighting power control unit, which generates lighting power timing data for each area in the building based on the lighting information and sends it to the memory of the lighting system. The lower control unit adjusts the power of the lighting unit based on the lighting power timing data.

[0028] The video surveillance acquisition unit is used to obtain light intensity and personnel information, and the movement path and final position are extracted based on the personnel information. Then, combined with the light information, the light intensity is increased on the path that may be passed, and the light is turned off on the path where no one passes or the probability of passing is relatively low.

[0029] According to one aspect of the present application, the lighting system includes at least two lighting areas, each lighting area is provided with an independent lighting circuit and a controller; the upper control system constructs and stores the lighting logic topology according to the topological structure of the lighting system and the lighting range of each lighting area.

[0030] Establishing hardware topology and logical topology to form a physical and logical mapping relationship makes it easier to transform and upgrade the lighting system of existing buildings to achieve energy-saving effects.

[0031] According to one aspect of the present application, in the lighting system, the sum of the working lighting areas of each lighting unit is not less than 1.5 times the preset lighting area in the building, and the working lighting areas of adjacent lighting units are not less than 1.1 times the preset lighting areas of adjacent lighting units.

[0032] like Figure 2 As shown, according to another aspect of the present application, a building energy management method based on video surveillance is also provided, which is implemented based on the building energy management system based on video surveillance and includes the following steps:

[0033] S1. Obtain or construct a building topology diagram and the installation position of the lighting unit, set the video monitoring acquisition unit layout points based on the building topology diagram, calculate the lighting area according to the installation position of the lighting unit, and form a connected lighting space;

[0034] S2. Generate a set of pedestrian movement paths based on the building topology diagram, compare the overlap ratio between the pedestrian movement paths and each lighting space in the connected lighting spaces, and assign a weight to each lighting space according to the overlap ratio;

[0035] S3. Collect the number of people in each area of ​​the building and the lighting distribution map inside the building within a predetermined time period, and analyze and predict the distribution of personnel positions in combination with the pedestrian movement path; based on the lighting data and personnel position distribution data, train the lighting control strategy generation unit and configure it in the upper control system;

[0036] S4. When in use, based on the video frame data collected by the video surveillance acquisition unit, the pedestrian movement path set is extracted, the personnel location distribution is predicted, and the lighting control strategy is generated by the lighting control strategy generation unit; the lower control unit calls the lighting control strategy and executes it. During the execution process, the lighting energy consumption is continuously monitored and analyzed to generate an energy-saving report.

[0037] According to one aspect of the present application, step S3 is further:

[0038] S31, determine whether there is a WIFI terminal management database with access rights in the building, if not,

[0039] Call the video surveillance acquisition unit to obtain the video frame, and pre-process it through the lighting information pre-processing unit to extract the illumination and character data, and count the number of people and distribution in each area; if yes, go to step S32,

[0040] S32, using WIFI data to locate personnel at room level, and obtain the number of people in each area of ​​the building;

[0041] S33, generating a lighting distribution map of a part of the interior area of ​​the building based on the illumination data;

[0042] S34. Extract the illumination of the office area from the illumination distribution map, and calculate the number of personnel and their distribution positions in combination with the personnel movement path data.

[0043] The advantages of this embodiment include: 1. Fusion of multi-source heterogeneous sensor data to improve the accuracy and robustness of personnel positioning and environmental perception. 2. Introducing pedestrian movement habits prior to make the prediction more realistic. 3. Combining path planning and lighting control to achieve lighting that follows people's movements. 4. Considering the energy consumption-comfort trade-off to seek the best compromise. 5. Using reinforcement learning to achieve adaptive dynamic optimization of strategies.

[0044] According to one aspect of the present application, step S1 further comprises:

[0045] S11. Use building information modeling technology to convert building plans into three-dimensional digital models;

[0046] S12, performing semantic segmentation and object recognition on the three-dimensional digital model, and extracting building components in the three-dimensional digital model to obtain classification information of each area and category and attribute information of each object, as well as building component information;

[0047] S13. Construct a building topology diagram based on the classification information of each area and the category and attribute information of each object, as well as the building component information, and define the functional areas.

[0048] In this embodiment, the building plan is first converted into a three-dimensional digital model using the Building Information Model (BIM) technology. The specific steps are as follows:

[0049] Use BIM software such as Autodesk Revit to import 2D CAD drawings and perform 3D modeling, define types and set parameters for components such as walls, doors, windows, and floor slabs in the model, and output BIM model files in IFC format.

[0050] Secondly, perform semantic segmentation and object recognition on the BIM model to extract key elements such as walls, doors, and windows. The specific steps are as follows:

[0051] Convert the BIM model in IFC format into 3D point cloud data, and use a deep learning-based semantic segmentation algorithm, such as PointNet++, to segment the point cloud, identify different types of components such as walls, floors, and ceilings, and extract the boundary polygons and door and window locations of each room.

[0052] Finally, construct the building topology diagram and define functional areas such as rooms and corridors. The specific steps are as follows:

[0053] According to the room boundary polygons, the Delaunay triangulation algorithm is used to generate the navigation mesh inside the room. With the center of the room as the node and the location of the door as the edge, an undirected topological graph is generated to represent the connectivity between rooms. The topological graph is divided into functional areas, marking different areas such as corridors, office areas, meeting rooms, and stairs.

[0054] According to one aspect of the present application, step S2 is further:

[0055] S21. Based on the building topology diagram, an undirected graph representing pedestrian accessibility is generated using the visibility graph analysis method;

[0056] S22, using the fast exploration random tree algorithm to sample on the undirected graph and generate pedestrian movement paths;

[0057] S23. Utilizing prior knowledge of pedestrian movement habits, pedestrian movement paths are optimized and screened through a hidden Markov model to generate a pedestrian movement path set.

[0058] In this embodiment, S21, based on the topological structure graph, a Visibility Graph Analysis method is used to generate an undirected graph representing pedestrian accessibility. The specific steps are as follows:

[0059] Inside each room, ray casting is used to identify whether there are obstacles between any two points, such as whether there are furniture. For two points that can be directly connected, an edge is established between them, and the weight of the edge is the Euclidean distance. A node is added at the location of the door, and an edge is established with the nodes of the adjacent room. The weight is the width of the door. In this way, an undirected graph representing pedestrian accessibility is obtained. The nodes are the navigation points and doors inside the room, and the edges represent the reachability relationship between the navigation points.

[0060] S22. Use the improved Rapidly-exploring Random Tree (RRT) algorithm to sample on the undirected graph and generate a large number of possible pedestrian movement paths. The specific steps are as follows:

[0061] S221. Input parameters: starting point, end point, number of sampling points N, step length delta.

[0062] S222. Starting from the starting point, randomly sample a point on the undirected graph as a new node of the tree.

[0063] S223. Find the node on the tree that is closest to the new node and use it as the parent node of the new node.

[0064] S224. If there is no obstacle between the new node and the parent node, add the new node to the tree; otherwise, shorten the step length delta and resample.

[0065] S225. Repeat steps S222-S224 until the number of nodes in the tree reaches N, or a node is less than a certain threshold from the end point.

[0066] S226: Generate a path from the starting point to the end point by backtracking the parent node pointer. To increase the diversity of the path, repeat the above process K times to obtain K possible paths.

[0067] In the sampling process of RRT, this embodiment introduces the concept of field of view of nodes. For each node, a fan-shaped field of view is defined, which represents the area that a person can observe at the node. When expanding new nodes in the tree, nodes whose field of view covers more unexplored areas are preferentially selected to improve the coverage efficiency of RRT.

[0068] S23, introduce the prior knowledge of pedestrian movement habits, use the hidden Markov model (HMM) to optimize and screen the paths, and obtain the most likely movement path set. The specific steps are as follows:

[0069] S231. Define a state set S of the HMM, where each state corresponds to an area, such as a room, corridor, etc.; define an observation set V, where each observation corresponds to the direction of pedestrian movement, such as left, right, front, and back.

[0070] S232. According to the historical trajectory data, the state transition probability matrix A and the observation probability matrix B are obtained by statistics, where a ij represents the probability of moving from region i to region j, b i (k) represents the probability of observing movement direction k in region i.

[0071] S233. For each path generated by RRT, convert it into a state sequence and observation sequence.

[0072] S234. Use the forward-backward algorithm to calculate the probability of the path appearing as the score of the path.

[0073] S235. Select the first M paths with the highest scores as the most likely moving path set.

[0074] This embodiment not only considers the topological connectivity between regions when calculating the state transfer matrix A, but also introduces an "inertia factor" to indicate the tendency of pedestrians to maintain their current moving direction. In the B matrix, the influence of the pedestrian's line of sight on the choice of moving direction is considered.

[0075] According to one aspect of the present application, step S3 is further:

[0076] S31. For buildings where RFID devices have been deployed, the RFID array is used to locate the personnel at the room level to obtain the number of people in each area of ​​the building;

[0077] S32. For buildings without RFID devices, use video surveillance systems and computer vision algorithms to count the number of people in each area of ​​the building in real time;

[0078] S33, collecting illumination data through a light sensor array to generate a light distribution map inside the building;

[0079] S34, input the number of people in each area of ​​the building where the RFID device has been deployed, the number of people in each area of ​​the building where the RFID device has not been deployed, and the internal lighting distribution map of the building into the Bayesian network for analysis to generate the personnel location distribution.

[0080] In this embodiment, S31, for a building where an RFID device has been installed, the RFID array is used to perform room-level positioning of personnel. The specific steps are as follows:

[0081] S311. Arrange 4 RFID antennas on the edge of the door of each room, in the left, right, top and bottom directions respectively.

[0082] S312. The antenna transmits electromagnetic waves of a specific frequency to scan the electronic tags worn by people entering the room.

[0083] S313. Calculate the approximate position of the person using a three-sided positioning algorithm based on the time difference of the reflected signals received by the four antennas.

[0084] S314: Combining information such as the signal strength indication (RSSI) and the phase offset, a particle filter algorithm is used to further correct the position.

[0085] S32. For buildings without RFID installed, use video surveillance systems and computer vision algorithms to count the number of people in each area in real time. The specific steps are as follows:

[0086] S321. Use the YOLO v5 target detection algorithm to detect human targets in the video. In order to improve the accuracy of small target detection, a multi-scale detection mechanism based on image pyramid is introduced.

[0087] S322. Use the Hungarian algorithm to match the target detection results between different frames to obtain the motion trajectory of each person.

[0088] S323: Smoothing the trajectory to remove abnormal trajectory segments caused by occlusion, false detection, etc.

[0089] S324. Count the number of trajectories in each area within a certain time window to obtain the distribution of the number of people in the area.

[0090] S325. Introduce a deep learning model to predict the time series data of the number of people in a region and perceive possible gatherings of people in advance.

[0091] This embodiment uses a new network structure for crowd gathering detection and introduces two features: "crowd density in the area" and "crowd flow between areas". This significantly improves the detection rate of gathering events. In the trajectory generation process, a social force model is introduced to better predict the movement patterns of people in crowded scenes.

[0092] S33, collect illumination data through the light sensor array to generate a light distribution map inside the building. The specific steps are as follows:

[0093] S331. Arrange a number of light sensors on the walls and ceiling of each room to collect local illumination values ​​in real time.

[0094] S332. Perform spatial interpolation on the collected discrete sensor data to generate a continuous illumination distribution map. The interpolation algorithm adopts an improved radial basis function (RBF) interpolation and introduces a light attenuation model to more realistically reflect the illumination distribution.

[0095] S333. Integrate semantic information from the video, partition the brightness map, and extract lighting-related areas such as desk lamps and windows.

[0096] S334, update the illumination map in real time, detect the dynamic changes of illumination, and provide a reference for subsequent lighting control.

[0097] S34, inputting multi-source data such as RFID / video population counting and illumination distribution into a Bayesian network, and comprehensively inferring the most likely personnel location distribution, the specific steps are as follows:

[0098] S341. Define the structure of the Bayesian network, where the nodes of the network include: number of people in an area, illumination in an area, functional attributes of an area, time period, etc.

[0099] S342. Based on expert experience and historical data, the prior probability distribution and conditional probability distribution of each node in the given network are determined.

[0100] S343. Receive data from each sensor in real time and update the probability distribution of the corresponding node in the network.

[0101] S344. Use the Loopy Belief Propagation approximate inference algorithm to calculate the posterior probability distribution and obtain the most likely number of people in each area.

[0102] S345, aggregate the number of people in the area by room to generate a personnel distribution map of the entire building. In the inference process, the idea of ​​factor decomposition is adopted to introduce correlation factors between rooms to improve the overall inference accuracy.

[0103] This embodiment uses a cross-modal perception fusion framework for intelligent buildings, and maps multiple sensor data such as RFID, video, and illumination to a unified probabilistic graph model to achieve the organic fusion of multi-source heterogeneous data, significantly improving the robustness of personnel positioning and environmental perception. In the probabilistic graph inference process, an adaptive reasoning mechanism based on graph neural network is introduced, and network parameters are dynamically optimized through continuous learning to better adapt to the dynamic changes of the building environment.

[0104] According to one aspect of the present application, step S4 is further:

[0105] S41, dynamically constructing a directed graph representing the movement tendency of people according to the set of pedestrian movement paths and the distribution of personnel positions;

[0106] S42, retrieve the personnel position distribution and the building internal lighting distribution map, use the Dijkstra shortest path algorithm to dynamically analyze and calculate the directed graph, and generate the shortest path that the personnel may move;

[0107] S43, generating a lighting control strategy according to the shortest path that a person may move;

[0108] S44. Collect the actual movement trajectory of personnel in real time and dynamically adjust the lighting control strategy through reinforcement learning algorithm.

[0109] In this embodiment, S41, combining the personnel location distribution and movement path information, dynamically constructing a directed graph representing the movement tendency of personnel, the specific steps are as follows:

[0110] S411. Based on the undirected topological graph, the latest personnel location distribution is integrated to form a weighted directed graph. Initially, the weight of each edge is set to 1.

[0111] S412: For each person, find out the current area where he is located, and predict his possible movement direction based on his historical movement trajectory.

[0112] S413: Quantify the confidence of the predicted moving direction and update the weight of the corresponding directed edge. The higher the confidence, the greater the weight.

[0113] S414. Introduce a lighting comfort factor to give a higher weight to directions with better lighting conditions in the same room.

[0114] S415. Regularly update the directed graph to reflect real-time changes in personnel movement intentions.

[0115] This embodiment integrates personnel positioning, trajectory prediction and lighting comfort through a dynamic path planning mechanism. By sensing personnel status in real time, it actively guides personnel to move to areas with better lighting conditions and better energy-saving effects, which improves user experience and is more conducive to achieving energy-saving goals.

[0116] S42. Use the improved Dijkstra shortest path algorithm to plan the shortest path that personnel may move in real time. The specific steps are as follows:

[0117] S421. Input a weighted directed graph, where the starting point is the current position of the person and the end point is the predicted target position.

[0118] S422. Use a Dijkstra algorithm variant based on a priority queue to find the shortest path from the starting point to the end point.

[0119] S423: Introduce illumination constraints during the pathfinding process. For edges whose illumination conditions do not meet the requirements (such as too low illumination), increase their weights to avoid selection as much as possible.

[0120] S424. Update the shortest path in real time to cope with the dynamic changes of the personnel moving target.

[0121] S425: Output the shortest path obtained through planning to guide subsequent lighting control.

[0122] In this embodiment, the illumination constraint is introduced into the traditional shortest path planning, so that the path planning not only considers the moving distance, but also takes into account the lighting quality along the way, which is more in line with the actual needs. At the same time, by combining with the adaptive lighting control, the coordinated optimization of the path planning and the lighting layout is achieved.

[0123] S43, in the shortest path and its neighborhood, adaptively control the lighting equipment to reduce the lighting power in non-critical areas. The decision algorithm adopts fuzzy control, and the specific steps are as follows:

[0124] S431. Divide the fuzzy input variables of lighting control, including: number of people in the area, regional illumination, predicted staff stay time, current energy consumption level, etc.

[0125] S432. Define a fuzzy rule base, for example: IF the number of people in the area = zero AND predicted stay time > 10 minutes THEN lighting power = low.

[0126] S433, perform fuzzy reasoning to calculate the lighting power adjustment amount for each area. During the reasoning process, an improved Takagi-Sugeno (TS) fuzzy system is used, and a case-based adaptive mechanism is introduced. According to the actual effect of the feedback, the fuzzy rules are adjusted and optimized online.

[0127] S434: Convert the lighting power adjustment amount into a control instruction for the lamp, and send it to each lighting control unit via the wireless communication network.

[0128] This embodiment adopts a fuzzy adaptive lighting control strategy that integrates personnel perception and energy consumption feedback, and optimizes the fuzzy rule base by continuous learning from the environment, so that lighting control can make more accurate and reasonable responses based on the actual needs of personnel and the dynamic characteristics of the building, thereby achieving a better balance between energy saving and comfort.

[0129] S44, introduce reinforcement learning (RL) ideas, and dynamically adjust the lighting control strategy based on personnel feedback. The specific steps are as follows:

[0130] The lighting control problem is modeled as a Markov decision process (MDP), where the state is the personnel location distribution and light distribution, the action is the lighting control instruction of each area, and the reward is a utility function that comprehensively considers energy consumption and user feedback.

[0131] The Deep Q-Network (DQN) algorithm is used to solve the MDP. DQN consists of a Q network and a Target network, which are used to estimate the current strategy and calculate the target Q value respectively.

[0132] State representation: Divide the building plane into N grids, each grid corresponds to a state dimension. The characteristics of the grid include: number of people, illumination, energy consumption, etc. The characteristics of all grids are spliced ​​into a state vector.

[0133] Neural network design: Convolutional neural network (CNN) is used as the main structure of the Q network. The spatial features are extracted through the convolution layer, and the Q value of each action is output through the fully connected layer. The input of the network is the state vector, and the output is the Q value of each lighting control instruction.

[0134] Experience replay: Build an experience replay pool to store the transfer samples (s, a, r, s') obtained by the interaction between the agent and the environment. During each training, randomly select a batch of samples from the pool, calculate the loss function of the Q network, and update the network parameters using the gradient descent method.

[0135] Target network update: Regularly copy the parameters of the Q network to the Target network to improve training stability.

[0136] Exploration and Exploitation: When generating lighting control instructions, an ε-greedy strategy is adopted to randomly select actions with a probability of ε and select the action with the largest Q value with a probability of 1-ε. As the training progresses, ε gradually decays.

[0137] Online learning: The intelligent agent continuously interacts with the building environment and continuously updates the Q network based on feedback on energy consumption and user satisfaction, so that the lighting control strategy is continuously optimized to adapt to changes in building usage patterns.

[0138] This embodiment uses an adaptive lighting control framework based on deep reinforcement learning to automatically discover key patterns that affect lighting effects through end-to-end strategy learning, and generates the optimal control strategy based on this. Compared with traditional rule-based or optimization-based control methods, this framework has stronger adaptability and robustness, can continuously learn and improve, and better cope with the complexity and variability of the building environment. At the same time, by introducing user feedback, human-oriented control optimization is achieved, which maximizes the user experience while saving energy.

[0139] According to one aspect of the present application, step S4 is further:

[0140] S45. According to the lighting control strategy, count the lighting on time of each area in the building and estimate the lighting energy consumption of each area in the building;

[0141] S46. Regularly collect user feedback on lighting comfort;

[0142] S47, construct an objective function of energy consumption-comfort trade-off, use a heuristic algorithm to analyze the feedback information of lighting energy consumption and lighting comfort in each area of ​​the building, and solve the optimal control parameters;

[0143] S48. Compare the obtained optimal control parameters with the historical control parameters, analyze the optimization results, and generate an energy-saving report based on the optimization effect.

[0144] The energy consumption evaluation and optimization of this embodiment also includes the following specific steps:

[0145] S45. Integrate various sensors and instruments to collect, classify and store building energy consumption data at different time scales. The specific steps are as follows:

[0146] Install smart electricity meters and heat meters at key nodes of the building's power distribution system and heating / cooling system to collect energy consumption data in real time.

[0147] Through the wireless sensor network, environmental parameters such as indoor temperature and humidity, CO2 concentration, illumination, as well as equipment status data such as door and window switch status and air conditioning operation mode are collected.

[0148] The energy consumption data is divided into different energy types such as lighting, air conditioning, sockets, etc., and classified according to spatial dimensions such as rooms and floors.

[0149] Introduce distributed storage frameworks, such as HDFS, to efficiently and reliably store and manage massive energy consumption data.

[0150] During the data collection process, an adaptive sampling rate adjustment strategy is adopted to dynamically adjust the sampling frequency of each sensor according to the dynamic changes in energy consumption, while ensuring data quality and reducing transmission and storage overhead as much as possible.

[0151] Through the above technical solutions, this embodiment proposes a multi-dimensional energy consumption data management model for energy efficiency analysis, which supports comprehensive analysis of building energy efficiency from multiple dimensions such as time, space, and energy-consuming equipment through refined classification and organization of energy consumption data. At the same time, an adaptive data collection mechanism is introduced to achieve dynamic optimization of monitoring resources through intelligent adjustment of data granularity, thereby improving the pertinence and efficiency of data collection.

[0152] S46. Construct an energy consumption statistics and analysis model to realize the visualization, comparative analysis and abnormal diagnosis of energy consumption data. The specific steps are as follows:

[0153] Based on energy consumption data, energy consumption statistical indicators of different time periods (day / week / month / year) are calculated, such as total energy consumption, per capita energy consumption, energy consumption intensity, etc., and a seasonal decomposition model is used to characterize the cyclical law of energy consumption.

[0154] Drawing on the idea of ​​data cube, a multi-dimensional energy consumption data aggregation and slicing model is designed. Through OLAP operation, the energy consumption data can be quickly summarized and drilled down in different dimensional combinations.

[0155] Develop a visual display interface to provide intuitive and interactive energy consumption statistics charts. Introduce a comparative analysis mechanism to support horizontal and vertical comparison of energy consumption at different times, in different rooms, and between different devices.

[0156] Use unsupervised anomaly detection algorithms such as isolation forest to automatically identify abnormal points and abnormal intervals in energy consumption data, explore the correlation patterns of energy consumption anomalies, and track the "chain reaction" of anomalies.

[0157] Conduct energy consumption profiling analysis on high-energy consumption equipment, high-energy consumption rooms, etc., identify typical energy consumption patterns, and provide decision-making references for energy-saving transformation.

[0158] Through the above technical solution, this embodiment proposes an energy consumption data mining framework for smart buildings. The framework makes full use of the multi-dimensional characteristics of energy consumption data, builds a set of data analysis models covering statistical summary, comparative analysis, abnormal diagnosis, image clustering and other functions, and intuitively presents the analysis results to managers and owners through visualization, thereby realizing the refinement and transparency of energy consumption management. At the same time, the framework uses a variety of machine learning algorithms, which can automatically discover implicit energy-saving potential from massive and heterogeneous energy consumption data, providing a new idea for building energy-saving optimization.

[0159] S47. Considering the comfort of personnel and energy cost, a multi-objective optimization model is constructed to solve the optimal lighting configuration. The specific steps are as follows:

[0160] A physical model of building lighting energy consumption is established, taking into account factors such as lamp parameters, space layout, and natural lighting, and the theoretical energy consumption under different lighting configurations is calculated.

[0161] An illuminance evaluation index for personnel comfort is designed, and parameters such as CIE unified glare value (UGR) and color rendering index (CRI) are introduced to quantitatively evaluate the visual comfort of different lighting environments.

[0162] A comfort evaluation APP was developed to collect users’ subjective feelings about different lighting environments through human-computer interaction, which was used to correct and calibrate the comfort model.

[0163] A multi-objective optimization model is constructed. The objective function includes two dimensions: minimizing energy consumption and maximizing comfort. The decision variables are the switch status and brightness of the lamps.

[0164] Aiming at different preference strategies, heuristic optimization algorithms are designed to solve the Pareto frontier of multi-objective optimization problems, such as using intelligent algorithms such as NSGA-II and particle swarm optimization. During the optimization process, real-time feedback is introduced through interactive simulation with the lighting control system to dynamically adjust the optimization search direction.

[0165] Through the above technical solutions, this embodiment proposes a building lighting design method that takes into account both human-centered lighting and energy efficiency optimization. This method introduces a quantitative evaluation model for user comfort. Through large-scale user research, the corresponding relationship between parameters such as illumination, glare, and color rendering and people's subjective feelings is characterized. On this basis, a multi-objective optimization framework is constructed. Through human-computer collaborative optimization, the most energy-saving lighting configuration solution is sought on the premise of meeting user comfort requirements. The optimization algorithm makes full use of heuristic search and interactive simulation technology, can quickly converge to the optimal solution, and make adaptive adjustments with the feedback of actual effects, thereby achieving continuous optimization of the lighting system.

[0166] S48. Develop an energy-saving transformation plan to upgrade lighting equipment in high-energy consumption areas. The specific steps are as follows:

[0167] Based on the energy consumption analysis results, key rooms and areas with high energy consumption intensity and low energy efficiency are identified.

[0168] Carry out targeted energy-saving diagnosis of lighting equipment and evaluate the deficiencies of the current lighting system in terms of energy efficiency, lighting quality, maintenance costs, etc.

[0169] Select new energy-efficient light source products, such as LED lamps, conduct technical and economic comparisons with existing lighting systems, and calculate the investment payback period for energy-saving renovations.

[0170] Design the optimal renovation plan, reasonably configure the number, layout, and power of various lamps, and optimize the control strategy to achieve the best balance between energy saving and comfort.

[0171] The lighting lines were remodeled in fine-grained zones, and intelligent control modules were introduced to achieve precise control of regional coordination and timing and lighting. The renovation plan fully considered the structural characteristics and spatial layout of the building, minimizing the difficulty and cost of the renovation.

[0172] Organize the implementation of the plan, carry out construction management, progress control and quality acceptance, and simultaneously establish an operation management system to guide subsequent energy consumption monitoring and optimization work.

[0173] Through the above technical solutions, this embodiment proposes a lighting energy-saving transformation model that integrates technology updates and management optimization. This model is based on the early energy consumption diagnosis and pattern mining, conducts a systematic analysis of the entire life cycle of the building lighting system, and formulates energy-saving transformation plans in accordance with local conditions from multiple levels such as light source selection, layout optimization, and control strategy. The plan fully draws on the latest lighting technology and products, and through refined design, maximizes the energy-saving space under the premise of controllable transformation costs. At the same time, the plan also incorporates an intelligent management mechanism, and establishes a closed-loop optimization process covering energy consumption monitoring, statistical analysis, and automatic diagnosis to ensure the durability and continuous improvement of the energy-saving transformation effect.

[0174] In general, the present invention proposes a full-process energy management solution for smart buildings from multiple perspectives, including building information digitization, personnel location tracking, intelligent lighting control, and energy consumption analysis and optimization. It forms an energy management closed loop of "inertial perception, adaptive analysis, intelligent regulation, and continuous optimization", providing a new idea and means for improving building energy efficiency. At the same time, the present invention also fully considers the user experience, and through interactive learning with people and dynamic optimization of control strategies, it maximizes human comfort while saving energy and reducing consumption.

[0175] According to one aspect of the present application, step S22 is further:

[0176] S221, setting the initial parameters of the fast exploration random tree algorithm, including the starting point, the end point, the number of sampling points N and the step length delta;

[0177] S222, starting from the starting point, taking the starting point as the first node of the tree, and randomly selecting a new node position on the undirected graph as the potential second node of the tree;

[0178] S223, find the node closest to the second node in the current tree as the parent node of the second node;

[0179] S224, check whether there is an obstacle on the path from the parent node to the second node. If there is no obstacle on the path between the second node and the parent node, add the second node to the tree. Otherwise, shorten the step length delta and re-perform random sampling.

[0180] S225, repeating steps S222-S224 until the tree reaches the number of sampling points N or the distance between the node existing in the tree and the end point is less than a preset threshold;

[0181] S226. Generate a path from the starting point to the end point by backtracking the parent node pointer, and repeat steps S221-S225 K times to obtain K pedestrian movement paths.

[0182] The specific process of step S22 in this embodiment is as follows:

[0183] First, calculate the visible area:

[0184] Step 1: For each node n in the undirected graph, calculate its visible area V(n). The visible area is defined as a fan-shaped area with n as the center and R as the radius, where R is the average line of sight distance of a person and θ is the horizontal viewing angle range, such as 120°.

[0185] Step 2: Calculate V(n) using the ray casting method. Specifically, in a polar coordinate system with n as the origin, uniformly sample K directions φ1, φ2, ..., φK in the range [0, θ], and then project L rays outward along each direction φk with a step length Δr = R / L until the ray intersects the boundary or reaches the maximum length R.

[0186] Step 3: For each intersection point p between the ray and the boundary B(n), record its polar coordinates (ρp, φp), where ρp is the distance from the intersection point to the node n, and φp is the direction angle corresponding to the intersection point.

[0187] Step 4: Calculate the boundary polygons q1, q2, ..., qM of the visible domain V(n) based on the collected intersection coordinates, where the polar coordinates (ρm, φm) of each vertex qm correspond to the farthest intersection point between the ray and the boundary.

[0188] Then perform visual domain driven RRT sampling:

[0189] Step a: Set the root node nroot of RRT as the starting point and the target node ngoal as the end point, so that the tree T initially contains only nroot.

[0190] Step b: Randomly select a node nrand in T as the starting point for the new node expansion.

[0191] Step c: Starting from nrand, randomly sample a point pnew within its visible domain V(nrand). Specifically, randomly select a direction φnew within the range [0, θ], and then randomly select a distance ρnew within the range [0, R] to obtain the polar coordinates (ρnew, φnew) of pnew.

[0192] Step d: Convert the polar coordinates of pnew into Cartesian coordinates (xnew, ynew) as the position of the new node nnew.

[0193] Step e: Check whether nnew intersects with the boundary B(nrand). If so, adjust the position of nnew so that it is located at the intersection.

[0194] Step f: Check whether nnew is located in an unexplored area. Specifically, count the neighboring nodes of nnew, including the visible area coverage of nodes inside and outside the tree, and calculate the uncovered area Auncover.

[0195] Step g: If Auncover is greater than the set threshold Ath, nnew is added to the tree T and an edge is added between it and nrand; otherwise, steps cf are repeated to resample the new node.

[0196] Step h: Repeat steps bg until the tree T reaches the target node ngoal or reaches the maximum number of iterations Nmax.

[0197] Step i: trace back from ngoal to nroot and extract the complete path nroot, n1, n2, ..., ngoal.

[0198] Finally, path optimization and fusion are performed: for each path generated by RRT, local optimization is performed. Specifically, two non-adjacent nodes ni and nj on the path are randomly selected, and the original sub-path ni, ..., nj is replaced with a line segment directly connecting ni and nj, and the replaced path is checked to see if it intersects with the boundary. If it does not intersect, the replacement is accepted, otherwise, the original sub-path is kept unchanged, and the process is repeated until the path length no longer changes significantly.

[0199] Among all optimized paths, those with high overlap with other paths are eliminated. Specifically, for any two paths P1 and P2, their overlap is calculated:

[0200] overlap(P1, P2)=(length(P1∩P2)) / min(length(P1), length(P2));

[0201] Wherein, length (·) represents the length of the path, P1∩P2 represents the common part of the two paths, and if overlap(P1, P2) is greater than the set threshold Oth, assuming the threshold is 0.8, the longer one of P1 and P2 is removed.

[0202] Output the remaining paths as the final set of candidate paths.

[0203] Through the above steps, the concept of node visual domain is introduced into the RRT algorithm, and the original random sampling strategy is improved and optimized in a targeted manner. The sampling strategy driven by the visual domain can more effectively explore unknown areas in the environment and avoid repeated sampling in the covered area, thereby significantly improving the search efficiency of RRT. At the same time, after the path is generated, a path optimization and screening mechanism based on the visual domain is introduced to further improve the rationality and diversity of the path.

[0204] Compared with traditional uniformly random sampling, visual domain driven RRT sampling has the following advantages:

[0205] 1) Higher exploration efficiency: By prioritizing the expansion of nodes whose visual domain covers more new areas, RRT can explore the entire environment space with fewer iterations, thus accelerating the convergence process of the optimal path.

[0206] 2) Better path quality: The generated path can better adapt to the geometric characteristics of the environment, avoiding repeated sampling in narrow and long channels, making the path smoother and more natural.

[0207] 3) Stronger robustness: By dynamically maintaining the visible coverage information of the node neighborhood, RRT has stronger adaptability to dynamic changes in the environment, such as the appearance and disappearance of obstacles, and can quickly adjust the search strategy to find a new optimal path.

[0208] In general, the visual domain driven RRT algorithm proposed in this embodiment is an important improvement and innovation of the traditional RRT algorithm. By integrating the local perception information of the node neighborhood, the algorithm can plan pedestrian paths more intelligently and efficiently, laying a solid foundation for subsequent lighting control and energy consumption optimization. At the same time, the idea of ​​"adaptive decision-making based on environmental perception" embodied in the algorithm also has certain enlightenment significance for other types of path planning and robot motion control problems.

[0209] According to one aspect of the present application, step S32 is further:

[0210] S321. For buildings without RFID devices, real-time video images are acquired through a video surveillance system, and a target detection algorithm is used to detect human targets in each frame of the video image;

[0211] S322, using the Hungarian algorithm to match the human target detection results between different frames to obtain the motion trajectory of each person;

[0212] S323, smoothing the motion trajectory of each person, eliminating abnormal motion trajectories caused by occlusion and false detection, and obtaining a corrected individual motion trajectory;

[0213] S324. According to the corrected individual motion trajectories, the number of individual motion trajectories in each area of ​​the building in different time periods is counted to obtain the distribution of the number of people in each area of ​​the building;

[0214] S325. Analyze and predict the distribution of people in each area of ​​the building through a deep learning model.

[0215] According to one aspect of the present application, step S34 is further:

[0216] S341. Define nodes in the Bayesian network, including the number of people in the area, the illumination of the area, the functional attributes of the area, and the time period;

[0217] S342, obtaining expert experience data and historical data, and defining the prior probability distribution and conditional probability distribution of each node in the Bayesian network;

[0218] S343, obtaining in real time the number of people in each area of ​​the building where the RFID device has been deployed, the number of people in each area of ​​the building where the RFID device has not been deployed, and the light distribution map inside the building, updating the probability distribution of the number of people in each area, regional illumination, regional functional attributes, and time period nodes in the Bayesian network, and obtaining an updated Bayesian network;

[0219] S344, using an approximate inference algorithm to calculate the posterior probability distribution in the updated Bayesian network, and generating the number of people in each area based on the posterior probability distribution;

[0220] S345. Aggregate the number of people in each area to generate the personnel location distribution of the entire building.

[0221] In this embodiment, in step S34, the Loopy Belief Propagation algorithm is used to perform approximate inference on the Bayesian network to calculate the posterior probability of the personnel location distribution. The specific process is as follows:

[0222] S341. Define message passing variables: For each edge (i, j), define two message passing variables mij(xj) and mji(xi), which represent the messages passed from node i to node j and from node j to node i, respectively, where xi and xj represent the states of nodes i and j. Initially, all message variables are initialized to 1.

[0223] S342, cyclic update message: In each round of iteration, the message on each edge is updated according to the following formula:

[0224] mij(xj)=α∑xiψi(xi)ψij(xi,xj)∏k∈N(i)\jmki(xi);

[0225] Among them, ψi(xi) is the prior probability of node i, ψij(xi,xj) is the compatibility function between nodes i and j, N(i)\j represents all neighbor nodes of node i except j, and α is the normalization factor such that ∑xjmij(xj)=1.

[0226] S343. Update edge probability: After each round of iteration, calculate the edge probability of each node based on the updated message variable:

[0227] bi(xi)=αψi(xi)∏j∈N(i)mji(xi);

[0228] Among them, bi(xi) represents the marginal probability of node i taking state xi, and N(i) represents all neighbor nodes of node i.

[0229] S344. Repeat steps S342-S343 until the message variables converge or the maximum number of iterations is reached.

[0230] S345. Output posterior probability: For each node, take its edge probability bi(xi) as its posterior probability distribution.

[0231] In practical applications, the compatibility function ψij(xi, xj) can be flexibly designed according to the specific network structure and node type. For example, for nodes representing personnel locations, the distance information can be used to construct a Gaussian compatibility function; for nodes representing regional attributes, the co-occurrence frequency can be used to construct a Dirichlet compatibility function. In addition, since the actual Bayesian network may have loops, the message transmission process may oscillate. In order to improve convergence, a damping mechanism can be used, that is, a damping factor λ∈[0, 1] is introduced when updating the message, and the new and old messages are weighted averaged:

[0232] mij(xj)new=λ·mij(xj)new+(1-λ)·mij(xj)old;

[0233] The LBP algorithm makes approximate inferences about complex networks through local message passing, avoiding the high computational cost of precise inference. Although LBP does not have a theoretical guarantee of convergence, it often achieves good approximation results in practice. Introducing LBP into the Bayesian modeling of construction personnel positioning can fully explore the correlation between different information sources, thereby significantly improving positioning accuracy and robustness.

[0234] According to one aspect of the present application, step S42 is further:

[0235] S421, determining the starting point and the end point according to the directed graph, wherein the starting point is the current position of the person, and the end point is the predicted target position;

[0236] S422, using the Dijkstra shortest path algorithm to find the shortest path from the starting point to the end point. In the process of finding the shortest path from the starting point to the end point, the edges that do not meet the lighting condition requirements are adjusted by increasing their weights in combination with the lighting distribution map inside the building.

[0237] S424, obtaining the personnel location distribution in real time, combining the lighting distribution map inside the building, and recalculating and optimizing the shortest path from the starting point to the end point;

[0238] S425. Output the updated shortest path as the shortest path for possible movement of the personnel.

[0239] According to another aspect of the present application, by analyzing the statistical laws of pedestrian movement trajectories over a period of time, the probability distribution of pedestrian movement can be characterized from the two dimensions of time and space, and a directed graph skeleton reflecting the main movement mode can be extracted. The specific process is as follows:

[0240] S23a, time and space division of mobile trajectory data:

[0241] Divide 24 hours a day into N time slices T1, T2, ..., TN, for example, one slice every 30 minutes, to characterize the time distribution of mobile behavior.

[0242] The nodes in the directed graph G, such as rooms, corridors, etc., are divided into M semantic regions L1, L2, ..., LM as spatial primitives for mobile behavior analysis.

[0243] S23b. Statistical modeling of movement trajectories:

[0244] For each moving trajectory, extract its spatiotemporal attributes<t,li,lj> , where t is the time slice in which the movement occurs, li and lj are the starting area and the target area respectively.

[0245] Count the movement frequency nijk from area Li to Lj in each time slice Tk.

[0246] Calculate the transition probability pijk=nijk / ∑jnijk, which represents the transition probability from Li to Lj within time Tk.

[0247] Repeat the above calculation to obtain the space-time transfer probability matrix P=pijk|i, j=1,...,M; k=1,...,N.

[0248] S23c, extraction of pedestrian moving skeleton:

[0249] Based on the transition probability matrix P, a space-time cube (Space-Time Cube) C is constructed. The three dimensions of the cube are the starting area, the target area, and the time slice. The value of each cell is the corresponding transition probability.

[0250] In cube C, the transition probabilities are summed along the time dimension to obtain the cumulative transition probability matrix Q between regions, where qij=∑kpijk.

[0251] The skeleton of the matrix Q is extracted. Specifically, a method combining threshold filtering and K-Core decomposition is adopted: first, the edges in Q that are less than the threshold ε are removed to obtain a sparse matrix Q'; then, the nodes with a degree less than K are recursively removed on Q' until the degree of all nodes is not less than K, and the K-Core skeleton is obtained.

[0252] The K-Core skeleton is output as the main mode of pedestrian movement, and the weight of each edge is the corresponding cumulative transition probability qij.

[0253] S23d. Dynamic update of mobile skeleton:

[0254] As new movement trajectory data is continuously generated, steps S23b-S23c are repeated periodically to update the spatiotemporal transition probability matrix P and the K-Core skeleton.

[0255] The time decay factor is introduced to assign different weights to the new and old trajectory data, so that the skeleton can adaptively reflect the dynamic changes of pedestrian movement patterns.

[0256] The evolution of the skeleton is visualized to help managers gain insight into the dynamic patterns of building space utilization.

[0257] In this embodiment, by extracting the pedestrian movement skeleton, the main distribution and flow pattern of the internal flow of people in the building can be depicted. This skeleton can not only provide a more accurate decision-making basis for lighting control, air conditioning adjustment, etc., but also serve as a reference for building design optimization, space planning, etc., which is of great value for improving the use efficiency and humanized experience of building space. At the same time, combining skeleton extraction with dynamic updating can capture the spatiotemporal evolution of pedestrian movement patterns, optimize building energy management from a higher dimension, and achieve a more intelligent and flexible control solution.

[0258] In this embodiment, step S23 introduces prior knowledge of pedestrian movement habits and uses a hidden Markov model (HMM) to optimize and screen the paths to obtain the most likely movement path set. The specific process is as follows:

[0259] Step 1: State definition and transfer matrix construction:

[0260] Define the state set S=s1, s2, ..., sN of HMM, where each state si corresponds to an area, such as a room, corridor, etc.

[0261] Based on the topological structure diagram, initialize the state transfer matrix A=aij|i, j=1, 2, ..., N, where aij represents the probability of transitioning from state si to state sj. Initially, for any two adjacent regions si and sj, let aij=aji=0.5; for non-adjacent regions, let aij=aji=0.

[0262] Step 2: Introduce inertia factor:

[0263] For any two adjacent regions si and sj, define the direction vector dij between them. Specifically, the starting point of dij is the center coordinate of si, and the end point is the center coordinate of sj.

[0264] For each state si, count the average value of its outgoing edge direction vector:

[0265] d avg (i)=(∑jaij·dij) / (∑jaij);

[0266] Among them, j traverses all adjacent areas of si, d avg (i) reflects the average moving direction of the pedestrian at si.

[0267] The inertia factor α is defined to indicate the pedestrian's tendency to maintain the current moving direction. The value range of α is [0, 1]. The larger the α, the less likely the pedestrian's moving direction is to change.

[0268] For each state si, update the transition probability of its outgoing edge, and for any adjacent region sj of si, update aij as follows:

[0269] aij new =aij old ·(1+α·cos(dij,d avg (i)));

[0270] Among them, cos(dij,d avg (i)) represents the vector dij and d avg The cosine value of the angle (i) is used to measure the consistency between the direction of sj and the average moving direction of si. The smaller the angle, the larger the cosine value, which means that moving to sj is more consistent with maintaining the current direction. Therefore, the value of aij should be appropriately increased.

[0271] Repeat the above process to update all elements in the state transfer matrix A. To ensure that the sum of the probabilities of each row is 1, for each state si, divide all elements in the i-th row by their sum:

[0272] aij final =aij new / (∑jaij new );

[0273] Step 3: Observation probability matrix definition:

[0274] Define the observation set V=v1, v2, ..., vM of HMM, where each observation vk corresponds to a pedestrian movement direction, such as front, back, left, and right.

[0275] Based on the pedestrian movement history data, the observation probability matrix B=bik|i=1, 2, ..., N; k=1, 2, ..., M is obtained, where bik represents the probability of observing the movement direction vk in state si.

[0276] The calculation process of the observation probability matrix B is shown in the above scheme and will not be repeated here.

[0277] Step 4: Path scoring and screening:

[0278] For each path generated by RRT, it is converted into a state sequence si1, si2, ..., siT and an observation sequence vk1, vk2, ..., vkT of HMM.

[0279] Using the forward algorithm, calculate the probability of occurrence of the path:

[0280] P(path)=∏t=1: T-1asit, sit+1·bsit, vkt;

[0281] Sort all paths from high to low according to their probability of occurrence, and select the first K paths as the most likely set of moving paths.

[0282] Through the above steps, the inertia factor α is introduced when constructing the state transfer matrix A, and the original transfer probability based on topological connectivity is corrected and optimized. The role of the inertia factor is that when a pedestrian moves from area si to an adjacent area sj, if the direction of sj is consistent with the average moving direction of si, the transfer probability aij will increase accordingly: conversely, if moving to sj requires a significant change in direction, aij will decrease accordingly. In this way, when generating paths, those paths that are consistent with the pedestrian's inertial moving direction will be given a higher probability and are more likely to be selected, so that the final generated path set is more in line with the pedestrian's actual movement habits.

[0283] In this embodiment, the advantages of introducing the inertia factor are:

[0284] 1. Model pedestrian movement more realistically: Pedestrians usually tend to maintain a roughly unchanged direction during movement, rather than frequently changing their direction. The introduction of inertia factors can well characterize this continuity and directionality, making the generated path closer to reality.

[0285] 2. Improve the smoothness of the path: Frequent turns will make the path appear "tortuous" and "unnatural". By increasing the probability of moving in the same direction through the inertia factor, the path can be made smoother and more comfortable, reducing unnecessary turns.

[0286] 3. Accelerate the convergence of path search: During the path search process, those paths that are consistent with the inertial movement direction will be explored and expanded first, thereby accelerating the convergence of the search algorithm and finding the optimal path faster.

[0287] It should be noted that the value of the inertia factor α needs to be adjusted according to specific scenarios and requirements. If the value of α is too large, the path may be too "rigid" and difficult to bypass obstacles; if the value of α is too small, it may not be able to effectively guide the path search. Therefore, in actual applications, it is necessary to find the optimal α value through repeated experiments and parameter tuning to achieve the best balance between path authenticity and search efficiency.

[0288] In addition, when updating the state transfer matrix A, in addition to considering the inertia factor, other factors that affect the pedestrian movement tendency can also be introduced, such as the functional attributes of the area, congestion, etc.

[0289] In general, the introduction of inertia factor is an important improvement and supplement to the HMM path optimization method. It makes full use of the prior knowledge of pedestrian movement and embeds inertia preference in the transition probability to make the generated path more intelligent, natural and efficient.

[0290] In this embodiment, step S32, for buildings without RFID installed, use a video surveillance system and a computer vision algorithm to count the number of people in each area in real time. The specific steps are as follows:

[0291] S32a, Area Division and Personnel Detection:

[0292] The building plane is divided into N non-overlapping regions R1, R2, ..., RN, each of which corresponds to the field of view of one or more surveillance cameras.

[0293] For each camera’s video stream, use target detection algorithms such as YOLOv5 to detect human targets in the picture in real time and output their bounding box coordinates and confidence levels.

[0294] For multiple cameras with overlapping fields of view, the detection results from different perspectives are projected into a unified building plane coordinate system using spatial mapping relationships for target matching and deduplication.

[0295] S32b. Calculation of regional population density:

[0296] For each area Ri, count the number of people Ni(t) inside it, that is, the instantaneous number of people in the area at time t.

[0297] The area Si of the calculated region Ri can be obtained by marking and measuring on the building plan.

[0298] The population density Di(t) of area Ri is defined as:

[0299] Di(t)=Ni(t) / Si;

[0300] Indicates the number of people per unit area. The larger Di(t) is, the more crowded the area is.

[0301] Introduce the time smoothing factor β to smooth Di(t) and obtain the smoothed population density D'i(t):

[0302] D'i(t)=β·Di(t)+(1-β)·D'i(t-1);

[0303] Among them, D'i(t-1) is the smoothed population density at the previous moment, and the value range of β is [0, 1], which is used to control the smoothing intensity.

[0304] S32c, Calculation of personnel flow between regions:

[0305] For two adjacent areas Ri and Rj, the personnel flow Fij(t) between them is defined as:

[0306] Fij(t)=Nij(t)-Nji(t);

[0307] Among them, Nij(t) represents the number of people flowing from Ri to Rj at time t, Nji(t) represents the number of people flowing from Rj to Ri, Fij(t) is positive, indicating a net inflow of people into Rj; Fij(t) is negative, indicating a net outflow of people from Rj.

[0308] In order to calculate Nij(t) and Nji(t), it is necessary to track the cross-region movement of people. Specifically, for each person target, record its position change in consecutive frames to determine whether its motion trajectory crosses the region boundary.

[0309] If a human target moves from the boundary line of Ri to the interior of Rj between two adjacent frames, it is counted in Nij(t); conversely, if it moves from Rj to Ri, it is counted in Nji(t).

[0310] Accumulate Nij(t) and Nji(t) to get Fij(t). Similarly, introduce the time smoothing factor γ to smooth Fij(t):

[0311] F'ij(t)=γ·Fij(t)+(1-γ)·F'ij(t-1);

[0312] S32d, Aggregation Event Detection:

[0313] For each area Ri, calculate the abnormal degree of its population density:

[0314] Ai(t)=(D'i(t)-μi) / σi;

[0315] Among them, μi and σi are the mean and standard deviation of the population density of region Ri in historical data. The larger Ai(t) is, the more abnormal the current population density is compared with the historical level.

[0316] For each pair of adjacent areas Ri and Rj, calculate the abnormal degree of their personnel flow:

[0317] Bij(t)=(F'ij(t)-λij) / δij;

[0318] Among them, λij and δij are the mean and standard deviation of the personnel flow between regions Ri and Rj in historical data. The larger Bij(t) is, the more abnormal the current personnel flow is compared with the historical level.

[0319] Set the abnormal threshold of personnel density TA and the abnormal threshold of personnel flow TB. For any area Ri, if Ai(t)>TA, it is considered that there is a risk of personnel gathering in the area; for any adjacent areas Ri and Rj, if Bij(t)>TB, it is considered that there is an abnormal flow of people between the areas.

[0320] Considering the abnormal density of people and the abnormal flow of people, design the gathering event detection rules. For example:

[0321] Rule 1: If the population density in an area is abnormal, and there is abnormal flow of people towards this area in the surrounding areas, it is judged that a gathering event has occurred in this area.

[0322] Rule 2: If multiple adjacent areas have abnormal population density at the same time and there is abnormal bidirectional flow of people between them, then these areas are judged to form a cluster together.

[0323] Rule 3: If an area is in an abnormal population density state for multiple time steps, but there is no obvious abnormal flow of people around it, it is judged that there may be a risk of detention in the area.

[0324] According to the above rules, cluster events and abnormal situations are detected in real time, and corresponding early warning and emergency response mechanisms are triggered.

[0325] Through the above steps, two key features, "density of people within a region" and "flow of people between regions", were introduced, and on this basis, an analysis framework and rule system for gathering event detection was constructed. Compared with the traditional method that simply relies on the number of people threshold, this method can more comprehensively and dynamically describe the spatiotemporal evolution of gatherings, thereby significantly improving the detection rate and warning timeliness of gathering events.

[0326] Specifically, the population density feature reflects the degree of local aggregation within the region. The greater the density, the more people the region carries. Exceeding a certain threshold means regional congestion and safety hazards. The population flow feature describes the flow trend of people between regions. If there is a continuous abnormal inflow or outflow of people between multiple regions, it often indicates an imbalance in the distribution of people between regions and potential aggregation risks.

[0327] Combining these two features for comprehensive analysis can provide a more global and three-dimensional picture of the gathering of people. High-density gathering within a single area may be just temporary congestion caused by an emergency; while high-density gathering accompanied by an abnormal influx of people is more likely to be a large-scale, continuous mass incident, which requires sufficient vigilance and attention. Therefore, the combination of density features and flow features helps to automatically identify gathering patterns of different natures and provide more targeted decision-making references for relevant departments.

[0328] In addition, time smoothing is introduced in the calculation process of density and flow. This is because the original density and flow data often have short-term fluctuations and random noise, which can easily cause false positives and false negatives. Through time smoothing, high-frequency noise can be filtered out, and the main change trend can be highlighted, thereby improving the robustness of cluster detection. By adjusting the smoothing factor, the sensitivity of the algorithm to cluster changes can be flexibly controlled, and a trade-off can be made between real-time performance and reliability.

[0329] Of course, the effective application of this method also depends on the reasonable setting of various thresholds and rule parameters. This requires debugging and optimizing the algorithm through repeated experiments and historical data analysis in actual scenarios, and dynamically adjusting the detection strategy according to the actual results. It is also possible to consider introducing adaptive thresholds and online learning mechanisms so that the algorithm can continuously improve and enhance itself over time and with the accumulation of data.

[0330] In the future, the function and scope of application of this method can be further expanded. On the one hand, more types of abnormal event detection can be included, such as riots and fights, to form a comprehensive public safety monitoring system; on the other hand, external data sources such as mobile communications and social networks can be used to achieve cross-platform and cross-regional personnel gathering analysis and prediction, providing support for security prevention and control and emergency dispatch in a wider range.

[0331] In this embodiment, step S33 collects illumination data through the illumination sensor array to generate an illumination distribution map inside the building. The specific process is as follows:

[0332] S331, sensor data acquisition and preprocessing:

[0333] M light sensors S1, S2, ..., SM are arranged on the walls and ceiling inside the building to record their position coordinates (x1, y1, z1), (x2, y2, z2), ..., (xM, yM, zM).

[0334] Each sensor Si collects illumination values ​​Li at a certain frequency, such as once every minute, in lux.

[0335] Perform a preliminary screening of the collected illuminance data to remove abnormal values, such as values ​​that exceed the sensor range or are physically impossible.

[0336] Kalman filtering and other methods are used to smooth and denoise the illumination data to reduce random disturbances and measurement errors.

[0337] S332, spatial interpolation and light attenuation modeling:

[0338] The interior space of the building is divided into several three-dimensional grids, and the size of the grid is determined according to the resolution of the required illumination map and the computational efficiency.

[0339] For each grid node (x, y, z), calculate its illumination value L(x, y, z). Since the node position usually does not directly correspond to the sensor position, spatial interpolation is required based on the data of adjacent sensors.

[0340] Using the improved radial basis function (RBF) interpolation algorithm, for the node (x, y, z), the calculation formula of its illumination value L(x, y, z) is:

[0341] L(x,y,z)=∑i=1:Mwi·φ(ri)+C;

[0342] Where wi is the weight coefficient of the ith sensor, ri is the Euclidean distance from the node (x, y, z) to the ith sensor, φ(·) is the radial basis function, and C is the bias constant.

[0343] On the basis of traditional RBF interpolation, a light attenuation model is introduced to more realistically reflect the light distribution. Specifically, when calculating the weight coefficient wi, not only the distance from the node to the sensor is considered, but also the energy attenuation of the light during propagation.

[0344] Lambert-Beer law is used to model the light intensity attenuation, and the modified weight coefficient wi' is calculated as:

[0345] wi' = wi exp(-μ ri);

[0346] Where μ is the light attenuation coefficient, which is related to the absorption and scattering characteristics of the medium. μ can be estimated based on the properties of building materials, such as reflectivity and transmittance, or it can be obtained by fitting measured data.

[0347] Select an appropriate radial basis function φ(·), such as Gaussian function, multi-quadratic function, etc., to smooth the interpolation result and avoid spikes and mutations.

[0348] Solve the linear equations to obtain all weight coefficients wi, substitute them into the interpolation formula, and calculate the illumination value of each grid node.

[0349] S333, Illuminance map visualization and semantic partitioning:

[0350] Generate a continuous three-dimensional illumination distribution map based on the illumination value of the grid nodes. You can use color coding, contour lines, cloud maps and other visualization methods to intuitively display the illumination distribution inside the building.

[0351] Partition the illumination distribution map and extract the semantic areas related to lighting, which requires the fusion of semantic information from video surveillance:

[0352] Perform semantic segmentation on video frames to identify lighting equipment such as table lamps, chandeliers, floor lamps, and natural lighting areas such as windows and skylights in the image.

[0353] The semantic segmentation results in the video frame are spatially aligned with the illumination distribution map, and the pixel-level semantic labels are mapped to the corresponding grid nodes.

[0354] Region growing and clustering are performed on the illumination distribution map to merge continuous high-illuminance areas into a semantic area, and corresponding attributes are assigned according to the mapped semantic labels, such as "desk lamp area", "window area", etc.

[0355] Post-process the partition results, such as smoothing the region boundaries and removing the too small scattered areas to ensure the continuity and integrity of the partitions.

[0356] The output is a partitioned illumination distribution map with semantic attribute labels attached to each area. This fusion of illumination and semantics can provide richer contextual information for subsequent intelligent control and energy-saving optimization.

[0357] S334. Spatiotemporal dynamic modeling of illumination distribution:

[0358] Since the lighting distribution in the building environment usually changes dynamically over time, such as natural lighting changes with the sun's altitude angle and artificial lighting changes with occupancy status, continuous spatiotemporal modeling is required.

[0359] At each time step, such as every minute, steps S331 - S333 are repeatedly executed to generate a series of time-series illumination distribution diagrams.

[0360] Spatiotemporal interpolation and prediction models are used to characterize the dynamic evolution of illumination distribution. Time series models such as hidden Markov models, Kalman filters, and long short-term memory networks (LSTM) can be used to learn the time correlation and change patterns of illumination distribution.

[0361] Combined with external environmental information such as the sun's trajectory and weather forecast, the future light distribution is predicted, providing a basis for formulating lighting control strategies in advance.

[0362] Through visualization technologies such as space-time cubes and dynamic heat maps, the dynamic changes in building lighting can be intuitively displayed, helping managers gain insight into energy-saving potential and optimization directions.

[0363] In this embodiment, through improved RBF interpolation and light attenuation modeling, a continuous, smooth, and realistic illumination distribution map can be reconstructed from discrete sensor data, which intuitively reflects the lighting conditions inside the building. By integrating with video semantic information, the content of the illumination map is further enriched, so that it not only includes the distribution of light intensity, but also includes semantic elements such as lighting equipment and lighting areas, thereby providing a more comprehensive reference basis for intelligent lighting control decisions.

[0364] In step S34, the Loopy Belief Propagation (LBP) algorithm is used to perform approximate inference on the Bayesian network, calculate the posterior probability distribution of the person's location, and introduce room correlation through factor decomposition to improve the overall inference accuracy. The technical details of the inference process are described in detail below:

[0365] S34, inputting RFID and video population counting, illumination distribution and other multi-source data into a Bayesian network, comprehensively inferring the most likely personnel location distribution, the specific process is as follows:

[0366] S34a. Bayesian network construction:

[0367] Define the nodes of the Bayesian network. The network contains three types of nodes: region nodes, room nodes, and observation nodes.

[0368] Regional nodes R = R1, R2, ..., RN: correspond to the N regions divided by the building plane. Each node represents the number of people in an area, and the value range is [0, 1, 2, ...].

[0369] Room nodes O=O1, O2, ..., OM: correspond to the M rooms in the building. Each node represents the total number of people in a room, and the value range is [0, 1, 2, ...].

[0370] Observation nodes D, L: D represents the people counting results from RFID and video, and L represents the illumination readings from the light sensor. They are known observations and are used to provide evidence support for the network.

[0371] Define the dependencies between nodes and build a directed acyclic graph (DAG).

[0372] From region node to room node: If region Ri belongs to room Oj, add a directed edge from Ri to Oj, indicating that the number of people in the room affects the number of people in the region.

[0373] Room node to observation node: Add directed edges from each room node Oj to the observation nodes D and L, indicating that the observation value is affected by the number of people in the room.

[0374] Between regional nodes: If regions Ri and Rj are adjacent and have significant flow of people, then an undirected edge connecting Ri and Rj is added to indicate that there is a correlation between the distribution of people in adjacent regions.

[0375] Defines the conditional probability distribution of a node.

[0376] For each regional node Ri, its conditional probability distribution P(Ri|Pa(Ri)) is defined, where Pa(Ri) represents the parent node of Ri, that is, the regional node and room node adjacent to it. This distribution describes the probability distribution of the number of people in the current region when the number of people in the adjacent regions and rooms is known.

[0377] For each room node Oj, define its conditional probability distribution P(Oj|Pa(Oj)), where Pa(Oj) represents the parent node of Oj, that is, all the regional nodes belonging to the room. This distribution describes the probability distribution of the total number of people in the current room when the number of people in each area is known.

[0378] For observation nodes D and L, their conditional probability distributions P(D|Pa(D)) and P(L|Pa(L)) are defined, where Pa(D) and Pa(L) are all room nodes. These two distributions describe the probability of observing a certain number of people or illumination values ​​when the number of people in the room is known.

[0379] S34b.LBP approximate inference:

[0380] Initialize the message. For each edge (i, j), initialize two messages: mij(xj) and mji(xi), which represent the message from node i to node j and the message from node j to node i, where xi and xj represent the values ​​of nodes i and j respectively. Initially, all messages are set to 1.

[0381] Loop to update the message, for each node i, update its outgoing message:

[0382] mij(xj)=α∑xiφi(xi)ψij(xi,xj)∏k∈N(i)\jmki(xi);

[0383] Among them, α is the normalization factor, φi(xi) is the local function of node i, indicating its initial probability distribution, ψij(xi, xj) is the compatibility function between nodes i and j, indicating the compatibility of their values, and N(i)\j represents all neighbor nodes of node i except j.

[0384] Repeat the above steps until all messages converge or the maximum number of iterations is reached.

[0385] Calculate the marginal distribution. For each node i, calculate its marginal probability distribution:

[0386] bi(xi)=αφi(xi)∏j∈N(i)mji(xi);

[0387] Among them, bi(xi) represents the posterior probability that node i takes the value xi, and N(i) represents all neighbor nodes of node i.

[0388] S34c. Factor decomposition and introduction of room correlation: In order to improve the overall inference accuracy, the room correlation factor is introduced in the LBP inference process. Specifically, for every two adjacent rooms Om and On, a correlation factor node Fmn is introduced to represent the correlation strength of the distribution of the number of people in these two rooms.

[0389] Define the local function of the correlation factor. The local function g(Fmn|Om, On) of Fmn represents the correlation strength of the distribution of the number of people in the two rooms when the number of people in rooms Om and On is known. This function can be designed based on domain knowledge or learned from historical data.

[0390] Modify the LBP message passing formula. When calculating the message mij(xj) from node i to j, if node j is the correlation factor node Fmn, the formula becomes:

[0391] mij(xj)=α∑xiφi(xi)g(Fmn|Om,On)∏k∈N(i)\jmki(xi);

[0392] Among them, Om and On are two room nodes connected to Fmn.

[0393] Aggregation of the number of people in the room, after obtaining the edge distribution of all regional nodes, for each room Om, add the edge distribution of the number of regional nodes it contains to obtain the total number of people in the room P(Om).

[0394] S34d. Generation and application of personnel distribution map: Based on the edge distribution of area nodes and room nodes, the personnel distribution map of the entire building is generated. Visualization methods such as color coding and heat maps can be used to intuitively display the density and distribution of personnel in different areas and rooms.

[0395] For each area and room, the most likely occupancy estimate is extracted from its marginal distribution as the basis for subsequent analysis and decision making.

[0396] The personnel distribution information is input into the intelligent lighting control, energy consumption optimization and other modules in real time to guide the corresponding control strategy adjustment and realize the dynamic coordinated optimization of personnel perception and energy management.

[0397] In general, this step is based on the Bayesian network, integrates multi-source heterogeneous data, uses the LBP algorithm for approximate inference, and introduces room correlation through factor decomposition, and finally generates a globally unified and probabilistic estimate of the distribution of people. Compared with the simple sum of the number of people in the area, this method can better model the spatial correlation of the distribution of people and improve the accuracy and consistency of the overall estimate. At the same time, through factor decomposition, this method transforms the complex global inference problem into multiple local inference problems, which reduces the computational complexity while ensuring accuracy and improves real-time performance.

[0398] The preferred embodiments of the present invention are described in detail above; however, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.

Claims

1. A building energy management method based on video surveillance, characterized in that: And includes the following steps: S1. Obtain or construct a building topology diagram and the installation position of the lighting unit, set the video monitoring acquisition unit layout points based on the building topology diagram, calculate the lighting area according to the installation position of the lighting unit, and form a connected lighting space; S2. Generate a set of pedestrian movement paths based on the building topology diagram, compare the overlap ratio between the pedestrian movement paths and each lighting space in the connected lighting spaces, and assign a weight to each lighting space according to the overlap ratio; S3. Collect the number of people in each area of ​​the building and the lighting distribution map inside the building within a predetermined time period, and analyze and predict the distribution of personnel positions in combination with the pedestrian movement path; based on the lighting data and personnel position distribution data, train the lighting control strategy generation unit and configure it in the upper control system; S4, when in use, based on the video frame data collected by the video monitoring acquisition unit, extract the pedestrian movement path set, predict the personnel position distribution, and generate the lighting control strategy through the lighting control strategy generation unit; The lower-level control unit retrieves the lighting control strategy and executes it. During the execution process, it continuously monitors and analyzes the lighting energy consumption and generates an energy-saving report.

2. The building energy management method based on video surveillance according to claim 1 is characterized in that: The process of constructing the building topology diagram in step S1 is specifically as follows: S11. Determine whether a three-dimensional digital model of the building exists. If not, use BIM technology to convert the building plan into a three-dimensional digital model; S12, performing semantic segmentation and object recognition on the three-dimensional digital model, and extracting building components in the three-dimensional digital model to obtain classification information of each area, category and attribute information of each object, and building component information; S13. According to the classification information of each area, the category and attribute information of each object, and the building component information, a building topology diagram is constructed, and functional areas are defined, and working areas and moving areas are obtained.

3. The building energy management method based on video surveillance according to claim 1 is characterized in that: In step S2, the process of generating a set of pedestrian movement paths based on the building topology diagram is specifically as follows: S21. Based on the building topology diagram, an undirected graph representing pedestrian accessibility is generated using the visibility graph analysis method; S22, calling the fast exploration random tree algorithm module to perform sampling on the undirected graph to generate a pedestrian movement path; S23. Utilizing prior knowledge of pedestrian movement habits, pedestrian movement paths are optimized and screened through a hidden Markov model to generate a pedestrian movement path set.

4. The building energy management method based on video surveillance according to claim 1 is characterized in that: Step S3 is further as follows: S31, determine whether RFID is set in the building or there is a WIFI terminal management database with access rights, if not, Call the video surveillance acquisition unit to obtain the video frame, and pre-process it through the lighting information pre-processing unit to extract the illumination and character data, and count the number of people and distribution in each area; if yes, go to step S32, S32, using RFID or WIFI data to locate personnel at the room level, and obtain the number of people in each area of ​​the building; S33, generating a lighting distribution map of a part of the interior area of ​​the building based on the illumination data; S34. Extract the illumination of the office area from the illumination distribution map, and calculate the number of personnel and their distribution positions in combination with the personnel movement path data.

5. The building energy management method based on video surveillance according to claim 1 is characterized in that: In step S4, when in use, based on the video frame data collected by the video monitoring acquisition unit, a pedestrian movement path set is extracted, the personnel position distribution is predicted, and a lighting control strategy is generated by the lighting control strategy generation unit; the lower control unit calls the lighting control strategy and executes the process, which is specifically: S41, dynamically constructing a directed graph representing the movement tendency of people according to the set of pedestrian movement paths and the distribution of personnel positions; S42, retrieve the personnel position distribution and the building internal lighting distribution map, use the Dijkstra shortest path algorithm to dynamically analyze and calculate the directed graph, and generate the shortest path that the personnel may move; S43, generating a lighting control strategy based on the shortest path that the personnel may move and sending it to the lower control unit; S44. The actual movement trajectory of personnel is extracted at agreed intervals, and the lighting control strategy is dynamically adjusted through a reinforcement learning algorithm.

6. The building energy management method based on video surveillance according to claim 5 is characterized in that: In step S4, during the execution process, the lighting energy consumption is continuously monitored and analyzed, and the process of generating an energy saving report is specifically as follows: S45. According to the executed lighting control strategy, count the lighting on time of each area in the building and estimate the lighting energy consumption of each area in the building; S46. Regularly collect user feedback on lighting comfort; S47, construct an objective function of energy consumption-comfort trade-off, use a heuristic algorithm to analyze the feedback information of lighting energy consumption and lighting comfort in each area of ​​the building, and solve the optimal control parameters; S48. Compare the obtained optimal control parameters with the historical control parameters, analyze the optimization results, and generate an energy-saving report based on the optimization effect.

7. A building energy management system based on video surveillance, used to implement the method described in any one of claims 1 to 6, characterized in that: include: The upper control system is set up in the building control room; The upper control system is equipped with a pre-trained lighting information pre-processing unit and a lighting control strategy generating unit; A video surveillance acquisition unit is installed in the building, and its field of view covers at least the corridor and part of the working area; A lighting system, comprising a lighting unit, a power switch connected in series with the lighting unit, a lower control unit communicatively connected with the power switch, the lower control unit communicatively connected with an upper control system, and the lower control unit communicatively connected with a memory; At every predetermined period, the upper control system extracts the video frame data of the video surveillance acquisition unit, and processes it through the lighting information preprocessing unit to generate lighting information. The lighting control strategy generation unit generates a lighting strategy based on the lighting information and sends it to the memory of the lighting system. The lower control unit calls the lighting strategy and changes the working status of each lighting unit in the lighting system by controlling the switch.

8. The building energy management system based on video surveillance as claimed in claim 7, characterized in that: The upper control system is also equipped with a pre-trained lighting power control unit, which generates lighting power timing data for each area in the building according to the lighting information and sends it to the memory of the lighting system. The lower control unit adjusts the power of the lighting unit according to the lighting power timing data.

9. The building energy management system based on video surveillance as claimed in claim 7, characterized in that: The lighting system comprises at least two lighting areas, each lighting area is provided with an independent lighting circuit and a controller; the upper control system constructs and stores the lighting logic topology according to the topological structure of the lighting system and the lighting range of each lighting area.

10. The building energy management system based on video surveillance as claimed in claim 7, characterized in that: In the lighting system, the sum of the working lighting areas of each lighting unit is not less than 1.5 times the preset lighting area in the building, and the working lighting areas of adjacent lighting units are not less than 1.1 times the preset lighting areas of adjacent lighting units.