Monitoring video batch downloading method, device and equipment and storage medium

By analyzing server performance indicators and splitting download tasks in real time, combining cache and permission management, the storage resources and security problems in the existing technology are solved, and efficient and secure batch download of surveillance videos is achieved.

CN119583534APending Publication Date: 2025-03-07WUHAN HONGXIN TECH SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411661589.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the prior art, as the number of downloads increases, storage resources are tight, and the monitoring file download address is pushed to the client, which affects security.

Method used

The server's load status is determined by real-time analysis of real-time data of server performance metrics. The correlation between load status and time granularity allows the system to download more data with higher efficiency when the server resources are sufficient, while reducing download speed or priority when resources are tight, avoiding server overload. Divide all videos to be downloaded into several subtasks and download them based on the time granularity. The videos to be downloaded with the number of downloads reached the preset number of times are cached, and the download request for the videos to be downloaded is responded to the user's permission level.

Benefits of technology

It improves the overall resource utilization rate, reduces repeated downloads caused by multiple requests to the same video content, improves the speed of users to obtain content, and enhances data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583534A_ABST
    Figure CN119583534A_ABST
Patent Text Reader

Abstract

The invention discloses a monitoring video batch downloading method, device and equipment and a storage medium, and relates to the technical field of video downloading, and the monitoring video batch downloading method is characterized by comprising the following steps: determining the load condition of a server according to the real-time data of the performance index of the server, and determining the load condition of the server according to the real-time data of the performance index of the server; determining time granularity according to the load condition; segmenting all videos to be downloaded into a plurality of sub-tasks according to a downloading task request and the load condition, and downloading the plurality of sub-tasks based on the time granularity; and caching the to-be-downloaded video of which the downloading times reach the preset downloading times, and responding to the downloading request of the cached to-be-downloaded video according to the user permission level. According to the method and the device, the time granularity is determined by determining the load condition of the server, all to-be-downloaded videos are divided into a plurality of subtasks, the downloading strategy can be dynamically adjusted according to the current capability of the server, and the problem of storage resource shortage caused by overlarge downloading amount is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of video recording downloading, and more specifically, to a method, device, equipment and storage medium for batch downloading surveillance videos. Background Art

[0002] With the increase of public security demand, video surveillance systems have been widely used in urban management, traffic monitoring, public safety and other fields. Video surveillance is an important part of the security system. It is widely used in many occasions because of its intuitiveness, accuracy, timeliness and rich information content. In recent years, with the rapid development of computers, networks, image processing and transmission technology, video surveillance technology has also made great progress.

[0003] In the prior art, when downloading monitoring resources, the recorded video stream is generally obtained first, and the recorded video stream is preprocessed to obtain a video stream file; the real-time reception progress of the video stream file is obtained; when it is detected that the video stream file is received, the video file is converted into an mp4 file; and the download address of the mp4 file is pushed to the client, so that the client downloads the mp4 file based on the download address.

[0004] However, in the prior art, the monitoring file download address is pushed to the client, which affects security; the generated MP4 file needs to be properly managed and stored, and as the download amount increases, storage resources become tight; there is a delay in progress feedback, and the user may not be able to obtain timely information when checking the download status on the client, affecting the user experience. Summary of the invention

[0005] In response to at least one defect or improvement need in the prior art, the present invention provides a batch downloading method, device, equipment and storage medium for surveillance videos, which are used to solve the problem in the prior art that as the download amount increases, storage resources become tight, and the security is affected when the surveillance file download address is pushed to the client.

[0006] To achieve the above object, according to a first aspect of the present invention, a method for batch downloading surveillance videos is provided, comprising:

[0007] Determine the server load status based on the real-time data of server performance indicators, and determine the time granularity based on the load status;

[0008] Divide all videos to be downloaded into several subtasks according to the download task request and load conditions, and download several subtasks based on time granularity;

[0009] The cached videos to be downloaded whose download times have reached the preset download times will respond to the download requests of the cached videos to be downloaded according to the user authority level.

[0010] In a possible implementation, determining the load status of the server according to the real-time data of the server performance indicator, and determining the time granularity according to the load status, further includes:

[0011] Obtain historical operation data of the server and assign weights to server performance indicators based on the historical operation data;

[0012] Calculate the comprehensive load score of the server according to the weight of the server performance index and the real-time data, and determine the server load level based on the comprehensive load score;

