CN109951662B - Video backup method and system - Google Patents

Video backup method and system Download PDF

Info

Publication number
CN109951662B
CN109951662B CN201711384349.XA CN201711384349A CN109951662B CN 109951662 B CN109951662 B CN 109951662B CN 201711384349 A CN201711384349 A CN 201711384349A CN 109951662 B CN109951662 B CN 109951662B
Authority
CN
China
Prior art keywords
backup
video
server
terminal
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711384349.XA
Other languages
Chinese (zh)
Other versions
CN109951662A (en
Inventor
李文良
关春天
顾约翰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201711384349.XA priority Critical patent/CN109951662B/en
Publication of CN109951662A publication Critical patent/CN109951662A/en
Application granted granted Critical
Publication of CN109951662B publication Critical patent/CN109951662B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a video backup method and a video backup system. The video backup method of the backup agent terminal applied to the video backup system comprises the following steps: and determining target backup tasks to be executed from at least one backup task sent by the server, wherein each backup task corresponds to the backup of a live stream acquired by an image acquisition terminal. And creating a backup catalog in a storage space of the backup agent terminal according to the target backup task. And sending a request to a target image acquisition terminal corresponding to the target backup task according to the target backup task so as to acquire the corresponding live stream. And storing the received live stream under the corresponding backup directory to obtain a video file. By adopting the scheme, the backup speed is not limited by the bandwidth of the server, the backup efficiency is high, and the backup process does not occupy the system resources of the server.

Description

Video backup method and system
Technical Field
The invention relates to the technical field of storage, in particular to a video backup method and a video backup system.
Background
Video surveillance video is the most important data in the field of video surveillance. Video backup is a video storage method, and there are wide use scenarios, for example, an examination center needs to backup a video during an examination to a flash disk for storage. Usually, the examination lasts for several days, and during the period, the central platform server needs to store the video and backup the video, so that the bandwidth and the performance are easy to become bottlenecks. Also, once the central storage space is full, important recordings may be overwritten and lost (full overwrite) or recordings may be stopped (full stop).
In the related art, it is proposed to use a central platform client to obtain videos from a central platform server for backup in a high-speed video downloading manner. Although important video recording loss or recording stop can be avoided to a certain extent, the efficiency is still low when a large amount of data needs to be backed up simultaneously due to the limited bandwidth between the central platform server and the client. Meanwhile, the video files are downloaded from the central platform server at the client side of the multi-channel central platform for backup, a large amount of system resources of the central platform server are occupied, the whole storage and backup work is affected, and centralized query of backup videos is not facilitated.
Disclosure of Invention
The invention aims to provide a video backup method and a video backup system, which are used for solving the problems that the backup efficiency is limited by the bandwidth and the system resources of a central platform server, the system resources of the central platform server are excessively occupied in the backup process, the backup data is inconvenient to search and the like.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a video backup method, which is applied to a backup proxy terminal in a video backup system, where the video backup system further includes a server and a plurality of image acquisition terminals, and the server, the backup proxy terminal and the image acquisition terminals are in communication connection with each other, and the method includes: determining target backup tasks to be executed from at least one backup task sent by the server, wherein each backup task corresponds to the backup of a live stream acquired by an image acquisition terminal; creating a backup catalog in a storage space of the backup agent terminal according to the target backup task; according to the target backup task, sending a request to a target image acquisition terminal corresponding to the target backup task to acquire the corresponding live stream; and storing the received live stream under the corresponding backup directory to obtain a video file.
In a second aspect, an embodiment of the present invention provides a video backup method, which is applied to a server in a video backup system, where the video backup system further includes a backup proxy terminal and a plurality of image acquisition terminals, and the server, the backup proxy terminal and the image acquisition terminals are in communication connection with each other, where the method includes: storing the corresponding live stream acquired from the corresponding image acquisition terminal according to a preset storage plan so as to acquire a corresponding video file; and distributing a plurality of backup tasks in the backup plan corresponding to the storage plan to the backup agent terminals according to the load state data fed back by each backup agent terminal last time, so that the backup agent terminals synchronously acquire the corresponding live stream from the corresponding image acquisition terminals according to the received backup tasks and store the live stream as backup video files.
In a third aspect, an embodiment of the present invention provides a video backup system, where the video backup system includes a backup proxy terminal, a server, and multiple image acquisition terminals, where the server, the backup proxy terminal, and the image acquisition terminals are in communication connection with each other, and the video backup system is configured to implement the steps of the video backup method.
The difference from the prior art is that the video backup method provided by the embodiment of the invention is applied to a backup proxy terminal in a video backup system. The method comprises the steps of determining a target backup task to be executed in at least one received backup task, creating a backup catalog in a storage space of the backup agent terminal, sending a request to a target image acquisition terminal corresponding to the target backup task to acquire a corresponding live stream according to the target backup task, storing the received live stream in the corresponding backup catalog to obtain a video file for backup, and facilitating searching of the video file. The backup video files are not required to be acquired from the server, so that the backup speed is not limited by the bandwidth of the server, the backup efficiency is high, and the backup process does not occupy the system resources of the server.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 shows a schematic mechanism diagram of a video recording backup system according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of the server shown in fig. 1.
Fig. 3 is a schematic structural diagram of the backup agent terminal shown in fig. 1.
Fig. 4 is a flowchart illustrating a step of a video backup method according to an embodiment of the present invention.
Fig. 5 shows a second flowchart of the steps of a video backup method according to the embodiment of the present invention.
Fig. 6 is a flowchart illustrating steps of another video backup method according to an embodiment of the present invention.
Icon: 100-a server; 200-backup agent terminal; 300-an image acquisition terminal; 400-video backup system; 500-a client; 111-a first memory; 112-a first processor; 113-a communication unit; 211-a second memory; 212-a storage controller; 213-a second processor; 214-peripheral interface; 201-removable storage medium.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Video surveillance video is the most important data in the field of video surveillance. In order to effectively store the video files, not only the video files need to be stored, but also backup needs to be performed. In the related art, it is proposed that the central platform server 100 acquires the video files from the acquisition device for storage, and then the central platform client 500 acquires the video files from the central platform server 100 for backup in a high-speed video downloading manner. But is inefficient when large amounts of data need to be backed up simultaneously due to the limited bandwidth between the central platform server 100 and the client 500. Even if the multi-channel central platform client 500 downloads the video files from the central platform server 100 for backup, a large amount of system resources of the central platform server 100 are still occupied, and the whole storage and backup work is affected. In order to improve backup efficiency, and particularly ensure that the backup efficiency is not affected by the central platform server 100 when a large number of video files need to be backed up simultaneously, embodiments of the present invention provide a video backup method and system.
Referring to fig. 1, a video recording backup system 400 according to an embodiment of the present invention is shown. The video backup system 400 includes a backup agent terminal 200, a server 100, and a plurality of image capturing terminals 300. The server 100, the backup proxy terminal 200, and the image capturing terminal 300 are communicatively connected to each other. Specifically, the server 100 is in communication connection with each backup agent terminal 200 and each image capturing terminal 300, respectively. The backup proxy terminal 200 is also in communication connection with each image capturing terminal 300. Preferably, the proxy terminal, the server 100 and the plurality of image capturing terminals 300 are all located in the same lan.
The image capturing terminal 300 may be, but is not limited to, a camera, a hard disk recorder, a video camera IPC, and other devices capable of capturing images.
Referring to fig. 2, an embodiment of the invention provides a server 100. The server 100 includes a first memory 111, a first processor 112, and a communication unit 113.
The first memory 111, the first processor 112 and the communication unit 113 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The first memory 111 is used for solidifying software function modules in an Operating System (OS) of the server 100. The first processor 112 is configured to execute the executable modules stored in the first memory 111, so as to implement the video backup method provided in this embodiment.
The first Memory 111 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The first memory 111 is used for storing programs or video file data.
The communication unit 113 is configured to establish a communication connection between the server 100 and other communication terminals (e.g., the image capturing terminal 300 and the backup proxy terminal 200) through the network, and is configured to receive and transmit data through the network. In the present embodiment, the server 100 also performs data exchange with the corresponding client 500 through the communication unit 113.
The client 500 corresponds to the server 100, and a user can configure the server 100 through the client 500. Optionally, a storage plan of the server 100 may be configured, where the storage plan may include storing the live stream acquired by each image acquisition terminal 300 in a specified time period to acquire the video. Optionally, a backup plan may also be configured. The backup plan corresponds to a storage plan, for example, the storage plan is to store live streams acquired by all the image capturing terminals 300 in a day, and the backup plan may be to backup the live streams acquired by the designated image capturing terminal 300 in a day or store the live streams acquired by the designated image capturing terminal 300 in a designated backup period in a day. Specifically, the backup plan may include a plurality of backup tasks, and the backup tasks may be that live streams acquired by the corresponding image acquisition terminals 300 in the corresponding backup periods are backed up. The backup time period may be defaulted to the whole day, or may be determined according to a selected start time and end time. Optionally, the corresponding priority of each image capturing terminal 300 in the storage or backup process may also be configured to avoid the loss of important video files. Optionally, a historical backup plan may be further configured, where the historical backup plan includes a plurality of historical backup tasks, and the backup agent terminal 200 that receives the historical backup tasks is configured to obtain, from the server 100, the corresponding video files that have been stored by the server 100 according to the historical backup tasks. Alternatively, the backup agent terminal 200 may be configured to acquire a multiple of the video file from the server 100. In the embodiment of the invention, 1-time speed, 2-time speed, 4-time speed, 8-time speed and 16-time speed can be supported.
The backup agent terminal 200 may be, but is not limited to, a desktop computer, a tablet computer, a Personal Computer (PC), and a notebook computer. Referring to fig. 3, the backup proxy terminal 200 includes a second memory 211, a memory controller 212, a second processor 213, and a peripheral interface 214.
The second memory 211, the memory controller 212, the second processor 213 and the peripheral interface 214 are electrically connected to each other directly or indirectly, so as to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The second memory 211 is a local storage space of the backup agent terminal 200, and may be used to store a video file for backup. The second memory 211 is further configured to store executable functional modules, so that the second processor 213 is configured to execute the executable modules stored in the second memory 211, so as to implement the video backup method provided in the embodiment of the present invention.
The peripherals interface 214 couples various input/output devices to the second processor 213 and to the second memory 211. In some embodiments, the peripheral interface 214, the second processor 213, and the memory controller 212 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips. Meanwhile, the removable storage medium 201 may access the backup agent terminal 200 through the peripheral interface 214 as a removable storage space of the backup agent terminal 200. The removable storage medium 201 may be a flash disk, a removable hard disk, or the like.
First embodiment
Referring to fig. 4, fig. 4 shows a video backup method according to a preferred embodiment of the present invention. The method may be applied to the backup agent terminal 200 in the video backup system 400 shown in fig. 1. The method comprises the following steps:
step S101, determining a target backup task to be executed from at least one backup task sent by the server 100.
The step of registering the server 100 is further included before the step S101. The way to register the server 100 may be:
(1) when a backup agent terminal 200 is initially connected to a network corresponding to the video backup system 400 and is started to enter a backup agent operating state, it sends a device probe message through a multicast probe protocol to wait for a response from the server 100 and receive a response message carrying an address of the server 100 generated by the server 100. And after receiving the response message, the backup proxy terminal 200 feeds back the registration request according to the address of the server 100. Optionally, the registration request includes current load status data of the backup proxy terminal 200, where the load status data includes: the current CPU, the current CPU utilization rate, the memory, the current memory utilization rate, whether a USB flash disk is inserted, the capacity of the USB flash disk and other resource information. If the server 100 determines that the registration request is valid, it feeds back the port configuration to the backup proxy terminal 200 and performs time synchronization with the backup proxy terminal 200 once. After the above process is completed, the backup proxy terminal 200 configures the server 100 address and port for the next use.
(2) When a backup agent terminal 200 does not first enter the network corresponding to the video backup system 400 and starts to enter the backup agent operating state, it requests the server 100 to register according to the last saved address and port configuration of the server 100, if the registration is unsuccessful, the step of searching the server 100 by the multicast detection protocol is repeated.
Meanwhile, after the backup agent terminal 200 is successfully registered, it needs to keep alive with the server 100 according to a preset second time interval. Specifically, the keep-alive may be performed by feeding back the current load status data to the server 100 at the second time interval and performing time synchronization with the server 100 once.
In the embodiment of the present invention, the server 100 allocates the backup task corresponding to the preconfigured backup plan to the backup agent terminal 200 that has been successfully registered and is still in the keep-alive state. Alternatively, the backup task allocation may be performed to each corresponding backup agent terminal 200 according to the current load status data that is fed back by each backup agent terminal 200 last time. Thus, each backup agent terminal 200 receives at least one backup task. The backup agent terminal 200 determines a target backup task to be executed immediately from among the received backup tasks. If only one backup task is received, the backup task is a target backup task; and if a plurality of backup tasks are received, determining a specified number of target backup tasks from the received backup tasks to be executed simultaneously. The specified number can be determined according to the available connection resource amount. Specifically, each of the backup tasks corresponds to backing up a live stream acquired by one of the image acquisition terminals 300, and the backup tasks further correspond to backup time intervals. When determining the target backup task, the target backup task may be determined from the received backup tasks in combination with the priority and the backup time interval of the corresponding image capturing terminal 300. So as to ensure that the backup task corresponding to the image capturing terminal 300 with higher priority can be executed within the backup time interval.
Step S102, creating a backup catalog in the storage space of the backup agent terminal 200 according to the target backup task.
In the embodiment of the present invention, the storage space of the backup proxy terminal 200 includes a mobile storage space and a local storage space. Mobile storage space has a higher priority than local storage space. Therefore, when creating the backup directory, it is first detected whether there is a mobile storage space to access the backup proxy terminal 200. When it is detected that there is a mobile storage space to access the backup proxy terminal 200, the backup directory having a priority is created in the mobile storage space. Creating the backup directory without priority in the local storage space when the presence of the mobile storage space is not detected. It should be noted that, if a backup directory is already established in the local storage space during the execution of the target backup task, but then when the access of the mobile storage space is detected, a backup directory corresponding to the executing target backup task is still created in the mobile storage space. The created backup directory name may include related information of the target image capturing terminal 300 corresponding to the target backup task, so as to facilitate searching or playback of the video file of the target image capturing terminal 300 later. The related information may be information that can identify the image capturing terminal 300, such as the name of the image capturing terminal 300 and the hardware serial number of the image capturing terminal 300.
Step S103, according to the target backup task, sending a request to the target image capturing terminal 300 corresponding to the target backup task to obtain the corresponding live streaming.
In the embodiment of the present invention, the starting time of the backup may be determined according to the backup time interval corresponding to the target backup task. And transmits a request for acquiring a live stream to the target image capturing terminal 300 within a predetermined time before the start time of the backup. For example, a request to acquire a live stream may be sent to the corresponding target image capturing terminal 300 within 10s before the start time of the backup. So as to ensure that live streams from the start time of backup acquired by the target image acquisition terminal 300 are acquired from the target image acquisition terminal 300 on time.
And step S104, storing the received live stream in the corresponding backup directory to obtain a video file.
In the embodiment of the invention, before the live stream is stored, whether a backup catalog with priority exists in the backup catalogs corresponding to the target backup task is detected in a storage space. And when the backup catalog with the priority exists, storing the live stream in the backup catalog with the priority to obtain the video file. Since each video file has a limited size, in the present embodiment, each video file has a size not exceeding 64 MB. Therefore, the live stream corresponding to the target backup task with a wider backup time interval is stored as a plurality of video files according to the collected time sequence, and each video file is named by the start-stop time of the video file. And the termination time of the adjacent previous video file is the same as the start time of the video file. If the backup directory with the priority is detected in the execution process of the target backup task, the video file which is backed up is transferred to the backup directory with the priority, the video file which is being stored is moved to the backup directory with the priority after the video file which is being stored is stored, and the live stream which is returned later is stored as the next video file under the backup directory with the priority. During the storage process, if the storage is carried out in the mobile storage space, the user is reminded when the remaining space is insufficient (for example, the remaining space is less than 5%), the backup is stopped when the capacity is full, and the user is reminded that the mobile storage space (for example, a USB flash disk) is full. If the backup is performed in the local storage space (e.g., local disk), 30% of the second memory 211 may be used for the backup cache (the cache size may be configured) of the video files. When the local storage space for storing the backup file is full (the residual space is less than 5%), prompting the user that the residual space is insufficient, stopping the backup when the local storage space is full completely, and prompting the user that the space is full.
In the process of executing the backup task, the backup agent terminal 200 also feeds back the execution status data of the current backup task of the backup agent terminal 200 to the server 100 according to a preset second time interval while sending the current load status data. The execution status data is the execution status of the backup task that has been sent to the backup agent terminal 200. The execution status data may include the execution progress of the target backup task and information, number, etc. of other backup tasks that are still waiting to be executed. So that the server 100 adjusts the backup task waiting to be executed on the backup agent terminal 200 according to the load status data and the execution status data. For example, the backup task waiting to be executed on the backup agent terminal 200 whose current load state data display backup speed is slow is cancelled, and is adjusted to the backup agent terminal 200 whose current load state data display backup speed is high and whose number of backup tasks waiting to be executed is small.
In order to ensure the integrity of the video that is finally saved by each target backup task, as shown in fig. 5, the method further includes:
step S105, obtaining the start-stop time of each video file in the backup directory according to a preset first time interval.
In this embodiment, the start time and the end time of the video recorded in the backup directory may be sequentially obtained.
And step S106, judging whether the video files in the backup catalog are missing or not according to the starting and ending time of each video file.
In this embodiment, whether or not the video file is continuous from the start time of the corresponding backup time zone is determined based on the start/end time of the video file. Specifically, when the video files are arranged according to the sequence of the start time and the end time, whether the start time of each video is the same as the end time of the last adjacent video is detected, and when the start time and the end time are different, the video file is determined to be missing. And the time interval between the start time of the video and the start time of the last adjacent video is a missing time interval.
Step S107, when the video files in the backup directory are missing, requesting the server 100 to acquire the video files of the target image capturing terminal 300 corresponding to the backup directory in the missing time interval according to the corresponding missing time interval.
In the embodiment of the present invention, according to the image capturing terminal 300 and the missing time interval corresponding to the backup directory, a corresponding playback stream is requested from the server 100 and stored in the backup directory. Preferentially, when a plurality of backup directories are missing, it is necessary to request the server 100 to acquire a corresponding playback stream according to the priority corresponding to the image capturing terminal 300 and the corresponding backup multiple, so as to ensure the integrity of the video files in each backup directory. The accuracy of backup is ensured. Since the real-time backup process does not need to request the server 100 to obtain data at any time, the backup efficiency will not be affected by the bandwidth and load of the server 100. Without increasing the burden on the server 100. The advantages are more obvious especially when a large amount of data needs to be backed up.
In this embodiment, the server 100 also allocates a historical backup task to each backup agent terminal 200 according to the latest load status data and execution status data of the backup agent terminal 200. The historical backup task, that is, the backup time interval of the task has elapsed since the backup agent terminal 200 received the task. At this time, only in response to the historical backup task issued by the server 100, the corresponding historical video file is requested to be acquired from the server 100 for backup. The history recording file is generated by the server 100 according to the live stream acquired from the corresponding image capturing terminal 300.
In this embodiment, when receiving a video recording query request issued by the server 100, the backup proxy terminal 200 finds a corresponding backup directory according to the related information of the image capturing terminal 300 corresponding to the query request, analyzes the video recording file name in the directory, finds a video recording file in a specified time period corresponding to the query request, and provides the file name to the server 100 in a list form.
In this embodiment, when receiving a video playback request issued by the server 100, the backup agent terminal 200 reads a corresponding video file and sends the code stream to the server 100. And when one video file is played, the backup agent can automatically play the next video file in the directory until the user stops playing or the video end time inquired by the user is reached.
Second embodiment
Referring to fig. 6, fig. 6 shows a video backup method according to an embodiment of the present invention. The method is applied to the server 100 in the video backup system 400 shown in fig. 1. The method comprises the following steps:
step S201, in response to the device detection packet sent by the backup proxy terminal 200, generating a response packet carrying the address of the server 100 and feeding the response packet back to the corresponding backup proxy terminal 200, so that the backup proxy terminal 200 feeds back a registration request according to the address of the server 100, where the registration request includes the current load status data of the backup proxy terminal 200.
Step S202, after receiving and storing the registration request of the backup agent terminal 200, receiving and storing the current load status data fed back by the backup agent terminal 200 according to a preset second time interval, and performing time synchronization.
Step S203, storing the corresponding live streaming acquired from the corresponding image capturing terminal 300 according to a preset storage plan, so as to obtain a corresponding video file.
Step S204, according to the load status data fed back by each backup agent terminal 200 last time, distributing a plurality of backup tasks in the backup plan corresponding to the storage plan to the backup agent terminals 200, so that the backup agent terminals 200 synchronously acquire the corresponding live streaming from the corresponding image capturing terminal 300 as backup video files according to the received backup tasks and the server 100.
In this embodiment of the present invention, the server 100 further receives the execution status data fed back by the backup proxy terminal 200 according to a preset second time interval. And adjusting the backup task waiting to be executed on the backup agent terminal 200 by combining the received current load state data and the corresponding execution condition data. The execution status data is the execution status of the backup task that has been sent to the backup agent terminal 200. The execution status data may include the execution progress of the target backup task and information, the number, etc. of other backup tasks that are waiting to be executed. The server 100 adjusts the backup task waiting to be executed on the backup agent terminal 200 according to the load status data and the execution status data.
Specifically, when detecting the backup task waiting to be executed from the received load status data and execution status data, the server 100 determines which backup tasks are to be started for backup (for example, the starting time of the backup time interval corresponding to the backup tasks is less than 30s), or when the current time exceeds the backup time interval of the backup task, issues the backup task to other registered backup agent terminals 200 in a load balancing manner. Specifically, the load balancing strategy is as follows: according to the priority of the image acquisition terminal 300 configured by the user; the priority that the mobile storage space is accessed and the residual space of the mobile storage space is large is provided; the CPU main frequency and the memory have high priority; the low utilization rate of the CPU and the memory is prioritized; the current number of backup tasks of the backup agent terminal 200 is less and has priority. For example, the backup task waiting to be executed on the backup agent terminal 200 whose current load state data display backup speed is slow is cancelled, and is adjusted to the backup agent terminal 200 whose current load state data display backup speed is high and whose number of backup tasks waiting to be executed is small.
In the embodiment of the present invention, the history backup task may be sent as the backup agent terminal 200. Specifically, the history video file corresponding to the history backup task may be divided into a plurality of history video segments with the same duration according to the number of available backup proxy terminals 200. Then, the time period in the history video file to be backed up by each backup agent terminal 200 is calculated. Of course, the minimum length of the video recording time is 5 minutes, so that video recording fragments are avoided. In the process of performing the historical video file backup by the backup agent terminal 200, the server 100 may also dynamically adjust the duration of the video that has not been backed up according to the task completion condition of each backup agent. The backup agent terminal 200 also backs up the history recording in order of priority from high to low.
In the embodiment of the present invention, a user may query the server 100 for a video file of any image capturing terminal 300 at a specified date and time period through the client 500. Specifically, the server 100 first queries the video files stored in the query local disk, and if the video files exist, returns the video list to the client 500, otherwise, sends a query request for querying the video files corresponding to the specified date and time period of the image capture terminal 300 to the backup proxy terminal 200, and returns the video list acquired from the backup proxy terminal 200 to the client 500. When the client 500 designates to play a video file, if the local video of the server 100 is recorded, the server 100 directly reads the video and transmits the video to the client 500 in a code stream form, otherwise, requests the backup proxy terminal 200 for a playback stream of the video file and forwards the playback stream to the client 500. For easy viewing and playback by the user.
It should be noted that, in the above embodiment, when the server 100 schedules the backup task, the backup task can be completed as soon as possible according to a series of priorities, and the possibility that important videos of the server 100 are covered is reduced as much as possible. The specific priorities are as follows: the first priority is the priority of the image capturing terminal 300 configured by the user, the priority is divided into high, medium and low, and only when the task with high priority is backed up, the task with the second priority is processed. The second priority is: the load status data of the agent terminal 200 is backed up. Specifically, X is the remaining space of the mobile storage space, and the larger X is, the higher the priority is; y is 0.7 CPU utilization +0.3 memory utilization, the smaller Y, the higher the priority; and Z is the residual number of the backup tasks, and the smaller Z is, the higher the priority is.
In summary, embodiments of the present invention provide a video backup method and system. The method for the backup agent terminal applied to the video backup system comprises the following steps: determining target backup tasks to be executed from at least one backup task sent by the server, wherein each backup task corresponds to backup of a live stream acquired by an image acquisition terminal; creating a backup catalog in a storage space of the backup agent terminal according to the target backup task; according to the target backup task, sending a request to a target image acquisition terminal corresponding to the target backup task to acquire the corresponding live stream; and storing the received live stream under the corresponding backup directory to obtain a video file. In the process, the backup speed is not limited by the bandwidth of the server, the backup efficiency is high, and the backup process does not occupy the system resources of the server. The method is beneficial to solving the problem that the video backup cannot be rapidly completed due to the limitation of the bandwidth and the performance of the server. The method is beneficial to solving the problem of backup video loss caused by some abnormalities in the process of quickly backing up the video files. The method is beneficial to solving the problems of centralized query and playback of the backup video files. It is beneficial to dynamically adjust the scheduling of the backup tasks according to the resources of the backup agent. It is beneficial to reduce the risk of central important recordings being covered. The method is beneficial to downloading the video files of the high-priority image acquisition terminal in the server by the multi-backup agent in a high-speed slicing manner.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.

Claims (9)

1. A video backup method is characterized in that the method is applied to a backup proxy terminal in a video backup system, the video backup system further comprises a server and a plurality of image acquisition terminals, and the server, the backup proxy terminal and the image acquisition terminals are in communication connection with each other, and the method comprises the following steps:
determining target backup tasks to be executed from at least one backup task sent by the server, wherein each backup task corresponds to backup of a live stream acquired by an image acquisition terminal;
creating a backup catalog in a storage space of the backup agent terminal according to the target backup task;
according to the target backup task, sending a request to a target image acquisition terminal corresponding to the target backup task to acquire the corresponding live stream;
storing the received live stream in the corresponding backup directory to obtain a video file,
the method further comprises the following steps:
acquiring the start-stop time of each video file in the backup catalog according to a preset first time interval;
judging whether the video files in the backup directory are missing or not according to the starting and ending time of each video file;
when the video files in the backup directory are missing, requesting the server to acquire the video files of the target image acquisition terminal corresponding to the backup directory in the missing time interval according to the corresponding missing time interval.
2. The method of claim 1, wherein the storage space includes a mobile storage space and a local storage space, and the step of creating a backup directory in the storage space of the backup agent terminal according to the target backup task includes:
detecting whether a mobile storage space is accessed to the backup agent terminal;
when detecting that a mobile storage space is accessed to the backup agent terminal, creating the backup catalog with priority in the mobile storage space;
creating the backup directory without priority in the local storage space when the presence of the mobile storage space is not detected.
3. The method of claim 2, wherein the step of storing the received live stream under the corresponding backup catalog comprises:
detecting whether a backup catalog with priority exists in the corresponding backup catalogues or not;
and when the backup directory with the priority exists, storing the live stream in the backup directory with the priority to obtain the video file.
4. The method of claim 1, wherein the method further comprises:
and sending the current load state data of the backup agent terminal and the received execution condition data corresponding to the at least one backup task to the server according to a preset second time interval, so that the server adjusts the backup task waiting to be executed on the backup agent terminal according to the load state data and the execution condition data.
5. The method of claim 1, wherein the method further comprises:
responding to a historical backup task issued by the server, requesting to acquire a corresponding historical video file from the server for backup, wherein the historical video file is generated by the server according to the live stream acquired from the corresponding image acquisition terminal.
6. A video backup method is characterized in that the method is applied to a server in a video backup system, the video backup system further comprises a backup proxy terminal and a plurality of image acquisition terminals, and the server, the backup proxy terminal and the image acquisition terminals are in communication connection with each other, and the method comprises the following steps:
storing the corresponding live stream acquired from the corresponding image acquisition terminal according to a preset storage plan so as to acquire a corresponding video file;
and distributing a plurality of backup tasks in the backup plan corresponding to the storage plan to the backup agent terminals according to the load state data fed back by each backup agent terminal last time, so that the backup agent terminals synchronously acquire the corresponding live stream from the corresponding image acquisition terminals according to the received backup tasks and store the live stream as backup video files.
7. The method of claim 6, wherein the method further comprises:
responding to a device detection message sent by the backup agent terminal, generating a response message carrying a server address and feeding the response message back to the corresponding backup agent terminal, so that the backup agent terminal feeds back a registration request according to the server address, wherein the registration request comprises current load state data of the backup agent terminal;
and after receiving and storing the registration request of the backup agent terminal, receiving and storing the current load state data fed back by the backup agent terminal according to a preset second time interval.
8. The method of claim 7, wherein the method further comprises:
receiving execution condition data fed back by the backup agent terminal according to a preset second time interval;
and adjusting the backup task waiting to be executed on the backup agent terminal by combining the received current load state data and the corresponding execution condition data.
9. A video backup system, comprising a backup proxy terminal, a server and a plurality of image capturing terminals, wherein the server, the backup proxy terminal and the image capturing terminals are communicatively connected to each other, and the video backup system is configured to implement the steps of the video backup method according to any one of claims 1 to 8.
CN201711384349.XA 2017-12-20 2017-12-20 Video backup method and system Active CN109951662B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711384349.XA CN109951662B (en) 2017-12-20 2017-12-20 Video backup method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711384349.XA CN109951662B (en) 2017-12-20 2017-12-20 Video backup method and system

Publications (2)

Publication Number Publication Date
CN109951662A CN109951662A (en) 2019-06-28
CN109951662B true CN109951662B (en) 2022-06-14

Family

ID=67004832

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711384349.XA Active CN109951662B (en) 2017-12-20 2017-12-20 Video backup method and system

Country Status (1)

Country Link
CN (1) CN109951662B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597659A (en) * 2019-08-28 2019-12-20 华为技术有限公司 Backup processing method and server
CN110691240B (en) * 2019-11-05 2021-04-16 深圳万物安全科技有限公司 Mobile detection missing recording detection method and device
CN111654671B (en) * 2020-05-29 2021-11-23 杭州海康威视系统技术有限公司 Video data storage method, device, equipment and storage medium
CN113742130A (en) 2020-05-29 2021-12-03 伊姆西Ip控股有限责任公司 Method, electronic device and computer program product for backup
CN111831483A (en) * 2020-07-20 2020-10-27 北京百度网讯科技有限公司 Backup management method, system, electronic device, and medium
CN114996203B (en) * 2022-05-19 2023-06-27 中诚华隆计算机技术有限公司 SOC chip, capsule endoscope robot and capsule endoscope system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0420425A2 (en) * 1989-09-25 1991-04-03 International Business Machines Corporation A data processing system and method for updating a database therein
CN101483762A (en) * 2008-12-31 2009-07-15 中兴通讯股份有限公司 Platform video recording method, system and customer terminal
CN101742254A (en) * 2008-11-25 2010-06-16 北京中星微电子有限公司 Backup method for video monitoring system information and central platform server
CN101873457A (en) * 2009-09-02 2010-10-27 杭州海康威视数字技术股份有限公司 DVR (Digital Video Recorder) as well as data backup method and system thereof
CN102298547A (en) * 2011-09-20 2011-12-28 杭州华三通信技术有限公司 Data backup method and device
CN103024326A (en) * 2011-09-22 2013-04-03 中兴通讯股份有限公司 Video backup method and system based on security and protection home gateway
CN104168453A (en) * 2014-08-01 2014-11-26 东莞市星谷信息科技有限公司 Method for implementing video monitoring stream media application system
CN104765574A (en) * 2015-04-23 2015-07-08 成都博元时代软件有限公司 Data cloud storage method
CN105430423A (en) * 2015-11-12 2016-03-23 小米科技有限责任公司 Video backup method, device and system
CN106303341A (en) * 2016-10-13 2017-01-04 杭州恒生数字设备科技有限公司 A kind of coaxial high-definition network switch
CN106998436A (en) * 2017-03-24 2017-08-01 浙江宇视科技有限公司 Video recording backup method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100441505B1 (en) * 2002-08-17 2004-07-23 삼성전자주식회사 Image recording/reproducing apparatus for improving motion picture data retrieval capability according to recording error
US7613768B2 (en) * 2003-05-19 2009-11-03 Hewlett-Packard Development Company, L.P. Method and system for managing a streaming media service
US7940313B2 (en) * 2006-12-22 2011-05-10 Nikon Corporation Digital camera including a recording medium detector and warning unit
US20110292222A1 (en) * 2010-05-28 2011-12-01 Eu3C Company, Limited Photo-video player with automatic image file size reduction
KR101604222B1 (en) * 2014-07-30 2016-03-17 주식회사 아이디스 Recording apparatus and method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0420425A2 (en) * 1989-09-25 1991-04-03 International Business Machines Corporation A data processing system and method for updating a database therein
CN101742254A (en) * 2008-11-25 2010-06-16 北京中星微电子有限公司 Backup method for video monitoring system information and central platform server
CN101483762A (en) * 2008-12-31 2009-07-15 中兴通讯股份有限公司 Platform video recording method, system and customer terminal
CN101873457A (en) * 2009-09-02 2010-10-27 杭州海康威视数字技术股份有限公司 DVR (Digital Video Recorder) as well as data backup method and system thereof
CN102298547A (en) * 2011-09-20 2011-12-28 杭州华三通信技术有限公司 Data backup method and device
CN103024326A (en) * 2011-09-22 2013-04-03 中兴通讯股份有限公司 Video backup method and system based on security and protection home gateway
CN104168453A (en) * 2014-08-01 2014-11-26 东莞市星谷信息科技有限公司 Method for implementing video monitoring stream media application system
CN104765574A (en) * 2015-04-23 2015-07-08 成都博元时代软件有限公司 Data cloud storage method
CN105430423A (en) * 2015-11-12 2016-03-23 小米科技有限责任公司 Video backup method, device and system
CN106303341A (en) * 2016-10-13 2017-01-04 杭州恒生数字设备科技有限公司 A kind of coaxial high-definition network switch
CN106998436A (en) * 2017-03-24 2017-08-01 浙江宇视科技有限公司 Video recording backup method and device

Also Published As

Publication number Publication date
CN109951662A (en) 2019-06-28

Similar Documents

Publication Publication Date Title
CN109951662B (en) Video backup method and system
CN107302549B (en) Remote data transmission and storage system and method
CN110636340B (en) Video file uploading method, storage device, terminal device and storage medium
US20190356717A1 (en) Multimedia file processing
CN110247985B (en) Resource downloading method and device, electronic equipment and medium
US20120324160A1 (en) Method for data access, message receiving parser and system
US11032584B2 (en) Picture storage method, apparatus and video monitoring system
US9648128B2 (en) Dynamic ad hoc cloud based memory management for mobile devices
CN106817388B (en) Method and device for acquiring data by virtual machine and host machine and system for accessing data
CN110196843B (en) File distribution method based on container cluster and container cluster
CN110753084A (en) Uplink data reading method, cache server and computer readable storage medium
CN109343862B (en) Scheduling method and device of resource data of application
CN110290396B (en) Video processing method, device, system, equipment and storage medium
CN114265713A (en) RDMA event management method, device, computer equipment and storage medium
CN107329832B (en) Data receiving method and device
CN111031117B (en) Multimedia file downloading method and related device
CN108769244B (en) Storage task information acquisition method and related device
CN113986642A (en) Task monitoring system, method and device, electronic equipment and storage medium
JP7313948B2 (en) Data collection device, data collection system and data collection method
CN116166421A (en) Resource scheduling method and equipment for distributed training task
CN111405313B (en) Method and system for storing streaming media data
CN112988039B (en) Data uploading method and device, cloud storage gateway and system and storage medium
CN112711384A (en) Data storage method and device based on multiple storage devices
CN110474954A (en) Sharing files method, apparatus, computer equipment and readable storage medium storing program for executing based on block chain
CN114844880B (en) File uploading method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant