Camera inspection planning method for smart space

By constructing spatial correlation topology and graph neural networks, and combining real-time multi-source data for dynamic risk assessment and resource optimization, the problems of lagging regional risk assessment and uneven resource allocation in existing camera inspection planning are solved, and efficient and intelligent inspection of smart spaces is realized.

CN121864952APending Publication Date: 2026-04-14NANJING SHENYE INTELLIGENT SYST ENG
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-13
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing camera inspection planning methods do not fully explore the spatial, abnormal, and activity-related characteristics between cameras. Risk assessment relies on static historical data, making it difficult to accurately predict regional risk evolution trends. Inspection priority adjustments are lagging, and resource allocation is uneven, resulting in low inspection response efficiency.

Method used

By constructing a spatial association topology with cameras as nodes, spatial adjacency, anomaly co-occurrence, and activity association as edges, a graph neural network is used to mine regional association weights. Combined with real-time multi-source sensing data, dynamic risk assessment is performed to optimize the inspection planning model. Non-dominated sorting genetic algorithm and federated learning are used to update the model and achieve resource load balancing.

Benefits of technology

It enables precise classification and dynamic priority adjustment of camera inspection areas, improves inspection response efficiency and resource utilization efficiency, and solves the problems of poor planning adaptability and privacy protection in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121864952A_ABST
    Figure CN121864952A_ABST
Patent Text Reader

Abstract

The invention discloses a smart space-oriented camera inspection planning method, and relates to the technical field of inspection planning, and the method comprises the steps: obtaining historical inspection data, constructing a spatial association topology containing spatial adjacency, abnormal co-occurrence and activity association relationships, mining regional association weights through a graph neural network, and combining historical abnormal distribution features to obtain a spatial association topology; calculating a camera space value index, and finishing inspection area grading based on a statistical confidence interval; constructing a regional risk assessment model, embedding a regional hierarchical constraint factor, outputting a predicted risk value, dynamically adjusting the routing inspection priority, and triggering an emergency queue jumping mechanism; the risk coverage efficiency, the computing power load balance degree and the inspection response time delay are taken as targets, the inspection polling interval, the staying duration and the cooperation strategy are jointly optimized, and an inspection scheme is generated by adopting dual-mode updating; through edge node local parameter adaptive updating and federated learning aggregation, continuous self-optimization under model privacy protection is realized, and inspection accuracy and adaptability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of inspection planning technology, and specifically to a camera inspection planning method for smart spaces. Background Technology

[0002] With the rapid construction of smart parks and other smart spaces, the rationality of camera inspection planning, as a core sensing device, directly affects the efficiency of spatial security management and resource utilization. Existing camera inspection planning methods mostly adopt fixed-rotation patterns or simple adjustment strategies based on single anomaly information, resulting in the following technical shortcomings: First, they fail to fully explore the spatial, anomaly, and activity correlation characteristics between cameras, resulting in insufficient quantification of the value of cameras in spatial situational awareness. Risk assessment relies heavily on static historical data and fails to combine real-time multi-source sensing information to build dynamic assessment models, making it difficult to accurately predict regional risk evolution trends. Inspection priority adjustments lag behind risk changes, leading to low emergency response efficiency. Second, inspection planning fails to coordinate the computing power, bandwidth, and other resource status of edge computing nodes, easily resulting in an imbalance where some nodes are overloaded while others are idle, leading to increased inspection response latency and insufficient feasibility of the planning scheme. In response to the shortcomings of the existing technologies, there is an urgent need for a camera inspection intelligent planning method that integrates artificial intelligence technology, takes into account both accurate risk assessment and optimal resource allocation, and has privacy protection capabilities, so as to improve the intelligence, dynamism and efficiency of smart space inspection and meet the actual needs of smart space security management. Summary of the Invention

[0003] This invention addresses the shortcomings of existing technologies by proposing a camera inspection planning method for smart spaces.

[0004] The technical solution to achieve the purpose of this invention is as follows:

[0005] A camera inspection planning method for smart spaces includes the following steps:

[0006] Acquire historical inspection data of smart space, construct a spatial association topology with cameras as nodes and spatial adjacency, anomaly co-occurrence and activity association as edges, mine regional association weights through a graph neural network-based association analysis model and combine the historical anomaly distribution characteristics of the inspection area to quantify the spatial value index of cameras and divide the area into regions, generating a regional hierarchy table and corresponding spatial heat map.

[0007] Multi-source sensing data is collected in real time and encoded into a real-time sensing sequence. After passing through a regional risk assessment model with embedded regional hierarchical constraints, the predicted risk value and short-term evolution direction of each inspection area are output to dynamically adjust the inspection priority and generate an inspection priority list.

[0008] Based on the inspection priority list and the computing power utilization and bandwidth load of edge computing nodes, an inspection planning model is constructed and the inspection rotation interval, single camera dwell time and cross-regional collaboration strategy are jointly optimized to generate an inspection planning scheme and distribute it to the corresponding edge computing nodes for execution.

[0009] Based on the predicted risk value and the actual abnormal state within the corresponding time window, a risk prediction deviation sequence is constructed, and the model parameters are optimized through local adaptive updates and federated learning aggregation.

[0010] Furthermore, three types of historical inspection data were collected: inspection records, abnormal alarm records, and personnel activity trajectories. Inspection records include fields for camera ID, inspection start and end time, coverage area ID, image quality score, task completion status, annotation content, and annotation time. Abnormal alarm records include fields for alarm ID, camera ID, alarm time, alarm type, alarm level, occurrence area coordinates, processing result, processing start and end time, and processing personnel ID. Personnel activity trajectories include fields for personnel ID, time node, location coordinates, dwell time, current area ID, and area flow order. For numerical missing data, the mean was used for imputation; for categorical missing data, the mode was used for imputation. The criteria remove abnormal records that exceed a reasonable range, standardize the time field format, and standardize the regional coordinates to map them to a unified coordinate system within the smart space, thus constructing a standardized historical dataset. Using all cameras within the smart space as nodes, each node's attributes include camera ID, installation location coordinates, coverage area, lens parameters, and historical operational status information. An undirected weighted spatial association topology is constructed based on three types of relationships: spatial adjacency, anomaly co-occurrence, and activity association. Initial edge weights are assigned by weighted summation of the quantified values ​​of these three types of relationships, with the sum of the weight coefficients for each type of relationship being 1.

[0011] Furthermore, the spatial association topology is input into a graph convolutional neural network comprising an input layer, two graph convolutional layers, a fully connected layer, and an output layer. The input layer receives node attribute vectors and initial edge weights. The first graph convolutional layer performs neighborhood aggregation on node features. The second graph convolutional layer performs depth extraction on the aggregated features and outputs high-order feature vectors of the nodes. The fully connected layer performs dimensionality transformation on the high-order feature vectors. The output layer normalizes the initial association weight matrix using the Softmax function to obtain the final region association weight matrix. Four types of features are extracted from the coverage area of ​​each camera: historical anomaly frequency, anomaly severity, anomaly diffusion, and anomaly temporal concentration. After normalizing the four types of features, a weighted summation method is used to calculate the spatial value index of the cameras. The sum of the five weight coefficients is 1, which includes the weight coefficient corresponding to the sum of the region association weights and the weight coefficients corresponding to the four types of anomaly features.

[0012] Furthermore, the spatial value index of all cameras is normalized using a min-max method, mapping the values ​​to a fixed interval. A normal distribution is fitted to the standardized spatial value index, and a 95% confidence interval is calculated. Simultaneously, the 75th and 25th quartiles of the standardized spatial value index are calculated, yielding the interquartile range. Based on the correspondence between the standardized spatial value index, confidence intervals, and interquartile ranges, and combined with threshold conditions for the severity of historical anomalies and the frequency of anomalies in the region, the camera coverage area is divided into core inspection areas, key inspection areas, and routine inspection areas. Low-value areas are merged into the routine inspection areas. The confidence score for each region is calculated using a specific formula. This formula is obtained by subtracting the difference between the standardized spatial value index and the mean of the corresponding level region from 1, and then dividing the result by the standard deviation of all standardized spatial value indices. This generates a region hierarchy table containing fields such as region ID, corresponding camera ID, standardized spatial value index, region level, confidence score, historical anomaly characteristics, and coordinates of the covered area. At the same time, a spatial heat map based on the unified coordinate system of smart space is generated. The core inspection area is marked with red, the key inspection area with yellow, and the regular inspection area with green. The region ID, confidence score, and core anomaly characteristics of each region are marked on the heat map.

[0013] Furthermore, three types of core sensing data—camera video streams, anomaly alarm streams, and processing progress streams—are collected at a set frequency. Using a unified timestamp as a benchmark, the three types of sensing data undergo time alignment processing. Linear interpolation is used to fill time gaps, ensuring consistent data time granularity, and converting the timestamps of all data into a unified standard format. A fixed-length time window and sliding step size are set, dividing the three types of sensing data into time windows. Using the alarm timestamp of the anomaly alarm stream data as the core anchor point, keyframe data from the video stream and alarm processing progress stream data within the same time window are correlated and matched to form a time-aligned windowed data set. The categorized data in the windowed data set is encoded using one-hot encoding, and numerical data is normalized using min-max normalization and mapped to a fixed interval. Lightweight convolutional neural networks are used to extract image features from the keyframes of the video stream, including target contour features, scene texture features, and anomaly region features, outputting a fixed-dimensional feature vector. The encoded classification features, standardized numerical features, and video stream image features within each time window are concatenated to form a fixed-dimensional window feature vector, which is then arranged in the order of the time windows to construct a unified real-time perception sequence.

