Target loss prevention behavior analysis method and device, equipment and storage medium

By integrating spatiotemporal adaptive matching with face recognition algorithms, the problem of discontinuity in target identity and loss of behavioral information in complex scenarios such as face occlusion is solved, achieving behavior analysis with high reliability and low mismatch.

CN120997893APending Publication Date: 2025-11-21GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511240890.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-02
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing facial recognition-based behavior analysis systems are prone to failure in complex environments, leading to the loss of target identity information and anonymization of behavioral information, as well as serious mismatch problems, which affect the reliability and practicality of the system.

Method used

By integrating spatiotemporal adaptive matching with face recognition algorithms, multi-dimensional matching is performed using human feature data, detection box size, and motion data to solve the problems of discontinuity in target identity and loss of behavioral information in complex scenarios such as face occlusion.

Benefits of technology

It effectively reduces false matching, improves system reliability and usability, ensures the accuracy of target association, and optimizes resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997893A_ABST
    Figure CN120997893A_ABST
Patent Text Reader

Abstract

The invention discloses a target loss prevention behavior analysis method and device, equipment and a storage medium. The method comprises the following steps: acquiring video stream data and respectively extracting human body feature information and face feature information; performing space-time adaptive matching and face and human body position matching processing on the current video frame, in the space-time adaptive matching, calculating similarity according to human body positions and velocity vectors of the previous and next video frames to judge whether matching exists, and in the face and human body position matching, screening matched human bodies according to a space relationship between the face positions and the human body positions; and updating the global feature behavior counting set and the global name ID counting set according to a matching result, regularly removing the target features which are not updated for a long time, and outputting a behavior analysis result. According to the method, the problems of discontinuity of the target identity and behavior information loss in complex scenes such as face shielding are solved, mismatching possibly caused by single feature matching is effectively reduced, and the reliability and practicability of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer vision and intelligent monitoring technology, and in particular relates to a method, device, equipment and storage medium for analyzing behavior to prevent target loss. Background Technology

[0002] With the development of computer vision technology, facial recognition-based behavior analysis systems have been widely used in various monitoring scenarios. Their core function is to achieve accurate target tracking and behavior statistics by associating personnel identity with behavioral data. However, existing systems face many limitations in practical applications and struggle to meet the target tracking needs in complex environments.

[0003] Current mainstream solutions mainly rely on a simple combination of facial recognition and behavior analysis algorithms. However, facial recognition is prone to failure when the target's face is obscured (e.g., wearing a mask, holding an object), facing away from the camera (e.g., when a person turns around), at a large angle (e.g., looking down to pick up goods, looking up to climb), or beyond the recognition distance, causing the system to immediately lose the target's identity information. In this case, even if the camera can still capture human behavior data (e.g., body movements, movement trajectories, and interacting objects), due to the lack of an effective identity binding mechanism, this key behavioral information becomes anonymized data and loses its analytical value.

[0004] Furthermore, some improved solutions attempt to combine face recognition, feature matching, or location intersection-union (IOU) matching with behavior analysis algorithms, but still have obvious drawbacks: when relying solely on feature matching, if two people are dressed similarly, mismatches are likely to occur, leading to incorrect association of behavioral information; when relying solely on location IOU matching, in scenarios where the target is reproduced after occlusion, the deviation in the calculation of location overlap will also cause mismatch problems.

[0005] In summary, these defects seriously affect the reliability and usability of the system, and the problems existing in the current technology urgently need to be solved. Summary of the Invention

[0006] This application proposes a target loss prevention behavior analysis method, device, equipment, and storage medium. By integrating spatiotemporal adaptive matching with face recognition algorithms, it utilizes spatiotemporal information such as human feature data, detection box size, and motion data for multi-dimensional matching. This addresses the discontinuity of target identity and loss of behavioral information in complex scenarios such as face occlusion, effectively reducing false matching that may be caused by single feature matching and improving the reliability and practicality of the system.

