Event processing method and device

The network recorder receives and sorts the events reported by the network camera, calculates the score value based on the preset parameter values ​​and the number of events, and dynamically adjusts the processing type, solving the event processing delay problem caused by insufficient IPC resources and improving event processing efficiency.

CN119295898APending Publication Date: 2025-01-10ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411320907.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In the field of image processing, network cameras (IPCs) and network video recorders (NVRs) are inefficient in processing events. IPCs cannot handle events in a timely manner due to many events and high resource usage, resulting in untimely processing of events.

Method used

Receive the event set reported by the network camera through a network recorder, calculate the score value based on the preset parameter values ​​and event number of the target object and processing type, sort and process events, dynamically adjust the processing type to optimize resource usage, and ensure event processing efficiency.

Benefits of technology

It improves event processing efficiency, ensures the dynamic combination processing capability of network cameras and network recorders, and solves the problem of event processing delay caused by insufficient IPC resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295898A_ABST
    Figure CN119295898A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an event processing method and device, applied to a network video recorder, the network video recorder is connected to N network cameras, the network cameras are used for processing M target objects in a shooting area of the network cameras on S processing types, different processing types consume different resources, N, M and S are integers greater than 1, and N is an integer greater than 1. Comprising the following steps: a network video recorder receives events reported by N network cameras to obtain N event sets; the network video recorder sorts the N event sets according to the monitored target object to obtain N sorted event sets; and the network video recorder processes each event in the N sorted event sets according to the processing type. According to the invention, the problem of low event processing efficiency is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the computer field, and in particular, to a method and device for processing an event. Background Art

[0002] In the current image processing field, various network cameras (IPCs) and network video cameras (NVRs) support intelligent processing, such as human detection, face detection, face recognition, vehicle detection, license plate recognition, etc. Due to the different capabilities of IPCs and NVRs, the intelligent processing capabilities they support are also different. Generally speaking, NVRs have stronger capabilities. In different scenarios, IPCs or NVRs need to enable related intelligent processing to facilitate better management within the area. However, how to determine whether the front-end IPC or the back-end NVR enables intelligent processing can often only be determined manually.

[0003] However, due to the large number of events that the IPC processes in a short period of time, or due to the fact that other functions of the IPC itself occupy a large amount of IPC performance, the available resources of the IPC are reduced during this period, and the processing cannot be carried out in time. An NVR is connected to multiple IPCs. In some cases, the NVR will receive multiple events that need to be processed, and there will be problems with untimely processing.

[0004] There is currently no effective solution to the above problems. Summary of the invention

[0005] The embodiments of the present invention provide a method and device for processing an event, so as to at least solve the problem of low event processing efficiency in the related art.

[0006] According to an embodiment of the present invention, a method for processing events is provided, which is applied to a network video recorder, wherein the network video recorder is connected to N network cameras, and the network cameras are used to process M target objects in their shooting areas using S processing types, where different processing types consume different resources, and N, M, and S are integers greater than 1, including: the network video recorder receives events reported by N network cameras to obtain N event sets, wherein the event set includes an event reported by a network camera, the event set includes M event subsets, wherein the event subset includes processing information of a target object in its shooting area by the network camera using S processing types, and the event subset includes S events, wherein the event includes processing information of a target object in its shooting area by the network camera using one processing type; the network video recorder sorts the N event sets according to the monitored target objects to obtain sorted N event sets; and the network video recorder processes each of the events in the sorted N event sets according to the processing type.

[0007] In an exemplary embodiment, the network video recorder sorts N event sets according to the monitored target object to obtain the sorted N event sets, including: the network video recorder determines the target object monitored by each of the network cameras; the network video recorder determines the score value of each of the event sets according to the preset parameter value of the target object and the number of events in the event subset of the target object; the network video recorder sorts the N event sets according to the score value of each of the event sets to obtain the sorted N event sets.

[0008] In an exemplary embodiment, the network video recorder determines the score value of each event set according to the preset parameter value of the target object and the number of events in the event subset of the target object, including:

[0009] The network video recorder determines the score value E of the i-th event set by the following formula, 1≤i≤N:

[0010]

[0011] Among them, f x is the preset parameter value of the xth target object, Q x is the number of events in the xth event subset, and the xth event subset includes the processing information of the network camera on the xth target object in its shooting area on S processing types.

[0012] In an exemplary embodiment, the network video recorder processes each of the events in the sorted N event sets according to the processing type, including: the network video recorder determines the score value of each of the event subsets included in each of the event sets according to the preset parameter value of each processing type; the network video recorder sorts each of the event subsets based on the score value of each of the event subsets to obtain a plurality of sorted event subsets; the network video recorder processes the events in the sorted plurality of event subsets in sequence.

[0013] In an exemplary embodiment, the network video recorder determines the score value of each of the event subsets included in each of the event sets according to the preset parameter values ​​of each processing type, including:

[0014] The network video recorder determines the score value K of the j-th event subset by the following formula, 1≤j≤M:

[0015]

[0016] Among them, w t is the preset parameter value of the tth processing type, Q tis the number of events of the tth treatment type in the jth event subset.

[0017] In an exemplary embodiment, the network video recorder processes events in the sorted multiple event subsets in sequence, including: the network video recorder processes each event in the event subset according to the processing type in descending order of resources consumed; or, the network video recorder processes each event in the event subset according to the processing type in descending order of resources consumed.

[0018] In an exemplary embodiment, the network video recorder receives events reported by N network cameras, including: when the available resources of the first network camera are less than the resources consumed by the first processing type, the first network camera selects other processing types according to the size of the available resources to process the first target object in its shooting area, wherein the resources consumed by the first processing type are greater than the resources consumed by the other processing types, the available resources of the first network camera are greater than or equal to the resources consumed by the other processing types, the other processing types are processing types other than the first processing type among the S processing types, the first network camera is any network camera among the N network cameras, and the first target object is any target object in the shooting area of ​​the first network camera; after the first network camera completes processing the target object by using the other processing types, the network video recorder receives the event reported by the first network camera, wherein the event reported by the first network camera includes processing information of the first network camera on the target object in its shooting area using the other processing types.

[0019] According to another embodiment of the present invention, there is provided a device for processing events, which is applied to a network video recorder, wherein the network video recorder is connected to N network cameras, and the network cameras are used to process M target objects in their shooting area using S processing types, and different processing types consume different resources, and N, M, and S are integers greater than 1, including: a receiving module, used to receive events reported by N network cameras, and obtain N event sets, wherein the event set includes an event reported by a network camera, and the event set includes M event subsets, and the event subset includes processing information of a target object in its shooting area by the network camera using S processing types, and the event subset includes S events, and the event includes processing information of a target object in its shooting area by the network camera using one processing type; a sorting module, used to sort the N event sets according to the monitored target objects, and obtain the sorted N event sets; and a processing module, used to process each of the events in the sorted N event sets according to the processing type.

[0020] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of any of the above methods when executed by a processor.

[0021] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0022] According to yet another embodiment of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0023] Through the present invention, since the network camera reports the processing information of the target object in its shooting area on S processing types to the network video recorder, the network video recorder receives the events reported by N network cameras to obtain N event sets. The network video recorder sorts the N event sets according to the monitored target objects to obtain the sorted N event sets; the network video recorder processes each of the events in the sorted N event sets according to the processing type. The events are processed by combining the network video recorder and the network camera. The network camera IPC and the network video camera NVR are dynamically combined to process the events, thereby improving the processing efficiency of the events. Therefore, the problem of low event processing efficiency in the related art can be solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a hardware structure block diagram of a mobile terminal of a method for processing events according to an embodiment of the present invention;

[0025] Figure 2 is a flowchart of a method for processing events according to an embodiment of the present invention;

[0026] Figure 3 is a schematic diagram of connecting a network video recorder and a network camera according to an embodiment of the present invention;

[0027] Figure 4 is a schematic diagram of an overall process according to an embodiment of the present invention;