[0014] Furthermore, a regional risk assessment model is constructed with a Long Short-Term Memory (LSTM) network at its core, integrating an attention mechanism and an external constraint embedding layer. The model consists of an input layer, an external constraint embedding layer, an LTM network feature extraction layer, an attention layer, and a fully connected output layer. The input layer receives real-time perception sequences. The external constraint embedding layer uses the regional hierarchy table as an external constraint factor, reads the regional hierarchy corresponding to each camera, assigns differentiated risk weight coefficients to different regional levels, and multiplies these weight coefficients element-wise with the window feature vector of the input layer to obtain a constrained feature sequence. The LTM network feature extraction layer uses a two-layer LTM network to extract temporal features from the constrained feature sequence, capturing the temporal correlation and dynamic changes of the perceived data through a gating mechanism, and outputting the hidden state vector at each time step. The attention layer introduces a multi-head attention mechanism to weight the hidden state vector output by the LTM network, strengthening the feature weights at key time steps, and outputting a fixed-dimensional feature vector. The fully connected output layer uses two fully connected network layers to map the attention-weighted feature vectors, outputting a one-dimensional predicted risk value. At the same time, it outputs the hidden state of the last time step of the long short-term memory network for subsequent risk evolution direction prediction.

[0015] Furthermore, based on regional levels, basic risk thresholds are set for different levels of inspection areas, with the basic risk thresholds decreasing sequentially for core inspection areas, key inspection areas, and routine inspection areas. The basic thresholds are dynamically adjusted based on the severity of anomalies after regional normalization. If the number of anomalies in an area reaches a set number within a set period, the threshold is lowered by a certain percentage to enhance emergency sensitivity. A total adjustment factor is calculated using a risk value adjustment factor positively correlated with the predicted risk value and an evolution direction adjustment factor corresponding to the risk evolution direction. The initial priority score is the regional level base score, decreasing sequentially for core inspection areas, key inspection areas, and routine inspection areas. The initial priority score is multiplied by the total adjustment factor to obtain the adjusted priority score. All inspection areas are sorted from highest to lowest adjusted priority score to obtain a preliminary inspection priority order. If the difference between two area scores is within a set range, the area with the higher level is prioritized; if the levels are the same, the area with the higher confidence score is prioritized. The system compares the smoothed predicted risk value of each area with the adaptive risk threshold in real time. If the predicted risk value exceeds the adaptive risk threshold, and the risk evolution direction is upward and the evolution confidence level reaches the set standard, the emergency priority queue-jumping mechanism is automatically triggered, and the area is marked as an emergency inspection area. The emergency inspection area has a higher priority than all regularly sorted areas, and the internal priority of the emergency area is determined according to the order of alarm level, predicted risk value, and abnormal spread.

[0016] Furthermore, a method combining in-node embedded monitoring and cross-node communication is adopted to collect resource status data of each edge computing node at a set frequency, including computing power resource status data, bandwidth resource status data, and task queue status data. Computing power resource status is collected through the node operating system kernel monitoring module, which collects CPU utilization, GPU utilization, and memory utilization. The weighted average of these three is taken as the computing power utilization rate, with the weight allocation set to a fixed proportion in the order of CPU, GPU, and memory. Network traffic monitoring tools are used to collect the node's uplink and downlink bandwidth utilization and network throughput, with the maximum bandwidth utilization rate taken as the bandwidth load rate. The task scheduling module collects the number of currently pending inspection tasks on the node, the average waiting time for each task, and records the task priority distribution. Min-max normalization is used to map the computing power utilization rate and bandwidth load rate to a fixed range. Based on the sum of the normalized computing power utilization rate and bandwidth load rate, the overall load status of the edge computing node is divided into three levels: light load, medium load, and heavy load. The system reads the dynamically updated inspection priority list and extracts core information for each inspection area, including area ID, corresponding camera ID, area level, predicted risk value, priority ranking, and emergency marker. A priority resolution table is then constructed to clarify the relationship between each camera and the edge computing node. With the optimization objectives of maximizing risk coverage efficiency, maximizing computing load balancing, and minimizing inspection response latency, a weighted summation method is used to transform the multi-objective optimization into a single objective. Multiple constraints are set, including resource load constraints, inspection interval constraints, collaborative linkage constraints, dwell time constraints, and task queue constraints, to construct an inspection planning model.

[0017] Furthermore, a non-dominated sorting genetic algorithm combined with a local search strategy is used to optimize the inspection planning model. The population size is set, and decision variables are encoded using a combination of real and binary encoding. The round-robin interval and dwell time are encoded using real numbers, while the collaborative linkage factor is encoded using binary numbers. An initial population is randomly generated to ensure that each individual meets the constraints. Genetic generations, crossover probability, mutation probability, local search probability, and crowding threshold parameters are set, with the overall objective function serving as the fitness function. A tournament selection method is used to select individuals with high fitness from the population to enter the next generation. A simulated binary crossover strategy is used for the real-number encoded round-robin interval and dwell time, while a single-point crossover strategy is used for the binary-coded collaborative linkage factor. After crossover, the individual is checked to see if it meets the constraints; if not, crossover is repeated. A multinomial mutation strategy is used for real-number encoded variables, and a bit-flip mutation strategy is used for binary-coded variables, with the mutation probability increasing with the genetic generations. Local search optimization is performed on the top-ranked individuals in each generation, fine-tuning the round-robin interval and dwell time. If the fitness improves after optimization, the individual is retained; otherwise, the original individual is retained. For each generation of the population, a non-dominated ordination is performed, different Pareto fronts are defined, and the crowding degree of each individual is calculated. From the highest-level Pareto front, the individual with the highest crowding degree and the highest fitness is selected as the optimal solution, i.e., the optimal check planning parameter combination. When the genetic generation reaches the set number of generations, or when the fitness value of the optimal individual fluctuates within the set range for consecutive set generations, the solution is stopped, and the optimal check planning parameter combination is output.

[0018] Furthermore, each edge computing node synchronously records the output data and actual anomaly states of the regional risk assessment model. It records the smoothed predicted risk value output by the regional risk assessment model within each time window and synchronously collects the actual anomaly states of the region's anomaly alarms within the corresponding time window, including the actual anomaly state label, actual severity, anomaly occurrence timestamp, and anomaly type. The actual severity is then normalized using a min-max method and mapped to a fixed interval. For the regional data in each time window, a fusion of absolute and relative deviations is used to calculate the risk prediction deviation value, taking into account the deviation sensitivity under different risk levels. The actual risk value is obtained by weighting the actual anomaly state label and the normalized actual severity. Using a single region as a unit, the deviation values ​​of a set number of consecutive time windows are arranged in time window order to construct a risk prediction deviation sequence. The deviation sequence is then processed using... The criteria for removing outlier values ​​are as follows: After removal, linear interpolation is used to fill gaps to ensure sequence continuity; finally, the sequence is normalized using min-max normalization and mapped to a fixed interval to obtain a standardized deviation sequence. Each edge computing node adaptively updates the core parameters of the regional risk assessment model locally based on the standardized deviation sequence. Updated parameters include the long short-term memory network gating weight matrix, time-step state decay coefficient, and risk threshold mapping coefficient. The gating weight matrix is ​​dynamically adjusted based on the cumulative deviation, emphasizing the impact of recent deviations on the update during the calculation of the cumulative deviation. The time-step state decay coefficient is adjusted based on the trend characteristics of the deviation sequence; the coefficient decreases when the deviation is increasing and increases when the deviation is decreasing. The risk threshold mapping coefficient is adjusted by considering the correlation between the actual severity of regional anomalies and the predicted deviation, improving the adaptability of the risk threshold. After the parameters are updated, the model is validated using locally available deviation sequence data of a set duration. If the mean of the updated predicted deviation meets the set conditions, the updated parameters are retained; otherwise, the update is discarded and the learning rate is adjusted. Each edge computing node only uploads parameter updates to the federated learning server. The federated aggregation module calculates node weight coefficients based on the local data quality and validation results of each node, and uses a weighted aggregation strategy to aggregate the parameter updates of all nodes to generate global parameter updates. These global parameter updates are then fused with the global baseline parameters stored in the federated server to obtain updated globally consistent parameters. The federated learning server periodically distributes the aggregated global parameters to each edge computing node, and each node synchronously updates its local model parameters, achieving consistent optimization of the global model.

[0019] Compared with the prior art, the significant advantages of this invention are:

[0020] 1. By integrating three types of relationships to construct a spatial topology, and combining graph neural networks and statistical confidence intervals, the inspection area can be accurately classified, breaking through the limitations of traditional single-dimensional classification;

[0021] 2. By using a planning mechanism that combines multi-objective joint optimization and dual-mode dynamic updates, and linking edge local updates with federated aggregation, we can solve the problems of poor adaptability of traditional planning and the contradiction between model optimization and privacy protection. Attached Figure Description

[0022] Figure 1 A flowchart illustrating a camera inspection planning method for smart spaces;

[0023] Figure 2 This is a flowchart of the hierarchical inspection area based on spatial correlation topology and graph neural network in this invention;

[0024] Figure 3 This is a flowchart of the dynamic adjustment process for regional risk assessment and inspection priority in this invention.

[0025] Figure 4 This is a flowchart of the inspection planning optimization and federated learning adaptive update process in this invention. Detailed Implementation

[0026] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0027] like Figure 1 As shown, this invention discloses a camera inspection planning method for smart spaces, including the following steps:

[0028] S1: Obtain inspection records, anomaly alarm records, and personnel activity trajectories of the smart space within a historical period. Construct a spatial association topology with cameras as nodes and spatial adjacency, anomaly co-occurrence, and activity association as edges. Input this spatial association topology into a graph neural network-based association analysis model to mine the regional association weights between different camera nodes. Combined with the historical anomaly distribution characteristics of the inspection area, comprehensively quantify the influence of cameras in the overall spatial situational awareness to obtain the spatial value index corresponding to each camera. Combined with statistical confidence intervals, divide the camera coverage area into core inspection area, key inspection area, and regular inspection area to generate a regional hierarchy table with confidence scores and corresponding spatial heat map.

