CN115878379A - Data backup method, main server, backup server and storage medium - Google Patents

Data backup method, main server, backup server and storage medium Download PDF

Info

Publication number
CN115878379A
CN115878379A CN202211528453.2A CN202211528453A CN115878379A CN 115878379 A CN115878379 A CN 115878379A CN 202211528453 A CN202211528453 A CN 202211528453A CN 115878379 A CN115878379 A CN 115878379A
Authority
CN
China
Prior art keywords
backed
video
video stream
backup
data
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.)
Pending
Application number
CN202211528453.2A
Other languages
Chinese (zh)
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.)
Hangzhou Huacheng Software Technology Co Ltd
Original Assignee
Hangzhou Huacheng Software Technology 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 Hangzhou Huacheng Software Technology Co Ltd filed Critical Hangzhou Huacheng Software Technology Co Ltd
Priority to CN202211528453.2A priority Critical patent/CN115878379A/en
Publication of CN115878379A publication Critical patent/CN115878379A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a data backup method, a main server, a backup server and a computer readable storage medium, wherein the data backup method comprises the following steps: the method comprises the steps that a main server obtains a video stream to be backed up, the video stream to be backed up is associated with data types, and the data types comprise event videos and non-event videos; determining backup information corresponding to the data type in the video stream to be backed up based on the data type of the video stream to be backed up; and sending the backup information to a backup server for storage. According to the method and the device, the backup information corresponding to the video streams to be backed up of different data types is obtained by analyzing the video streams to be backed up of different data types, the obtained backup information is sent to the backup server, the backup server stores the backup information to achieve storage of the video streams to be backed up, the main server analyzes the video streams to be backed up to obtain the backup information, optimized storage is achieved, and the retention period of the video streams to be backed up in the backup server is greatly prolonged.

Description

