An apartment-based video monitoring abnormal behavior detection method and system

By constructing a spatiotemporal correlation network and generating anomaly cause tracing diagrams, the continuity and source tracing issues of behavior detection in apartment video surveillance systems are solved, enabling systematic handling of abnormal behaviors and improving the coherence and adaptability of detection.

CN122135285APending Publication Date: 2026-06-02YUXIN (NANJING) NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YUXIN (NANJING) NETWORK TECH CO LTD
Filing Date
2026-02-12
Publication Date
2026-06-02

Smart Images

  • Figure CN122135285A_ABST
    Figure CN122135285A_ABST
Patent Text Reader

Abstract

This invention relates to the field of intelligent video surveillance technology, and discloses a method and system for detecting abnormal behavior in apartment video surveillance. The method includes synchronously acquiring and segmenting the surveillance video stream into time-series video segments with overlapping areas; performing multi-level scene semantic analysis on each video segment; constructing a spatiotemporal correlation network based on the temporal and spatial relationships between video segments, and performing cross-time period behavior correlation analysis to generate continuous behavior chains; matching the behavior chains with an abnormal behavior rule base to determine and mark abnormal events; further, performing multi-dimensional causal tracing of abnormal events to generate an abnormal causal tracing graph, and formulating and executing a hierarchical handling strategy accordingly; finally, dynamically optimizing the rule base using strategy execution feedback data. This invention achieves continuous characterization of behavior chains by constructing a spatiotemporal correlation network, deepens event analysis through causal tracing graphs, and improves the coherence, accuracy, and interpretability of abnormal behavior detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent video surveillance technology, specifically to a method and system for detecting abnormal behavior in video surveillance of an apartment. Background Technology

[0002] Currently, abnormal behavior detection technologies in video surveillance systems in apartment settings primarily rely on analyzing real-time video streams or pre-segmented isolated video clips. Common methods use pre-trained models to identify targets and actions in single frames or short video segments, then compare them against a pre-defined rule base to trigger alarms. These technologies treat continuous surveillance video streams as a series of independent analytical units, resulting in a fragmented processing flow over time and a lack of effective modeling of the evolution and correlation of behavior over long periods. Furthermore, existing methods typically only process a single camera view or a simple juxtaposition of multiple views spatially, failing to fully utilize the potential overlap and complementarity of camera fields of view in apartment scenarios, leading to broken behavioral trajectories or missing contextual information.

[0003] After identifying abnormal behavior, most systems are limited to marking the time and location of the event or performing simple classifications. Their analytical depth remains at the level of what happened, with weak ability to trace the root cause. Existing solutions lack structured mining of the causal chain behind abnormal events, failing to systematically trace direct triggering factors and potential indirect environmental, historical, and other contributing factors. This deficiency leads to subsequent response strategies often being based on single event manifestations, lacking specificity and failing to prevent similar events from recurring at their root, thus limiting the system's decision support capabilities. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for detecting abnormal behavior in apartment video surveillance, so as to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides a method for detecting abnormal behavior in apartment video surveillance, the method comprising: Synchronously collect apartment surveillance video streams to obtain raw video data; The original video data is divided into multiple time-series video segments with overlapping regions; Perform multi-level scene semantic parsing on each of the time-series video segments to generate a scene semantic description corresponding to each of the time-series video segments; Based on the temporal proximity and spatial overlap relationships among all the aforementioned time-series video segments, a unified spatiotemporal correlation network is constructed. Based on the spatiotemporal correlation network, cross-time period behavior consistency correlation analysis is performed on all the scene semantic descriptions to generate continuous behavior chains. The behavior chain is matched with a preset abnormal behavior rule base to determine abnormal behavior events and mark their spatiotemporal boundaries. The causes of the abnormal behavior events are traced from multiple dimensions to generate an abnormal cause tracing diagram that includes direct and indirect causes. Based on the aforementioned anomaly cause tracing diagram, formulate targeted, tiered handling strategies; After executing the tiered processing strategy, collect strategy execution feedback data; The abnormal behavior rule base is incrementally learned and dynamically optimized using the feedback data from the strategy execution.

[0006] Preferably, the step of performing multi-level scene semantic parsing on each of the time-series video segments to generate a scene semantic description corresponding to each of the time-series video segments includes: The temporal video segment is segmented frame by frame into pixel-level foreground and background to extract the contours of moving targets in the foreground; Morphological filtering and connected component analysis are performed on the foreground moving target contour to obtain multiple independent target entity regions; Extract appearance texture features, motion trajectory features, and spatial layout features from each target entity region; The appearance texture features, motion trajectory features, and spatial layout features are input into an entity classification model to identify the entity category to which each target entity region belongs. The entity categories include people, pets, vehicles, and moving objects. The entity categories and spatial locations of all target entity regions within the same temporal video segment are structured and encoded to generate frame-level behavior vectors; The frame-level behavior vectors of all frames in the time-series video segment are input into a sequence aggregation model in chronological order to generate a segment-level behavior description of the time-series video segment. The segment-level behavior description includes entity interaction patterns and scene state transitions.

[0007] Preferably, the step of constructing a unified spatiotemporal correlation network based on the temporal proximity and spatial overlap relationships among all the time-series video segments includes: Calculate the time interval between any two of the aforementioned time-series video segments on the acquisition time axis; If the time interval is less than a preset time threshold, a time connection edge is established for the two time-series video segments in the spatiotemporal correlation network. Calculate the area of ​​the overlapping region between any two of the aforementioned time-series video segments in the video frame spatial coordinate system; If the area of ​​the overlapping region is greater than a preset spatial area threshold, then a spatial connection edge is established for the two time-series video segments in the spatiotemporal correlation network. Each of the time connection edges and the spatial connection edges is assigned a connection strength weight, which is dynamically calculated based on the length of the time interval or the size of the overlapping area. By using all the time-series video segments as nodes and all the time-connecting edges and the spatial-connecting edges as edges, the topology of the spatiotemporal network is constructed.

[0008] Preferably, the step of performing cross-time period behavior consistency association analysis on all the scene semantic descriptions based on the spatiotemporal association network to generate a continuous behavior chain includes: Starting from the edge with the highest connection strength weight in the spatiotemporal correlation network, perform a depth-first traversal; During the traversal, the semantic similarity between the scene semantic description of the current node and the scene semantic description of the next node is calculated. If the semantic similarity exceeds the semantic similarity threshold, the two scene semantic descriptions are merged into a single behavioral subchain. Based on the connection strength weight of each edge in the spatiotemporal correlation network, the merging order of the behavioral subchains is prioritized and scheduled. After traversing all nodes in the spatiotemporal association network that meet the semantic similarity threshold, all generated behavioral sub-chains are connected end to end in chronological order to form a complete behavioral chain. The behavioral chain records the coherent behavioral sequence of the target entity in time and space.

