CN118210651A - Stream data backup method and device, electronic equipment and storage medium - Google Patents

Stream data backup method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN118210651A
CN118210651A CN202211625795.6A CN202211625795A CN118210651A CN 118210651 A CN118210651 A CN 118210651A CN 202211625795 A CN202211625795 A CN 202211625795A CN 118210651 A CN118210651 A CN 118210651A
Authority
CN
China
Prior art keywords
real
equipment
backup
cluster
cloning
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
CN202211625795.6A
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.)
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech 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 Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN202211625795.6A priority Critical patent/CN118210651A/en
Publication of CN118210651A publication Critical patent/CN118210651A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1069Session establishment or de-establishment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a streaming data backup method, a streaming data backup device, electronic equipment and a storage medium. The method comprises the following steps: receiving a backup task initiated by a user to target equipment in a current cluster; if the target equipment is virtual equipment, searching real equipment corresponding to the target equipment according to a mapping relation, and establishing a real-time streaming session between the current cluster and a source cluster where the real equipment corresponding to the target equipment is located; and acquiring stream data acquired by the real equipment corresponding to the target equipment through the real-time stream transmission session, and backing up the stream data in the current cluster. According to the scheme, the streaming data backup is respectively carried out through the multiple clusters, and the backup streaming data among the clusters are completely independent, so that the reliability of the streaming data backup is improved.

Description