[0028] Figure 5 is a structural block diagram of a device for processing events according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0031] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure diagram of a mobile terminal of a method for processing events according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0032] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for processing events in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0033] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0034] In this embodiment, a method for processing events running on the mobile terminal is provided, which is applied to a network video recorder. The network video recorder is connected to N network cameras. The network cameras are used to process M target objects in their shooting areas using S processing types. Different processing types consume different resources. N, M, and S are integers greater than 1. Figure 2 is a flowchart of a method for processing an event according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0035] Step S202, the network video recorder receives N events reported by the network cameras, and obtains N event sets, wherein the event set includes an event reported by a network camera, the event set includes M event subsets, the event subsets include processing information of the network camera on a target object in its shooting area using S processing types, and the event subsets include S events, and the events include processing information of the network camera on a target object in its shooting area using one processing type;

[0036] The above-mentioned target objects include but are not limited to: people, vehicles, animals, etc. When the target object is a person, the above-mentioned processing types include but are not limited to: intelligent human motion detection, face detection, and face recognition. When the target object is a vehicle, the above-mentioned processing types include but are not limited to: intelligent vehicle motion detection, vehicle detection, and license plate recognition.

[0037] Taking any one of the N network cameras in the above embodiment as an example, the network camera performs different types of processing on people and vehicles in its monitoring area, including but not limited to the above-mentioned intelligent human motion detection, face detection, face recognition, intelligent vehicle motion detection, vehicle detection, and license plate recognition.

[0038] When the target object is a person, the processing information obtained by the face recognition of the network camera is used as event FA, the processing information of face detection is used as event FA1, and the processing information of human intelligent motion detection is used as event FA2. FA is assumed to be a high-precision and high-energy processing type, FA1 is a low-energy processing type that can provide data for FA, and FA2 is a lower-energy processing type that can provide data for FA. FA, FA1, and FA2 constitute an event subset A.

[0039] When the target object is a person, the processing information obtained by the network camera license plate recognition is used as event FB, the processing information of license plate detection is used as event FB1, and the processing information of license plate intelligent dynamic detection is used as event FB2. FB is set as a high-precision and high-energy processing type, FB1 is a low-energy processing type that can provide data for FB, and FA2 is a lower-energy processing type that can provide data for FB. FB, FB1, and FB2 constitute an event subset B.

[0040] By analogy, when there are other target objects in the shooting area of ​​the network camera, there may be other events FC, FC1, FC2, FD, FD1, FD2, etc.

[0041] The event subset A and the event subset B constitute an event set, and the network camera reports the event set to the network video recorder. In this way, the network video recorder receives N event sets reported by N network cameras.

[0042] like Figure 3 As shown in the figure, a network video recorder (NVR) is connected to multiple network cameras (IPCs). Different IPCs shoot different areas, and people, cars, or other things may appear in the shooting area. The IPC will trigger different events according to the content of the shooting picture, such as license plate recognition, face recognition, etc.

[0043] The network camera (IPC) and the network video recorder (NVR) are connected through the network, and both the IPC and the NVR can complete human detection, face detection, face recognition, vehicle detection, license plate recognition and other processing.

[0044] Different processing types consume different resources (memory or CPU). For example, face recognition requires more resources than face detection, and license plate recognition consumes more resources than vehicle detection. However, face detection can provide processing information for face recognition to a certain extent, achieving faster recognition. The license plate detection function can also provide processing information for the license plate recognition function to a certain extent, making it recognize faster.

[0045] Step S204, the network video recorder sorts the N event sets according to the monitored target object to obtain sorted N event sets;

[0046] Since one NVR is connected to multiple IPCs, in some cases the NVR will receive multiple events that need to be processed. The NVR needs to sort the event sets sent by the IPCs and process the events in each event set according to the sorting.

[0047] Specifically, the network video recorder sorts the N event sets in the following manner:

[0048] The network video recorder determines the target object monitored by each network camera, and determines the score value of each event set according to the preset parameter value of the target object and the number of events in the event subset of the target object;