[0013] The time granularity is determined based on a preset server load level and time granularity comparison table and the server load level.

[0014] In a possible implementation, all videos to be downloaded are divided into several subtasks according to the download task request and the load condition, and several subtasks are downloaded based on the time granularity, which also includes:

[0015] Parse the download task request to determine the acquisition device, download time period and download format of the video to be downloaded;

[0016] Divide all videos to be downloaded into several subtasks according to load conditions, acquisition devices and download time periods;

[0017] Based on the time granularity, several subtasks are downloaded according to the download format.

[0018] In a possible implementation, caching the videos to be downloaded whose download times reach a preset download times, and responding to the download request of the cached videos to be downloaded according to the user authority level, further comprising:

[0019] When any video is downloaded, the number of times the video is downloaded is recorded in a preset data structure;

[0020] When the number of downloads of any video reaches the preset number of downloads, a lock flag is added to mark the corresponding video according to the user's authority level, and the marked video is stored in the preset cache library;

[0021] When the requested user authority level is lower than the locked user authority level, the download task request is rejected;

[0022] When the requested user authority level is not lower than the locked user authority level, the task to be downloaded is obtained from the preset cache library according to the download task request.

[0023] In a possible implementation, caching the videos to be downloaded whose download times reach a preset download times, and responding to the download request of the cached videos to be downloaded according to the user authority level, further comprising:

[0024] Set the unlock time threshold. If the video with the lock flag is not downloaded within the time exceeding the unlock time threshold, the corresponding video will be cleared from the preset cache library.

[0025] In a possible implementation, caching the videos to be downloaded whose download times reach a preset download times, and responding to the download request of the cached videos to be downloaded according to the user authority level, further comprising:

[0026] Set the access frequency threshold and timeout threshold. If the access frequency of any video is lower than the access frequency threshold and the last download time exceeds the timeout threshold, the corresponding video will be cleared from the preset cache library.

[0027] In a possible implementation, the method further includes: when downloading a subtask, feeding back real-time download information of the subtask through a preset communication protocol.

[0028] According to a second aspect of the present invention, there is also provided a device for batch downloading surveillance videos, comprising:

[0029] A time granularity module, configured to determine a load condition of the server according to real-time data of the server performance indicator, and determine a time granularity according to the load condition;

[0030] A task division module is configured to divide all videos to be downloaded into several subtasks according to the download task request and load conditions, and download several subtasks based on time granularity;

[0031] The cache response module is configured to cache the videos to be downloaded whose download times reach a preset download times, and respond to the download requests of the cached videos to be downloaded according to the user authority level.

[0032] According to the third aspect of the present invention, there is also provided a device for batch downloading surveillance videos, which includes at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit executes the steps of any one of the above-mentioned methods for batch downloading surveillance videos.

[0033] According to a fourth aspect of the present invention, there is also provided a storage medium storing a computer program executable by an access authentication device, wherein when the computer program runs on the access authentication device, the access authentication device executes the steps of any one of the above-mentioned methods for batch downloading surveillance videos.

[0034] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:

[0035] The present invention provides a batch downloading method for surveillance videos, which determines the load status of the server by real-time analysis of real-time data of server performance indicators. According to the association between the load status and the time granularity, the system is allowed to download more data with higher efficiency when the server resources are sufficient, and reduce the download speed or priority when the resources are tight, so as to avoid server overload, thereby improving the overall resource utilization. Dividing all videos to be downloaded into several subtasks and downloading them based on the time granularity helps to better manage the download queue, while providing higher flexibility and recoverability. Caching videos to be downloaded that have been downloaded for a preset number of times reduces repeated downloads caused by multiple requests for the same video content, so that users can obtain the required content faster when requesting. Different users have different access rights and data requirements. Through this division of authority levels, the system can ensure that only authorized users can access specific video content, thereby enhancing data security. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A schematic diagram of a flow chart of an embodiment of a method for batch downloading surveillance videos provided by the present invention;

[0038] Figure 2 The present invention provides Figure 1 A schematic flow chart of an embodiment of step S101;

[0039] Figure 3 The present invention provides Figure 1 A schematic diagram of a flow chart of an embodiment of step S102;

[0040] Figure 4 A schematic diagram of the structure of an embodiment of a device for batch downloading surveillance videos provided by the present invention;

