Personnel monitoring method, device, system and computer-readable storage medium

By detecting and matching the head feature area in the video frame on the algorithm server, the problem of manual patrol consumes a lot of human resources, and efficient personnel monitoring and alarm generation are achieved.

CN112990093BActive Publication Date: 2025-03-28BOE TECHNOLOGY GROUP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110382098.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-09
Publication Date
2025-03-28
Estimated Expiration
2041-04-09

AI Technical Summary

Technical Problem

The manual inspection methods in the prior art require a lot of human resources, resulting in high labor costs.

Method used

The target video frame is pulled through the algorithm server, detect whether there is a head feature area in the preset area, and match it with the head area in the historical video frame, determine the residence time and identity type of the tracking target, and generate alarm information.

Benefits of technology

It reduces labor costs, improves personnel monitoring efficiency, and can detect invading personnel in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112990093B_ABST
    Figure CN112990093B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a personnel monitoring method, device, system and computer-readable storage medium, including: pulling a target video frame; detecting whether there is a head feature area in a preset area in the target video frame; if at least one first head feature area is detected in the preset area, matching the at least one first head feature area with at least one second head feature area to obtain a matching result; determining the residence time of the tracking target corresponding to the at least one first head feature area in the preset area according to the matching result; performing a target operation according to the residence time of the tracking target in the preset area and the identity type of the identified tracking target. The algorithm server can determine the residence time of the tracking target corresponding to the at least one first head feature area in the preset area, and perform a target operation according to the residence time of the tracking target in the preset area and the identity type of the identified tracking target, which can reduce labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer vision technology, and in particular, to a personnel monitoring method, device, system and computer-readable storage medium. Background Art

[0002] In order to ensure information security and property security, it is necessary to monitor the flow of personnel in relatively open places involving many people and complicated personnel identities. For example, some places of the company involve the company's business information. If non-related personnel enter, it may bring risks to information security.

[0003] In the prior art, these places are inspected manually, but the manual inspection method requires a lot of human resources and has high labor costs. Summary of the invention

[0004] The embodiments of the present application provide a personnel monitoring method, device, system and computer-readable storage medium to solve the technical problem that the manual inspection method in the prior art requires a large amount of human resources and has high labor costs.

[0005] In a first aspect, an embodiment of the present application provides a personnel monitoring method, which is applied to an algorithm server, including:

[0006] Pull the target video frame;

[0007] Detecting whether there is a human head feature area in a preset area in the target video frame;

[0008] If at least one first head feature region is detected in the preset area, the at least one first head feature region is matched with at least one second head region to obtain a matching result, wherein the at least one second head region is obtained based on a historical video frame before the target video frame;

[0009] Determine, according to the matching result, the residence time of the tracking target corresponding to the at least one first head feature area in the preset area;

[0010] A target operation is performed according to the residence time of the tracked target in the preset area and the identified identity type of the tracked target, wherein the target operation includes generating alarm information.

[0011] Optionally, determining, according to the matching result, the residence time of the tracking target corresponding to the at least one first head feature area in the preset area includes:

[0012] When the degree of overlap between the at least one first head feature area and the at least one second head area is greater than the overlap degree threshold, the residence time of the tracking target corresponding to the at least one first head feature area in the preset area is updated; otherwise, a new first tracking target is created based on the first head feature area, and the residence time of the first tracking target is calculated based on the current time.

[0013] Optionally, the method further includes:

[0014] When there is a second target head region in the at least one second head region, the overlap degree of which is less than the overlap degree threshold with all the first head feature regions, updating the number of times the second tracking target corresponding to the second target head region is lost;

[0015] When the number of times the second tracking target corresponding to the second target head area is lost is greater than a preset number, the tracking of the second tracking target is abandoned.

[0016] Optionally, determining, according to the matching result, the residence time of the tracking target corresponding to the at least one first head feature area in the preset area includes:

[0017] When the grayscale similarity between the at least one first head feature area and the at least one second head area is greater than the grayscale similarity threshold, the residence time of the tracking target corresponding to the at least one first head feature area in the preset area is updated; otherwise, a third tracking target is newly created based on the first head feature area, and the residence time of the third tracking target is calculated based on the current time.

[0018] Optionally, before the step of performing a target operation according to the residence time of the tracked target in the preset area and the identified identity type of the tracked target, the method further includes:

[0019] Identify whether at least one first head feature region in a preset region in the target video frame includes a facial feature image;

[0020] If the facial feature image is included, comparing the identified facial feature image with the face database to obtain a comparison result;

[0021] The identity type of the tracking target corresponding to the at least one first head feature area is determined according to the comparison result.

[0022] Optionally, determining the identity type of the tracking target corresponding to the at least one first head feature area according to the comparison result includes:

[0023] When the comparison result indicates that the facial feature image matches the first facial feature image in the face database, and the first target indicated by the first facial feature image is in the blacklist, determining that the identity type of the tracking target corresponding to the at least one first head feature area is an alarm type;

[0024] When the comparison result indicates that the facial feature image matches a second facial feature image in the face database, and the second target indicated by the second facial feature image is in the whitelist, determining that the identity type of the tracking target corresponding to the at least one first head feature area is a non-warning type;

[0025] When the comparison result indicates that the facial feature image does not match the facial feature image in the face database, it is determined that the identity type of the tracking target corresponding to the at least one first head feature area is an unrecognizable type.

[0026] Optionally, before the step of pulling the target video frame, the method further includes:

[0027] Receiving a reference video frame sent by a streaming media server, wherein the reference video frame is obtained by an image acquisition device;

[0028] Identifying a target area in the reference video frame as a preset area, wherein the target area is an area determined by a specific identifier;

[0029] Acquire information of the preset area;

[0030] The detecting whether there is a head feature area in a preset area in the target video frame includes:

[0031] According to the acquired information of the preset area, it is detected whether there is a head feature area in the preset area in the target video frame.