[0049] Take the calculation of the score value E of the i-th event set among the N event sets as an example:

[0050]

[0051] Among them, f x is the preset parameter value of the xth target object, Q x is the number of events in the xth event subset, and the xth event subset includes the processing information of the network camera on the xth target object in its shooting area on S processing types.

[0052] Take the i-th event set as an example, which includes four event subsets. The four event subsets are y a ,y b ,y c and d Among them, y a It includes the processing information of the network camera on the people in its shooting area in various processing types, b Including the processing information of the network camera on the vehicles in its shooting area in various processing types, c Including the information on the treatment of animals in the area of ​​the network camera in various treatment types, d Includes information about the processing of buildings within the shooting area by the network camera in various processing types.

[0053] The score value of the i-th event set is calculated by the following formula:

[0054] E i =f 1 Q 1 +f 2 Q 2 +f 3 Q 3 +f 4 Q 4

[0055] Among them, f 1 、f 2 、f 3 、f 4 is a preset parameter value, which can be set according to the importance of the target object. For example, assuming that the importance of people is higher than that of vehicles, the importance of vehicles is higher than that of animals, and the importance of animals is higher than that of buildings, then f 1 >f 2 >f3 >f 4 The specific parameter value can be set according to the actual situation, for example, it can be any value between 0 and 1. 1 is the event subset y a The number of events in Q 2 is the event subset y b The number of events in Q 3 is the event subset y c The number of events in Q 4 is the event subset y d The number of events in .

[0056] Through the above embodiment, the network video recorder sorts the N event sets from high to low according to the score values ​​of each event set to obtain the sorted N event sets. And the network video recorder processes each event set in sequence according to the score values ​​from high to low.

[0057] Step S206: the network video recorder processes each of the events in the sorted N event sets according to the processing type.

[0058] Specifically, the network video recorder determines the score values ​​of each event subset included in each event set according to the preset parameter values ​​of each processing type; the network video recorder sorts each event subset based on the score values ​​of each event subset to obtain a plurality of sorted event subsets; and the network video recorder processes the events in the sorted plurality of event subsets in sequence.

[0059] The network video recorder determines the score value of each event subset included in each event set according to the preset parameter value of each processing type, including:

[0060] The network video recorder determines the score value K of the j-th event subset by the following formula, 1≤j≤M:

[0061]

[0062] Among them, w c is the preset parameter value of the cth processing type, Q c is the number of events of the cth processing type in the jth event subset.

[0063] The processing types include but are not limited to FA, FA1, FA2, FB, FB1, FB2, etc. in the above embodiments. Since the processing information of the high-precision and high-energy consumption processing type does not need to be processed again by the NVR, the preset parameter values ​​of the high-precision and high-energy consumption processing types of FA and FB can be set to 0, and the preset parameter values ​​of other processing types can be set according to actual conditions.

[0064] Take the above event types FA1 and FA2 as an example. Generally speaking, for events with low energy consumption, the data provided is relatively analog, and the secondary processing requires more resources. In other words, for FA1 and FA2, the resources required for the secondary processing of FA2 are also more. 1 Indicates the preset parameter value for FA1, w 2 Indicates the preset parameter value for FA2, w 1 >w 2 , we can use w 1 Set to w 2 For example, w 1 =β*w 2 , β can be any value greater than 1, such as 2, 3, etc. This can process many events more quickly.

[0065] Q c It represents the number of events of type FA1 in the jth event subset, or the number of events of type FA2, and so on. In this way, the score values ​​of each event subset in the event set over a period of time are obtained. For example:

[0066] K_FA n =w FA1 *Q FA1 +w FA2 *Q FA2

[0067] K_FB n =w FB1 *Q FB1 +w FA2 *Q FB2

[0068] K_FC n =w FC1 *Q FC1 +w FC2 *Q FC2

[0069] K_FD n =w FD1 *Q FD1 +w FD2 *Q FD2