[0041] Figure 5 A schematic diagram of the structure of a device for batch downloading surveillance videos provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0043] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0044] The present invention provides a method, device, equipment and storage medium for batch downloading of surveillance videos, which are respectively described below.

[0045] See also Figure 1 , Figure 1 A flow chart of an embodiment of a method for batch downloading surveillance videos provided by the present invention is provided. In a specific embodiment of the present invention, a method for batch downloading surveillance videos is disclosed, comprising:

[0046] S101, determining a server load condition according to real-time data of server performance indicators, and determining a time granularity according to the load condition;

[0047] S102, dividing all videos to be downloaded into several subtasks according to the download task request and the load condition, and downloading several subtasks based on the time granularity;

[0048] S103: Cache the videos to be downloaded whose download times reach the preset download times, and respond to the download requests of the cached videos to be downloaded according to the user authority level.

[0049] In the above embodiment, it is necessary to continuously monitor and record the real-time data of the server performance indicators, including but not limited to the server's CPU usage, memory occupancy, network bandwidth occupancy, the number of streams pulled by the streaming media server, etc. Based on the comprehensive analysis of these performance indicators, the current load status of the server can be accurately judged, whether it is idle, lightly loaded, moderately loaded or heavily loaded. Based on the load status of the server, the time granularity of the download task is dynamically adjusted. When the server resources are sufficient, a finer time granularity can be selected to complete the download task more quickly; when resources are tight, a coarser time granularity is selected to reduce the impact on server performance.

[0050] According to the received download task request and the server load status evaluated above, all surveillance videos to be downloaded are reasonably divided into several subtasks. Each subtask contains the video content within a specific time period, and these subtasks will be downloaded in an orderly manner according to the previously determined time granularity. In this way, it can ensure that a large number of download requests can still be processed efficiently when the server resources are limited, while avoiding excessive pressure on the server. It should be noted that users can select multiple devices and corresponding time periods for batch download to meet diverse needs.

[0051] Record the download count of each video to be downloaded and set a preset download count threshold. When the download count of a video reaches or exceeds this threshold, it will be automatically cached to local or cloud storage to quickly respond to the same download request later. When a user requests to download a cached video, respond according to the user's permission level. Users with corresponding permissions can directly obtain the cached video content, while users with insufficient permissions cannot access it or require additional verification steps.

[0052] During the download process, the execution of the download task will be monitored in real time, and possible errors or abnormalities will be handled. If a subtask fails to download, corresponding processing will be carried out according to the failure reason, such as retrying the download, adjusting the download strategy, or reporting error information to the user. At the same time, it also has a task recovery function, which can automatically resume unfinished download tasks in unexpected situations such as power outages and network interruptions to ensure data integrity and continuity.

[0053] In order to further improve download efficiency, we will also adopt a variety of performance optimization and resource scheduling strategies. For example, we can use multi-threading or concurrent downloading technology to process multiple subtasks at the same time; use intelligent algorithms to predict and schedule resources to maximize the performance of servers and networks; and dynamically adjust the priority and download speed of download tasks according to user needs and load conditions.

[0054] Compared with the prior art, the batch download method of surveillance video provided in this embodiment determines the load status of the server by real-time analysis of the real-time data of the server performance indicators. According to the association between the load status and the time granularity, the system is allowed to download more data with higher efficiency when the server resources are sufficient, and reduce the download speed or priority when the resources are tight, so as to avoid server overload, thereby improving the overall resource utilization. Dividing all the videos to be downloaded into several subtasks and downloading them based on the time granularity helps to better manage the download queue and provide higher flexibility and recoverability. Caching the videos to be downloaded that have been downloaded for a preset number of times reduces repeated downloads caused by multiple requests for the same video content. Users can obtain the required content faster when requesting. Different users have different access rights and data requirements. Through this division of authority levels, the system can ensure that only authorized users can access specific video content, thereby enhancing data security.

[0055] See also Figure 2 , Figure 2 The present invention provides Figure 1 In some embodiments of the present invention, the load status of the server is determined according to the real-time data of the server performance indicator, and the time granularity is determined according to the load status, and further includes:

[0056] S201, obtaining historical operation data of the server, and assigning weights to server performance indicators based on the historical operation data;