[0032] Optionally, before the step of pulling the target video frame, the method further includes:

[0033] Reading video frames from a streaming media server through at least one reading thread;

[0034] Put the video frame into a video frame buffer;

[0035] The step of pulling the target video frame includes:

[0036] The target video frame is pulled from the video frame buffer by at least one processing thread.

[0037] Optionally, the algorithm server includes a first reading thread, a second reading thread and a target processing thread;

[0038] Before the step of pulling the target video frame, the method further includes:

[0039] When the first reading thread fails to read the video frame from the streaming media server, the reading thread flag bit is changed from the first reading thread flag bit to the second reading thread flag bit;

[0040] Controlling the second reading thread indicated by the second reading thread flag to read video frames from the streaming media server;

[0041] Put the video frame into a video frame buffer;

[0042] The step of pulling the target video frame includes:

[0043] The target processing thread is controlled to pull the target video frame from the video frame buffer.

[0044] In a second aspect, the embodiment of the present application further provides an algorithm server, including:

[0045] A pulling module, used to pull the target video frame;

[0046] A detection module, used to detect whether there is a human head feature area in a preset area in the target video frame;

[0047] A matching module, configured to match the at least one first head feature region with at least one second head region to obtain a matching result if at least one first head feature region is detected in the preset region, wherein the at least one second head region is obtained based on a historical video frame before the target video frame;

[0048] A first determination module, configured to determine, according to the matching result, a stay time of the tracking target corresponding to the at least one first head feature area in the preset area;

[0049] An execution module is used to execute a target operation according to the residence time of the tracking target in the preset area and the identified identity type of the tracking target, wherein the target operation includes generating alarm information.

[0050] Optionally, the first determination module is used to update the residence time of the tracking target corresponding to the at least one first head feature area in the preset area when the degree of overlap between the at least one first head feature area and the at least one second head area is greater than an overlap degree threshold; otherwise, create a new first tracking target based on the first head feature area, and calculate the residence time of the first tracking target based on the current time.

[0051] Optionally, the algorithm server further includes:

[0052] An updating module, configured to update the number of times a second tracking target corresponding to the second target head region is lost when there is a second target head region in the at least one second head region whose overlap degree with all the first head feature regions is less than the overlap degree threshold;

[0053] The tracking abandonment module is used to abandon tracking of the second tracking target when the number of times the second tracking target corresponding to the second target head area is lost is greater than a preset number.

[0054] Optionally, the first determination module is used to update the residence time of the tracking target corresponding to the at least one first human head feature area in the preset area when the grayscale similarity between the at least one first human head feature area and the at least one second human head area is greater than a grayscale similarity threshold; otherwise, create a third tracking target based on the first human head feature area, and calculate the residence time of the third tracking target based on the current time.

[0055] Optionally, the algorithm server further includes:

[0056] A first recognition module, used to recognize whether at least one first head feature area in a preset area in the target video frame includes a face feature image;

[0057] A comparison module, for comparing the identified facial feature image with a face database to obtain a comparison result if the facial feature image is included;

[0058] The second determination module is used to determine the identity type of the tracking target corresponding to the at least one first head feature area according to the comparison result.

[0059] Optionally, the second determining module includes:

[0060] A first determination submodule is configured to determine that the identity type of the tracking target corresponding to the at least one first head feature area is an alarm type when the comparison result indicates that the facial feature image matches the first facial feature image in the face database and the first target indicated by the first facial feature image is in the blacklist;

[0061] A second determination submodule is configured to determine that the identity type of the tracking target corresponding to the at least one first head feature area is a non-warning type when the comparison result indicates that the facial feature image matches a second facial feature image in the face database, and the second target indicated by the second facial feature image is in the whitelist;

[0062] The third determination submodule is used to determine that the identity type of the tracking target corresponding to the at least one first head feature area is an unrecognizable type when the comparison result indicates that the facial feature image does not match the facial feature image in the face database.

[0063] Optionally, the algorithm server further includes:

[0064] A receiving module, used for receiving a reference video frame sent by a streaming media server, wherein the reference video frame is obtained by an image acquisition device;

[0065] A second identification module, used for identifying a target area in the reference video frame as a preset area, wherein the target area is an area determined by a specific identifier;

[0066] An acquisition module, used to acquire information of the preset area;

[0067] The detection module is used to detect whether there is a human head feature area in the preset area in the target video frame according to the acquired information of the preset area.

[0068] Optionally, the algorithm server further includes:

[0069] A reading module, used for reading video frames from a streaming media server through at least one reading thread;

[0070] A first placement module, used for placing the video frame into a video frame buffer;

[0071] The pulling module is used to pull the target video frame from the video frame buffer through at least one processing thread.

[0072] Optionally, the algorithm server includes a first reading thread, a second reading thread and a target processing thread;

[0073] The algorithm server also includes:

[0074] A modification module, configured to change a reading thread flag bit from a first reading thread flag bit to a second reading thread flag bit when a failure occurs in the first reading thread reading a video frame from a streaming media server;

[0075] A control module, used for controlling the second reading thread indicated by the second reading thread flag to read video frames from the streaming media server;

[0076] A second placement module, used for placing the video frame into a video frame buffer;

[0077] The pulling module is used to control the target processing thread to pull the target video frame from the video frame buffer.

[0078] In a third aspect, an embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the processor is used to implement the steps of the personnel monitoring method described in the first aspect when executing a computer program stored in the memory.

[0079] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the personnel monitoring method described in the first aspect are implemented.

[0080] In a fifth aspect, an embodiment of the present application further provides a personnel monitoring system, including a streaming media server, a service server, and an algorithm server for implementing the personnel monitoring method described in the first aspect;

[0081] The streaming media server is used to receive video data collected by the image acquisition device and convert the video data into video frames;

[0082] The algorithm server is used to read the video frame from the streaming media server;

[0083] The business server is used to receive the alarm information sent by the algorithm server;

[0084] An intrusion work order is generated according to the alarm information, so as to send the intrusion work order to the user terminal.