[0007] This invention provides a method for analyzing target loss behavior, including:

[0008] Acquire video stream data and extract human body feature information and facial feature information respectively;

[0009] Spatiotemporal adaptive matching and face and human body position matching are performed on the current video frame. The spatiotemporal adaptive matching calculates the similarity based on the human body position and velocity vector of the preceding and following video frames to determine whether they match. The face and human body position matching filters the human body to be matched based on the spatial relationship between the face position and the human body position.

[0010] Update the global feature behavior count set and the global name ID count set based on the matching results, and periodically remove target features that have not been updated for a long time, and output the behavior analysis results.

[0011] According to the target loss prevention behavior analysis method provided by the present invention, the extraction of human feature information and facial feature information specifically includes:

[0012] The face recognition model is used to obtain the face name ID and corresponding location set, thus obtaining the human body location set, and cropping out the human body image set;

[0013] A human feature extraction model is used to process a set of human images to obtain a set of human features.

[0014] By processing a set of human images using a behavior analysis model, a set of behavior classification results is obtained.

[0015] The human body feature information includes human body location, human body features and behavior classification results, and the facial feature information includes facial name ID and facial location.

[0016] According to the target loss prevention behavior analysis method provided by the present invention, the spatiotemporal adaptive matching processing specifically includes:

[0017] The predicted center point is calculated based on the human position and velocity vectors of historical video frames, and the predicted bounding box is generated by combining the width and height of the detection box in the current frame.

[0018] The similarity between the target in the current video frame and historical targets is calculated using a fusion metric function;

[0019] The target matching relationship is determined based on similarity, and the global feature behavior count set is updated.

[0020] According to the target loss prevention behavior analysis method provided by the present invention, the human body location matching process specifically includes:

[0021] Candidate targets are selected based on preset spatial location constraints;

[0022] The optimal human target is determined using a scoring function;

[0023] Associate the successfully matched face name ID with the human target and update the global name ID count set.

[0024] According to the target loss prevention behavior analysis method provided by the present invention, the fusion metric function specifically includes:

[0025]

[0026] Where IOU represents the intersection-union ratio between the predicted bounding box and the current detected bounding box, and ξ is a dynamic weighting coefficient, obtained through... Calculation, where The ratio of the current target area to that of a historical video frame is represented by k and For the threshold, For human body feature vectors, This represents the change in velocity.

[0027] According to the target loss prevention behavior analysis method provided by the present invention, the scoring function specifically includes:

[0028]

[0029] Among them, b x b y Let b be the coordinates of the top left corner of the human body bounding box. w b h f represents the width and height of the human body frame. x f y The coordinates are the location of the face, and the score is the matching score. The higher the score, the higher the matching degree.

[0030] As a further optional embodiment, the update based on the matching result specifically includes:

[0031] When a face location successfully matches a body location, the corresponding body's behavior statistics from the global feature behavior count set are associated with the matched face's name ID. If the name ID already exists in the global name ID count set, the behavior statistics are incremented. If it does not exist, an entry containing the name ID and corresponding behavior statistics is added to the global name ID count set, and the associated information for that body is removed from the global feature behavior count set. When a face location fails to match a body location, the global name ID count set remains unchanged, and the information corresponding to that body is retained in the global feature behavior count set.

[0032] The present invention also provides a target loss prevention behavior analysis device, the device comprising:

[0033] The extraction module acquires video stream data and extracts human body feature information and facial feature information respectively;

[0034] The matching module performs spatiotemporal adaptive matching and face and human body position matching on the current video frame. The spatiotemporal adaptive matching calculates the similarity based on the human body position and velocity vector of the preceding and following video frames to determine whether they match. The face and human body position matching filters the human body to be matched based on the spatial relationship between the face position and the human body position.

[0035] The update module updates the global feature behavior count set and the global name ID count set based on the matching results, and periodically removes target features that have not been updated for a long time, and outputs the behavior analysis results.