[0070] K_FA n is the fraction of the event subset that contains FA1 and FA2, w FA1 is the preset parameter value for processing type FA1, Q FA1 The number of events of type FA1 processed in the event subset, and so on.

[0071] The network video recorder processes the events in the sorted multiple event subsets in order from high to low score values.

[0072] As an optional implementation, the network video recorder processes the events in the sorted multiple event subsets in sequence, including: the network video recorder processes each event in the event subset from large to small according to the resources consumed by the processing type; or, the network video recorder processes each event in the event subset from small to large according to the resources consumed by the processing type.

[0073] As an optional implementation manner, the network video recorder receives events reported by N network cameras, including: when the available resources of the first network camera are less than the resources consumed by the first processing type, the first network camera selects other processing types according to the size of the available resources to process the first target object in its shooting area, wherein the resources consumed by the first processing type are greater than the resources consumed by the other processing types, the available resources of the first network camera are greater than or equal to the resources consumed by the other processing types, the other processing types are processing types other than the first processing type among the S processing types, the first network camera is any network camera among the N network cameras, and the first target object is any target object in the shooting area of ​​the first network camera; after the first network camera completes processing of the target object by using the other processing types, the network video recorder receives the event reported by the first network camera, wherein the event reported by the first network camera includes processing information of the first network camera on the target object in its shooting area using the other processing types.

[0074] For example, the first processing type may be FA, and the other processing types may be FA1 or FA2.

[0075] In order to ensure the real-time and accuracy of event processing and the overall operation process of IPC, it is necessary to coordinate with NVR to perform corresponding intelligent detection and analysis to release some IPC resources. The relevant processes are as follows: Figure 4 As shown, the following steps are included:

[0076] Step S401, determine whether the available resources of the IPC can process events of the processing type FA. When the available resources of the IPC are insufficient to process events of the processing type FA due to various reasons (such as too frequent event triggering or the IPC running other functions);

[0077] Step S402, if the IPC cannot normally process events of type FA, then adjust the IPC to open the processing type of FA1 or FA2 according to the current available resources of the IPC, wherein if the current available resources of the IPC are relatively low (greater than the first preset resource threshold and less than the second preset resource threshold), select FA1; if the current capacity is very low (less than the first preset resource threshold), select FA2; the first preset resource threshold and the second preset resource threshold can be set according to actual conditions.

[0078] Step S403, when the NVR receives the information sent by the IPC, it determines whether the NVR needs to process it again. For example, if the IPC sends the processing information of FA, the NVR does not need to perform secondary processing and directly saves the data to the NVR; however, if the IPC sends the FA1 or FA2 function information, the NVR needs to perform secondary processing;

[0079] Step S404, the NVR receives function FA1 or FA2 information that requires secondary processing, and needs to determine whether real-time processing is required (for some information with low real-time requirements, since the NVR can store a large amount of video and data, it can delay the query of video and related information for processing) and whether real-time processing can be performed (also determined based on the current NVR operating status. If the current NVR operating resources are relatively tight, it is considered that real-time processing cannot be performed and delayed processing is used). If the NVR needs delayed processing; the NVR needs to select an appropriate time to delay the operation and processing of FA. The appropriate time includes when the NVR-related resources (memory, CPU, etc.) are relatively idle and the events are processed in the order of arrangement in the above embodiment.

[0080] Step S405, the NVR obtains the video and function FA1 or FA2 information of the corresponding time from the relevant memory, performs a function FA detection on the NVR, and stores the detection result on the NVR.

[0081] In general, when the current performance of the IPC is not sufficient to execute high-energy-consuming processing types, it will switch to low-energy-consuming processing types and report them to the NVR. The NVR will select the appropriate time and appropriate historical data, and perform high-energy-consuming processing types again based on the current video information and other information, and save the processing results.