[0009] Preferably, the step of performing pattern matching between the behavior chain and a preset abnormal behavior rule base to determine abnormal behavior events and mark their spatiotemporal boundaries includes: The behavioral chain is decomposed into a series of behavioral primitives arranged in chronological order; Each of the aforementioned behavioral primitives is compared one by one with the behavioral triggering patterns in the abnormal behavior rule base; If a behavior primitive matches a behavior triggering pattern, then the exception determination logic associated with the behavior triggering pattern is activated. The anomaly determination logic calculates an anomaly score based on the context information of the behavioral primitive in the behavioral chain; If the anomaly score exceeds the anomaly determination threshold, the corresponding time period and spatial region will be marked as an abnormal behavior event, and the start timestamp, end timestamp, and spatial bounding box coordinates of the abnormal behavior event will be recorded. At the same time, the behavior primitive that triggered this determination will be marked as the anomaly root node.

[0010] Preferably, the step of tracing the causes of the abnormal behavior event from multiple dimensions to generate an abnormal cause tracing diagram that includes direct and indirect causes includes: Starting from the abnormal root node, backtrack forward for a predetermined time length in the behavior chain; Extract all behavioral primitives belonging to the same entity as the abnormal root node within the backtracking time period as candidate trigger behaviors; Analyze the logical dependencies between each candidate trigger behavior and the abnormal root node, including time-triggered relationships, spatial guidance relationships, and state evolution relationships; Based on the strength of the logical dependency, assign a causal correlation value to each candidate trigger behavior; Candidate causal behaviors whose causal correlation values ​​exceed the correlation threshold are marked as direct causes; Further analysis of the precursor behaviors of the direct triggering behavior in the behavioral chain reveals that precursor behaviors strongly correlated with it are marked as indirect triggers. The abnormal root node, all the direct causes, and all the indirect causes are connected in chronological order and logical relationship to form the abnormal cause tracing diagram with causal flow.

[0011] Preferably, the step of formulating a targeted, tiered handling strategy based on the anomaly cause tracing map includes: Identify the behavioral type and location of all direct causes in the abnormality tracing diagram; For each of the aforementioned direct trigger behaviors, the corresponding basic action is invoked from the strategy template library; Based on the location of the direct cause, specific execution parameters are configured for each basic treatment action to form a primary treatment instruction; Analyze the transmission path from the indirect cause to the direct cause in the tracing diagram of the abnormal cause; For each of the aforementioned transmission pathways, a preventative intervention aimed at blocking the transmission is generated, forming a secondary treatment recommendation; All the primary handling instructions and secondary handling suggestions are arranged in order from direct to indirect handling to generate a set of hierarchical handling strategies.

[0012] Preferably, after executing the hierarchical processing strategy, collecting strategy execution feedback data includes: After executing the initial handling instruction, new surveillance video data is collected within the target monitoring area; The new surveillance video data is subjected to multi-level scene semantic parsing to generate a new scene semantic description; The new scene semantic description is compared with the behavior pattern corresponding to the abnormal root node to determine whether the abnormal behavior event is terminated. Record the response time from the execution of the instruction to the determination of termination for the abnormal behavior event; Monitor whether the same or similar indirect triggering behaviors recur within the spatiotemporal range targeted by the secondary treatment recommendations; The termination status of the abnormal behavior event, the response time, and the recurrence of the indirect triggering behavior are collectively encapsulated into the policy execution feedback data.

[0013] Preferably, the step of incrementally learning and dynamically optimizing the abnormal behavior rule base using the strategy execution feedback data includes: If the policy execution feedback data shows that the abnormal behavior event was successfully terminated and the response time is short, then the confidence of the behavior triggering mode that triggered this determination in the abnormal behavior rule base is increased. If the strategy execution feedback data shows that the abnormal behavior event has not been terminated or the response time is too long, then the judgment threshold of the relevant abnormal judgment logic in the abnormal behavior rule base is adjusted or the matching conditions of the behavior triggering mode are modified. If the strategy execution feedback data shows that the indirect triggering behavior has a high recurrence frequency, then add or strengthen the early warning rules for the indirect triggering behavior in the abnormal behavior rule base; The optimized abnormal behavior rule base is used to process the subsequently collected apartment surveillance video streams.

[0014] Preferably, when the processor executes the computer program, it implements the steps of the apartment-based video surveillance abnormal behavior detection method as described in any of the above-described methods.

[0015] Compared with the prior art, the beneficial effects of the present invention are: By constructing a unified spatiotemporal correlation network that integrates temporal proximity and spatial overlap, the scene semantic descriptions obtained from parsing independent temporal video segments are organically integrated. This breaks through the limitations of isolated video segment analysis in traditional methods, achieving smooth transmission and splicing of behavioral information across continuous time and correlated space. The resulting continuous behavioral chains can more completely and accurately depict the activity trajectories and long-term behavioral patterns of people within the apartment, reducing misjudgments and omissions caused by video segmentation or perspective switching, and improving the temporal coherence and spatial integrity of abnormal behavior detection.

[0016] Based on multi-dimensional tracing, an anomaly causal tracing diagram containing both direct and indirect causes is generated, extending the analytical dimensions from post-event labeling to pre-event causal reasoning. By structurally deconstructing and visually demonstrating the causes of abnormal events, the direct triggers of anomalies are identified, revealing underlying background factors such as possible environmental conditions and continuous behavioral sequences. This allows the generated response strategies to be formulated hierarchically based on a complete causal map, forming a systematic plan from immediate intervention to long-term environmental improvement. Simultaneously, it provides precise causal logic for subsequent rule base optimization, enhancing the system's adaptability and explanatory capabilities. Attached Figure Description Figure 1 This is a schematic diagram illustrating the working principle of the video surveillance abnormal behavior detection method based on apartments described in this invention. Figure 2 A flowchart for multi-level scene semantic parsing; Figure 3 A flowchart for constructing a spatiotemporal correlation network; Figure 4 A graph showing the relationship between backtracking time and causal correlation thresholds for different types of abnormal behavior; Figure 5 A comparative analysis chart showing the effectiveness of handling abnormal behaviors at different time periods. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Please see Figure 1This invention provides a method for detecting abnormal behavior in apartment video surveillance. The method includes: synchronously acquiring apartment surveillance video streams to obtain raw video data; dividing the raw video data into multiple time-series video segments with overlapping areas; performing multi-level scene semantic parsing on each time-series video segment to generate a scene semantic description corresponding to each segment; constructing a unified spatiotemporal association network based on the temporal proximity and spatial overlap relationships among all time-series video segments; performing cross-time period behavior consistency association analysis on all scene semantic descriptions based on the spatiotemporal association network to generate continuous behavior chains; performing pattern matching between the behavior chains and a preset abnormal behavior rule base to determine abnormal behavior events and mark their spatiotemporal boundaries; tracing the causes of abnormal behavior events from multiple dimensions to generate an abnormal cause tracing diagram containing direct and indirect causes; formulating targeted hierarchical handling strategies based on the abnormal cause tracing diagram; collecting strategy execution feedback data after executing the hierarchical handling strategies; and using the strategy execution feedback data to incrementally learn and dynamically optimize the abnormal behavior rule base.