[0036] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the target loss prevention behavior analysis method as described above.

[0037] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the target loss behavior analysis method as described above.

[0038] This invention provides a method, apparatus, device, and storage medium for target loss prevention behavior analysis. It acquires video stream data and extracts human body feature information and facial feature information respectively. For the current video frame, it performs spatiotemporal adaptive matching and face-to-human body position matching. The spatiotemporal adaptive matching calculates the similarity based on the human body position and velocity vectors of preceding and following video frames to determine if a match is made. The face-to-human body position matching filters matching human bodies based on the spatial relationship between face and human body positions. Based on the matching results, it updates the global feature behavior count set and the global name ID count set, and periodically removes target features that have not been updated for a long time, outputting the behavior analysis results. This invention integrates spatiotemporal adaptive matching and facial recognition algorithms, utilizing spatiotemporal information such as human body feature data, detection box size, and motion data for multi-dimensional matching. This addresses the discontinuity of target identity and loss of behavioral information in complex scenarios such as face occlusion, effectively reducing mismatches that may be caused by single feature matching and improving the reliability and practicality of the system. Attached Figure Description

[0039] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0040] Figure 1 This is a flowchart illustrating a target loss prevention behavior analysis method provided by the present invention;

[0041] Figure 2 This is a schematic diagram of the structure of a target loss prevention behavior analysis device provided by the present invention;

[0042] Figure 3 This is a schematic diagram of the electronic device structure provided by the present invention. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0044] With the development of computer vision technology, facial recognition-based behavior analysis systems have been widely used in various monitoring scenarios. Their core function is to achieve accurate target tracking and behavior statistics by associating personnel identity with behavioral data. However, existing systems face many limitations in practical applications and struggle to meet the target tracking needs in complex environments.

[0045] Current mainstream solutions mainly rely on a simple combination of facial recognition and behavior analysis algorithms. However, facial recognition is prone to failure when the target's face is obscured (e.g., wearing a mask, holding an object), facing away from the camera (e.g., when a person turns around), at a large angle (e.g., looking down to pick up goods, looking up to climb), or beyond the recognition distance, causing the system to immediately lose the target's identity information. In this case, even if the camera can still capture human behavior data (e.g., body movements, movement trajectories, and interacting objects), due to the lack of an effective identity binding mechanism, this key behavioral information becomes anonymized data and loses its analytical value.

[0046] Furthermore, some improved solutions attempt to combine face recognition, feature matching, or location intersection-union (IOU) matching with behavior analysis algorithms, but still have obvious drawbacks: when relying solely on feature matching, if two people are dressed similarly, mismatches are likely to occur, leading to incorrect association of behavioral information; when relying solely on location IOU matching, in scenarios where the target is reproduced after occlusion, the deviation in the calculation of location overlap will also cause mismatch problems.

[0047] In summary, these defects seriously affect the reliability and usability of the system, and the problems existing in the current technology urgently need to be solved.

[0048] Example 1

[0049] To address the problems in existing technologies, this invention proposes a target loss prevention behavior analysis method. By fusing spatiotemporal adaptive matching with face recognition algorithms, it utilizes spatiotemporal information such as human feature data, detection box size, and motion data for multi-dimensional matching. This addresses the discontinuity of target identity and loss of behavioral information in complex scenarios such as face occlusion, effectively reducing false matching that may be caused by single-feature matching and improving the system's reliability and practicality. Figure 1 As shown, including but not limited to the following steps:

[0050] Step 101: Acquire video stream data and extract human body feature information and facial feature information respectively.

[0051] As a further optional embodiment, the extraction of human body feature information and facial feature information includes:

[0052] The face recognition model is used to obtain the face name ID and corresponding location set, thus obtaining the human body location set, and cropping out the human body image set;

[0053] A human feature extraction model is used to process a set of human images to obtain a set of human features.

[0054] By processing a set of human images using a behavior analysis model, a set of behavior classification results is obtained.