[0085] It can be seen from the above technical solutions that the embodiments of the present application provide a personnel monitoring method, device, system and computer-readable storage medium, pull a target video frame; detect whether there is a head feature area in the preset area in the target video frame; if at least one first head feature area is detected in the preset area, match the at least one first head feature area with at least one second head area to obtain a matching result, wherein the at least one second head area is obtained based on the historical video frame before the target video frame; determine the residence time of the tracking target corresponding to the at least one first head feature area in the preset area according to the matching result; perform a target operation according to the residence time of the tracking target in the preset area and the identified identity type of the tracking target, wherein the target operation includes generating an alarm message. In this way, the algorithm server can determine the residence time of the tracking target corresponding to the at least one first head feature area in the preset area based on the target video frame and the historical video frame, and perform a target operation according to the residence time of the tracking target in the preset area and the identified identity type of the tracking target. Wherein, the target operation includes generating an alarm message, which can reduce labor costs, and can also detect intruders in time, thereby improving the efficiency of personnel monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] Figure 1A flowchart of a personnel monitoring method provided in an embodiment of the present application;

[0087] Figure 2 A schematic diagram of a target video frame marked with a face recognition frame of a tracking target located in a blacklist provided in an embodiment of the present application;

[0088] Figure 3 A structural diagram of an algorithm server provided in an embodiment of the present application;

[0089] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present application;

[0090] Figure 5 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present application;

[0091] Figure 6 A schematic diagram of a personnel monitoring system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0092] In order to better understand the technical solutions provided by the embodiments of this specification, the technical solutions of the embodiments of this specification are described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of this specification and the specific features in the embodiments are detailed descriptions of the technical solutions of the embodiments of this specification, rather than limitations on the technical solutions of this specification. In the absence of conflict, the embodiments of this specification and the technical features in the embodiments can be combined with each other.

[0093] In this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the statement "comprise one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements. The term "more than two" includes two or more than two situations.

[0094] See also Figure 1 , Figure 1 This is a flow chart of a personnel monitoring method provided in an embodiment of the present application, which is applied to an algorithm server. Figure 1 As shown, the following steps are included:

[0095] Step 101: Pull the target video frame.

[0096] Step 102: Detect whether there is a human head feature area in a preset area in the target video frame.

[0097] Step 103: If it is detected that at least one first head feature area exists in the preset area, the at least one first head feature area is matched with at least one second head area to obtain a matching result, wherein the at least one second head area is obtained based on a historical video frame before the target video frame.

[0098] Step 104: Determine the residence time of the tracking target corresponding to the at least one first head feature area in the preset area according to the matching result.

[0099] Step 105: Execute a target operation according to the residence time of the tracked target in the preset area and the identified identity type of the tracked target, wherein the target operation includes generating alarm information.

[0100] In a specific embodiment, in step 101, a target video frame may be pulled from a video frame buffer.

[0101] In step 102, the algorithm server may detect whether there is a head feature region in a preset area in the target video frame. The head feature region may be a region including a head image, for example, a rectangular region including a head image.

[0102] In a specific embodiment, in step 103, if at least one first head feature area is detected in the preset area, the at least one first head feature area can be matched with at least one second head feature area to obtain a matching result. Each first head feature area corresponds to a head image, and each first head feature area corresponds to a tracking target. It should be noted that the at least one second head area is obtained based on a historical video frame containing at least one head feature area obtained before the target video frame. In an actual application scenario, the at least one second head area can be a head area of ​​at least one tracking target in the target video frame predicted based on the at least one head feature area contained in the historical video frame; or, the at least one second head area can be at least one head feature area contained in the historical video frame itself.

[0103] In some embodiments, step 104 includes:

[0104] When the degree of overlap between the at least one first head feature area and the at least one second head area is greater than the overlap degree threshold, the residence time of the tracking target corresponding to the at least one first head feature area in the preset area is updated; otherwise, a new first tracking target is created based on the first head feature area, and the residence time of the first tracking target is calculated based on the current time.

[0105] In a specific implementation process, when the degree of overlap between at least one first head feature area and at least one second head area is greater than the overlap degree threshold, the residence time of the tracking target corresponding to at least one first head feature area in the preset area can be updated. The overlap degree can be the area of ​​the intersection of the first head feature area and the second head area divided by the area of ​​the union of the two. For example, it is assumed that three first head feature areas are detected in the preset area in the target video frame; the number of second head areas of at least one tracking target predicted in the target video frame according to the at least one head feature area contained in the historical video frame is also three. If the degree of overlap between each of the three first head feature areas and each of the three second head areas is greater than the overlap degree threshold, it means that the three tracking targets that have appeared in the historical video frame have been monitored again. At this time, the residence time of the three tracking targets corresponding to the three first head feature areas in the preset area can be updated. Furthermore, the number of times the three tracking targets that have appeared in the historical video frame can be set to zero.

[0106] Alternatively, it is assumed that there are five first head feature areas detected in the preset area in the target video frame; the number of second head areas of at least one tracking target predicted in the target video frame according to at least one head feature area contained in the historical video frame is three. If the degree of overlap between two of the five first head feature areas and two of the three second head areas is greater than the overlap degree threshold, and the degree of overlap between the remaining three first head feature areas and the three second head areas is less than the overlap degree threshold, it can be considered that three new tracking targets have appeared. At this time, a new first tracking target can be created based on the remaining three first head feature areas, and the residence time of the first tracking target is calculated based on the current time. The identity IDs of the three first tracking targets can also be set to -1, indicating that the identity of the first tracking target is in an unrecognized state. In this way, when the degree of overlap between at least one first head feature area and at least one second head area is greater than the overlap degree threshold, it means that the target that appeared in the monitoring range in the historical process appears again in the target video frame at the current moment, that is, the tracking of the target is achieved at this time.

[0107] In some embodiments, the method further comprises:

[0108] When there is a second target head region in the at least one second head region, the overlap degree of which is less than the overlap degree threshold with all the first head feature regions, updating the number of times the second tracking target corresponding to the second target head region is lost;

[0109] When the number of times the second tracking target corresponding to the second target head area is lost is greater than a preset number, the tracking of the second tracking target is abandoned.

[0110] Furthermore, when there is a second target head region in at least one second head region whose overlap with all first head feature regions is less than the overlap threshold, for example, as mentioned above, when there is a second target head region in three second head regions whose overlap with five first head feature regions is less than the overlap threshold, the number of times the second tracking target corresponding to the second target head region is lost can be updated. When the number of times the second tracking target corresponding to the second target head region is lost is greater than the preset number, it is considered that it is no longer within the monitoring range, and tracking of the second tracking target can be abandoned at this time. Computing resources can be saved.

[0111] In some embodiments, step 104 further includes:

[0112] When the grayscale similarity between the at least one first head feature area and the at least one second head area is greater than the grayscale similarity threshold, the residence time of the tracking target corresponding to the at least one first head feature area in the preset area is updated; otherwise, a third tracking target is newly created based on the first head feature area, and the residence time of the third tracking target is calculated based on the current time.

[0113] In a specific implementation process, the difference between the timestamp of the target video frame and the timestamp of the historical video frame can be calculated. When the difference exceeds a preset threshold, it indicates that a freeze occurs when the algorithm server reads the video frame from the streaming media server. At this time, the at least one second head region can be at least one head feature region contained in the historical video frame itself.

[0114] When the grayscale similarity between at least one first head feature region and at least one second head region is greater than the grayscale similarity threshold, the residence time of the tracking target corresponding to the at least one first head feature region in the preset area can be updated. The grayscale similarity R(x, y) can be calculated by the following formula:

[0115]

[0116] Among them, T′(x′, y′) is the difference between the grayscale value of each pixel in the multiple pixels included in the first head feature area and the average grayscale value corresponding to the first head feature area, and I′(x+x′, y+y′) is the difference between the grayscale value of each pixel in the multiple pixels included in the second head area and the average grayscale value corresponding to the second head area.

[0117] For example, suppose that three first head feature areas are detected in the preset area in the target video frame; and the historical video frame itself also contains at least three second head areas. If the grayscale similarity between each of the three first head feature areas and each of the three second head areas is greater than the grayscale similarity threshold, it means that the three tracking targets that have appeared in the historical video frame have been monitored again. At this time, the residence time of the three tracking targets corresponding to the three first head feature areas in the preset area can be updated. Furthermore, the number of times the three tracking targets that have appeared in the historical video frame can be set to zero.

[0118] Alternatively, it is assumed that five first head feature areas are detected in the preset area of ​​the target video frame; and the historical video frame itself contains at least three second head areas. If the grayscale similarity between two of the five first head feature areas and two of the three second head areas is greater than the grayscale similarity threshold, and the grayscale similarity between the remaining three first head feature areas and the three second head areas is less than the grayscale similarity threshold, it can be considered that three new tracking targets have appeared. At this time, a third tracking target can be newly created based on the remaining three first head feature areas, and the residence time of the third tracking target can be calculated based on the current time. The identity IDs of the three third tracking targets can also be set to -1, indicating that the identity of the third tracking target is in an unidentified state. In this way, when the algorithm server reads the video frame from the streaming media server and there is a freeze phenomenon, the target that appeared in the monitoring range in the historical process can be tracked according to the grayscale similarity between at least one first head feature area and at least one second head area, and the target that appeared most recently in the monitoring range can also be identified. Furthermore, the residence time of the tracking target corresponding to at least one first head feature area in the preset area can be determined, which can improve the accuracy.

[0119] In some embodiments, before step 105, the method further includes:

[0120] Identify whether at least one first head feature region in a preset region in the target video frame includes a facial feature image;

[0121] If the facial feature image is included, comparing the identified facial feature image with the face database to obtain a comparison result;

[0122] The identity type of the tracking target corresponding to the at least one first head feature area is determined according to the comparison result.

[0123] In the specific implementation process, it is possible to identify whether at least one first head feature area in a preset area in the target video frame includes a facial feature image. Furthermore, it is possible to only identify whether the first head feature area of ​​the tracking target whose identity ID is -1, that is, whose identity is in an unrecognized state, includes a facial feature image. In this way, the amount of calculation can be saved. If a facial feature image is included, the identified facial feature image can be compared with the face database to obtain a comparison result. Next, the identity type of the tracking target corresponding to the at least one first head feature area can be determined based on the comparison result. In this way, when the first head feature area in the preset area in the target video frame includes a facial feature image, face recognition can also be performed, and the identity type of the tracking target can be further determined.

[0124] In some embodiments, determining the identity type of the tracking target corresponding to the at least one first head feature area according to the comparison result includes:

[0125] When the comparison result indicates that the facial feature image matches the first facial feature image in the face database, and the first target indicated by the first facial feature image is in the blacklist, determining that the identity type of the tracking target corresponding to the at least one first head feature area is an alarm type;

[0126] When the comparison result indicates that the facial feature image matches a second facial feature image in the face database, and the second target indicated by the second facial feature image is in the whitelist, determining that the identity type of the tracking target corresponding to the at least one first head feature area is a non-warning type;

[0127] When the comparison result indicates that the facial feature image does not match the facial feature image in the face database, it is determined that the identity type of the tracking target corresponding to the at least one first head feature area is an unrecognizable type.