[0019] Example 1: See Figure 2 The process involves frame-by-frame pixel-level foreground and background segmentation of a time-series video segment to extract the contours of moving foreground objects. Morphological filtering and connected component analysis are then applied to these contours to obtain multiple independent target entity regions. For each target entity region, appearance texture features, motion trajectory features, and spatial layout features are extracted. These features are then input into an entity classification model to identify the entity category of each target entity region, including people, pets, vehicles, and moving objects. The entity categories and spatial locations of all target entity regions within the same time-series video segment are structured and encoded to generate frame-level behavior vectors. Finally, the frame-level behavior vectors of all frames within the time-series video segment are input chronologically into a sequence aggregation model to generate fragment-level behavior descriptions of the time-series video segment. These fragment-level behavior descriptions include entity interaction patterns and scene state transitions.

[0020] In practice, the temporal video segments are segmented frame-by-frame at the pixel level to separate the foreground and background, extracting the contours of moving foreground targets. This process is achieved using a Gaussian mixture background modeling algorithm. The algorithm models the color value sequence of each pixel, identifying pixel regions that do not conform to the background model as moving foreground. For example, in an apartment corridor surveillance video, the stationary floor and walls are modeled as the background, while the pixel regions of people walking are extracted as the foreground moving target contours. Morphological filtering and connected component analysis are then performed on the foreground moving target contours to obtain multiple independent target entity regions. Morphological filtering removes small noise points and fills holes in the foreground contours through an erosion-dilation operation. Connected component analysis marks spatially connected foreground pixels as the same independent target entity region, such as a complete person contour or a moving package contour.

[0021] In some embodiments, appearance texture features, motion trajectory features, and spatial layout features are extracted for each target entity region. Appearance texture features are obtained by calculating the histogram of directional gradients and local binary pattern descriptors of the target entity region. Motion trajectory features are obtained by calculating the centroid displacement, velocity, and acceleration vectors of the target entity region in consecutive video frames. Spatial layout features are obtained by describing the center coordinates, width, height, and relative position of the minimum bounding rectangle of the target entity region to the boundary of the monitored screen. The appearance texture features, motion trajectory features, and spatial layout features are input into an entity classification model. The entity classification model is a support vector machine classifier pre-trained with a large amount of labeled data. It identifies the entity category to which each target entity region belongs. Entity categories include people, pets, vehicles, and moving objects. For example, a target entity region with an upright posture, a specific aspect ratio, and a human gait trajectory is classified as "people".

[0022] In some embodiments, the entity categories and spatial locations of all target entity regions within the same temporal video segment are structured and encoded to generate frame-level behavior vectors. Each frame-level behavior vector is a multi-dimensional array whose dimensions correspond to all predefined entity categories and location intervals. The value of each element in the array represents the number or existence state of entities of the corresponding category appearing in the corresponding location interval in the current video frame. The frame-level behavior vectors of all frames within the temporal video segment are input sequentially into a sequence aggregation model. This model is a bidirectional long short-term memory network that analyzes the temporal evolution patterns of the frame-level behavior vectors and outputs fragment-level behavior descriptions of the temporal video segment. These fragment-level behavior descriptions include entity interaction patterns and scene state transitions. The entity interaction pattern is described as "Person A walks at a constant speed from east to west in a corridor," and the scene state transition is described as "The public area changes from an empty state to a state where one person is passing through." The sequence aggregation model generates fragment-level behavior descriptions by weighted fusion of information from each frame. The fusion process can be described as follows: ; in: This represents the generated fragment-level behavior description vector. This represents the total number of frames in a time-series video segment. This represents the frame-level behavior vector of frame t. This represents the temporal attention weights corresponding to the t-th frame, learned by the sequence aggregation model, with the sum of all weights being 1.

[0023] Optionally, in the step of extracting the foreground moving target contour, optical flow-assisted segmentation can be combined to calculate the pixel motion vector field between adjacent frames in the surveillance video stream. Pixel regions with significantly consistent motion directions are then fused with the background modeling results to more accurately separate the moving target. Optionally, the entity classification model can use a classifier based on a deep residual network instead of a support vector machine, leveraging the deeper feature extraction capabilities of the residual network to improve the classification accuracy for small-scale or non-rigid targets such as "pets" and "moving objects".

[0024] Example 2: See Figure 3 The process involves calculating the time interval between any two time-series video segments on the acquisition timeline. If the time interval is less than a preset time threshold, a temporal connection edge is established between these two video segments in the spatiotemporal correlation network. The overlapping area of ​​any two video segments in the video frame spatial coordinate system is also calculated. If the overlapping area is greater than a preset spatial area threshold, a spatial connection edge is established between these two video segments in the spatiotemporal correlation network. Each temporal and spatial connection edge is assigned a connection strength weight, which is dynamically calculated based on the length of the time interval or the size of the overlapping area. All video segments are treated as nodes, and all temporal and spatial connection edges are treated as edges, forming the topology of the spatiotemporal correlation network. A depth-first traversal is performed, starting from the edge with the highest connection strength weight in the spatiotemporal correlation network. During the traversal, the semantic similarity between the scene semantic description of the current node and the scene semantic description of the next node is calculated. If the semantic similarity exceeds a semantic similarity threshold, the two scene semantic descriptions are merged into a single behavioral sub-chain. The merging order of the behavioral sub-chains is prioritized according to the connection strength weights of each edge in the spatiotemporal correlation network. After traversing all nodes in the spatiotemporal association network that meet the semantic similarity threshold, all generated behavioral sub-chains are connected end to end in chronological order to form a complete behavioral chain. The behavioral chain records the coherent behavioral sequence of the target entity in time and space.

[0025] In practice, the time interval between any two time-series video segments on the acquisition timeline is calculated. This time interval is obtained by the absolute value of the difference between the center timestamps of the two video segments. For example, if the center timestamp of video segment A is 10:00:05 and the center timestamp of video segment B is 10:00:08, the time interval between them is 3 seconds. If the time interval is less than a preset time threshold (set to 5 seconds), a time connection edge is established for these two video segments in the spatiotemporal correlation network. The overlapping area of ​​any two video segments in the video frame spatial coordinate system is calculated. This overlapping area is obtained by calculating the number of pixels in the intersection area of ​​the corresponding video frames of the two video segments in the frame space. For example, if the frame of video segment C covers the east side of the apartment corridor and the frame of video segment D covers the area where the east side and the middle section of the apartment corridor meet, there is partial overlap between the two frames. If the overlapping area is greater than a preset spatial area threshold (set to 30% of the total number of pixels in a single video frame), a spatial connection edge is established for these two video segments in the spatiotemporal correlation network. Each temporal and spatial connection edge is assigned a connection strength weight, which is dynamically calculated based on the length of the time interval or the size of the overlapping area. For temporal connections, the shorter the time interval, the higher the connection strength weight; for spatial connections, the larger the overlapping area, the higher the connection strength weight. All temporal video segments are treated as nodes, and all temporal and spatial connections are treated as edges, forming a spatiotemporal interconnected network topology.

