A video monitoring method and device, electronic equipment and readable storage medium
By creating a target algorithm container in the video surveillance system and using different image modes to download or update the algorithm, the problem of poor compatibility of video surveillance algorithms is solved, and cross-system adaptation and efficient video surveillance are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TOWER CO LTD
- Filing Date
- 2023-03-27
- Publication Date
- 2026-05-15
AI Technical Summary
Existing video surveillance algorithms have poor compatibility and are difficult to adapt to different customer systems.
By receiving algorithm identifiers and task identifiers sent by network-side devices, a target algorithm container is created. The algorithm is then downloaded or updated from the cloud using container mode (base image, full image, or algorithm repository image) to execute video surveillance tasks.
It improves the compatibility of video surveillance algorithms, enabling them to adapt to different customer systems, reducing manpower requirements, and improving system stability and algorithm update speed.
Smart Images

Figure CN116506572B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically to a video surveillance method, apparatus, electronic device, and readable storage medium. Background Technology
[0002] Intelligent identification of surveillance videos using algorithms can effectively detect the presence of targets in specific areas, reducing manpower and thus being widely applied in fields such as safety production. In related technologies, the algorithm's operating system is typically set up within the client's system for video surveillance. However, due to significant differences in the hardware and software of different client systems, it is difficult for the same type of algorithm to achieve compatibility across different client systems, resulting in poor compatibility of video surveillance algorithms.
[0003] It is evident that there is a problem with the poor compatibility of video surveillance algorithms in related technologies. Summary of the Invention
[0004] This invention provides a video surveillance method, device, electronic device, and readable storage medium to address the problem of poor compatibility of video surveillance algorithms in the prior art.
[0005] To solve the above problems, the present invention is implemented as follows:
[0006] In a first aspect, embodiments of the present invention provide a video surveillance method, comprising:
[0007] The system receives a first algorithm identifier and a task identifier sent by a network-side device. The first algorithm identifier corresponds to a first algorithm that needs to process the video, and the task identifier is an identifier of the task parameters of the video that needs to be processed.
[0008] Based on the first algorithm corresponding to the first algorithm identifier, a first target algorithm container is created, which is a container for processing surveillance video.
[0009] The task parameters corresponding to the task identifier are obtained through the first target algorithm container. The task parameters include video stream address, alarm parameters and alarm area. The alarm parameters are the parameters of the monitored object, and the alarm area is the area where the monitored object exists.
[0010] The monitoring video is obtained from the video stream address through the first target algorithm container;
[0011] The first target algorithm container identifies alarm areas in the surveillance video based on the first algorithm and the alarm parameters to obtain an identification result, which is used to characterize whether a monitoring object exists.
[0012] The identification result is sent to the network-side device.
[0013] In one embodiment, the first target algorithm container operates in one of the following modes: base image mode, full image mode, or algorithm repository image mode.
[0014] The base image mode is a mode that includes a system runtime library and a self-starting application script. The system runtime library is used to represent the system data running in the first target algorithm container, and the self-starting application script is the script for the first target algorithm container to start the algorithm.
[0015] The complete image mode includes the system runtime library, the self-starting application script, and the algorithm corresponding to the first algorithm identifier;
[0016] The algorithm repository image mode includes a system runtime library, a self-starting application script, an algorithm corresponding to the first algorithm identifier, and a local repository. The local repository is used to store multiple algorithms, including the first algorithm.
[0017] The step of creating a first target algorithm container based on the algorithm corresponding to the first algorithm identifier includes:
[0018] Receive first target mode information sent by the network-side device, wherein the first target mode information corresponds to one of the base image mode, full image mode, or algorithm repository image mode;
[0019] Download the image of the first target pattern corresponding to the first target pattern information from the cloud;
[0020] When the first target mode is the full image mode or the algorithm repository image mode, the first target algorithm container is created based on the image of the first target mode;
[0021] When the first target mode is the base image mode, the first algorithm corresponding to the first algorithm identifier is downloaded from the cloud, and the first target algorithm container is created based on the image of the first target mode and the first algorithm.
[0022] In one embodiment, the method further includes:
[0023] Receive a second algorithm identifier sent by the network-side device, wherein the second algorithm identifier is the identifier updated from the first algorithm;
[0024] Download the second algorithm corresponding to the second algorithm identifier from the cloud. The second algorithm is an updated version of the first algorithm.
[0025] When the first target mode is the algorithm repository mirror mode, the second algorithm is stored in the local repository of the first target algorithm container. The first target algorithm container is used to identify the alarm area in the monitoring video based on the second algorithm and the alarm parameters to obtain the identification result.
[0026] When the first target mode is the base image mode, the first target algorithm container is deleted, and a second target algorithm container is created based on the image of the base image mode and the second algorithm. The second target algorithm container is used to identify the alarm area in the monitoring video based on the second algorithm and the alarm parameters to obtain the identification result.
[0027] If the first target mode is the complete image mode, delete the first target algorithm container, obtain the image of the complete image mode corresponding to the second algorithm, and create the second target algorithm container based on the image of the complete image mode corresponding to the second algorithm.
[0028] In one embodiment, the first algorithm is obtained as follows:
[0029] The initial algorithm is run by removing system runtime libraries and startup application scripts to obtain an intermediate algorithm;
[0030] The intermediate algorithm is compressed to obtain the first algorithm;
[0031] The image of the base image mode is obtained in the following way:
[0032] Remove the first algorithm from the initial algorithm to obtain the first intermediate image;
[0033] The first intermediate image is compressed to obtain the image of the base image mode;
[0034] The complete image mode image is obtained in the following way:
[0035] The initial algorithm is compressed to obtain the image of the complete image mode;
[0036] The image of the algorithm repository mirror mode is obtained in the following way:
[0037] The initial algorithm and the local repository are compressed to obtain a mirror image of the algorithm repository image mode.
[0038] In one embodiment, the task parameters further include execution time and video parameters, wherein the video parameters include at least one of frame rate, image resolution, and video length;
[0039] The step of obtaining the surveillance video from the video stream address through the first target algorithm container includes:
[0040] The first target algorithm container sends the video stream address, the execution time, and the video parameters to the video stream codec.
[0041] The monitoring video is obtained by the first target algorithm container through the calling interface of the video stream codec. The monitoring video is obtained by the video stream codec after the video stream codec obtains the initial video within the execution time based on the video stream address, and the video stream codec converts the initial video based on the video parameters.
[0042] In one embodiment, the method further includes:
[0043] If the first target algorithm container fails to obtain the monitoring video through the interface for a period exceeding a set time threshold, the first target algorithm container releases the interface.
[0044] In one embodiment, the method further includes:
[0045] Obtain at least one of the following: resource usage parameters of the first target algorithm container, algorithm version parameters, and task status. The resource usage parameters are used to characterize the resource usage of the target algorithm capacity during the processing of the surveillance video. The algorithm version parameters are used to characterize the version of the algorithm in the first target algorithm container. The task status is used to characterize whether the algorithm container is processing the surveillance video.
[0046] At least one of the resource usage parameters of the first target algorithm container, the algorithm version parameters, and the task status is sent to the network-side device at set time intervals.
[0047] Secondly, embodiments of the present invention also provide a video surveillance device, comprising:
[0048] The first receiving module is used to receive a first algorithm identifier and a task identifier sent by the network side device. The first algorithm identifier corresponds to a first algorithm that needs to process the video, and the task identifier is an identifier of the task parameters of the video that needs to be processed.
[0049] A creation module is used to create a first target algorithm container based on the first algorithm corresponding to the first algorithm identifier. The first target algorithm container is a container for processing surveillance video.
[0050] The first acquisition module is used to acquire the task parameters corresponding to the task identifier through the first target algorithm container. The task parameters include video stream address, alarm parameters and alarm area. The alarm parameters are parameters of the monitored object, and the alarm area is the area where the monitored object exists.
[0051] The second acquisition module is used to acquire surveillance video from the video stream address through the first target algorithm container;
[0052] The first identification module is used to identify the alarm area in the monitoring video based on the first algorithm and the alarm parameters through the first target algorithm container, and obtain the identification result, which is used to characterize whether a monitoring object exists.
[0053] The first sending module is used to send the identification result to the network-side device.
[0054] In one embodiment, the first target algorithm container operates in one of the following modes: base image mode, full image mode, or algorithm repository image mode.
[0055] The base image mode is a mode that includes a system runtime library and a self-starting application script. The system runtime library is used to represent the system data running in the first target algorithm container, and the self-starting application script is the script for the first target algorithm container to start the algorithm.
[0056] The complete image mode includes the system runtime library, the self-starting application script, and the algorithm corresponding to the first algorithm identifier;
[0057] The algorithm repository image mode includes a system runtime library, a self-starting application script, an algorithm corresponding to the first algorithm identifier, and a local repository. The local repository is used to store multiple algorithms, including the first algorithm.
[0058] The creation module includes:
[0059] The first creation unit is used to receive first target mode information sent by the network-side device, wherein the first target mode information corresponds to one of the base image mode, full image mode or algorithm repository image mode.
[0060] The second creation unit is used to download the first target pattern corresponding to the first target pattern information from the cloud.
[0061] The third creation unit is used to create the first target algorithm container based on the first target mode when the first target mode is the full image mode or the algorithm repository image mode.
[0062] The fourth creation unit is used to download the first algorithm corresponding to the first algorithm identifier from the cloud when the first target mode is the base image mode, and to create the first target algorithm container based on the first target mode and the first algorithm.
[0063] In one embodiment, the apparatus further includes:
[0064] The second receiving module is used to receive a second algorithm identifier sent by the network-side device, wherein the second algorithm identifier is the identifier updated by the first algorithm.
[0065] The third acquisition module is used to download the second algorithm corresponding to the second algorithm identifier from the cloud, wherein the second algorithm is the algorithm updated from the first algorithm.
[0066] The second identification module is used to store the second algorithm in the local repository of the first target algorithm container when the first target mode is the algorithm repository mirror mode. The first target algorithm container is used to identify the alarm area in the monitoring video based on the second algorithm and the alarm parameters to obtain the identification result.
[0067] The third identification module is used to delete the first target algorithm container when the first target mode is the basic image mode, and create a second target algorithm container based on the image of the basic image mode and the second algorithm. The second target algorithm container is used to identify the alarm area in the monitoring video based on the second algorithm and the alarm parameters to obtain the identification result.
[0068] The fourth identification module is used to delete the first target algorithm container, obtain the image of the complete image mode corresponding to the second algorithm, and create the second target algorithm container based on the image of the complete image mode corresponding to the second algorithm when the first target mode is the complete image mode.
[0069] In one embodiment, the first algorithm is obtained as follows:
[0070] The initial algorithm is run by removing system runtime libraries and startup application scripts to obtain an intermediate algorithm;
[0071] The intermediate algorithm is compressed to obtain the first algorithm;
[0072] The image of the base image mode is obtained in the following way:
[0073] Remove the first algorithm from the initial algorithm to obtain the first intermediate image;
[0074] The first intermediate image is compressed to obtain the image of the base image mode;
[0075] The complete image mode image is obtained in the following way:
[0076] The initial algorithm is compressed to obtain the image of the complete image mode;
[0077] The image of the algorithm repository mirror mode is obtained in the following way:
[0078] The initial algorithm and the local repository are compressed to obtain a mirror image of the algorithm repository image mode.
[0079] In one embodiment, the task parameters further include execution time and video parameters, wherein the video parameters include at least one of frame rate, image resolution, and video length;
[0080] The second acquisition module includes:
[0081] The first acquisition unit is configured to send the video stream address, the execution time, and the video parameters to the video stream codec via the first target algorithm container;
[0082] The second acquisition unit is used to acquire the monitoring video through the calling interface of the first target algorithm container based on the video stream codec. The monitoring video is obtained by the video stream codec after the video stream codec acquires the initial video within the execution time based on the video stream address, and the video stream codec converts the initial video based on the video parameters.
[0083] In one embodiment, the apparatus further includes:
[0084] The release module is used to release the interface if the first target algorithm container fails to obtain the monitoring video through the interface for a period of time exceeding a set time threshold.
[0085] In one embodiment, the apparatus further includes:
[0086] The fourth acquisition module is used to acquire at least one of the following: resource usage parameters of the first target algorithm container, algorithm version parameters, and task status. The resource usage parameters are used to characterize the resource usage of the target algorithm capacity during the processing of the surveillance video. The algorithm version parameters are used to characterize the version of the algorithm in the first target algorithm container. The task status is used to characterize whether the algorithm container is processing the surveillance video.
[0087] The second sending module is used to send at least one of the resource usage parameters of the first target algorithm container, the algorithm version parameters, and the task status to the network-side device at a set time interval.
[0088] Thirdly, embodiments of the present invention also provide an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the video surveillance method as described in the first aspect above.
[0089] Fourthly, embodiments of the present invention also provide a readable storage medium for storing a program, which, when executed by a processor, implements the steps of the video surveillance method described in the first aspect above.
[0090] In this embodiment of the invention, a first algorithm identifier and a task identifier are received from a network-side device; a first target algorithm container is created based on the first algorithm corresponding to the first algorithm identifier; task parameters corresponding to the task identifier are obtained through the first target algorithm container, including a video stream address, alarm parameters, and alarm regions; monitoring video is obtained from the video stream address through the first target algorithm container; alarm regions in the monitoring video are identified through the first target algorithm container based on the first algorithm and alarm parameters to obtain identification results; and the identification results are sent to the network-side device. This achieves video monitoring on other devices without running the first algorithm on the network-side device, requiring only the network-side device to configure the first algorithm identifier and task parameter identifier, thereby improving the compatibility of video monitoring algorithms. Attached Figure Description
[0091] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0092] Figure 1 This is a flowchart of a video surveillance method provided in an embodiment of the present invention;
[0093] Figure 2 This is a schematic diagram of the edge box structure provided in an embodiment of the present invention;
[0094] Figure 3 This is a flowchart of the in-container algorithm startup process provided in an embodiment of the present invention;
[0095] Figure 4 This is a flowchart of creating an algorithm container provided in an embodiment of the present invention;
[0096] Figure 5 This is a flowchart of the update algorithm provided in an embodiment of the present invention;
[0097] Figure 6This is a flowchart of image compression provided in an embodiment of the present invention;
[0098] Figure 7 This is a structural diagram of a video surveillance device provided in an embodiment of the present invention;
[0099] Figure 8 This is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0100] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0101] Please see Figure 1 , Figure 1 This is a flowchart of a video surveillance method provided in an embodiment of the present invention, such as... Figure 1 As shown, it includes the following steps:
[0102] Step 101: Receive the first algorithm identifier and the task identifier sent by the network side device. The first algorithm identifier corresponds to the first algorithm that needs to process the video, and the task identifier is the identifier of the task parameters of the video that needs to be processed.
[0103] The aforementioned network-side devices are those that require video surveillance, typically client systems. When video surveillance is required, the network-side devices send a first algorithm identifier and a task identifier. The device receiving the first algorithm identifier and the task identifier then performs the video surveillance (usually an edge box). The network-side devices do not directly execute video surveillance but only receive the results of the video surveillance, which effectively improves the compatibility of the algorithm and allows it to adapt to different client systems.
[0104] Among them, the first algorithm identifier and the task identifier are selected by the user in the client system and sent to the edge box by the client system after the user makes the selection.
[0105] The first algorithm mentioned above is the algorithm selected by the network-side device for processing the video. The task identifier mentioned above is an identifier for the task parameters required by the algorithm during video processing. The task parameters include the area to be monitored, the video format type, and the objects to be detected in the video. Upon receiving the first algorithm identifier and the task identifier sent by the network-side device, the video is processed based on the first algorithm corresponding to the first algorithm identifier and the task parameters corresponding to the task identifier. The processed result is then sent back to the network-side device, thus achieving algorithm adaptation to the client system.
[0106] The structure of the edge box is as follows: Figure 2 As shown, the device is configured with a gateway, an algorithm management service module, a Docker application module, a video stream codec, and a camera. The gateway communicates with network-side devices via the Message Queuing Telemetry Transport (MQTT) protocol. The algorithm management service module stores and manages multiple algorithms. The Docker application module creates containers. The video stream codec is used to encode or decode video. The camera captures video. The specific process of video surveillance using the edge box is detailed in subsequent embodiments.
[0107] Step 102: Based on the first algorithm corresponding to the first algorithm identifier, create a first target algorithm container, which is a container for processing surveillance video.
[0108] The aforementioned first target algorithm container is a Docker container, created through the Docker application module of the edge box. After creating the first target algorithm container, the paths of various hardware resources of the edge box are imported into the first target algorithm container, enabling the edge box to perform video recognition processing based on the first algorithm through the first target algorithm container.
[0109] In the process of creating the first target algorithm container, the hardware resources that the first target algorithm container can occupy can be limited. When multiple containers are created on the edge box and multiple containers run different algorithms at the same time, there is no competition for hardware resources between different containers. This makes the overall processing speed not effective due to the number of containers, thus improving the system stability of the edge box.
[0110] Step 103: Obtain the task parameters corresponding to the task identifier through the first target algorithm container. The task parameters include video stream address, alarm parameters and alarm area. The alarm parameters are parameters of the monitored object, and the alarm area is the area where the monitored object exists.
[0111] The aforementioned video stream address is the address from which the first target algorithm container obtains the monitoring video; the aforementioned alarm parameters are the parameters of the monitored objects that the first algorithm needs to identify; and the aforementioned alarm area is the object that the first target algorithm container needs to identify. It should be understood that after creating the first target algorithm container, it only includes the first algorithm and the system data running the first algorithm. It also needs to import task parameters so that the first target algorithm container can identify the video according to the needs of the customer's system using the first algorithm and the task parameters.
[0112] The task parameters include video stream address, alarm parameters, and alarm area. Users can customize these selections on the network-side device and send the task parameters to the edge box. The edge box then imports the task parameters into the first target algorithm container, enabling the first target algorithm container to recognize the video based on the first algorithm and the task parameters.
[0113] Step 104: Obtain the monitoring video from the video stream address through the first target algorithm container.
[0114] The aforementioned surveillance video can be real-time video, a series of extracted frames from real-time video, or a video after converting parameters such as resolution. It should be understood that the format of the surveillance video after frame extraction or format conversion meets the format conditions processed by the first algorithm; the specific conversion process is detailed in subsequent embodiments.
[0115] Step 105: Based on the first algorithm and the alarm parameters, the first target algorithm container identifies the alarm area in the monitoring video to obtain the identification result. The identification result is used to characterize whether a monitoring object exists.
[0116] The aforementioned alarm area can be the entire area of the surveillance video or a portion of it. After the first target algorithm container acquires the surveillance video, it only identifies whether a monitored object exists in the alarm area of the surveillance video; it does not identify monitored objects in other areas outside the alarm area.
[0117] Specifically, after the first target algorithm container acquires the monitoring video, it retrieves hardware resources according to the hardware resource path, identifies the alarm area based on the first algorithm and alarm parameters, and determines whether there is a detected object in the alarm area.
[0118] Step 106: Send the identification result to the network-side device.
[0119] In this embodiment of the invention, a first algorithm identifier and a task identifier are received from a network-side device; a first target algorithm container is created based on the first algorithm corresponding to the first algorithm identifier; task parameters corresponding to the task identifier are obtained through the first target algorithm container, including a video stream address, alarm parameters, and alarm regions; monitoring video is obtained from the video stream address through the first target algorithm container; alarm regions in the monitoring video are identified through the first target algorithm container based on the first algorithm and alarm parameters to obtain identification results; and the identification results are sent to the network-side device. This achieves video monitoring on other devices without running the first algorithm on the network-side device, requiring only the network-side device to configure the first algorithm identifier and task parameter identifier, thereby improving the compatibility of video monitoring algorithms.
[0120] In one embodiment, the first target algorithm container operates in one of the following modes: base image mode, full image mode, or algorithm repository image mode.
[0121] The base image mode is a mode that includes a system runtime library and a self-starting application script. The system runtime library is used to represent the system data running in the first target algorithm container, and the self-starting application script is the script for the first target algorithm container to start the algorithm.
[0122] The complete image mode includes the system runtime library, the self-starting application script, and the algorithm corresponding to the first algorithm identifier;
[0123] The algorithm repository image mode includes a system runtime library, a self-starting application script, an algorithm corresponding to the first algorithm identifier, and a local repository. The local repository is used to store multiple algorithms, including the first algorithm.
[0124] The step of creating a first target algorithm container based on the algorithm corresponding to the first algorithm identifier includes:
[0125] Receive first target mode information sent by the network-side device, wherein the first target mode information corresponds to one of the base image mode, full image mode, or algorithm repository image mode;
[0126] Download the image of the first target pattern corresponding to the first target pattern information from the cloud;
[0127] When the first target mode is the full image mode or the algorithm repository image mode, the first target algorithm container is created based on the image of the first target mode;
[0128] When the first target mode is the base image mode, the first algorithm corresponding to the first algorithm identifier is downloaded from the cloud, and the first target algorithm container is created based on the image of the first target mode and the first algorithm.
[0129] The aforementioned system runtime libraries are required for the algorithm container to run, including various types of system data. The aforementioned startup application scripts are scripts used by the algorithm container to run the algorithm. It should be understood that the base image mode, full image mode, or algorithm repository image mode all include system runtime libraries and startup application scripts, enabling the first target algorithm container to launch the first algorithm to identify surveillance videos through the system runtime libraries and startup application scripts.
[0130] For example, such as Figure 3As shown, when the algorithm container needs to identify the surveillance video, it executes a self-starting script, loads the first algorithm and task parameters, and then identifies the surveillance video based on the first algorithm and task parameters to obtain the identification result. Finally, it sends the identification result to the network-side device to complete the video monitoring.
[0131] Since the base image mode does not include the first algorithm, when the first target mode is the base image mode, the first target algorithm container also needs to obtain the first algorithm in order to recognize the surveillance video based on the first algorithm.
[0132] For example, such as Figure 4 As shown, during the process of creating the first target algorithm container based on the base image mode, the hardware resource paths of the edge box are imported into the first target algorithm container, and the storage path of the first algorithm is also imported into the first target algorithm container. When it is necessary to identify the monitored object, the first target algorithm container retrieves the first algorithm through the storage path and identifies the monitoring video based on the first algorithm to obtain the identification result.
[0133] The aforementioned complete image mode and algorithm warehouse image mode also include a first algorithm. That is, in the case of complete image mode or algorithm warehouse image mode, the first target algorithm container does not need to obtain the first algorithm again. It can directly identify the monitoring video through the first algorithm included in the complete image mode or algorithm warehouse image mode to obtain the identification result, which can improve the operating efficiency of the first target algorithm container.
[0134] The aforementioned algorithm repository mirroring mode also includes a local repository, which can store multiple algorithms. After the first algorithm is updated, the updated algorithm can be directly stored in the local repository. The first target algorithm container updates its algorithm by directly retrieving the algorithm from the local repository, thereby improving the algorithm update speed. See subsequent embodiments for details.
[0135] The aforementioned first target mode information is the configuration information of the network-side device. Users can select different image modes on the network-side device to build algorithm containers to flexibly adapt to customer systems with different processing speed requirements and different update speed requirements.
[0136] In this embodiment of the invention, by receiving first target mode information sent by a network-side device, an image of the first target mode corresponding to the first target mode information is downloaded from the cloud; if the first target mode is a complete image mode or an algorithm repository image mode, a first target algorithm container is created based on the image of the first target mode; if the first target mode is a basic image mode, a first algorithm corresponding to the first algorithm identifier is downloaded from the cloud, and a first target algorithm container is created based on the image of the first target mode and the first algorithm, thereby enabling the first target algorithm container to identify surveillance videos based on the first algorithm.
[0137] In one embodiment, the method further includes:
[0138] Receive a second algorithm identifier sent by the network-side device, wherein the second algorithm identifier is the identifier updated from the first algorithm;
[0139] Download the second algorithm corresponding to the second algorithm identifier from the cloud. The second algorithm is an updated version of the first algorithm.
[0140] When the first target mode is the algorithm repository mirror mode, the second algorithm is stored in the local repository of the first target algorithm container. The first target algorithm container is used to identify the alarm area in the monitoring video based on the second algorithm and the alarm parameters to obtain the identification result.
[0141] When the first target mode is the base image mode, the first target algorithm container is deleted, and a second target algorithm container is created based on the image of the base image mode and the second algorithm. The second target algorithm container is used to identify the alarm area in the monitoring video based on the second algorithm and the alarm parameters to obtain the identification result.
[0142] If the first target mode is the complete image mode, delete the first target algorithm container, obtain the image of the complete image mode corresponding to the second algorithm, and create the second target algorithm container based on the image of the complete image mode corresponding to the second algorithm.
[0143] The algorithm corresponding to the second algorithm identifier mentioned above is the updated algorithm, while the first algorithm is the algorithm before the update. It should be understood that the updated algorithm differs from the previous algorithm. Upon receiving the second algorithm identifier sent by the network-side device, the edge box needs to identify the surveillance video according to the updated algorithm. Furthermore, due to differences in the operating modes of the first target algorithm container, the update methods corresponding to different modes differ upon receiving the second algorithm identifier.
[0144] Specifically, when the first target algorithm container operates in algorithm repository mirror mode, since the algorithm is stored locally, the second algorithm can be directly stored in the local repository. When it's necessary to recognize surveillance video, the first target algorithm container directly retrieves the second algorithm from the local repository and uses it to recognize the surveillance video. This allows for rapid switching or updating of algorithms.
[0145] When the first target algorithm container is running in either the basic image mode or the full image mode, since the first target algorithm container does not contain the first algorithm, it is necessary to recreate the second target algorithm container and use the second target algorithm container to identify the surveillance video based on the second algorithm.
[0146] Among them, such as Figure 5 As shown, when the first target algorithm container is running in the base image mode, since the base image mode does not include the second algorithm, the storage path of the second algorithm needs to be imported into the second target algorithm container during the creation of the second target algorithm container, so that the surveillance video can be identified based on the second algorithm through the second target algorithm container.
[0147] When the first target algorithm container is running in full image mode, since the full image mode includes the algorithm, and the algorithm included in the first target algorithm container is the first algorithm, it is necessary to obtain an image that includes the second algorithm, that is, the full image mode image corresponding to the second algorithm, and then build the second target algorithm container based on the full image mode image corresponding to the second algorithm.
[0148] In this embodiment of the invention, by receiving a second algorithm identifier sent by a network-side device, the second algorithm corresponding to the second algorithm identifier is downloaded from the cloud. When the first target mode is an algorithm repository image mode, the second algorithm is stored in the local repository of the first target algorithm container. When the first target mode is a base image mode, the first target algorithm container is deleted, and a second target algorithm container is created based on the base image mode image and the second algorithm. When the first target mode is a full image mode, the first target algorithm container is deleted, the full image mode image corresponding to the second algorithm is obtained, and a second target algorithm container is created based on the full image mode image corresponding to the second algorithm, thereby realizing algorithm updates in different operating modes.
[0149] In one embodiment, the first algorithm is obtained as follows:
[0150] The initial algorithm is run by removing system runtime libraries and startup application scripts to obtain an intermediate algorithm;
[0151] The intermediate algorithm is compressed to obtain the first algorithm;
[0152] The image of the base image mode is obtained in the following way:
[0153] Remove the first algorithm from the initial algorithm to obtain the first intermediate image;
[0154] The first intermediate image is compressed to obtain the image of the base image mode;
[0155] The complete image mode image is obtained in the following way:
[0156] The initial algorithm is compressed to obtain the image of the complete image mode;
[0157] The image of the algorithm repository mirror mode is obtained in the following way:
[0158] The initial algorithm and the local repository are compressed to obtain a mirror image of the algorithm repository image mode.
[0159] The initial algorithm described above is a complete algorithm running in the same environment as the edge box, including the algorithm, system runtime library, and startup application script. In the process of generating the first algorithm, the system runtime library and startup application script need to be removed to obtain the intermediate algorithm, and then the intermediate algorithm is compressed to obtain the first algorithm.
[0160] like Figure 6 As shown, since the initial algorithm is a complete algorithm running in the same environment as the edge box, the basic image mode image, the complete image mode image, and the algorithm warehouse image mode image can be obtained through the initial algorithm.
[0161] In this embodiment of the invention, the first algorithm, the image of the basic image mode, the image of the complete image mode, and the image of the algorithm repository image mode are obtained through the initial algorithm and then stored in the cloud. This allows the first algorithm, the image of the basic image mode, the image of the complete image mode, and the image of the algorithm repository image mode to be obtained directly from the cloud when the first target algorithm container needs to be established, thereby improving the compatibility of the algorithm.
[0162] In one embodiment, the task parameters further include execution time and video parameters, wherein the video parameters include at least one of frame rate, image resolution, and video length;
[0163] The step of obtaining the surveillance video from the video stream address through the first target algorithm container includes:
[0164] The first target algorithm container sends the video stream address, the execution time, and the video parameters to the video stream codec.
[0165] The monitoring video is obtained by the first target algorithm container through the calling interface of the video stream codec. The monitoring video is obtained by the video stream codec after the video stream codec obtains the initial video within the execution time based on the video stream address, and the video stream codec converts the initial video based on the video parameters.
[0166] It should be understood that, since multiple algorithm containers may run simultaneously within the edge box, the video stream codec is needed to obtain the required monitoring video for each algorithm container. The execution time and video parameters of the required monitoring video are imported into the video stream codec by the first target algorithm container. The video stream codec can then convert the real-time video into monitoring video that meets the required execution time and video parameters, enabling the algorithm container to recognize the monitoring video.
[0167] Furthermore, when multiple algorithm containers have the same execution time or video parameters, the video stream codec can process the same part only once and store the processed data locally in the video stream codec.
[0168] For example, algorithm container A and algorithm container B have the same execution time. The video parameters of algorithm container A are the video after frame extraction, while the video of algorithm container B is the video after image resolution conversion. The video stream codec trims the initial real-time video to obtain the intermediate video within the execution time; it then performs frame extraction on the intermediate video to obtain the video required by algorithm container A; finally, it performs image resolution conversion on the intermediate video to obtain the video required by algorithm container B. This reduces one video trimming process, thereby reducing the consumption of hardware resources.
[0169] In one embodiment, the method further includes:
[0170] If the first target algorithm container fails to obtain the monitoring video through the interface for a period exceeding a set time threshold, the first target algorithm container releases the interface.
[0171] In this embodiment of the invention, if the first target algorithm container fails to obtain monitoring video through the interface for a period of time exceeding a set time threshold, the first target algorithm container releases the interface, thereby reducing the consumption of hardware resources.
[0172] In one embodiment, the method further includes:
[0173] Obtain at least one of the following: resource usage parameters of the first target algorithm container, algorithm version parameters, and task status. The resource usage parameters are used to characterize the resource usage of the target algorithm capacity during the processing of the surveillance video. The algorithm version parameters are used to characterize the version of the algorithm in the first target algorithm container. The task status is used to characterize whether the algorithm container is processing the surveillance video.
[0174] At least one of the resource usage parameters of the first target algorithm container, the algorithm version parameters, and the task status is sent to the network-side device at set time intervals.
[0175] It should be understood that since the first target algorithm container runs on the edge box and not on the network-side device, the network-side device cannot determine whether the first algorithm is in a normal operating state. Therefore, in this embodiment of the invention, the first target algorithm container obtains at least one of the resource usage parameters of the first target algorithm container, the version parameters of the algorithm, and the task status; and sends at least one of the resource usage parameters of the first target algorithm container, the version parameters of the algorithm, and the task status to the network-side device at a set time interval, so that the network-side device can monitor the first algorithm in real time.
[0176] Please see Figure 7 , Figure 7 This is a structural diagram of a video surveillance device provided in an embodiment of the present invention, as shown below. Figure 7 As shown, the video surveillance device 700 includes:
[0177] The first receiving module 701 is used to receive a first algorithm identifier and a task identifier sent by the network side device. The first algorithm identifier corresponds to a first algorithm that needs to process the video, and the task identifier is an identifier of the task parameters of the video that needs to be processed.
[0178] The creation module 702 is used to create a first target algorithm container based on the first algorithm corresponding to the first algorithm identifier. The first target algorithm container is a container for processing surveillance video.
[0179] The first acquisition module 703 is used to acquire the task parameters corresponding to the task identifier through the first target algorithm container. The task parameters include video stream address, alarm parameters and alarm area. The alarm parameters are parameters of the monitored object, and the alarm area is the area that needs to be monitored to determine whether the monitored object exists.
[0180] The second acquisition module 704 is used to acquire surveillance video from the video stream address through the first target algorithm container;
[0181] The first identification module 705 is used to identify the alarm area in the monitoring video based on the first algorithm and the alarm parameters through the first target algorithm container, and obtain the identification result. The identification result is used to characterize whether a monitoring object exists.
[0182] The first sending module 706 is used to send the identification result to the network-side device.
[0183] In one embodiment, the first target algorithm container operates in one of the following modes: base image mode, full image mode, or algorithm repository image mode.
[0184] The base image mode is a mode that includes a system runtime library and a self-starting application script. The system runtime library is used to represent the system data running in the first target algorithm container, and the self-starting application script is the script for the first target algorithm container to start the algorithm.
[0185] The complete image mode includes the system runtime library, the self-starting application script, and the algorithm corresponding to the first algorithm identifier;
[0186] The algorithm repository image mode includes a system runtime library, a self-starting application script, an algorithm corresponding to the first algorithm identifier, and a local repository. The local repository is used to store multiple algorithms, including the first algorithm.
[0187] The creation module 702 includes:
[0188] The first creation unit is used to receive first target mode information sent by the network-side device, wherein the first target mode information corresponds to one of the base image mode, full image mode or algorithm repository image mode.
[0189] The second creation unit is used to download the image of the first target mode corresponding to the first target mode information from the cloud;
[0190] The third creation unit is used to create the first target algorithm container based on the image of the first target mode when the first target mode is the full image mode or the algorithm warehouse image mode.
[0191] The fourth creation unit is used to download the first algorithm corresponding to the first algorithm identifier from the cloud when the first target mode is the base image mode, and to create the first target algorithm container based on the image of the first target mode and the first algorithm.
[0192] In one embodiment, the apparatus further includes:
[0193] The second receiving module is used to receive a second algorithm identifier sent by the network-side device, wherein the second algorithm identifier is the identifier updated by the first algorithm.
[0194] The third acquisition module is used to download the second algorithm corresponding to the second algorithm identifier from the cloud, wherein the second algorithm is the algorithm updated from the first algorithm.
[0195] The second identification module is used to store the second algorithm in the local repository of the first target algorithm container when the first target mode is the algorithm repository mirror mode. The first target algorithm container is used to identify the alarm area in the monitoring video based on the second algorithm and the alarm parameters to obtain the identification result.
[0196] The third identification module is used to delete the first target algorithm container when the first target mode is the basic image mode, and create a second target algorithm container based on the image of the basic image mode and the second algorithm. The second target algorithm container is used to identify the alarm area in the monitoring video based on the second algorithm and the alarm parameters to obtain the identification result.
[0197] The fourth identification module is used to delete the first target algorithm container, obtain the image of the complete image mode corresponding to the second algorithm, and create the second target algorithm container based on the image of the complete image mode corresponding to the second algorithm when the first target mode is the complete image mode.
[0198] In one embodiment, the first algorithm is obtained as follows:
[0199] The initial algorithm is run by removing system runtime libraries and startup application scripts to obtain an intermediate algorithm;
[0200] The intermediate algorithm is compressed to obtain the first algorithm;
[0201] The image of the base image mode is obtained in the following way:
[0202] Remove the first algorithm from the initial algorithm to obtain the first intermediate image;
[0203] The first intermediate image is compressed to obtain the image of the base image mode;
[0204] The complete image mode image is obtained in the following way:
[0205] The initial algorithm is compressed to obtain the image of the complete image mode;
[0206] The image of the algorithm repository mirror mode is obtained in the following way:
[0207] The initial algorithm and the local repository are compressed to obtain a mirror image of the algorithm repository image mode.
[0208] In one embodiment, the task parameters further include execution time and video parameters, wherein the video parameters include at least one of frame rate, image resolution, and video length;
[0209] The second acquisition module 704 includes:
[0210] The first acquisition unit is configured to send the video stream address, the execution time, and the video parameters to the video stream codec via the first target algorithm container;
[0211] The second acquisition unit is used to acquire the monitoring video through the calling interface of the first target algorithm container based on the video stream codec. The monitoring video is obtained by the video stream codec after the video stream codec acquires the initial video within the execution time based on the video stream address, and the video stream codec converts the initial video based on the video parameters.
[0212] In one embodiment, the apparatus further includes:
[0213] The release module is used to release the interface if the first target algorithm container fails to obtain the monitoring video through the interface for a period of time exceeding a set time threshold.
[0214] In one embodiment, the apparatus further includes:
[0215] The fourth acquisition module is used to acquire at least one of the following: resource usage parameters of the first target algorithm container, algorithm version parameters, and task status. The resource usage parameters are used to characterize the resource usage of the target algorithm capacity during the processing of the surveillance video. The algorithm version parameters are used to characterize the version of the algorithm in the first target algorithm container. The task status is used to characterize whether the algorithm container is processing the surveillance video.
[0216] The second sending module is used to send at least one of the resource usage parameters of the first target algorithm container, the algorithm version parameters, and the task status to the network-side device at a set time interval.
[0217] The video surveillance device provided in this embodiment of the invention can realize the various processes of the above-described video surveillance method, with one-to-one correspondence of technical features and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0218] It should be noted that the video surveillance device in the embodiments of the present invention can be a device, or it can be a component, integrated circuit, or chip in an electronic device.
[0219] This invention also provides an electronic device, see [link to relevant documentation]. Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device includes a memory 801, a processor 802, and a program or instructions stored in the memory 801 that run on the processor 802. When the program or instructions are executed by the processor 802, they can achieve the following: Figure 1 Any steps in the corresponding method embodiments and the achievement of the same beneficial effects will not be repeated here.
[0220] The processor 802 can be a CPU, ASIC, FPGA, or GPU.
[0221] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by hardware related to program instructions, and the program can be stored in a readable medium.
[0222] This invention also provides a readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described functions. Figure 1 Any step in the corresponding method embodiment, which achieves the same technical effect, will not be described again here to avoid repetition. The storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0223] In the embodiments of this invention, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. Additionally, the use of "and / or" in this application indicates at least one of the connected objects, such as A and / or B and / or C, representing seven possibilities: A alone, B alone, C alone, both A and B present, both B and C present, both A and C present, and A, B, and C present.
[0224] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0225] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or second terminal device, etc.) to execute the methods of the various embodiments of this application.
[0226] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A video surveillance method, characterized in that, include: The system receives a first algorithm identifier and a task identifier sent by a network-side device. The first algorithm identifier corresponds to a first algorithm that needs to process the video, and the task identifier is an identifier of the task parameters of the video that needs to be processed. Based on the first algorithm corresponding to the first algorithm identifier, a first target algorithm container is created, which is a container for processing surveillance video. The task parameters corresponding to the task identifier are obtained through the first target algorithm container. The task parameters include video stream address, alarm parameters and alarm area. The alarm parameters are parameters of the monitored object, and the alarm area is the area where the monitored object exists. The monitoring video is obtained from the video stream address through the first target algorithm container; The first target algorithm container identifies alarm areas in the surveillance video based on the first algorithm and the alarm parameters to obtain an identification result, which is used to characterize whether a monitoring object exists. The identification result is sent to the network-side device; The first target algorithm container operates in one of the following modes: base image mode, full image mode, or algorithm repository image mode. The base image mode is a mode that includes a system runtime library and a self-starting application script. The system runtime library is used to represent the system data running in the first target algorithm container, and the self-starting application script is the script for the first target algorithm container to start the algorithm. The complete image mode includes the system runtime library, the self-starting application script, and the algorithm corresponding to the first algorithm identifier; The algorithm repository image mode includes a system runtime library, a self-starting application script, an algorithm corresponding to the first algorithm identifier, and a local repository. The local repository is used to store multiple algorithms, including the first algorithm. The step of creating a first target algorithm container based on the algorithm corresponding to the first algorithm identifier includes: Receive first target mode information sent by the network-side device, wherein the first target mode information corresponds to one of the base image mode, full image mode, or algorithm repository image mode; Download the image of the first target pattern corresponding to the first target pattern information from the cloud; When the first target mode is the full image mode or the algorithm repository image mode, the first target algorithm container is created based on the image of the first target mode; When the first target mode is the base image mode, the first algorithm corresponding to the first algorithm identifier is downloaded from the cloud, and the first target algorithm container is created based on the image of the first target mode and the first algorithm. The method further includes: Receive a second algorithm identifier sent by the network-side device, wherein the second algorithm identifier is the identifier updated from the first algorithm; Download the second algorithm corresponding to the second algorithm identifier from the cloud. The second algorithm is an updated version of the first algorithm. When the first target mode is the algorithm repository mirror mode, the second algorithm is stored in the local repository of the first target algorithm container. The first target algorithm container is used to identify the alarm area in the monitoring video based on the second algorithm and the alarm parameters to obtain the identification result. When the first target mode is the base image mode, the first target algorithm container is deleted, and a second target algorithm container is created based on the image of the base image mode and the second algorithm. The second target algorithm container is used to identify the alarm area in the monitoring video based on the second algorithm and the alarm parameters to obtain the identification result. If the first target mode is the complete image mode, delete the first target algorithm container, obtain the image of the complete image mode corresponding to the second algorithm, and create the second target algorithm container based on the image of the complete image mode corresponding to the second algorithm.
2. The method according to claim 1, characterized in that, The first algorithm is obtained in the following way: The initial algorithm is run by removing system runtime libraries and startup application scripts to obtain an intermediate algorithm; The intermediate algorithm is compressed to obtain the first algorithm; The image of the base image mode is obtained in the following way: Remove the first algorithm from the initial algorithm to obtain the first intermediate image; The first intermediate image is compressed to obtain the image of the base image mode; The complete image mode image is obtained in the following way: The initial algorithm is compressed to obtain the image of the complete image mode; The image of the algorithm repository mirror mode is obtained in the following way: The initial algorithm and the local repository are compressed to obtain a mirror image of the algorithm repository image mode.
3. The method according to claim 1, characterized in that, The task parameters also include execution time and video parameters, wherein the video parameters include at least one of frame rate, image resolution and video length. The step of obtaining the surveillance video from the video stream address through the first target algorithm container includes: The first target algorithm container sends the video stream address, the execution time, and the video parameters to the video stream codec. The monitoring video is obtained by the first target algorithm container through the calling interface of the video stream codec. The monitoring video is obtained by the video stream codec after the video stream codec obtains the initial video within the execution time based on the video stream address, and the video stream codec converts the initial video based on the video parameters.
4. The method according to claim 3, characterized in that, The method further includes: If the first target algorithm container fails to obtain the monitoring video through the interface for a period exceeding a set time threshold, the first target algorithm container releases the interface.
5. The method according to claim 1, characterized in that, The method further includes: Obtain at least one of the following: resource usage parameters of the first target algorithm container, algorithm version parameters, and task status. The resource usage parameters are used to characterize the resource usage of the target algorithm capacity during the processing of the surveillance video. The algorithm version parameters are used to characterize the version of the algorithm in the first target algorithm container. The task status is used to characterize whether the algorithm container is processing the surveillance video. At least one of the resource usage parameters of the first target algorithm container, the algorithm version parameters, and the task status is sent to the network-side device at set time intervals.
6. A video surveillance device, characterized in that, include: The first receiving module is used to receive a first algorithm identifier and a task identifier sent by the network-side device. The first algorithm identifier corresponds to a first algorithm that needs to process the video, and the task identifier is an identifier of the task parameters of the video that needs to be processed. A creation module is used to create a first target algorithm container based on the first algorithm corresponding to the first algorithm identifier. The first target algorithm container is a container for processing surveillance video. The first acquisition module is used to acquire the task parameters corresponding to the task identifier through the first target algorithm container. The task parameters include video stream address, alarm parameters and alarm area. The alarm parameters are parameters of the monitored object, and the alarm area is the area where the monitored object needs to be monitored. The second acquisition module is used to acquire surveillance video from the video stream address through the first target algorithm container; The first identification module is used to identify the alarm area in the surveillance video based on the first algorithm and the alarm parameters through the first target algorithm container, and obtain the identification result. The identification result is used to characterize whether a monitoring object exists. The first sending module is used to send the identification result to the network-side device; The first target algorithm container operates in one of the following modes: base image mode, full image mode, or algorithm repository image mode. The base image mode is a mode that includes a system runtime library and a self-starting application script. The system runtime library is used to represent the system data running in the first target algorithm container, and the self-starting application script is the script for the first target algorithm container to start the algorithm. The complete image mode includes the system runtime library, the self-starting application script, and the algorithm corresponding to the first algorithm identifier; The algorithm repository image mode includes a system runtime library, a self-starting application script, an algorithm corresponding to the first algorithm identifier, and a local repository. The local repository is used to store multiple algorithms, including the first algorithm. The creation module includes: The first creation unit is used to receive first target mode information sent by the network-side device, wherein the first target mode information corresponds to one of the base image mode, full image mode or algorithm repository image mode. The second creation unit is used to download the first target pattern corresponding to the first target pattern information from the cloud. The third creation unit is used to create the first target algorithm container based on the first target mode when the first target mode is the full image mode or the algorithm repository image mode. The fourth creation unit is used to download the first algorithm corresponding to the first algorithm identifier from the cloud when the first target mode is the base image mode, and to create the first target algorithm container based on the first target mode and the first algorithm. The device further includes: The second receiving module is used to receive a second algorithm identifier sent by the network-side device, wherein the second algorithm identifier is the identifier updated by the first algorithm. The third acquisition module is used to download the second algorithm corresponding to the second algorithm identifier from the cloud, wherein the second algorithm is the algorithm updated from the first algorithm. The second identification module is used to store the second algorithm in the local repository of the first target algorithm container when the first target mode is the algorithm repository mirror mode. The first target algorithm container is used to identify the alarm area in the monitoring video based on the second algorithm and the alarm parameters to obtain the identification result. The third identification module is used to delete the first target algorithm container when the first target mode is the basic image mode, and create a second target algorithm container based on the image of the basic image mode and the second algorithm. The second target algorithm container is used to identify the alarm area in the monitoring video based on the second algorithm and the alarm parameters to obtain the identification result. The fourth identification module is used to delete the first target algorithm container, obtain the image of the complete image mode corresponding to the second algorithm, and create the second target algorithm container based on the image of the complete image mode corresponding to the second algorithm when the first target mode is the complete image mode.
7. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the video surveillance method as described in any one of claims 1 to 5.
8. A readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps in the video surveillance method as described in any one of claims 1 to 5.