[0128] In a specific implementation process, when the comparison result indicates that the facial feature image matches the first facial feature image in the face database, and the first target indicated by the first facial feature image is in the blacklist, it can be determined that the identity type of the tracking target corresponding to at least one first head feature area is an alarm type; when the comparison result indicates that the facial feature image matches the second facial feature image in the face database, and the second target indicated by the second facial feature image is in the whitelist, it can be determined that the identity type of the tracking target corresponding to at least one first head feature area is a non-alarm type; when the comparison result indicates that the facial feature image does not match the facial feature image in the face database, it can be determined that the identity type of the tracking target corresponding to at least one first head feature area is an unrecognizable type. For example, if the identity ID in the preset area in the target video frame is -1, that is, the facial feature image of the tracking target whose identity is in an unrecognized state does not match any facial feature image in the face database, it can be determined that the identity type of the tracking target is an unrecognizable type, that is, the identity ID of the tracking target can be maintained as -1. In this way, the identity type of the tracking target corresponding to the first head feature area can be determined according to the facial feature image comparison result and the preset blacklist and whitelist, the calculation process is simple, and computing resources are saved.

[0129] In the specific implementation process, when the tracking target stays in the preset area for less than the preset time, no alarm information is generated. In actual scenarios, the tracking target may only temporarily pass through the monitoring range and will soon leave the monitoring range. Therefore, a preset time can be set. If the tracking target stays in the preset area for less than the preset time, no alarm information is generated, which can save computing resources.

[0130] In the specific implementation process, when the residence time of the tracking target in the preset area exceeds the preset time and the identity type of the tracking target is an alarm type, an alarm message is generated; or, when the residence time of the tracking target in the preset area exceeds the preset time and the identity type of the tracking target is a non-alarm type, no alarm message is generated; or, when the residence time of the tracking target in the preset area exceeds the preset time and the identity type of the tracking target is an unrecognizable type, an alarm message is generated according to the alarm rule corresponding to the unrecognizable type. For example, the alarm rule corresponding to the unrecognizable type can be set to require an alarm or not require an alarm according to actual needs. In this way, when generating the alarm message, the residence time of the tracking target in the preset area and the identified identity type of the tracking target can be comprehensively considered to ensure the accuracy of the alarm.

[0131] In some embodiments, before step 101, the method further includes:

[0132] Receiving a reference video frame sent by a streaming media server, wherein the reference video frame is obtained by an image acquisition device;

[0133] Identifying a target area in the reference video frame as a preset area, wherein the target area is an area determined by a specific identifier;

[0134] Acquire information of the preset area;

[0135] The detecting whether there is a head feature area in a preset area in the target video frame includes:

[0136] According to the acquired information of the preset area, it is detected whether there is a head feature area in the preset area in the target video frame.

[0137] In the specific implementation process, a reference video frame sent by a streaming media server can also be received, wherein the reference video frame is captured by an image acquisition device and sent to the streaming media server. For example, a tape of a specific color can be pasted on the ground within the monitoring range in advance, and the image acquisition device can capture a reference video frame of the ground with the tape of a specific color pasted, and send the reference video frame to the streaming media server. Then, the target area in the reference video frame can be identified as a preset area. Among them, the target area is an area determined by a specific identifier. That is, the area divided by the tape of a specific color in the reference video frame can be identified as a preset area. Next, the information of the preset area can be obtained. Then, based on the information of the preset area obtained, it can be detected whether there is a head feature area in the preset area in the target video frame. In this way, the target area in the reference video frame can be automatically identified as a preset area, saving operation steps.

[0138] During the specific implementation process, the information of the preset area sent by the business server can also be received. The information of the preset area is determined by the business server based on the received user-selected area. For example, the information of the preset area can be the coordinates of the preset area. The algorithm server can detect whether there is a head feature area in the preset area in the target video frame based on the information of the preset area. In this way, the user can manually set the preset area according to his own needs, and can select the location of the preset area and the number of preset areas according to actual needs. The flexibility of setting the preset area is good.

[0139] In some embodiments, before step 101, the method further includes:

[0140] Reading video frames from a streaming server through at least one reading thread;

[0141] Put the video frame into a video frame buffer;

[0142] The step of pulling the target video frame includes:

[0143] The target video frame is pulled from the video frame buffer by at least one processing thread.

[0144] In the specific implementation process, at least one reading thread can also be used to read video frames from the streaming media server, and the read video frames can be placed in the video frame buffer. Then, the target video frame can be pulled from the video frame buffer by at least one processing thread, and at least one processing thread can be used to detect whether there is a head feature area in the preset area in the target video frame. In this way, at least one reading thread and at least one processing thread can be used to implement personnel monitoring, avoiding the occurrence of failure to pull video streams due to the slow processing speed of a single thread, and ensuring that the process of personnel monitoring can be carried out for a long time. Compared with the method of using only a single thread for personnel monitoring, the use of multiple threads for personnel monitoring is more efficient and has better real-time performance.

[0145] In some embodiments, the algorithm server includes a first reading thread, a second reading thread, and a target processing thread;

[0146] Before step 101, the method further includes:

[0147] Before the step of pulling the target video frame, the method further includes:

[0148] When the first reading thread fails to read the video frame from the streaming media server, the reading thread flag bit is changed from the first reading thread flag bit to the second reading thread flag bit;

[0149] Controlling the second reading thread indicated by the second reading thread flag to read video frames from the streaming media server;

[0150] Put the video frame into a video frame buffer;

[0151] The step of pulling the target video frame includes:

[0152] The target processing thread is controlled to pull the target video frame from the video frame buffer.

[0153] In a specific implementation process, the algorithm server may include a first reading thread, a second reading thread and a target processing thread. When the first reading thread fails to read a video frame from a streaming media server, the reading thread flag may be changed from the first reading thread flag to the second reading thread flag. Next, the second reading thread indicated by the second reading thread flag may be controlled to read a video frame from the streaming media server. For example, when the second reading thread detects that the reading thread flag is changed from the first reading thread flag to the second reading thread flag, the video frame may be read from the streaming media server. Then, the video frame may be put into a video frame buffer. Next, the target processing thread may be controlled to pull a target video frame from the video frame buffer, and the target processing thread may be used to detect whether there is a head feature area in a preset area in the target video frame. In this way, using this fault-tolerant mechanism, when the first reading thread fails to read a video frame from a streaming media server, it may be automatically switched to the second reading thread to read a video frame from the streaming media server, thereby ensuring that the process of reading a video frame from the streaming media server will not be interrupted due to a failure of a single reading thread, and the fault tolerance is good.

