A system and method for managing video streams
Patent Information
- Application Number
- CN202110854907.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-28
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2041-07-28
AI Technical Summary
这种方式不能达到及时接管的效果,造成视频流的大量丢失
[0016]本申请实施例所提供的技术方案,流转发设备,与指定存储节点和候选存储节点连接,用于在接收到视频流后进行复制,并将复制码流发送至候选存储节点;候选存储节点,用于接收复制码流,并用于若检测到复制码流中断,则启动接收并存储视频流,并将视频流发送至流转发设备;流转发设备,还用于将由候选存储节点发出的视频流转发至指定存储节点;指定存储节点,用于在未向流转发设备发送视频流,且接收到流转发设备发出的复制码流时,停止对视频流进行存储。本方案实现了存储节点的秒级故障接管,有效减少了存储发生时设备切换时间,进一步减少了故障期间视频流损失。
Smart Images

Figure CN115695713B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video surveillance technology, and in particular to a video stream management system and method. Background Technology
[0002] Current technology incorporates storage node clustering in video surveillance systems. When a storage node fails, the cluster detects the failure via keep-alive information and then selects a suitable new storage node to take over. This detection process takes approximately 30 to 90 seconds. This method fails to achieve timely takeover, resulting in significant video stream loss. Summary of the Invention
[0003] This application provides a video stream management system and method that can achieve second-level fault takeover of storage nodes through video stream replication and distribution, effectively reducing the switching time of storage nodes when a fault occurs, further reducing video stream loss during the fault, and ensuring the integrity of the video stream.
[0004] In a first aspect, embodiments of this application provide a video stream management system, the video stream storage system comprising: a video source device, a stream forwarding device, a designated storage node, and at least one candidate storage node;
[0005] The video source device is connected to the designated storage node and is used to generate a video stream;
[0006] The designated storage node is connected to the stream forwarding device and is used to store the video stream and forward the video stream to the stream forwarding device;
[0007] The stream forwarding device is connected to the designated storage node and the candidate storage node, and is used to copy the video stream after receiving it, and send the copied stream to the candidate storage node;
[0008] The candidate storage node is used to receive the copied bitstream, and if the copy bitstream is detected to be interrupted, to start receiving and storing the video stream, and send the video stream to the stream forwarding device for copying and forwarding the video stream.
[0009] The stream forwarding device is also used to forward the video stream sent by the candidate storage node to the designated storage node;
[0010] The designated storage node is configured to stop storing the video stream when it has not sent a video stream to the stream forwarding device and has received a copy of the bitstream from the stream forwarding device.
[0011] Secondly, embodiments of this application provide a video stream management method, which is executed using the video stream storage system described in any one of these embodiments. The method includes:
[0012] Generate a video stream from the video source device;
[0013] The video stream is stored at a designated storage node and then forwarded to a stream forwarding device.
[0014] The stream forwarding device copies the received video stream and sends the copied stream to the candidate storage node.
[0015] The candidate storage node receives the copied bitstream. If the copy bitstream is interrupted, the receiving and storage of the video stream is initiated, and the video stream is sent to the stream forwarding device for copying and forwarding.
[0016] The technical solution provided in this application embodiment includes a stream forwarding device connected to a designated storage node and a candidate storage node. This device copies the received video stream and sends the copied stream to the candidate storage node. The candidate storage node receives the copied stream and, if an interruption in the copied stream is detected, initiates receiving and storing the video stream, then sends the video stream to the stream forwarding device. The stream forwarding device also forwards the video stream from the candidate storage node to the designated storage node. The designated storage node stops storing the video stream if it does not send a video stream to the stream forwarding device but receives a copied stream from the stream forwarding device. This solution achieves second-level fault takeover of storage nodes, effectively reducing device switching time during storage failures and further reducing video stream loss during fault periods. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the structure of the video stream management system provided in Embodiment 1 of this application;
[0018] Figure 2 This is a schematic diagram illustrating the working status of the video stream management system provided in Embodiment 1 of the present invention.
[0019] Figure 3 This is a schematic diagram of the structure of the video stream management system provided in Embodiment 2 of the present invention;
[0020] Figure 4 This is a flowchart of a video stream management method provided in Embodiment 3 of the present invention. Detailed Implementation
[0021] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present application, not the entire structure.
[0022] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or systems depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. The process can be terminated when its operation is complete, but it may also have additional steps not included in the figures. The process may correspond to a system, function, procedure, subroutine, subroutine, etc.
[0023] Example 1
[0024] Figure 1 This is a schematic diagram of the structure of a video stream management system provided in Embodiment 1 of the present invention. This embodiment is a video stream management system that can be applied in video surveillance scenarios. The system includes: a video source device 110, a stream forwarding device 140, a designated storage node 120, and at least one candidate storage node 130.
[0025] like Figure 1 As shown, the video stream management system includes:
[0026] Video source device 110, connected to the designated storage node, is used to generate a video stream;
[0027] A designated storage node 120 is connected to the stream forwarding device for storing video streams and forwarding the video streams to the stream forwarding device;
[0028] The stream forwarding device 140 is connected to the designated storage node and the candidate storage node, and is used to copy the video stream after receiving it, and send the copied stream to the candidate storage node;
[0029] Candidate storage node 130 is used to receive the copied bitstream and, if the copy bitstream is detected to be interrupted, to start receiving and storing the video stream and send the video stream to the stream forwarding device for copying and forwarding the video stream.
[0030] The stream forwarding device 140 is also used to forward the video stream sent by the candidate storage node to the designated storage node;
[0031] A designated storage node 120 is configured to stop storing the video stream when it has not sent a video stream to the stream forwarding device and has received a copy of the bitstream from the stream forwarding device.
[0032] The video source device can be a camera, specifically a visible light imaging device, an infrared imaging device, or other imaging devices. The video source device can be used to capture video, obtain video data, and transmit it to a storage node via a network. Specifically, the transmission method can be as a video stream.
[0033] Video source devices can connect to designated storage nodes. These designated storage nodes and candidate storage nodes can form a storage node cluster. Storage nodes can be used to store video streams; they can be storage servers, hard drives of other network devices, or multiple storage nodes partitioned from a single physical storage device using virtual machines. The designated storage node can be the default storage node for the video stream or a storage node with higher priority, where priority is established based on storage attributes such as storage space, storage rate, or storage type.
[0034] The stream forwarding device is connected to the designated storage node and the candidate storage node. For example, it can be a switch or a router. The stream forwarding device can copy the received video stream, for example, using multicast, specifically packet forwarding. Multicast enables one-to-many network connections, improving video stream transmission efficiency and reducing the possibility of backbone network congestion. The stream forwarding device can then send the copied stream to the candidate storage node.
[0035] A storage node cluster typically includes multiple storage nodes; therefore, a video stream management system can include multiple candidate storage nodes. Candidate storage nodes receive copied streams sent by the stream forwarding device. Simultaneously, when a candidate storage node detects an interruption in the copied stream, it can determine that the designated storage node has failed, take over the designated storage node's work, start receiving and storing the video stream generated by the video source device, and send the video stream to the stream forwarding device. The interruption of the copied stream can be caused by various situations that prevent normal operation, such as the designated storage node crashing or excessive network connection latency.
[0036] When a candidate storage node detects an interruption in the copied stream, the stream forwarding device can forward the video stream sent by the candidate storage node to the designated storage node. When the designated storage node does not send a video stream to the stream forwarding device but receives a copied stream from the stream forwarding device, the designated storage node can stop storing the video stream. It should be noted that when the designated storage node is not functioning properly, it may not receive the copied stream from the stream forwarding device, and it will also be unable to stop storing the video stream. However, this situation does not affect the storage of the video stream; only the malfunctioning designated storage node cannot receive the copied stream.
[0037] In this scheme, the video stream replication and distribution can be performed via multicast. For example, when using multicast, the stream forwarding device can be a switch, which can be used to distribute the multicast stream. Candidate storage nodes can receive the multicast stream based on a pre-determined multicast address, thus enabling the reception of the video stream. Since candidate storage nodes and designated storage nodes can be configured in a cluster, a multicast address can also be reserved in the designated storage node. This allows a candidate storage node to receive the front-end video stream after the designated storage node fails, and when multicasting via a switch, the designated storage node can still normally receive the multicast stream from that multicast address.
[0038] In one specific embodiment Figure 2 This is a schematic diagram illustrating the operational status of the video stream management system provided in this embodiment. Figure 2 As shown, the video source device is a surveillance camera, and the designated storage node is... Figure 2 Storage node 1, the stream forwarding device is a switch. Figure 2 Storage nodes 2 and 3 are both candidate storage nodes.
[0039] After the surveillance camera generates a video stream, it sends the stream to storage node 1 for storage. Upon receiving the video stream, storage node 1 can forward it to the switch for replication. Storage nodes 1, 2, and 3 all receive the replicated stream; however, storage nodes 2 and 3 only receive the replicated stream but do not store it. Storage nodes 2 and 3 only cache one second of the video stream data in their memory. If storage node 1 fails and stops sending the video stream to the switch, storage node 2 will immediately detect the interruption and start receiving the video stream from the surveillance camera while continuing to send the video stream to the switch. The switch replicates the video stream. If storage node 1 believes it is not malfunctioning but receives the replicated stream without sending its own video stream to the switch, it will immediately stop its own storage to prevent a split-brain scenario.
[0040] The technical solution provided in this application embodiment includes a stream forwarding device connected to a designated storage node and a candidate storage node. This device copies the received video stream and sends the copied stream to the candidate storage node. The candidate storage node receives the copied stream and, if an interruption in the copied stream is detected, initiates receiving and storing the video stream, then sends the video stream to the stream forwarding device. The stream forwarding device also forwards the video stream from the candidate storage node to the designated storage node. The designated storage node stops storing the video stream if it does not send a video stream to the stream forwarding device but receives a copied stream from the stream forwarding device. This solution achieves second-level fault takeover of storage nodes, effectively reducing device switching time during faults and further reducing video stream loss during fault periods.
[0041] Example 2
[0042] This embodiment is a preferred embodiment provided based on the above embodiments. Figure 3 This is a schematic diagram of the video stream management system provided in Embodiment 2 of the present invention, as shown below. Figure 3 As shown, the original video source device 110, stream forwarding device 140, designated storage node 120 and at least one candidate storage node 130 remain unchanged, and a new master control terminal 150 is added.
[0043] The candidate storage node is further configured to determine the updated storage sequence and send the storage sequence to the master control terminal; wherein, the storage sequence is used to determine the failure takeover order of the storage nodes;
[0044] The master control terminal 150 is used to determine the takeover relationship between the specified storage node and the candidate storage node based on the storage sequence.
[0045] In this scheme, candidate storage nodes can also determine an updated storage sequence and send the storage sequence to the master control terminal. The storage sequence can be used to determine the failover order of storage nodes. The updated storage sequence can be a sorting of currently available candidate storage nodes when a candidate storage node detects an interruption in the replicated bitstream and needs to switch storage nodes. The storage sequence can be sorted according to the distance between each available candidate storage node and a specified storage node; it can also be sorted according to the storage space size of the available candidate storage nodes; or it can be sorted according to the storage rate of the available candidate storage nodes.
[0046] The master control terminal can determine the takeover relationship between a designated storage node and candidate storage nodes based on the storage sequence. The master control terminal can select the highest-priority candidate storage node to take over the work of the designated storage node according to the failure takeover order of the candidate storage nodes, thereby determining the takeover relationship between the designated storage node and the candidate storage nodes, i.e., determining whether the candidate storage node is the candidate storage node to be taken over. The master control terminal can be deployed within the designated storage node or independently outside the designated storage node.
[0047] This solution can select the best candidate storage node from the available candidate storage nodes to take over the work of the designated storage node according to the actual needs of the video surveillance environment. It can make the candidate storage node as compatible as possible with the entire video stream management system, thereby meeting the system requirements and providing the optimal storage node switching solution.
[0048] In one feasible embodiment, optionally, the candidate storage node is further configured to determine storage records and send the storage records to the master control terminal;
[0049] The main control terminal is also used to determine the valid storage information of the video stream based on the storage records.
[0050] Understandably, the candidate storage node can determine its storage records and send these records to the master control unit. The storage records can mark the storage progress of the current candidate storage node to understand the storage status of the video stream. The master control unit can determine valid storage information of the video stream, as well as information about lost video streams, based on the storage records. The valid storage information can be stored normal video stream information.
[0051] The solution in this embodiment can determine the storage progress of candidate storage nodes in a timely manner, making it easier to query and statistically analyze the effective storage information of video streams, thus achieving more convenient and clear video stream management.
[0052] In this scheme, optionally, the master control terminal is located on the designated storage node;
[0053] If the specified storage node fails, a new master controller will be determined according to the pre-determined master controller election rules.
[0054] When a designated storage node fails to function properly due to a storage node crash, the primary controller of that storage node can determine a new primary controller based on pre-defined primary controller election rules. The new primary controller can be deployed among the candidate storage nodes to be taken over, or it can be deployed independently between the designated storage node and the candidate storage nodes to be taken over. The primary controller election rules can be consistent with the fault takeover order, or they can be determined based on other relationships such as proximity, response speed, and permission scope. For example, there could be a primary controller covering the entire storage node cluster, which would then serve as the new primary controller or determine the new primary controller.
[0055] This solution allows for simultaneous switching of the master control unit when switching storage nodes, preventing control errors and ensuring the stability of the video stream management system.
[0056] In another feasible embodiment, optionally, the master control terminal is located on the designated storage node;
[0057] If the designated storage node experiences a brief outage and fails to recover before a new master controller is determined according to the master controller election rules, the new master controller will receive the valid storage records of the video stream and the updated storage sequence.
[0058] When a designated storage node malfunctions due to a brief outage, and fails to recover before a new master is determined according to the master election rules, the video stream management system will have the new master receive the valid storage records of the video stream, and then continue receiving the updated storage sequence.
[0059] In this embodiment, optionally, the master control terminal is located on the designated storage node;
[0060] If the designated storage node experiences a brief outage, and recovers before a new master controller is determined according to the master controller election rules, then the master controller will receive the valid storage records of the video stream and the updated storage sequence.
[0061] When a designated storage node malfunctions due to a brief outage of its server, but has recovered before a new master is determined according to the master election rules, the video stream management system will continue to receive valid storage records of the video stream from the master, and then continue to receive the updated storage sequence.
[0062] When the reason why the specified storage node cannot work properly is that the server of the specified storage node is intermittently disconnected, regardless of whether the specified storage node is restored before a new master control terminal is determined, the solution in this embodiment can ensure the timely reception of the video stream and minimize the loss of the video stream.
[0063] In this scheme, optionally, the designated storage node and the at least one candidate storage node constitute a storage node cluster.
[0064] Forming a storage node cluster allows for timely switching to other storage nodes when a specified storage node fails, preventing the loss of video streams and improving the stability of the video stream management system, thereby enhancing the stability of the video surveillance system.
[0065] In one specific embodiment, continue to refer to Figure 2 Storage nodes 1, 2, and 3 form a simple storage node cluster. This cluster binds the storage path to the switch address, selecting storage node 1 as the storage node and establishing a fault takeover sequence: storage node 1, storage node 2, storage node 3. Storage node 1 begins storing data and simultaneously sends a video stream to the switch. Storage nodes 2 and 3 receive the copied stream and enter a state of receiving the copied stream but not storing it. During this time, storage nodes 2 and 3 cache one second of data in their server memory. If storage node 1 fails, storage node 2 detects the interruption of the copied stream, immediately initiates storage takeover, and after takeover, begins sending the video stream to the switch and notifies other storage nodes in the cluster to update the fault takeover sequence: storage node 2, storage node 3, storage node 1. If storage node 1 recovers from the fault, detects that it did not send a video stream to the switch and has received a copied stream, immediately stops the corresponding storage service and retrieves the current fault takeover sequence from the master control unit.
[0066] Storage node 1 has the following two failure scenarios:
[0067] Scenario 1: Storage node 1 crashes.
[0068] After storage node 1 fails, the replication stream stops. Storage node 2 immediately detects the interruption and takes over the storage, reporting the latest storage information to the master node. If storage node 1 is also the current master node, it waits for a new master node election before reporting its information. Upon receiving the latest report, the master node updates the storage records and fault takeover order, notifying the corresponding storage nodes in the takeover order. The video stream takeover operation is then complete. The time of video stream loss is approximately one second, calculated from the time it takes to renegotiate the video stream transmission with the front end.
[0069] Scenario 2: Storage node 1 experiences a brief network outage.
[0070] If storage node 1 experiences a network outage and its replication stream stops, storage node 2 immediately detects the interruption and begins taking over the storage path, reporting the latest storage information to the master controller. ① If storage node 1 is also the current master controller and fails to recover before the master controller election, it waits for the new master controller to be elected before reporting its storage information. Upon receiving the latest report, the new master controller updates the storage records and fault takeover sequence, and notifies the corresponding storage nodes in the takeover sequence. The video stream takeover operation is then complete. ② If storage node 1 is also the current master controller and recovers before the master controller election, it waits for the master controller to recover before reporting its storage information. If storage node 1 receives a replication stream from the corresponding node without sending its own video stream, it immediately stops its own storage and updates its storage records and fault takeover sequence according to the information reported by storage node 2. The video stream takeover operation is then complete. ③ If storage node 1 is not the master controller, storage node 2 immediately reports its storage information to the master controller, which then updates the storage records and takeover sequence. After storage node 1 recovers, it detects that it received a copied stream from the corresponding node even though it did not send its own video stream, and immediately stops its own storage. The video stream takeover operation is now complete. In the three scenarios above, the time of video stream loss is the time to renegotiate the outgoing stream with the front end, which is generally within 1 second.
[0071] The technical solution provided in this application embodiment includes a stream forwarding device connected to a designated storage node and a candidate storage node. This device copies the received video stream and sends the copied stream to the candidate storage node. The candidate storage node receives the copied stream and, if an interruption in the copied stream is detected, initiates receiving and storing the video stream, then sends the video stream to the stream forwarding device. The stream forwarding device also forwards the video stream from the candidate storage node to the designated storage node. The designated storage node stops storing the video stream if it does not send a video stream to the stream forwarding device but receives a copied stream from the stream forwarding device. This solution achieves second-level fault takeover of storage nodes, effectively reducing device switching time during faults and further reducing video stream loss during fault periods.
[0072] Example 3
[0073] Figure 4 This is a flowchart of a video stream management method provided in Embodiment 3 of the present invention. This method can be implemented by the video stream management system provided in this embodiment of the present invention. The method includes:
[0074] S210 generates a video stream from a video source device.
[0075] The video source device can be used to generate a video stream. It can be a camera, specifically a visible light imaging device, an infrared imaging device, or other imaging devices. The video source device can be used to capture video, obtain video data, and transmit it to a storage node via a network. Specifically, the transmission method can be as a video stream.
[0076] S220, the video stream is stored through a designated storage node and the video stream is forwarded to the stream forwarding device.
[0077] Video source devices can connect to designated storage nodes. These designated storage nodes and candidate storage nodes can form a storage node cluster. Storage nodes can be used to store video streams; they can be storage servers, hard drives of other network devices, or multiple storage nodes partitioned from a single physical storage device using virtual machines. The designated storage node can be the default storage node for the video stream or a storage node with higher priority, where priority is established based on storage attributes such as storage space, storage rate, or storage type.
[0078] S230, after receiving the video stream, the stream forwarding device copies the stream and sends the copied stream to the candidate storage node.
[0079] The stream forwarding device can copy the received video stream. The multicast can be packet forwarding, which enables one-to-many network connections, improving video stream transmission efficiency and reducing the possibility of backbone network congestion. The stream forwarding device can send the copied stream to the candidate storage node.
[0080] S240: Receive the copied bitstream through the candidate storage node. If an interruption in the copied bitstream is detected, start receiving and storing the video stream, and send the video stream to the stream forwarding device for copying and forwarding the video stream.
[0081] The candidate storage node is used to receive the copied bitstream sent by the stream forwarding device. Simultaneously, when the candidate storage node detects an interruption in the copied bitstream, it can determine that the designated storage node has failed and take over the work of the designated storage node, starting to receive and store the video stream generated by the video source device, and sending the video stream to the stream forwarding device. The interruption of the copied bitstream can be caused by various situations that prevent normal operation, such as the designated storage node crashing or excessive network connection latency.
[0082] In this solution, after performing the above steps, the following operations are also performed:
[0083] The video stream sent by the candidate storage node is forwarded to the designated storage node by the stream forwarding device; the designated storage node stops storing the video stream when it does not send a video stream to the stream forwarding device and receives a copy bitstream sent by the stream forwarding device.
[0084] When a candidate storage node detects an interruption in the replicated stream, the stream forwarding device can forward the video stream sent by the candidate storage node to the designated storage node. When the designated storage node does not send a video stream to the stream forwarding device but receives a replicated stream from the stream forwarding device, the designated storage node can stop storing the video stream. It should be noted that when the designated storage node is not functioning properly, it may not receive the replicated stream from the stream forwarding device, and it will also be unable to stop storing the video stream. However, this situation does not affect the storage and multicast of the video stream; only the malfunctioning designated storage node will be unable to receive the replicated stream.
[0085] In one feasible embodiment, the method may optionally further include:
[0086] The updated storage sequence is determined and sent to the master control terminal, which then determines the takeover relationship between the specified storage node and the candidate storage node based on the storage sequence; wherein, the storage sequence is used to determine the failure takeover order of the storage nodes.
[0087] In this scheme, candidate storage nodes can also determine an updated storage sequence and send the storage sequence to the master control terminal. The storage sequence can be used to determine the failover order of storage nodes. The updated storage sequence can be a sorting of currently available candidate storage nodes when a candidate storage node detects an interruption in the replicated bitstream and needs to switch storage nodes. The storage sequence can be sorted according to the distance between each available candidate storage node and a specified storage node; it can also be sorted according to the storage space size of the available candidate storage nodes; or it can be sorted according to the storage rate of the available candidate storage nodes.
[0088] The master control terminal can determine the takeover relationship between a designated storage node and candidate storage nodes based on the storage sequence. The master control terminal can select the highest-priority candidate storage node to take over the work of the designated storage node according to the failure takeover order of the candidate storage nodes, thereby determining the takeover relationship between the designated storage node and the candidate storage nodes, i.e., determining whether the candidate storage node is the candidate storage node to be taken over. The master control terminal can be deployed within the designated storage node or independently outside the designated storage node.
[0089] This solution can select the best candidate storage node from the available candidate storage nodes to take over the work of the designated storage node according to the actual needs of the video surveillance environment. It can make the candidate storage node as compatible as possible with the entire video stream management system, thereby meeting the system requirements and providing the optimal storage node switching solution.
[0090] In another feasible embodiment, optionally, the method further includes:
[0091] If the master control terminal is deployed on the designated storage node, and the designated storage node fails, a new master control terminal is determined according to the pre-determined master control terminal election rules.
[0092] If the master control terminal is located at the designated storage node, and the designated storage node experiences a brief outage, and the designated storage node fails to recover before a new master control terminal is determined according to the master control terminal election rules, then the new master control terminal will receive the valid storage records of the video stream and the updated storage sequence.
[0093] If the master control terminal is located at the designated storage node, and the designated storage node experiences a brief outage, and the designated storage node recovers before a new master control terminal is determined according to the master control terminal election rules, then the master control terminal receives the valid storage records of the video stream and receives the updated storage sequence.
[0094] When a designated storage node fails to function properly due to a storage node crash, the primary controller of that storage node can determine a new primary controller based on pre-defined primary controller election rules. The new primary controller can be deployed among the candidate storage nodes to be taken over, or it can be deployed independently between the designated storage node and the candidate storage nodes to be taken over. The primary controller election rules can be consistent with the fault takeover order, or they can be determined based on other relationships such as proximity, response speed, and permission scope. For example, there could be a primary controller covering the entire storage node cluster, which would then serve as the new primary controller or determine the new primary controller.
[0095] This solution allows for simultaneous switching of the master control unit when switching storage nodes, preventing control errors and ensuring the stability of the video stream management system.
[0096] When a designated storage node malfunctions due to a brief outage, and fails to recover before a new master is determined according to the master election rules, the video stream management system will have the new master receive the valid storage records of the video stream, and then continue receiving the updated storage sequence.
[0097] When a designated storage node malfunctions due to a brief outage of its server, but has recovered before a new master is determined according to the master election rules, the video stream management system will continue to receive valid storage records of the video stream from the master, and then continue to receive the updated storage sequence.
[0098] When the reason why the specified storage node cannot work properly is that the server of the specified storage node is intermittently disconnected, regardless of whether the specified storage node is restored before a new master control terminal is determined, the solution in this embodiment can ensure the timely reception of the video stream and minimize the loss of the video stream.
[0099] The technical solution provided in this application generates a video stream through a video source device; stores the video stream through a designated storage node and forwards the video stream to a stream forwarding device; the stream forwarding device copies the received video stream and sends the copied stream to the candidate storage node; the candidate storage node receives the copied stream, and if an interruption in the copied stream is detected, it starts receiving and storing the video stream and sends it to the stream forwarding device for video stream copying and forwarding. By managing the video stream copying and distribution through a video stream management system, second-level fault takeover of storage nodes is achieved, effectively reducing device switching time during faults and further reducing video stream loss during fault periods.
[0100] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A video stream management system, characterized in that, The video stream management system includes: a video source device, a stream forwarding device, a designated storage node, and at least one candidate storage node. The designated storage node and the at least one candidate storage node constitute a storage node cluster, and the storage node cluster is connected to the video source device. The video source device is connected to the designated storage node and is used to generate a video stream; The designated storage node is connected to the stream forwarding device and is used to store the video stream and forward the video stream to the stream forwarding device; The stream forwarding device is connected to the designated storage node and the candidate storage node, and is used to copy the video stream after receiving it, and send the copied stream to the candidate storage node; The candidate storage node is used to receive the copied bitstream and, if the copied bitstream is detected to be interrupted, to start receiving and storing the video stream and send the video stream to the stream forwarding device so that the stream forwarding device can copy and forward the video stream.
2. The system according to claim 1, characterized in that, The system also includes a main control terminal; The candidate storage node is further configured to determine the updated storage sequence and send the storage sequence to the master control terminal; wherein, the storage sequence is used to determine the failure takeover order of the storage nodes; The master control terminal is used to determine the takeover relationship between the specified storage node and the candidate storage node based on the storage sequence.
3. The system according to claim 2, characterized in that, The candidate storage node is also used to determine the storage record and send the storage record to the master control terminal; The main control terminal is also used to determine the valid storage information of the video stream based on the storage records; The main control unit is located on the designated storage node; If the specified storage node fails, a new master controller will be determined according to the pre-determined master controller election rules.
4. The system according to claim 2, characterized in that, The main control unit is located on the designated storage node; If the designated storage node experiences a brief outage and fails to recover before a new master controller is determined according to the master controller election rules, the new master controller will receive the valid storage records of the video stream and the updated storage sequence.
5. The system according to claim 2, characterized in that, The main control unit is located on the designated storage node; If the designated storage node experiences a brief outage, and recovers before a new master controller is determined according to the master controller election rules, then the master controller will receive the valid storage records of the video stream and the updated storage sequence.
6. The system according to claim 1, characterized in that: The stream forwarding device is also used to forward the video stream sent by the candidate storage node to the designated storage node; The designated storage node is configured to stop storing the video stream when it has not sent a video stream to the stream forwarding device and has received a copy of the bitstream from the stream forwarding device.
7. A method for managing video streams, characterized in that, The method is executed using a video stream management system as described in any one of claims 1-6, and the method includes: Generate a video stream from the video source device; The video stream is stored at a designated storage node and then forwarded to a stream forwarding device. The stream forwarding device copies the received video stream and sends the copied stream to the candidate storage node. The candidate storage node receives the copied bitstream. If the copy bitstream is interrupted, the receiving and storage of the video stream is initiated, and the video stream is sent to the stream forwarding device so that the stream forwarding device can copy and forward the video stream.
8. The method according to claim 7, characterized in that, The method further includes: The updated storage sequence is determined and sent to the master control terminal, which then determines the takeover relationship between the specified storage node and the candidate storage node based on the storage sequence; wherein, the storage sequence is used to determine the failure takeover order of the storage nodes.
9. The method according to claim 8, characterized in that, The method further includes: If the master control terminal is deployed on the designated storage node, and the designated storage node fails, a new master control terminal is determined according to the pre-determined master control terminal election rules. If the master control terminal is located at the designated storage node, and the designated storage node experiences a brief outage, and the designated storage node fails to recover before a new master control terminal is determined according to the master control terminal election rules, then the new master control terminal will receive the valid storage records of the video stream and the updated storage sequence. If the master control terminal is located at the designated storage node, and the designated storage node experiences a brief outage, and the designated storage node recovers before a new master control terminal is determined according to the master control terminal election rules, then the master control terminal receives the valid storage records of the video stream and receives the updated storage sequence.
Citation Information
Patent Citations
Video monitoring method, device and system, equipment and storage medium
CN111327584A
Video stream processing method and device, SDN controller and storage medium
CN111970497A