Distributed video monitoring flow conversion method and flow conversion node selection method
By selecting the appropriate transfer node in the distributed video surveillance system and providing transfer services to other nodes, the problems of insufficient streaming capabilities of existing IPC devices and out-of-synchronous video stitching are solved, and high-quality multi-screen synchronous playback is achieved.
Patent Information
- Application Number
- CN202411834813.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-18
AI Technical Summary
Existing IPC devices have limitations in streaming push capabilities, and they cannot push high-quality video streams to multiple decoding ends at the same time. Due to factors such as network delay and transmission error, video stitching between multiple decoding ends is prone to abnormal synchronization.
By selecting a transfer node that meets the preset conditions in the distributed video surveillance system to provide transfer services to other nodes, the transfer node will pull the IPC video stream and add timestamp information according to the IPC video stream address sent by the management node, thereby obtaining the target video stream feedback to other nodes.
The number of stream push paths of distributed video surveillance systems has been expanded, the influence of factors such as network delay is reduced, the quality of video surveillance transfer is improved, and the ability to synchronous splicing and playback of multi-screens in global monitoring scenarios is realized.
Smart Images

Figure CN119854449A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video surveillance technology, and in particular to a distributed video surveillance flow switching method and a flow switching node selection method. Background Art
[0002] IP Camera (IPC) is a monitoring device that transmits video based on network protocols. It integrates image acquisition, video encoding, network transmission and other functions, and can directly send video signals to remote devices (such as monitoring servers, users' mobile phones or computers, etc.) through the network, thereby realizing remote video monitoring.
[0003] In video surveillance systems, multiple decoding ends are often required to simultaneously receive and display video streams from the same IPC to achieve global monitoring. However, existing IPC devices have limitations in streaming capabilities and cannot push high-quality video streams to multiple decoding ends at the same time. In addition, due to factors such as network delays and transmission errors, video splicing between multiple decoding ends is prone to asynchrony. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a distributed video surveillance flow redirection method and a flow redirection node selection method, as well as a flow redirection node, a management node, and a computer-readable storage medium and a computer program product for implementing the distributed video surveillance flow redirection method or the flow redirection node selection method. The technical solution is as follows:
[0005] In the first aspect, the present application provides a distributed video surveillance flow redirection method, which is applied to the flow redirection node of the distributed video surveillance system, the flow redirection node is a node that meets preset conditions selected by the management node from the encoding and decoding nodes, and the method includes: receiving the IPC video stream address of the network camera sent by the management node; responding to the video stream request sent by other nodes, pulling the IPC video stream according to the IPC video address; the other nodes are nodes other than the management node, the flow redirection node and the encoding node, including at least one of the following categories: a decoding node, a client; adding timestamp information to the IPC video stream to obtain a target video stream; sending the target video stream to other nodes.
[0006] The method provided in the embodiment of the present application is to select a suitable node that meets the preset conditions from the system as a flow transfer node, provide flow transfer services for other nodes, expand the number of flow push channels of the distributed video surveillance system, reduce the impact of factors such as network delay, improve the quality of video surveillance flow transfer, and realize multi-screen synchronous splicing and playback in global monitoring scenarios.
[0007] As an optional implementation in an embodiment of the present application, other nodes include multiple decoding nodes; the IPC video stream address includes the original stream address; the video stream request is a multicast stream request; the target video stream is a multicast stream; in response to the video stream request sent by other nodes, the IPC video stream is pulled according to the IPC video address, including: in response to the multicast stream request sent by multiple decoding nodes, the original video stream is pulled according to the original stream address; accordingly, timestamp information is added to the IPC video stream to obtain the target video stream, including: adding timestamp information to the original video stream; converting the original video stream with the timestamp information into a multicast stream to send the multicast stream to multiple decoding nodes.
[0008] In the above optional implementation, the transfer node copies the multicast stream and forwards it to multiple required decoding nodes at one time, so that it can be determined that these multiple decoding nodes receive the multicast stream almost at the same time, avoiding the delay difference that may be caused by sending one by one. Thus, a large amount of network resources are saved; in addition, when transferring the multicast stream, timestamp information is added to the video frame, so that multiple decoding nodes can synchronize and play based on the timestamp information, realize high-quality global monitoring, and improve the user's viewing experience.
[0009] As an optional implementation in an embodiment of the present application, other nodes include different clients; the IPC video stream address includes the original stream address; the video stream request is a sub-stream request; the target video stream is a sub-stream; in response to the video stream request sent by other nodes, the IPC video stream is pulled according to the IPC video address, including: in response to the sub-stream request sent by different clients, the original video stream is pulled according to the original stream address; accordingly, timestamp information is added to the IPC video stream to obtain the target video stream, including: adding timestamp information to the original video stream; encoding the original video stream with the timestamp information to obtain the sub-stream, so as to send the sub-stream to different clients.
[0010] The above optional implementation mode encodes the sub-code stream by the traffic transfer node, and provides an adapted sub-code stream for the client with limited decoding capability, thereby meeting the requirement that clients with different decoding capabilities in the distributed video surveillance system can smoothly watch video surveillance, so that clients with different decoding capabilities can smoothly decode and play video surveillance.
[0011] As an optional implementation in the embodiment of the present application, in response to adding timestamp information to the IPC video stream to obtain the target video stream, it also includes: detecting the current network status and determining the target transmission protocol based on the current network status; sending the target video stream to other nodes according to the target transmission protocol.
[0012] The above optional implementation method dynamically selects the most suitable transmission protocol according to the current network status, reduces video screen distortion and freeze caused by network fluctuations, improves video transmission quality, and also improves the user experience.
[0013] In a second aspect, the present application provides a method for selecting a traffic transfer node, which is applied to a management node of a distributed video surveillance system, comprising:
[0014] Collect node parameter information of codec nodes in distributed video surveillance system;
[0015] In response to an IPC add request for configuring an IPC video stream address, determining a flow switching node that meets a preset condition from a codec node according to the node parameter information;
[0016] The IPC video stream address is sent to the traffic redirection node so that the traffic redirection node provides traffic redirection services to other nodes; wherein the other nodes are nodes other than the management node, the traffic redirection node and the encoding node, including at least one of the following categories: a decoding node, a client.
[0017] In a third aspect, the present application provides a traffic transfer node, including:
[0018] A receiving module is used to receive the IPC video stream address of the network camera sent by the management node;
[0019] The video pulling module is used to pull the IPC video stream according to the IPC video address in response to the video stream request sent by other nodes; the other nodes are nodes other than the management node, the flow transfer node and the encoding node, including at least one of the following categories: a decoding node, a client;
[0020] A timestamp information adding module is used to add timestamp information to the IPC video stream to obtain a target video stream;
[0021] The sending module is used to send the target video stream to other nodes so that other nodes can decode the target video stream and play it synchronously.
[0022] In a fourth aspect, the present application provides a management node, including:
[0023] A collection module, used to collect node parameter information of codec nodes in a distributed video surveillance system;
[0024] A determination module, for responding to an IPC add request for configuring an IPC video stream address, and determining a flow switching node that meets a preset condition from a codec node according to node parameter information;
[0025] The sending module is used to send the IPC video stream address to the traffic redirection node so that the traffic redirection node provides traffic redirection services to other nodes; wherein the other nodes are nodes other than the management node, the traffic redirection node and the encoding node, including at least one of the following categories: a decoding node, a client.
[0026] In a fifth aspect, the present application provides a computer-readable storage medium, comprising: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the distributed video surveillance traffic diversion method as described in the first aspect or any one of its optional embodiments, or the method for selecting a traffic diversion node as described in the second aspect.
[0027] In a sixth aspect, the present application provides a computer program product, comprising: the computer program product comprises a computer program, and when the computer program runs on a computer, the computer implements the distributed video surveillance traffic diversion method as described in the first aspect or any one of its optional embodiments, or the traffic diversion node selection method as described in the second aspect.
[0028] In a seventh aspect, the present application provides a distributed video surveillance system, comprising: an IPC, a traffic switching node as described in the third aspect, and a management node as described in the fourth aspect, as well as a codec node and a client.
[0029] Compared with the prior art, the technical solution provided by the embodiments of the present application has the following advantages:
[0030] The disclosed embodiments provide a distributed video surveillance streaming method and a streaming node selection method, wherein the distributed video surveillance streaming method no longer relies on IPC to implement streaming, but selects a suitable node that meets preset conditions from the system as a streaming node to provide streaming services for other nodes. The streaming node will respond to video stream requests sent by other nodes, pull the IPC video stream and add timestamp information according to the IPC video stream address sent by the management node, thereby obtaining a target video stream that is fed back to other nodes, so that the other nodes can decode and play synchronously, thereby expanding the streaming channels of the distributed video surveillance system, reducing the influence of factors such as network delay, improving the quality of video surveillance streaming, and being able to achieve multi-screen synchronous splicing and playback in a global monitoring scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0033] Figure 1 A schematic diagram of the architecture of a distributed video surveillance system provided in an embodiment of the present application;
[0034] Figure 2 A schematic diagram of a flow chart of a distributed video surveillance flow conversion method according to an embodiment of the present application;
[0035] Figure 3 A flowchart of a method for selecting a flow switching node provided in an embodiment of the present application;
[0036] Figure 4 An interactive schematic diagram of a method for determining a flow transfer node provided in an embodiment of the present application;
[0037] Figure 5 An interactive diagram of a traffic transfer service provided in an embodiment of the present application Figure 1 ;
[0038] Figure 6 An interactive diagram of a traffic transfer service provided in an embodiment of the present application Figure 2 ;
[0039] Figure 7 An interactive diagram of a traffic transfer service provided in an embodiment of the present application Figure 3 ;
[0040] Figure 8 A schematic diagram of the structure of a flow switching node provided in an embodiment of the present application;
[0041] Fig. 9 A schematic diagram of the structure of a management node provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0043] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.
[0044] A method for transferring a distributed video surveillance provided in the embodiments of the present application can be implemented by an electronic device, and the electronic device includes but is not limited to a personal computer, a laptop computer, a tablet computer, a smart phone, etc. The operating system of the electronic device may include Android, a mobile operating system (iOS) developed by Apple, an operating system (Windows) developed by Microsoft Corporation of the United States, etc., and the embodiments of the present application are not limited to this. The electronic device can be operated alone to implement the present application, or it can be connected to a network and implement the present application through interactive operations with other computer devices in the network. Among them, the network in which the electronic device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN) network, etc.
[0045] It should be noted that the protection scope of the distributed video surveillance flow conversion method described in the embodiment of the present application is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present application are included in the protection scope of the present application.
[0046] At present, in video surveillance systems, multiple decoding ends are often required to simultaneously receive and display video streams from the same IPC to achieve global monitoring. However, existing IPC devices have limitations in streaming capabilities and cannot simultaneously push high-quality video streams to multiple decoding ends. In addition, due to factors such as network delays and transmission errors, video splicing between multiple decoding ends is prone to synchronization problems. In addition, with the popularity of mobile devices, more and more users want to watch video surveillance on devices with limited decoding capabilities such as tablets (Pads). However, existing IPC devices mainly support high-resolution main streams, which makes it impossible for these devices to decode and display videos smoothly. In addition, most existing IPC devices only support the User Datagram Protocol (UDP) transmission method. In a weak network environment, the UDP transmission method may have problems such as packet loss and disorder, resulting in video artifacts and freezes.
[0047] To solve the above problems, one solution in the related art is to add additional hardware devices as transfer nodes in the network. For example, a dedicated video transcoding server or media gateway is used to transcode the high-resolution main stream into a low-resolution sub-stream, or to convert between different transmission protocols. Another solution is to directly modify the source IPC firmware to improve the performance and functions of the IPC. Some manufacturers provide customized IPC firmware, allowing users to modify the functions and performance of the IPC according to their needs. For example, by upgrading the firmware to increase the number of push streams, or add support for different resolutions and transmission protocols.
[0048] However, the first solution requires additional hardware investment to add physical transfer nodes, and requires the transformation and maintenance of the existing system or even the redesign of the network architecture, which increases the complexity and maintenance difficulty of the system. The second solution, which requires professional technical support and a long development cycle to modify the IPC firmware, may increase the cost of the IPC, and different IPCs and decoding clients may also have compatibility issues.
[0049] Therefore, the present application proposes a distributed video surveillance system that solves the problems of limited number of existing IPC streaming channels, difficulty in splicing and synchronizing multiple decoding terminals, decoding capabilities limited by adapting clients, and poor transmission stability in weak network environments, as well as a method for selecting a flow redirection node and a flow redirection method of a distributed video surveillance system.
[0050] like Figure 1 As shown, Figure 1 A schematic diagram of the architecture of a distributed video surveillance system provided in an embodiment of the present application, a flow redirection method for distributed video surveillance is executed under the illustrated architecture. The distributed video surveillance system includes physical devices such as IPC, codec nodes (including encoding nodes and decoding nodes), clients and management nodes, which are interconnected through a distributed network. The IPC is used to collect monitoring images to generate original video streams and transmit video signals through a distributed network. The encoding node is used to encode the original video stream. The decoding node is used to decode the video stream. The management node is used to manage all nodes of the distributed video surveillance system, and to select a flow redirection node that meets preset conditions from the codec node. The flow redirection node is used to implement a flow redirection method for distributed video surveillance provided in an embodiment of the present application.
[0051] like Figure 2 As shown, Figure 2 A flow chart of a distributed video surveillance flow redirection method provided in an embodiment of the present application. The method is applied to a flow redirection node of a distributed video surveillance system. The flow redirection node is a node that meets preset conditions selected by the management node from the codec node. The flow redirection node selection process can be referred to Figure 3 The process shown is described in the corresponding position later. Here, the flow transfer node has been selected and the process of executing the flow transfer method of distributed video monitoring mainly includes the following steps S201 to S204:
[0052] S201. The flow transfer node receives the IPC video stream address sent by the management node.
[0053] The IPC video stream address may be a Uniform Resource Locator (URL).
[0054] The transfer node is selected to provide IPC video stream transfer services to other nodes, thereby sharing the streaming pressure of a single IPC. Compared with a single IPC, the number of concurrent streaming increases, allowing more nodes to receive the IPC video stream.
[0055] S202: The traffic switching node responds to the video stream request sent by other nodes and pulls the IPC video stream according to the IPC video address.
[0056] Among them, other nodes are nodes other than management nodes, traffic transfer nodes and encoding nodes in the distributed video surveillance system, including at least one of the following categories: decoding nodes, clients. It can be understood that, for example Figure 1 There are multiple decoding nodes and clients in the distributed video surveillance system shown, and they can all request video streams from the flow switching node. Accordingly, the flow switching node can receive video stream requests sent by at least one decoding node or at least one client. In response to these video stream requests, the flow switching node pulls the IPC video stream according to the IPC video stream address sent by the management node, and adds timestamp information to the pulled IPC video stream to obtain the target video stream.
[0057] S203: Add timestamp information to the IPC video stream to obtain a target video stream.
[0058] The introduction of timestamp information enables at least one decoding node, or at least one client, to synchronously splice and play videos based on a unified time reference, thereby avoiding video asynchrony caused by network delays or processing speed differences.
[0059] S204: The traffic transfer node sends the target video stream to other nodes.
[0060] The transfer node sends the IPC video stream with timestamp information added as the target video stream to at least one decoding node or at least one client so that they can decode it after receiving it, and finally realize the synchronous playback of video surveillance and the seamless splicing and real-time synchronous display of multiple decoding terminals.
[0061] This application no longer relies on IPC to achieve streaming, but selects suitable nodes that meet preset conditions from the system as streaming nodes to provide streaming services for other nodes. The streaming node will respond to video stream requests sent by other nodes, and pull the IPC video stream and add timestamp information according to the IPC video stream address sent by the management node, so as to obtain the target video stream that is fed back to other nodes, so that other nodes can decode and play synchronously, which expands the number of streaming channels of distributed video surveillance systems, reduces the impact of factors such as network delays, improves the quality of video surveillance streaming, and can achieve multi-screen synchronous splicing and playback in global monitoring scenarios.
[0062] In some embodiments, the IPC video stream address includes an original stream address, a multicast stream address, and a substream address. The video stream request includes a multicast stream request and a substream request. The target video stream includes a multicast stream and a substream.
[0063] In a distributed video surveillance system, there is a demand for multiple decoding nodes to play synchronously. In step S202 (responding to the video stream request sent by other nodes, pulling the IPC video stream according to the IPC video address, and adding a timestamp to obtain the target video stream), the other nodes include multiple decoding nodes, the IPC video stream address includes the original video stream address, the video stream request is a multicast stream request, and the corresponding target video stream is a multicast stream. When executing step S202, if the other nodes are multiple decoding nodes, the video stream request is a multicast stream request, and in response to the multicast stream request sent by the multiple decoding nodes, the original video stream (i.e., IPC video stream) is first pulled according to the original stream address included in the IPC video address, and then step S203 is executed to add timestamp information to the original video stream, and then the original video stream with the timestamp information is converted into a multicast stream to send the multicast stream to multiple decoding nodes. The transfer node copies the multicast stream and forwards it to multiple decoding nodes in need at one time, so that it can be determined that the multiple decoding nodes receive the multicast stream almost at the same time, avoiding the delay difference that may be caused by sending one by one. This saves a lot of network resources; multicast stream. In addition, when converting the multicast stream, timestamp information is added to the video frame, so that multiple decoding nodes can be synchronized and played based on the timestamp information, achieving high-quality global monitoring and improving the user's viewing experience.
[0064] In a distributed video surveillance system, the decoding capabilities of each client are different. The decoding capabilities of some individual clients are valid, but these clients may have the need to watch video surveillance. To meet this need, in some embodiments of the present application, when executing step S202, if the other nodes are different clients, the video stream request is a sub-stream request, and in response to the sub-stream request sent by the different clients, the original video stream (i.e., the IPC video stream) is first pulled according to the original stream address included in the IPC video address, and then timestamp information is added to the original video stream when executing step S203, and then the original video stream with the timestamp information is encoded to obtain the sub-stream, so as to send the sub-stream to different clients.
[0065] Optionally, the sub-stream request includes at least one of the resolution parameter, frame rate parameter, and bit rate of the client. Taking the resolution parameter as an example, when executing step S203, the transfer node encodes the original video stream with timestamp information according to the resolution parameter to obtain the sub-stream corresponding to each client, which is adapted to the resolution difference of each client.
[0066] In the above embodiment, the sub-code stream is obtained by encoding the transfer node, and an adapted sub-code stream is provided for the client with limited decoding capability, thereby satisfying the requirement that clients with different decoding capabilities in the distributed video surveillance system can smoothly watch the video surveillance, so that clients with different decoding capabilities can smoothly decode and play the video surveillance. In addition, in the scenario where multiple clients view multiple surveillance images, the sub-code stream can be transferred to reduce the network bandwidth usage and reduce the high requirements for network bandwidth.
[0067] In some embodiments, after executing step S203, it also includes: detecting the current network state, and determining the target transmission protocol according to the current network state; and then returning the target video stream to other nodes requesting the video stream according to the target transmission protocol. When the current network state is good, the UDP transmission protocol is selected to reduce delay and ensure real-time performance; when the current network state is poor, the Transmission Control Protocol (TCP) transmission protocol is selected to ensure transmission stability.
[0068] Optionally, the current network status is analyzed by detecting parameters such as whether the network is connected, the network connection type, the network bandwidth, the network delay, and the network packet loss rate.
[0069] The above embodiment dynamically selects the most suitable transmission protocol according to the current network status, reduces video screen distortion and freeze caused by network fluctuations, improves video transmission quality, and also improves the user experience.
[0070] like Figure 3 As shown, Figure 3 A flow chart of a method for selecting a flow switching node provided in an embodiment of the present application, wherein the method is applied to Figure 1 The management node in the distributed video surveillance system shown in the figure comprises the following steps S301 to S303:
[0071] S301. A management node collects node parameter information of codec nodes in a distributed video surveillance system.
[0072] The encoding and decoding nodes include encoding nodes and decoding nodes, and the node parameter information includes but is not limited to IP value, CPU utilization, remaining memory and number of converted streams.
[0073] In the distributed video surveillance system, the codec nodes report their IP values, CPU utilization, remaining memory, and number of converted streams to the management node. After receiving the node parameter information reported by them, the management node queries the node parameter record of the corresponding node according to the IP value, and then updates it according to the node parameter information received this time, specifically updating the CPU utilization, remaining memory, and number of converted streams of each node.
[0074] S302: In response to an IPC add request for configuring an IPC video stream address, the management node determines a flow switching node that meets a preset condition from the codec nodes according to the node parameter information.
[0075] Among them, the IPC add request is an operation request from the user to add the IPC to the distributed video surveillance system, which is used to configure the video stream address of the IPC to the management node. The diverting node is selected after comprehensively weighting the IP value, CPU utilization, remaining memory and number of diverted paths of all codec nodes. The weight value corresponding to each parameter is not specifically limited in this application.
[0076] Optionally, the traffic redirection node meets the following preset conditions: the smallest IP value, the lowest CPU utilization, the largest remaining memory, and the least number of redirected traffic paths. It can be understood that the traffic redirection node is the node with the smallest IP value, the lowest CPU utilization, the largest remaining memory, and the least number of redirected traffic paths among the codec nodes. The traffic redirection node selected by the management node from the codec nodes has the characteristics of abundant resources and low load.
[0077] In some embodiments, after the management node determines the flow transfer node from the codec node according to the node parameter information, the parameter value of the number of flow transfer paths corresponding to the flow transfer node in the node parameter record is increased by one.
[0078] In some embodiments, after selecting the traffic redirection node, the management node may generate a multicast stream address and a sub-stream address corresponding to the IPC. The multicast stream address and the sub-stream address will be used in subsequent processes.
[0079] S303: Send the IPC video stream address to the traffic redirection node, so that the traffic redirection node provides traffic redirection service to other nodes.
[0080] The management node notifies the traffic redirection node that it is the traffic redirection node of the IPC, and sends the video stream address of the IPC to the traffic redirection node. Other nodes are nodes other than the management node, the traffic redirection node and the encoding node, including at least one of the following categories: decoding node, client.
[0081] When other nodes (such as decoding nodes or clients) need IPC video streams, they request the stream switching node to switch streams; the stream switching node starts the stream switching service to pull the video stream from IPC, and returns it to other nodes after processing.
[0082] The above embodiment selects a low-load and abundantly resourced redirection node from the existing codec nodes of the distributed video surveillance system without adding additional physical redirection nodes, thereby sharing the push pressure of a single source IPC, increasing the number of concurrent pushes that a single source IPC can support, and improving the overall performance and scalability of the system.
[0083] like Figure 4 As shown, Figure 4 The interactive schematic diagram of a method for determining a traffic transfer node provided in an embodiment of the present application, the method involves a codec node and a management node in a distributed monitoring system, and the main steps include the following S401 to S405:
[0084] S401. The codec node reports node parameter information to the management node.
[0085] Node parameter information includes but is not limited to IP value, CPU utilization, remaining memory, and number of transferred flows.
[0086] S402: The management node queries and updates the node parameter records of each codec node.
[0087] For any codec node, the management node queries the corresponding node parameter record according to its IP value, and then updates the CPU utilization, remaining memory, and number of converted streams.
[0088] S403: The management node receives an IPC add request for configuring an IPC video stream address.
[0089] S404: The management node responds to the IPC add request and determines a traffic switching node that meets a preset condition from the codec nodes according to the node parameter information.
[0090] The node that meets the preset conditions (smallest IP value, lowest CPU utilization, largest remaining memory and least number of diverted paths) among the encoding and decoding nodes is selected as the diverting node.
[0091] Optionally, after the flow transfer node is determined, the parameter value of the number of transferred flow paths corresponding to the flow transfer node in the node parameter record is increased by one.
[0092] S405: The management node sends the IPC video stream address to the flow switching node.
[0093] If the transfer node is Figure 4 The encoding node shown in FIG. 1 notifies the encoding node that it is the IPC flow switching node and notifies the encoding node of the IPC video stream address so that the encoding node provides flow switching services to other nodes.
[0094] The above embodiment selects a suitable one from the existing codec nodes in the distributed video surveillance system as a flow switching node to provide flow switching services, thereby solving the problem of limited number of single IPC streaming paths and increasing the number of concurrent streaming of the distributed video surveillance system, so that more decoding nodes or clients can receive the IPC video stream at the same time, thereby improving the overall performance and scalability of the system.
[0095] like Figure 5 As shown, Figure 5An interactive diagram of a traffic transfer service provided in an embodiment of the present application Figure 1 , which is executed after the above step S405, the realization of the traffic switching service involves the decoding node, the management node and the traffic switching node. The realization process of the traffic switching service includes the following steps S501 to S505:
[0096] S501: A management node receives a synchronous playback request.
[0097] The synchronous playback request is configured by the user and indicates a request to splice IPC video streams on multiple decoding nodes and play them synchronously.
[0098] S502: The management node sends a window opening instruction to multiple decoding nodes in response to the synchronous playback request.
[0099] The windowing instruction includes the multicast stream address of the IPC. In the display control field, "windowing" is to create or open one or more windows on the display screen connected to the decoding node to display different information or pictures. These windows can be freely adjusted in size, position and transparency so that users can view and manage multiple information sources as needed.
[0100] S503: In response to the windowing instruction, the plurality of decoding nodes send a multicast stream request to the flow switching node.
[0101] S504: The traffic conversion node responds to the multicast stream request, pulls the original video stream according to the original stream address, adds timestamp information to the original video stream, converts it into a multicast stream, and sends it to multiple decoding nodes.
[0102] S505 , multiple decoding nodes receive the multicast stream, decode it, and splice and play it according to the timestamp information.
[0103] The above embodiment adds timestamp information to the video frame when converting the multicast stream, so that multiple decoding nodes can perform synchronous splicing and playback based on the timestamp information, achieve high-quality global monitoring, and improve the user's viewing experience.
[0104] like Figure 6 As shown, Figure 6 An interactive diagram of a traffic transfer service provided in an embodiment of the present application Figure 2 , which is executed after the above step S405, the realization of the traffic transfer service involves the client, the management node and the traffic transfer node. The realization process of the traffic transfer service includes the following steps S601 to S605:
[0105] S601: A management node receives a playback request from a client.
[0106] The client playback request is a user-configured request indicating a request to display the video surveillance image on the client. The client includes but is not limited to: a personal computer (PC), a tablet computer, and a smart phone.
[0107] S602: The management node sends a window opening instruction to the client in response to the client's playback request.
[0108] The windowing instruction includes the sub-stream address of the IPC.
[0109] S603: The client sends a sub-stream request to the stream switching node in response to the window opening instruction.
[0110] S604: The stream conversion node responds to the sub-stream request, pulls the original video stream according to the original stream address, adds timestamp information to the original video stream, encodes it into a sub-stream, and sends it to the client.
[0111] S605: The client receives the sub-stream, decodes it and plays it according to the timestamp information.
[0112] Traditional IPC supports high resolution, but the decoding capabilities of clients are different. The rotor bitstream can provide adaptive sub-bitstreams for clients with limited decoding capabilities, so that clients with different decoding capabilities can play smoothly, expanding the scope of application of the system and improving system compatibility.
[0113] like Figure 7 As shown, Figure 7 An interactive diagram of a traffic transfer service provided in an embodiment of the present application Figure 3 , which is executed after the above step S405, the realization of the traffic switching service involves a decoding node (or a client, not shown in the figure), a management node and a traffic switching node. The realization process of the traffic switching service includes the following steps S701 to S706:
[0114] S701: A management node receives a play instruction sent by a user.
[0115] The play instruction instructs to play the IPC video on the decoding node.
[0116] S702: The management node sends a window opening instruction to the decoding node in response to the playing instruction.
[0117] S703: The decoding node sends a video stream request to the streaming node in response to the window opening instruction.
[0118] S704: The stream switching node responds to the video stream request, pulls the original video stream according to the original stream address, and adds timestamp information to the original video stream to obtain the target video stream.
[0119] S705: The traffic switching node detects the current network state and determines the target transmission protocol according to the current network state; and sends the target video stream to the decoding node according to the target transmission protocol.
[0120] For example, the traffic transfer node detects that the current network status is not good, and determines to send the target video stream to the decoding node according to the TCP transmission protocol, thereby solving the problem of poor video transmission quality in a weak network environment.
[0121] During the video stream transmission process, the flow switching node can detect the network status in real time and adjust the transmission protocol to improve the stability of the distributed video surveillance system.
[0122] S706: The decoding node receives the target video stream, decodes it, and plays it according to the timestamp information.
[0123] The decoding node receives the TCP stream.
[0124] The decoding node in the above embodiment selects a suitable transmission protocol according to the current network status, which can reduce the delay when the network is good and ensure stable transmission when the network is poor, thereby reducing video screen distortion, freezes and other phenomena caused by network fluctuations and improving the quality of video transmission.
[0125] like Figure 8 As shown, Figure 8 A schematic diagram of a flow switching node provided in an embodiment of the present application, the flow switching node includes:
[0126] Receiving module 801, used for receiving the IPC video stream address of the network camera sent by the management node;
[0127] The video pulling module 802 is used to pull the IPC video stream according to the IPC video address in response to the video stream request sent by other nodes; the other nodes are nodes other than the management node, the flow transfer node and the encoding node, including at least one of any one of the following categories: a decoding node, a client;
[0128] A timestamp information adding module 803, used for adding timestamp information to the IPC video stream to obtain a target video stream;
[0129] The sending module 804 is used to send the target video stream to the other nodes, so that the other nodes decode the target video stream and play it synchronously.
[0130] As an optional implementation scheme provided by an embodiment of the present application, other nodes include multiple decoding nodes; the IPC video stream address includes the original stream address; the video stream request is a multicast stream request; the target video stream is a multicast stream; the video pulling module 802 is specifically used to respond to the multicast stream requests sent by multiple decoding nodes, and pull the original video stream according to the original stream address. Correspondingly, the timestamp information adding module 803 is specifically used to add timestamp information to the original video stream; the original video stream with the timestamp information added is converted into a multicast stream to send the multicast stream to multiple decoding nodes.
[0131] As an optional implementation scheme provided in an embodiment of the present application, other nodes include different clients; the IPC video stream address includes the original stream address; the video stream request is a sub-stream request; the target video stream is a sub-stream; the video pulling module 802 is specifically used to respond to the sub-stream requests sent by different clients, and pull the original video stream according to the original stream address. Correspondingly, the timestamp information adding module 803 is specifically used to add timestamp information to the original video stream; the original video stream with the timestamp information added is encoded to obtain the sub-stream, so as to send the sub-stream to different clients.
[0132] As an optional implementation provided in an embodiment of the present application, the video pulling module 802 is also used to detect the current network status and determine the target transmission protocol according to the current network status; the sending module 804 is also used to send the target video stream to other nodes according to the target transmission protocol.
[0133] like Fig. 9 As shown, Fig. 9 A schematic diagram of the structure of a management node provided in an embodiment of the present application, the management node includes:
[0134] The collecting module 901 is used to collect node parameter information of the encoding and decoding nodes in the distributed video surveillance system;
[0135] A determination module 902 is used to determine a flow switching node that meets a preset condition from the codec nodes according to the node parameter information in response to an IPC add request for configuring an IPC video stream address;
[0136] The sending module 903 is used to send the IPC video stream address to the traffic redirection node so that the traffic redirection node provides traffic redirection services to other nodes; wherein the other nodes are nodes other than the management node, the traffic redirection node and the encoding node, including at least one of any one of the following categories: a decoding node, a client.
[0137] For the specific definition of the diversion node or management node, please refer to the definition of the diversion method of distributed video surveillance in the above text, which will not be repeated here. Each module in the above-mentioned diversion node or management node can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0138] Those skilled in the art will understand that Figure 8 The structure shown in or 9 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the traffic redirection node or management node to which the scheme of the present application is applied. The specific traffic redirection node or management node may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0139] In one embodiment, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the steps of the distributed video surveillance traffic redirection method of each embodiment of the present application described in this specification, or implements the steps of the traffic redirection node selection method of each embodiment of the present application described in this specification.
[0140] In one embodiment, the present application provides a computer program product, including: the computer program product includes a computer program, and when the computer program is run on a computer, the computer implements the steps of the distributed video surveillance traffic redirection method of each embodiment of the present application described in this specification, or implements the steps of the traffic redirection node selection method of each embodiment of the present application described in this specification.
[0141] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media that include computer-usable program code.
[0142] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0143] In the present application, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0144] In this application, memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0145] In this application, computer-readable media includes permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0146] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0147] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A distributed video surveillance streaming method, characterized in that: A flow switching node applied to a distributed video surveillance system, wherein the flow switching node is a node that meets a preset condition and is selected by a management node from a codec node. The method comprises: Receive the network camera IPC video stream address sent by the management node; In response to a video stream request sent by other nodes, pull the IPC video stream according to the IPC video address; the other nodes are nodes other than the management node, the transfer node and the encoding node, including at least one of any one of the following categories: a decoding node, a client; Adding timestamp information to the IPC video stream to obtain a target video stream; The target video stream is sent to the other nodes.
2. The method according to claim 1, characterized in that The other nodes include a plurality of decoding nodes; the IPC video stream address includes an original stream address; the video stream request is a multicast stream request; The target video stream is a multicast stream; The step of responding to a video stream request sent by another node and pulling the IPC video stream according to the IPC video address comprises: In response to the multicast stream request sent by the plurality of decoding nodes, pulling the original video stream according to the original stream address; Correspondingly, the adding timestamp information to the IPC video stream to obtain the target video stream includes: Adding timestamp information to the original video stream; The original video stream to which the time stamp information is added is converted into a multicast stream, so as to send the multicast stream to the multiple decoding nodes.
3. The method according to claim 1, characterized in that The other nodes include different clients; the IPC video stream address includes the original stream address; the video stream request is a sub-stream request; The target video stream is a sub-stream; The step of responding to a video stream request sent by another node and pulling the IPC video stream according to the IPC video address comprises: In response to the sub-stream requests sent by the different clients, pull the original video stream according to the original stream address; Correspondingly, the adding timestamp information to the IPC video stream to obtain the target video stream includes: Adding timestamp information to the original video stream; The original video stream with the timestamp information added is encoded to obtain a sub-stream, so as to send the sub-stream to the different clients.
4. The method according to claim 1, characterized in that: After adding timestamp information to the IPC video stream to obtain the target video stream, the method further includes: Detecting a current network state, and determining a target transmission protocol according to the current network state; The target video stream is sent to the other nodes according to the target transmission protocol.
5. A method for selecting a flow transfer node, characterized in that: Management nodes used in distributed video surveillance systems include: Collecting node parameter information of codec nodes in the distributed video surveillance system; In response to an IPC add request for configuring an IPC video stream address, determining a flow switching node that meets a preset condition from the codec nodes according to the node parameter information; The IPC video stream address is sent to the traffic redirection node so that the traffic redirection node provides traffic redirection services to other nodes; wherein the other nodes are nodes other than the management node, the traffic redirection node and the encoding node, including at least one of any one of the following categories: a decoding node, a client.
6. A flow transfer node, characterized in that: include: A receiving module is used to receive the IPC video stream address of the network camera sent by the management node; A video pulling module, used to respond to a video stream request sent by other nodes and pull the IPC video stream according to the IPC video address; The other nodes are nodes other than the management node, the traffic switching node and the encoding node, and include at least one of the following categories: a decoding node and a client; A timestamp information adding module, used for adding timestamp information to the IPC video stream to obtain a target video stream; The sending module is used to send the target video stream to the other nodes, so that the other nodes decode the target video stream and play it synchronously.
7. A management node, characterized in that: include: A collection module, used to collect node parameter information of codec nodes in a distributed video surveillance system; A determination module, configured to respond to an IPC add request for configuring an IPC video stream address, and determine a flow switching node that meets a preset condition from the codec node according to the node parameter information; A sending module is used to send the IPC video stream address to the traffic redirection node so that the traffic redirection node provides traffic redirection services to other nodes; wherein the other nodes are nodes other than the management node, the traffic redirection node and the encoding node, including at least one of any one of the following categories: a decoding node, a client.
8. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the distributed video surveillance flow redirection method as described in any one of claims 1 to 4, or the flow redirection node selection method as described in claim 5 is implemented.
9. A computer program product, characterized in that include: The computer program product includes a computer program, and when the computer program is executed on a computer, the computer implements the distributed video surveillance traffic redirection method as described in any one of claims 1 to 4, or the traffic redirection node selection method as described in claim 5.
10. A distributed video surveillance system, characterized in that: include: IPC, the traffic switching node as claimed in claim 6 and the management node as claimed in claim 7, as well as a coding and decoding node and a client.