[0057] S202, calculating a comprehensive load score of the server according to the weight of the server performance indicator and the real-time data, and determining the server load level based on the comprehensive load score;

[0058] S203: Determine the time granularity based on a preset server load level and time granularity comparison table and the server load level.

[0059] In the above embodiment, the operation data of the server in the past period of time, including the time series data of each performance indicator, is extracted from the historical database. According to the degree and stability of the impact of each performance indicator on the overall performance of the server in the historical data, a weight is assigned to each performance indicator using statistical methods (such as correlation coefficient analysis, principal component analysis, etc.), and the weight reflects the relative importance of the indicator in the comprehensive evaluation.

[0060] The current performance indicator data is obtained from the server monitoring in real time, the real-time data is multiplied by the corresponding weight, and then the sum is obtained to obtain the comprehensive load score. The load score is a quantitative indicator that can reflect the current load status of the server. The comprehensive load score is compared with the preset load level threshold to determine the current load level of the server.

[0061] According to business needs and the precision requirements of server performance monitoring, a comparison table of server load level and time granularity is prepared in advance. For example, when the server is under low load, a longer time granularity (such as monitoring once an hour) can be used to save resources; when the server is under high load or overloaded, a shorter time granularity (such as monitoring once a minute) is used to promptly discover and handle performance problems. According to the currently determined server load level, find the corresponding time granularity in the comparison table, and adjust the monitoring sampling frequency or data collection cycle to adapt to the current load conditions. It should be noted that the time granularity can be a download interval or batch size in seconds, minutes, hours, etc.

[0062] In a specific embodiment of the present invention, the time granularity includes 10 minutes, 30 minutes, 60 minutes, etc. When the network bandwidth is good under low load, the time granularity can be selected as 10 minutes to reduce the number of subtasks and the complexity of management; when the server is under high load, the selected time granularity is 30 minutes; and when the load is overloaded and the network bandwidth is poor, the selected time granularity is 60 minutes.

[0063] See also Figure 3 , Figure 3 The present invention provides Figure 1 In some embodiments of the present invention, all videos to be downloaded are divided into a plurality of subtasks according to the download task request and the load condition, and the plurality of subtasks are downloaded based on the time granularity, further comprising:

[0064] S301, parsing the download task request to determine the acquisition device, download time period and download format of the video to be downloaded;

[0065] S302, dividing all videos to be downloaded into several subtasks according to load conditions, acquisition devices and download time periods;

[0066] S303: Downloading a plurality of subtasks according to a download format based on the time granularity.

[0067] In the above embodiment, the received download task request is parsed to extract key information, including the acquisition device ID (or name) of the video to be downloaded, the download start time and end time (i.e., the download time period), and the user-specified download format (such as MP4, AVI, etc.), and the extracted information is verified to ensure that the acquisition device exists, the download time period is reasonable, and the format is supported.

[0068] Evaluate the current server load, including CPU usage, memory occupancy, network bandwidth, etc., to determine the amount of resources that can be allocated to the download task. Divide the video data to be downloaded into multiple subtasks based on the load, storage capacity of the acquisition device, and the length of the download time period. When dividing, consider factors such as the continuity and size of the video data to ensure that each subtask can be completed efficiently under given resource conditions. Generate a unique identifier (such as a task ID) for each subtask and record its related metadata (such as the acquisition device, download time period, format, etc.).

[0069] According to the time granularity, the subtasks are sorted and scheduled according to factors such as priority and resource requirements. Strategies such as polling and priority queues can be used to ensure efficient execution of tasks. For each subtask, the download operation is performed according to its metadata (such as acquisition equipment, download time period, format, etc.). During the download process, the download progress and network status can be monitored in real time, and the download strategy can be adjusted as needed (such as increasing the number of concurrent downloads, pausing downloads, etc.). If the downloaded video data needs to be converted to a specified format, the format conversion operation can be automatically performed after the download is completed.

[0070] In some embodiments of the present invention, caching the videos to be downloaded whose download times reach a preset download times, and responding to the download request of the cached videos to be downloaded according to the user authority level, further includes:

[0071] When any video is downloaded, the number of times the video is downloaded is recorded in a preset data structure;

[0072] When the number of downloads of any video reaches the preset number of downloads, a lock flag is added to mark the corresponding video according to the user's authority level, and the marked video is stored in the preset cache library;