[0029] S2: Real-time acquisition of multi-source sensing data, including camera video streams, abnormal alarm streams, and processing progress streams, and time alignment and state encoding of various types of data to form a unified real-time sensing sequence. Based on the real-time sensing sequence, a regional risk assessment model with a long short-term memory network as its core is constructed, and the regional hierarchy table is embedded as an external constraint factor into the model input. Differentiated risk weights are applied to different levels of regions, thereby outputting the predicted risk value of each inspection region. At the same time, based on the hidden state change trend of the regional risk assessment model, the short-term evolution direction of regional risk is predicted, and the priority order of inspection regions is proactively adjusted accordingly. When the predicted risk value exceeds the adaptive threshold of the corresponding region, the emergency priority queue-jumping mechanism is automatically triggered to generate a dynamically updated inspection priority list.

[0030] S3: Based on the inspection priority list and the computing power utilization and bandwidth load of each edge computing node, an inspection planning model is constructed with risk coverage efficiency, computing power load balance and inspection response latency as optimization objectives. By jointly optimizing the inspection rotation interval, single camera dwell time and cross-regional collaboration strategy, an inspection planning scheme that matches the current spatial risk situation and computing power resource status is dynamically generated, and the inspection planning scheme is distributed to the corresponding edge computing node for execution.

[0031] S4: During the inspection process, the predicted risk values ​​output by the regional risk assessment model within each time window and the actual occurrence status of abnormal alarms within the corresponding time window are continuously recorded. Based on this, a risk prediction deviation sequence is constructed. On each edge computing node, the gating weight matrix, time step state decay coefficient, and risk threshold mapping coefficient of the long short-term memory network in the regional risk assessment model are adaptively updated based on the risk prediction deviation sequence. Each edge computing node only uploads the model parameter update to the federated learning server. The federated aggregation module performs weighted fusion of the parameter update of multiple nodes to form globally consistent risk assessment model parameters, which are periodically distributed to each edge computing node to achieve continuous self-learning and accuracy improvement of the regional risk assessment model under the premise of privacy protection.

[0032] like Figure 2 As shown, step S1 involves constructing a spatial association topology using historical inspection data, analyzing regional association weights using a graph neural network, calculating the spatial value index of the cameras, classifying the inspection areas accordingly, and generating a regional hierarchy table and a spatial heat map, including:

[0033] S101: Historical inspection data collection and preprocessing.

[0034] The system acquires inspection records, abnormal alarm records, and personnel activity trajectories of the smart space within a preset historical period. The preset historical period is determined based on the usage scenario of the smart space: 30 days for office-type smart spaces, 90 days for industrial production-type smart spaces, and 60 days for public venue-type smart spaces.

[0035] Collect historical inspection timestamps, inspection duration, inspection coverage area, image / video frame quality scores during inspection, inspection task completion status, and inspection personnel annotations for each camera to construct an inspection record dataset. The maximum score for image / video frame quality during inspection is 100 points, and a score below 60 points is considered unqualified. The inspection task completion status includes completed, incomplete, and partially completed.

[0036] Collect abnormal alarm events triggered by each camera, including alarm timestamp, alarm type, alarm level, camera ID that triggered the alarm, coordinates of the area where the alarm occurred, alarm handling result, handling time, and personnel information, and construct an abnormal alarm record dataset. The alarm types include equipment failure, personnel abnormality, environmental abnormality, and safety hazard. The alarm levels include level 1, level 2, level 3, and level 4, with level 1 being the highest level. The alarm handling results include resolved, unresolved, and being processed.

[0037] By extracting personnel features from video streams captured by cameras, activity trajectory data of personnel within the smart space is generated, including personnel ID, location coordinates at each time point, duration of stay, and order of movement in activity areas, thus constructing a personnel activity trajectory dataset.

[0038] Preprocessing was performed on the inspection record dataset, anomaly alarm record dataset, and personnel activity trajectory dataset. Missing data was handled using a missing value imputation algorithm; numerical data was imputed using the mean, and categorical data was imputed using the mode. The criteria include removing outliers, such as inspection records exceeding reasonable time ranges and alarm records with coordinates exceeding spatial boundaries; standardizing the time field; and standardizing the area coordinates, mapping them to the unified coordinate system of the smart space, with the coordinate range set to... This yields a standardized historical dataset.

[0039] S102: Construct spatial relational topology.

[0040] Using all cameras within the smart space as nodes, construct an undirected weighted spatial association topology. ,in, For a set of nodes, Let be the set of edges. Let be the set of edge weights.

[0041] Each camera For each node, the node attributes include camera ID, installation location coordinates, coverage area, lens parameters, and historical operating status. The coverage area is represented by a rectangle, recording the coordinates of the top left and bottom right corners. Lens parameters include focal length, viewing angle, and resolution. Historical operating status includes the percentage of normal operating time and the number of failures. The node attribute vector is shown below:

[0042] ,

[0043] in, For the first A unique identifier for each camera. and These are the coordinates of the top-left and bottom-right corners of the covered area rectangle, respectively. Focal length From the perspective of For resolution, This represents the percentage of normal operating time. This represents the number of historical failures.

[0044] Construct an edge set based on three types of association relationships. A node is constructed if any of the following conditions are met. and The edge between Specifically:

[0045] If camera Coverage area and cameras The coverage areas overlap, and the overlapping area accounts for... The coverage area accounts for ≥5% or accounts for If the coverage area ratio is ≥5%, or the shortest straight-line distance between two coverage areas is ≤ a preset distance threshold, then a spatial adjacency relationship is determined. The preset distance thresholds include: 5 meters for office space, 10 meters for industrial space, and 8 meters for public venues.

[0046] If within the preset time window, the camera and If both trigger an abnormal alarm, and the distance between the alarm locations is ≤5 meters, or the alarm types belong to the same major category, namely equipment failure or personnel abnormality, then an abnormal co-occurrence relationship is determined. The number of times the two cameras co-occur within the historical period is counted, and if the number of co-occurrences is ≥3, an edge is constructed.

[0047] If the movement trajectory of a person is detected by the camera The coverage area is transferred to the camera. If the number of times a region is covered by a certain activity accounts for ≥10% of the total number of times a person moves between two regions, or if the total number of times a person moves between two regions within a historical period is ≥50, then an activity relationship is determined to exist.

[0048] For each edge Assign initial weights The weights are obtained by weighted summation of the quantified values ​​of the three types of associations, as shown in the following formula:

[0049] ,

[0050] in, , , The weighting coefficients are used to assign importance to the impact of correlation on the inspection plan, satisfying the following conditions: It can be dynamically adjusted according to the spatial scene. This is the spatial adjacency weight. The larger the percentage of the intersection area between two covered regions, the greater the weight. The value ranges from [0,1]. This is the co-occurrence weight for anomalies. The more times an anomaly occurs, the greater its weight. Its value ranges from [0,1] and is obtained by normalizing the co-occurrence count. The activity-related weight is determined by the number of personnel transfers. The more personnel transfers, the greater the weight. The value range is [0,1], which is obtained by normalizing the number of transfers.

[0051] S103: Mining regional correlation weights.

[0052] Spatial correlation topology Input a graph neural network (GNN) based association analysis model to mine the regional association weights between different camera nodes.

[0053] The specific model structure is as follows:

[0054] The correlation analysis model adopts a graph convolutional neural network (GCN) architecture, which includes an input layer, two graph convolutional layers, a fully connected layer, and an output layer.

[0055] The input layer receives node attribute vectors and initial edge weights.

[0056] The first graph convolutional layer performs neighborhood aggregation on node features, outputting the node feature vector after neighborhood feature aggregation. The calculation formula is as follows:

[0057] ,

[0058] in, For nodes The initial attribute vector, For nodes The set of neighboring nodes, This is the weight matrix of the first graph convolutional layer. For bias terms, This is the ReLU activation function.

[0059] The second convolutional layer performs depth extraction on the aggregated features, outputting high-order feature vectors of the nodes. .

[0060] The fully connected layer performs dimensionality transformation on the higher-order feature vectors and outputs the initial association weight matrix between nodes. .

[0061] The output layer modulates the initial association weight matrix using the Softmax function. After normalization, the final region association weight matrix is ​​obtained, where, The elements of the association weight matrix for this region represent nodes. and The regional association weight between the two regions ranges from [0,1]. The larger the weight, the higher the degree of association between the two regions.

[0062] During model training, the anomaly propagation probability between two regions in historical anomaly alarm records is used as the label to train the correlation analysis model. The anomaly propagation probability can be understood as the probability that if an anomaly occurs in region A, an anomaly will occur in region B within one hour. The training process uses the Adam optimizer with a learning rate of 0.001, 1000 iterations, and a mean squared error loss function. The function expression is as follows:

[0063] ,

[0064] in, The total number of nodes is calculated at the edge. This is a normalization factor to avoid excessive loss values ​​due to an excessive number of nodes. For the region With the region The abnormal propagation probability label is obtained; training stops when the loss function converges, and the trained correlation analysis model is obtained.

[0065] The constructed spatial relationship topology Input the trained association analysis model and output the regional association weights between each camera node. This creates a regional association weight table, which includes the cameras. -ID, camera -ID, region association weight field.

[0066] S104: Calculate the camera space value index.

[0067] By combining regional correlation weights with the historical anomaly distribution characteristics of the inspection area, the influence of each camera on the overall spatial situational awareness is comprehensively quantified and calculated to obtain the spatial value index.