[0026] In some embodiments, a depth-first traversal is performed starting from the edge with the highest connection strength weight in the spatiotemporal association network. For example, the spatial connection edge connecting time-series video segment X and time-series video segment Y has the highest connection strength weight of 0.95, and the traversal begins from this edge. During the traversal, the semantic similarity between the scene semantic description of the current node and the scene semantic description of the next node is calculated. The semantic similarity is obtained by calculating the cosine similarity between the two scene semantic description vectors. If the semantic similarity exceeds the semantic similarity threshold, which is set to 0.85, the two scene semantic descriptions are merged into a single behavioral subchain. The merging order of behavioral subchains is prioritized according to the connection strength weight of each edge in the spatiotemporal association network, with nodes connected by edges with higher connection strength weights being prioritized for semantic similarity calculation and merging operations.

[0027] In some embodiments, after traversing all nodes in the spatiotemporal association network that meet the semantic similarity threshold, all generated behavioral subchains are concatenated end-to-end in chronological order. The chronological order of the behavioral subchains is determined by the start timestamps of the temporal video segments they contain. For example, behavioral subchain Alpha contains video segment descriptions from timestamp 10:00:01 to 10:00:05, and behavioral subchain Beta contains video segment descriptions from timestamp 10:00:04 to 10:00:09. Since they are temporally continuous and semantically consistent, behavioral subchain Alpha and behavioral subchain Beta are concatenated. After concatenation, a complete behavioral chain is formed. The behavioral chain records the coherent sequence of actions of the target entity in time and space. For example, a behavioral chain can be represented as "a person enters the corridor from the elevator, walks east along the corridor, and stops in front of the fire door." The dynamic process of calculating the connection strength weights can be represented by the following formula: ; in: This represents the overall connection strength weight between node i and node j in a temporal video segment. This represents the time interval between node i and node j. It is a time constant parameter used to adjust the time decay rate. This represents the area of ​​the overlapping region between node i and node j. This represents the total area of ​​a single video frame. It is a hybrid coefficient between 0 and 1, used to adjust the contribution ratio of temporal proximity and spatial overlap in the overall weight.

[0028] Optionally, the time threshold and spatial area threshold can be adaptively adjusted according to the specific layout of the apartment monitoring scene. For corridors and lobbies, the spatial area threshold can be appropriately reduced to associate a wider range of perspectives. Optionally, the starting point selection strategy for depth-first traversal is not limited to the highest connection strength weight; a breadth-first traversal strategy starting from the earliest timestamp can also be used. It can be understood that semantic similarity calculation is not limited to cosine similarity. Any metric that can quantify the distance or similarity between two semantic description vectors, such as similarity scoring based on a pre-trained semantic model, can be used to determine whether scene semantic descriptions can be merged. In specific implementations, similarity calculation based on a pre-trained semantic model can be achieved by deploying a deep neural network model pre-trained on a large video behavior dataset, such as using the Transformer encoder architecture mentioned in the document. This pre-trained semantic model learns behavioral patterns and semantic associations from massive amounts of video clips, gaining a powerful ability to represent scene semantic description vectors. When it is necessary to determine whether two scene semantic descriptions can be merged, the system inputs their vector representations into the pre-trained semantic model. The model outputs its encoding results in a high-dimensional semantic space. Then, by calculating similarity measures between these encoding results, such as dot product or Manhattan distance, a semantic similarity score is generated, thereby replacing or supplementing the traditional cosine similarity calculation and ensuring that the behavioral subchain merging process is more in line with the actual semantic context.

[0029] Example 3: The behavior chain is decomposed into a series of behavior primitives arranged in chronological order. Each behavior primitive is compared one by one with the behavior triggering patterns in the abnormal behavior rule base. If a behavior primitive matches a certain behavior triggering pattern, the abnormal judgment logic associated with the behavior triggering pattern is activated. The abnormal judgment logic calculates an abnormal score based on the context information of the behavior primitive in the behavior chain. If the abnormal score exceeds the abnormal judgment threshold, the corresponding time period and spatial region are marked as an abnormal behavior event, and the start timestamp, end timestamp, and spatial bounding box coordinates of the abnormal behavior event are recorded. At the same time, the behavior primitive that triggered this judgment is marked as the abnormal root node.

[0030] In practical implementation, the behavior chain is decomposed into a series of behavior primitives arranged in chronological order. A behavior primitive is the smallest indivisible semantic action unit in the behavior chain. For example, a behavior chain recording "personnel walk from the main entrance to the storage room" can be decomposed into three behavior primitives: "entering from the main entrance," "walking in the corridor," and "stopping in front of the storage room door." Each behavior primitive has a start timestamp, end timestamp, spatial coordinates, and semantic label. Each behavior primitive is compared one by one with the behavior triggering patterns in the abnormal behavior rule base. The abnormal behavior rule base is a database storing predefined abnormal pattern rules, such as "staying in a non-entrance area for a long time," "abnormally rapid movement at night," and "multiple people gathering in the fire escape." The comparison process calculates the matching degree between the semantic label, duration, and location attributes of the behavior primitive and the conditions defined in the behavior triggering pattern. If a behavior primitive matches a certain behavior triggering pattern, for example, the semantic label and location of the behavior primitive "bending over to operate in front of the electrical box" match the condition of the behavior triggering pattern "unauthorized personnel touching important facilities" with a matching degree exceeding 90%, then the abnormal judgment logic associated with the behavior triggering pattern is activated.

[0031] In some embodiments, the anomaly determination logic calculates an anomaly score based on the context information of the behavioral primitive in the behavioral chain. The context information includes the sequences of other adjacent behavioral primitives before and after the behavioral primitive, the overall time period in which the behavioral chain occurs, and the behavioral primitives of other entities within the same spatial area. The anomaly determination logic is a function containing weighted scoring rules. For example, a behavioral primitive that matches a behavioral triggering pattern receives a base score of 70 points. If the behavioral primitive occurs in the early morning, it receives an additional 20 points. If the preceding behavior of the behavioral primitive is "climbing over a fence," it receives an additional 15 points. If the following behavior is "quickly escaping," it receives an additional 10 points. These scores are summed according to their weights to obtain the anomaly score. If the anomaly score exceeds the anomaly judgment threshold (set at 85 points), the corresponding time period and spatial area will be marked as an abnormal behavior event. The start timestamp, end timestamp, and spatial bounding box coordinates of the abnormal behavior event will be recorded. The spatial bounding box coordinates are the coordinates of the smallest rectangle that can completely contain the spatial area involved in the abnormal behavior. At the same time, the behavior primitive that triggered this judgment will be marked as the anomaly root node. For example, the behavior primitive "bending over in front of the distribution box" with a score of 95 points will be marked as the anomaly root node.