[0082] Determine multi-channel video surveillance and intelligent analysis of the front and back ends. When the IPC performance is insufficient to execute high-energy-consuming processing types, switch to lower-energy processing types and notify the NVR so that the NVR can further perform secondary processing on the lower-energy-consuming processing types. When the NVR performs secondary processing, the execution time is selected according to the current NVR status and the IPC and events that are prioritized for secondary processing are selected according to relevant policies. Dynamic adjustment of front-end and back-end intelligent analysis is achieved, and events are processed in a timely manner without being left behind, which better converts resources.

[0083] Optionally, the executor of the above steps may be a background processor, or other devices with similar processing capabilities, or a machine that integrates at least an image acquisition device and a data processing device, wherein the image acquisition device may include a graphics acquisition module such as a camera, and the data processing device may include a computer, a mobile phone or other terminal, but is not limited thereto.

[0084] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0085] In the present embodiment, a device for processing events is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0086] Figure 5 is a structural block diagram of an apparatus for processing events according to an embodiment of the present invention, which is applied to a network video recorder, wherein the network video recorder is connected to N network cameras, and the network cameras are used to process M target objects in their shooting areas in S processing types, and different processing types consume different resources, and N, M, and S are integers greater than 1, such as Figure 5 As shown, the device comprises:

[0087] A receiving module 502 is configured to receive events reported by N network cameras to obtain N event sets, wherein the event set includes an event reported by a network camera, the event set includes M event subsets, the event subsets include processing information of the network camera on a target object in its shooting area using S processing types, and the event subsets include S events, and the events include processing information of the network camera on a target object in its shooting area using a processing type;

[0088] A sorting module 504 is used to sort the N event sets according to the monitored target object to obtain sorted N event sets;

[0089] The processing module 506 is used to process each of the events in the sorted N event sets according to the processing type.

[0090] In an exemplary embodiment, the above-mentioned device is also used to determine the target object monitored by each of the network cameras; determine the score value of each of the event sets based on the preset parameter value of the target object and the number of events in the event subset of the target object; sort the N event sets according to the score value of each of the event sets to obtain N sorted event sets.

[0091] In an exemplary embodiment, the apparatus is further configured to determine the score value E of the i-th event set by the following formula, 1≤i≤N:

[0092]

[0093] Among them, f x is the preset parameter value of the xth target object, Q x is the number of events in the xth event subset, and the xth event subset includes the processing information of the network camera on the xth target object in its shooting area on S processing types.

[0094] In an exemplary embodiment, the above-mentioned device is also used to determine the score value of each of the event subsets included in each of the event sets based on the preset parameter values ​​of each processing type; sort each of the event subsets based on the score value of each of the event subsets to obtain a plurality of sorted event subsets; and the network video recorder processes the events in the sorted plurality of event subsets in turn.

[0095] In an exemplary embodiment, the apparatus is further configured to determine the score value K of the j-th event subset by the following formula, 1≤j≤M:

[0096]

[0097] Among them, w t is the preset parameter value of the tth processing type, Q t is the number of events of the tth treatment type in the jth event subset.

[0098] In an exemplary embodiment, the above-mentioned device is also used to process each event in the event subset according to the processing type consumed resources from large to small; or, to process each event in the event subset according to the processing type consumed resources from small to large.

[0099] In an exemplary embodiment, when the available resources of the first network camera are less than the resources consumed by the first processing type, the first network camera is used to select other processing types according to the size of the available resources to process the first target object in its shooting area, wherein the resources consumed by the first processing type are greater than the resources consumed by the other processing types, the available resources of the first network camera are greater than or equal to the resources consumed by the other processing types, the other processing types are processing types other than the first processing type among the S processing types, the first network camera is any network camera among the N network cameras, and the first target object is any target object in the shooting area of ​​the first network camera; after the first network camera completes processing of the target object by using the other processing types, the above-mentioned device is also used to receive events reported by the first network camera, wherein the events reported by the first network camera include processing information of the first network camera on the target object in its shooting area using the other processing types.

[0100] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0101] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0102] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0103] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0104] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0105] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0106] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps of the method described in each embodiment of the present application when executed by a processor.