[0068] Based on the standardized abnormal alarm record dataset, historical abnormal distribution features of each camera's coverage area are extracted, including: the frequency of abnormal occurrence. Severity of abnormality Abnormal diffusion Concentration of abnormal time periods Among them, the frequency of abnormal occurrence The severity of the anomaly is calculated by dividing the total number of abnormal alarms in the region within the historical period by the number of days in the historical period. for Among them, the weight of a Level 1 alarm is 4, the weight of a Level 2 alarm is 3, the weight of a Level 3 alarm is 2, the weight of a Level 4 alarm is 1, and the abnormal spread is... This represents the average number of anomalies occurring in related areas within one hour after an anomaly occurs in this area, indicating the anomaly time concentration. The feature vector is the hour with the highest number of anomalies within the historical period of this region, representing the proportion of its anomalies to the total number of anomalies. These four features are then normalized to obtain the feature vector. The values ​​are all in the range [0,1]. The values ​​are, in order, the normalized frequency of anomalies, the severity of anomalies, the diffusion of anomalies, and the concentration of anomalies over time.

[0069] The spatial value index of each camera is calculated using a weighted summation formula. The calculation formula is as follows:

[0070] ,

[0071] in, Let be the weighting coefficient, satisfying ,in, , , , , It can be dynamically adjusted according to space security requirements; For camera The sum of the regional association weights with all other camera nodes reflects the regional linkage importance of this camera; , , , The first The frequency, severity, diffusion, and temporal concentration of normalized anomalies in the coverage area of ​​each camera.

[0072] The spatial value index of all cameras is normalized using a min-max method to obtain the standardized spatial value index. The value range is [0,1], and the calculation formula is as follows:

[0073] ,

[0074] in, This represents the maximum value of the spatial value index for all cameras. It is the minimum value.

[0075] S105: Divide the inspection area into different levels.

[0076] Combining statistical confidence intervals, based on the standardized spatial value index The camera coverage area is divided into core inspection area, key inspection area, and routine inspection area. First, statistical confidence intervals are calculated, and then the standardized spatial value index of all cameras is determined. Perform a normal distribution fit and calculate the 95% confidence interval. ,in for The mean, The standard deviation is calculated simultaneously. 75th percentile and 25 quantile The interquartile range is obtained. .

[0077] Based on the calculated statistical confidence intervals, the region is divided into hierarchical levels. If the camera's... ,or Furthermore, the region has a history of exceptionally severe [issues / issues]. (After normalization), it is determined to be the core inspection area; the core inspection area is a key area for spatial situational awareness, with a high probability of anomalies and a wide impact range; if the camera's ,or Furthermore, the frequency of historical anomalies in this region (After normalization), it is identified as a key inspection area; key inspection areas are areas with a high incidence of anomalies and require close monitoring; if the camera's ,and If it is, it is determined to be a routine inspection area; routine inspection areas have a low probability of anomalies and are considered basic inspection areas; if Areas identified as low-value areas are incorporated into regular inspection areas and their inspection priority is reduced.

[0078] Assign a confidence score to each region. This is used to characterize the reliability of the regional hierarchy division, and the calculation formula is as follows:

[0079] ,

[0080] in, For the corresponding level area The mean, For all The standard deviation; the confidence score ranges from [0,1], with a higher score indicating a more reliable hierarchical division.

[0081] S106: Generate a regional hierarchy table and a spatial heatmap.

[0082] Construct a region hierarchy table with confidence scores. The table includes region ID, corresponding camera ID, standardized spatial value index, region hierarchy (core / key / regular), confidence score, historical anomaly characteristics (anomaly frequency / severity), and covered region coordinate fields. It is stored in a structured table format to support subsequent model calls and queries.

[0083] Based on a unified coordinate system for smart spaces, a spatial heat map is generated, with the color depth of the heat map corresponding to the standardized spatial value index of the area. The darker the color, the higher the value index and the higher the inspection priority. The core inspection area uses red, the key inspection area uses yellow, and the regular inspection area uses green. The heat map marks the area ID, confidence score and core anomaly characteristics of each area, supports visualization and interactive operation, and makes it easy for managers to intuitively grasp the key points of spatial inspection.

[0084] For example:

[0085] Taking a smart space in a community as an example, the historical period is 30 days, including 10 cameras (CAM-001~CAM-010), with a unified coordinate system range. :

[0086] The collected data includes:

[0087] Inspection log for CAM-003: Camera ID = CAM-003, Inspection time = 2024-05-10 10:00-10:03, Image quality score = 92, Task completion status = Completed;

[0088] Anomaly alarm record: Alarm ID=ALM-205, Alarm type=Personnel anomaly, Alarm level=Level 2, Occurrence area coordinates=(420,580);

[0089] Personnel activity trajectory: Personnel ID=PER-012 moved between the coverage areas of CAM-003 and CAM-004 18 times, accounting for 15% of the total number of moves;

[0090] The missing image quality score of CAM-005 was filled using mean imputation (mean 85). The criteria exclude abnormal alarm records of CAM-007, i.e., those whose coordinates exceed the spatial boundary.

[0091] Construct a spatial association topology. CAM-003 and CAM-004 satisfy three types of association relationships. Let... , , Spatial adjacency weight co-occurrence weights of anomalies Activity association weight initial edge weights .

[0092] The topology is input into a convolutional neural network, and the output is the sum of the association weights between CAM-003 and other cameras. Its historical anomalies, after normalization, are as follows: , , , Weighting coefficient , , , , The spatial value index was calculated. After standardization ( , ).

[0093] All cameras are standardized. mean Standard deviation 95% confidence interval ;CAM-003 ,and This area was identified as a key inspection zone; confidence score. (Average value of key inspection areas) ).

[0094] Output result: The region hierarchy table contains "Region ID=AREA-03, Camera ID=CAM-003, "Level = Key, Confidence = 0.96"; AREA-03 is displayed in yellow in the spatial heat map, and the core abnormal feature "high incidence of abnormal personnel" is marked.

[0095] like Figure 3 As shown, step S2 involves encoding multi-source sensing data into a unified sequence, inputting it into a regional risk assessment model embedded with regional hierarchical constraints, obtaining predicted risk values ​​and evolution directions, and dynamically adjusting the priority of inspection areas accordingly. An emergency queue-jumping mechanism is triggered when a threshold is exceeded, including:

[0096] S201: Real-time acquisition and preprocessing of multi-source sensing data.

[0097] The system adopts a distributed acquisition architecture with edge computing nodes to collect three types of core perception data in the smart space in real time. The video stream acquisition frequency is set to 10 frames / second, and the alarm and processing progress stream acquisition frequency is set to 1 message / second to ensure data timeliness.

[0098] The system collects real-time video streams from each camera, extracts keyframes, and synchronously records the camera ID, acquisition timestamp, frame resolution, image sharpness score, and frame acquisition status corresponding to the video stream to construct a video stream dataset. The image sharpness score is calculated using a sharpness evaluation algorithm with a maximum score of 100. Frames scoring below 60 are considered invalid. Frame acquisition status includes normal, dropped frames, and blurry frames.

[0099] Real-time capture of abnormal alarm events triggered by each camera, synchronously collecting alarm ID, camera ID, alarm timestamp, alarm type, alarm level, location coordinates, and alarm triggering reason to construct an abnormal alarm stream dataset. The alarm types include equipment failure, personnel abnormality, environmental abnormality, and safety hazard. The alarm levels include Level 1, Level 2, Level 3, and Level 4, with Level 1 being the highest. The alarm location coordinates are standardized coordinates. The alarm triggering reasons include equipment power failure, personnel crossing boundaries, and environmental temperature and humidity exceeding standards.

[0100] Real-time tracking of the entire process of handling abnormal alarms, collecting processing progress records, including alarm ID, handler ID, processing start timestamp, current processing status (unprocessed / processing / resolved / unresolved), processing progress percentage, description of stage processing results, and estimated remaining processing time, to construct a processing progress stream dataset.

[0101] Based on a unified timestamp, time alignment processing is performed on the three types of sensing data. Linear interpolation is used to fill time gaps to ensure consistency in data time granularity. The timestamps of all data are converted to a unified standard format to avoid alignment deviations caused by differences in time formats. A fixed time window is set, with a window duration of 5 seconds and a sliding step of 1 second. The three types of sensing data are divided into time windows, with each time window corresponding to a data set. Using the alarm timestamp of the abnormal alarm stream data as the core anchor point, the keyframe data of the video stream and the alarm processing progress stream data within the same time window are correlated and matched to ensure that the multi-source data within the same time window correspond to the same spatial state, forming a time-aligned windowed data set.

[0102] State encoding and feature quantization are performed on various types of data in the windowed dataset to generate structured feature vectors for easy model input. One-hot encoding is used to encode alarm types, alarm levels, and current processing status data. For example, alarm types are encoded as [1,0,0,0] (equipment failure) and [0,1,0,0] (personnel anomaly), and alarm levels are encoded as [1,0,0,0] (Level 1) and [0,1,0,0] (Level 2). Numerical data such as clarity scores, processing progress percentages, and estimated remaining processing time are normalized using min-max normalization and mapped to the [0,1] interval. Image features are extracted from keyframes of the video stream, outputting a 128-dimensional feature vector.

[0103] The encoded classification features, standardized numerical features, and video stream image features within each time window are concatenated to form a 256-dimensional window feature vector, which is then arranged in time window order to construct a unified real-time perception sequence. ,in For the first Feature vectors of a time window This represents the length of the time window sequence.

[0104] S202: Construction and training of regional risk assessment models.

[0105] A regional risk assessment model is constructed with a Long Short-Term Memory (LSTM) network as the core, integrating an attention mechanism and an external constraint embedding layer. The model is divided into an input layer, an external constraint embedding layer, an LSTM feature extraction layer, an attention layer, and a fully connected output layer.

[0106] The specific architecture design is as follows:

[0107] The input layer receives real-time sensing sequences. The input dimension is , where 256 is the dimension of the window feature vector.