[0032] In some embodiments, anomaly scoring The calculation method can be represented by the following formula: ; in: This represents the final calculated anomaly score; M represents the base score for matching the behavioral primitive with the behavioral triggering pattern, with a value between 0 and 100. It is the weighting coefficient of the base score; K represents the number of contextual feature terms considered; The quantitative value representing the contextual feature of the k-th item, such as a Boolean value indicating whether the time period is late at night, or a risk level score of the preceding behavior; This represents the contribution coefficient corresponding to the k-th context feature; These are the weight coefficients of the sum of contextual features; This represents a moderating factor based on global attributes of the behavior chain, such as the density of anomalous behavior primitives in the behavior chain. These are the weighting coefficients of the global adjustment factor. , , The sum of all values ​​is 1. Each feature value, coefficient, and threshold is stored in the abnormal behavior rule base in association with the specific abnormal judgment logic.

[0033] Optionally, the behavior triggering mode can include not only static attribute condition matching but also dynamic time logic constraints. For example, it may require behavior primitive A to appear within a specific time window after behavior primitive B to constitute a valid match. Optionally, the anomaly judgment threshold can be set differently for different areas and time periods. For example, the threshold for the apartment's public area can be set to 80 points, while the threshold for the equipment room area can be set to 70 points. It can be understood that the granularity of the definition of behavior primitives can be adjusted according to detection needs. For example, "walking" can be defined as a behavior primitive, or it can be further subdivided into more refined behavior primitives such as "slow walking" and "fast running". It can be understood that the behavior triggering modes and anomaly judgment logic in the abnormal behavior rule base can be dynamically added, modified, or disabled to adapt to changes in the definition of abnormal behavior by different apartment management parties.

[0034] Example 4: Starting from the anomaly root node, trace back a predetermined time length in the behavior chain. Extract all behavioral primitives belonging to the same entity as the anomaly root node within the traceback time period as candidate trigger behaviors. Analyze the logical dependencies between each candidate trigger behavior and the anomaly root node, including temporal trigger relationships, spatial guidance relationships, and state evolution relationships. Assign a causal correlation value to each candidate trigger behavior based on the strength of the logical dependencies. Mark candidate trigger behaviors with causal correlation values ​​exceeding the correlation threshold as direct triggers. Further analyze the preceding behaviors of the direct trigger behaviors in the behavior chain, marking strongly correlated preceding behaviors as indirect triggers. Connect the anomaly root node, all direct triggers, and all indirect triggers according to chronological order and logical relationships to form an anomaly cause tracing graph with causal flow. Identify the behavior type and occurrence location of all direct triggers in the anomaly cause tracing graph. For each behavior type of direct trigger, call the corresponding basic handling action from the strategy template library. Configure specific execution parameters for each basic handling action based on the occurrence location of the direct trigger to form a primary handling instruction. Analyze the transmission path from indirect to direct causes in the causal analysis diagram. For each transmission path, generate a preventative intervention measure aimed at blocking the transmission, forming a secondary treatment recommendation. Arrange all primary treatment instructions and secondary treatment recommendations in order of direct to indirect treatment to generate a tiered treatment strategy.

[0035] In practice, starting from the root node of the anomaly, the behavior chain is traced back for a predetermined time length. The predetermined time length is set according to the type of anomaly behavior. For example, for anomalies such as "damaging public facilities," the traceback time length is set to 10 minutes, and for anomalies such as "tailgating," the traceback time length is set to 3 minutes. All behavioral primitives belonging to the same entity as the root node of the anomaly are extracted within the traceback time period as candidate causal behaviors. For example, if the root node of the anomaly is "performing unauthorized operations in front of the distribution box," the behavioral primitives of the same entity within the traceback time period include "tailgating authorized personnel into the equipment room," "attempting to open the door using an unauthorized access card," and "loitering and observing in the corridor for a long time."

[0036] In some embodiments, the logical dependencies between each candidate triggering behavior and the anomaly root node are analyzed. These logical dependencies include temporal triggering relationships, spatial guidance relationships, and state evolution relationships. A temporal triggering relationship refers to the time interval between the occurrence of the candidate triggering behavior and the anomaly root node being within a specific threshold and having a sequential order. A spatial guidance relationship refers to the occurrence location of the candidate triggering behavior forming a spatial path leading to the anomaly root node. A state evolution relationship refers to the environmental or entity state change caused by the candidate triggering behavior creating conditions for the occurrence of the anomaly root node. Based on the strength of the logical dependencies, each candidate triggering behavior is assigned a causal correlation value. The causal correlation value is a value between 0 and 1, calculated using an evaluation function that comprehensively considers the time interval, spatial path continuity, and the tightness of the state transition logic. Candidate triggering behaviors with causal correlation values ​​exceeding a correlation threshold are marked as direct triggers. The correlation threshold is set to 0.7. For example, the behavior "tailing authorized personnel into the equipment room" has a causal correlation value of 0.85 and is marked as a direct trigger. Further analysis of the preceding behaviors in the behavioral chain of the direct triggering behavior identifies strongly correlated preceding behaviors as indirect triggers. For example, if the analysis reveals that before the direct trigger of "following authorized personnel into the equipment room," the same entity also exhibits two other behavioral primitives: "lingering in front of the access control system for an extended period" and "checking building staff schedules via social media," both strongly correlated with the direct trigger, then these two behavioral primitives are marked as indirect triggers. The anomaly root node, all direct triggers, and all indirect triggers are connected according to chronological order and logical relationships to form an anomaly cause tracing graph with causal flow. Nodes in the graph represent behavioral primitives, and directed edges represent causal directions. See Table 1.

[0037] Table 1: Analysis of Causal Correlation between Candidate Trigger Behaviors Candidate trigger behaviors (behavioral primitives) Logical dependency types Causal correlation value Is it marked as a direct cause? Follow authorized personnel into the equipment room Time-triggered, space-guided 0.85 yes Attempting to open the door using an unauthorized access card. Time-triggered, state evolution 0.75 yes lingering and observing in the corridor for a long time Spatial guidance 0.60 no lingering in front of the access control system State evolution 0.45 No (marked as indirect cause) Checking the building's staff schedules through social media State evolution 0.40 No (marked as indirect cause) Causal correlation value It can be calculated using the following formula: ; in: This represents the calculated causal correlation value; This represents a score based on time-triggered relationships, with its value calculated using a negative exponential function based on the time interval between the candidate trigger behavior and the abnormal root node. This represents a score based on spatial guidance relationships, and its value is determined according to the coherence and rationality of the spatial path. This represents a score based on state evolution relationships, and its value is determined according to the logical coherence of the behavioral sequence. These represent the weighting coefficients for time, space, and logical relationship scores, respectively, and satisfy the following conditions: Each score and weight is defined in the abnormal behavior rule base according to different abnormal types.