Data backup method, main server, backup server and storage medium
Technical Field
The present invention relates to the field of network backup technologies, and in particular, to a data backup method, a primary server, a backup server, and a computer-readable storage medium.
Background
The dual-machine backup, i.e. one host (i.e. the main server) and one standby machine (i.e. the standby server) are both placed in the same machine room, and share one floating IP address to provide a service server for the outside. The floating IP address may be configured fixedly or dynamically. When the host is normal, the floating IP address is on the host, and the host provides monitoring service for the outside. After the host machine is in fault or the network is interrupted, the standby machine detects the abnormality of the host machine, the standby machine is switched to a working state, the floating IP address is switched to the standby machine, and the standby machine provides monitoring service for the outside. However, this approach has the disadvantage of being relatively costly, since each server requires a backup server.
Disclosure of Invention
The invention mainly solves the technical problem of providing a data backup method, a main server, a backup server and a computer readable storage medium, and solves the problem that optimized storage cannot be realized in the prior art.
In order to solve the technical problems, the first technical scheme adopted by the invention is as follows: a data backup method is provided, and comprises the following steps:
the method comprises the steps that a main server obtains a video stream to be backed up, the video stream to be backed up is associated with data types, and the data types comprise event videos and non-event videos;
determining backup information corresponding to the data type in the video stream to be backed up based on the data type of the video stream to be backed up;
and sending the backup information to a backup server for storage.
The method for determining the backup information corresponding to the data type in the video stream to be backed up based on the data type of the video stream to be backed up comprises the following steps:
and determining the video stream to be backed up as the backup information corresponding to the event video in response to the fact that the video stream to be backed up is the event video.
Wherein, send backup information to backup server and save, still include:
and sending the video stream to be backed up and the preset number of historical video frames before the video stream to be backed up to a backup server.
Wherein, the backup information also comprises an event type;
determining backup information corresponding to the data type in the video stream to be backed up based on the data type of the video stream to be backed up, and further comprising:
performing event type detection on the video stream to be backed up, and determining an event type corresponding to the video stream to be backed up;
sending the backup information to a backup server for storage, wherein the storage comprises the following steps:
and sending the video stream to be backed up and the event type corresponding to the video stream to be backed up to a backup server so that the backup server stores the video stream to be backed up based on the event type, wherein different event types correspond to different storage positions.
The method for determining the backup information corresponding to the data type in the video stream to be backed up based on the data type of the video stream to be backed up comprises the following steps:
in response to that the video stream to be backed up is a non-event video, performing feature extraction on the video stream to be backed up to obtain feature information corresponding to the video stream to be backed up; the characteristic information serves as backup information.
The method for extracting the features of the video stream to be backed up to obtain the feature information corresponding to the video stream to be backed up includes the following steps:
dividing the video stream to be backed up to obtain a plurality of video segments corresponding to the video stream to be backed up;
determining key information of each video segment based on change information between video frames in the video segments;
and sequentially sequencing the key frames corresponding to the video segments to generate the characteristic information of the video stream to be backed up.
The key information comprises key frames and image groups;
determining key information of each video segment based on change information between video frames in the video segment, including:
comparing change information corresponding to any two video frames in the video segment with threshold information;
in response to the fact that the change information is smaller than the threshold value information, extracting two video frames or any one of the two video frames corresponding to the change information as a key frame of the video segment;
and responding to the change information not less than the threshold information, and dividing the video segment to obtain the sub-video segment corresponding to the video segment.
The method for determining the key frame of each video segment based on the change information between the video frames in the video segments further comprises the following steps:
and in response to that the time interval between two adjacent video frames in the sub-video segment does not exceed the preset time length and the corresponding change information between the two video frames is not less than the threshold value information, all the video frames contained in the sub-video segment are used as key frames of the sub-video segment.
In order to solve the above technical problems, the second technical solution adopted by the present invention is: a data backup method is provided, and comprises the following steps:
responding to the abnormity of the main server, the backup server acquires a video stream to be backed up, wherein the video stream to be backed up is associated with data categories, and the data categories comprise event videos and non-event videos;
determining backup information corresponding to the data type in the video stream to be backed up based on the data type of the video stream to be backed up;
and storing the backup information.
The data backup method further comprises the following steps:
and responding to the normal operation of the main server, and migrating the video stream to be backed up to the main server by the backup server.
The data backup method further comprises the following steps:
and in response to the fact that the data stored in the backup server reaches a preset value, the backup information corresponding to the non-event video with the longest storage time in the backup server is covered by the backup information corresponding to the video stream to be backed up.
The data backup method further comprises the following steps:
and displaying the corresponding video stream to be backed up based on the backup information in the backup server.
The backup information comprises key frames and image groups;
displaying a corresponding video stream to be backed up based on backup information in a backup server, comprising:
and responding to the fact that the video stream to be backed up is a non-event video, and displaying the video stream to be backed up based on the key frame and the image group corresponding to the video stream to be backed up.
In order to solve the technical problems, the third technical scheme adopted by the invention is as follows: there is provided a main server, comprising a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor is configured to execute the process data to implement the steps of the data backup method according to the first technical solution.
In order to solve the technical problems, the fourth technical scheme adopted by the invention is as follows: there is provided a backup server comprising a memory, a processor and a computer program stored in the memory and running on the processor, the processor being configured to execute the process data to implement the steps of the data backup method of the second aspect.
In order to solve the above technical problems, a fifth technical solution adopted by the present invention is: there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the data backup method described above.
The invention has the beneficial effects that: different from the prior art, the data backup method, the main server, the backup server and the computer readable storage medium are provided, and the data backup method comprises the following steps: the method comprises the steps that a main server obtains a video stream to be backed up, the video stream to be backed up is associated with data types, and the data types comprise event videos and non-event videos; determining backup information corresponding to the data type in the video stream to be backed up based on the data type of the video stream to be backed up; and sending the backup information to a backup server for storage. According to the method and the device, the video streams to be backed up of different data categories are analyzed to obtain the backup information corresponding to the video streams to be backed up of different data categories, the obtained backup information is sent to the backup server, the backup server stores the backup information to achieve storage of the video streams to be backed up, the main server analyzes the video streams to be backed up to obtain the backup information, optimized storage is achieved, and the retention period of the video streams to be backed up in the backup server is greatly prolonged.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart illustrating an embodiment of a data backup method applied to a primary server according to the present invention;
FIG. 2 is a flowchart illustrating an embodiment of a data backup method applied to a backup server according to the present invention;
FIG. 3 is a block diagram of a framework for an embodiment of a primary server provided by the present invention;
FIG. 4 is a block diagram of an embodiment of a backup server provided by the present invention;
FIG. 5 is a block diagram of an embodiment of a computer-readable storage medium provided in the present invention.
Detailed Description
The following describes in detail the embodiments of the present application with reference to the drawings attached hereto.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, interfaces, techniques, etc. in order to provide a thorough understanding of the present application.
The term "and/or" herein is merely an association relationship describing an associated object, and means that there may be three relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship. Further, the term "plurality" herein means two or more than two.
In order to make those skilled in the art better understand the technical solution of the present invention, a data backup method provided by the present invention is further described in detail below with reference to the accompanying drawings and the detailed description.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a data backup method for a primary server according to an embodiment of the present invention.
The embodiment provides a data backup method, which is suitable for a main server, wherein the main server is connected with a backup server, and the data backup method comprises the following steps.
S11: the main server obtains the video stream to be backed up.
Specifically, the video stream to be backed up is associated with data categories, and the data categories include event videos and non-event videos.
In one embodiment, a video stream is captured by an image capture device and is used as a video stream to be backed up. The image acquisition equipment identifies the video stream to be backed up and determines the data type of the video stream to be backed up.
In response to the fact that the change information among the video frames in the video stream to be backed up is larger than the dynamic inspection alarm threshold value, determining the data type of the video stream to be backed up as an event video; and in response to the fact that the change information among the video frames in the video stream to be backed up is not larger than the dynamic inspection alarm threshold, determining that the data category of the video stream to be backed up is a non-event video. In this embodiment, a video stream to be backed up whose data type is a non-event video is also referred to as a normal video stream.
And each video frame in the video stream to be backed up has acquisition time.
S12: and determining backup information corresponding to the data type in the video stream to be backed up based on the data type of the video stream to be backed up.
In one embodiment, in response to that the video stream to be backed up is an event video, the video stream to be backed up is determined as backup information corresponding to the event video. That is to say, the video stream to be backed up, the data category of which is the event video, is directly used as the backup information of the video stream to be backed up.
In a specific embodiment, in order to determine the retention period of the video stream to be backed up, it is further required to determine the event type of the video stream to be backed up whose data category is the event video. Specifically, the main server performs event type detection on the video stream to be backed up, and determines an event type corresponding to the video stream to be backed up. Specifically, the event type corresponding to the video stream to be backed up is obtained by detecting the event type corresponding to the video stream to be backed up by the main server. Different event types correspond to different retention periods. The retention period represents the time length of the backup information corresponding to the video stream to be backed up stored in the backup server.
In one embodiment, the event type may be preset according to actual conditions. For example, the event types of the video stream to be backed up may be classified into M types. For example, the first event type represents that the video of the standby part is recorded without alarm time; the second event type represents that the video of the spare part is different dynamic inspection videos; the mth event type represents the highest level recording event. The higher the level of the event type is, the longer the time length of the backup information corresponding to the video stream to be backed up stored in the backup server is. For example, the retention period of the backup information of the video stream to be backed up corresponding to the mth event type is longer than the retention periods of the backup information of the video stream to be backed up corresponding to the second event type and the first event type, respectively.
In another embodiment, the main server cannot analyze that the data category is the event type of the video stream to be backed up of the event video, and then marks the event type of the video stream to be backed up as a specific type.
In an embodiment, in response to that the video stream to be backed up is a non-event video, feature extraction is performed on the video stream to be backed up to obtain feature information corresponding to the video stream to be backed up.
Specifically, when a video stream to be backed up with a non-event video data category is stored, the main server is required to analyze the video stream to be backed up, extract feature information corresponding to the video stream to be backed up, and only send the feature information to the backup server for storage, so as to reduce the data bit number of the video stream to be backed up, thereby avoiding occupying more memory space in the backup server, and facilitating subsequent retrieval of the video stream to be backed up based on the feature information. Wherein the characteristic information is used as backup information.
Because the change information between the video frames in the video stream to be backed up, the data type of which is the non-event video, is not greater than the dynamic detection alarm threshold, it indicates that no event occurs in the video stream to be backed up, the targets in the video frames are not changed for a long time, and the targets in the individual video frames may have slight differences.
In a specific embodiment, a video stream to be backed up is divided to obtain a plurality of video segments corresponding to the video stream to be backed up; determining key information of each video segment based on change information between video frames in the video segments; and sequentially sequencing the key frames corresponding to the video segments to generate the characteristic information of the video stream to be backed up.
In a particular embodiment, the key information includes key frames and groups of images. The corresponding change information between any two video frames in the video segment is compared to the threshold information. For example, the time period of the video stream to be backed up with the data category of non-event video is [ t ] 1 ,t 2 ]And equally dividing the video frames in the time period into n equal parts to obtain n video segments. And extracting any two video frames in the video segment to calculate change information, and comparing the calculated change information with threshold value information. And the threshold information is smaller than the alarm threshold of the mobile inspection.
In response to the fact that the change information is smaller than the threshold value information, extracting two video frames or any one of the two video frames corresponding to the change information as a key frame of the video segment; and responding to the change information not less than the threshold information, and dividing the video segment to obtain the sub-video segment corresponding to the video segment.
And in response to that the time interval between two adjacent video frames in the sub-video segment does not exceed the preset time length and the corresponding change information between the two video frames is not less than the threshold value information, all the video frames contained in the sub-video segment are used as key frames of the sub-video segment. For example, the preset time period may be 3s, or the preset time period may be set according to actual conditions.
That is, when the data category of the video stream to be backed up is a non-event video, a group of pictures (GOP) formed by the extracted key frames and the acquisition time of the video frames represented by the key frames or the frame number sequence of the video frames is used as backup information. Namely, the video frames with the change information not less than the threshold information are used as backup information.
For example, if the video stream to be backed up with the non-event video data category is 5 hours, the key frame comparison analysis may be performed on every 2 minutes of video frames. If the video frames at every 2 minutes are not different, namely the change information does not reach the threshold information, extracting one video frame and GOP at every 2 minutes as backup information. If the video frames at intervals of 2 minutes are different, namely the change information reaches the threshold information, the video segment of 2 minutes is divided into preset 10 equal parts, namely the key frame comparison analysis is performed once at intervals of 12 seconds. If the video frames in every 12 seconds are not different, namely the change information does not reach the threshold information, extracting a video frame and a subsequent complete GOP as backup information in every 12 seconds. If the video frames at intervals of 12 seconds have differences, namely the change information reaches the threshold information, the video segments at intervals of 12 seconds are divided into preset 4 equal parts, namely key frame comparison analysis is carried out at intervals of 3 seconds, and if the video frames at intervals of 3 seconds have differences, namely the change information reaches the threshold information, all the video frames at 3 seconds are sent as backup information to traverse other video segments.
When the parameters of each video frame in the video stream to be backed up are changed, the video frame with the changed parameters is also used as a key frame. For example, if the resolution of the current video frame is changed from the resolution of the previous video frame, the current video frame is used as the key frame.
By the method, the tiny changes in the video stream to be backed up with the data type of the non-event video can be determined, so that the loss of the tiny changes is avoided, and the details in the video stream are ensured not to be lost.
S13: and sending the backup information to a backup server for storage.
Specifically, in response to that the video stream to be backed up is the event video, the main server sends the video stream to be backed up to the backup server. In an embodiment, the video stream to be backed up and the event type corresponding to the video stream to be backed up are sent to a backup server, so that the backup server stores the video stream to be backed up based on the event type, wherein different event types correspond to different storage locations.
In one embodiment, in order to more accurately determine the event type of the video stream to be backed up whose data category is the event video, video frames of a preset number of frames adjacent to the video stream to be backed up before the video stream to be backed up may also be sent to the backup server. Specifically, the video stream to be backed up and a preset number of historical video frames before the video stream to be backed up are sent to the backup server.
Since there is a case where n main servers match m backup servers (n > m), the transmission order of the video stream to be backed up and the preset number of historical video frames before the video stream to be backed up may be determined according to the current storage medium of the main server and the bandwidth performance of the backup servers.
In an embodiment, when the network bandwidth or the disk performance of the backup server does not meet the corresponding preset requirement, for example, the main server sends more data to the backup server, or the number of channels is limited, the video stream to be backed up may be sent to the backup server first, and the backup server reserves a space for subsequently storing a preset number of historical video frames before the video stream to be backed up when storing the video stream to be backed up.
In another embodiment, when the main server sends less data to the backup server and the number of channels is sufficient, the video stream to be backed up and a preset number of historical video frames before the video stream to be backed up may be sent to the backup server at the same time, so as to be stored by the backup server.
In an embodiment, the main server may send the backup information of the video stream to be backed up, whose data category is the event video, to the backup server, and when the network loan or the disk performance of the backup server meets the corresponding preset requirement, the main server sends the backup information of the video stream to be backed up, whose data category is the non-event video, to the backup server.
After the server to be backed up receives the backup information of the video stream to be backed up with the data type of the event video, the backup server determines the storage position of the backup information according to the event type corresponding to the backup information. In response to the fact that the event type corresponding to the backup information is the Mth event type, the backup server stores the backup information in the position with the longest retention period; and responding to the event type corresponding to the backup information as the first event type, and storing the backup information in a position with a shorter retention period by the backup server. In response to the backup information not having the event type, the backup server may store the backup information in a location with the shortest retention period, that is, a normal video recording location. The backup server correlates the received acquisition time correlated with the video stream to be backed up and the position where the backup information corresponding to each video stream to be backed up is stored, and forms an index sequence according to the sequence of the acquisition time, so as to extract the video stream when playing the video stream at a later stage.
In the data backup method provided in this embodiment, a main server obtains a video stream to be backed up, where the video stream to be backed up is associated with data categories, and the data categories include event videos and non-event videos; determining backup information corresponding to the data type in the video stream to be backed up based on the data type of the video stream to be backed up; and sending the backup information to a backup server for storage. According to the method and the device, the video streams to be backed up of different data categories are analyzed to obtain the backup information corresponding to the video streams to be backed up of different data categories, the obtained backup information is sent to the backup server, the backup server stores the backup information to achieve storage of the video streams to be backed up, the main server analyzes the video streams to be backed up to obtain the backup information, optimized storage is achieved, and the retention period of the video streams to be backed up in the backup server is greatly prolonged.
Referring to fig. 2, fig. 2 is a flowchart illustrating a data backup method for a backup server according to an embodiment of the present invention.
The embodiment provides a data backup method, which is suitable for a backup server and comprises the following steps.
S21: and responding to the abnormity of the main server, and then the backup server acquires the video stream to be backed up.
Specifically, in an embodiment, when the main server fails and the main server is disconnected from the backup server, the backup server is connected to the image capturing device, and the video stream captured by the image capturing device is transmitted to the backup server.
In one embodiment, a video stream is captured by an image capture device and is used as a video stream to be backed up. And the image acquisition equipment identifies the video stream to be backed up and determines the data type of the video stream to be backed up. The video stream to be backed up is associated with data categories, wherein the data categories comprise event videos and non-event videos.
In response to the fact that the change information among the video frames in the video stream to be backed up is larger than the dynamic detection alarm threshold, determining the data type of the video stream to be backed up as an event video; and in response to the fact that the change information among the video frames in the video stream to be backed up is not larger than the dynamic inspection alarm threshold, determining that the data category of the video stream to be backed up is a non-event video. In this embodiment, a video stream to be backed up whose data type is a non-event video is also referred to as a normal video stream.
And each video frame in the video stream to be backed up has acquisition time.
S22: and determining backup information corresponding to the data type in the video stream to be backed up based on the data type of the video stream to be backed up.
Specifically, the backup server receives the video stream to be backed up, and detects the event type of the video stream to be backed up whose data category is the event video. The specific manner of detecting the event type of the video stream to be backed up by the backup server is similar to the specific manner of detecting the event type of the video stream to be backed up by the main server in step S12 in the foregoing embodiment, and is not described again here.
In this embodiment, a specific embodiment in which the backup server determines the backup information corresponding to the video stream to be backed up according to the data type of the video stream to be backed up is similar to a specific manner in which the main server determines the storage location of the video stream to be backed up according to the event type corresponding to the video stream to be backed up in step S12 in the above embodiment, and details are not repeated here.
In this embodiment, a specific manner in which the backup server determines the storage location of the video stream to be backed up according to the event type corresponding to the video stream to be backed up is similar to the specific manner in which the backup server determines the storage location of the video stream to be backed up according to the event type corresponding to the video stream to be backed up in step S12 in the above embodiment, and details are not repeated here.
S23: and storing the backup information.
Specifically, when the backup information corresponding to the video stream to be backed up is determined, the backup server stores the video stream to be backed up and the backup information corresponding to the video stream to be backed up in corresponding storage locations.
In one embodiment, in response to the normal operation of the main server, the backup server migrates the video stream to be backed up to the main server. In this embodiment, the video stream to be backed up is used as the video stream to be migrated back. That is, the video stream to be migrated is migrated from the backup video stream to the main server. Specifically, when the main server returns to normal, the backup server is disconnected from the image acquisition device, so that the main server is connected with the image acquisition device, and the main server is connected with the backup server. And the video stream to be migrated stored by the backup server is sent to the main service for storage, and when the main server receives the video stream sent by the backup server, the backup server deletes the stored video stream to be migrated so as to save the storage space in the video stream to be migrated. That is, the backup server only stores the backup information of the video stream to be backed up, and the backup server sends the stored video stream to be backed up to the main server, so that the main server stores the video stream to be backed up.
In an embodiment, in response to that the data stored in the backup server reaches a preset value, the backup information corresponding to the non-event video with the longest storage time in the backup server is covered by the backup information corresponding to the video stream to be backed up.
Specifically, the corresponding video stream to be backed up is displayed based on the backup information in the backup server. And displaying the video stream to be backed up based on the backup information corresponding to the video stream to be backed up stored in the backup server based on the time sequence in the index sequence stored in the backup server.
In an embodiment, the backup information is a video stream to be backed up, and in response to the video stream to be backed up being an event video, the video stream to be backed up is played.
In an embodiment, the backup information is a key frame and an image group, and in response to that the video stream to be backed up is a non-event video, the video stream to be backed up is displayed based on the key frame and the image group corresponding to the video stream to be backed up. Specifically, the video stream to be backed up corresponding to the current key frame is displayed according to the acquisition time of the current key frame carried in the image group and the image group after the current key frame. An On Screen Display (OSD) time jump appears On the current key frame, so that the current key frame can be simulated to obtain a corresponding video set to be backed up according to the jumping Screen Display time. The screen display time jumps once every second until the next key frame is played, and then the video stream to be backed up corresponding to the next key frame is generated based on the next key frame and the image group simulation, so that a better display effect is achieved. If the user carries out the double-speed playing, the jumping speed of the screen display time can be controlled, and the double-speed playing effect is achieved.
When the parameters of each video frame in the video stream to be backed up are changed, the video frame with the changed parameters is also used as a key frame. For example, if the resolution of the current video frame is changed from the resolution of the previous video frame, the current video frame is used as the key frame.
In the data backup method provided by this embodiment, in response to an abnormality occurring in the main server, the backup server obtains a video stream to be backed up, where the video stream to be backed up is associated with data categories, and the data categories include event videos and non-event videos; determining backup information corresponding to the data type in the video stream to be backed up based on the data type of the video stream to be backed up; and storing the backup information. The backup information corresponding to the video streams to be backed up of different data categories is obtained by analyzing the video streams to be backed up of different data categories, so that the backup server stores the video streams to be backed up by storing the backup information, and analyzes the video streams to be backed up by the backup server to obtain the backup information, thereby realizing optimized storage and greatly prolonging the retention period of the video streams to be backed up in the backup server.
Referring to fig. 3, fig. 3 is a schematic diagram of a framework of a host server according to an embodiment of the present invention. The primary server 70 includes a memory 71 and a processor 72 coupled to each other, and the processor 72 is configured to execute program instructions stored in the memory 71 to implement the steps of the above-described embodiment of the data backup method applied to the primary server 70. In one particular implementation scenario, the host server 70 may include, but is not limited to: a microcomputer, a server, and in addition, the main server 70 may also include a mobile device such as a notebook computer, a tablet computer, and the like, which is not limited herein.
In particular, processor 72 is configured to control itself and memory 71 to implement the steps of the data backup method embodiment described above as being suitable for primary server 70. The processor 72 may also be referred to as a CPU (Central Processing Unit). The processor 72 may be an integrated circuit chip having signal processing capabilities. The Processor 72 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. Additionally, the processor 72 may be collectively implemented by an integrated circuit chip.
Referring to fig. 4, fig. 4 is a schematic diagram of a framework of a backup server according to an embodiment of the present invention.
Backup server 80 includes a memory 81 and a processor 82 coupled to each other, and processor 82 is configured to execute program instructions stored in memory 81 to implement any of the steps of any of the embodiments of data backup methods described above as being suitable for backup server 80. In one particular implementation scenario, backup server 80 may include, but is not limited to: a microcomputer, a server, and in addition, the backup server 80 may also include a mobile device such as a notebook computer, a tablet computer, and the like, which is not limited herein.
In particular, processor 82 is configured to control itself and memory 81 to implement the steps of the data backup method embodiments described above as being suitable for backup server 80. The processor 82 may also be referred to as a CPU (Central Processing Unit). The processor 82 may be an integrated circuit chip having signal processing capabilities. The Processor 82 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 82 may be collectively implemented by an integrated circuit chip.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating a frame of a computer-readable storage medium according to an embodiment of the present invention. The computer readable storage medium 90 stores program instructions 901 capable of being executed by the processor, and the program instructions 901 are used for implementing the steps of any of the embodiments of the data backup method.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and for specific implementation, reference may be made to the description of the above method embodiments, and for brevity, details are not described here again.
The foregoing description of the various embodiments is intended to highlight various differences between the embodiments, and the same or similar parts may be referred to each other, and for brevity, will not be described again herein.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely one type of logical division, and an actual implementation may have another division, for example, a unit or a component may be combined or integrated with another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some interfaces, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit 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 application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in 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, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. 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 various media capable of storing program codes.
The above description is only an embodiment of the present invention, and is not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes performed by the present invention or directly or indirectly applied to other related technical fields are also included in the scope of the present invention.