[0108] The external constraint embedding layer uses the region hierarchy table as an external constraint factor to apply differentiated risk weights to different region levels. Specifically, it reads the region level (core / key / routine) corresponding to each camera in the region hierarchy table and assigns risk weight coefficients (core inspection area weight) to different levels. Key inspection areas weight Weight of routine inspection area The weight coefficients are element-wise multiplied with the window feature vector of the input layer to obtain the constrained feature sequence. ,in, This refers to the risk weight coefficient corresponding to the current camera's area level, i.e., the core inspection area. Key inspection areas correspond Regular inspection area correspondence ;

[0109] The LSTM feature extraction layer employs a two-layer LSTM network to extract temporal features from the constrained feature sequence. The first LSTM layer has a hidden layer dimension of 128, and the second LSTM layer has a hidden layer dimension of 64. Gating mechanisms (input gate, forget gate, output gate) are used to capture the temporal correlation and dynamic changes of the perceptual data, outputting the hidden state vector at each time step. ,in, For the first A 64-dimensional hidden state vector at each time step.

[0110] The attention layer introduces a multi-head attention mechanism to assign weights to the hidden state vector output by the LSTM, strengthen the feature weights of key time steps (such as when an abnormal alarm occurs), and output a 64-dimensional feature vector after attention weighting.

[0111] The fully connected output layer uses two fully connected network layers to map the attention-weighted feature vectors. The first fully connected layer outputs 32-dimensional features, and the second fully connected layer outputs a 1-dimensional predicted risk value. The value ranges from [0,1]. A larger value indicates a higher risk in the region. The output also shows the hidden state of the LSTM network at the last time step. This is used to predict the direction of subsequent risk evolution.

[0112] During model training, the regional risk assessment model is trained based on historical sensing data and anomaly occurrence records to ensure the model's prediction accuracy and generalization ability. Multi-source sensing data from the past three historical periods are selected and processed into real-time sensing sequences according to the above data preprocessing method. The label is whether an anomaly alarm occurs in the region within one hour after the end of each time window. An anomaly is marked as 1, and no anomaly is marked as 0. Combined with the actual regional risk value corresponding to the time window (calculated by weighting the severity and frequency of anomalies), a training dataset is constructed, in which the training set accounts for 70% and the validation set accounts for 30%.

[0113] A hybrid loss function combining cross-entropy loss and mean squared error loss is adopted. The loss function formula is used to optimize the model's hazard prediction accuracy and anomaly classification accuracy, as shown below:

[0114] ,

[0115] in, These are the weighting coefficients. Cross-entropy loss is used for anomaly classification. Mean squared error loss is used for risk value regression; the Adam optimizer is used with a learning rate of 0.001, 2000 iterations, and 32 training batches. An early stopping strategy is adopted, which stops training when the validation set loss does not decrease for 100 consecutive iterations to avoid model overfitting; Dropout regularization is also used with a dropout rate of 0.3 to reduce model complexity.

[0116] After training, the model is validated using validation set data. The model's risk value prediction accuracy (MAE ≤ 0.05) and anomaly classification accuracy (≥ 95%) are calculated. If the accuracy requirements are not met, the LSTM hidden layer dimension, the number of attention heads, and the weight coefficients are adjusted. The parameters are adjusted, and the model is retrained until the accuracy meets the target, resulting in the final regional risk assessment model.

[0117] S203: Forward-looking adjustment of regional risk prediction and inspection priorities.

[0118] The real-time processed sensing sequence Input the trained regional risk assessment model, and the model outputs the initial predicted risk value for each inspection area. , Assign region numbers and output the hidden state of the model at the last time step. To ensure forecast stability, a moving average method is used to smooth the initial forecast risk values ​​for three consecutive time windows. The smoothed forecast risk values ​​are... ,in, For the first The initial predicted risk value for each time window.

[0119] Based on the hidden state change trend of the LSTM network output, the short-term evolution direction of risk in each region is predicted, and the LSTM hidden state vectors for six consecutive time windows are extracted. The cosine similarity of the hidden states in adjacent time windows is calculated to characterize the magnitude of change in the hidden states. The calculation formula is shown below:

[0120] ;

[0121] Set similarity threshold If the cosine similarity of three consecutive time windows ,and It shows an increasing trend, that is If the risk evolution direction is upward, then the cosine similarity of three consecutive time windows is considered to be upward. If the predicted risk value fluctuation is ≤0.05, it is judged as stable; if the cosine similarity of three consecutive time windows is... If the predicted risk value shows a decreasing trend, it is judged as declining.

[0122] The confidence level of the evolution direction is calculated using the trend fitting error. The trend line of risk value change is predicted by fitting a linear regression model, with a confidence level of 1 minus the fitting error, and a value range of [0,1]. When the confidence level is ≥0.7, the prediction result of the evolution direction is valid; combined with... In line with the direction of risk evolution, the initial priority of inspection areas is proactively adjusted, and the adjustment rules include setting risk value adjustment factors. and evolutionary direction adjustment factor ,in, Positively correlated with predicted risk value, evolution direction adjustment factor Rising = 0.5, Stable = 0.2, Falling = 0.1, Total Adjustment Factor The initial priority score is based on the regional level base score. Multiply by the total adjustment factor to obtain the adjusted priority score. Scoring based on adjusted priority All inspection areas are sorted from highest to lowest to obtain a preliminary inspection priority order; if the score difference between two areas is ≤0.5, the core inspection area is prioritized; if the levels are the same, the area with the higher confidence score is prioritized.

[0123] S204: Emergency priority queue-jumping mechanism and dynamic inspection priority list generation.

[0124] Set adaptive risk thresholds for different levels of inspection areas The threshold is dynamically adjusted based on the historical anomaly characteristics of the region, and the calculation formula is as follows:

[0125] ,

[0126] in, The basic thresholds for each region are: Core = 0.7, Key = 0.6, and Regular = 0.5. This represents the normalized severity of anomalies in the region; if anomalies occur ≥ 5 times in the region within the past 7 days, the threshold is lowered by 10% to enhance emergency sensitivity.

[0127] Real-time comparison of smoothed predicted risk values ​​for each region With adaptive risk threshold ,like If the risk evolution direction is "rising" and the evolution confidence level is ≥0.7, the emergency priority queue-jumping mechanism will be automatically triggered, and the area will be marked as an "emergency inspection area." The priority of the emergency inspection area is higher than that of all regular sorting areas. The internal priority of the emergency inspection area is determined according to the following rules: emergency areas with alarm levels of Level 1 and Level 2 are given priority; under the same alarm level, priority is given to... Higher areas; When they are the same, priority ranking normalizes the anomalous diffusion. In higher-altitude areas, to prevent the spread of risk.

[0128] By integrating emergency inspection areas with regular sorting areas, a final inspection priority list is generated. The list includes area ID, corresponding camera ID, area level, predicted risk value, risk evolution direction, priority sorting, emergency marker (yes / no), and expected inspection time. The list adopts a dynamic update mechanism, with the update frequency consistent with the sliding step size of the sensing data collection. Each time it is updated, emergency areas that have completed inspections and whose risks have recovered to below the threshold are deleted simultaneously, and areas that trigger the emergency mechanism are added to ensure that the list matches the real-time risk situation.

[0129] The generated dynamic inspection priority list is output in structured JSON format and synchronized to the inspection dispatch center of the smart space, each edge computing node and management personnel terminal through the communication link between edge computing nodes. It supports visualization and dispatch command issuance, and provides input basis for subsequent inspection planning models.

[0130] For example:

[0131] Following step S1, the community-based smart space undergoes multi-source sensing data preprocessing. The video stream is acquired at a frequency of 10 frames per second, capturing keyframes of CAM-003 (clarity score = 88 → normalization 0.88). Anomaly alarm streams trigger a "personnel crossing boundary" alarm (encoded). The processing progress stream displays "Processing, progress 40% → Standardization 0.4"; the time window is 5 seconds, the sliding step is 1 second, and the encoded classification features (8-dimensional), numerical features (2-dimensional), and image features (128-dimensional) are concatenated to form a 256-dimensional window feature vector, which is used to construct a real-time perception sequence. ( ).

[0132] Risk assessment model predicts: CAM-003 is a key inspection area, with a weighting of [missing information]. Constrained feature sequences Input a two-layer LSTM model (hidden layer dimension 128→64), with enhanced attention layer. (Alarm occurrence window) weight, output initial predicted risk value , , After smoothing, the calculation yields .

[0133] Risk evolution direction determination: Extract the hidden states of 6 windows According to the formula Calculate cosine similarity , , (all ),and Increasing, indicating an upward trend in evolution, with a confidence level of 0.85 ≥ 0.7.

[0134] Priority adjustment: Base score of the area level corresponding to key inspection areas Risk Value Adjustment Factor Evolutionary direction adjustment factor Total adjustment factor Adjusted rating Adaptive risk threshold ,because It does not trigger emergency queue jumping; CAM-003 is ranked 3rd in the priority list, with the first two being the core inspection areas CAM-001 and CAM-002.

[0135] like Figure 4 As shown, step S3, which involves constructing an inspection planning model based on the inspection priority list and the resource status of each edge computing node, generating an inspection planning scheme through joint optimization, and then distributing it to the edge nodes for execution, includes:

[0136] S301: Real-time perception and quantification of resource status of edge computing nodes.

[0137] By employing a method of in-node embedded monitoring and cross-node communication linkage, resource status data of each edge computing node is collected in real time, with a collection frequency of 1 time / second, to ensure that the resource data matches the current load.