[0038] In some embodiments, the behavior type and location of all direct causes in the anomaly tracing diagram are identified. For example, the direct cause behavior types are "tailgating" and "unauthorized door opening attempt," and the locations are "equipment room entrance" and "corridor where the distribution box is located." For each direct cause behavior type, the corresponding basic handling action is called from the policy template library. For example, the "remote voice warning" action is called for "tailgating," and the "dispatch on-site verification work order" action is called for "unauthorized door opening attempt." Based on the location of the direct cause, specific execution parameters are configured for each basic handling action to form a primary handling instruction. For example, the execution parameter "warning content: 'Do not tailgate others into restricted areas'" is configured for the "remote voice warning" action, and the execution parameter "target address: corridor where the distribution box is located, work order priority: high" is configured for the "dispatch on-site verification work order" action.

[0039] The analysis traces the transmission path from indirect to direct causes in the anomaly analysis diagram. For example, the indirect causes "lingering in front of the access control system for an extended period" and "checking building staff schedules via social media" together lead to the direct cause "tailgating authorized personnel into the equipment room." For each transmission path, a preventative intervention measure aimed at blocking the transmission is generated, forming a secondary handling recommendation. For example, for "lingering in front of the access control system for an extended period," the secondary handling recommendation is "increasing the intelligent recognition frequency of video surveillance in front of the access control system," and for "checking building staff schedules via social media," the secondary handling recommendation is "re-education on information security awareness for internal staff." All primary handling instructions and secondary handling recommendations are arranged in order from direct to indirect handling to generate a hierarchical handling strategy. For example, the strategy stipulates that "remote voice warning" and "dispatching on-site verification work orders" should be executed first, followed by the deployment of two long-term measures, "increasing the intelligent recognition frequency of video surveillance in front of the access control system" and "re-education on information security awareness for internal staff," in the daily work meeting.

[0040] Optionally, the identification of indirect causes is not limited to the first-order precursor behavior of direct causes; it can continue to trace back to multiple precursor behaviors, forming a deeper causal chain. Optionally, the generation of preventative intervention measures can be combined with the apartment's existing security equipment capability library. For example, a "remote voice warning" suggestion can only be generated if a remotely controllable speaker is present. It is understood that the basic handling actions in the strategy template library can include various types of automated and manual intervention. Automated actions include "linking and locking relevant access control systems" and "automatically adjusting camera preset positions," while manual intervention actions include "notifying security guards to patrol" and "generating an incident report and sending it to the management center."

[0041] See Figure 4In the analysis of backtracking time and correlation thresholds for different anomaly types, the distribution characteristics of backtracking time (minutes) and causal correlation thresholds for five abnormal behavior types are presented in a dual-axis format. Specifically, the horizontal axis represents the abnormal behavior type, the left vertical axis corresponds to the backtracking time, and the right vertical axis corresponds to the causal correlation threshold: the backtracking time for "damaging public facilities" is 10 minutes, with a correlation threshold of approximately 0.70; the backtracking time for "tailgating" is 3 minutes, with a correlation threshold of approximately 0.70; the backtracking time for "illegal loitering" is 8 minutes, with a correlation threshold of approximately 0.65; the backtracking time for "improper equipment operation" is 12 minutes, with a correlation threshold of approximately 0.75; and the backtracking time for "abnormal access control" is 5 minutes, with a correlation threshold of approximately 0.68. It intuitively reflects the differences in backtracking time configuration for different abnormal behaviors (such as "device violation operation" requiring the longest backtracking time), and at the same time reflects the correspondence between the correlation threshold and the risk level of abnormal behavior (high-risk behavior corresponds to a higher correlation threshold), providing a visual basis for setting parameters for backtracking time and cause screening in the tracing of abnormal causes.

[0042] Example 5: After executing the initial handling instruction, new surveillance video data is collected within the target monitoring area. Multi-level scene semantic analysis is performed on the new surveillance video data to generate a new scene semantic description. The new scene semantic description is compared with the behavior pattern corresponding to the anomaly root node to determine whether the anomaly event has been terminated. The response time of the anomaly event from instruction execution to termination is recorded. Monitoring is conducted to determine whether the same or similar indirect triggering behaviors reappear within the spatiotemporal range targeted by the secondary handling suggestions. The termination status of the anomaly event, response time, and recurrence of indirect triggering behaviors are collectively encapsulated as policy execution feedback data. If the policy execution feedback data shows that the anomaly event was successfully terminated and the response time is short, the confidence of the behavior triggering pattern that triggered this judgment in the anomaly behavior rule base is increased. If the policy execution feedback data shows that the anomaly event was not terminated or the response time is too long, the judgment threshold of the relevant anomaly judgment logic in the anomaly behavior rule base is adjusted or the matching conditions of the behavior triggering pattern are modified. If the policy execution feedback data shows that the recurrence frequency of indirect triggering behaviors is high, warning rules for indirect triggering behaviors are added or strengthened in the anomaly behavior rule base. The optimized abnormal behavior rule library is used to process the subsequently collected apartment surveillance video streams.

[0043] In practice, after executing the initial handling instruction, new surveillance video data is collected within the target monitoring area. For example, for an abnormal behavior event marked as "unauthorized operation in front of the distribution box," the initial handling instruction "dispatch on-site verification work order" is executed, and the system continuously collects the latest surveillance video stream of the corridor area where the distribution box is located as new surveillance video data. Multi-level scene semantic parsing is performed on the new surveillance video data to generate new scene semantic descriptions. The multi-level scene semantic parsing process is completely consistent with the previous description. Foreground segmentation, entity classification, behavior vector encoding, and sequence aggregation operations are performed on the new video data, for example, generating "security personnel arrived at the scene and inspected the distribution box" or "the original person involved is no longer at the scene."