Stream data backup method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data backup, and in particular, to a method and apparatus for backing up stream data, an electronic device, and a storage medium.
Background
In the video security industry, a video monitoring platform is provided with a plurality of video recording devices to execute video recording tasks, and video recording files are backed up through magnetic discs to ensure the security of the video recording files.
In the related art, a video monitoring platform is composed of a plurality of clusters, each cluster is provided with a plurality of servers, each server is connected with different video recording devices, and as the plurality of clusters are arranged on one video monitoring platform, conflict can occur when video recording devices are repeatedly added, and each video recording device only has one video recording on the video monitoring platform. The video monitoring platform video is lost due to the failure of part of the server of the video monitoring platform or the damage of a disk.
Therefore, how to improve the reliability of video file backup is a concern.
Disclosure of Invention
The application provides a streaming data backup method, a streaming data backup device, electronic equipment and a storage medium, which are used for improving the reliability of streaming data backup.
In a first aspect, the present application provides a streaming data backup method, including: receiving a backup task initiated by a user to target equipment in a current cluster; if the target equipment is virtual equipment, searching real equipment corresponding to the target equipment according to a mapping relation, and establishing a real-time streaming session between the current cluster and a source cluster where the real equipment corresponding to the target equipment is located; and acquiring stream data acquired by the real equipment corresponding to the target equipment through the real-time stream transmission session, and backing up the stream data in the current cluster.
In one possible implementation manner, before the receiving the backup task initiated by the user to the target device under the current cluster, the method further includes: receiving a cloning task sent by a platform, wherein the cloning task is sent by the platform according to a cloning request of a user, and the cloning request comprises real equipment under a source cluster designated by the user and the current cluster for backup; and adding virtual equipment corresponding to the real equipment under the current cluster according to the cloning task, and storing the mapping relation between the real camera and the virtual equipment.
In a possible implementation manner, the adding, according to the cloning task, a virtual device corresponding to the real device under the current cluster includes: according to the cloning task, performing equipment verification on the real equipment in a source cluster; and if the verification is passed, adding the virtual equipment corresponding to the real equipment under the current cluster.
In a possible implementation manner, the establishing a real-time streaming session between the current cluster and a source cluster where a real device corresponding to the target device is located includes: sending a pull stream address acquisition request to the source cluster; receiving a pull stream address of the real equipment returned by the source cluster; the source cluster acquires a request according to the streaming address, and extracts streaming data of real equipment corresponding to the target equipment; and establishing a real-time streaming session between source clusters of the real equipment corresponding to the target equipment in the current cluster based on a real-time streaming protocol according to the streaming address of the real equipment.
In one possible implementation, the backup task includes a backup period; the step of obtaining the streaming data collected by the real device corresponding to the target device through the real-time streaming session and backing up the streaming data in the current cluster includes: in the backup period, receiving stream data sent by the real device corresponding to the target device through the real-time stream transmission session; and storing the received streaming data of the real equipment in a local disk under the current cluster until the backup period is over, and disconnecting the real-time streaming session.
In one possible embodiment, the method further comprises: receiving a call request sent by the source cluster, wherein the call request is sent when the source cluster detects that a disk for storing stream data of real equipment under the source cluster fails according to a backup call request of a user, and the backup call request is used for specifying the stream data of the real equipment to be called; and according to the call request, the stream data of the real equipment is called from the local disk under the current cluster and returned to the source cluster, so that the source cluster returns the stream data of the real equipment to the user.
In a second aspect, the present application provides a streaming data backup apparatus, comprising: the receiving module is used for receiving a backup task initiated by a user to target equipment in the current cluster; the establishing module is used for searching real equipment corresponding to the target equipment according to the mapping relation if the target equipment is virtual equipment, and establishing a real-time streaming session between the current cluster and a source cluster where the real equipment corresponding to the target equipment is located; and the backup module is used for acquiring the streaming data acquired by the real equipment corresponding to the target equipment through the real-time streaming session and backing up the streaming data in the current cluster.
In one possible embodiment, the apparatus further comprises: the cloning module is used for receiving a cloning task sent by a platform, wherein the cloning task is sent by the platform according to a cloning request of a user, and the cloning request comprises real equipment under a source cluster designated by the user and the current cluster for backup; and the cloning module is further used for adding virtual equipment corresponding to the real equipment under the current cluster according to the cloning task and storing the mapping relation between the real camera and the virtual equipment.
In a possible implementation manner, the cloning module is specifically configured to perform device verification on the real device in the source cluster according to the cloning task; and the cloning module is specifically further configured to add a virtual device corresponding to the real device under the current cluster if the verification is passed.
In a possible implementation manner, the establishing module is specifically configured to send a pull stream address obtaining request to the source cluster; the establishing module is specifically configured to receive a pull stream address of the real device returned by the source cluster; the source cluster acquires a request according to the streaming address, and extracts streaming data of real equipment corresponding to the target equipment; the establishing module is specifically further configured to establish a real-time streaming session between source clusters of the real device corresponding to the target device in the current cluster based on a real-time streaming protocol according to the pull stream address of the real device.
In one possible implementation, the backup task includes a backup period; the backup module is specifically configured to receive, during the backup period, stream data sent by the real device corresponding to the target device through the real-time streaming session; and the backup module is specifically further configured to store the received stream data of the real device in a local disk under the current cluster, and disconnect the real-time streaming session until the backup period is over.
In one possible embodiment, the apparatus further comprises: the system comprises a source cluster, a calling module and a calling module, wherein the source cluster is used for receiving a calling request sent by the source cluster, the calling request is sent when the source cluster detects that a disk for storing stream data of real equipment under the source cluster is in fault according to a backup calling request of a user, and the backup calling request is used for appointing the stream data of the real equipment to be called; and the return module is used for calling the stream data of the real equipment from the local disk under the current cluster according to the calling request and returning the stream data to the source cluster so that the source cluster returns the stream data of the real equipment to the user.
In a third aspect, the present application provides an electronic device comprising: a processor, and a memory communicatively coupled to the processor; the memory stores computer-executable instructions; the processor executes computer-executable instructions stored in the memory to implement the method of any one of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for performing the method of any of the first aspects by a processor.
The stream data backup method, the stream data backup device, the electronic equipment and the storage medium provided by the application receive the backup task initiated by the user to the target equipment in the current cluster; if the target equipment is virtual equipment, searching real equipment corresponding to the target equipment according to a mapping relation, and establishing a real-time streaming session between the current cluster and a source cluster where the real equipment corresponding to the target equipment is located; and acquiring stream data acquired by the real equipment corresponding to the target equipment through the real-time stream transmission session, and backing up the stream data in the current cluster. According to the scheme, the streaming data backup is respectively carried out through the multiple clusters, and the backup streaming data among the clusters are completely independent, so that the reliability of the streaming data backup is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is an application scenario schematic diagram of a streaming data backup method according to an embodiment of the present application;
fig. 2 is a flow chart of a streaming data backup method according to a first embodiment of the present application;
FIG. 3 is an example of a cloning device provided by an embodiment of the present application;
Fig. 4 is an example of setting up a real-time streaming session according to an embodiment of the present application;
FIG. 5 is an example of performing backup tasks provided by an embodiment of the present application;
fig. 6 is a diagram illustrating a structure of a stream data backup device according to a second embodiment of the present application;
Fig. 7 is a device block diagram of a streaming data backup device according to a third embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
First, the terms involved are explained:
Pull stream address: pulling a designated address of the existing live content on the server;
Real-time streaming protocol: network transport protocols in standard packet formats for delivering audio and video over the internet.
Fig. 1 is a schematic view of an application scenario of a streaming data backup method according to an embodiment of the present application, and is exemplified by combining the illustrated scenario: the user initiates a backup task to the current cluster at any time according to actual demands, the current cluster establishes a real-time streaming session with the source cluster according to the backup task, real-time streaming data recorded by real equipment of the source cluster is transmitted to the current cluster for backup through the session, meanwhile, the real-time streaming data recorded by the real equipment of the source cluster is also backed up in the source cluster, and when the backup of the source cluster is lost, the user can acquire backup data from the current cluster.
The technical scheme of the present application and the technical scheme of the present application will be described in detail with specific examples. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. In describing the present application, the terms should be construed broadly in the art unless explicitly stated and limited otherwise. Embodiments of the present application will be described below with reference to the accompanying drawings.
Example 1
Fig. 2 is a flow chart of a streaming data backup method according to a first embodiment of the present application, where the method includes the following steps:
S201, receiving a backup task initiated by a user to target equipment in a current cluster;
S202, if the target equipment is virtual equipment, searching real equipment corresponding to the target equipment according to a mapping relation, and establishing a real-time streaming session between the current cluster and a source cluster where the real equipment corresponding to the target equipment is located;
S203, acquiring stream data acquired by the real equipment corresponding to the target equipment through the real-time stream transmission session, and backing up the stream data in the current cluster.
As an example, the execution subject of this embodiment may be a stream data backup apparatus, the implementation of which is various. For example, the program may be software, or a medium storing a related computer program, such as a usb disk; or the apparatus may be a physical device, such as a chip, a smart terminal, a computer, a server, etc., integrated with or having an associated computer program installed thereon.
In one example, S101 is further preceded by: receiving a cloning task sent by a platform, wherein the cloning task is sent by the platform according to a cloning request of a user, and the cloning request comprises real equipment under a source cluster designated by the user and the current cluster for backup; and adding virtual equipment corresponding to the real equipment under the current cluster according to the cloning task, and storing the mapping relation between the real camera and the virtual equipment.
In combination with the scenario example, cloned virtual devices are added and a mapping relationship between the virtual devices and the real devices is established before backup is performed. And when the backup task is executed, executing the stream data backup of the corresponding real device according to the virtual device and the mapping relation.
As an implementation, as shown in fig. 3, fig. 3 is an example of a cloning device. Reporting information of real equipment included in a cloning request of a user to a platform, generating a cloning task by the platform according to the cloning request and the reported information, and sending the cloning task to a current cluster, wherein the current cluster adds virtual equipment corresponding to the real equipment according to the real equipment information included in the cloning task. The backup flow of the virtual equipment is consistent with that of the real equipment, and the operation codes of the corresponding real equipment can be multiplexed by adding the virtual equipment.
As another implementation manner, only the corresponding virtual device needs to be added according to the real device specified by the user, and the user considers that the unnecessary real device can not initiate the cloning task, so that flexible backup is realized.
Based on the above embodiment, the cloned virtual device is added for stream data backup, so that multiplexing of resources can be realized, and resources are saved.
Further, in order to improve the success rate of executing the cloning task, in an example, adding, according to the cloning task, a virtual device corresponding to the real device under the current cluster includes: according to the cloning task, performing equipment verification on the real equipment in a source cluster; and if the verification is passed, adding the virtual equipment corresponding to the real equipment under the current cluster.
As an implementation manner, the clone request of the user includes the real devices of the source cluster, and in practical application, there may be an abnormal situation of the clone request due to irregular operation of the user, for example, the clone request includes real device information that cannot find the corresponding real devices in the source cluster. Therefore, when executing cloning task, by verifying information of real device, adding error virtual device can be avoided, problem can be found early, and error in executing stream data backup can be avoided.
In combination with a scenario example, the real device has the condition of updating iteration, and when a certain real device is removed or replaced, the real device information contained in the user request cannot be found.
Based on the above embodiment, by verifying the real device, erroneous cloning can be avoided, thereby improving the effectiveness of data backup.
In one example, S202 includes: sending a pull stream address acquisition request to the source cluster; receiving a pull stream address of the real equipment returned by the source cluster; the source cluster acquires a request according to the streaming address, and extracts streaming data of real equipment corresponding to the target equipment; and establishing a real-time streaming session between source clusters of the real equipment corresponding to the target equipment in the current cluster based on a real-time streaming protocol according to the streaming address of the real equipment.
As one way of implementation, fig. 4 is an example of setting up a real-time streaming session, as shown in fig. 4. And establishing a pull stream address acquisition request according to the information of the real equipment in the backup task. The source cluster extracts the pull stream address from the stream data of the real device, and returns the pull stream address to the current cluster. The current cluster establishes a real-time streaming session based on the pull stream address and the source cluster. The real-time streaming session is used to transmit real-time streaming data of the real device.
Based on the above embodiment, by establishing the real-time streaming session, real-time streaming data can be transmitted in real time, and video streaming data of real equipment can be sent to the current cluster for backup at the first time, so that the security of the streaming data is improved.
In one example, the backup task includes a backup period; s203 includes: in the backup period, receiving stream data sent by the real device corresponding to the target device through the real-time stream transmission session; and storing the received streaming data of the real equipment in a local disk under the current cluster until the backup period is over, and disconnecting the real-time streaming session.
As one way of implementation, the user may specify a backup period, for example, for a monitored video, a recorded video of a daytime period in which the traffic is large is more important, and the daytime period is taken as the backup period. In the backup period, stream data of the real device is sent to the current cluster in real time, and in the non-backup period, the real-time stream transmission session is closed, and stream data of the real device is not sent to the current cluster.
Based on the above embodiments, by designating the backup period, the period for executing the backup task can be flexibly selected according to the specific needs of the user.
As illustrated in fig. 5, fig. 5 is an example of performing a backup task. The current cluster starts a backup task, a request is obtained to a source cluster in a pulling way, the source cluster extracts a pulling address from stream data of real equipment, the pulling address is returned to the current cluster, the current cluster establishes a real-time stream transmission session according to the pulling address and the source cluster, the source cluster sends a real-time stream to the current cluster through the real-time stream transmission session, the current cluster receives the real-time stream and stores the real-time stream in a local disk until the backup time is over, and the real-time stream transmission session is closed.
In one example, the streaming data backup method further comprises: receiving a call request sent by the source cluster, wherein the call request is sent when the source cluster detects that a disk for storing stream data of real equipment under the source cluster fails according to a backup call request of a user, and the backup call request is used for specifying the stream data of the real equipment to be called; and according to the call request, the stream data of the real equipment is called from the local disk under the current cluster and returned to the source cluster, so that the source cluster returns the stream data of the real equipment to the user.
In combination with the scenario example, when the disk under the source cluster can work normally, the backup data used by the user is called from the disk under the source cluster, and when the disk under the source cluster is damaged and cannot work normally, the backup data used by the user is called from the current cluster. It will be appreciated that it is relatively quick to obtain backup data of the streaming data of the source cluster from the disks under the source cluster.
Based on the above embodiment, the source cluster and the disk of the current cluster are completely independent, and when the disk of the source cluster cannot be used, the disk of the current cluster can work normally, so that the security of backup stream data is improved.
In the streaming data backup method provided by the embodiment, a backup task initiated by a user to a target device under a current cluster is received; if the target equipment is virtual equipment, searching real equipment corresponding to the target equipment according to a mapping relation, and establishing a real-time streaming session between the current cluster and a source cluster where the real equipment corresponding to the target equipment is located; and acquiring stream data acquired by the real equipment corresponding to the target equipment through the real-time stream transmission session, and backing up the stream data in the current cluster. According to the scheme, the streaming data backup is respectively carried out through the multiple clusters, and the backup streaming data among the clusters are completely independent, so that the reliability of the streaming data backup is improved.
Example two
Fig. 6 is a schematic structural diagram of a stream data backup device according to a second embodiment of the present application, as shown in fig. 6, where the stream data backup device includes:
A receiving module 61, configured to receive a backup task initiated by a user to a target device under a current cluster;
The establishing module 62 is configured to, if the target device is a virtual device, find a real device corresponding to the target device according to a mapping relationship, and establish a real-time streaming session between the current cluster and a source cluster where the real device corresponding to the target device is located;
and the backup module 63 is used for acquiring the streaming data acquired by the real equipment corresponding to the target equipment through the real-time streaming session and backing up the streaming data in the current cluster.
In one example, the streaming data backup apparatus further includes: the cloning module 64 is configured to receive a cloning task sent by a platform, where the cloning task is sent by the platform according to a cloning request of a user, where the cloning request includes a real device under a source cluster specified by the user and the current cluster used for backup; and the cloning module 64 is further configured to add a virtual device corresponding to the real device under the current cluster according to the cloning task, and store a mapping relationship between the real camera and the virtual device.
In connection with the scenario example, cloning module 64 adds cloned virtual devices and establishes a mapping relationship of virtual devices and real devices prior to performing a backup. And when the backup task is executed, executing the stream data backup of the corresponding real device according to the virtual device and the mapping relation.
As an implementation, as shown in fig. 3, fig. 3 is an example of a cloning device. Reporting information of real equipment included in a cloning request of a user to a platform, generating a cloning task by the platform according to the cloning request and the reported information, and sending the cloning task to a current cluster, wherein the current cluster adds virtual equipment corresponding to the real equipment according to the real equipment information included in the cloning task. The backup flow of the virtual equipment is consistent with that of the real equipment, and the operation codes of the corresponding real equipment can be multiplexed by adding the virtual equipment.
As another implementation manner, only the corresponding virtual device needs to be added according to the real device specified by the user, and the user considers that the unnecessary real device can not initiate the cloning task, so that flexible backup is realized.
Based on the above embodiment, the cloned virtual device is added for stream data backup, so that multiplexing of resources can be realized, and resources are saved.
Further, to increase the success rate of cloning task execution, in one example, the cloning module 64 is specifically configured to perform device verification on the real device in the source cluster according to the cloning task; the cloning module 64 is specifically further configured to add a virtual device corresponding to the real device under the current cluster if the verification is passed.
As one implementation, the cloning request of the user comprises the real equipment of the source cluster, and the cloning request is applied in practice
In the above, there may be an abnormal situation of the clone request due to irregular user operation, for example, the real device information included in the clone request 5 cannot find the corresponding real device in the source cluster. Thus, in performing the cloning task,
By verifying the information of the real device, the addition of the wrong virtual device can be avoided, problems can be found early, and errors can be avoided when stream data backup is performed.
In combination with a scenario example, the real device has the condition of updating iteration, and when a certain real device is removed or replaced, the real device information contained in the user request cannot be found.
0 Based on the above embodiment, by verifying the real device, erroneous cloning can be avoided, thereby improving the effectiveness of data backup.
In one example, the establishing module 62 is specifically configured to send a pull stream address obtaining request to the source cluster; the establishing module 62 is specifically further configured to receive a pull stream address of the real device returned by the source cluster; wherein the said
The stream pulling address is extracted from stream data of the real device 5 corresponding to the target device according to the stream pulling address acquisition request by the source cluster; the establishing module 62 is specifically configured to base on real time according to the pull stream address of the real device
And a streaming transmission protocol establishes a real-time streaming transmission session between source clusters of the real devices corresponding to the target devices in the current cluster.
As one way of implementation, fig. 4 is an example of setting up a real-time streaming session, as shown in fig. 4. According to
Information of real equipment in the backup task establishes a pull stream address acquisition request. The source cluster extracts the pull stream address from the stream data of the real device, and returns the pull stream address to the current cluster. Establishing real-time by current cluster according to pull stream address and source cluster
Streaming conversations. The real-time streaming session is used to transmit real-time streaming data of the real device.
Based on the above embodiment, by establishing the real-time streaming session, real-time streaming data can be transmitted in real time, and video streaming data of real equipment can be sent to the current cluster for backup at the first time, so that the security of the streaming data is improved.
In one example, the backup task includes a backup period; the backup module 63 is specifically configured to receive, during the backup period 5, streaming data sent by the real device corresponding to the target device through the real-time streaming session; preparation method
And the copy module 63 is specifically further configured to save the received streaming data of the real device on a local disk under the current cluster, until the backup period is over, and disconnect the real-time streaming session.
As one way of implementation, the user may specify a backup period, for example, for a monitored video,
The video recorded during the daytime when the people flow is large is more important, and the daytime is taken as a backup period. In the backup period, the stream data of the real 0 device is sent to the current cluster in real time, and in the non-backup period, the real-time stream transmission session is closed, and the stream data of the real device is not sent to the current cluster.
Based on the above embodiments, by designating the backup period, the period for executing the backup task can be flexibly selected according to the specific needs of the user.
As illustrated in fig. 5, fig. 5 is an example of performing a backup task. The current cluster starts a backup task, a request is obtained to a source cluster in a pulling way, the source cluster extracts a pulling address from stream data of real equipment, the pulling address is returned to the current cluster, the current cluster establishes a real-time stream transmission session according to the pulling address and the source cluster, the source cluster sends a real-time stream to the current cluster through the real-time stream transmission session, the current cluster receives the real-time stream and stores the real-time stream in a local disk until the backup time is over, and the real-time stream transmission session is closed.
In one example, the streaming data backup apparatus further includes: the system comprises a source cluster, a calling module and a calling module, wherein the source cluster is used for receiving a calling request sent by the source cluster, the calling request is sent when the source cluster detects that a disk for storing stream data of real equipment under the source cluster is in fault according to a backup calling request of a user, and the backup calling request is used for appointing the stream data of the real equipment to be called; and the return module is used for calling the stream data of the real equipment from the local disk under the current cluster according to the calling request and returning the stream data to the source cluster so that the source cluster returns the stream data of the real equipment to the user.
In combination with the scenario example, when the disk under the source cluster can work normally, the backup data used by the user is called from the disk under the source cluster, and when the disk under the source cluster is damaged and cannot work normally, the backup data used by the user is called from the current cluster. It will be appreciated that it is relatively quick to obtain backup data of the streaming data of the source cluster from the disks under the source cluster.
Based on the above embodiment, the source cluster and the disk of the current cluster are completely independent, and when the disk of the source cluster cannot be used, the disk of the current cluster can work normally, so that the security of backup stream data is improved.
In the stream data backup device provided by the embodiment, a receiving module is used for receiving a backup task initiated by a user to a target device in a current cluster; the establishing module is used for searching real equipment corresponding to the target equipment according to the mapping relation if the target equipment is virtual equipment, and establishing a real-time streaming session between the current cluster and a source cluster where the real equipment corresponding to the target equipment is located; and the backup module is used for acquiring the streaming data acquired by the real equipment corresponding to the target equipment through the real-time streaming session and backing up the streaming data in the current cluster. According to the scheme, the streaming data backup is respectively carried out through the multiple clusters, and the backup streaming data among the clusters are completely independent, so that the reliability of the streaming data backup is improved.
Example III
Fig. 7 is a block diagram of an apparatus, which may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, etc., for a streaming data backup apparatus according to an exemplary embodiment.
The apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the apparatus 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phonebook data, messages, pictures, videos, and the like. The Memory 804 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random-Access Memory (SRAM), electrically erasable programmable Read-Only Memory (EEPROM), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk.
The power supply component 806 provides power to the various components of the device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen between the device 800 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) CRYSTAL DISPLAY and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 800 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
Input/output interface 812 provides an interface between processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the apparatus 800. For example, the sensor assembly 814 may detect an on/off state of the device 800, a relative positioning of the components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, an orientation or acceleration/deceleration of the device 800, and a change in temperature of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a photosensor, such as a complementary metal oxide semiconductor (Complementary Metal Oxide Semiconductor, CMOS) image sensor or Charge-coupled Device (CCD), for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the apparatus 800 and other devices, either in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, a second generation mobile communication technology (2 nd-Generation Communication Technology, 2G for short), a third generation mobile communication technology (3 rd-Generation Communication Technology, 3G for short), a fourth generation mobile communication technology (4 th-Generation Communication Technology, 4G for short), or a fifth generation mobile communication technology (5 th-Generation Communication Technology, 5G for short), or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the Communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on radio frequency identification (Radio Frequency Identification, RFID) technology, infrared data Association (IrDA) technology, ultra Wide Band (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application-specific integrated circuits (ASICs), digital signal processors (DIGITAL SIGNAL processes, DSPs), digital signal processing devices (DIGITAL SIGNAL Process devices, DSPDs), programmable logic devices (Programmable Logic Device, PLDs), field programmable gate arrays (Field Programmable GATE ARRAY, FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of apparatus 800 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (Random Access Memory, RAM for short), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Example IV
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application, as shown in fig. 8, where the electronic device includes:
A processor 291, the electronic device further comprising a memory 292; a communication interface (Communication Interface) 293 and bus 294 may also be included. The processor 291, the memory 292, and the communication interface 293 may communicate with each other via the bus 294. Communication interface 293 may be used for information transfer. The processor 291 may call logic instructions in the memory 292 to perform the methods of the above-described embodiments.
Further, the logic instructions in memory 292 described above may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product.
The memory 292 is a computer readable storage medium, and may be used to store a software program, a computer executable program, and program instructions/modules corresponding to the methods in the embodiments of the present application. The processor 291 executes functional applications and data processing by running software programs, instructions and modules stored in the memory 292, i.e., implements the methods of the method embodiments described above.
Memory 292 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the terminal device, etc. Further, memory 292 may include high-speed random access memory, and may also include non-volatile memory.
Embodiments of the present application provide a non-transitory computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, are configured to implement a method as described in the previous embodiments.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (14)

1. A streaming data backup method, comprising:
receiving a backup task initiated by a user to target equipment in a current cluster;
If the target equipment is virtual equipment, searching real equipment corresponding to the target equipment according to a mapping relation, and establishing a real-time streaming session between the current cluster and a source cluster where the real equipment corresponding to the target equipment is located;
And acquiring stream data acquired by the real equipment corresponding to the target equipment through the real-time stream transmission session, and backing up the stream data in the current cluster.
2. The method of claim 1, wherein prior to receiving the backup task initiated by the user for the target device in the current cluster, further comprising:
receiving a cloning task sent by a platform, wherein the cloning task is sent by the platform according to a cloning request of a user, and the cloning request comprises real equipment under a source cluster designated by the user and the current cluster for backup;
And adding virtual equipment corresponding to the real equipment under the current cluster according to the cloning task, and storing the mapping relation between the real camera and the virtual equipment.
3. The method according to claim 2, wherein adding the virtual device corresponding to the real device under the current cluster according to the cloning task includes:
According to the cloning task, performing equipment verification on the real equipment in a source cluster;
And if the verification is passed, adding the virtual equipment corresponding to the real equipment under the current cluster.
4. The method of claim 1, wherein the establishing a real-time streaming session between the current cluster and a source cluster in which a real device corresponding to the target device is located comprises:
sending a pull stream address acquisition request to the source cluster;
receiving a pull stream address of the real equipment returned by the source cluster; the source cluster acquires a request according to the streaming address, and extracts streaming data of real equipment corresponding to the target equipment;
And establishing a real-time streaming session between source clusters of the real equipment corresponding to the target equipment in the current cluster based on a real-time streaming protocol according to the streaming address of the real equipment.
5. The method of claim 1, wherein the backup task comprises a backup period; the step of obtaining the streaming data collected by the real device corresponding to the target device through the real-time streaming session and backing up the streaming data in the current cluster includes:
In the backup period, receiving stream data sent by the real device corresponding to the target device through the real-time stream transmission session;
and storing the received streaming data of the real equipment in a local disk under the current cluster until the backup period is over, and disconnecting the real-time streaming session.
6. The method according to any one of claims 1-5, further comprising:
receiving a call request sent by the source cluster, wherein the call request is sent when the source cluster detects that a disk for storing stream data of real equipment under the source cluster fails according to a backup call request of a user, and the backup call request is used for specifying the stream data of the real equipment to be called;
and according to the call request, the stream data of the real equipment is called from the local disk under the current cluster and returned to the source cluster, so that the source cluster returns the stream data of the real equipment to the user.
7. A streaming data backup apparatus, comprising:
the receiving module is used for receiving a backup task initiated by a user to target equipment in the current cluster;
The establishing module is used for searching real equipment corresponding to the target equipment according to the mapping relation if the target equipment is virtual equipment, and establishing a real-time streaming session between the current cluster and a source cluster where the real equipment corresponding to the target equipment is located;
And the backup module is used for acquiring the streaming data acquired by the real equipment corresponding to the target equipment through the real-time streaming session and backing up the streaming data in the current cluster.
8. The apparatus of claim 7, wherein the apparatus further comprises:
The cloning module is used for receiving a cloning task sent by a platform, wherein the cloning task is sent by the platform according to a cloning request of a user, and the cloning request comprises real equipment under a source cluster designated by the user and the current cluster for backup;
And the cloning module is further used for adding virtual equipment corresponding to the real equipment under the current cluster according to the cloning task and storing the mapping relation between the real camera and the virtual equipment.
9. The apparatus of claim 8, wherein the device comprises a plurality of sensors,
The cloning module is specifically configured to perform device verification on the real device in the source cluster according to the cloning task;
And the cloning module is specifically further configured to add a virtual device corresponding to the real device under the current cluster if the verification is passed.
10. The apparatus of claim 7, wherein the device comprises a plurality of sensors,
The establishing module is specifically configured to send a pull stream address acquisition request to the source cluster;
the establishing module is specifically configured to receive a pull stream address of the real device returned by the source cluster; the source cluster acquires a request according to the streaming address, and extracts streaming data of real equipment corresponding to the target equipment;
the establishing module is specifically further configured to establish a real-time streaming session between source clusters of the real device corresponding to the target device in the current cluster based on a real-time streaming protocol according to the pull stream address of the real device.
11. The apparatus of claim 7, wherein the backup task comprises a backup period;
The backup module is specifically configured to receive, during the backup period, stream data sent by the real device corresponding to the target device through the real-time streaming session;
And the backup module is specifically further configured to store the received stream data of the real device in a local disk under the current cluster, and disconnect the real-time streaming session until the backup period is over.
12. The apparatus according to any one of claims 7-11, wherein the apparatus further comprises:
The system comprises a source cluster, a calling module and a calling module, wherein the source cluster is used for receiving a calling request sent by the source cluster, the calling request is sent when the source cluster detects that a disk for storing stream data of real equipment under the source cluster is in fault according to a backup calling request of a user, and the backup calling request is used for appointing the stream data of the real equipment to be called;
and the return module is used for calling the stream data of the real equipment from the local disk under the current cluster according to the calling request and returning the stream data to the source cluster so that the source cluster returns the stream data of the real equipment to the user.
13. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
The memory stores computer-executable instructions;
The processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 1-6.
14. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1-6.
CN202211625795.6A 2022-12-16 2022-12-16 Stream data backup method and device, electronic equipment and storage medium Pending CN118210651A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211625795.6A CN118210651A (en) 2022-12-16 2022-12-16 Stream data backup method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211625795.6A CN118210651A (en) 2022-12-16 2022-12-16 Stream data backup method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118210651A true CN118210651A (en) 2024-06-18

Family

ID=91449201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211625795.6A Pending CN118210651A (en) 2022-12-16 2022-12-16 Stream data backup method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118210651A (en)

Similar Documents

Publication Publication Date Title
CN106488335B (en) Live-broadcast control method and device
CN106713127B (en) Method and device for acquiring and processing instant chat records
US20120171998A1 (en) Method and apparatus for performing lost mode in a mobile device
CN106598488B (en) Distributed data read method and device
US11523146B2 (en) Live broadcast method and apparatus, electronic device, and storage medium
CN112583896B (en) Session management method, session management device, electronic equipment, session management server and storage medium
CN111262941B (en) Method for reconnecting cloud server and electronic equipment
CN110489244B (en) Information processing method, system, apparatus and computer readable storage medium
RU2670096C2 (en) Method and device for ending video communication
CN106412481B (en) Reminding method, device and terminal based on VoLTE video calling
CN104780256A (en) Address book management method and device and intelligent terminal
CN110865823B (en) Pre-installation application control method, pre-installation application control device and storage medium
CN109245992B (en) Request processing method and device, electronic equipment and storage medium
CN110908814A (en) Message processing method and device, electronic equipment and storage medium
CN107483605B (en) File downloading method and device and storage medium
CN109426575B (en) Call service processing method and device
CN107395724B (en) Network request method and device
CN118210651A (en) Stream data backup method and device, electronic equipment and storage medium
CN112887799B (en) Image resource sharing method, device and medium
CN107295493A (en) Information uploading method, device, terminal and computer-readable recording medium
CN107181669A (en) The display methods and equipment of the transmission time of chat messages
CN112181453A (en) Firmware upgrading method and device and storage medium
CN105516456B (en) Communication event transfer method, device and computer readable storage medium
CN114531493B (en) Request processing method and device, electronic equipment and storage medium
CN110311968B (en) Method and device for loading file in streaming mode and intelligent equipment

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