[0138] For each edge computing node, a resource status dataset is constructed using the node ID, data collection timestamp, computing power utilization, bandwidth load rate, number of inspection tasks in the queue, average task waiting time, node communication latency, and a list of currently executing inspection task IDs. Specifically, CPU utilization, GPU utilization, and memory usage are collected through the node's operating system kernel monitoring module, and the weighted average of these three metrics is taken as the computing power utilization. , Edge computing nodes are numbered and weighted as CPU:GPU:Memory = 0.5:0.3:0.2. Network traffic monitoring tools are used to collect uplink / downlink bandwidth utilization and network throughput data for each node; the maximum bandwidth utilization is taken as the bandwidth load rate. The task scheduling module collects the number of inspection tasks currently queued for execution at each node. Average task waiting time At the same time, it records the task priority distribution (emergency / routine).

[0139] Using min-max normalization to calculate computing power utilization Bandwidth load rate Mapped to the [0,1] interval, the overall load status of edge computing nodes is divided into three levels: light load ( ), medium load ( ), heavy load ( ),in, , This represents the normalized computing power utilization rate and bandwidth load rate.

[0140] Read the dynamically updated inspection priority list and extract the core information of each inspection area, including area ID, corresponding camera ID, area level (core / key / routine), and smoothed predicted risk value. Priority sorting Emergency marking is used to construct a priority resolution table to clarify the affiliation relationship between each camera and the edge computing node. For example, one edge computing node can manage multiple cameras, and one camera is uniquely associated with one edge computing node.

[0141] S302: Construct a multi-objective inspection planning model.

[0142] With the optimization objectives of maximizing risk coverage efficiency, maximizing computing power load balancing, and minimizing inspection response latency, an inspection planning model is constructed by combining resource load constraints and inspection task constraints. The decision variables, objective function, and constraints are defined as follows:

[0143] Three core decision variables are defined to characterize the key parameters of inspection planning, including inspection rotation interval, single-camera dwell time, and cross-regional collaboration strategy. Among them, the inspection rotation interval... For the first The first edge computing node managed by The region corresponds to the first The inspection interval (in seconds) for each camera ranges from [30, 3600], with the core inspection area... Key inspection areas Routine inspection area Emergency inspection area (Fixed intervals, continuous inspection until risk decreases); Single camera dwell time For the first The first edge computing node managed by The region corresponds to the first The duration of a single inspection stop by each camera, ranging from [1, 10], is positively correlated with the area's predicted risk value, and is calculated using the following formula: The result is an integer; cross-regional collaboration strategy Characterizing the first The first region The camera and the first The first region The coordination strength of each camera, with a value of 0 or 1. This indicates that the two cameras have started collaborative inspection (simultaneous data collection and data exchange). This indicates independent inspection; it only applies when there is a regional correlation weight between the two areas. At that time, it can be set .

[0144] Three optimization objectives are constructed: maximizing risk coverage efficiency, maximizing computing load balancing, and minimizing inspection response latency. A weighted summation method is used to transform the multi-objective optimization into a single objective. The objective function for maximizing risk coverage efficiency is... The formula for calculating the coverage capability of the inspection plan for high-risk areas is shown below:

[0145] ,

[0146] in, The total number of nodes is calculated at the edge. For the first The number of regions managed by each node For the first The node managed by the first Number of cameras in each area For the first Priority rating for each region; This indicates the risk coverage strength of a single camera over a given area, while the collaborative linkage factor can improve the coverage efficiency weight.

[0147] The objective function for maximizing computing load balancing The formula for characterizing the load difference among edge computing nodes is as follows:

[0148] ,

[0149] in, The numerator is the average of the standardized computing power utilization rate of all edge computing nodes, and the numerator is the standard deviation of the computing power utilization rate. The value ranges from [0,1]. The larger the value, the more balanced the load.

[0150] Inspection response delay minimization objective function The total delay from the issuance of an inspection task to its completion is represented by the following formula:

[0151] ,

[0152] in, For the first The node managed by the first The first region The inspection tasks for each camera experienced queuing delays. This refers to the dwell time of a single camera during a single inspection. Communication latency for task assignment and data feedback.

[0153] The three objective functions are merged into a total objective function using a weighted summation method. The weighting coefficients are dynamically adjusted according to the spatial inspection requirements to meet the needs. The default value is (Risk coverage efficiency) (Computing power load balancing) (Inspection response delay), overall objective function The expression is as follows:

[0154] ,

[0155] in, To minimize the objective function, we take a negative sign to transform it into maximizing the objective function, the total objective. The value ranges from [0, 1.5], with a larger value indicating a better planning scheme.