Claims (16)

1. A data backup method, characterized in that the data backup method comprises:
the method comprises the steps that a main server obtains a video stream to be backed up, the video stream to be backed up is associated with data types, and 5 the data types comprise event videos and non-event videos;
determining backup information corresponding to the data type in the video stream to be backed up based on the data type of the video stream to be backed up;
and sending the backup information to a backup server for storage.
2. The data backup method according to claim 1,
0, determining backup information corresponding to the data category in the video stream to be backed up based on the data category of the video stream to be backed up, including:
and in response to the fact that the video stream to be backed up is the event video, determining the video stream to be backed up as backup information corresponding to the event video.
3. The data backup method according to claim 2,
5, sending the backup information to a backup server for storage, further comprising:
and sending the video stream to be backed up and a preset number of historical video frames before the video stream to be backed up to the backup server.
4. The data backup method according to claim 2, wherein the backup information further includes an event type;
0, determining backup information corresponding to the data category in the video stream to be backed up based on the data category of the video stream to be backed up, further comprising:
performing event type detection on the video stream to be backed up, and determining the event type corresponding to the video stream to be backed up;
the sending the backup information to a backup server for storage includes: and 5, sending the video stream to be backed up and the event type corresponding to the video stream to be backed up to the backup server, so that the backup server stores the video stream to be backed up based on the event type, wherein different event types correspond to different storage positions.
5. The data backup method according to claim 1,
the determining, based on the data category of the video stream to be backed up, backup information corresponding to the data category in the video stream to be backed up includes:
in response to that the video stream to be backed up is the non-event video, performing feature extraction on the video stream to be backed up to obtain feature information corresponding to the video stream to be backed up; the characteristic information is used as the backup information.
6. The data backup method according to claim 5,
the extracting the characteristics of the video stream to be backed up to obtain the characteristic information corresponding to the video stream to be backed up includes:
dividing the video stream to be backed up to obtain a plurality of video segments corresponding to the video stream to be backed up;
determining key information of each video segment based on change information between video frames in the video segments;
and sequentially sequencing the key frames corresponding to the video segments to generate the characteristic information of the video stream to be backed up.
7. The data backup method according to claim 6, wherein the key information comprises key frames and groups of images;
the determining key information of each video segment based on the change information between the video frames in the video segments comprises:
comparing change information corresponding between any two of the video frames in the video segment with threshold information;
in response to that the change information is smaller than the threshold information, extracting two video frames corresponding to the change information or any one of the two video frames as a key frame of the video segment;
and in response to the fact that the change information is not smaller than the threshold value information, dividing the video segment to obtain sub-video segments corresponding to the video segment.
8. The data backup method according to claim 7,
the determining the key frame of each video segment based on the change information between the video frames in the video segments further comprises:
and in response to that the time interval between two adjacent video frames in the sub-video segment does not exceed a preset time length and the corresponding change information between the two video frames is not less than the threshold information, all the video frames contained in the sub-video segment are used as key frames of the sub-video segment.
9. A data backup method, characterized in that the data backup method comprises:
responding to the abnormity of the main server, the backup server acquires a video stream to be backed up, wherein the video stream to be backed up is associated with data categories, and the data categories comprise event videos and non-event videos;
determining backup information corresponding to the data type in the video stream to be backed up based on the data type of the video stream to be backed up;
and storing the backup information.
10. The data backup method according to claim 9, wherein the data backup method further comprises:
and responding to the normal operation of the main server, and then the backup server migrates the video stream to be backed up to the main server.
11. The data backup method according to claim 9, wherein the data backup method further comprises:
and in response to the fact that the data stored in the backup server reaches a preset value, the backup information corresponding to the video stream to be backed up is used for covering the backup information corresponding to the non-event video which is stored in the backup server for the longest time.
12. The data backup method of claim 9, wherein the data backup method further comprises:
and displaying the corresponding video stream to be backed up based on the backup information in the backup server.
13. The data backup method according to claim 12, wherein the backup information is key frames and image groups;
the displaying the corresponding video stream to be backed up based on the backup information in the backup server includes:
and in response to that the video stream to be backed up is the non-event video, displaying the video stream to be backed up based on the key frame and the image group corresponding to the video stream to be backed up.
14. A primary server, comprising a memory, a processor and a computer program stored in the memory and running on the processor, the processor being configured to execute sequential data to implement the steps in the data backup method according to any one of claims 1 to 8.
15. A backup server, characterized in that the backup server comprises a memory, a processor and a computer program stored in the memory and running on the processor, the processor being configured to execute the process data to implement the steps in the data backup method according to any one of claims 9 to 13.
16. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, carries out the steps of the data backup method according to any one of claims 1 to 13.
CN202211528453.2A 2022-11-30 2022-11-30 Data backup method, main server, backup server and storage medium Pending CN115878379A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211528453.2A CN115878379A (en) 2022-11-30 2022-11-30 Data backup method, main server, backup server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211528453.2A CN115878379A (en) 2022-11-30 2022-11-30 Data backup method, main server, backup server and storage medium