[0055] The human body feature information includes human body location, human body features and behavior classification results, and the facial feature information includes facial name ID and facial location.

[0056] In step 101, during the feature extraction stage, the system performs parallel processing on the input video stream. On the one hand, it uses a face detection and recognition model to extract feature information including name ID and corresponding face location. On the other hand, it uses a human body detection model to obtain human body location information, and then uses a human body feature extraction model to obtain human body features. At the same time, it combines a behavior analysis model to generate behavior classification results. Based on the above extraction results, a global feature behavior count set S1 and a global name ID count set S2 are defined respectively. S1 contains human body location information, human body features, and statistical data based on behavior classification results. S2 contains name ID and statistical data based on behavior classification results of the human body corresponding to that name ID.

[0057] Specifically, the input video stream is fed into a face recognition model to obtain a set P{p0,p1,...,pn} consisting of the face name ID and corresponding face location information. The same video stream is then fed into a human detection model to obtain a human location set B{b0,b1,...,bn} (composed of the upper left and lower right coordinates of the human body), and the corresponding human images are cropped to obtain a human image set C{c0,c1,...,cn}. The human image set C is then fed into a human feature extraction model and a behavior analysis model respectively to obtain the corresponding 1024-dimensional human feature set D{d1,d2,...,dn} and the behavior analysis classification result set R{r0,r1,...,rn}.

[0058] Step 102: Perform spatiotemporal adaptive matching and face and human body position matching on the current video frame. The spatiotemporal adaptive matching calculates the similarity based on the human body position and velocity vector of the preceding and following video frames to determine whether they match. The face and human body position matching filters the human body to be matched based on the spatial relationship between the face position and the human body position.

[0059] In step 102, spatiotemporal adaptive matching and face-to-body position matching are performed on the current video frame. Spatiotemporal adaptive matching extracts the human position information from adjacent video frames and combines it with the velocity vector of human motion to calculate a similarity index to measure the degree of association between human targets, thereby determining whether the two frames are the same human target. Face-to-body position matching analyzes the spatial correlation between the face position coordinates output by the face recognition module and the human position coordinates obtained by the human detection module, and selects the matching human body corresponding to the face from multiple human targets.

[0060] Step 103: Update the global feature behavior count set and the global name ID count set according to the matching results, and periodically remove target features that have not been updated for a long time, and output the behavior analysis results.

[0061] In step 103, based on the matching results, the system dynamically updates the global feature behavior count set S1 and the global name ID count set S2: for human targets that successfully match spatiotemporally, the system updates the corresponding human position, velocity vector, and behavior statistics in S1; for entries where a face and human body are successfully matched, the system synchronously updates the behavior count associated with the name ID in S2. Simultaneously, the system sets a timed cleanup mechanism to automatically remove target features that have not been updated for a threshold time, ensuring the timeliness and storage efficiency of the data sets. By integrating the statistical results of S1 and S2, a comprehensive behavior analysis report is output, including individual behavior characteristics, group behavior trends, and abnormal behavior warnings.

[0062] As a further optional embodiment, the spatiotemporal adaptive matching process specifically includes:

[0063] The predicted center point is calculated based on the human position and velocity vectors of historical video frames, and the predicted bounding box is generated by combining the width and height of the detection box in the current frame.

[0064] The similarity between the target in the current video frame and historical targets is calculated using a fusion metric function;

[0065] The target matching relationship is determined based on similarity, and the global feature behavior count set is updated.

[0066] As a further optional embodiment, the fusion metric function specifically includes:

[0067]

[0068] Where IOU represents the intersection-union ratio between the predicted bounding box and the current detected bounding box, and ξ is a dynamic weighting coefficient, obtained through... Calculation, where The ratio of the current target area to that of a historical video frame is represented by k and For the threshold, For human body feature vectors, This represents the change in velocity.