[0156] Constraints are set based on resource load and inspection task characteristics to ensure the feasibility of the planning scheme. Resource load constraint: for all edge computing nodes Standardized computing power utilization rate Standardized bandwidth load rate To avoid node overload; heavily loaded nodes ( No new routine inspection tasks will be added; only emergency inspection tasks will be responded to. Inspection interval constraints: the inspection rotation interval in the core inspection area. Seconds, key inspection areas Seconds, routine inspection area Seconds, emergency inspection area Seconds; only when the regional association weight of the two regions is... And belonging to the same edge computing node or communication latency Collaborative inspection can be enabled in milliseconds. A single camera can only coordinate with a maximum of two other cameras; dwell time constraint: the dwell time of a single camera during a single inspection. The camera dwell time in the emergency inspection area is set to a maximum of 10 seconds; Task queue constraint: the number of inspection tasks queued for each edge computing node. Average task waiting time If the time limit is exceeded, the load will be automatically redirected to a lightly loaded node.

[0157] S303: Design and Execution of Multi-Objective Optimization Solution Algorithms.

[0158] A non-dominated sorting genetic algorithm (NSGA-III) combined with a local search strategy is used to optimize the inspection planning model, balancing accuracy and efficiency. The population size is set to 100, and the decision variables are encoded using a combination of real and binary codes (round-trip interval and dwell time are real numbers, while the collaborative linkage factor is binary). An initial population is randomly generated to ensure that each individual meets the constraints. The number of generations is set to 200, with a crossover probability of 0.8, a mutation probability of 0.1, a local search probability of 0.3, and a crowding threshold of 0.5. The overall objective function is... As a fitness function, the higher the fitness value, the better the individual (inspection planning scheme).

[0159] A tournament selection method is used, randomly selecting 5 individuals from the population, and choosing the individual with the highest fitness to enter the next generation population. This process is repeated until the size of the next generation population reaches 100. For real-number encoded variables, a simulated binary crossover (SBX) strategy is used for the round-robin interval and dwell time. For binary encoded cooperative linkage factors, a single-point crossover strategy is used. After crossover, it is checked whether the individual meets the constraints. If not, crossover is repeated. For real-number encoded variables, a polynomial mutation strategy is used. For binary encoded variables, a bit-flip mutation strategy is used. The mutation probability increases with the number of generations (initially 0.1, maximum 0.3) to avoid premature convergence of the algorithm. For the top 20% of individuals with fitness in each generation, local search optimization is performed, and the round-robin interval and dwell time are fine-tuned. If the fitness improves after optimization, the individual is retained; otherwise, the original individual is retained.

[0160] For each generation of the population, a non-dominated ordination is performed to divide the population into different Pareto fronts. The lower the front level (level 1 is the highest), the stronger the individual dominance. The crowding degree of each individual is calculated to characterize the degree of dispersion of individuals on the Pareto front. The higher the crowding degree, the better the individual diversity. From the level 1 Pareto front, the individual with the highest crowding degree and the highest fitness is selected as the optimal solution, i.e., the optimal inspection planning parameter combination (rotation interval, dwell time, and coordination factor). When the number of generations reaches 200, or the fitness value of the best individual fluctuates within ≤0.01 for 20 consecutive generations, the solution is stopped, and the optimal inspection parameter combination is output.

[0161] S304: Generation and execution of dynamic inspection planning schemes.

[0162] Based on the optimal inspection parameter combination obtained from the optimization solution, and combined with the inspection priority list and resource status, a structured inspection planning scheme is generated. The generated inspection planning scheme includes a node task allocation module, a regional inspection strategy module, and a resource scheduling adaptation module, and is stored in JSON format. The node task allocation module clarifies the inspection task list for each edge computing node, including node ID, management camera ID list, inspection interval for each camera, single-camera dwell time, collaborative camera IDs (if any), and task execution order. The regional inspection strategy module clarifies the inspection strategy according to the regional level. The core inspection area adopts a "high-frequency, short-dwell time + collaborative linkage" strategy, focusing on key areas. The inspection area adopts a "medium-frequency moderate stay" strategy, the regular inspection area adopts a "low-frequency short stay" strategy, and the emergency inspection area adopts a "fixed interval 10-second stay + continuous inspection" strategy. The resource scheduling and adaptation module includes the resource load threshold of each node, task diversion rules (tasks from heavily loaded nodes to light / medium load nodes), and communication link optimization configuration (collaborative inspection nodes prioritize high-speed communication links). The generated inspection plan is tested for feasibility through simulation to verify whether it meets various constraints, including resource load constraints and inspection interval constraints. If any constraints are not met, the process returns to the optimization solution stage, adjusts the decision variables, and re-solves until the solution is feasible.

[0163] A mechanism combining scheduled updates and triggered updates is adopted to ensure that the plan matches the real-time situation. By default, the inspection plan is updated every 5 minutes. Combined with the latest inspection priority list and resource status, the optimization solution is re-executed to generate an updated plan. The plan is immediately updated when any of the following situations occur: emergency inspection areas are added / removed; edge computing nodes are under heavy load; the fluctuation range of the regional predicted risk value is ≥0.2; or cameras fail (≥3 newly added faulty cameras).

[0164] The inspection plan is distributed to each edge computing node in a hierarchical manner through a secure communication protocol (such as MQTT-SN). Emergency inspection tasks are distributed through a priority channel, while regular inspection tasks are distributed through a normal channel. After receiving the plan, each edge computing node parses the task list and schedules the corresponding camera to perform the inspection task according to the inspection rotation interval, dwell time, and collaborative linkage strategy. The task execution status (in progress / completed / failed), actual inspection time, and data collection quality information are recorded in real time.

[0165] Each edge computing node reports its task execution status to the inspection and scheduling center every 10 seconds. If a task fails, such as due to camera malfunction or network interruption, a replanning is automatically triggered, adjusting the inspection task allocation for that area and diverting it to other cameras in the same area or neighboring nodes. The execution effectiveness of the inspection planning scheme is evaluated in real time from three dimensions: risk coverage, resource utilization, and latency control. Risk coverage requires an inspection coverage rate of ≥99% and an inspection omission rate of ≤1% for high-risk areas in the core / emergency inspection zone. Resource utilization requires a computing power load balance of ≥0.7 for each edge computing node, with no node continuously under heavy load. Latency control requires an inspection response latency of ≤60 seconds and an emergency inspection response latency of ≤10 seconds. If the evaluation indicators do not meet the requirements, the weight coefficients and constraints of the multi-objective optimization model are adjusted, the optimization solution is re-executed, and the inspection planning scheme is iteratively optimized.

[0166] For example:

[0167] The smart space contains two edge computing nodes (NODE-01 and NODE-02). NODE-01 manages CAM-001 to CAM-005, and its current computing power utilization rate is equal to... (Light load), bandwidth load rate equals (Light load):

[0168] Resource status awareness: NODE-01's CPU utilization is 55%, GPU utilization is 40%, and memory utilization is 65%, weighted. Calculate computing power utilization rate ; Number of tasks in the queue Average waiting time 15 seconds ≤ 60 seconds.

[0169] Inspection planning model construction: Decision variable setting—CAM-003 (key inspection area) patrol interval Single camera dwell time Seconds; with CAM-004 (regional association weight) Initiate collaborative inspection.

[0170] Multi-objective optimization solution: weights , , Overall objective function: ;

[0171] in, , , Seconds, substitute into (Example result before normalization).

[0172] Solution generation and execution: The optimal parameter combination is " Second, Seconds, coordinate CAM-004”; the solution is sent to NODE-01, and the “medium frequency moderate stay” strategy is executed; the execution status is fed back every 10 seconds (completion rate 100%, data collection quality 89 points), risk coverage efficiency ≥98%, no node overload.

[0173] In step S4, each edge computing node adaptively updates the gating weight matrix, time-step state decay coefficient, and risk threshold mapping coefficient of the Long Short-Term Memory (LSTM) network in the regional risk assessment model based on the risk prediction bias sequence, including:

[0174] S401: Risk prediction deviation data collection and sequence construction.

[0175] Each edge computing node synchronously records the output data of the regional risk assessment model and the actual abnormal state, constructs a standardized risk prediction deviation sequence, and records the smoothed predicted risk value output by the regional risk assessment model within each time window. Synchronously collect the actual abnormal status of abnormal alarms in the corresponding time window for that area, including the actual abnormal status label. (1 indicates an anomaly has occurred, 0 indicates no anomaly has occurred), actual severity of the anomaly. (Quantified by alarm level: Level 1 equals 4, Level 2 equals 3, Level 3 equals 2, Level 4 equals 1, no anomaly equals 0), timestamp of anomaly occurrence and anomaly type, where, After min-max normalization, it is mapped to the [0,1] interval.

[0176] For the regional data in each time window, the risk prediction deviation value is calculated by combining "absolute deviation + relative deviation". Taking into account the deviation sensitivity under different risk levels, the calculation formula is as follows:

[0177] ,

[0178] in, This is the deviation weighting coefficient. The actual risk value for the region is determined by the actual abnormal status label. The actual severity of normalized anomalies The weighted calculation is obtained, and the calculation formula is as follows: , To avoid the minimum value where the denominator is 0, The value ranges from [0,2], and the larger the value, the greater the prediction bias.

[0179] Continuous data will be processed in order of time window, with each region as a unit. Deviation value of each time window Arrange and construct a risk prediction bias sequence ,in, For the first Risk prediction bias value for each time window, The default value is 120, corresponding to a time length of 120 seconds; the bias sequence is preprocessed using... Outlier values ​​were removed using a criterion, and then gaps were filled using linear interpolation to ensure sequence continuity. Finally, the sequence was normalized using min-max normalization to map it to the [0,1] interval, resulting in the standardized deviation sequence. ,in, For the normalized first Risk prediction deviation value for each time window.

[0180] S402: Adaptive update of local model parameters for edge computing nodes.

[0181] Each edge computing node is based on a standardized deviation sequence The core parameters of the regional risk assessment model are adaptively updated locally without uploading the original data, ensuring data privacy and security. The updated parameters include the LSTM gate weight matrix and the time-step state decay coefficient. Risk threshold mapping coefficient These are all key parameters of the LSTM network and output layer in the regional risk assessment model. The LSTM gating weight matrix includes the input gate weight matrix. Forget gate weight matrix Output gate weight matrix All are 64×256 dimension matrices, corresponding to a 64 dimension for the LSTM hidden layer and a 256 dimension for the input features; time step state decay coefficients This is used to control the decay of the hidden state at historical time steps in the LSTM network, with a value range of [0.8, 0.99]. A larger value indicates a more persistent influence of the historical state; risk threshold mapping coefficient. Used to adjust adaptive risk threshold The calculation accuracy is related to the regional hierarchy, and the value ranges from [0.5, 1.5]. Among these, the core inspection area... Key inspection areas Routine inspection area .

[0182] Based on standardized deviation series Calculate the cumulative deviation The gating weight matrix is ​​dynamically adjusted based on the cumulative deviation, and the update formula is shown below:

[0183] ,

[0184] in, This is the index of the time window corresponding to the maximum deviation value in the deviation sequence. The exponent term is used to reinforce the impact of recent deviations on the update.

[0185] The formula for updating the weight matrix is ​​as follows:

[0186] ,

[0187] in, These correspond to the input gate, forget gate, and output gate, respectively. To update the learning rate locally, The gradient of the weight matrix is ​​given by the deviation value. Taking the derivative of the weight matrix, we get The updated gating weight matrix satisfies (L2 norm constraint) to avoid excessive weights leading to model overfitting. If the constraint is exceeded, normalization is performed.

[0188] Adjust according to the trend characteristics of the deviation sequence If the deviation shows an upward trend, then decrease it. To reduce the influence of historical conditions, the increase is made if the deviation shows a downward trend. To enhance the influence of historical states, the updated formula is as follows:

[0189] ,

[0190] in, The trend slope of the deviation sequence is denoted as . This is a sign function; it returns 1 when the trend is upward, -1 when it is downward, and 0 when it is stable. After the update... It remains within the range of [0.8, 0.99]; if it exceeds this range, the boundary value of the range is used.

[0191] The risk threshold mapping coefficient is adjusted based on the correlation between the actual severity of regional anomalies and prediction bias. To improve the adaptability of risk thresholds, the updated formula is as follows:

[0192] ,

[0193] in, The normalized regional anomaly severity; updated risk threshold mapping coefficients. It needs to be maintained within the range of [0.5, 1.5], while the relative relationship of the risk threshold mapping coefficients of the core / key / routine inspection areas remains unchanged.

[0194] After the parameters are updated, the model is validated using local bias sequence data for the past 5 minutes, and the mean of the updated prediction bias is calculated. ,like ( If the updated parameter is the mean of the prediction bias before the update, then the updated parameter is retained; otherwise, the update is discarded, the parameter state is restored to the state before the update, and the learning rate is adjusted. Reduced by 10% for the next update.

[0195] S403: Upload and Federated Aggregation of Model Parameter Updates

[0196] Each edge computing node only uploads the parameter update to the federated learning server, and the federated aggregation module generates global parameters using a weighted aggregation strategy, taking into account both the data reliability of each node and the consistency of the model.

[0197] The details are as follows:

[0198] Each edge computing node calculates the update amount of three types of core parameters, namely... , , , , , These represent the update amounts of the gating weight matrix, the time-step state decay coefficient, and the risk threshold mapping coefficient, respectively; the parameter update amounts are then compared with the node weight coefficients. The data is packaged into a parameter update packet and uploaded to the federated learning server using an encrypted communication protocol. The upload frequency is consistent with the timed update frequency of the inspection planning scheme. The uploaded data fields include edge node ID and node weight coefficient. Parameter update timestamp , , , , The updated mean prediction bias .

[0199] The federated learning server calculates node weight coefficients based on the local data quality and validation results of each node. The value ranges from [0,1]. A larger weight indicates that the parameter update of the node is more reliable. The calculation formula is as follows:

[0200] ,

[0201] in, For the first The mean prediction bias of each node, This represents the amount of bias sequence data at that node. The reliability score for node operation is calculated by weighting the percentage of node online time and the data collection completeness rate, with a value range of [0,1]. The weight coefficients of all nodes satisfy the following conditions: , This represents the total number of nodes used for edge computing.

[0202] The federated aggregation module performs weighted aggregation of parameter updates from all nodes to generate a global parameter update, including the global parameter update of the gating weight matrix. Global parameter update amount of the time step state decay coefficient Global parameter update amount of risk threshold mapping coefficient Then, these parameters are merged with the global baseline parameters stored in the federated server to obtain the updated globally consistent parameters. The aggregation formula for the global parameter update amount is shown below:

[0203] ,

[0204] ,

[0205] ,

[0206] in, , , The first The update amounts of the gating weight matrix, time step state decay coefficient, and risk threshold mapping coefficient for each node.

[0207] Update global baseline parameters. , , ,in, , , The global baseline parameters are stored in the federated server; the updated global gating weight matrix must satisfy... , , If the value exceeds the constraint, normalization or truncation will be performed.

[0208] The updated global parameters are validated using the historical global bias dataset (summary data of bias sequences uploaded by each node) stored in the federated server, and the mean global prediction bias is calculated. ;like If the aggregation is confirmed to be valid, the global baseline parameters are updated, where... The result is the mean of the global deviation before aggregation; otherwise, the aggregation result is discarded, the original global baseline parameters are retained, and the weight coefficients of each node are adjusted.

[0209] S404: Global parameter distribution and model update deployment.

[0210] The federated learning server periodically distributes the aggregated global parameters to each edge computing node, and each node synchronously updates its local model parameters to achieve consistent optimization of the global model.

[0211] The details are as follows:

[0212] The federated learning server uses a combination of batch distribution and incremental updates to distribute global parameters to each edge computing node. The distribution frequency matches the parameter upload frequency. If a trigger-based update of the inspection planning scheme is activated, such as the addition of an emergency area or heavy node load, the global parameters are immediately distributed. The distributed data is compressed and encrypted to ensure transmission efficiency and data security. The distributed data fields include the global parameter version number, parameter update timestamp, etc. , , Aggregate verification results and parameter constraint range.

[0213] Verify the received global parameter version number, parameter integrity, and constraint compliance. If verification fails, request a retransmission from the federated server. Replace the local model's gating weight matrix, time step state decay coefficient, and risk threshold mapping coefficient with the received global parameters. , , After the replacement is completed, restart the local area risk assessment model, load the updated parameters and cache them to local storage; at the same time, record the parameter update log, and the log fields include node ID, parameter update time, global parameter version number, parameter values ​​before and after the update, and local model verification results.

[0214] A long-term self-learning mechanism of "periodic iteration + dynamic adjustment" is adopted, with each self-learning cycle lasting 7 days. After the cycle ends, the federated learning server summarizes and analyzes the global parameter update records and model accuracy change trends during the cycle, and adjusts the local update learning rate accordingly. The system calculates node weight coefficients and hyperparameters for aggregation strategies; it also cleans up expired bias sequence data, optimizes storage resource usage, and enables the regional risk assessment model to achieve long-term, continuous self-learning and accuracy improvement under the premise of privacy protection.

[0215] This invention discloses a camera inspection planning method for smart spaces, constructing a complete technical system encompassing "multi-dimensional correlation modeling, dynamic risk assessment, multi-objective intelligent planning, and privacy-preserving self-optimization." The solution first integrates three types of historical inspection data to construct a spatial correlation topology, achieving precise grading of inspection areas using graph neural networks and statistical confidence intervals, overcoming the limitations of traditional single-dimensional grading. Next, it mines risk evolution patterns based on an LSTM model, dynamically adjusting inspection priorities. Combining a multi-objective joint optimization strategy with a "timed + triggered" dual update mode, it generates inspection plans adapted to real-time risk situations and resource status, solving the problem of poor adaptability in traditional planning. Finally, through a collaborative architecture of adaptive updating of local parameters at edge nodes and federated learning aggregation, only the parameter update amount is uploaded, rather than the original data, preventing privacy leaks while driving continuous model iteration. This solution achieves technological breakthroughs in three core aspects: regional classification, planning optimization, and model iteration. It effectively addresses the pain points of traditional inspection planning, such as low accuracy, insufficient adaptability, and lack of privacy protection. It significantly improves the resource utilization efficiency, risk response speed, and data security level of smart space inspection. It can be widely adapted to various smart space scenarios such as offices, industrial production, and public venues, providing efficient and reliable technical support for intelligent inspection management.

[0216] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A camera inspection planning method for smart spaces, characterized in that, Includes the following steps: Acquire historical inspection data of smart space, construct a spatial association topology with cameras as nodes and spatial adjacency, anomaly co-occurrence and activity association as edges, mine regional association weights through a graph neural network-based association analysis model and combine the historical anomaly distribution characteristics of the inspection area to quantify the spatial value index of cameras and divide the area into regions, generating a regional hierarchy table and corresponding spatial heat map. Multi-source sensing data is collected in real time and encoded into a real-time sensing sequence. After passing through a regional risk assessment model with embedded regional hierarchical constraints, the predicted risk value and short-term evolution direction of each inspection area are output to dynamically adjust the inspection priority and generate an inspection priority list. Based on the inspection priority list and the computing power utilization and bandwidth load of edge computing nodes, an inspection planning model is constructed and the inspection rotation interval, single camera dwell time and cross-regional collaboration strategy are jointly optimized to generate an inspection planning scheme and distribute it to the corresponding edge computing nodes for execution. Based on the predicted risk value and the actual abnormal state within the corresponding time window, a risk prediction deviation sequence is constructed, and the model parameters are optimized through local adaptive updates and federated learning aggregation.

2. The camera inspection planning method for smart spaces as described in claim 1, characterized in that, Historical inspection data processing and spatial correlation topology construction, including: Three types of historical inspection data were collected: inspection records, abnormal alarm records, and personnel activity trajectories. Missing numerical data was filled using the mean, and categorical missing data was filled using the mode. The criteria were used to remove outliers, standardize the time format and regional coordinate standards, and construct a standardized historical dataset. Using cameras as nodes and defining their attributes, and based on a standardized historical dataset, an undirected weighted spatial association topology is constructed according to the judgment rules of three types of associations: spatial adjacency, abnormal co-occurrence, and activity association. At the same time, the edges of the spatial association topology are assigned initial weights by weighted summation of the quantified values ​​of these three types of associations.

3. The camera inspection planning method for smart spaces as described in claim 1, characterized in that, Regional correlation weight mining and spatial value index calculation include: The spatial correlation topology is input into a graph convolutional neural network containing an input layer, two graph convolutional layers, a fully connected layer, and an output layer. Through neighborhood aggregation and deep feature extraction, the output region correlation weight matrix is ​​generated. Based on a standardized historical dataset, four types of features are extracted: frequency of occurrence, severity, diffusion, and temporal concentration of historical anomalies. The four types of features are then normalized. By combining the regional correlation weight matrix with the four types of normalized anomaly features, a weighted summation formula is used to calculate the camera spatial value index.

4. A camera inspection planning method for smart spaces as described in claim 1 or 3, characterized in that, Spatial value index processing and inspection area classification include: The spatial value index is normalized by min-max to obtain a standardized spatial value index. A normal distribution is fitted to calculate the confidence interval, and the interquartile range is calculated at the same time. Based on the correspondence between the spatial value index and the confidence interval and the interquartile range, the core, key and routine inspection areas are divided. The confidence score is calculated by subtracting the difference between the standardized spatial value index and the corresponding level mean from 1 and dividing by the standard deviation, thereby generating a regional hierarchy table and a spatial heat map distinguished by color system.

5. The camera inspection planning method for smart spaces as described in claim 1, characterized in that, The acquisition of multi-source sensing data and the construction of real-time sensing sequences include: Collect camera video streams, abnormal alarm streams, and processing progress streams at a set frequency, and align them with a unified timestamp as the basis for time. Linear interpolation is used to fill the time gaps, and the collected data is encoded and quantized to form a window feature vector. The real-time sensing sequence is constructed in chronological order.

6. The camera inspection planning method for smart spaces as described in claim 1, characterized in that, The regional risk assessment model outputs predicted risk values ​​and short-term evolution directions, including: inputting real-time sensing sequences into the regional risk assessment model, capturing time-related features through an LSTM gating mechanism, strengthening the weights of key time steps through an attention layer; outputting predicted risk values ​​through a fully connected output layer; extracting hidden states from multiple consecutive time windows and calculating cosine similarity to determine the short-term evolution direction.

7. The camera inspection planning method for smart spaces as described in claim 1, characterized in that, Inspection priority adjustments include: Based on the regional level, a basic risk threshold is set, and the threshold is dynamically adjusted by combining the normalized anomaly severity and the number of anomalies. The total adjustment factor is calculated by the risk value adjustment factor and the evolution direction adjustment factor to correct the initial priority score of the region. Based on the revised priority scores, a preliminary inspection priority order is generated. When the predicted risk value exceeds the threshold and the evolution direction is upward and the confidence level meets the standard, the emergency queue-jumping mechanism is triggered, and the emergency inspection area is marked.

8. The camera inspection planning method for smart spaces as described in claim 1, characterized in that, The construction of an edge computing node resource status awareness and inspection planning model includes: Collect data on CPU, GPU, memory usage and bandwidth load of edge computing nodes, calculate the computing power utilization rate by weight, and classify the load status into three levels: light, medium and heavy. Extract the regional hierarchy and predicted risk value from the inspection priority list. With the goals of maximizing risk coverage efficiency, maximizing computing load balance, and minimizing inspection response latency, set multiple constraints including resources, inspection intervals, and collaborative linkage to construct an inspection planning model.

9. The camera inspection planning method for smart spaces as described in claim 1, characterized in that, The optimization solution of the inspection planning model and the generation of inspection planning schemes include: Decision variables are encoded using a combination of real-number encoding and binary encoding, and parameters such as population size, number of generations, crossover probability, and mutation probability are set. Individuals are selected using a tournament selection method, and crossover operations are performed using simulated binary crossover and single-point crossover strategies. Mutation is achieved through polynomial mutation and bit-flipping mutation strategies. Combined with local search optimization, the optimal combination of inspection parameters is solved through non-dominated sorting and crowding calculation to generate an inspection planning scheme.

10. A camera inspection planning method for smart spaces as described in claim 1 or 3, characterized in that, Risk prediction deviation sequence construction and model parameter optimization, including: By combining the predicted risk value with the actual abnormal state label and the actual severity of the abnormality, the absolute deviation and relative deviation are calculated, and the risk prediction deviation value is obtained by weighted fusion. The risk prediction deviation sequence is constructed according to the time window, and the standardized deviation sequence is obtained after preprocessing. Based on the standardized deviation sequence, the LSTM gate weight matrix, time step state decay coefficient and risk threshold mapping coefficient are updated locally at the edge node. Edge nodes upload parameter updates to the federated learning server, which then aggregates them based on node weight coefficients to generate global parameters and distributes them periodically.