[0044] The new scene semantic description is compared with the behavior pattern corresponding to the abnormal root node to determine whether the abnormal behavior event has been terminated. The comparison process checks whether there are still behavioral primitives in the new scene semantic description that are the same as or highly similar to the behavior pattern of the abnormal root node. For example, if the behavior pattern "illegal operation of the distribution box" does not appear in the new description and the on-site state has returned to normal, then the abnormal behavior event is determined to be terminated. The response time from the execution of the instruction to the determination of termination of the abnormal behavior event is recorded. The response time is calculated from the time when the initial handling instruction is issued to the time when the system determines the event to be terminated based on the new scene semantic description. For example, if the instruction is issued at 10:05:30 and the system determines the termination at 10:08:15, the response time is 165 seconds. The system monitors whether the same or similar indirect triggering behaviors recur within the time and space range targeted by the secondary action recommendations. For example, the secondary action recommendation "enhance the intelligent recognition frequency of video surveillance in front of access control" targets the time and space range of "the area in front of the access control room during daily working hours within the next week." The system continuously monitors within this range, and if the behavior of "lingering and observing in front of the access control system for a long time" is detected again, it is recorded as a recurrence of indirect triggering behavior. The termination status of the abnormal behavior event, the response time, and the recurrence status of the indirect triggering behavior are collectively encapsulated into policy execution feedback data. The encapsulation format can be a structured data packet containing a unique event identifier, a termination status boolean value, a response time value, and a list of the recurrence counts of each indirect triggering behavior.

[0045] In some embodiments, if the policy execution feedback data shows that the abnormal behavior event was successfully terminated and the response time is short, for example, the response time is lower than the preset expected threshold of 180 seconds, then the confidence level of the behavior triggering pattern that triggered this judgment in the abnormal behavior rule base is increased. The confidence enhancement operation can be to increase the confidence score associated with the behavior triggering pattern by a fixed step or to dynamically increase it based on the ratio of response time to threshold. For example, if the original confidence score is 80, it is increased to 85 after successful and rapid termination. If the policy execution feedback data shows that the abnormal behavior event was not terminated or the response time is too long, for example, the response time exceeds 300 seconds or the event is not terminated, then the judgment threshold of the relevant abnormal judgment logic in the abnormal behavior rule base is adjusted or the matching condition of the behavior triggering pattern is modified. For example, the abnormal judgment threshold associated with the behavior triggering pattern is reduced from 85 to 80 to trigger the alarm earlier, or the matching condition of the behavior triggering pattern is modified from "bending over to operate the distribution box" to "staying in front of the distribution box for more than 30 seconds with hand contact."

[0046] In some embodiments, if policy execution feedback data shows a high frequency of recurrence of indirect triggering behaviors, such as the same indirect triggering behavior recurring more than 3 times within a monitoring period, then a new or enhanced warning rule for the indirect triggering behavior is added to the abnormal behavior rule base. Adding a new warning rule involves creating a separate behavior triggering mode and associated warning level determination logic for the frequently recurring indirect triggering behavior. For example, adding a rule "Warning for accumulated overstay in the access control area," with its abnormal judgment threshold and handling strategy configured separately. Enhancing a warning rule involves increasing the processing priority or raising the output alarm level of existing rules in the rule base that are related to frequently recurring indirect triggering behaviors. The dynamic process of confidence adjustment can be represented by the following formula: ; in: This indicates the adjusted confidence score for the behavior triggering pattern; This indicates the confidence score of the behavior triggering pattern before adjustment; It is the base learning rate coefficient, which determines the basic range of confidence adjustment; This represents the preset expected response time threshold; This represents the actual response time recorded in the strategy execution feedback data; It is an exponential parameter used to control the strength of the effect of the actual response time on the adjustment magnitude relative to the expected threshold; It is an indicator function whose value is 1 when the policy execution feedback data shows that the abnormal behavior event was successfully terminated, and 0 otherwise. This indicates the upper limit of the confidence score.

[0047] Optionally, the collection of policy execution feedback data can be set within a fixed observation time window. For example, after the initial handling instruction is executed, the system continuously collects video data for the next 15 minutes to generate feedback, thus avoiding indefinite waiting. Optionally, incremental learning and dynamic optimization of the abnormal behavior rule base can be scheduled to be performed in batches during periods of low system load or at fixed times each day to reduce the impact on real-time processing performance. It can be understood that modifying the matching conditions for behavior triggering patterns includes not only tightening or loosening the conditions, but also adding new constraint dimensions based on feedback data, such as adding constraints on the time period of the behavior or the number of related entities.

[0048] See Figure 5 The data analysis in the graph primarily presents the effectiveness of the apartment video surveillance abnormal behavior handling system at different times, specifically covering two key indicators: handling success rate (blue bars) and average response time (orange line graph). From a data perspective, the handling success rate generally remains at a high level above 0.8 across all time periods, peaking between 10:00 and 12:00. The average response time, however, exhibits significant fluctuations across time periods, with the shortest response time (approximately 160 seconds) between 10:00 and 12:00 and the longest (nearly 210 seconds) between 18:00 and 20:00. The correlation between the two is as follows: during periods with high handling success rates, the average response time is typically low, demonstrating a positive synergistic effect of "high success rate - short response time." However, during periods such as 18:00 and 20:00, although the handling success rate remains above 0.75, the extended response time reflects pressure on resources or process efficiency during these periods.

[0049] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0050] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for detecting abnormal behavior in apartment video surveillance, characterized in that, The method includes: Synchronously collect apartment surveillance video streams to obtain raw video data; The original video data is divided into multiple time-series video segments with overlapping regions; Perform multi-level scene semantic parsing on each of the time-series video segments to generate a scene semantic description corresponding to each of the time-series video segments; Based on the temporal proximity and spatial overlap relationships among all the aforementioned time-series video segments, a unified spatiotemporal correlation network is constructed. Based on the spatiotemporal correlation network, cross-time period behavior consistency correlation analysis is performed on all the scene semantic descriptions to generate continuous behavior chains. The behavior chain is matched with a preset abnormal behavior rule base to determine abnormal behavior events and mark their spatiotemporal boundaries. The causes of the abnormal behavior events are traced from multiple dimensions to generate an abnormal cause tracing diagram that includes direct and indirect causes. Based on the aforementioned anomaly cause tracing diagram, formulate targeted, tiered handling strategies; After executing the tiered processing strategy, collect strategy execution feedback data; The abnormal behavior rule base is incrementally learned and dynamically optimized using the feedback data from the strategy execution.

2. The method for detecting abnormal behavior in apartment-based video surveillance according to claim 1, characterized in that, The step of performing multi-level scene semantic parsing on each of the time-series video segments to generate a scene semantic description corresponding to each of the time-series video segments includes: The temporal video segment is segmented frame by frame into pixel-level foreground and background to extract the contours of moving targets in the foreground; Morphological filtering and connected component analysis are performed on the foreground moving target contour to obtain multiple independent target entity regions; Extract appearance texture features, motion trajectory features, and spatial layout features from each target entity region; The appearance texture features, motion trajectory features, and spatial layout features are input into an entity classification model to identify the entity category to which each target entity region belongs. The entity categories include people, pets, vehicles, and moving objects. The entity categories and spatial locations of all target entity regions within the same temporal video segment are structured and encoded to generate frame-level behavior vectors; The frame-level behavior vectors of all frames in the time-series video segment are input into a sequence aggregation model in chronological order to generate a segment-level behavior description of the time-series video segment. The segment-level behavior description includes entity interaction patterns and scene state transitions.