[0069] In a preferred embodiment, the human body location set B, the human body feature set D, and the behavior category set R are recombine into a set X{[b0,d0,r0],[b1,d1,r1],...,[bn,dn,rn]}, where each element contains information about the corresponding human body's location, features, and behavior category.

[0070] Specifically, if the global feature behavior count set S1 is empty, initialize a velocity vector for each element in set X. The elements are then organized into a new set S1'{[b0,v0,d0,r0],{b1,v1,d1,r1},...,[bn,vn,dn,rn]}, and the elements of set S1' are directly inserted into S1. If the global feature behavior count set S1 is not empty, then S1' is the behavior information set at time t, and S1 is the behavior information set at time t-1. The following spatiotemporal adaptive matching process is then performed:

[0071] (1) Traverse the set S1' at time t and the set S1 at time t-1 respectively, mark the elements in set S1' as i and the elements in set S1 as j, in order to prepare for subsequent matching.

[0072] (2) According to Formula 1, the coordinates of the human detection box at time t and time t-1 are used. Let t be the coordinates. (Given the coordinates at time t-1), calculate the set of velocity vectors at time t. It reflects the displacement change trend of human body movement.

[0073]

[0074] (3) Based on the human velocity vector in S1 at time t-1 Given the coordinates, the predicted position of the human body center at time t (cx) is derived using Formula 2. pred ,cy pred Based on the width and height at time t. and The box position of the S1 data at time t is obtained by combining the center position of the inference. pred .

[0075]

[0076] (4) According to Formula 4, the area of ​​the corresponding elements at times t and t-1 is calculated as Arae. i and Arae j .

[0077] Arae=(x2-x1)*(y2-y1) (Formula 4)

[0078] (5) Combining the velocity vector, prediction box, area, and other information obtained in steps (2)-(4), substitute the corresponding elements into Formula 5 to calculate the similarity f(i,j) between element i of set S1' and element j of set S1. If set S1' matches an element of set S1 greater than the predetermined threshold of 0.8, the corresponding element of set S1 updates the human position, movement speed, human feature information, and corresponding behavior statistics and accumulates them. If no element of set S1 is matched, the element of S1' is inserted into the element of set S1 to ensure the continuity of trajectory and behavior statistics.

[0079]

[0080] Wherein, IOU represents the intersection-union ratio between the predicted bounding box and the current detected bounding box, used to measure the degree of positional overlap; ξ is a dynamic weight coefficient, representing the weight of dynamically balancing feature similarity and velocity change trend similarity, through... Calculation, where The ratio of the target area at time t to that at time t-1 is represented by k and For the threshold, For human body feature vectors, For the change in velocity, This is a Gaussian similarity calculation based on velocity changes. The formula is a fusion of three object tracking methods: IOU position change, feature similarity, and displacement information, while also incorporating the area ratio of consecutive frames. To balance feature similarity and the magnitude of displacement vectors.

[0081] Understandably, based on the spatiotemporal adaptive matching results, when the similarity between the current video frame target and the historical target is greater than a preset threshold, the human feature information and behavior statistics of the corresponding historical target in the global feature behavior count set are updated to the corresponding information of the current video frame target; when no historical target is matched, the human feature information of the current video frame target is inserted as a new element into the global feature behavior count set.

[0082] As a further optional embodiment, the human body location matching process specifically includes:

[0083] Candidate targets are selected based on preset spatial location constraints;

[0084] The optimal human target is determined using a scoring function;

[0085] Associate the successfully matched face name ID with the human target and update the global name ID count set.

[0086] As a further optional embodiment, the scoring function specifically includes:

[0087]

[0088] Among them, b x b y Let b be the coordinates of the top left corner of the human body bounding box. w b h f represents the width and height of the human body frame. x f y The coordinates are the location of the face, and the score is the matching score. The higher the score, the higher the matching degree.

[0089] As a further optional embodiment, the update based on the matching result specifically includes:

[0090] When a face location successfully matches a body location, the corresponding body's behavior statistics from the global feature behavior count set are associated with the matched face's name ID. If the name ID already exists in the global name ID count set, the behavior statistics are incremented. If it does not exist, an entry containing the name ID and corresponding behavior statistics is added to the global name ID count set, and the associated information for that body is removed from the global feature behavior count set. When a face location fails to match a body location, the global name ID count set remains unchanged, and the information corresponding to that body is retained in the global feature behavior count set.

[0091] In a preferred embodiment, the position information of the obtained face set P and the human body position information of set S1 are extracted. The position information of face set P is traversed and denoted as f, and the position information of human body set S1 is traversed and denoted as b. Face position and human body position matching is performed:

[0092] 1) Formula 5 is used to initially screen the human body positions where the face is located in the upper part of the human body. The spatial relationship between the human body detection box and the face coordinates is used to narrow down the matching range and exclude obviously irrelevant human bodies.

[0093]

[0094] 2) The human body locations and face information that are successfully matched by Formula 5 are used to calculate and filter out the human body bounding boxes with the largest scores through the scoring function (Formula 6) to determine the final matching relationship.

[0095]

[0096] Among them, b x b y Let b be the coordinates of the top left corner of the human body bounding box. w b h f represents the width and height of the human body frame. x f y The center point of the face bounding box is (bx+0.5bw,by+0.5bh), and the center point of the human body is (bx+0.5bw,by+0.5bh). The score is the matching score. The higher the score (indicating that the face is closer to the center of the human body bounding box), the better the matching degree; the lower the score (indicating that the face is farther from the center of the human body bounding box), the worse the matching degree.

[0097] 3) If a face and body location match successfully, extract the corresponding behavior information of the body bounding box in S1, and integrate it with the face's name ID information to form an element in S2. Then check set S2. If the name ID already exists in set S2, add it to set S2 and accumulate the relevant behavior statistics module; if the name ID does not exist, add the element to S2, and remove the matched body location element from S1. If the face and body location do not match (meaning the face and body location are not related), no further operations are performed, and the current state of the set is maintained.

[0098] As a further optional embodiment, this application updates the count of each module in the S1 set. If no data update change is detected in a module of the S1 set after 10 consecutive frames of data, the module is removed from the S1 set.

[0099] It is understood that the threshold parameters mentioned above in this invention can all be adjusted as needed, and those skilled in the art can flexibly choose according to actual needs.

[0100] This invention provides a target loss prevention behavior analysis method, which acquires video stream data and extracts human body feature information and facial feature information respectively; performs spatiotemporal adaptive matching and face and human body position matching processing on the current video frame. The spatiotemporal adaptive matching calculates the similarity based on the human body position and velocity vector of the preceding and following video frames to determine whether a match is made. The face and human body position matching filters the matched human bodies based on the spatial relationship between the face position and the human body position; updates the global feature behavior count set and the global name ID count set according to the matching results, and periodically removes target features that have not been updated for a long time, and outputs the behavior analysis results. The invention offers significant advantages: First, by integrating spatiotemporal adaptive matching with face recognition algorithms, a multi-dimensional matching mechanism is constructed. This mechanism comprehensively utilizes spatiotemporal information such as human feature data, detection box size, and motion data, effectively solving the problems of discontinuity in target identity and loss of behavioral information in complex scenarios such as face occlusion and back-facing, thus overcoming the limitations of single-feature matching. Second, the dual matching process significantly reduces the probability of false matching, ensuring the accuracy of target association and avoiding false matching caused by single features. Third, dynamically updating the global count set and periodically cleaning up redundant data ensures both the real-time performance and data validity of behavioral analysis while optimizing system resource usage.

[0101] Example 2

[0102] Please refer to Figure 2 This application provides an embodiment of a target loss prevention behavior analysis device, the device comprising:

[0103] The extraction module acquires video stream data and extracts human body feature information and facial feature information respectively;

