A computer vision-based monitoring anomaly early warning method and system
By establishing a continuous spatial relationship between the monitored object and the functional area in the monitoring scenario, a structured monitoring behavior chain is formed, which solves the problems of insufficient interpretability and process traceability of the monitoring behavior in the existing technology, and realizes efficient abnormal early warning and interpretable monitoring scheme.
Patent Information
- Application Number
- CN202611433720.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-11-27
Smart Images

Figure CN123182147A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of internet platforms and computer vision technology, specifically to a monitoring and early warning method and system based on computer vision. Background Technology
[0002] As abnormal behavior early warning technology in monitoring scenarios increasingly becomes an important research direction in the fields of intelligent security and health management, among existing monitoring methods, contact sensors rely on close-fitting wear or mattress pressure detection, which can provide a certain degree of vital signs and body position information. Non-contact visual solutions, on the other hand, use cameras to collect images and perform human body detection and tracking. Both methods have achieved the recognition of typical events such as falls, getting out of bed, and lingering to varying degrees. In the field of visual monitoring, existing solutions mainly rely on changes in the position of key points of the human skeleton or target detection boxes to determine behavior, and can respond to simple postures and sudden changes in position. At the same time, with the development of deep learning technology, behavior recognition models have made significant progress in the classification of specific actions, providing a good foundation for non-intrusive monitoring.
[0003] Chinese invention patent CN112053391B discloses a monitoring and early warning method, system, and storage medium based on dynamic three-dimensional models. The method is as follows: S1 Divide a complex scene into multiple regions; S2 Establish a static three-dimensional model for each region; S3 Form a dynamic three-dimensional model for each region; S4 Judge and identify abnormal events in each dynamic three-dimensional model; S5 Activate early warning and record the occurrence information of abnormal events; S6 Send the occurrence information of abnormal events to the monitoring server.
[0004] However, actual monitoring behavior often manifests as continuous spatial activity from the starting area to the target area through a migration process, accompanied by natural short pauses, minor directional adjustments, or partial reversals. Existing behavior discrimination mechanisms typically use posture or position at independent moments as the basis for judgment, making it difficult to integrate instantaneous observations into the complete activity process for understanding. It is also difficult to provide structured information such as which specific link in the behavior chain the anomaly occurred in, or what functional relationship was missing, resulting in a lack of sufficient interpretability and process traceability in early warning outputs. Furthermore, in monitoring scenarios, the same posture may correspond to completely different behavioral meanings in different functional areas. Simply relying on posture classification is insufficient to adapt to the semantic changes brought about by regional functional differences, which brings profound challenges to behavior understanding and anomaly judgment. Summary of the Invention
[0005] The purpose of this invention is to address the problems existing in the background technology by proposing a monitoring and early warning method and system based on computer vision.
[0006] The technical solution of this invention: a monitoring and anomaly early warning method based on computer vision, comprising the following specific implementation steps: S1. Acquire continuous video images of the monitored area, identify the monitored object and functional areas within the monitored area that have monitoring significance, establish continuous spatial relationships based on the relative position changes between the monitored object and each functional area, and record the establishment, release and change process of the spatial relationships to form data on the relationship between personnel and functional areas with time sequence. S2. Based on the order of establishment and termination of continuous functional relationships in the data on the relationship between personnel and functional areas, organize the continuous migration process of the monitored object from one functional area to another into a monitoring behavior chain, determine the initial functional relationship, migration functional relationship and target functional relationship in the monitoring behavior chain, and determine the current behavioral stage of the monitored object based on the changes in continuous relationships. S3. Continuously track the monitoring behavior chain in the initiation, migration or unclosed state, compare the actual formed functional relationship with the expected relationship in the monitoring behavior chain, identify the state of migration stagnation, migration direction reversal and the failure to establish the target functional relationship, and confirm the continuous behavior chain break based on whether the subsequent relationship is restored, forming a structured monitoring abnormal event. S4. Identify gaps in the behavioral chain based on abnormal events under structured monitoring, continuously track the recovery, maintenance, or expansion of the gaps, generate corresponding monitoring warnings based on the evolution of the gaps, and lift the corresponding warnings when the target functional relationship is re-established or a new functional relationship that can explain the current state is formed.
[0007] Preferably, in step S1, acquiring continuous video images of the monitored area and establishing data on the relationship between personnel and functional areas specifically includes: Acquire video images of the monitored area in a continuous time sequence, continuously identify and track the monitored objects in the continuous video images, and identify functional areas within the monitored area that have monitoring significance. The spatial relationship between the monitored object and the functional area is determined by the positional changes of the monitored object in continuous video images, and the establishment, termination and change of the spatial relationship are recorded according to the continuous video status to form personnel-functional area relationship data that can reflect the continuous changes in the relationship between the monitored object and different functional areas.
[0008] Preferably, in step S2, forming a monitoring behavior chain specifically includes: Based on the order of establishment and termination of different functional relationships in the data on the relationship between personnel and functional areas, the functional relationships formed continuously during the migration of the monitored object from the current functional area to the next functional area are determined, and the continuous functional relationships are organized into a monitoring behavior chain according to the order of occurrence. Based on the functional relationships that have been established with the monitored object, the initial functional relationship, the transitional functional relationship, and the target functional relationship that needs to be established in the monitoring behavior chain are determined. At the same time, the behavioral stage of the monitored object is continuously updated based on the changes in functional relationships in subsequent continuous video images.
[0009] Preferably, in step S3, continuous tracking of the monitoring behavior chain in the initiation, migration, or unclosed state is performed, specifically including: For a monitoring behavior chain that has been initiated but not yet completed, the target functional relationship that has not yet been completed is determined based on the currently established functional relationship, and the actual functional relationship formed by the monitored object in subsequent continuous video images is continuously compared with the target functional relationship and the expected relationship in the monitoring behavior chain. After the guardian terminates the current initial functional relationship, the changes in the relationship between the guardian and the target functional area are continuously observed. At the same time, the changes in the relationship between the guardian and the initial functional area, the functional areas during the migration process, and the target functional area are combined to determine whether the current behavior should continue to migrate according to the original guardianship behavior chain.
[0010] Preferably, in step S3, confirming the break in the persistent behavioral chain specifically includes: During the process of the monitored object migrating its functional area, identify the migration stagnation, migration direction reversal, or failure to establish the target functional relationship that occur in relation to the expected relationship of the monitored behavior chain, and continue to track the continuous changes in functional relationship after the occurrence of the abnormal state. When the monitored object moves back to the target functional area in the original migration direction and re-establishes the target functional relationship, the abnormal state is identified as the relationship recovery state. When the monitored object re-establishes the original initial functional relationship, the original behavioral chain ends. When the monitored object continues to fail to establish the target functional relationship and fails to form a new functional relationship that can explain the current state, the monitoring behavioral chain is confirmed to have been continuously broken.
[0011] Preferably, in step S3, the formation of structured monitoring abnormal events specifically includes: The monitoring behavior chain that has been confirmed to have a persistent break is associated with the corresponding abnormal state. The time information when the abnormal relationship is confirmed, the functional area where the monitored object is located, the behavioral stage when the abnormality occurs, the target functional relationship that has not yet been established or has been interrupted in the monitoring behavior chain, and the relationship recovery status after the abnormal state occurs are extracted. The information is organized according to the correspondence between abnormal events to form a structured monitoring abnormal event for subsequent behavior chain gap tracking and monitoring early warning processing.
[0012] Preferably, in step S4, determining the behavioral chain gap based on structured monitoring abnormal events specifically includes: Based on the monitoring behavior chain associated with the structured monitoring anomaly event, determine the functional relationships that were completed before the anomaly occurred and the functional relationships that were not completed after the anomaly occurred. The unfinished functional relationships after the anomaly are identified as the current behavioral chain gaps. The monitoring behavioral chains corresponding to the behavioral chain gaps, the anomaly occurrence area, the unfinished target functional relationships, the anomaly relationship confirmation time, and the relationship recovery status are associated to form early warning tracking objects for continuous monitoring and tracking.
[0013] Preferably, in step S4, continuously tracking the recovery, maintenance, or expansion of the behavioral chain gap specifically includes: After the early warning tracking object is formed, the continuous monitoring scene status after the abnormal event occurs is continuously acquired, and the target functional relationship corresponding to the gap in the behavior chain is used as the basis for subsequent tracking to observe the changes in the relationship between the monitored object and the target functional area of the original monitored behavior chain. When the monitored individual moves back to the target functional area, and the relationship between the individual and the target functional area is continuously established and re-aligns with the original migration direction, it is determined that the gap in the behavior chain is in a recovery state. When the target functional relationship has not been re-established, the monitored object is still in the original abnormal area or the original behavioral chain transition area, and no new functional relationship that can explain the current behavioral state has been formed, the behavioral chain gap is determined to be in a maintained state. When the target functional relationship remains unestablished, and the monitored individual moves further away from the original target functional area and forms a continuous relationship with other functional areas that do not belong to the current monitoring behavior chain, it is determined that the gap in the behavior chain is widening.
[0014] Preferably, in step S4, a corresponding monitoring and early warning is generated based on the evolution state of the behavioral chain gap, specifically including: When the target functional relationship shows a renewed trend of being established, and the subsequent migration direction of the monitored object is consistent with the original monitoring behavior chain again, the corresponding early warning tracking object will be identified as a relationship recovery observation state and the establishment of the target functional relationship will continue to be tracked. When the target functional relationship is not restored and the gap in the behavioral chain continues to exist, and the monitored object has not re-established the original initial functional relationship and has not formed a new functional relationship that can explain the current state, the corresponding continuous unclosed warning state is maintained. When the monitored individual continuously deviates from the original monitoring behavior chain and forms a continuous relationship with other functional areas, the behavior chain continuous deviation warning state is determined. When an abnormal relationship persists and the target functional relationship has not yet been established, the abnormal relationship is determined to be in a continuous warning state. In subsequent continuous monitoring scenarios, the target functional relationship of the original monitoring behavior chain is re-established, or a new functional relationship that can explain the current state is formed. At the same time, the corresponding warning is updated to the relationship recovery state and the corresponding warning is lifted. Simultaneously, the continuous warning tracking corresponding to the recovered abnormal behavior chain is terminated.
[0015] The technical solution of this invention: A monitoring anomaly early warning system based on computer vision, used to execute the aforementioned monitoring anomaly early warning method based on computer vision, comprising: The monitoring scene relationship construction module is used to acquire continuous video images of the monitoring area, identify the monitored objects and functional areas within the monitoring area that have monitoring significance, establish continuous spatial relationships based on the relative position changes between the monitored objects and each functional area, and record the establishment, dissolution and change process of spatial relationships to form data on the relationship between personnel and functional areas with time sequence. The monitoring behavior chain generation module is used to organize the continuous migration process of the monitored object from one functional area to another into a monitoring behavior chain according to the establishment and termination order of continuous functional relationships in the personnel and functional area relationship data, determine the initial functional relationship, migration functional relationship and target functional relationship, and determine the current behavior stage according to the changes in continuous relationships; The behavioral chain abnormality break confirmation module is used to continuously track the monitoring behavioral chain in the initiation, migration or unclosed state, compare the actual functional relationship with the expected relationship in the monitoring behavioral chain, identify the state of migration stagnation, migration direction reversal and target functional relationship not established, and confirm the continuous behavioral chain break and form a structured monitoring abnormal event based on the subsequent relationship recovery. The behavioral chain gap early warning closed-loop module is used to determine behavioral chain gaps based on structured monitoring abnormal events, continuously track the recovery, maintenance or expansion status of the behavioral chain gaps, form corresponding monitoring early warnings based on the gap evolution status, and release the corresponding early warnings when the target functional relationship is re-established or a new functional relationship that can explain the current state is formed.
[0016] Compared with the prior art, the above-mentioned technical solution of the present invention has the following beneficial technical effects: This invention designs a monitoring anomaly early warning method and system based on computer vision. By constructing a continuous spatial relationship quantity between personnel and functional areas, and filtering out instantaneous jitter by ensuring the consistency of relationship change direction, it effectively avoids false alarms generated during the action transition phase based on single-frame pose recognition. By organizing continuous relationship transfer into a monitoring behavior chain with initiation, transfer, and closure phases, each personnel activity has a clear starting point, transfer process, and target relationship, eliminating reliance on pose names for behavior judgment and thus eliminating the ambiguity caused by the meaning of the same pose in different functional areas. Through continuous tracking of unclosed behavior chains, it identifies anomalies... It is typically defined as the failure to establish a persistent target functional relationship or a functional reversal in the migration direction. Combined with relationship recovery analysis after an anomaly occurs, it significantly distinguishes between normal transient pauses and true behavioral chain breaks, reducing the probability of short-term pauses being misjudged as anomalies. Through behavioral chain gap tracking and a closed-loop early warning mechanism, the early warning is automatically lifted when the relationship is restored, and the corresponding early warning status is maintained when the anomaly persists or deviates, avoiding repeated alarms and redundant notifications, and improving the availability of the monitoring system output. This invention elevates anomaly judgment from instantaneous state matching to behavioral process integrity diagnosis, providing a structured, interpretable early warning solution with closed-loop management capabilities for monitoring scenarios. Attached Figure Description
[0017] Figure 1 This is a flowchart of a monitoring anomaly early warning method based on computer vision proposed in this invention; Figure 2 This is an architecture diagram of a monitoring and anomaly early warning system based on computer vision proposed in this invention. Detailed Implementation
[0018] Example 1, as Figure 1 As shown, the present invention proposes a monitoring anomaly early warning method based on computer vision, which includes the following specific implementation steps: S1. Acquire continuous video of the monitored area using fixed visual acquisition equipment. First, identify scene objects such as beds, chairs, handrails, doorways, and passageways, and divide them into functional areas with monitoring functions to establish scene functional benchmarks. Then, determine the spatial reference points of the monitoring personnel, calculate the continuous spatial relationship between the personnel and each functional area and its direction of change, and determine the continuity of relationship changes through time windows. Further integrate personnel positions, spatial relationships, relationship changes, and transition nodes to form a monitoring scene state sequence arranged continuously in time. S2. Based on the state sequence of the monitoring scenario formed in step S1, extract the continuous relationship migration segments between personnel and functional areas, determine the starting area, target area and migration direction of the behavior in combination with the connection relationship of functional areas, and divide the behavior initiation, migration and closure stages according to the sequence of the original functional relationship termination, transition relationship establishment and target relationship formation. Further associate each behavior stage according to the temporal continuity and spatial functional continuity to form a monitoring behavior chain with initiation relationship, migration process, target relationship and closure state. S3. Based on the monitoring behavior chain formed in step S2, continuously track behaviors in the initiation, migration and unclosed states. Using the initial functional relationship, migration relationship and target functional relationship in the behavior chain as references, compare the relationship changes between personnel and related functional areas in continuous states, identify abnormal candidate states such as migration stagnation, direction reversal and target relationship loss, and further observe the relationship recovery after the candidate states. Distinguish between normal transient deviation, behavior return and continuous behavior chain break, and finally form a structured monitoring abnormal event that includes abnormal time, abnormal area, abnormal stage, unfinished target relationship and recovery state. S4. Receive the structured monitoring anomaly event generated in step S3. Determine the gap in the behavior chain based on the original behavior chain, the area where the anomaly occurred, the stage of the anomaly behavior, and the uncompleted target functional relationship corresponding to the anomaly event. Continuously track the changes in the relationship between personnel and the target functional area after the anomaly occurs, and determine whether the gap in the behavior chain is in a state of recovery, maintenance, or further deviation. Based on this, determine the early warning status such as relationship recovery observation, continued non-closure, continued deviation of the behavior chain, and continued abnormal relationship. Further associate the early warning status with the anomaly area and behavior stage to form a monitoring early warning result, and continuously verify whether the target functional relationship has been re-established. When the relationship is restored, the corresponding early warning is lifted. When the anomaly continues or further deviates, the corresponding early warning status is maintained, forming a closed-loop monitoring process of anomaly confirmation, early warning tracking, status change, and recovery lifting.
[0019] In a specific embodiment, step S1 transforms the personnel, scene objects, and functional areas in the continuous monitoring video into a monitoring scene state with temporal continuity. The change and continuity of the relationship between personnel and scene objects with clear monitoring functions serve as the basis for describing the scene state. The specific implementation process is as follows: S11. A fixed visual acquisition device is set up in the monitoring area to continuously acquire video data of the monitoring area, and adjacent video frames are arranged according to a unified video sampling time sequence to form a continuous monitoring video sequence; the monitoring area may include the area where the bed is located, the area where the chair is located, the area where people pass through, and areas such as doorways, handrails and the ground that have a stable spatial relationship with people's daily activities. For fixed monitoring areas, scene objects with relatively stable positions are identified in continuous video, and corresponding functional areas are divided according to their actual role in monitoring activities; the scene objects include at least fixed objects such as beds, chairs, handrails, and doorways, and the functional areas include at least the bed surface area, the bedside activity area, the chair area, the passage area, and the ground area; For the same monitoring scenario, if the installation position of the visual acquisition device does not change, the positional relationship of the scene objects remains relatively stable. The spatial position of each scene object is determined in the initial scene establishment stage and used as a reference for subsequent judgment of the spatial relationship of personnel. Furthermore, to avoid determining whether a person is in a certain functional area solely based on the bounding rectangle of the scene object, this embodiment establishes the corresponding functional area boundary based on the actual area of the scene object that can be used by the person. For example, for a bed, not only is the visual recognition area of the bed determined, but the area on the bed surface where people actually lie down is also defined as the bed surface functional area, and the area beside the bed where people can perform activities such as sitting up and standing up is defined as the bedside activity area; for a chair, the seat area and the area around the chair where people can get up and leave are distinguished. Output a fixed monitoring scene functional baseline, which includes the spatial location of each scene object, its corresponding functional area, and the spatial connection relationship between the functional areas; S12. Based on the established functional benchmarks for the monitoring scenario, identify and continuously locate the monitoring personnel in continuous videos; For each video moment t, the spatial position of the monitor is determined, and a reference point that can stably represent the position of the monitor is determined based on the human body area of the monitor in the image. In this embodiment, the center position of the lower part of the human body area is preferably used as the spatial reference point of the monitor, so that it can better reflect the actual ground position of the monitor than the human head or the center of the human body area, thereby reducing the spatial position offset caused by the monitor bending over, sitting down and other actions. Let the spatial reference point for the personnel at time t be: ; in, The spatial reference point for the monitoring personnel at time t; This indicates the lateral position of the spatial reference point in the video image coordinate system; The spatial reference point represents the vertical position in the video image coordinate system; t represents the current video moment, which is determined by the sampling timing of consecutive video frames; Furthermore, the spatial reference point of the monitoring personnel is mapped to the functional areas established in step S11 to determine the spatial relationship between the current personnel and each functional area. In order to make this relationship reflect the personnel's activity process, this embodiment uses the regional affiliation relationship and the proximity relationship to jointly describe the personnel's status. For the j-th functional area, the relationship between personnel and this functional area is defined as follows: ; In the formula, This represents the spatial relationship between a person at time t and the j-th functional area. The spatial extent of the j-th functional region is determined by the functional region boundary in step S11. Indicates spatial reference point for people To functional area The shortest distance to the boundary; This represents the relational influence distance of the j-th functional area, used to define the spatial range outside the functional area that can still be considered to have a proximity relationship with that area; It should be noted that the above-mentioned relationship quantities are not used to directly determine whether a person is abnormal, but rather to preserve the continuous process of a person approaching, entering, and leaving one functional area from another. When a person is inside the bed surface area, a stable relationship is formed with the bed surface area. When a person moves from the bed surface to the side area of the bed, the relationship with the bed surface area gradually weakens, while the relationship with the side area of the bed gradually strengthens. When a person further enters the passage area, the relationship with the passage area gradually strengthens. It needs to be further explained that, The dimensions of the corresponding functional areas are determined based on their actual spatial scale; for example, the bedside activity area can be determined based on the actual range of movement required to sit up, stand, and turn around; the doorway area is determined based on the actual space occupied by people passing through the doorway; different functional areas can have different dimensions. To adapt to spatial differences in actual monitoring scenarios; Output the set of spatial relationships between people and functional areas for each video moment; S13. Since a single video frame can only reflect the location of a person at a certain moment and cannot distinguish between normal, transient posture changes and spatial migrations with behavioral significance, after obtaining the set of spatial relationships between people and functional areas in step S12, the relationship changes at consecutive moments are correlated to form a continuous monitoring scene state. Specifically, for adjacent moments t-1 and t, the relationship quantities between people and each functional area are obtained, and the relationship changes are calculated: ; In the formula, This represents the change in the relationship between personnel and the j-th functional area at adjacent time points; This represents the spatial relationship between the personnel at the previous time t-1 and the same functional area; when When the value remains positive, it indicates that personnel are establishing relationships with the corresponding functional areas; when... When the value is consistently negative, it indicates that the person is leaving the corresponding functional area; when the relationship value remains relatively stable over consecutive moments, it indicates that a continuous spatial relationship has been formed between the person and the functional area. To avoid frequent changes in relationship status caused by image detection jitter, slight body movement, or brief occlusion, this embodiment does not rely on a single [person / entity / etc.]. Instead of directly changing the scene state, it operates within a continuous time window. Does the direction of change in the internal observation relationship remain consistent? For the j-th functional area, in the window... The degree of consistency in the direction of change of internal computational relationships: ; In the formula, Indicates time window The degree of consistency in the direction of change of the relationship between internal personnel and the j-th functional area; This represents a continuous video time window based on the current time t, determined by the video sampling frequency and the actual duration of the monitoring behavior; This indicates the number of video moments contained within the time window; This is an indicator function that takes the value 1 when the condition inside the parentheses is true, and 0 otherwise. Indicates the direction of change; This represents the average change in the relationship of the j-th functional area within the time window; It should be noted that, Used to confirm whether the relationship change is continuous; for example, when a person moves from the bed surface to the bed side, the relationship with the bed surface continuously weakens, while the relationship with the bed side area continuously strengthens, then the direction of the relationship change is highly consistent; if the relationship quantity changes briefly only due to detection jitter, the direction of change usually cannot remain consistent, and therefore will not immediately change the scene state. Based on the direction of change and continuity of the relationship, the state of the person in the continuous video is converted into a monitoring scene state with scene meaning; for example: the person maintains a stable relationship with the bed surface area, corresponding to the bed-lying scene state; the relationship between the person and the bed surface weakens, while the relationship with the side of the bed strengthens, corresponding to the moving from bed scene state; the relationship between the person and the seat weakens and a relationship is established with the passage area, corresponding to the getting up and moving scene state; the person forms a continuous relationship with the passage area, corresponding to the normal passage scene state; the person forms a continuous relationship with the ground area and does not re-establish a standing or passage relationship, then it is retained as an abnormal candidate scene state; It should be further explained that in this embodiment, the abnormality is not directly determined at this time, but the continuous changes between personnel and functional areas are preserved, and it is determined whether the relationship change can complete the corresponding behavior process after the subsequent behavior chain is established. Output a sequence of monitoring scene states arranged continuously over time, wherein each scene state includes at least the spatial location of personnel, the relationship between personnel and functional areas, the direction of relationship change, and the continuity of relationship change. S14. Based on the formed continuous monitoring scene states, the scene states with adjacent temporal relationships are further organized, and multiple video moments that continuously maintain the same scene relationship are associated. At the same time, the moments when the scene relationship changes significantly are retained as state transition nodes, thereby forming a monitoring scene state sequence for subsequent behavior chain recognition. Specifically, when the relationship between a person and the same functional area remains stable within a continuous video period and no relationship change occurs that could alter the meaning of the current scene, the continuous period is grouped into a continuous scene state; when a person migrates from one functional area to another with a continuous direction, the state transition process is preserved. For example, when a person moves from the bed surface area to the bed side area, not only is the result of eventually entering the bed side area recorded, but also the transition process of the bed surface relationship gradually weakening and the bed side relationship gradually strengthening is preserved; The resulting monitoring scenario can be represented as follows: ; In the formula, This indicates the state of the monitoring scenario at time t; This represents the set of spatial relationships between personnel and various functional areas at time t. This represents the set of changes in spatial relationships relative to the previous moment. This represents the set of consistent changes in correspondence within a continuous time window; Further, following the chronological order, we obtain: ; In the formula, S represents the state sequence of the monitoring scenario; This indicates the status of a continuous monitoring scene arranged in chronological order of video sampling time. The monitoring scenario state sequence uniformly preserves the personnel location, functional area relationship, relationship change direction, and change continuity.
[0020] In a specific embodiment, step S2, based on the monitoring scenario state sequence output in step S1, further correlates the continuous relationship changes that have occurred between personnel and different functional areas. It organizes continuous states with clear initial relationships, migration processes, and target relationships into a monitoring behavior chain, and determines the behavior initiation stage, behavior migration stage, and behavior closure stage according to the order of the termination of the original functional relationship, the establishment of the transitional relationship, and the formation of the target functional relationship. The specific implementation process is as follows: S21. Based on the monitoring scene state sequence S output in step S1, continuously associate the video time sequence corresponding to each scene state, compare the spatial relationship between personnel and functional areas time by time, and identify the relationship segments that change significantly in continuous time. Since an actual monitoring behavior usually manifests as personnel gradually leaving one functional area and moving to another functional area, this embodiment focuses on finding state segments where "the original functional relationship weakens" and "the new functional relationship strengthens" occur simultaneously and have temporal continuity. Specifically, the relationship between personnel and functional areas at adjacent moments and the direction of their change are read from the state sequence of the monitoring scenario; when personnel and functional areas... The relationship continues to weaken, while the relationship with adjacent functional areas As the relationship continues to strengthen, it will... Towards The continuous relationship changes are used as candidate relationship migration segments; the candidate relationship migration segments include at least the time position where the relationship begins to change, the functional areas involved in the relationship change process, and the time position where the relationship change ends. For example, a person is initially in the bed surface functional area, maintaining a stable spatial relationship with the bed surface; as the person begins to sit up and moves towards the bedside, the relationship with the bed surface gradually weakens, while the relationship with the activity area beside the bed gradually strengthens; the continuous process of "de-establishment of bed surface relationship - establishment of bedside relationship" is extracted as a relationship migration segment; similarly, when a person gets up from the seating area and gradually moves towards the passage area, the continuous process of weakening seating relationship, strengthening relationship in the moving area, and gradually establishing relationship in the passage area is taken as another relationship migration segment; To avoid the incorrect activation of relation migration segments due to slight human body movement, video detection position fluctuations, or brief occlusions, this embodiment directly utilizes the relation change consistency calculated in step S1. The continuity of candidate relationship changes is confirmed; when a relationship change occurs only in a single or a small number of video states and the original relationship is subsequently restored, a new relationship migration segment is not formed; when the direction of relationship change remains consistent in continuous states and the original relationship and the new relationship show corresponding change trends, it is considered a valid relationship migration segment. Furthermore, for each valid relationship migration segment, a start node and an end node are determined; the state node where personnel begin to leave the original functional area and the original functional relationship begins to weaken continuously is taken as the migration start node; the state node where personnel establish a stable relationship with the new functional area, or where the direction of personnel relationship change is reversed and they return to the original functional area is taken as the end node of the current migration segment. S22. After obtaining the continuous functional relationship migration segment, the monitoring scenario functional benchmark established in step S1 is further invoked to match the spatial connection relationship of the functional areas involved in the migration segment, thereby determining whether the continuous activity has a clear meaning of monitoring behavior. Specifically, for each relationship migration segment, first identify the functional areas that the person continuously maintained before the relationship migration began, and determine these functional areas as the behavior initiation areas. Subsequently, functional areas where relationships among personnel continuously strengthen during the migration process and are likely to eventually form stable relationships were identified, and these functional areas were designated as candidate target areas. Simultaneously, the connection relationship of the functional areas in step S1 is used to determine... and Does it belong to an adjacent functional area with actual personnel activity connections? By using functional area connection relationships for constraints, the monitoring personnel may make various short-distance movements in the actual room. If the movement is based solely on the personnel's trajectory from one area to another, a large number of movements without actual behavioral significance may be identified as independent behaviors. For example, if a person moves a few steps left and right by the bedside, although the spatial position changes, it is still within the range of activities by the bedside and cannot be used to form a new behavior of leaving the bed. This embodiment requires that there be a pre-established functional connection between the starting area and the target area, and that the actual direction of the personnel's relationship changes matches this connection in order to form a behavior candidate. For example, there is a direct transition between the functional area on the bed surface and the activity area on the side of the bed, so "bed surface → bedside" can be considered an effective behavioral migration; there is also a normal migration relationship between the activity area on the side of the bed and the passage area after leaving the bed, so "bedside → passage area" can continue to form a subsequent behavioral relationship; however, if a person only briefly shifts from the bedside area to an area away from the normal passage direction, and this area does not have a clear functional connection with the current behavior, then this shift will not be considered a new behavior. Furthermore, for migration segments that conform to functional connection relationships, the sequential changes in the relationships between each functional area are arranged to form a behavioral relationship sequence; the behavioral relationship sequence includes at least: initial functional relationship stabilization → initial relationship termination → transitional functional relationship establishment → target functional relationship establishment; Among them, "Initial relationship termination" indicates that the person has clearly left the original functional object or functional area; "Transitional functional relationship establishment" indicates that the person is completing spatial migration; "Target relationship establishment" indicates that the person has entered the subsequent functional area corresponding to the current behavior; For example, when people move out of bed, the following can occur: stable bed surface relationship → weakened bed surface relationship → strengthened bedside relationship → stable bedside relationship; As people continue to move into the passage area, the following further development occurs: the bedside relationship is dissolved → the passage relationship is strengthened → the passage relationship is stabilized; It should be noted that this embodiment does not name the behavior based on the name of the human posture; for example, it does not directly label a certain state as "standing action" or "sitting up action", but determines the spatial process of the behavior based on the change in the relationship between the person and the functional area; this can avoid the problem that the same posture has different meanings in different scenarios; for example, a person standing on the side of the bed may mean that they have just gotten up, or it may mean that they are preparing to return to the bed; only by combining the relationship between the functional areas before and after can the actual role of the state in the current behavior be determined. The final output includes the starting region, target region, transition region, migration direction, and functional relationship sequence of the behavior. S23. After determining the starting area, target area, and direction of relationship migration, further analyze the continuous state within the relationship migration segment, and divide a continuous human activity into the behavior initiation stage, behavior migration stage, and behavior closure stage. The behavior initiation phase is determined when a person maintains a relatively stable relationship with the initial functional area before the behavior occurs, and then the relationship begins to weaken continuously while the relationship with the adjacent transition area begins to strengthen. The corresponding state transition node is then determined as the behavior initiation node. This node indicates that the person has actively changed the original scene relationship and the current activity no longer belongs to the original stable state. For example, if a person is initially in the bed surface area and maintaining a bed-lying relationship, when the person begins to move towards the edge of the bed, the bed surface relationship begins to weaken and the bed-side relationship begins to strengthen. At this point, it is determined that the behavior of getting out of bed has been initiated. It should be noted that at this point, it is not required that the person has completely left the bed surface or is standing up, because the basis for determining the initiation of the behavior is that the original functional relationship has begun to undergo a change in a continuous direction. Entering the behavior migration stage, in which the person has begun to leave the original functional area, but has not yet fully established the target functional relationship, it is necessary to continuously record the functional areas the person passes through and the changes in their relationships. For normal behavior, the person usually migrates towards the target area gradually along the functional area connection relationship corresponding to the current behavior; for example, when the person moves from the bed surface to the bed side, the bed surface relationship continuously decreases and the bed side relationship continuously increases; when the person moves from the bed side to the passage area, the bed side relationship gradually dissolves and the passage relationship gradually establishes. Once personnel have entered the target functional area, the target relationship has reached a stable state, and the initial functional relationship has been dissolved, the behavior is considered to have entered the closure phase. Here, "closure" requires at least two relational conditions to be met simultaneously: Condition 1: The original relationship between personnel and the initial functional area has been severed or significantly reduced to the point where it no longer belongs to the original stable state; Condition 2: A continuous and stable spatial relationship has been established between personnel and the target functional area; By changing the dual relationship described above, we can avoid mistaking a person's brief passage through the edge of the target area for the completion of an action; To further illustrate the process of personnel leaving their original functional areas, a behavioral migration progress is established based on the initial area relationship quantities: ; In the formula, This indicates the progress of the behavior at time t; This indicates the personnel and initial functional area before the behavior is initiated. Reference relation quantity when maintaining a stable relationship; This represents the actual relationship between the personnel at time t and the initial functional area. This represents the relation quantity corresponding to the node that initiates the functional relationship termination; Among them, the and All of these originate from the actual relationship change process formed in step S1; Determined based on the continuous stable state prior to the initiation of the behavior; Determined based on the actual relationship termination node in the relationship migration segment; It should be noted that, It is mainly used to describe the degree of personnel's detachment from the initial functional area. When personnel still maintain the original functional relationship, the migration progress changes little; when personnel begin to continuously detach from the original area, the migration progress changes continuously; when the initial relationship reaches the decoupling state, it indicates that the personnel have completed the detachment from the original functional area. It should be further clarified that, in actual practice, a fixed [method / condition] is not used. Instead of using numerical values as a uniform hard threshold for all guardianship behaviors, the behavioral stage is determined in conjunction with the actual establishment of the target functional relationship. This results in three consecutive stages: Behavioral initiation phase: Existing functional relationships begin to dissolve continuously, and a trend emerges to establish new target relationships; Behavioral migration phase: The original functional relationships continue to dissolve, and people migrate spatially according to the connection direction of functional areas; Behavioral closure stage: The original functional relationship has been dissolved, and a stable relationship has been established with the target functional area; The final output is a sequence of behavioral stages based on time location and spatial relationships; S24. After obtaining the behavior initiation phase, behavior migration phase, and behavior closure phase, further associate the behavior phases belonging to the same continuous personnel activity according to the time sequence and functional area connection relationship to form a complete monitoring behavior chain; specifically, for the behavior migration phase of the current behavior, if the personnel subsequently enter the functional area that matches the current behavior goal and establish a continuous and stable relationship, then the current behavior is marked as closed, and its complete starting area, migration process, and target area information are retained; For example: bed surface stabilization → detachment from bed surface → bedside migration → establishment of bedside relationship can form a complete chain of initial behavior after leaving the bed; If the person continues to move from the bedside to the passage area, and the relationship between the bedside and the passage area is gradually dissolved while the relationship between the passage area and the passage area is gradually established, then the subsequent migration will continue to be associated with the previous behavior, forming a continuous behavioral chain of: bed surface → bedside → passage area; The association satisfies both spatial continuity and functional continuity, that is, the target area of the previous stage should be able to serve as a reasonable starting area for the next stage, and there should be no obvious jumps in relationships between the two stages that are unrelated to the current behavior. For example, if a person moves from the bed surface to the side of the bed and then returns to the bed surface, the previous movement from the bed cannot be associated with a complete bed-leaving behavior. Instead, the original behavior chain should be terminated, and subsequent behaviors should be re-determined based on the new relationship changes. Furthermore, the behavioral state of each behavioral chain is recorded, and the k-th guardianship behavioral chain is defined as follows: ; In the formula, This represents the k-th guardianship behavior chain; Indicates the functional area where the behavior begins; Indicates the time position corresponding to the behavior initiation node; This indicates one or more transitional functional areas traversed during the behavior transfer process; Indicates the functional area representing the behavioral target; This indicates the time position corresponding to the node where the target relationship is established; Indicates the current state of the action chain; It should be noted that, It includes at least four states: "starting", "migration in progress", "closed", and "not closed". It is important to note that "not closed" is not the same as "abnormal". For example, when a person gets up from the bed and moves towards the passage area, there is a transitional phase in the behavioral chain that is not yet closed after they leave the bed and before they enter the passage area. At this time, it can only be marked as "migration" and cannot be immediately judged as abnormal. Only when personnel have completed the initial functional relationship termination but continue to be unable to form the target functional relationship, or when the behavioral chain undergoes spatial migration inconsistent with the functional area connection relationship, will the "unclosed" state of the behavioral chain be used as the input for further abnormal chain break analysis in step S3. Therefore, the final output is a set of guardianship behavior chains with a complete structure.
[0021] In a specific embodiment, step S3, based on the monitoring behavior chain set output in step S2, continuously tracks behavior chains in the initiation, migration, and unclosed states. It uses the termination of initial relationships, the trend of establishing target relationships, and changes in transition regions that have already occurred in the behavior chains as reference processes for the current behavior. Furthermore, it compares the consistency between actual relationship changes and the predetermined migration direction of the behavior chains to identify whether the behavior chains have experienced migration stagnation, direction reversal, missing target relationships, or abnormal spatial relationship establishment. It also distinguishes between normal transient behaviors and persistent abnormal behaviors based on the relationship recovery status after the abnormal state occurs, ultimately forming a monitoring abnormal event that includes the location of the abnormality, the stage of the abnormality, the type of abnormality, and the relationship recovery status. The specific implementation process is as follows: S31. Read the set of monitoring behavior chains output in step S2, check the current status of each behavior chain, and filter the behavior chains in the "starting", "migration" or "unclosed" state as the current behavior chains to be analyzed; for behavior chains that have entered the "closed" state, since the behavior has completed the initial functional relationship removal, migration process and target functional relationship establishment, its corresponding behavior has formed a complete closed loop, so it is no longer used as the main analysis object of the current abnormal chain break, but is retained as a completed historical behavior state; For a behavior chain that is not closed, based on the starting functional area, transitional functional area, target functional area and the current stage of the behavior that have been output in step S2, determine the last functional relationship transformation that the current behavior has not yet completed. For example, in a behavioral chain that develops from the bed surface area to the side activity area and then to the passage area, after a person has left the bed surface and entered the side area, the current relationship to be completed is not to re-determine whether the person has "left the bed", but to determine whether the person can continue to establish a new functional relationship from the side area to the passage area according to the established behavioral chain. Therefore, in this small step, starting from the k-th behavior chain... Extract the starting functional area corresponding to the current stage. and target functional areas ;in, This indicates the functional area where personnel are currently leaving, have partially left, or have just completed the termination of their relationship. This indicates the target functional areas that personnel should establish next, based on the current behavioral chain sequence. At the same time, the current personnel and... Spatial relationship quantity between and with The spatial relationship between them is determined and mapped to the behavioral stages identified in step S2; thus forming a reference for the uncompleted relationships in the current behavioral chain. For example, in a behavioral chain of "bed surface → bedside", when a person is still in the bed surface area and begins to move, the current starting relationship is the bed surface relationship and the target relationship is the bedside relationship; when the person has entered the bedside area and is preparing to continue moving to the passage area, the previous "bed surface → bedside" relationship has been completed, and the new relationship to be completed becomes "bedside → passage area". Furthermore, the relationship changes that have occurred in the current behavior chain are preserved, including the node where the initial relationship is terminated, the node where the target relationship is established, and the current state node; even if the current behavior has not been completed, it is possible to clearly know which part has been completed and which part has not been completed by the personnel. S32. After establishing the reference for the uncompleted relationship of the current behavior chain, continuously compare the personnel-functional area relationship in the subsequent continuous video states of the behavior chain to determine whether the actual changes in personnel relationships still conform to the migration direction determined by the current behavior chain. Since normal behavior does not require every video frame to maintain completely consistent spatial changes, this embodiment focuses on analyzing the direction of relational changes in continuous states and their corresponding relationships before and after. Specifically, for the current starting functional area If the relationship between personnel and the target functional area continues to weaken, If the relationship between them continues to strengthen, it means that people are still migrating in the predetermined direction of the behavior chain. At this time, the current behavior chain is maintained and no abnormal candidates are formed. If people have already begun to leave But with If the relationship between the two states does not continue to strengthen but remains unchanged in the continuous state for a long time, it indicates that the personnel may be temporarily stuck in the migration process. This state is first saved as a candidate state of migration stagnation and is not immediately judged as abnormal. If the person has clearly left Subsequently, it was strengthened again with Spatial relationships, and simultaneously with If the spatial relationship continues to weaken, it indicates that the actual direction of movement of the personnel has been reversed, and this state is taken as a candidate state for reversal of migration direction. If the personnel have been released Relationship, but not to If a person begins to establish a clear relationship with a functional area that does not belong to the current behavior chain, it indicates that the person has deviated from the original behavior chain, and this state should be regarded as the target relationship deviation candidate state. To provide a unified description of the aforementioned relationship changes, this embodiment uses the spatial relationship quantities obtained in step S1 to calculate the relationship migration differences between adjacent time points: ; In the formula, This indicates the difference in the relationship between the current moment and the previous moment, as people move from the current starting area and approach the target area; Indicates the time t of the personnel and the current starting functional area. Spatial relation quantities; Indicates the relationship between the personnel at the previous moment and the current starting functional area. Spatial relation quantities; Indicates the relationship between personnel and target functional areas at time t. Spatial relation quantities; Indicates the relationship between personnel and target functional areas at the previous moment. Spatial relation quantities; When personnel are normal Towards During migration, It will gradually decrease, and The relationship will gradually increase, therefore the changes in the two types of relationships show a corresponding trend; when people return... When the former strengthens again, the latter weakens; when people stay in the middle area, the magnitude of change in both decreases. In actual implementation, Instead of using a single video frame for judgment, the judgment is made by combining the consistency of relationship changes and continuous states already established in step S1; when When only a brief change occurs, and the original migration direction is subsequently restored, only the relationship deviation record is retained; when An abnormal candidate state is formed only when it continuously exhibits a trend of change that is inconsistent with the current behavior chain in a continuous state. Meanwhile, if the target functional area is not a single spatial area, it can be processed according to the target functional area relationship already formed in step S2, without the need to reconstruct a new target area. The final output includes behavioral chain states such as normal migration, stagnant migration, reversed direction, and deviation from the target relationship, with the latter three categories only serving as abnormal candidate states. S33. After determining the abnormal candidate state in step S32, do not immediately generate an alarm, but continue to read the subsequent continuous scene states and observe whether the relationship between the personnel and the current starting area, target area and related functional areas is restored. Because the normal behavior of caregivers may involve brief pauses and adjustments in direction; for example, when a person gets up from bed, they may pause briefly at the bedside or readjust their body position after getting up; when a person gets up from a chair, they may also briefly lean against the chair; therefore, if an abnormal judgment is made solely based on "the target relationship was not established immediately", a large number of normal behaviors will be mistakenly identified as abnormal. Therefore, after an abnormal candidate state is formed, its subsequent consecutive scene states are used as the relationship recovery observation process: Determine whether the original migration direction has been restored. If the relationship between the person and the current starting area continues to decrease, while the relationship with the target area is strengthened again, and the subsequent state continues to develop according to the functional area connection relationship of the original behavior chain, it indicates that the aforementioned deviation is a transient change in normal activities. At this time, cancel the abnormal candidate state and restore the normal tracking of the current behavior chain. Determine whether the original behavior has returned. If the relationship between the person and the target area continues to weaken, while the relationship with the starting area strengthens again and eventually the initial functional relationship is re-established, it means that the person has returned to the original functional area. At this time, the return action is not directly regarded as an anomaly. Instead, the original unclosed behavior chain is ended, and the newly formed stable starting relationship is used as the new starting point for behavior. The subsequent behavior chain is then handed over to step S2. The relationship is then reassessed to determine whether it remains unrecovered. If the person has clearly terminated the initial functional relationship, but the target relationship has not been established, and the person remains between the initial and target areas or enters a spatial area that does not match the current behavioral chain, and the original migration direction has not been restored, then the behavioral chain is determined to be in a state of continuous unrecoveredness. To ensure that the recovery judgment has clear temporal and spatial basis, this embodiment uses continuous state observation. The observation process starts from the moment the abnormal candidate state is generated and ends when any of the following conditions are met: Scenario 1: Personnel re-migrate to the target functional area following the original behavioral chain direction; Scenario 2: Personnel re-establish the original initial functional relationships; Scenario 3: People establish new relationships that are different from the original behavioral chain but have clear functional significance; Scenario 4: Individuals remain in a relationship state that cannot be explained by the current behavioral chain; Among them, Case 1 corresponds to normal recovery, Case 2 corresponds to behavior reversal, Case 3 corresponds to the end of the original behavior chain and the entry into a new behavior process, and Case 4 forms a candidate for continuous behavior chain break. Output the recovery results of abnormal candidate states, including four categories of results: "Restore the original migration direction", "Return to the original functional relationship", "Form a new behavioral relationship" and "Continue to be unrecovered"; S34. After completing the relationship recovery analysis, confirm the abnormal events of the behavior chains that are still in a state of continuous unrecovery, and record the key relationship information in the process of the abnormality in a structured manner. For candidate states that have resumed their original migration direction, remove them from the abnormal candidate set and continue to track the original behavioral chain; for example, if a person gets up and pauses briefly before continuing to move from the bedside to the passage area, the previous brief pause is explained by the subsequent normal relationship migration and does not constitute an abnormal event. For behaviors that return to the original starting area, the original unclosed behavior chain ends, and the result of "returning to the original relationship" is retained; for example, if a person leaves the bed and then returns to the bed and re-establishes a stable relationship with the bed, it indicates that the original bed-leaving behavior was not completed, but this incompleteness itself cannot be directly regarded as an anomaly, but should be reinterpreted by subsequent behaviors. For persistent and unrecovered behavioral chains, further spatial and behavioral information at the time of the abnormal event is extracted; specifically including: the original starting area of the behavioral chain, the functional relationships that have been terminated, the target relationships that have not yet been established, the area where the personnel were located when the abnormality occurred, the start time of the abnormality candidate, the time when the relationship break was confirmed, and the relationship recovery status after the break. For example, in the continuous process of: bed surface relationship dissolution → bedside relationship establishment → passage relationship not established → personnel continuously in abnormal association area, it can be confirmed that the original behavioral chain was broken in the migration stage of "bedside → passage area". At this time, it is not necessary to re-judge the personnel posture or re-analyze the human trajectory. Instead, it is possible to directly judge the incomplete target relationship based on the already formed behavioral chain and further determine the spatial location where the break occurred. Similarly, for the following sequence: dissolution of seat relationship → commencement of getting up and moving → failure to establish target access relationship → formation of stable relationship between personnel and abnormal ground area, a corresponding behavioral chain break event can be formed. The confirmed abnormal event is represented as follows: ; In the formula, This represents the kth confirmed abnormal monitoring event; Indicates the time and location at which the break in the behavioral chain was confirmed; Indicates the spatial area where the personnel were located when the anomaly was confirmed; This indicates the target functional relationship that has not been established or has been interrupted in the original behavioral chain; This represents the final state obtained after relational recovery analysis following the occurrence of an anomaly. in, Used to distinguish whether anomaly candidates have been resolved by subsequent relationship changes; for finally confirmed persistent anomalies, This indicates that the status has not been restored. For candidate states that have been restored, no corresponding confirmation exception event is generated, but the restoration result is retained in the behavior history. Furthermore, the occurrence stage of the abnormal event is recorded so that subsequent step S4 not only knows that "an abnormality has occurred", but also knows which specific stage of the behavior chain the abnormality occurred in; for example, the abnormality can be divided into the abnormality of the initial relationship termination stage, the abnormality of the migration stage chain breakage, the abnormality of the target relationship not being established, and the abnormality of the closure relationship being terminated again. Finally, output a set of abnormal monitoring events.
[0022] In a specific embodiment, step S4, based on the structured monitoring anomaly output in step S3, extracts the original behavioral chain, anomaly occurrence stage, missing target functional relationship, spatial region of the anomaly, and relationship recovery status corresponding to the anomaly event, and continuously tracks the gap in the behavioral chain where the anomaly event is currently located; determines the current development status of the anomaly event based on whether the anomaly relationship continues, whether the unfinished target relationship deviates further, and whether personnel have re-formed new effective functional relationships, and forms a corresponding early warning status according to the persistence of the behavioral chain gap and whether it has a recovery trend; further, determines the early warning response object and response method based on the functional connection between the anomaly occurrence area and the current monitoring behavior, cancels the corresponding early warning and updates the behavioral status after the anomaly relationship is restored, and maintains the early warning while the anomaly persists and outputs the specific location, behavioral stage, missing relationship, and current handling status of the anomaly event, thereby forming a closed-loop monitoring and early warning process from anomaly discovery, continuous confirmation, early warning output to recovery and cancellation, the specific implementation process of which is as follows: S41. This step involves further analyzing the monitoring anomalies confirmed in step S3, re-assigning the anomalies to the specific monitoring behavior chain that generated them, and identifying the actual unfinished functional relationships within that chain to establish objects for subsequent continuous monitoring and early warning. Specifically, it involves reading the kth monitoring anomaly output in step S3. Obtain the corresponding guardianship behavior chain from it. , Anomaly Confirmation Time The area where the anomaly is located Target functional relationships that have not been established or have been interrupted and the status of relationship recovery after an anomaly ;according to The system records the initial functional area, transitional functional area, target functional area, and behavioral stage. It then backtracks to determine the location of the anomaly and identifies which relationship transition in the behavioral chain the anomaly occurred at. For example, the behavioral chain formed in step S2 is: bed surface functional area → bed side functional area → passage functional area; If step S3 has confirmed that the personnel have completed the "bed surface → bedside" relationship migration, but the target relationship "bedside → access area" has not been formed subsequently, this embodiment will not treat the entire "leaving bed behavior" as a general anomaly, but will instead determine "bedside → access area" as a missing relationship in the current behavior chain; By restoring the relationships between the preceding and following behavioral chains, it is possible to identify the behavioral processes that individuals had already completed before the anomaly occurred, as well as the behavioral processes that have not yet been completed. Furthermore, based on the area where the personnel were located when the anomaly occurred. The functional connection relationship between the current abnormality and the target area of the behavior chain is used to determine whether the current abnormality is still within the migration range of the original behavior chain. If the person is still in the transition area allowed by the original behavior chain, the original behavior chain is retained as the current warning tracking object. If the person has entered a new functional area and formed a stable relationship, the relationship recovery result of step S3 is used to determine whether the behavior chain has ended, and to avoid classifying new normal behavior errors into the original abnormal event. Based on this, early warning and tracking targets are formed: ; In the formula, This represents the k-th early warning tracking object; For multiple video states generated consecutively by the same behavior chain, only one corresponding early warning tracking object is established, and the current state of the object is updated by subsequent state changes, instead of generating an early warning object for each video state separately, to avoid generating a large number of duplicate early warnings when people are in the same abnormal state for several seconds. Meanwhile, for abnormal candidate states that have been identified as relationship recovery by step S3, the continuous warning object is not re-established, and only its recovery record is retained; only the continuous unrecovered abnormal events confirmed by step S3 enter the warning tracking process established in this embodiment. S42. After establishing the early warning tracking object, continue to read the continuous monitoring scene status generated in step S1, and use the missing behavior chain relationship determined in step S41 as the tracking target to observe whether the relationship between personnel and target functional areas changes after the anomaly occurs. Further assess the development direction of the abnormal state, specifically classifying the subsequent changes in the behavioral chain gap into three basic states: gap recovery, gap maintenance, and gap expansion. When people move back to the target functional area of the behavior chain, and the spatial relationship between people and the target functional area continues to strengthen, and no new functional relationships that do not conform to the current behavior chain appear, it indicates that the original gap in the behavior chain is being restored. For example, after people leave the bed, they stay briefly at the side of the bed and then continue to move to the passage area. At this time, the relationship between people and the passage area is strengthened again, indicating that the migration break formed earlier is being eliminated. When a person is still in the area where the anomaly occurred or the transition area of the original behavior chain, and the relationship with the target functional area does not continue to strengthen, nor does it re-establish the original starting relationship, it indicates that the gap in the behavior chain is in a state of maintenance; for example, if a person has left the bed but remains on the side of the bed, neither returning to the bed nor continuing to enter the passage area, then the current behavior chain is in a state of continuous non-closure. When a person moves further away from the target functional area, deviates from the expected migration direction of the original behavioral chain, and begins to establish a continuous relationship with other functional areas that do not belong to the current behavioral chain, it indicates that the gap in the behavioral chain has further widened. For example, a person has left the bedside area but has not moved to the normal passage area. Instead, they continue to move to another area that does not have a connection with the current behavioral function. At this point, the original behavioral chain can no longer explain the person's current spatial relationship. To describe the direction of change in the target relationship, this embodiment can use the amount of change in the target functional relationship between adjacent consecutive states: ; In the formula, This represents the change in the target function relationship at the current moment relative to the previous moment; In continuous states, if If the gap continues to show a strengthening trend in the target relationship, and the spatial location of personnel still conforms to the functional area connection relationship in the behavioral chain, then it is determined that the gap has a recovery trend; if If no significant changes occur in the continuous state, and the relationship between personnel and the original area and the target area does not change in a way that can close the behavioral chain, then the gap is determined to remain. If the target relationship continues to weaken, and the relationship between personnel and other non-target functional areas continues to strengthen, then the gap is determined to have a widening trend. In practice, conclusions are not drawn based on the changes in the relationship of a single video frame, but rather by combining the state of the continuous scene. This is because during the camera's acquisition process, there may be slight changes in the position of the person being detected, partial occlusion of the body, or the person moving near the boundary of the area. Changes in the relationship of a single frame cannot indicate that the behavior chain has actually changed. Therefore, this embodiment focuses on determining whether the trend of relationship change continues, rather than whether the relationship value at a certain moment exceeds a preset limit. Furthermore, when the personnel re-establish the original initial functional relationship, it indicates that the original behavioral chain has returned. At this time, the warning will no longer be issued according to the gap in the original behavioral chain, but the return state will be handed over to the subsequent closed-loop processing. If the personnel form a new stable functional relationship, and the relationship can constitute a new reasonable starting point for behavior, the warning tracking of the original behavioral chain will end to avoid the original abnormal event from continuing to affect subsequent normal behavior. S43. After obtaining the changing state of the gap in the behavior chain, determine the current monitoring and warning state based on whether the gap has a recovery trend, whether it continues to be maintained, and whether it further expands. Directly use the behavior chain relationship established in steps S2 and S3 to determine the warning state according to the development process of abnormal behavior. Specifically, it includes the following states: Status 1: Relationship Recovery Observation Status. When the target functional relationship shows a continuous strengthening trend again, and the spatial migration direction of personnel is consistent with the original behavioral chain again, the warning tracking object is set to the relationship recovery observation status. For example, after a person leaves the bed, stays on the side of the bed for a certain period of time, and then moves back to the passage area; during this process, step S3 has already confirmed a break in the relationship, and step S4 continues to observe and finds that the passage relationship is re-established, which indicates that the abnormal state is receding; At this time, instead of immediately sending high-intensity alarms to external monitoring personnel, short-term tracking is maintained, and the warning is lifted after the target relationship is actually re-established. State 2: Persistent unclosed state. When the target relationship has not been restored, but personnel have not obviously migrated to a new abnormal spatial relationship, the warning tracking object will be kept in a persistent unclosed state. For example, if a person has left the bed but remains in the area beside the bed for an extended period without returning to the bed or entering the normal passageway, the behavioral chain can no longer be closed normally. However, since the person has not deviated further from the original functional relationship, the current warning tracking status should be maintained first, and subsequent relationship changes should be observed. This status is particularly suitable for handling short pauses in monitoring scenarios to avoid excessive warnings simply because the behavior has not been completed immediately. State 3: Behavioral chain deviation state. When the relationship between personnel and the target area continues to weaken and they begin to establish stable relationships with functional areas that do not belong to the current behavioral chain, the warning state will be adjusted to the behavioral chain deviation state. For example, if a person has completed the separation of the bedside relationship but does not enter the normal passage area, but continues to move to other unexpected areas, it indicates that the current behavior is no longer developing along the original behavior chain; at this time, the warning is no longer just for "the behavior is not completed", but for the behavior chain that has been continuously deviated from. State 4: Persistent Abnormal Relationship State. If personnel remain in the abnormal spatial area and, after continuous observation, fail to re-establish the target functional relationship or form a new behavioral relationship that can reasonably explain the current state, it is determined to be a persistent abnormal relationship state. This state indicates that the current abnormality has strong persistence, and therefore requires a higher priority monitoring response. The above states are formed sequentially according to the development process of abnormal behavior: relationship recovery observation → continued unclosed → continued deviation of the behavior chain → continued abnormal relationship. Not all abnormalities must go through all states in sequence. For example, if the person immediately re-establishes the target relationship after the abnormality occurs, it directly enters the recovery observation stage and is subsequently terminated. If the person immediately shows obvious and continuous deviation, it can directly enter the continuous deviation of the behavior chain stage. S44. After determining the current warning status, a specific monitoring and warning output is formed based on the behavior chain corresponding to the abnormal event, the area where the abnormality is located, and the current gap status. The warnings that have been generated are then updated in a closed loop using the subsequent monitoring scenario status. The warning event is bound to the functional area where the anomaly is located. Since step S3 has already determined the specific area where the personnel were when the anomaly occurred, the warning is not simply positioned as the entire monitoring space, but is instead mapped to the functional area where the actual relationship was broken. For example, if the abnormal behavior chain is: bed surface → bed side → passage area, and the break occurs during the migration from the bed side to the passage area, then the warning location corresponds to the bed side or related transition area where the current person is located, and at the same time, the unestablished target relationship is recorded as the passage relationship; In this way, after receiving the warning, the monitoring personnel can directly understand the location of the abnormality and which link in the behavioral chain the abnormality occurred at; Different output methods are generated based on the early warning status determined in step S43. For the relationship recovery observation status, the background tracking is maintained and a continuous external alarm is not generated immediately. For a persistently unclosed state, output a monitoring prompt indicating that the current behavior chain is not yet complete, and continue to track the relationship between the person and the target area; for a persistently deviating behavior chain, generate a clear abnormal warning and indicate that the person has deviated from the functional area relationship of the original behavior chain. For persistent abnormal relationships, a high-priority monitoring and early warning system is established, and the area where the abnormality occurred, the stage of the abnormal behavior, and the target relationship that has not been established are output simultaneously. The warning information directly converts the structured abnormal events formed in step S3 into monitoring information with specific meanings, such as: "The person has been removed from the bedside functional relationship, the target access relationship has not been established, and the current behavior chain is in a state of migration chain break" or "The person has left the seat functional area, the expected access relationship has not been formed, and the current behavior continues to deviate from the original migration relationship." This output enables monitoring personnel to directly understand the specific steps in which the anomaly occurred; After an alert is generated, the system continues to read the status of subsequent consecutive scenarios and updates the current alert object. When personnel re-establish the target functional relationship of the original behavior chain, the current alert status is updated to "relationship restored," and the corresponding alert is lifted. When personnel return to the original starting functional area and establish a stable relationship, the alert tracking corresponding to the original behavior chain ends, and the new stable relationship is used as the starting point for subsequent behavior analysis. When personnel continue to maintain abnormal relationships, the current alert status is maintained. When abnormal relationships deviate further from the original behavior chain, the alert level is updated according to the new status. To avoid generating numerous warnings for the same abnormal state repeatedly in consecutive video frames, this embodiment associates the same behavioral chain, the same abnormal region, and temporally consecutive abnormal states as the same warning event. Each subsequent monitoring state only updates the current state of the warning event and does not generate new events repeatedly. For example, if a person remains in the same abnormal area for ten seconds, although multiple video states are generated within those ten seconds, these states all belong to the same behavioral chain break process. Therefore, only one warning event is retained, and its abnormal state and continuous process are continuously updated. Ultimately, a closed-loop process is formed: abnormal event establishment → behavior chain gap tracking → early warning status formation → early warning output → continued observation of subsequent relationships → relationship restoration → early warning cancellation; The final output of the monitoring and early warning results includes at least: the corresponding monitoring behavior chain, the area where the abnormality occurred, the stage of the abnormal behavior, the current uncompleted target relationship, the current early warning status, and the early warning handling status. Among them, the records of the early warning events that have been resolved are in the "resolved" state, and the records of the abnormal events that still exist continue to maintain the corresponding early warning status, so as to provide a complete basis for the system's subsequent query, tracking, and monitoring records.
[0023] Example 2, as Figure 2 As shown, the present invention proposes a monitoring anomaly early warning system based on computer vision, which is used to execute a monitoring anomaly early warning method based on computer vision proposed in Embodiment 1. It includes: a monitoring scene relationship construction module, a monitoring behavior chain generation module, a behavior chain anomaly break confirmation module, and a behavior chain gap early warning closed-loop module.
[0024] The monitoring scene relationship construction module is used to acquire continuous video images within the monitoring area, identify and associate the monitored objects and functional areas with monitoring significance within the monitoring area in the video images, establish continuous spatial relationships based on the relative position changes between the monitored objects and the bed, seat, passage area and other functional areas, and combine the establishment, release and change process of functional relationships with continuous video status records to form personnel and functional area relationship data with time sequence. The monitoring behavior chain generation module is used to receive the personnel-functional area relationship data output by the monitoring scenario relationship construction module, organize the continuous migration process of personnel from one functional area to another into a monitoring behavior chain according to the order of establishment and termination of continuous functional relationships, determine the starting functional relationship, migration functional relationship and target functional relationship in the behavior chain, and continuously update the behavior stage according to the current functional area of the personnel, forming a monitoring behavior chain with a clear behavior starting point, migration process and target relationship to be completed; The behavioral chain abnormality break confirmation module is used to receive the monitoring behavioral chain output by the monitoring behavioral chain generation module, continuously track the behavioral chain in the initiation, migration or unclosed state, compare the actual functional area relationship changes formed by the personnel with the expected relationship in the current behavioral chain, identify abnormal candidate states such as migration stagnation, direction reversal and failure to establish target relationship, and continue to track relationship changes after abnormal candidate states. Based on whether the original migration direction is restored, whether the original initial relationship is re-established and whether a new functional relationship is formed, it distinguishes between transient deviation and continuous behavioral chain break, and forms a structured monitoring abnormal event that includes abnormal time, abnormal area, abnormal stage and uncompleted target relationship. The behavioral chain gap early warning closed-loop module is used to receive structured monitoring abnormal events output by the behavioral chain abnormal break confirmation module, locate the behavioral chain gap and abnormal occurrence area corresponding to the abnormal event, continuously track the changes in the uncompleted target relationship, determine whether the behavioral chain gap is in a recovery, maintenance or expansion state, and determine early warning states such as relationship recovery observation, continuous non-closure, continuous deviation of the behavioral chain and continuous abnormal relationship based on the gap evolution state, and form corresponding monitoring early warnings; the corresponding early warning is lifted when the target functional relationship is re-established in the subsequent monitoring scenario or a new functional relationship that can explain the current state is formed, otherwise the early warning status is continuously updated.
[0025] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited thereto. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention.
Claims
1. A monitoring and anomaly early warning method based on computer vision, characterized in that, The specific implementation steps include the following: S1. Acquire continuous video images of the monitored area, identify the monitored object and functional areas within the monitored area that have monitoring significance, establish continuous spatial relationships based on the relative position changes between the monitored object and each functional area, and record the establishment, release and change process of the spatial relationships to form data on the relationship between personnel and functional areas with time sequence. S2. Based on the order of establishment and termination of continuous functional relationships in the data on the relationship between personnel and functional areas, organize the continuous migration process of the monitored object from one functional area to another into a monitoring behavior chain, determine the initial functional relationship, migration functional relationship and target functional relationship in the monitoring behavior chain, and determine the current behavioral stage of the monitored object based on the changes in continuous relationships. S3. Continuously track the monitoring behavior chain in the initiation, migration or unclosed state, compare the actual formed functional relationship with the expected relationship in the monitoring behavior chain, identify the state of migration stagnation, migration direction reversal and the failure to establish the target functional relationship, and confirm the continuous behavior chain break based on whether the subsequent relationship is restored, forming a structured monitoring abnormal event. S4. Identify gaps in the behavioral chain based on abnormal events under structured monitoring, continuously track the recovery, maintenance, or expansion of the gaps, generate corresponding monitoring warnings based on the evolution of the gaps, and lift the corresponding warnings when the target functional relationship is re-established or a new functional relationship that can explain the current state is formed.
2. The monitoring anomaly early warning method based on computer vision according to claim 1, characterized in that, In step S1, continuous video images of the monitored area are acquired and data on the relationship between personnel and functional areas is established, specifically including: Acquire video images of the monitored area in a continuous time sequence, continuously identify and track the monitored objects in the continuous video images, and identify functional areas within the monitored area that have monitoring significance. The spatial relationship between the monitored object and the functional area is determined by the positional changes of the monitored object in continuous video images, and the establishment, termination and change of the spatial relationship are recorded according to the continuous video status to form personnel-functional area relationship data that can reflect the continuous changes in the relationship between the monitored object and different functional areas.
3. The monitoring and anomaly early warning method based on computer vision according to claim 2, characterized in that, In step S2, a guardianship behavior chain is formed, which specifically includes: Based on the order of establishment and termination of different functional relationships in the data on the relationship between personnel and functional areas, the functional relationships formed continuously during the migration of the monitored object from the current functional area to the next functional area are determined, and the continuous functional relationships are organized into a monitoring behavior chain according to the order of occurrence. Based on the functional relationships that have been established with the monitored object, the initial functional relationship, the transitional functional relationship, and the target functional relationship that needs to be established in the monitoring behavior chain are determined. At the same time, the behavioral stage of the monitored object is continuously updated based on the changes in functional relationships in subsequent continuous video images.
4. The monitoring and anomaly early warning method based on computer vision according to claim 3, characterized in that, In step S3, the monitoring behavior chain in the initiation, migration, or unclosed state is continuously tracked, specifically including: For a monitoring behavior chain that has been initiated but not yet completed, the target functional relationship that has not yet been completed is determined based on the currently established functional relationship, and the actual functional relationship formed by the monitored object in subsequent continuous video images is continuously compared with the target functional relationship and the expected relationship in the monitoring behavior chain. After the guardian terminates the current initial functional relationship, the changes in the relationship between the guardian and the target functional area are continuously observed. At the same time, the changes in the relationship between the guardian and the initial functional area, the functional areas during the migration process, and the target functional area are combined to determine whether the current behavior should continue to migrate according to the original guardianship behavior chain.
5. The monitoring and anomaly early warning method based on computer vision according to claim 4, characterized in that, In step S3, the break in the persistent behavioral chain is confirmed, specifically including: During the process of the monitored object migrating its functional area, identify the migration stagnation, migration direction reversal, or failure to establish the target functional relationship that occur in relation to the expected relationship of the monitored behavior chain, and continue to track the continuous changes in functional relationship after the occurrence of the abnormal state. When the monitored object moves back to the target functional area in the original migration direction and re-establishes the target functional relationship, the abnormal state is identified as the relationship recovery state. When the monitored object re-establishes the original initial functional relationship, the original behavioral chain ends. When the monitored object continues to fail to establish the target functional relationship and fails to form a new functional relationship that can explain the current state, the monitoring behavioral chain is confirmed to have been continuously broken.
6. The monitoring and anomaly early warning method based on computer vision according to claim 5, characterized in that, In step S3, a structured monitoring abnormal event is generated, specifically including: The monitoring behavior chain that has been confirmed to have a persistent break is associated with the corresponding abnormal state. The time information when the abnormal relationship is confirmed, the functional area where the monitored object is located, the behavioral stage when the abnormality occurs, the target functional relationship that has not yet been established or has been interrupted in the monitoring behavior chain, and the relationship recovery status after the abnormal state occurs are extracted. The information is organized according to the correspondence between abnormal events to form a structured monitoring abnormal event for subsequent behavior chain gap tracking and monitoring early warning processing.
7. The monitoring and anomaly early warning method based on computer vision according to claim 6, characterized in that, In step S4, gaps in the behavioral chain are identified based on the abnormal events observed in the structured monitoring system. Specifically, this includes: Based on the monitoring behavior chain associated with the structured monitoring anomaly event, determine the functional relationships that were completed before the anomaly occurred and the functional relationships that were not completed after the anomaly occurred. The unfinished functional relationships after the anomaly are identified as the current behavioral chain gaps. The monitoring behavioral chains corresponding to the behavioral chain gaps, the anomaly occurrence area, the unfinished target functional relationships, the anomaly relationship confirmation time, and the relationship recovery status are associated to form early warning tracking objects for continuous monitoring and tracking.
8. The monitoring and anomaly early warning method based on computer vision according to claim 7, characterized in that, In step S4, the recovery, maintenance, or expansion of the behavioral chain gap is continuously tracked, specifically including: After the early warning tracking object is formed, the continuous monitoring scene status after the abnormal event occurs is continuously acquired, and the target functional relationship corresponding to the gap in the behavior chain is used as the basis for subsequent tracking to observe the changes in the relationship between the monitored object and the target functional area of the original monitored behavior chain. When the monitored individual moves back to the target functional area, and the relationship between the individual and the target functional area is continuously established and re-aligns with the original migration direction, it is determined that the gap in the behavioral chain is in a recovery state. When the target functional relationship has not been re-established, the monitored object is still in the original abnormal area or the original behavioral chain transition area, and no new functional relationship that can explain the current behavioral state has been formed, it is determined that the behavioral chain gap is in a maintained state. When the target functional relationship remains unestablished, and the monitored individual moves further away from the original target functional area and forms a continuous relationship with other functional areas that do not belong to the current monitoring behavior chain, it is determined that the gap in the behavior chain is widening.
9. A monitoring and anomaly early warning method based on computer vision according to claim 8, characterized in that, In step S4, a corresponding monitoring and early warning is generated based on the evolution state of the gap in the behavior chain, specifically including: When the target functional relationship shows a renewed trend of being established, and the subsequent migration direction of the monitored object is consistent with the original monitoring behavior chain again, the corresponding early warning tracking object will be identified as a relationship recovery observation state and the establishment of the target functional relationship will continue to be tracked. When the target functional relationship is not restored and the gap in the behavioral chain continues to exist, and the monitored object has not re-established the original initial functional relationship and has not formed a new functional relationship that can explain the current state, the corresponding continuous unclosed warning state is maintained. When the monitored individual continuously deviates from the original monitoring behavior chain and forms a continuous relationship with other functional areas, the behavior chain continuous deviation warning state is determined. When an abnormal relationship persists and the target functional relationship has not yet been established, the abnormal relationship is determined to be in a continuous warning state. In subsequent continuous monitoring scenarios, the target functional relationship of the original monitoring behavior chain is re-established, or a new functional relationship that can explain the current state is formed. At the same time, the corresponding warning is updated to the relationship recovery state and the corresponding warning is lifted. Simultaneously, the continuous warning tracking corresponding to the recovered abnormal behavior chain is terminated.
10. A monitoring anomaly early warning system based on computer vision, used to execute the monitoring anomaly early warning method based on computer vision as described in any one of claims 1 to 9, characterized in that, include: The monitoring scene relationship construction module is used to acquire continuous video images of the monitoring area, identify the monitored objects and functional areas within the monitoring area that have monitoring significance, establish continuous spatial relationships based on the relative position changes between the monitored objects and each functional area, and record the establishment, release and change process of spatial relationships to form data on the relationship between personnel and functional areas with time sequence. The monitoring behavior chain generation module is used to organize the continuous migration process of the monitored object from one functional area to another into a monitoring behavior chain according to the establishment and termination order of continuous functional relationships in the personnel and functional area relationship data, determine the initial functional relationship, the migration functional relationship and the target functional relationship, and determine the current behavior stage according to the changes in continuous relationships; The behavioral chain abnormality break confirmation module is used to continuously track the monitoring behavioral chain in the initiation, migration or unclosed state, compare the actual functional relationship with the expected relationship in the monitoring behavioral chain, identify the state of migration stagnation, migration direction reversal and target functional relationship not established, and confirm the continuous behavioral chain break and form a structured monitoring abnormal event based on the subsequent relationship recovery. The behavioral chain gap early warning closed-loop module is used to determine behavioral chain gaps based on structured monitoring abnormal events, continuously track the recovery, maintenance or expansion status of the behavioral chain gaps, form corresponding monitoring early warnings based on the gap evolution status, and release the corresponding early warnings when the target functional relationship is re-established or a new functional relationship that can explain the current state is formed.
Citation Information
Patent Citations
A monitoring and early warning method, system, and storage medium based on a dynamic 3D model.
CN112053391B