[0154] During the specific implementation process, the algorithm server may also send alarm information to the business server, so that the business server generates an intrusion work order according to the alarm information, and sends the intrusion work order to the user terminal, ie, the staff's terminal.

[0155] It should be noted that the alarm information may include the current time of the algorithm server, the identity ID of the tracking target in the blacklist, the time when the tracking target in the blacklist enters the preset area, the ID of the camera, and the target video frame marked with the face recognition frame of the tracking target in the blacklist. Figure 2 , which is a schematic diagram of a target video frame marked with a face recognition frame of a tracking target located in a blacklist. Figure 2 In the example, the area surrounded by the large box in the target video frame is the preset area, and the small box in the large box is the face recognition box of the tracking target in the blacklist. This makes it easy for staff to quickly locate intruders.

[0156] The camera is the camera that shoots the target video frame. The intrusion work order may include the camera ID that shoots the target video frame. In this way, the staff can check the situation of the intruder in the monitoring area indicated by the camera ID according to the camera ID in the intrusion work order received by the terminal.

[0157] Furthermore, after the business server generates an intrusion work order based on the alarm information and sends the intrusion work order to the staff's terminal, it can send a suspension execution message to the algorithm server. Specifically, the suspension execution message can be sent through redis communication or HTTP protocol communication. After the algorithm server receives the suspension execution message, it can suspend pulling video frames from the video frame buffer and detecting whether there is a human head feature area in the preset area in the video frame. After the staff has handled the on-site intrusion, they can send a processing completion message to the business server through the terminal. After the business server receives the processing completion message, it can send a resume execution message to the algorithm server. The algorithm server can resume pulling video frames from the video frame buffer and detecting whether there is a human head feature area in the preset area in the video frame based on the received resume execution message.

[0158] It should be noted that in the prior art, these places are inspected manually, but the manual inspection method requires a lot of human resources and has a high labor cost.

[0159] In the embodiment of the present application, the algorithm server can determine the residence time of the tracking target corresponding to at least one first head feature area in the preset area based on the target video frame and the historical video frame, and perform the target operation according to the residence time of the tracking target in the preset area and the identity type of the identified tracking target. Among them, the target operation includes generating alarm information, which can reduce labor costs, and can also detect intruders in time, thereby improving the efficiency of personnel monitoring.

[0160] It can be seen from the above technical solutions that a personnel monitoring method provided by the embodiment of the present application is applied to an algorithm server. Pull a target video frame; detect whether there is a head feature area in a preset area in the target video frame; if at least one first head feature area is detected in the preset area, match the at least one first head feature area with at least one second head area to obtain a matching result, wherein the at least one second head area is obtained based on a historical video frame before the target video frame; determine the residence time of the tracking target corresponding to the at least one first head feature area in the preset area according to the matching result; perform a target operation according to the residence time of the tracking target in the preset area and the identified identity type of the tracking target, wherein the target operation includes generating an alarm message. In this way, the algorithm server can determine the residence time of the tracking target corresponding to the at least one first head feature area in the preset area based on the target video frame and the historical video frame, and perform a target operation according to the residence time of the tracking target in the preset area and the identified identity type of the tracking target. Wherein, the target operation includes generating an alarm message, which can reduce labor costs, and can also detect intruders in time, thereby improving the efficiency of personnel monitoring.

[0161] See also Figure 3 , Figure 3 is a structural diagram of an algorithm server provided in an embodiment of the present application. Figure 3 As shown, the algorithm server 300 includes a pulling module 301, a detection module 302, a matching module 303, a first determination module 304 and an execution module 305, wherein:

[0162] A pulling module 301 is used to pull a target video frame;

[0163] A detection module 302 is used to detect whether there is a head feature area in a preset area in the target video frame;

[0164] The matching module 303 is configured to match the at least one first head feature region with at least one second head region to obtain a matching result if at least one first head feature region is detected in the preset region, wherein the at least one second head region is obtained based on a historical video frame before the target video frame;

[0165] A first determination module 304 is used to determine the residence time of the tracking target corresponding to the at least one first head feature area in the preset area according to the matching result;

[0166] The execution module 305 is used to execute a target operation according to the residence time of the tracked target in the preset area and the identified identity type of the tracked target, wherein the target operation includes generating alarm information.

[0167] Optionally, the first determination module 304 is used to update the residence time of the tracking target corresponding to the at least one first head feature area in the preset area when the degree of overlap between the at least one first head feature area and the at least one second head area is greater than an overlap degree threshold; otherwise, a new first tracking target is created based on the first head feature area, and the residence time of the first tracking target is calculated based on the current time.

[0168] Optionally, the algorithm server further includes:

[0169] An updating module 306 is configured to update the number of lost tracking times of a second tracking target corresponding to the second target head region when there is a second target head region in the at least one second head region whose overlap degree with all the first head feature regions is less than the overlap degree threshold;

[0170] The tracking abandonment module 307 is configured to abandon tracking of the second tracking target when the number of times the second tracking target corresponding to the second target head area is lost is greater than a preset number.

[0171] Optionally, the first determination module 304 is used to update the residence time of the tracking target corresponding to the at least one first human head feature area in the preset area when the grayscale similarity between the at least one first human head feature area and the at least one second human head area is greater than a grayscale similarity threshold; otherwise, create a third tracking target based on the first human head feature area, and calculate the residence time of the third tracking target based on the current time.

[0172] Optionally, the algorithm server further includes:

[0173] A first recognition module 308, configured to recognize whether at least one first head feature region in a preset region in the target video frame includes a face feature image;

[0174] A comparison module 309 is used to compare the identified facial feature image with the face database to obtain a comparison result if the facial feature image is included;