[0104] The matching module performs spatiotemporal adaptive matching and face and human body position matching on the current video frame. The spatiotemporal adaptive matching calculates the similarity based on the human body position and velocity vector of the preceding and following video frames to determine whether they match. The face and human body position matching filters the human body to be matched based on the spatial relationship between the face position and the human body position.

[0105] The update module updates the global feature behavior count set and the global name ID count set based on the matching results, and periodically removes target features that have not been updated for a long time, and outputs the behavior analysis results.

[0106] This invention provides a target loss prevention behavior analysis device, which acquires video stream data and extracts human body feature information and facial feature information respectively; performs spatiotemporal adaptive matching and face and human body position matching processing on the current video frame. The spatiotemporal adaptive matching calculates the similarity based on the human body position and velocity vector of the preceding and following video frames to determine whether a match is made. The face and human body position matching filters the human body to be matched based on the spatial relationship between the face position and the human body position. The device updates the global feature behavior count set and the global name ID count set according to the matching results, and periodically removes target features that have not been updated for a long time, and outputs the behavior analysis results. The invention offers significant advantages: First, by integrating spatiotemporal adaptive matching with face recognition algorithms, a multi-dimensional matching mechanism is constructed. This mechanism comprehensively utilizes spatiotemporal information such as human feature data, detection box size, and motion data, effectively solving the problems of discontinuity in target identity and loss of behavioral information in complex scenarios such as face occlusion and back-facing, thus overcoming the limitations of single-feature matching. Second, the dual matching process significantly reduces the probability of false matching, ensuring the accuracy of target association and avoiding false matching caused by single features. Third, dynamically updating the global count set and periodically cleaning up redundant data ensures both the real-time performance and data validity of behavioral analysis while optimizing system resource usage.

[0107] The aforementioned target loss prevention behavior analysis device can implement the target loss prevention behavior analysis method of the above-described method embodiments. The options in the above method embodiments are also applicable to this embodiment, and will not be detailed here. The remaining content of the embodiments of this application can be referred to the content of the above method embodiments; in some preferred embodiments, further details will not be provided.

[0108] Example 3

[0109] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute a target loss prevention behavior analysis method, which includes:

[0110] Acquire video stream data and extract human body feature information and facial feature information respectively;

[0111] Spatiotemporal adaptive matching and face and human body position matching are performed on the current video frame. The spatiotemporal adaptive matching calculates the similarity based on the human body position and velocity vector of the preceding and following video frames to determine whether they match. The face and human body position matching filters the human body to be matched based on the spatial relationship between the face position and the human body position.

[0112] Update the global feature behavior count set and the global name ID count set based on the matching results, and periodically remove target features that have not been updated for a long time, and output the behavior analysis results.

[0113] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0114] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is able to execute the target loss prevention behavior analysis method provided by the above methods, the method comprising:

[0115] Acquire video stream data and extract human body feature information and facial feature information respectively;

[0116] Spatiotemporal adaptive matching and face and human body position matching are performed on the current video frame. The spatiotemporal adaptive matching calculates the similarity based on the human body position and velocity vector of the preceding and following video frames to determine whether they match. The face and human body position matching filters the human body to be matched based on the spatial relationship between the face position and the human body position.

[0117] Update the global feature behavior count set and the global name ID count set based on the matching results, and periodically remove target features that have not been updated for a long time, and output the behavior analysis results.

[0118] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform a target loss prevention behavior analysis method provided by the methods described above, the method comprising:

[0119] Acquire video stream data and extract human body feature information and facial feature information respectively;

[0120] Spatiotemporal adaptive matching and face and human body position matching are performed on the current video frame. The spatiotemporal adaptive matching calculates the similarity based on the human body position and velocity vector of the preceding and following video frames to determine whether they match. The face and human body position matching filters the human body to be matched based on the spatial relationship between the face position and the human body position.