[0073] When the requested user authority level is lower than the locked user authority level, the download task request is rejected;

[0074] When the requested user authority level is not lower than the locked user authority level, the task to be downloaded is obtained from the preset cache library according to the download task request.

[0075] In the above embodiment, a data structure (such as a database table, a hash table, etc.) is created to record the number of downloads of each video. The data structure should contain information such as the unique identifier of the video (such as an ID), the number of downloads, the lock flag (indicating whether the video is locked), and the locked user authority level. A download count threshold is set. When the number of downloads of a video reaches the threshold, a cache mechanism is triggered, and a cache library (such as a memory cache, a disk cache, etc.) is created to store the locked video data. As a preferred embodiment, the data structure in the present invention is a map data structure.

[0076] Listen for download events. Whenever a user downloads a video, trigger the operation of recording the number of downloads. Find the record of the corresponding video in the preset data structure and increase its download count by 1. If the record of the video does not exist, create a new record and initialize the download count to 1.

[0077] The number of downloads in the preset data structure is checked regularly. When the number of downloads of a video reaches the preset threshold, the cache operation is performed. According to the configuration or policy, a lock flag is added to the video, and the locked user permission level (such as administrator level) is set. Then, the video data is copied from the original storage location to the preset cache library. The record of the video is updated in the preset data structure, marked as locked and stored in the cache library.

[0078] When a download task request is received, the requested user authority level is first checked. If the requested user authority level is lower than the locked user authority level of the video, the download task request is rejected and an error message (such as "insufficient authority, unable to download") is returned to the user.

[0079] If the requested user authority level is not lower than the locked user authority level of the video, the verification is passed. According to the video identifier in the download task request, the corresponding video data is obtained from the preset cache library, and the obtained video data is sent to the requesting user to complete the download operation.

[0080] In some embodiments of the present invention, caching the videos to be downloaded whose download times reach a preset download times, and responding to the download request of the cached videos to be downloaded according to the user authority level, further includes:

[0081] Set the unlock time threshold. If the video with the lock flag is not downloaded within the time exceeding the unlock time threshold, the corresponding video will be cleared from the preset cache library.

[0082] In the above embodiment, in order to further optimize the cache management, an unlocking time threshold is set. The role of this mechanism is that for those videos marked with a locked flag (perhaps for copyright protection, privacy protection or other specific reasons), if no user performs a download operation within the set unlocking time threshold, these videos will be automatically cleared from the preset cache library, which not only helps to free up storage space, but also ensures that the video content in the cache library is always updated and relevant, avoiding waste of resources due to long-term non-access.

[0083] In some embodiments of the present invention, caching the videos to be downloaded whose download times reach a preset download times, and responding to the download request of the cached videos to be downloaded according to the user authority level, further includes:

[0084] Set the access frequency threshold and timeout threshold. If the access frequency of any video is lower than the access frequency threshold and the last download time exceeds the timeout threshold, the corresponding video will be cleared from the preset cache library.

[0085] In the above embodiment, similarly, in order to further optimize cache management, two key parameters, access frequency threshold and timeout threshold, are introduced. The access frequency threshold is used to measure the frequency of video access. If the access frequency of a certain video is lower than the set access frequency threshold, it means that the demand for the video is low in the current time period and it may no longer be a popular content. The timeout threshold is used to determine whether the last time a video was downloaded has exceeded the set time range. If the last download time of a certain video exceeds the timeout threshold, it means that the video has not been accessed for a long time and may have lost its timeliness or user demand.

[0086] When a video clip meets both the access frequency below the threshold and the last download time exceeding the threshold, the video clip will be automatically cleared from the preset cache library. This not only helps to free up storage space, but also ensures that the video clip content in the cache library is always updated and relevant, thereby meeting the latest needs of users and improving the overall service quality of the platform.

[0087] In some embodiments of the present invention, the present invention further includes: when downloading a subtask, feeding back real-time download information of the subtask through a preset communication protocol.