[0107] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0108] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for processing an event, characterized in that: Applied to a network video recorder, the network video recorder is connected to N network cameras, the network cameras are used to process M target objects in their shooting area using S processing types, different processing types consume different resources, N, M, S are integers greater than 1, including: The network video recorder receives events reported by N network cameras to obtain N event sets, wherein the event set includes an event reported by a network camera, the event set includes M event subsets, the event subsets include processing information of the network camera on a target object in its shooting area using S processing types, and the event subsets include S events, and the events include processing information of the network camera on a target object in its shooting area using a processing type; The network video recorder sorts the N event sets according to the monitored target object to obtain sorted N event sets; The network video recorder processes each of the events in the sorted N event sets according to the processing type.

2. The method according to claim 1, characterized in that The network video recorder sorts the N event sets according to the monitored target object to obtain sorted N event sets, including: The network video recorder determines the target object monitored by each of the network cameras; The network video recorder determines the score value of each event set according to the preset parameter value of the target object and the number of events in the event subset of the target object; The network video recorder sorts the N event sets according to the score value of each event set to obtain sorted N event sets.

3. The method according to claim 2, characterized in that The network video recorder determines the score value of each event set according to the preset parameter value of the target object and the number of events in the event subset of the target object, including: The network video recorder determines the score value E of the i-th event set by the following formula, 1≤i≤N: Among them, f x is the preset parameter value of the xth target object, Q x is the number of events in the xth event subset, and the xth event subset includes the processing information of the network camera on the xth target object in its shooting area on S processing types.

4. The method according to claim 1, characterized in that: The network video recorder processes each of the events in the sorted N event sets according to the processing type, including: The network video recorder determines the score value of each of the event subsets included in each of the event sets according to the preset parameter values ​​of each processing type; The network video recorder sorts each of the event subsets based on the score value of each of the event subsets to obtain a plurality of sorted event subsets; The network video recorder processes the events in the sorted multiple event subsets in sequence.

5. The method according to claim 4, characterized in that The network video recorder determines the score value of each event subset included in each event set according to the preset parameter value of each processing type, including: The network video recorder determines the score value K of the j-th event subset by the following formula, 1≤j≤M: Among them, w t is the preset parameter value of the tth processing type, Q t is the number of events of the tth treatment type in the jth event subset.

6. The method according to claim 4, characterized in that The network video recorder processes the events in the sorted multiple event subsets in sequence, including: The network video recorder processes each event in the event subset according to the resource consumption of the processing type from large to small; or, The network video recorder processes each event in the event subset according to the resource consumption of the processing type from small to large.

7. The method according to claim 1, characterized in that The network video recorder receives events reported by N network cameras, including: In the case where the available resources of the first network camera are less than the resources consumed by the first processing type, the first network camera selects other processing types according to the size of the available resources to process the first target object in its shooting area, wherein the resources consumed by the first processing type are greater than the resources consumed by the other processing types, the available resources of the first network camera are greater than or equal to the resources consumed by the other processing types, the other processing types are processing types other than the first processing type among the S processing types, the first network camera is any network camera among the N network cameras, and the first target object is any target object in the shooting area of ​​the first network camera; After the first network camera completes processing of the target object through other processing types, the network video recorder receives an event reported by the first network camera, wherein the event reported by the first network camera includes processing information of the first network camera on the target object within its shooting area using the other processing types.

8. A device for processing an event, characterized in that: Applied to a network video recorder, the network video recorder is connected to N network cameras, the network cameras are used to process M target objects in their shooting area using S processing types, different processing types consume different resources, N, M, S are integers greater than 1, including: A receiving module, configured to receive events reported by N network cameras, and obtain N event sets, wherein the event set includes an event reported by a network camera, the event set includes M event subsets, the event subsets include processing information of the network camera on a target object in its shooting area using S processing types, and the event subsets include S events, and the events include processing information of the network camera on a target object in its shooting area using one processing type; A sorting module, used for sorting the N event sets according to the monitored target object to obtain sorted N event sets; A processing module is used to process each of the events in the sorted N event sets according to the processing type.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.