3. The method for detecting abnormal behavior in apartment-based video surveillance according to claim 2, characterized in that, The step of constructing a unified spatiotemporal correlation network based on the temporal proximity and spatial overlap relationships among all the time-series video segments includes: Calculate the time interval between any two of the aforementioned time-series video segments on the acquisition time axis; If the time interval is less than a preset time threshold, a time connection edge is established for the two time-series video segments in the spatiotemporal correlation network. Calculate the area of ​​the overlapping region between any two of the aforementioned time-series video segments in the video frame spatial coordinate system; If the area of ​​the overlapping region is greater than a preset spatial area threshold, then a spatial connection edge is established for the two time-series video segments in the spatiotemporal correlation network. Each of the time connection edges and the spatial connection edges is assigned a connection strength weight, which is dynamically calculated based on the length of the time interval or the size of the overlapping area. By using all the time-series video segments as nodes and all the time-connecting edges and the spatial-connecting edges as edges, the topology of the spatiotemporal network is constructed.

4. The method for detecting abnormal behavior in apartment-based video surveillance according to claim 3, characterized in that, The step of performing cross-time period behavior consistency association analysis on all the scene semantic descriptions based on the spatiotemporal correlation network to generate continuous behavior chains includes: Starting from the edge with the highest connection strength weight in the spatiotemporal correlation network, perform a depth-first traversal; During the traversal, the semantic similarity between the scene semantic description of the current node and the scene semantic description of the next node is calculated. If the semantic similarity exceeds the semantic similarity threshold, the two scene semantic descriptions are merged into a single behavioral subchain. Based on the connection strength weight of each edge in the spatiotemporal correlation network, the merging order of the behavioral subchains is prioritized and scheduled. After traversing all nodes in the spatiotemporal association network that meet the semantic similarity threshold, all generated behavioral sub-chains are connected end to end in chronological order to form a complete behavioral chain. The behavioral chain records the coherent behavioral sequence of the target entity in time and space.

5. The method for detecting abnormal behavior in apartment-based video surveillance according to claim 4, characterized in that, The step of performing pattern matching between the behavior chain and a preset abnormal behavior rule base to determine abnormal behavior events and mark their spatiotemporal boundaries includes: The behavioral chain is decomposed into a series of behavioral primitives arranged in chronological order; Each of the aforementioned behavioral primitives is compared one by one with the behavioral triggering patterns in the abnormal behavior rule base; If a behavior primitive matches a behavior triggering pattern, then the exception determination logic associated with the behavior triggering pattern is activated. The anomaly determination logic calculates an anomaly score based on the context information of the behavioral primitive in the behavioral chain; If the anomaly score exceeds the anomaly determination threshold, the corresponding time period and spatial region will be marked as an abnormal behavior event, and the start timestamp, end timestamp, and spatial bounding box coordinates of the abnormal behavior event will be recorded. At the same time, the behavior primitive that triggered this determination will be marked as the anomaly root node.

6. The method for detecting abnormal behavior in apartment-based video surveillance according to claim 5, characterized in that, The process of tracing the causes of the abnormal behavior events from multiple dimensions to generate an abnormal cause tracing diagram that includes direct and indirect causes includes: Starting from the abnormal root node, backtrack forward for a predetermined time length in the behavior chain; Extract all behavioral primitives belonging to the same entity as the abnormal root node within the backtracking time period as candidate trigger behaviors; Analyze the logical dependencies between each candidate trigger behavior and the abnormal root node, including time-triggered relationships, spatial guidance relationships, and state evolution relationships; Based on the strength of the logical dependency, assign a causal correlation value to each candidate trigger behavior; Candidate causal behaviors whose causal correlation values ​​exceed the correlation threshold are marked as direct causes; Further analysis of the precursor behaviors of the direct triggering behavior in the behavioral chain reveals that precursor behaviors strongly correlated with it are marked as indirect triggers. The abnormal root node, all the direct causes, and all the indirect causes are connected in chronological order and logical relationship to form the abnormal cause tracing diagram with causal flow.

7. The method for detecting abnormal behavior in apartment-based video surveillance according to claim 6, characterized in that, The step of formulating a targeted, tiered handling strategy based on the anomaly cause tracing diagram includes: Identify the behavioral type and location of all direct causes in the abnormality tracing diagram; For each of the aforementioned direct trigger behaviors, the corresponding basic action is invoked from the strategy template library; Based on the location of the direct cause, specific execution parameters are configured for each basic treatment action to form a primary treatment instruction; Analyze the transmission path from the indirect cause to the direct cause in the tracing diagram of the abnormal cause; For each of the aforementioned transmission pathways, a preventative intervention aimed at blocking the transmission is generated, forming a secondary treatment recommendation; All the primary handling instructions and secondary handling suggestions are arranged in order from direct to indirect handling to generate a set of hierarchical handling strategies.

8. The method for detecting abnormal behavior in apartment-based video surveillance according to claim 7, characterized in that, After executing the hierarchical processing strategy, strategy execution feedback data is collected, including: After executing the initial handling instruction, new surveillance video data is collected within the target monitoring area; The new surveillance video data is subjected to multi-level scene semantic parsing to generate a new scene semantic description; The new scene semantic description is compared with the behavior pattern corresponding to the abnormal root node to determine whether the abnormal behavior event is terminated. Record the response time from the execution of the instruction to the determination of termination for the abnormal behavior event; Monitor whether the same or similar indirect triggering behaviors recur within the spatiotemporal range targeted by the secondary treatment recommendations; The termination status of the abnormal behavior event, the response time, and the recurrence of the indirect triggering behavior are collectively encapsulated into the policy execution feedback data.

9. The method for detecting abnormal behavior in apartment-based video surveillance according to claim 8, characterized in that, The step of incrementally learning and dynamically optimizing the abnormal behavior rule base using the feedback data from the strategy execution includes: If the policy execution feedback data shows that the abnormal behavior event was successfully terminated and the response time is short, then the confidence of the behavior triggering mode that triggered this determination in the abnormal behavior rule base is increased. If the strategy execution feedback data shows that the abnormal behavior event has not been terminated or the response time is too long, then the judgment threshold of the relevant abnormal judgment logic in the abnormal behavior rule base is adjusted or the matching conditions of the behavior triggering mode are modified. If the strategy execution feedback data shows that the indirect triggering behavior has a high recurrence frequency, then add or strengthen the early warning rules for the indirect triggering behavior in the abnormal behavior rule base; The optimized abnormal behavior rule base is used to process the subsequently collected apartment surveillance video streams.

10. An apartment-based video surveillance abnormal behavior detection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the apartment-based video surveillance abnormal behavior detection method as described in any one of claims 1 to 9.