[0088] In the above embodiment, the preset communication protocol adopted by this scheme is the WebSocket protocol. When the server completes downloading a subtask, it will call the backend hook interface to notify the backend service. After receiving the information, the backend service will use the redis message subscription and publishing function to notify the backend center control server to send a WebSocket message to the client, in which the pushed content includes the task ID, subtask ID, total number of tasks, total number of completed tasks, number of uncompleted tasks, number of tasks for this stream, total number of tasks for this stream, number of completed tasks for this stream, number of uncompleted tasks for this stream, and stream ID. After receiving the message, the client will refresh the page in real time, and each streaming media will notify the backend service of the download progress of the subtask through the backend hook interface, and the client obtains the download progress of each subtask by polling.

[0089] In order to better implement the batch download method of the monitoring video in the embodiment of the present invention, based on the batch download method of the monitoring video, correspondingly, please refer to Figure 4 , Figure 4 This is a schematic diagram of the structure of an embodiment of a device for batch downloading surveillance videos provided by the present invention. The embodiment of the present invention provides a device for batch downloading surveillance videos 400, including:

[0090] A time granularity module 410, which is configured to determine a load condition of the server according to real-time data of the server performance indicator, and determine a time granularity according to the load condition;

[0091] A task division module 420 is configured to divide all videos to be downloaded into a number of subtasks according to the download task request and the load condition, and download the subtasks based on the time granularity;

[0092] The cache response module 430 is configured to cache the videos to be downloaded whose download times reach a preset download times, and respond to the download requests of the cached videos to be downloaded according to the user authority level.

[0093] It should be noted here that: the device 400 provided in the above embodiment can implement the technical solutions described in the above method embodiments. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above method embodiments, which will not be repeated here.

[0094] See also Figure 5 , Figure 5 A schematic diagram of the structure of a surveillance video batch download device provided by an embodiment of the present invention. Based on the above surveillance video batch download method, the present invention also provides a surveillance video batch download device, which can be a computing device such as a mobile terminal, a desktop computer, a notebook, a palm computer, and a server. The surveillance video batch download device 500 includes a processor 510, a memory 520, and a display 530. Figure 5 Only some components of the synchronous tracking flying welding equipment for real-time measurement of battery height are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

[0095] In some embodiments, the memory 520 may be an internal storage unit of the surveillance video batch downloading device 500, such as a hard disk or memory of the surveillance video batch downloading device 500. In other embodiments, the memory 520 may also be an external storage device of the surveillance video batch downloading device 500, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the surveillance video batch downloading device 500. Further, the memory 520 may also include both the internal storage unit of the surveillance video batch downloading device 500 and an external storage device. The memory 520 is used to store application software and various data installed in the surveillance video batch downloading device 500, such as the program code of the surveillance video batch downloading device 500. The memory 520 may also be used to temporarily store data that has been output or is about to be output. In one embodiment, a batch downloading program 540 for surveillance videos is stored in the memory 520 , and the batch downloading program 540 for surveillance videos can be executed by the processor 510 , thereby implementing the batch downloading method for surveillance videos of various embodiments of the present application.

[0096] In some embodiments, the processor 510 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes stored in the memory 520 or process data, such as executing a batch download method for surveillance videos.

[0097] In some embodiments, the display 530 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 530 is used to display information on the surveillance video batch download device 500 and to display a visual user interface. The components 510-530 of the surveillance video batch download device 500 communicate with each other via a system bus.

[0098] In one embodiment, when the processor 510 executes the surveillance video batch downloading program 540 in the memory 520 , the steps in the surveillance video batch downloading method described above are implemented.

[0099] This embodiment further provides a computer-readable storage medium on which a batch downloading program for surveillance videos is stored. When the batch downloading program for surveillance videos is executed by a processor, the following steps are implemented:

[0100] Determine the server load status based on the real-time data of server performance indicators, and determine the time granularity based on the load status;

[0101] Divide all videos to be downloaded into several subtasks according to the download task request and load conditions, and download several subtasks based on time granularity;

[0102] The cached videos to be downloaded whose download times have reached the preset download times will respond to the download requests of the cached videos to be downloaded according to the user authority level.

[0103] In summary, the present invention provides a method for batch downloading surveillance videos, which determines the server load status by real-time analysis of real-time data of server performance indicators. According to the association between the load status and the time granularity, the system is allowed to download more data with higher efficiency when the server resources are sufficient, and reduce the download speed or priority when the resources are tight, so as to avoid server overload, thereby improving the overall resource utilization. Dividing all videos to be downloaded into several subtasks and downloading them based on the time granularity helps to better manage the download queue, while providing higher flexibility and recoverability. Caching videos to be downloaded that have been downloaded for a preset number of times reduces repeated downloads caused by multiple requests for the same video content. Users can obtain the required content faster when requesting. Different users have different access rights and data requirements. Through this division of authority levels, the system can ensure that only authorized users can access specific video content, thereby enhancing data security.