[0175] The second determination module 3010 is used to determine the identity type of the tracking target corresponding to the at least one first head feature area according to the comparison result.

[0176] Optionally, the second determining module 3010 includes:

[0177] A first determination submodule 30101 is configured to determine that the identity type of the tracking target corresponding to the at least one first head feature area is an alarm type when the comparison result indicates that the facial feature image matches the first facial feature image in the face database, and the first target indicated by the first facial feature image is in the blacklist;

[0178] A second determination submodule 30102 is configured to determine that the identity type of the tracking target corresponding to the at least one first head feature area is a non-warning type when the comparison result indicates that the facial feature image matches a second facial feature image in the face database, and the second target indicated by the second facial feature image is in the whitelist;

[0179] The third determination submodule 30103 is used to determine that the identity type of the tracking target corresponding to the at least one first head feature area is an unrecognizable type when the comparison result indicates that the facial feature image does not match the facial feature image in the face database.

[0180] Optionally, the algorithm server further includes:

[0181] The receiving module 3011 is used to receive a reference video frame sent by a streaming media server, wherein the reference video frame is obtained by an image acquisition device;

[0182] A second identification module 3012 is used to identify a target area in the reference video frame as a preset area, wherein the target area is an area determined by a specific identifier;

[0183] The acquisition module 3013 is used to acquire the information of the preset area;

[0184] The detection module 302 is used to detect whether there is a human head feature area in the preset area in the target video frame according to the acquired information of the preset area.

[0185] Optionally, the algorithm server further includes:

[0186] A reading module 3014, configured to read video frames from a streaming media server through at least one reading thread;

[0187] A first placement module 3015, configured to place the video frame into a video frame buffer;

[0188] The pulling module 301 is used to pull the target video frame from the video frame buffer through at least one processing thread.

[0189] Optionally, the algorithm server includes a first reading thread, a second reading thread and a target processing thread;

[0190] The algorithm server also includes:

[0191] A modification module 3016, configured to change the reading thread flag bit from the first reading thread flag bit to the second reading thread flag bit when the first reading thread fails to read the video frame from the streaming media server;

[0192] A control module 3017, configured to control the second reading thread indicated by the second reading thread flag to read video frames from the streaming media server;

[0193] A second placement module 3018, configured to place the video frame into a video frame buffer;

[0194] The pulling module 301 is used to control the target processing thread to pull the target video frame from the video frame buffer.

[0195] The algorithm server 300 can achieve Figure 1In order to avoid repetition, the various processes implemented by the algorithm server in the method embodiment will not be described here. The algorithm server 300 can determine the residence time of the tracking target corresponding to at least one first head feature area in the preset area based on the target video frame and the historical video frame, and perform the target operation according to the residence time of the tracking target in the preset area and the identity type of the identified tracking target. Among them, the target operation includes generating alarm information, which can reduce labor costs, and can also detect intruders in time, thereby improving the efficiency of personnel monitoring.

[0196] like Figure 4 As shown, an embodiment of the present application provides an electronic device 400, including a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and executable on the processor 420. When the processor 420 executes the computer program 411, the following steps are implemented:

[0197] Pull the target video frame;

[0198] Detecting whether there is a human head feature area in a preset area in the target video frame;

[0199] If at least one first head feature region is detected in the preset area, the at least one first head feature region is matched with at least one second head region to obtain a matching result, wherein the at least one second head region is obtained based on a historical video frame before the target video frame;

[0200] Determine, according to the matching result, the residence time of the tracking target corresponding to the at least one first head feature area in the preset area;

[0201] A target operation is performed according to the residence time of the tracked target in the preset area and the identified identity type of the tracked target, wherein the target operation includes generating alarm information.

[0202] In the specific implementation process, when the processor 420 executes the computer program 411, it can achieve Figure 1 Any implementation manner in the corresponding embodiments.

[0203] Since the electronic device introduced in this embodiment is a device used to implement an algorithm server in the embodiment of the present application, based on the method introduced in the embodiment of the present application, technical personnel in this field can understand the specific implementation method of the electronic device of this embodiment and its various variations. Therefore, how the electronic device implements the method in the embodiment of the present application is not introduced in detail here. As long as the devices used by technical personnel in this field to implement the methods in the embodiments of the present application are within the scope of protection of the embodiments of the present application.

[0204] See also Figure 5 , Figure 5 A schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present application.

[0205] like Figure 5 As shown, this embodiment provides a computer-readable storage medium 500, on which a computer program 511 is stored. When the computer program 511 is executed by a processor, the following steps are implemented:

[0206] Pull the target video frame;

[0207] Detecting whether there is a human head feature area in a preset area in the target video frame;

[0208] If at least one first head feature region is detected in the preset area, the at least one first head feature region is matched with at least one second head region to obtain a matching result, wherein the at least one second head region is obtained based on a historical video frame before the target video frame;

[0209] Determine, according to the matching result, the residence time of the tracking target corresponding to the at least one first head feature area in the preset area;

[0210] A target operation is performed according to the residence time of the tracked target in the preset area and the identified identity type of the tracked target, wherein the target operation includes generating alarm information.

[0211] In the specific implementation process, when the computer program 511 is executed by the processor, it can achieve Figure 1 Any implementation manner in the corresponding embodiments.

[0212] See also Figure 6 , Figure 6 The schematic diagram of a personnel monitoring system 600 provided in an embodiment of the present application includes a streaming media server 601, a service server 603 and the algorithm server 602 in the above-mentioned embodiment.

[0213] The streaming media server 601 is used to receive video data collected by the image acquisition device and convert the video data into video frames;

[0214] The algorithm server 602 is used to read the video frame from the streaming media server 601;

[0215] The business server 603 is used to receive the alarm information sent by the algorithm server 602;

[0216] An intrusion work order is generated according to the alarm information, so as to send the intrusion work order to the user terminal.