[0121] Update the global feature behavior count set and the global name ID count set based on the matching results, and periodically remove target features that have not been updated for a long time, and output the behavior analysis results.

[0122] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0123] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for analyzing behavior to prevent target loss, characterized in that, include: Acquire video stream data and extract human body feature information and facial feature information respectively; Spatiotemporal adaptive matching and face and human body position matching are performed on the current video frame. The spatiotemporal adaptive matching calculates the similarity based on the human body position and velocity vector of the preceding and following video frames to determine whether they match. The face and human body position matching filters the human body to be matched based on the spatial relationship between the face position and the human body position. Update the global feature behavior count set and the global name ID count set based on the matching results, and periodically remove target features that have not been updated for a long time, and output the behavior analysis results.

2. The target loss prevention behavior analysis method according to claim 1, characterized in that, The extraction of human body feature information and facial feature information specifically includes: The face recognition model is used to obtain the face name ID and corresponding location set, thus obtaining the human body location set, and cropping out the human body image set; A human feature extraction model is used to process a set of human images to obtain a set of human features. By processing a set of human images using a behavior analysis model, a set of behavior classification results is obtained. The human body feature information includes human body location, human body features and behavior classification results, and the facial feature information includes facial name ID and facial location.

3. The target loss prevention behavior analysis method according to claim 1, characterized in that, The spatiotemporal adaptive matching process specifically includes: The predicted center point is calculated based on the human position and velocity vectors of historical video frames, and the predicted bounding box is generated by combining the width and height of the detection box in the current frame. The similarity between the target in the current video frame and historical targets is calculated using a fusion metric function; The target matching relationship is determined based on similarity, and the global feature behavior count set is updated.

4. The target loss prevention behavior analysis method according to claim 1, characterized in that, The human body location matching process specifically includes: Candidate targets are selected based on preset spatial location constraints; The optimal human target is determined using a scoring function; Associate the successfully matched face name ID with the human target and update the global name ID count set.

5. The target loss prevention behavior analysis method according to claim 3, characterized in that, The fusion metric function specifically includes: Where IOU represents the intersection-union ratio between the predicted bounding box and the current detected bounding box, and ξ is a dynamic weighting coefficient, obtained through... Calculation, where The ratio of the current target area to that of a historical video frame is represented by k and For the threshold, For human body feature vectors, This represents the change in velocity.

6. The target loss prevention behavior analysis method according to claim 4, characterized in that, The scoring function specifically includes: Among them, b x b y Let b be the coordinates of the top left corner of the human body bounding box. w b h f represents the width and height of the human body frame. x f y The coordinates are the location of the face, and the score is the matching score. The higher the score, the higher the matching degree.

7. The target loss prevention behavior analysis method according to claim 1, characterized in that, The update based on the matching result specifically includes: When a face location successfully matches a body location, the corresponding body's behavior statistics from the global feature behavior count set are associated with the matched face's name ID. If the name ID already exists in the global name ID count set, the behavior statistics are incremented. If it does not exist, an entry containing the name ID and corresponding behavior statistics is added to the global name ID count set, and the associated information for that body is removed from the global feature behavior count set. When a face location fails to match a body location, the global name ID count set remains unchanged, and the information corresponding to that body is retained in the global feature behavior count set.

8. A target loss prevention behavior analysis device, characterized in that, include: The extraction module acquires video stream data and extracts human body feature information and facial feature information respectively; The matching module performs spatiotemporal adaptive matching and face and human body position matching on the current video frame. The spatiotemporal adaptive matching calculates the similarity based on the human body position and velocity vector of the preceding and following video frames to determine whether they match. The face and human body position matching filters the human body to be matched based on the spatial relationship between the face position and the human body position. The update module updates the global feature behavior count set and the global name ID count set based on the matching results, and periodically removes target features that have not been updated for a long time, and outputs the behavior analysis results.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the target loss prevention behavior analysis method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the target loss prevention behavior analysis method as described in any one of claims 1 to 7.