[0104] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.

[0105] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0106] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

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

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

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

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

[0111] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0112] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

[0113] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0114] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for batch downloading surveillance videos, characterized in that: include: Determine the load status of the server according to the real-time data of the server performance index, and determine the time granularity according to the load status; Dividing all videos to be downloaded into a plurality of subtasks according to the download task request and the load condition, and downloading the plurality of subtasks based on the time granularity; The cached videos to be downloaded whose download times have reached the preset download times will respond to the download requests of the cached videos to be downloaded according to the user authority level.

2. The method for batch downloading surveillance videos as claimed in claim 1, characterized in that: The step of determining the load status of the server according to the real-time data of the server performance index, and determining the time granularity according to the load status, further includes: Acquire historical operation data of the server, and assign weights to the server performance indicators based on the historical operation data; Calculating a comprehensive load score of the server according to the weight of the server performance indicator and the real-time data, and determining the server load level based on the comprehensive load score; The time granularity is determined based on a preset server load level and time granularity comparison table and the server load level.

3. The method for batch downloading surveillance videos as claimed in claim 1, characterized in that: The method of dividing all videos to be downloaded into a plurality of subtasks according to the download task request and the load condition, and downloading the plurality of subtasks based on the time granularity, further includes: Parsing the download task request to determine the acquisition device, download time period and download format of the video to be downloaded; Dividing all videos to be downloaded into several subtasks according to the load condition, the acquisition device and the download time period; The plurality of subtasks are downloaded according to the download format based on the time granularity.

4. The method for batch downloading surveillance videos as claimed in claim 1, characterized in that: The cached videos to be downloaded whose download times reach a preset download times, responding to the download request of the cached videos to be downloaded according to the user authority level, further comprising: When any video is downloaded, the number of times the video is downloaded is recorded in a preset data structure; When the number of downloads of any video reaches the preset number of downloads, a lock flag is added to mark the corresponding video according to the user authority level, and the marked video is stored in the preset cache library; When the requested user authority level is lower than the locked user authority level, rejecting the download task request; When the requested user authority level is not lower than the locked user authority level, the task to be downloaded is obtained from the preset cache library according to the download task request.

5. The method for batch downloading surveillance videos as claimed in claim 4, characterized in that: The cached videos to be downloaded whose download times reach a preset download times, responding to the download request of the cached videos to be downloaded according to the user authority level, further comprising: An unlocking time threshold is set, and if the video with the locking flag is not downloaded within a time period exceeding the unlocking time threshold, the corresponding video is cleared from the preset cache library.

6. The method for batch downloading surveillance videos as claimed in claim 4, characterized in that: The cached videos to be downloaded whose download times reach a preset download times, responding to the download request of the cached videos to be downloaded according to the user authority level, further comprising: An access frequency threshold and a timeout threshold are set. If the access frequency of any video is lower than the access frequency threshold and the last download time exceeds the timeout threshold, the corresponding video is cleared from the preset cache library.

7. The method for batch downloading surveillance videos as claimed in claim 1, characterized in that: Also includes: When downloading the subtask, real-time download information of the subtask is fed back through a preset communication protocol.

8. A device for batch downloading surveillance videos, characterized in that: include: A time granularity module, configured to determine a load condition of the server according to real-time data of the server performance indicator, and determine a time granularity according to the load condition; A task division module, which is configured to divide all videos to be downloaded into a plurality of subtasks according to the download task request and the load condition, and download the plurality of subtasks based on the time granularity; The cache response module is configured to cache the videos to be downloaded whose download times reach a preset download times, and respond to the download requests of the cached videos to be downloaded according to the user authority level.

9. A batch downloading device for surveillance videos, characterized in that: It includes at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit executes the steps of the batch downloading method of surveillance videos described in any one of claims 1 to 7.

10. A storage medium, characterized in that: It stores a computer program executable by an access authentication device. When the computer program runs on the access authentication device, the access authentication device executes the steps of the batch downloading method of surveillance videos as described in any one of claims 1 to 7.