Publications (1)

Publication Number Publication Date
CN115878379A true CN115878379A (en) 2023-03-31

Family

ID=85765239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211528453.2A Pending CN115878379A (en) 2022-11-30 2022-11-30 Data backup method, main server, backup server and storage medium

Country Status (1)

Country Link
CN (1) CN115878379A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116069562A (en) * 2023-04-06 2023-05-05 北京中科开迪软件有限公司 Video data backup method, system, equipment and medium based on optical disc library

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116069562A (en) * 2023-04-06 2023-05-05 北京中科开迪软件有限公司 Video data backup method, system, equipment and medium based on optical disc library
CN116069562B (en) * 2023-04-06 2023-07-14 北京中科开迪软件有限公司 Video data backup method, system, equipment and medium based on optical disc library

Similar Documents

Publication Publication Date Title
US20190172494A1 (en) Reference and non-reference video quality evaluation
CN107509107B (en) Method, device and equipment for detecting video playing fault and readable medium
CN108259934B (en) Method and apparatus for playing back recorded video
CN111095939B (en) Identifying previously streamed portions of media items to avoid repeated playback
WO2021244224A1 (en) Lagging detection method and apparatus, and device and readable storage medium
CN103873852A (en) Multi-mode parallel video quality fault detection method and device
CN109144858B (en) Fluency detection method and device, computing equipment and storage medium
JP2007243699A (en) Method and apparatus for video recording and playback
US20090167527A1 (en) Video monitoring system and method
CN115878379A (en) Data backup method, main server, backup server and storage medium
CN113473086B (en) Video playing method and device, electronic equipment and intelligent high-speed large screen
EP2328322A1 (en) Method and apparatus for accessing files stored in a storage access network (SAN) or network attached storange (NAS)
EP2950529B1 (en) Video image storage method and apparatus
JP2009200757A (en) Video data processing apparatus, program, and method
JP2013093681A (en) Monitoring camera device and monitoring camera system
CN107734278B (en) Video playback method and related device
US11398091B1 (en) Repairing missing frames in recorded video with machine learning
KR101941105B1 (en) A method of collectively managing the occurrence of errors in the hardware included in the computer system and performing backup and recovery to inform the external terminal
CN113382268B (en) Live broadcast anomaly analysis method, live broadcast anomaly analysis device, computer equipment and storage medium
JPWO2007080657A1 (en) Monitoring device
CN106973307A (en) A kind of video equipment access method and device
CN112702198A (en) Abnormal root cause positioning method and device, electronic equipment and storage medium
KR101938202B1 (en) A method of collectively managing the occurrence of errors in the hardware included in the computer system and performing backup and recovery to inform the external terminal
KR101793263B1 (en) A method of collectively managing the occurrence of errors in the hardware included in the computer system and performing backup and recovery to inform the external terminal
CN109982017A (en) The system and method for recording video data stream for intelligence

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