Method and apparatus for processing video
Through the division and analysis of the identification of video acquisition equipment, the problem of inefficiency of existing video surveillance methods is solved, efficient human object detection and behavior recognition are achieved, and a variety of application scenarios are adapted to.
Patent Information
- Application Number
- CN201910773189.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-21
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2039-08-21
AI Technical Summary
The existing video surveillance methods are inefficient in human object detection and behavior recognition, and are easily disturbed, unable to deeply identify fine-grained behaviors, and have high labor costs, making it difficult to adapt to most application scenarios.
By obtaining the task type and video acquisition device identifier in the task request, we can determine whether it is a patrol task, divide the device identification set, and analyze and process the video in turn, including human detection, tracking, attribute recognition and behavior prompts, etc., to improve processing efficiency.
It realizes efficient processing of video surveillance tasks, improves the accuracy of human object detection and behavior recognition, reduces labor costs, and adapts to a variety of application scenarios.
Smart Images

Figure CN110378323B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and particularly to methods and devices for processing videos. Background Art
[0002] With the wide application of deep learning in recent years, video processing technology has made new breakthroughs. Video processing has been widely used in many fields such as ensuring public safety, personal safety, and management of specific personnel. At present, it is possible to complete high-precision detection and recognition of human body images appearing in video frames collected by video acquisition devices (such as cameras). In the past, when it was necessary to monitor a certain area, methods such as manual monitoring and inspection, on-site manual duty, and traditional video analysis were generally adopted. Manual monitoring and inspection usually requires manual periodic switching of video acquisition devices to supervise the behavior of personnel. For example, the monitoring in prisons, urban management command centers, etc. This method has poor timeliness, high labor costs, and low processing efficiency. On-site manual duty means arranging on-site personnel to be on duty in the monitored place. Although this method ensures timeliness, it has high labor costs and low processing efficiency. Traditional video processing and analysis mainly rely on traditional image processing methods such as manual modeling, sliding window, and optical flow detection to extract moving targets in video frames to judge the personnel activities in the area. This method uses pattern recognition methods to complete the monitoring of human body behaviors in the monitored area, but has poor detection effects on human body targets and is easily interfered by other target objects. In addition, for fine-grained behaviors of human body targets, such as postures, actions, attributes, identities, etc., in-depth discrimination cannot be carried out. At present, existing area monitoring methods cannot be applied to most application scenarios. Summary of the Invention
[0003] Embodiments of the present disclosure propose methods and devices for processing videos.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for processing a video. The method includes: obtaining a task request sent by a user, where the task request includes a task type and a video capture device identifier; determining whether the task type belongs to a task type of a preset inspection task; in response to determining that the task type belongs to the task type of the preset inspection task, storing the video capture device identifier into a video capture device identifier set preset for the task type; for the video capture device identifier set, performing the following steps: dividing the video capture device identifiers in the video capture device identifier set to obtain at least one video capture device identifier subset; for a video capture device identifier subset in the at least one video capture device identifier subset, determining a video capture device identifier sequence based on the video capture device identifier subset, and sequentially analyzing and processing the videos corresponding to the video capture device identifiers in the video capture device identifier sequence according to the task type, and sending the analysis and processing results to the user.
[0005] In some embodiments, the method further includes: in response to determining that the task type does not belong to the task type of the preset inspection task, analyzing and processing the video corresponding to the video capture device identifier according to the task type, and sending the analysis and processing results to the user.
[0006] In some embodiments, the task type of the inspection task includes human body detection and tracking, and the task type is human body detection and tracking; and the sequentially analyzing and processing the videos corresponding to the video capture device identifiers in the video capture device identifier sequence according to the task type, and sending the analysis and processing results to the user includes: using the video corresponding to the current video capture device identifier in the video capture device identifier sequence as a video to be analyzed; removing human body images that meet preset conditions in the video to be analyzed to obtain a processed video; performing human body detection and tracking on the processed video to obtain human movement trajectories of at least one human body; for the human body in the at least one human body, obtaining different orientation human body images collected for the human body in the processed video; and sending the human movement trajectories and different orientation human body images of the human body in the at least one human body as analysis and processing results to the user.
[0007] In some embodiments, the task type of the above patrol task includes target human body retrieval. The task type is target human body retrieval, and the task request further includes target human body attributes; and the above-mentioned video corresponding to the video capture device identifier in the video capture device identifier sequence is analyzed and processed in sequence according to the above task type, and the analysis and processing result is sent to the above user, including: using the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed; performing attribute recognition on the human body in the video to be analyzed to obtain the set of human body attributes of the human body in the video to be analyzed; identifying the target human body from the video to be analyzed according to the above target human body attributes and the set of human body attributes of the human body in the video to be analyzed, and sending the relevant information of the target human body as the analysis and processing result to the above user.
[0008] In some embodiments, the task type of the above patrol task includes behavior prompt tasks. The task type is an area intrusion behavior prompt task, a cross-warning line behavior prompt task, an area stay behavior prompt task, or an off-duty behavior prompt task. The task request further includes prompt area information; and the above-mentioned video corresponding to the video capture device identifier in the video capture device identifier sequence is analyzed and processed in sequence according to the above task type, and the analysis and processing result is sent to the above user, including: using the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed; in response to determining that the task type is an area intrusion behavior prompt task, performing the following first process: determining whether a human body appears in the target area corresponding to the above prompt area information in the video to be analyzed; if a human body appears, sending the relevant information of the appeared human body as the analysis and processing result to the above user; in response to determining that the task type is a cross-warning line behavior prompt task, performing the following second process: determining whether a human body crosses the warning line corresponding to the above prompt area information in the video to be analyzed; if so, sending the relevant information of the human body crossing the warning line as the analysis and processing result to the above user; in response to determining that the task type is an area stay behavior prompt task, performing the following third process: determining whether the duration of the human body appearing in the target area corresponding to the above prompt area information in the video to be analyzed staying in the target area exceeds a predetermined duration; if it exceeds, sending the relevant information of the human body staying for more than the predetermined duration as the analysis and processing result to the above user; in response to determining that the task type is an off-duty behavior prompt task, performing the following fourth process: determining that the time for a human body to leave the target area corresponding to the above prompt area information in the video to be analyzed exceeds a preset time threshold, and the number of human bodies in the target area is less than a preset number threshold; sending the relevant information of the human body leaving the target area for more than the preset time threshold as the analysis and processing result to the above user.
[0009] In some embodiments, the task types of the above patrol inspection tasks include human attribute alarm tasks. The above task type is a human attribute alarm task, and the above task request includes alarm attributes; and the above-mentioned video corresponding to the video acquisition device identifier in the video acquisition device identifier sequence is analyzed and processed in sequence according to the above task type, and the analysis and processing result is sent to the above user, including: using the video corresponding to the current video acquisition device identifier in the video acquisition device identifier sequence as the video to be analyzed; performing attribute recognition on the human body in the video to be analyzed, and determining whether a human body including alarm attributes appears in the video to be analyzed according to the recognition result; if so, sending an alarm message to the above user.
[0010] In some embodiments, the task types of the above patrol inspection tasks include crowd detection and statistics tasks. The above task type is a crowd detection and statistics task, and the above task request further includes statistical area information; and the above-mentioned video corresponding to the video acquisition device identifier in the video acquisition device identifier sequence is analyzed and processed in sequence according to the above task type, and the analysis and processing result is sent to the above user, including: using the video corresponding to the current video acquisition device identifier in the video acquisition device identifier sequence as the video to be analyzed; performing statistical analysis on the crowd appearing in the statistical area corresponding to the above statistical area information based on the video to be analyzed to obtain the crowd information of the statistical area; sending the crowd information as the analysis and processing result to the above user.
[0011] In some embodiments, the task types of the above patrol inspection tasks do not include action alarm tasks. The above task type is an action alarm task; and the above-mentioned video corresponding to the video acquisition device identifier is analyzed and processed according to the above task type, and the analysis and processing result is sent to the above user, including: performing action recognition on the human body in the video corresponding to the video acquisition device identifier, and determining whether the human body in the video generates a preset alarm action according to the recognition result; if so, generating an action alarm message according to the detected action, and sending the above action alarm message as the analysis and processing result to the above user.
[0012] In some embodiments, the task types of the above patrol inspection tasks do not include cross-device tracking tasks. The above task type is a cross-device tracking task, and the above task request further includes a cross-device tracking human body image and multiple video acquisition device identifiers; and the above-mentioned video corresponding to the video acquisition device identifier is analyzed and processed according to the above task type, and the analysis and processing result is sent to the above user, including: receiving the videos collected by the video acquisition devices corresponding to the above multiple video acquisition device identifiers; extracting the feature information of the human body in the above cross-device tracking human body image; identifying and tracking the human body across devices from the received videos according to the above feature information, and sending the relevant information of the identified and tracked human body as the analysis result information to the above user.
[0013] In some embodiments, the video capture device identifiers in the above-mentioned video capture device identifier set are partitioned to obtain at least one video capture device identifier subset, including: determining the number of video capture device identifiers in the subset according to a preset time interval, the number of video capture device identifiers in the above-mentioned video capture device identifier set, and the access time of a single video capture device; and partitioning the video capture device identifiers in the above-mentioned video capture device identifier set according to the determined number of video capture device identifiers in the subset to obtain at least one video capture device identifier subset.
[0014] In a second aspect, an embodiment of the present disclosure provides a device for processing video. The device includes: an acquisition unit configured to acquire a task request sent by a user, where the above-mentioned task request includes a task type and a video capture device identifier; a judgment unit configured to judge whether the above-mentioned task type belongs to the task type of a preset inspection task; a storage unit configured to, in response to determining that the above-mentioned task type belongs to the task type of a preset inspection task, store the above-mentioned video capture device identifier into a video capture device identifier set preset for the above-mentioned task type; a first execution unit configured to execute a preset step for the above-mentioned video capture device identifier set, where the first execution unit includes: a partitioning unit configured to partition the video capture device identifiers in the above-mentioned video capture device identifier set to obtain at least one video capture device identifier subset; and an analysis unit configured to, for a video capture device identifier subset in the above-mentioned at least one video capture device identifier subset, determine a video capture device identifier sequence based on the video capture device identifier subset, sequentially analyze and process the videos corresponding to the video capture device identifiers in the above-mentioned video capture device identifier sequence according to the above-mentioned task type, and send the analysis and processing results to the above-mentioned user.
[0015] In some embodiments, the above-mentioned device further includes: a second execution unit configured to, in response to determining that the above-mentioned task type does not belong to the task type of a preset inspection task, analyze and process the video corresponding to the above-mentioned video capture device identifier according to the above-mentioned task type, and send the analysis and processing results to the above-mentioned user.
[0016] In some embodiments, the task type of the above patrol inspection task includes human body detection and tracking, the task type is human body detection and tracking; and the above analysis unit is further configured to: use the video corresponding to the current video acquisition device identifier in the above video acquisition device identifier sequence as the video to be analyzed; perform removal processing on the human body images in the above video to be analyzed that meet the preset conditions to obtain a processed video; perform human body detection and tracking on the above processed video to obtain the human body movement trajectories of at least one human body; for the human body among the above at least one human body, obtain different orientation human body images collected for this human body in the above processed video; and send the human body movement trajectories and different orientation human body images of the human body among the above at least one human body as the analysis processing results to the above user.
[0017] In some embodiments, the task type of the above patrol inspection task includes target human body retrieval, the task type is target human body retrieval, and the above task request further includes target human body attributes; and the above analysis unit is further configured to: use the video corresponding to the current video acquisition device identifier in the above video acquisition device identifier sequence as the video to be analyzed; perform attribute recognition on the human bodies in the above video to be analyzed to obtain the human body attribute set of the human bodies in the above video to be analyzed; identify the target human body from the above video to be analyzed according to the above target human body attributes and the human body attribute set of the human bodies in the above video to be analyzed, and send the relevant information of the above target human body as the analysis processing results to the above user.
[0018] In some embodiments, the task type of the above patrol task includes a behavior prompt task. The above task type is a regional intrusion behavior prompt task, a behavior prompt task for crossing a warning line, a behavior prompt task for staying in a region, or a behavior prompt task for leaving a post. The above task request further includes prompt area information; and the above analysis unit is further configured to: use the video corresponding to the current video capture device identifier in the above video capture device identifier sequence as the video to be analyzed; in response to determining that the above task type is a regional intrusion behavior prompt task, perform the following first process: determine whether a human body appears in the target area corresponding to the above prompt area information in the above video to be analyzed; if a human body appears, send the relevant information of the appeared human body to the above user as the analysis result; in response to determining that the above task type is a behavior prompt task for crossing a warning line, perform the following second process: determine whether a human body crosses the warning line corresponding to the above prompt area information in the above video to be analyzed; if so, send the relevant information of the human body that crosses the above warning line to the above user as the analysis result; in response to determining that the above task type is a behavior prompt task for staying in a region, perform the following third process: determine whether the duration of stay of the human body that appears in the target area corresponding to the above prompt area information in the above video to be analyzed in the above target area exceeds a predetermined duration; if it exceeds, send the relevant information of the human body that stays for more than the predetermined duration to the above user as the analysis result; in response to determining that the above task type is a behavior prompt task for leaving a post, perform the following fourth process: determine that the time when a human body leaves the target area corresponding to the above prompt area information in the above video to be analyzed exceeds a preset time threshold, and the number of human bodies in the above target area is less than a preset number threshold; send the relevant information of the human body that leaves the above target area for more than the preset time threshold to the above user as the analysis result.
[0019] In some embodiments, the task type of the above patrol task includes a human attribute alarm task. The above task type is a human attribute alarm task, and the above task request includes alarm attributes; and the above analysis unit is further configured to: use the video corresponding to the current video capture device identifier in the above video capture device identifier sequence as the video to be analyzed; perform attribute recognition on the human body in the above video to be analyzed, and determine whether a human body including alarm attributes appears in the above video to be analyzed according to the recognition result; if it appears, send an alarm message to the above user.
[0020] In some embodiments, the task type of the above patrol inspection task includes a crowd detection and statistics task. The task type is a crowd detection and statistics task, and the task request further includes statistical area information; and the analysis unit is further configured to: use the video corresponding to the current video capture device identifier in the above video capture device identifier sequence as the video to be analyzed; based on the above video to be analyzed, perform statistical analysis on the crowd appearing in the statistical area corresponding to the above statistical area information to obtain the crowd information of the above statistical area; and send the above crowd information to the above user as the analysis and processing result.
[0021] In some embodiments, the task type of the above patrol inspection task does not include an action alarm task. The task type is an action alarm task; and the second execution unit is further configured to: perform action recognition on the human body in the video corresponding to the above video capture device identifier, and determine whether the human body in the video generates a preset alarm action according to the recognition result; if so, generate action alarm information according to the detected action, and send the above action alarm information to the above user as the analysis and processing result.
[0022] In some embodiments, the task type of the above patrol inspection task does not include a cross-device tracking task. The task type is a cross-device tracking task, and the task request further includes a cross-device tracking human body image and a plurality of video capture device identifiers; and the second execution unit is further configured to: receive the videos captured by the video capture devices corresponding to the above plurality of video capture device identifiers; extract the feature information of the human body in the above cross-device tracking human body image; according to the above feature information, cross-device identify and track the human body in the received videos, and send the relevant information of the identified and tracked human body to the above user as the analysis result information.
[0023] In some embodiments, the above division unit is further configured to: determine the number of video capture device identifiers in the subset according to a preset time interval, the number of video capture device identifiers in the above video capture device identifier set, and the access time of a single video capture device; according to the determined number of video capture device identifiers in the subset, divide the video capture device identifiers in the above video capture device identifier set to obtain at least one video capture device identifier subset.
[0024] In a third aspect, an embodiment of the present disclosure provides a device, which includes: one or more processors; a storage device, on which one or more programs are stored. When the above one or more programs are executed by the above one or more processors, the above one or more processors are caused to implement the method described in any implementation manner in the first aspect.
[0025] Fourthly, embodiments of the present disclosure provide a computer-readable medium storing a computer program, where when the computer program is executed by a processor, the method described in any implementation manner of the first aspect is implemented.
[0026] The method and device for processing video provided by the embodiments of the present disclosure first obtain a task request sent by a user, and then determine whether the task type in the task request belongs to the task type of a preset inspection task. If it belongs, the video capture device identifier in the task request is stored in the video capture device identifier set preset for the task type. Then, the following steps are executed for the video capture device identifier set: 1) Divide the video capture device identifiers in the video capture device identifier set to obtain at least one subset of video capture device identifiers; 2) For each subset of video capture device identifiers in the at least one subset of video capture device identifiers, determine a video capture device identifier sequence based on the subset of video capture device identifiers, and sequentially analyze and process the videos corresponding to the video capture device identifiers in the video capture device identifier sequence according to the task type in the task request, and send the analysis and processing results to the user, thereby realizing the inspection processing of task requests whose task types belong to the task type of the inspection task and improving the processing efficiency of task requests. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Other features, objects, and advantages of the present disclosure will become more apparent by reading the detailed description of the non-limiting embodiments with reference to the following drawings:
[0028] Figure 1 is an exemplary system architecture diagram to which an embodiment of the present disclosure can be applied;
[0029] Figure 2 is a flowchart of an embodiment of the method for processing video according to the present disclosure;
[0030] Figure 3 is a schematic diagram of an application scenario of the method for processing video according to the present disclosure;
[0031] Figure 4 is a flowchart of another embodiment of the method for processing video according to the present disclosure;
[0032] Figure 5 is a schematic structural diagram of an embodiment of the device for processing video according to the present disclosure;
[0033] Figure 6 is a schematic structural diagram of a computer system of an electronic device suitable for implementing embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0034] The present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are merely for explaining the relevant invention and not for limiting the invention. Additionally, it should be noted that for the sake of description, only the parts related to the relevant invention are shown in the drawings.
[0035] It should be noted that, without conflict, the embodiments in the present disclosure and the features in the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the drawings and embodiments.
[0036] Figure 1 An exemplary system architecture 100 for a method of processing video or an apparatus for processing video to which embodiments of the present disclosure can be applied is shown.
[0037] As Figure 1 shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0038] Users may use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 101, 102, 103, such as image processing software, video processing applications, web browser applications, etc.
[0039] The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices with a display screen and supporting video processing, including but not limited to smart phones, tablet computers, e - book readers, laptop portable computers, and desktop computers, etc. The terminal devices 101, 102, 103 may include a Graphics Processing Unit (GPU). When the terminal devices 101, 102, 103 are software, they may be installed in the above - listed electronic devices. It may be implemented as multiple software or software modules (for example, to provide distributed services), or it may be implemented as a single software or software module. No specific limitation is made here.
[0040] The server 105 may be a server providing various services, such as a background server that provides support for the information displayed on the terminal devices 101, 102, 103. The background server may analyze and process data such as task requests received, and feedback the processing results to the terminal devices 101, 102, 103.
[0041] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers or as a single server. When the server is software, it can be implemented as multiple software or software modules (such as those used to provide distributed services) or as a single software or software module. No specific limitation is made here.
[0042] It should be understood that Figure 1 the numbers of the terminal devices, networks, and servers in
[0043] It should be noted that the method for processing video provided by the embodiments of the present disclosure can be executed by the terminal devices 101, 102, 103, or by the server 105. Correspondingly, the device for processing video can be set in the terminal devices 101, 102, 103 or in the server 105.
[0044] Continuing to refer to Figure 2 , a flowchart 200 of an embodiment of the method for processing video according to the present disclosure is shown. The method for processing video includes the following steps:
[0045] Step 201, obtaining a task request sent by a user.
[0046] In this embodiment, the execution subject of the method for processing video (such as Figure 1 the terminal devices 101, 102, 103 or the server 105 shown) can obtain the task request sent by the user. Specifically, when the execution subject is a terminal device, the execution subject can directly obtain the task request input by the user. When the execution subject is a server, the execution subject can obtain the task request from the terminal device used by the user through a wired connection method or a wireless connection method. The task request can include a task type and a video capture device identifier. Here, the task type can be used to represent the type of task that the user wants to achieve. The task can refer to a processing task performed on the video captured by the video capture device corresponding to the video capture device identifier. For example, the task can include human detection and tracking, human behavior recognition, target human retrieval, etc. In practice, multiple task types can be set according to the actual application scenario. The video capture device identifier can be used to uniquely identify a video capture device. Here, the video capture device can include, but is not limited to, a camera.
[0047] In practice, to implement the method for processing videos according to the present invention, multiple functional modules may be included within the execution entity. As an example, it may include a cluster management module, a view management module, a video parsing module, a structured management module, an algorithm module, an external interface module, and so on.
[0048] The cluster management module can be used to manage all machine nodes, including machine management, node management, node resource management, and routing support, etc. The cluster management module can be used to implement functions such as storage of metadata, start and stop of nodes, life cycle maintenance, disaster recovery logic of nodes, metadata query, client routing, etc. Specifically, the cluster management module can provide functions such as querying machine details, querying machine lists, providing addition of machine nodes, addition of service nodes, stopping nodes, querying node lists, querying node details, querying the current node, querying the local node list, querying the optimal weight node, local weight change, local node resource configuration, querying the list of machine service configuration modules, querying machine service configuration, adding configuration modules, deleting configuration modules, etc.
[0049] The view management module can be used to store the structured data and unstructured data collected by the video acquisition device. In practice, structured picture and video data can be stored in a mysql automatic sub-database, and unstructured picture and video data can be stored in a MongoDB shard. In addition to the storage function, the view management module can also provide functions such as data submission, query, download, etc. Specifically, it can include functions such as registration, logout, keep-alive, uploading automatically collected video segments, uploading automatically collected target images, batch querying of video segments, batch querying of target images, downloading video segment data, downloading image data, batch subscription, batch modification, deleting subscription tasks, canceling subscriptions, notifications, deleting notification records, etc.
[0050] The video parsing module can be used to access the video stream and perform processing such as detection and tracking of human objects in the video stream. The video parsing module can include two parts: video stream access and algorithm analysis. Video stream access can be used to access and decode the video stream, and distribute the video frames in the video stream to the algorithm analysis through shared memory. Algorithm analysis can call a preset algorithm cluster to perform processing such as detection and tracking on the video frame sequence, and send the processing results back to the video stream access and the algorithm cluster for further analysis and processing of human attribute recognition and feature recognition. In practice, after the cluster management module completes task scheduling, it can distribute the tasks to specific execution nodes. The execution node can first start the algorithm analysis process. The algorithm analysis process detects whether the video access process exists. If it does not exist, it starts the video access process. Then, it requests to access the corresponding video stream and completes the transfer of data frames between processes through shared memory.
[0051] The structured management module is used to define analysis tasks, cache a series of target images output by the video parsing module, and extract information such as human attributes, human features, human trajectories, human postures, human actions, and appearance times according to a preset task configuration template. Finally, it cooperates with the analyzed information to perform deduplication and screening of target pictures, so as to complete the structuring and storage of data. In practice, for the same set of picture sequences, the structured management module can set different analysis tasks. For different analysis tasks, the structured management module can provide different human analysis algorithm configuration templates for the video parsing module. Task definition is to ensure customized management of different intelligent recognition scenarios. When new algorithm capabilities are needed, algorithm categories can be supplemented and expanded at any time. The organization and management of tasks can be specified through fixed templates. In addition, the structured management module can also realize the dynamic management and configuration of the response data of the video parsing module, and realize the free and flexible customization of the data structure. Here, the management data can be capture data, imported data, structured data returned by algorithm services, etc. The structured management module can pre-define the storage field organization form of structured data according to different analysis tasks to avoid problems such as management chaos and incorrect field definitions.
[0052] The algorithm module can be used for the management and configuration of core algorithms. Here, the core algorithms can include algorithms such as human detection, human tracking, multi-classification of human attributes, human feature extraction, human posture detection, human action recognition, human head and shoulder detection, human head and shoulder feature extraction and comparison, etc. The algorithm module can provide multiple internal interface services such as docking cameras, GPU settings, algorithm enabling, background image retention, image scaling ratio setting, image quality setting, push image server address setting, heartbeat service, etc. The information output by the algorithm service can be passed back to the video access process through the interface for enhanced information overlay and then pushed to the streaming media server cluster.
[0053] The external interface module can be used to provide functions externally. From the interface perspective, the external interface module can be divided into several types of functions such as human camera management, structured task management, regional population statistics, human attribute retrieval, system monitoring, etc. Here, human camera management can refer to the management of IPC (Inter-Process Communication) network cameras. Specifically, it can include basic camera information management, camera area management, camera location management, and camera user group management, and can achieve operations such as adding, deleting, modifying, and querying cameras, as well as accessing and starting and stopping video streams. Among them, camera location management is a tree composed of camera groups and geographical locations, which describes the geographical locations of cameras. Each node of the tree can mount several cameras. One camera can only be mounted on one node of the tree. Here, structured task management can refer to the implementation of structured analysis management of target objects in the video stream captured by a specified camera, including adding, deleting, modifying, querying, starting, and stopping structured tasks. Here, regional population statistics can refer to the implementation of analysis and query of the real-time number of people, the cumulative number of people within a specific time period, and the staying duration of the population within a specific time period in a specified area under a specified camera. Here, human attribute retrieval can refer to the implementation of real-time or scheduled full-volume or incremental retrieval functions for the human attributes supported by the product and the human target attributes saved through structured tasks.
[0054] In practice, the execution entity can support the access of real-time video sources of cameras or the access of recorded video sources. At the same time, it can also support the access of cross-platform cameras and camera organization trees, and complete the batch import of existing cameras. The execution entity can also parse the input video stream. For the target objects (such as humans) in the video, different task processing flows can be enabled according to the needs of recognition tasks, and multiple intelligent recognition tasks can also be enabled to execute in parallel for the same video stream.
[0055] Step 202, determine whether the task type belongs to the task type of the preset patrol task.
[0056] In this embodiment, the task types of the preset patrol tasks can be pre-stored inside the execution entity. In this way, the execution entity can determine whether the task type in the above task request belongs to the task type of the patrol task. Here, the task types of the patrol tasks can be set by technical personnel according to actual needs. In practice, for some tasks with less strict real-time requirements, for example, for a monitoring task that only needs to be detected a preset number of times (such as 1 time) within a preset time interval (such as within 1 minute), this type of task can be determined as a patrol task. For patrol tasks, the execution entity does not need to process the video stream in real time.
[0057] Step 203: In response to determining that the task type belongs to the task type of a preset patrol inspection task, store the video capture device identifier in the video capture device identifier set preset for the task type.
[0058] In this embodiment, if it is determined that the task type in the task request belongs to the task type of a preset patrol inspection task, the execution entity may store the video capture device identifier in the task request in the video capture device identifier set preset for the task type in the task request. Here, the task types corresponding to the video capture device identifiers in a single video capture device identifier set are the same.
[0059] Step 204: For the video capture device identifier set, perform the following steps 2041 to 2042.
[0060] In this embodiment, for the video capture device identifier set, the execution entity may perform the following steps 2041 to 2042.
[0061] Step 2041: Divide the video capture device identifiers in the video capture device identifier set to obtain at least one video capture device identifier subset.
[0062] In this embodiment, the execution entity may use various methods (for example, random division) to divide the video capture device identifiers in the video capture device identifier set to obtain at least one video capture device identifier subset. As an example, the execution entity may pre-store the association relationship between video capture device identifiers in advance. The association relationship may be pre-input by the user. In this way, the execution entity may divide the video capture device identifiers with an association relationship in the video capture device identifier set into the same video capture device identifier subset according to the association relationship.
[0063] In some optional implementation manners of this embodiment, step 2041 may be specifically performed as follows:
[0064] First, determine the number of video capture device identifiers in the subset according to a preset time interval, the number of video capture device identifiers in the video capture device identifier set, and the access time of a single video capture device.
[0065] In this implementation manner, the preset time interval may refer to the time used by the execution entity to process the videos corresponding to each video capture device identifier in a subset of video capture device identifiers once. That is, within one time interval, the videos corresponding to each video capture device identifier in the subset of video capture device identifiers are processed once. The above time interval can be set by the user according to actual needs. The access time of a single video capture device may refer to the time required to process the video corresponding to a single video capture device identifier once. Here, the execution entity can determine the number of video capture device identifiers in the subset according to the preset time interval, the number of video capture device identifiers in the video capture device identifier set, and the access time of a single video capture device. Take the time interval as 60 seconds, the number of video capture device identifiers in the video capture device identifier set as 100, and the access time of a single video capture device as 10 seconds as an example. In this example, the 100 videos corresponding to 100 video capture device identifiers need to be processed in a cycle of 60 seconds, and the processing time of a single video is 10 seconds. Therefore, there can be at most 60 / 10 (i.e., 6) video capture device identifiers in each subset.
[0066] Then, according to the determined number of video capture device identifiers in the subset, divide the video capture device identifiers in the video capture device identifier set to obtain at least one subset of video capture device identifiers.
[0067] In this implementation manner, the execution entity can divide the video capture device identifiers in the video capture device identifier set according to the determined number of video capture device identifiers in the subset (such as random division, division according to the installed location, etc.) to obtain at least one subset of video capture device identifiers. Here, the number of each subset of video capture device identifiers obtained by the division is less than or equal to the determined number of video capture device identifiers in the subset.
[0068] Step 2042, for the subset of video capture device identifiers in at least one subset of video capture device identifiers, determine a video capture device identifier sequence based on this subset of video capture device identifiers, analyze and process the videos corresponding to the video capture device identifiers in the video capture device identifier sequence in turn according to the task type, and send the analysis and processing results to the user.
[0069] In this embodiment, for each video capture device identification subset obtained in step 2041, the execution entity may determine a video capture device identification sequence based on this video capture device identification subset. For example, the execution entity may sort the video capture device identifications in this video capture device identification subset. For example, perform random sorting, sort based on an association relationship, sort based on the installation location of the corresponding video capture device, etc., to generate a video capture device identification sequence.
[0070] After that, the execution entity may sequentially analyze and process the videos corresponding to the video capture device identifications in the video capture device identification sequence according to the task type in the task request, and obtain an analysis and processing result. And send the analysis and processing result to the user. For example, after the execution entity finishes processing the videos corresponding to all the video capture device identifications in the video capture device identification sequence, it may send the analysis and processing result to the user based on the analysis results of all the videos. Another example is that the execution entity may also send the analysis and processing result to the user for the analysis result of each video. Here, the video corresponding to a certain video capture device identification may refer to the video captured in real time by the video capture device corresponding to this video capture device identification. As an example, when sequentially analyzing and processing the videos corresponding to the video capture device identifications in the video capture device identification sequence, the execution entity processes only the video corresponding to one video capture device identification in this video capture device identification sequence each time. After this video is processed, it then processes the video corresponding to the next video capture device identification. After processing the video corresponding to the last video capture device identification, it then processes the video corresponding to the first video capture device identification in the video capture device identification sequence. Thus, cyclic processing of the videos corresponding to the video capture device identifications in the video capture device identification sequence is realized. That is, within one cycle period, each video corresponding to the video capture device identifications in the video capture device identification sequence is processed once. This cyclic processing method can realize batch processing of task requests and improve the efficiency of processing requests.
[0071] In some alternative implementation manners of this embodiment, the task type of the above patrol task may include human body detection and tracking. The task type in the above task request is human body detection and tracking. And in step 2042, sequentially analyzing and processing the videos corresponding to the video capture device identifications in the video capture device identification sequence according to the task type and sending the analysis and processing result to the user may be specifically carried out as follows:
[0072] First, use the video corresponding to the current video capture device identification in the video capture device identification sequence as the video to be analyzed.
[0073] In this implementation manner, the execution entity may use the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed. Here, the current video capture device identifier may refer to the video capture device identifier corresponding to the current moment when the execution entity analyzes the videos corresponding to the video capture device identifiers in sequence according to the video capture device identifier sequence.
[0074] Secondly, remove the human body images in the video to be analyzed that meet the preset conditions to obtain the processed video.
[0075] In this implementation manner, the execution entity may remove the human body images in the video to be analyzed that meet the preset conditions to obtain the processed video. As an example, the above-mentioned preset conditions may be set according to actual needs. For example, the above-mentioned preset conditions may include: the proportion of the displayed human body being blocked exceeds the preset proportion, the displayed human body is incomplete (for example, the upper body is truncated, the lower body is truncated, the side body is truncated, etc.) and is located in the preset edge area of the video frame where it is located.
[0076] After that, perform human body detection and tracking on the processed video to obtain the human body movement trajectories of at least one human body.
[0077] In this implementation manner, the execution entity may perform human body detection and tracking on the processed video to obtain the human body movement trajectories of at least one human body. As an example, the execution entity may perform human body detection and tracking based on the entire human body, that is, use the entire human body for human body detection and tracking. As another example, the execution entity may perform human body detection and tracking based on the head and shoulders, that is, use the head and shoulders for human body detection and tracking. In practice, it is possible to determine whether to perform human body detection and tracking based on the entire human body or based on the head and shoulders according to factors such as the human body density in the video, the shooting distance of the camera, and the height and angle of the camera.
[0078] Then, for each human body among the at least one human body, obtain the human body images of different orientations captured for this human body in the processed video.
[0079] In this implementation manner, for each of the at least one human body, the execution entity may obtain the human body images of different orientations captured for this human body in the processed video.
[0080] Finally, send the human body movement trajectories and the human body images of different orientations of the human body among the at least one human body as the analysis and processing results to the user.
[0081] In this implementation manner, the execution entity may send the human body movement trajectories and the human body images of different orientations of each human body among the at least one human body as the analysis and processing results to the user.
[0082] In some alternative implementation manners of this embodiment, the task type of the above patrol inspection task may include target human body retrieval. The task type in the task request is target human body retrieval, and the task request may further include target human body attributes. And for the above step 2042, analyzing and processing the videos corresponding to the video capture device identifiers in the video capture device identifier sequence in sequence according to the task type, and sending the analysis and processing results to the user may be specifically performed as follows:
[0083] First, regard the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed.
[0084] In this implementation manner, the execution entity may regard the video corresponding to the current video capture device identifier in the above video capture device identifier sequence as the video to be analyzed.
[0085] Then, perform attribute recognition on the human bodies in the video to be analyzed to obtain the set of human body attributes of the human bodies in the video to be analyzed.
[0086] In this implementation manner, the execution entity may perform attribute recognition on each human body appearing in the above video to be analyzed to obtain the set of human body attributes of each human body appearing in the video to be analyzed. In practice, the execution entity may use various methods to perform attribute recognition on the human bodies appearing in the video to be analyzed. For example, use a model trained by a machine learning method to perform attribute recognition. Here, the human body attributes are used to describe the human body. The human body attributes in the set of human body attributes include but are not limited to: gender, age group (such as toddlers, teenagers, young people, middle-aged people, elderly people, etc.), actions (such as standing, squatting, walking, running, etc.), hair length (such as long hair, medium-length hair, short hair, bald head, etc.), whether carrying a backpack, lower body clothing (such as long trousers, shorts, long skirts, short skirts, etc.), upper body clothing (such as long sleeves, short sleeves, etc.), upper body color, lower body color, whether wearing a hat, whether wearing glasses, whether using a mobile phone, texture of the upper body clothes (such as solid color, pattern, floral, stripe, check, etc.), human body orientation (such as front, back, left, right, etc.), whether holding an umbrella, whether holding a child, whether carrying a suitcase, whether pulling a trolley case, whether using a means of transportation, etc.
[0087] Finally, identify the target human body from the video to be analyzed according to the target human body attributes and the set of human body attributes of the human bodies in the video to be analyzed, and send the relevant information of the target human body as the analysis and processing result to the user.
[0088] In this implementation manner, the execution entity can identify the target human body from each human body that appears in the video to be analyzed according to the target human body attribute and the set of human body attributes of each human body in the video to be analyzed. As an example, the execution entity can match the target human body attribute with the human body attributes in the set of human body attributes of each human body in the video to be analyzed, and use the human body corresponding to the set of human body attributes that includes the target human body attribute as the target human body. After that, the execution entity can send the relevant information of the target human body to the user as the analysis and processing result. Here, the relevant information of the target human body includes, but is not limited to: the target human body image, the shooting time when the target human body is captured, the shooting location, the shooting background image, and so on.
[0089] Through this implementation manner, the target human body including the target human body attribute can be retrieved from the video to be analyzed, and the relevant information of the target human body can be sent to the user, thereby realizing human body retrieval based on human body attributes.
[0090] In some optional implementation manners of this embodiment, the task type of the above inspection task may include a behavior prompt task. The task type in the task request is an area intrusion behavior prompt task, a cross-warning line behavior prompt task, an area stay behavior prompt task, or an off-duty behavior prompt task. The task request may further include prompt area information. And in the above step 2042, analyzing and processing the video corresponding to the video capture device identifier in the video capture device identifier sequence in sequence according to the task type and sending the analysis and processing result to the user may be specifically performed as follows:
[0091] First, use the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed.
[0092] In this implementation manner, the execution entity can use the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed.
[0093] Second, in response to determining that the task type is an area intrusion behavior prompt task, perform the following first processing: Determine whether a human body appears in the target area corresponding to the prompt area information in the video to be analyzed. If a human body appears, send the relevant information of the appeared human body to the user as the analysis and processing result.
[0094] In this implementation, if it is determined that the task type in the task request is a regional intrusion behavior prompt task, the execution entity can perform the following first processing: Determine whether a human body appears in the target area corresponding to the prompt area information in the video to be analyzed. Here, when the task type in the task request is a regional intrusion behavior prompt task, the prompt area information may refer to the area information of a closed area specified by the user. Usually, this closed area has a certain degree of danger or secrecy, and it is necessary to prompt regional intrusion behavior to avoid security risks. For example, high-risk areas, factory warehouses, and so on. If a human body appears in the target area, the relevant information of the appeared human body is sent to the user as the analysis and processing result. Here, the relevant information of the appeared human body may include the human body image, video clips within a preset time before and after the appearance of the human body, the shooting time and shooting location when the human body is captured, and so on.
[0095] After that, in response to determining that the task type is a behavior prompt task for crossing a warning line, perform the following second processing: Determine whether there is a human body crossing the warning line corresponding to the prompt area information in the video to be analyzed; if so, send the relevant information of the human body crossing the warning line to the user as the analysis and processing result.
[0096] In this implementation, if it is determined that the task type in the task request is a behavior prompt task for crossing a warning line, the execution entity can perform the following second processing: Determine whether there is a human body crossing the warning line corresponding to the prompt area information in the video to be analyzed. Here, when the task type in the current task request is a behavior prompt task for crossing a warning line, the prompt area information may refer to the information of the warning line specified by the user. If there is a human body crossing the warning line in the video to be analyzed, the execution entity can send the relevant information of the human body crossing the warning line to the user as the analysis and processing result. Here, the relevant information of the human body crossing the warning line may include the human body image of the human body crossing the warning line, video clips within a preset time before and after crossing the warning line, the shooting time and shooting location when crossing the warning line, and so on.
[0097] Then, in response to determining that the task type is a regional staying behavior prompt task, perform the following third processing: Determine whether the duration of the human body appearing in the target area corresponding to the prompt area information in the video to be analyzed staying in the target area exceeds a preset duration; if it exceeds, send the relevant information of the human body staying for more than the preset duration to the user as the analysis and processing result.
[0098] In this implementation, if it is determined that the task type in the task request is a regional stay behavior prompt task, the execution entity can perform the following third processing: Determine whether the duration for which a human body appears in the target area corresponding to the prompt area information in the video to be analyzed exceeds a predetermined duration. Here, the predetermined duration can be set according to actual needs. If the duration for which a human body appears in the target area exceeds the predetermined duration, the relevant information of the human body that has stayed for more than the predetermined duration is sent to the user as the analysis and processing result. Here, the relevant information of the human body that has stayed for more than the predetermined duration can include the human body image of the staying person, etc.
[0099] In practice, when the execution entity performs cyclic processing on the video corresponding to the video capture device identifier in the video capture device identifier sequence, it can determine whether a human body stays in the target area for more than the predetermined duration. Taking the predetermined duration as 5 minutes and the cyclic period as 1 minute as an example, if the execution entity continuously determines that a specific human body appears in the target area of the video corresponding to the video capture device identifier 5 times, it can be determined that the duration for which the human body appears in the target area exceeds the predetermined duration.
[0100] Finally, in response to determining that the task type is an off - post behavior prompt task, perform the following fourth processing: Determine that there is a human body in the target area corresponding to the prompt area information in the video to be analyzed whose leaving time exceeds a preset time threshold, and the number of human bodies in the target area is less than a preset number threshold; Send the relevant information of the human body that has left the target area for more than the preset time threshold to the user as the analysis and processing result.
[0101] In this implementation, if it is determined that the task type in the task request is an off - post behavior prompt task, then perform the following fourth processing: Determine that there is a human body in the target area corresponding to the prompt area information in the video to be analyzed whose leaving time exceeds a preset time threshold, and the number of human bodies in the target area is less than a preset number threshold. In practice, when the execution entity performs cyclic processing on the video corresponding to the video capture device identifier in the video capture device identifier sequence, it can determine whether a human body's leaving time exceeds the preset time threshold. After that, the execution entity can send the relevant information of the human body that has left the target area for more than the preset time threshold to the user as the analysis and processing result. Here, the relevant information of the human body that has left the target area for more than the preset time threshold can include the human body image, video segments within a preset duration (such as 20 seconds) before and after leaving, the leaving time, etc.
[0102] In some alternative implementation manners of this embodiment, the task type of the above patrol inspection task may include a human attribute alarm task. The task type of the above task request is a human attribute alarm task, and the task request further includes alarm attributes. And in step 2042, analyzing and processing the videos corresponding to the video capture device identifiers in the video capture device identifier sequence in sequence according to the task type, and sending the analysis and processing results to the user can be specifically carried out as follows:
[0103] First, use the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed.
[0104] In this implementation manner, the execution subject may use the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed.
[0105] Then, perform attribute recognition on the humans in the video to be analyzed, and determine whether there are humans including alarm attributes in the video to be analyzed according to the recognition results.
[0106] In this implementation manner, the execution subject may perform attribute recognition on the humans in the video to be analyzed, and determine whether there are humans including alarm attributes in the video to be analyzed according to the recognition results. Here, the alarm attributes can be set according to actual needs. For example, in some scenarios, it is necessary to alarm humans with certain specific attributes (for example, wearing a red top, smoking, playing with a mobile phone, etc.). At this time, the specific attributes can be set as alarm attributes.
[0107] If so, send an alarm message to the user.
[0108] In this implementation manner, if there are humans including alarm attributes in the video to be analyzed, the execution subject may send the alarm message as the analysis and processing result to the user. Here, the alarm message can be used to prompt the user that there are humans including alarm attributes. As an example, the alarm message can be a voice message, a text message, etc.
[0109] In some alternative implementation manners of this embodiment, the task type of the above patrol inspection task may include a crowd detection and statistics task. The task type in the above task request is a crowd detection and statistics task, and the task request may further include statistical area information. And in step 2042, analyzing and processing the videos corresponding to the video capture device identifiers in the video capture device identifier sequence in sequence according to the task type, and sending the analysis and processing results to the user can be specifically carried out as follows:
[0110] First, use the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed.
[0111] Then, based on the video to be analyzed, statistical analysis is performed on the people appearing in the statistical area corresponding to the statistical area information, and the population information of the statistical area is obtained.
[0112] In this implementation, based on the video to be analyzed, the execution entity can perform statistical analysis on the people appearing in the statistical area corresponding to the statistical area information. Here, the statistical area information can be used to represent the information of the area (such as scenic spots, stations, etc.) where population statistics are carried out. The statistical area information can be set by the user according to actual needs. Here, the population information of the statistical area can include population dynamic information (such as the moving direction of the crowd), population static information (such as the total number of people), the duration of stay of the crowd, population density, heat map, etc.
[0113] Finally, the population information is sent to the user as the analysis and processing result.
[0114] In this implementation, the execution entity can send the population information to the user as the analysis and processing result.
[0115] Continue to refer to Figure 3 , Figure 3 is a schematic diagram of an application scenario of the method for processing video according to this embodiment. In the Figure 3 application scenario, the user first sends a task request to the terminal device 301. Among them, the task request includes a task type and a video acquisition device identifier. After the terminal device 301 obtains the task request sent by the user, it determines whether the task type in the task request belongs to the task type of the patrol task. If it belongs, the terminal device 301 stores the video acquisition device identifier in the video acquisition device identifier set preset for the task type in the task request, and performs the following steps for the video acquisition device identifier set: 1) Divide the video acquisition device identifiers in the video acquisition device identifier set to obtain multiple subsets of video acquisition device identifiers; 2) For each subset of video acquisition device identifiers in the multiple subsets of video acquisition device identifiers, determine a video acquisition device identifier sequence based on the subset of video acquisition device identifiers, and analyze and process the videos corresponding to the video acquisition device identifiers in the video acquisition device identifier sequence in turn according to the task type, and send the analysis and processing result to the user.
[0116] The method provided by the above embodiment of the present disclosure realizes the patrol processing of the task request whose task type belongs to the task type of the patrol task, and improves the processing efficiency of the task request.
[0117] Further refer to Figure 4 , which shows the process 400 of another embodiment of the method for processing video. The process 400 of the method for processing video includes the following steps:
[0118] Step 401: Obtain the task request sent by the user.
[0119] In this embodiment, step 401 is similar to Figure 2 step 201 of the embodiment shown, and will not be elaborated here.
[0120] Step 402: Determine whether the task type belongs to the task type of the preset patrol task.
[0121] In this embodiment, step 402 is similar to Figure 2 step 202 of the embodiment shown, and will not be elaborated here.
[0122] Step 403: In response to determining that the task type belongs to the task type of the preset patrol task, store the video capture device identifier into the video capture device identifier set preset for the task type.
[0123] In this embodiment, step 403 is similar to Figure 2 step 203 of the embodiment shown, and will not be elaborated here.
[0124] Step 404: For the video capture device identifier set, perform the following steps 4041 to 4042: Step 4041: Divide the video capture device identifiers in the video capture device identifier set to obtain at least one video capture device identifier subset; Step 4042: For the video capture device identifier subset in at least one video capture device identifier subset, determine a video capture device identifier sequence based on the video capture device identifier subset, and sequentially analyze and process the videos corresponding to the video capture device identifiers in the video capture device identifier sequence according to the task type, and send the analysis and processing results to the user.
[0125] In this embodiment, step 404, step 4041, and step 4042 are respectively similar to Figure 2 step 204, step 2041, and step 2042 of the embodiment shown, and will not be elaborated here.
[0126] Step 405: In response to determining that the task type does not belong to the task type of the preset patrol task, analyze and process the video corresponding to the video capture device identifier according to the task type, and send the analysis and processing results to the user.
[0127] In this embodiment, if it is determined that the task type in the task request does not belong to the task type of the preset patrol task, the execution entity can analyze and process the video corresponding to the video capture device identifier according to the task type in the task request, and send the analysis and processing results to the user.
[0128] In some alternative implementation manners of this embodiment, the task type of the above patrol inspection task may not include an action alarm task, and the task type in the above task request is an action alarm task. And for step 405, analyzing and processing the video corresponding to the video acquisition device identifier according to the task type and sending the analysis and processing result to the user may be specifically performed as follows:
[0129] First, perform action recognition on the human body in the video corresponding to the video acquisition device identifier, and determine whether the human body in the video generates a preset alarm action according to the recognition result.
[0130] In this embodiment, the execution entity may use various methods to perform action recognition on the human body that appears in the video corresponding to the video acquisition device identifier in the task request. As an example, the execution entity may use a model trained based on a machine learning algorithm to perform action recognition on the human body that appears in the video. After that, the execution entity may determine whether the human body that appears in the video corresponding to the video acquisition device identifier generates a preset alarm action according to the action recognition result. Here, the alarm action may be preset by the user according to actual needs. As an example, the alarm action may include, but is not limited to, physical collisions (such as fighting), smashing things, falling, and so on.
[0131] Then, if it is generated, generate action alarm information according to the detected action, and use the action alarm information as the analysis and processing result to send to the user.
[0132] In this implementation manner, if it is determined according to the recognition result that the human body in the video generates a preset alarm action, the execution entity may generate action alarm information according to the detected action and send the generated action alarm information to the user. Here, the action alarm information may include the video frame captured at the moment when the alarm action occurs, the video clip within a preset time length before and after the occurrence of the alarm action, and so on.
[0133] In some alternative implementation manners of this embodiment, the task type of the above patrol inspection task may not include a cross-device tracking task, the task type in the above task request is a cross-device tracking task, and the above task request may further include a cross-device tracking human body image and multiple video acquisition device identifiers. And for the above step 405, analyzing and processing the video corresponding to the video acquisition device identifier according to the task type and sending the analysis and processing result to the user may be specifically performed as follows:
[0134] First, receive the videos collected by the video acquisition devices corresponding to the multiple video acquisition device identifiers.
[0135] In this implementation manner, the execution entity may receive the videos collected by the video capture devices corresponding to the above-mentioned multiple video capture device identifiers. In practice, these videos may be captured by different video capture devices at different times and different locations.
[0136] Then, extract the feature information of the human body in the cross-device tracked human body image.
[0137] In this implementation manner, the execution entity may extract the feature information of the human body in the above-mentioned cross-device tracked human body image. The feature information can be used to describe the human body from multiple dimensions.
[0138] Finally, according to the feature information, identify and track the human body across devices in the received videos, and send the relevant information of the identified and tracked human body as the analysis result information to the user.
[0139] In this implementation manner, the execution entity may, according to the above-mentioned feature information, identify and track the human body across devices in the received videos, and send the relevant information of the identified and tracked human body (such as, movement trajectory, human body position, etc.) as the analysis result information to the user.
[0140] From Figure 4 it can be seen that compared with the corresponding embodiment of Figure 2 the process 400 of the method for processing videos in this embodiment highlights the processing steps of task requests of task types that do not belong to the patrol task type. Thus, the solution described in this embodiment can implement the patrol processing of task requests of task types that belong to the patrol task type, and at the same time, can implement the processing of task requests of task types that do not belong to the patrol task type, thereby improving the flexibility of processing task requests.
[0141] Further referring to Figure 5 as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for processing videos. This device embodiment corresponds to the method embodiment shown in Figure 2 and this device can be specifically applied to various electronic devices.
[0142] As Figure 5As shown in the figure, the device 500 for processing videos in this embodiment includes: an acquisition unit 501, a determination unit 502, a storage unit 503, and a first execution unit 504. Among them, the acquisition unit 501 is configured to acquire a task request sent by a user, where the task request includes a task type and a video acquisition device identifier; the determination unit 502 is configured to determine whether the task type belongs to the task type of a preset inspection task; the storage unit 503 is configured to, in response to determining that the task type belongs to the task type of the preset inspection task, store the video acquisition device identifier in a video acquisition device identifier set preset for the task type; the first execution unit 504 is configured to perform a preset step on the video acquisition device identifier set, where the first execution unit 504 includes: a division unit 5041 configured to divide the video acquisition device identifiers in the video acquisition device identifier set to obtain at least one subset of video acquisition device identifiers; an analysis unit 5042 configured to, for a subset of video acquisition device identifiers in the at least one subset of video acquisition device identifiers, determine a video acquisition device identifier sequence based on the subset of video acquisition device identifiers, sequentially analyze and process the videos corresponding to the video acquisition device identifiers in the video acquisition device identifier sequence according to the task type, and send the analysis and processing results to the user.
[0143] In this embodiment, for the acquisition unit 501, determination unit 502, storage unit 503, and first execution unit 504 of the device 500 for processing videos, the specific processing and the resulting technical effects can respectively refer to Figure 2 the relevant descriptions of steps 201, 202, 203, and 204 in the corresponding embodiments, which will not be elaborated here.
[0144] In some optional implementation manners of this embodiment, the device 500 further includes: a second execution unit (not shown in the figure), configured to, in response to determining that the task type does not belong to the task type of the preset inspection task, analyze and process the video corresponding to the video acquisition device identifier according to the task type, and send the analysis and processing results to the user.
[0145] In some alternative implementation manners of this embodiment, the task type of the above patrol inspection task includes human body detection and tracking, the task type is human body detection and tracking; and the analysis unit 5042 is further configured to: use the video corresponding to the current video acquisition device identifier in the above video acquisition device identifier sequence as the video to be analyzed; perform removal processing on the human body images in the above video to be analyzed that meet the preset conditions to obtain a processed video; perform human body detection and tracking on the above processed video to obtain the human body movement trajectories of at least one human body; for the human body among the above at least one human body, obtain different orientation human body images collected for this human body in the above processed video; and send the human body movement trajectories and different orientation human body images of the human body among the above at least one human body as the analysis processing result to the above user.
[0146] In some alternative implementation manners of this embodiment, the task type of the above patrol inspection task includes target human body retrieval, the task type is target human body retrieval, and the above task request further includes target human body attributes; and the analysis unit 5042 is further configured to: use the video corresponding to the current video acquisition device identifier in the above video acquisition device identifier sequence as the video to be analyzed; perform attribute recognition on the human bodies in the above video to be analyzed to obtain the human body attribute set of the human bodies in the above video to be analyzed; identify the target human body from the above video to be analyzed according to the above target human body attributes and the human body attribute set of the human bodies in the above video to be analyzed, and send the relevant information of the above target human body as the analysis processing result to the above user.
[0147] In some alternative implementation manners of this embodiment, the task type of the above patrol inspection task includes a behavior prompt task. The above task type is an area intrusion behavior prompt task, a cross-warning line behavior prompt task, an area stay behavior prompt task, or an off-duty behavior prompt task. The above task request further includes prompt area information. And the above analysis unit 5042 is further configured to: use the video corresponding to the current video capture device identifier in the above video capture device identifier sequence as the video to be analyzed; in response to determining that the above task type is an area intrusion behavior prompt task, perform the following first process: determine whether a human body appears in the target area corresponding to the above prompt area information in the above video to be analyzed; if a human body appears, send the relevant information of the appeared human body to the above user as the analysis and processing result; in response to determining that the above task type is a cross-warning line behavior prompt task, perform the following second process: determine whether a human body crosses the warning line corresponding to the above prompt area information in the above video to be analyzed; if so, send the relevant information of the human body that crosses the above warning line to the above user as the analysis and processing result; in response to determining that the above task type is an area stay behavior prompt task, perform the following third process: determine whether the duration of stay of the human body that appears in the target area corresponding to the above prompt area information in the above video to be analyzed in the above target area exceeds a preset duration; if it exceeds, send the relevant information of the human body that stays for more than the preset duration to the above user as the analysis and processing result; in response to determining that the above task type is an off-duty behavior prompt task, perform the following fourth process: determine that the time when a human body leaves in the target area corresponding to the above prompt area information in the above video to be analyzed exceeds a preset time threshold, and the number of human bodies in the above target area is less than a preset number threshold; send the relevant information of the human body that leaves the above target area for more than the preset time threshold to the above user as the analysis and processing result.
[0148] In some alternative implementation manners of this embodiment, the task type of the above patrol inspection task includes a human body attribute warning task. The above task type is a human body attribute warning task. The above task request includes a warning attribute. And the above analysis unit 5042 is further configured to: use the video corresponding to the current video capture device identifier in the above video capture device identifier sequence as the video to be analyzed; perform attribute recognition on the human bodies in the above video to be analyzed, and determine whether there is a human body including the warning attribute in the above video to be analyzed according to the recognition result; if so, send a warning message to the above user.
[0149] In some alternative implementation manners of this embodiment, the task type of the above patrol inspection task includes a crowd detection and statistics task. The task type is a crowd detection and statistics task, and the above task request further includes statistics area information. Further, the above analysis unit 5042 is configured to: use the video corresponding to the current video capture device identifier in the above video capture device identifier sequence as the video to be analyzed; based on the above video to be analyzed, perform statistical analysis on the crowd appearing in the statistics area corresponding to the above statistics area information to obtain the crowd information of the above statistics area; and send the above crowd information to the above user as the analysis and processing result.
[0150] In some alternative implementation manners of this embodiment, the task type of the above patrol inspection task does not include an action warning task. The task type is an action warning task. Further, the above second execution unit is configured to: perform action recognition on the human body in the video corresponding to the above video capture device identifier, and determine whether the human body in the video generates a preset warning action according to the recognition result; if so, generate action warning information according to the detected action, and send the above action warning information to the above user as the analysis and processing result.
[0151] In some alternative implementation manners of this embodiment, the task type of the above patrol inspection task does not include a cross-device tracking task. The task type is a cross-device tracking task, and the above task request further includes a cross-device tracking human body image and a plurality of video capture device identifiers. Further, the above second execution unit is configured to: receive the videos captured by the video capture devices corresponding to the above plurality of video capture device identifiers; extract the feature information of the human body in the above cross-device tracking human body image; according to the above feature information, perform cross-device identification and tracking of the human body in the received videos, and send the relevant information of the identified and tracked human body to the above user as the analysis result information.
[0152] In some alternative implementation manners of this embodiment, the above division unit 5041 is further configured to: determine the number of video capture device identifiers in the subset according to a preset time interval, the number of video capture device identifiers in the above video capture device identifier set, and the access time of a single video capture device; and divide the video capture device identifiers in the above video capture device identifier set according to the determined number of video capture device identifiers in the subset to obtain at least one video capture device identifier subset.
[0153] Next, refer to Figure 6 , which shows a schematic structural diagram of an electronic device (such as Figure 1 the server or terminal device in Figure 6 ) 600 suitable for implementing the embodiments of the present disclosure. The shown electronic device is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.
[0154] As shown in Figure 6 , the electronic device 600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0155] Generally, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 6 the electronic device 600 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had. Figure 6 Each block shown in
[0156] may represent a device or, as needed, multiple devices.
[0157] It should be noted that the computer-readable medium described in the embodiments of the present disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the embodiments of the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0158] The above computer-readable medium can be included in the above electronic device; or it can exist separately without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the electronic device, the electronic device is caused to: obtain a task request sent by a user, where the task request includes a task type and a video acquisition device identifier; determine whether the task type belongs to the task type of a preset patrol task; in response to determining that the task type belongs to the task type of the preset patrol task, store the video acquisition device identifier into a video acquisition device identifier set preset for the task type; for the video acquisition device identifier set, perform the following steps: divide the video acquisition device identifiers in the video acquisition device identifier set to obtain at least one video acquisition device identifier subset; for the video acquisition device identifier subset in the at least one video acquisition device identifier subset, determine a video acquisition device identifier sequence based on the video acquisition device identifier subset, analyze and process the videos corresponding to the video acquisition device identifiers in the video acquisition device identifier sequence in sequence according to the task type, and send the analysis and processing results to the user.
[0159] Computer program code for performing the operations of the embodiments of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., connected through the Internet using an Internet service provider).
[0160] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0161] The units involved in the embodiments described in the present disclosure may be implemented in software or in hardware. The described units may also be provided in a processor. For example, it may be described as: a processor includes an acquisition unit, a judgment unit, a storage unit, and a first execution unit. Among them, the names of these units do not constitute a limitation on the unit itself in some cases. For example, the acquisition unit may also be described as "the unit for acquiring the task request sent by the user".
[0162] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) disclosed in the embodiments of the present disclosure that have similar functions.
Claims
1. A method for processing video, comprising: Obtaining a task request sent by a user, where the task request includes a task type and a video capture device identifier; Determining whether the task type belongs to a task type of a preset patrol task; In response to determining that the task type belongs to a task type of a preset patrol task, storing the video capture device identifier into a video capture device identifier set preset for the task type, where the patrol task is a monitoring task that only needs to be detected once within a preset time interval; For the video capture device identifier set, perform the following steps: divide the video capture device identifiers in the video capture device identifier set according to the corresponding installation locations to obtain at least one video capture device identifier subset; for the video capture device identifier subset in the at least one video capture device identifier subset, determine a video capture device identifier sequence based on the video capture device identifier subset, and analyze and process the videos corresponding to the video capture device identifiers in the video capture device identifier sequence in sequence according to the task type within the preset time interval, and send the analysis and processing results to the user.
2. The method according to claim 1, wherein The method further includes: In response to determining that the task type does not belong to a task type of a preset patrol task, analyzing and processing the video corresponding to the video capture device identifier according to the task type, and sending the analysis and processing results to the user.
3. The method according to claim 1, wherein, The task type of the patrol task includes human detection and tracking, and the task type is human detection and tracking; and The analyzing and processing the videos corresponding to the video capture device identifiers in the video capture device identifier sequence in sequence according to the task type, and sending the analysis and processing results to the user includes: Regarding the video corresponding to the current video capture device identifier in the video capture device identifier sequence as a video to be analyzed; Removing the human body images in the video to be analyzed that meet the preset conditions to obtain a processed video; Performing human detection and tracking on the processed video to obtain the human movement trajectories of at least one human body; For the human body in the at least one human body, obtaining different orientation human body images collected for the human body in different orientations in the processed video; Regarding the human movement trajectories and different orientation human body images of the human body in the at least one human body as the analysis and processing results and sending them to the user.
4. The method according to claim 1, wherein, The task type of the patrol task includes target human body retrieval, the task type is target human body retrieval, and the task request further includes target human body attributes; and The analyzing and processing the videos corresponding to the video capture device identifiers in the video capture device identifier sequence in sequence according to the task type, and sending the analysis and processing results to the user includes: Regarding the video corresponding to the current video capture device identifier in the video capture device identifier sequence as a video to be analyzed; Performing attribute recognition on the human bodies in the video to be analyzed to obtain a human body attribute set of the human bodies in the video to be analyzed; Based on the target human body attributes and the set of human body attributes of the human body in the video to be analyzed, identify the target human body from the video to be analyzed, and send the relevant information of the target human body to the user as the analysis and processing result.
5. The method according to claim 1, wherein, The task types of the inspection task include behavior prompt tasks. The task types are area intrusion behavior prompt tasks, cross-warning line behavior prompt tasks, area stay behavior prompt tasks, or off-duty behavior prompt tasks. The task request also includes prompt area information; and The sequentially analyzing and processing the videos corresponding to the video capture device identifiers in the video capture device identifier sequence according to the task type and sending the analysis and processing results to the user includes: Regarding the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed; In response to determining that the task type is an area intrusion behavior prompt task, perform the following first processing: Determine whether a human body appears in the target area corresponding to the prompt area information in the video to be analyzed; if a human body appears, send the relevant information of the appeared human body to the user as the analysis and processing result; In response to determining that the task type is a cross-warning line behavior prompt task, perform the following second processing: Determine whether a human body crosses the warning line corresponding to the prompt area information in the video to be analyzed; if so, send the relevant information of the human body that crosses the warning line to the user as the analysis and processing result; In response to determining that the task type is an area stay behavior prompt task, perform the following third processing: Determine whether the duration of stay of the human body that appears in the target area corresponding to the prompt area information in the video to be analyzed in the target area exceeds a preset duration; if it exceeds, send the relevant information of the human body that stays for more than the preset duration to the user as the analysis and processing result; In response to determining that the task type is an off-duty behavior prompt task, perform the following fourth processing: Determine that the time when a human body leaves in the target area corresponding to the prompt area information in the video to be analyzed exceeds a preset time threshold, and the number of human bodies in the target area is less than a preset number threshold; send the relevant information of the human body that leaves the target area for more than the preset time threshold to the user as the analysis and processing result.
6. The method according to claim 1, wherein The task types of the inspection task include human body attribute warning tasks. The task type is a human body attribute warning task, and the task request includes warning attributes; and The sequentially analyzing and processing the videos corresponding to the video capture device identifiers in the video capture device identifier sequence according to the task type and sending the analysis and processing results to the user includes: Regarding the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed; Performing attribute recognition on the human bodies in the video to be analyzed, and determining whether there is a human body including warning attributes in the video to be analyzed according to the recognition result; If it appears, send a warning message to the user.
7. The method according to claim 1, wherein The task types of the inspection task include crowd detection and statistics tasks. The task type is a crowd detection and statistics task, and the task request further includes statistical area information; and The step of sequentially analyzing and processing the videos corresponding to the video capture device identifiers in the video capture device identifier sequence according to the task type and sending the analysis and processing results to the user includes: Regarding the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed; Based on the video to be analyzed, performing statistical analysis on the crowd appearing in the statistical area corresponding to the statistical area information to obtain the crowd information of the statistical area; Sending the crowd information to the user as the analysis and processing result.
8. The method according to claim 2, wherein The task type of the inspection task does not include action alarm tasks. The task type is an action alarm task; and The step of analyzing and processing the video corresponding to the video capture device identifier according to the task type and sending the analysis and processing result to the user includes: Performing action recognition on the human body in the video corresponding to the video capture device identifier, and determining whether the human body in the video generates a preset alarm action according to the recognition result; If it is generated, generating action alarm information according to the detected action and sending the action alarm information to the user as the analysis and processing result.
9. The method according to claim 2, wherein, The task type of the inspection task does not include cross-device tracking tasks. The task type is a cross-device tracking task, and the task request further includes a cross-device tracking human body image and a plurality of video capture device identifiers; And The step of analyzing and processing the video corresponding to the video capture device identifier according to the task type and sending the analysis and processing result to the user includes: Receiving the videos captured by the video capture devices corresponding to the plurality of video capture device identifiers; Extracting the feature information of the human body in the cross-device tracking human body image; According to the feature information, cross-device identifying and tracking the human body in the received videos, and sending the relevant information of the identified and tracked human body to the user as the analysis result information.
10. The method according to claim 1, wherein, The step of dividing the video capture device identifiers in the video capture device identifier set to obtain at least one video capture device identifier subset includes: Determining the number of video capture device identifiers in the subset according to a preset time interval, the number of video capture device identifiers in the video capture device identifier set, and the access time of a single video capture device; Dividing the video capture device identifiers in the video capture device identifier set according to the determined number of video capture device identifiers in the subset to obtain at least one video capture device identifier subset.
11. A device for processing videos, comprising: An acquisition unit configured to acquire a task request sent by a user, where the task request includes a task type and a video capture device identifier; A judgment unit configured to judge whether the task type belongs to the task types of a preset inspection task; A storage unit, configured to store the video capture device identifier into a video capture device identifier set preset for the task type in response to determining that the task type belongs to a task type of a preset patrol inspection task, where the patrol inspection task is used to indicate a monitoring task that only needs to be detected once within a preset time interval; A first execution unit, configured to execute a preset step for the video capture device identifier set, where the first execution unit includes: a division unit, configured to divide the video capture device identifiers in the video capture device identifier set according to the corresponding installation positions to obtain at least one video capture device identifier subset; an analysis unit, configured to, for a video capture device identifier subset in the at least one video capture device identifier subset, determine a video capture device identifier sequence based on the video capture device identifier subset, and sequentially analyze and process the videos corresponding to the video capture device identifiers in the video capture device identifier sequence according to the task type within the preset time interval, and send the analysis and processing results to the user.
12. The apparatus according to claim 11, wherein, The device further includes: A second execution unit, configured to, in response to determining that the task type does not belong to a task type of a preset patrol inspection task, analyze and process the video corresponding to the video capture device identifier according to the task type, and send the analysis and processing results to the user.
13. The apparatus according to claim 11, wherein The task type of the patrol inspection task includes human body detection and tracking, and the task type is human body detection and tracking; and The analysis unit is further configured to: Use the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed; Remove the human body images in the video to be analyzed that meet the preset conditions to obtain a processed video; Perform human body detection and tracking on the processed video to obtain the human body movement trajectories of at least one human body; For the human body in the at least one human body, obtain the human body images with different orientations collected for the human body in the processed video; Use the human body movement trajectories and the human body images with different orientations of the human body in the at least one human body as the analysis and processing results and send them to the user.
14. The apparatus according to claim 11, wherein, The task type of the patrol inspection task includes target human body retrieval, the task type is target human body retrieval, and the task request further includes target human body attributes; and The analysis unit is further configured to: Use the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed; Perform attribute recognition on the human bodies in the video to be analyzed to obtain a human body attribute set of the human bodies in the video to be analyzed; Identify the target human body from the video to be analyzed according to the target human body attributes and the human body attribute set of the human bodies in the video to be analyzed, and use the relevant information of the target human body as the analysis and processing results and send them to the user.
15. The device according to claim 11, wherein, The task types of the patrol inspection task include behavior prompt tasks. The task types are area intrusion behavior prompt tasks, cross-warning line behavior prompt tasks, area stay behavior prompt tasks, or off-duty behavior prompt tasks. The task request further includes prompt area information; and The analysis unit is further configured to: Use the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed; In response to determining that the task type is an area intrusion behavior prompt task, perform the following first process: Determine whether a human body appears in the target area corresponding to the prompt area information in the video to be analyzed; If a human body appears, send the relevant information of the appeared human body to the user as the analysis processing result; In response to determining that the task type is a cross-warning line behavior prompt task, perform the following second process: Determine whether a human body crosses the warning line corresponding to the prompt area information in the video to be analyzed; if so, send the relevant information of the human body that crosses the warning line to the user as the analysis processing result; In response to determining that the task type is an area stay behavior prompt task, perform the following third process: Determine whether the duration of stay of the human body that appears in the target area corresponding to the prompt area information in the video to be analyzed in the target area exceeds a predetermined duration; If it exceeds, send the relevant information of the human body that stays for more than the predetermined duration to the user as the analysis processing result; In response to determining that the task type is an off-duty behavior prompt task, perform the following fourth process: Determine that the time when a human body leaves the target area corresponding to the prompt area information in the video to be analyzed exceeds a preset time threshold, and the number of human bodies in the target area is less than a preset number threshold; send the relevant information of the human body that has left the target area for more than the preset time threshold to the user as the analysis processing result.
16. The device according to claim 11, wherein, The task types of the patrol inspection task include human body attribute alarm tasks. The task type is a human body attribute alarm task. The task request includes alarm attributes; and The analysis unit is further configured to: Use the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed; Perform attribute recognition on the human bodies in the video to be analyzed, and determine whether a human body including alarm attributes appears in the video to be analyzed according to the recognition result; If it appears, send an alarm message to the user.
17. The apparatus according to claim 11, wherein, The task types of the patrol inspection task include crowd detection and statistics tasks. The task type is a crowd detection and statistics task. The task request further includes statistics area information; and The analysis unit is further configured to: Use the video corresponding to the current video capture device identifier in the video capture device identifier sequence as the video to be analyzed; Based on the video to be analyzed, perform statistical analysis on the crowd that appears in the statistics area corresponding to the statistics area information to obtain the crowd information of the statistics area; Send the crowd information to the user as the analysis processing result.
18. The apparatus according to claim 12, wherein, The task types of the patrol inspection task do not include action alarm tasks. The task type is an action alarm task; and The second execution unit is further configured to: perform action recognition on the human body in the video corresponding to the video capture device identifier, and determine whether the human body in the video generates a preset warning action according to the recognition result; if so, generate action warning information according to the detected action, and send the action warning information to the user as the analysis and processing result.
19. The device according to claim 12, wherein, The task type of the inspection task does not include a cross-device tracking task. The task type is a cross-device tracking task, and the task request further includes a cross-device tracking human body image and a plurality of video capture device identifiers; and The second execution unit is further configured to: receive the videos captured by the video capture devices corresponding to the plurality of video capture device identifiers; extract the feature information of the human body in the cross-device tracking human body image; cross-device identify and track the human body from the received videos according to the feature information, and send the relevant information of the identified and tracked human body to the user as the analysis result information.
20. The apparatus according to claim 11, wherein, The partitioning unit is further configured to: determine the number of video capture device identifiers in the subset according to a preset time interval, the number of video capture device identifiers in the video capture device identifier set, and the access time of a single video capture device; partition the video capture device identifiers in the video capture device identifier set according to the determined number of video capture device identifiers in the subset, to obtain at least one video capture device identifier subset.
21. An apparatus, comprising: one or more processors; a storage device having stored thereon one or more programs, when the one or more programs are executed by the one or more processors, enabling the one or more processors to implement the method according to any one of claims 1-10.
22. A computer-readable medium having a computer program stored thereon, wherein, The program, when executed by the processor, implements the method according to any one of claims 1-10.
Citation Information
Patent Citations
Virtualization-based video content analyzing method and system
CN104657205A
Behavior tracking system
CN109472233A