[0217] The streaming media server 601 is used to receive the video data collected by the image acquisition device and convert the video data into video frames. The algorithm server 602 reads the video frame from the streaming media server 601 and puts the read video frame into the video frame buffer. Then the algorithm server 602 can pull the target video frame from the video frame buffer and detect whether there is a head feature area in the preset area in the target video frame. The business server 603 is used to receive the alarm information sent by the algorithm server 602, generate an intrusion work order according to the alarm information, and send the intrusion work order to the user terminal, that is, the staff's terminal. So that the staff can check the situation of the intruder according to the intrusion work order received by the terminal.

[0218] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0219] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the embodiments of the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0220] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0221] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0222] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0223] An embodiment of the present application also provides a computer program product, which includes computer software instructions. When the computer software instructions are executed on a processing device, the processing device executes the process in the personnel monitoring method in the embodiment corresponding to Figure 1.

[0224] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0225] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0226] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0227] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0228] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0229] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-OnlyMemory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.

[0230] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A personnel monitoring method, applied to an algorithm server, characterized in that: include: Pull the target video frame; Detecting whether there is a human head feature area in a preset area in the target video frame; If at least one first head feature region is detected in the preset area, the at least one first head feature region is matched with at least one second head region to obtain a matching result, wherein the at least one second head region is obtained based on a historical video frame before the target video frame; Determine, according to the matching result, the residence time of the tracking target corresponding to the at least one first head feature area in the preset area; Performing a target operation according to the residence time of the tracked target in the preset area and the identified identity type of the tracked target, wherein the target operation includes generating alarm information; The step of determining the residence time of the tracking target corresponding to the at least one first head feature area in the preset area according to the matching result includes: When the degree of overlap between the at least one first head feature region and the at least one second head region is greater than an overlap degree threshold, updating the residence time of the tracking target corresponding to the at least one first head feature region in the preset region; otherwise, creating a new first tracking target based on the first head feature region, and calculating the residence time of the first tracking target based on the current time; and / or, When the grayscale similarity between the at least one first head feature area and the at least one second head area is greater than the grayscale similarity threshold, the residence time of the tracking target corresponding to the at least one first head feature area in the preset area is updated; otherwise, a third tracking target is newly created based on the first head feature area, and the residence time of the third tracking target is calculated based on the current time.

2. The method according to claim 1, characterized in that The method further comprises: When there is a second target head region in the at least one second head region, the overlap degree of which is less than the overlap degree threshold with all the first head feature regions, updating the number of times the second tracking target corresponding to the second target head region is lost; When the number of times the second tracking target corresponding to the second target head area is lost is greater than a preset number, the tracking of the second tracking target is abandoned.

3. The method according to claim 1, characterized in that Before the step of performing a target operation according to the residence time of the tracked target in the preset area and the identified identity type of the tracked target, the method further includes: Identify whether at least one first head feature region in a preset region in the target video frame includes a facial feature image; If the facial feature image is included, comparing the identified facial feature image with the face database to obtain a comparison result; The identity type of the tracking target corresponding to the at least one first head feature area is determined according to the comparison result.

4. The method according to claim 3, characterized in that The determining, according to the comparison result, the identity type of the tracking target corresponding to the at least one first head feature area comprises: When the comparison result indicates that the facial feature image matches the first facial feature image in the face database, and the first target indicated by the first facial feature image is in the blacklist, determining that the identity type of the tracking target corresponding to the at least one first head feature area is an alarm type; When the comparison result indicates that the facial feature image matches a second facial feature image in the face database, and the second target indicated by the second facial feature image is in the whitelist, determining that the identity type of the tracking target corresponding to the at least one first head feature area is a non-warning type; When the comparison result indicates that the facial feature image does not match the facial feature image in the face database, it is determined that the identity type of the tracking target corresponding to the at least one first head feature area is an unrecognizable type.

5. The method according to any one of claims 1 to 4, characterized in that Before the step of pulling the target video frame, the method further includes: Receiving a reference video frame sent by a streaming media server, wherein the reference video frame is obtained by an image acquisition device; Identifying a target area in the reference video frame as a preset area, wherein the target area is an area determined by a specific identifier; Acquire information of the preset area; The detecting whether there is a head feature area in a preset area in the target video frame includes: According to the acquired information of the preset area, it is detected whether there is a head feature area in the preset area in the target video frame.

6. The method according to claim 1, characterized in that Before the step of pulling the target video frame, the method further includes: Reading video frames from a streaming server through at least one reading thread; Put the video frame into a video frame buffer; The step of pulling the target video frame includes: The target video frame is pulled from the video frame buffer by at least one processing thread.

7. The method according to claim 1, characterized in that The algorithm server comprises a first reading thread, a second reading thread and a target processing thread; Before the step of pulling the target video frame, the method further includes: When the first reading thread fails to read the video frame from the streaming media server, the reading thread flag bit is changed from the first reading thread flag bit to the second reading thread flag bit; Controlling the second reading thread indicated by the second reading thread flag to read video frames from the streaming media server; Put the video frame into a video frame buffer; The step of pulling the target video frame includes: The target processing thread is controlled to pull the target video frame from the video frame buffer.

8. An electronic device, comprising a memory and a processor, characterized in that: The processor is configured to implement the steps of the personnel monitoring method according to any one of claims 1 to 7 when executing the computer program stored in the memory.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the personnel monitoring method according to any one of claims 1 to 7 are implemented.

10. A personnel monitoring system, characterized in that: It comprises a streaming media server, a business server and an algorithm server for implementing the personnel monitoring method according to any one of claims 1 to 7; The streaming media server is used to receive video data collected by the image acquisition device and convert the video data into video frames; The algorithm server is used to read the video frame from the streaming media server; The business server is used to receive the alarm information sent by the algorithm server; An intrusion work order is generated according to the alarm information, so as to send the intrusion work order to the user terminal.

Citation Information

Patent Citations

  • Method and device for tracking video target

    CN106845385A

  • Face tracking method and apparatus, terminal and storage medium

    CN107944381A