CN111970497B - Video stream processing method and device, SDN controller and storage medium - Google Patents

Video stream processing method and device, SDN controller and storage medium Download PDF

Info

Publication number
CN111970497B
CN111970497B CN202010899406.3A CN202010899406A CN111970497B CN 111970497 B CN111970497 B CN 111970497B CN 202010899406 A CN202010899406 A CN 202010899406A CN 111970497 B CN111970497 B CN 111970497B
Authority
CN
China
Prior art keywords
application platform
video stream
sdn
sdn switch
network camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010899406.3A
Other languages
Chinese (zh)
Other versions
CN111970497A (en
Inventor
张翀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Unisinsight Technology Co Ltd
Original Assignee
Chongqing Unisinsight Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Unisinsight Technology Co Ltd filed Critical Chongqing Unisinsight Technology Co Ltd
Priority to CN202010899406.3A priority Critical patent/CN111970497B/en
Publication of CN111970497A publication Critical patent/CN111970497A/en
Application granted granted Critical
Publication of CN111970497B publication Critical patent/CN111970497B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists

Abstract

The invention relates to the technical field of computer networks, and provides a video stream processing method, a device, an SDN controller and a storage medium, wherein the method comprises the following steps: acquiring a pull flow request sent by a second application platform through an SDN switch; generating a replication rule based on the pull stream request, wherein the replication rule is used for representing that a video stream sent to a first application platform by a network camera received by the SDN switch is replicated and a video stream replica obtained by replicating the video stream is sent to a second application platform; and sending the replication rule to the SDN switch so that the SDN switch sends the video stream replica to the second application platform according to the replication rule. The invention reduces the redundant transmission of the video stream in the SDN, further reduces the load pressure brought by the transmission of the video stream to the network bandwidth, and realizes the high-efficiency sharing of the video stream among multiple application platforms.

Description

Video stream processing method and device, SDN controller and storage medium
Technical Field
The invention relates to the technical field of computer networks, in particular to a video stream processing method and device, an SDN controller and a storage medium.
Background
Software Defined Network (SDN) is a novel Network innovation architecture proposed by the research group of CLean State of stanford university, usa, and can define and control a Network in a Software programming form, and the characteristics of separation of a control plane and a forwarding plane and openness and programmability of the Network can be realized, so that a new experimental approach is provided for the novel internet architecture research, and the development of the next generation of internet is greatly promoted.
With the development of science and technology, video monitoring in the security field is used as an important means for guaranteeing city safety, the application of the video monitoring is more and more common, with the increasing of areas covered by the video monitoring, the flow of video streams transmitted, copied and forwarded in a network of real-time videos is also larger and larger, the consumption of the transmission of the video streams on bandwidth and the consumption of server performance are larger and larger, and the timeliness of video stream transmission is greatly influenced.
Disclosure of Invention
The invention aims to provide a video stream processing method, a video stream processing device, an SDN controller and a storage medium, which can control an SDN switch to copy a video stream forwarded to a first application platform based on a pull request and forward the video stream to a second application platform when the SDN switch receives the pull request of the second application platform, so that redundant transmission of the video stream in an SDN is reduced, load pressure brought to network bandwidth by video stream transmission is reduced, and efficient sharing of the video stream among multiple application platforms is realized.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, the present invention provides a video stream processing method, which is applied to an SDN controller in a software defined network SDN, where the SDN further includes an SDN switch, the SDN controller is communicatively connected to the SDN switch, and the SDN switch is communicatively connected to a network camera, a first application platform, and a second application platform, where the method includes: acquiring a pull flow request sent by a second application platform through an SDN switch, wherein the pull flow request is used for representing that the second application platform requests to acquire a video flow of a network camera; generating a replication rule based on the pull stream request, wherein the replication rule is used for representing that a video stream sent to a first application platform by a network camera received by the SDN switch is replicated and a video stream replica obtained by replicating the video stream is sent to a second application platform; and sending the replication rule to the SDN switch so that the SDN switch replicates the video stream sent to the first application platform by the network camera according to the replication rule, and sending the video stream replica obtained by replicating the video stream to the second application platform.
In a second aspect, the present invention provides a video stream processing apparatus, applied to an SDN controller in a software defined network SDN, where the SDN further includes an SDN switch, the SDN controller is communicatively connected to the SDN switch, and the SDN switch is communicatively connected to a network camera, a first application platform, and a second application platform, where the apparatus includes: the system comprises an acquisition module, a network camera and a network management module, wherein the acquisition module is used for acquiring a pull flow request sent by a second application platform through an SDN switch, and the pull flow request is used for representing the request of the second application platform for acquiring a video flow of the network camera; the system comprises a replication module, a first application platform and a second application platform, wherein the replication module is used for generating a replication rule based on a pull stream request, and the replication rule is used for representing the replication of a video stream sent to the first application platform by a network camera received by an SDN switch and sending a video stream replica obtained by replicating the video stream to the second application platform; and the sending module is used for sending the replication rule to the SDN switch so that the SDN switch replicates the video stream sent to the first application platform by the network camera according to the replication rule and sends the video stream replica obtained by replicating the video stream to the second application platform.
In a third aspect, the present invention provides an SDN controller, comprising: one or more processors; a memory for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the video stream processing method described above.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the video stream processing method described above.
Compared with the prior art, the method and the device can control the SDN switch to copy the video stream forwarded to the first application platform based on the pull request and forward the video stream to the second application platform when receiving the pull request of the second application platform, thereby reducing the redundant transmission of the video stream in the SDN, further reducing the load pressure brought by the transmission of the video stream to the network bandwidth, and realizing the efficient sharing of the video stream among multiple application platforms.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 shows a schematic diagram of an application scenario provided by an embodiment of the present invention.
Fig. 2 is a diagram illustrating an example process of software copying provided by an embodiment of the present invention.
Fig. 3 shows a block diagram of an SDN controller according to an embodiment of the present invention.
Fig. 4 is a flowchart illustrating a video stream processing method according to an embodiment of the present invention.
Fig. 5 is a flowchart illustrating another video stream processing method according to an embodiment of the present invention.
Fig. 6 is a flowchart illustrating another video stream processing method according to an embodiment of the present invention.
Fig. 7 is a flowchart illustrating another video stream processing method according to an embodiment of the present invention.
Fig. 8 is a block diagram of a video stream processing apparatus according to an embodiment of the present invention.
An icon: 10-an SDN controller; 11-a processor; 12-a memory; 13-a bus; 14-a communication interface; 20-a web camera; 30-an SDN switch; 40-a first application platform; 50-a second application platform; 100-video stream processing means; 110-an obtaining module; 120-a replication module; 130-a sending module; 140-a registration module; 150-delete module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should be noted that, if the terms "upper", "lower", "inner", "outer", etc. are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings or the orientation or positional relationship which the product of the present invention is used to usually place, it is only for convenience of description and simplification of the description, but it is not intended to indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
In the prior art, in order to acquire a video stream acquired by a network camera, the application platform generally needs to be registered with the network camera, and then the network camera sends the video stream to the application platform through a network, with the increasing application of the network camera and network monitoring, the flow of the transmitted and stored video stream is also increased rapidly, in order to transmit and store the video stream better, new technologies such as virtualization and cloud computing are generally introduced, while an SDN has the advantages of network control and data forwarding decoupling, so that the centralized control capability of the network is higher, and the adaptability and the support degree of the new technologies such as virtualization and cloud computing are better, so that the transmission of the video stream between the network camera and the application platform through the SDN network is not an option.
Referring to fig. 1, fig. 1 shows a schematic diagram of an application scenario provided by an embodiment of the present invention, in which a network camera 20 communicates with a first application platform 40 and a second application platform 50 through an SDN, the SDN includes an SDN switch 30 and an SDN controller 10, and the SDN switch 30 is in communication connection with the network camera 20 and the first application platform 40 and the second application platform 50. The SDN controller 10 may acquire, through the SDN switch 30, a data packet transmitted between the network camera 20 and the first application platform 40 and the second application platform 50 and control the SDN switch 30 to forward the data packet.
The webcam 20 is a new generation of webcam that combines conventional webcams with web technology, and can transmit images to the other end of the earth through the web, and a remote browser (such as "Microsoft IE or Netscape") can monitor the images without any specialized software.
The first application platform 40 and the second application platform 50 may be video websites, video storage platforms, or government administration management platforms, etc.
It should be noted that fig. 1 is only an exemplary illustration of an application scenario, in an actual scenario, an SDN may include multiple SDN switches 30 or multiple SDN controllers 10, network cameras 20 in communication connection with the SDN switches 30 may be thousands, and application platforms in communication connection with the SDN switches 30 may also be multiple.
In order to perform security protection on the transmission, exchange and control of information in a video monitoring networking system, and simultaneously ensure the compatibility between different video monitoring systems, so as to facilitate the sharing of data between different video monitoring systems, a uniform media stream transmission and coding/decoding protocol is usually adopted, and a national standard protocol GB/T28181 is usually adopted in China. The national standard protocol GB/T28181 states that a network camera 20 can only register for one application platform in the same way. In order to implement sharing of a video stream acquired by the same network camera 20 by multiple application platforms, in the prior art, usually, other application platforms request the application platform registered with the network camera 20 for the video stream of the network camera 20, taking the application scenario in fig. 1 as an example, the network camera 20 has registered with the first application platform 40, if the second application platform 50 also needs the video stream acquired by the network camera 20, the second application platform 50 sends a request to the first application platform 40, the first application platform copies the video stream from the network camera 20, sends a copy of the copied video stream to the SDN switch 30, and the SDN switch 30 forwards the copy of the copied video stream to the second application platform 50.
The applicant has found, by analysing the above process, that there are three drawbacks: (1) the first application platform 40 creates a significant time delay in replicating the video stream; (2) the resource consumption of the first application platform 40 for copying the video stream is relatively large; (3) the copy of the video stream is sent to the SDN switch 30 first, and then sent to the second application platform through the SDN switch 30, which causes redundant transmission of the video stream in the SDN, generates additional bandwidth consumption, and increases network load.
Regarding the defects (1) and (2), the inventor carefully analyzes the process of copying the video stream by the first application platform, and finds that the reason is that the first application platform 40 copies the video stream in a software copy manner, and the process of copying the software needs to be processed by a plurality of steps, please refer to fig. 2, fig. 2 shows an exemplary diagram of the process of copying the software provided by the embodiment of the present invention, in fig. 2, 7 steps from S1 to S7 are performed between the time when the second application platform 50 sends a request for acquiring the video stream to the first application platform 40 and the time when the first application platform finally returns the copied video stream to the second application platform 50:
s1: a request sent by the second application platform 50 is received.
S2: and copying the video stream received by the network card to a kernel cache region.
S3: and copying the video stream in the kernel cache region to the application program process.
S4: the application program constructs a response message carrying the video stream.
S5: and copying the response message carrying the video stream to the kernel cache region.
S6: and copying the response message carrying the video stream from the kernel cache region to the network card.
S7: and returning the response message carrying the video stream to the second application platform.
From the above steps, it can be seen that, on the one hand, the operations of S1-S7 involve multiple copies of the video stream, and involve switching from kernel space to user space and from user space to kernel space, and the operations of copying and switching increase the processing time of the CPU, thereby causing a significant time delay for the first application platform 40 to copy the video stream. On the other hand, multiple copies of the video stream consume a large amount of memory resources, for example, a 4MB/s code stream, assuming that each path of video stream is cached in the memory for 2 seconds, 8MB of memory is consumed for each copy, and meanwhile, the socket buffer of the system also needs to consume a large amount of memory for receiving and transmitting the video stream, which greatly consumes the memory resources of the first application platform.
In view of the above problems, the inventors propose a video stream processing method and apparatus, an SDN controller, and a storage medium, where an SDN switch is used to perform hardware replication of a video stream, and meanwhile, redundant transmission of the video stream in an SDN is reduced, so that load pressure brought by network bandwidth due to video stream transmission is reduced, and efficient sharing of the video stream among multiple application platforms is implemented, which will be described in detail below.
Referring to fig. 3, fig. 3 provides a block diagram of the SDN controller 10 in fig. 1. SDN controller 10 includes a processor 11, a memory 12, a bus 13, and a communication interface 14. The processor 11 and the memory 12 are connected by a bus 13, and the processor 11 is communicatively connected to the SDN switch 30 by a communication interface 14.
The processor 11 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 11. The Processor 11 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
The memory 12 is used for storing a program, such as the video stream processing apparatus described above, the video stream processing apparatus includes at least one software functional module which can be stored in the memory 12 in the form of software or firmware (firmware), and the processor 11 executes the program after receiving an execution instruction to implement the video stream processing method described above.
The Memory 12 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory 12 may be a storage device built in the processor 11, or may be a storage device independent of the processor 11.
The bus 13 may be an ISA bus, a PCI bus, an EISA bus, or the like. Fig. 3 is indicated by only one double-headed arrow, but does not indicate only one bus or one type of bus.
On the basis of fig. 1 and fig. 3, an embodiment of the present invention provides a video stream processing method, which may be applied to the SDN controller 10 in fig. 1 and fig. 3, please refer to fig. 4, and fig. 4 shows a flowchart of a video stream processing method provided by an embodiment of the present invention, where the method includes the following steps:
step S100, a pull flow request sent by a second application platform is obtained through an SDN switch, where the pull flow request is used to represent that the second application platform requests to obtain a video flow of a network camera.
In this embodiment, the SDN controller 10 may obtain and analyze all messages received by the SDN switch 30, and the pull request sent by the second application platform 50 is a pull request message generated according to the national standard protocol GB/T28181.
Step S110, generating a replication rule based on the pull stream request, where the replication rule is used to characterize a video stream sent to the first application platform by the network camera received by the SDN switch, and send a video stream replica obtained by replicating the video stream to the second application platform.
In this embodiment, when the SDN controller 10 parses that the packet received by the SDN switch 30 is a pull request, the SDN switch 30 is not controlled to forward the pull request to the network camera 20, but a replication rule is generated based on the pull request, so that the SDN switch 30 replicates the video stream sent by the network camera 20 to the first application platform 40 according to the replication rule, and sends the replication of the video stream to the second application platform 50, thereby reducing packet transmission between the network camera 20 and the second application platform 50, and reducing network consumption bandwidth.
In this embodiment, the replication rule may be implemented by using a flow table rule, where the flow table rule generally includes a flow table and a group table, where the flow table is used to represent a matching rule for a packet received by the SDN switch 30, and as for the replication rule, a corresponding flow table may be used to represent a matching for a video stream received by the SDN switch 30 and sent by the network camera 20 to the first application platform 40, and if the video stream is sent by the network camera 20 to the first application platform 40, the matching is considered to be successful. The group table is used to characterize the processing operation performed on the matched packet, for example, the flow receiving address port corresponding to the matched packet, and as for the replication rule, the processing operation that the corresponding group table can characterize is: and copying the messages matched with the flow table, sending the matched messages to the first application platform 40, and sending the copied message copies to the second application platform 50, that is, two flow receiving address ports at the moment are correspondingly sent to the flow receiving address ports of the first application platform 40 and the second application platform 50 respectively.
Step S120, the replication rule is sent to the SDN switch, so that the SDN switch replicates the video stream sent to the first application platform by the network camera according to the replication rule, and sends the video stream replica obtained by replicating the video stream to the second application platform.
In this embodiment, the SDN controller 10 is configured to generate a replication rule and send the replication rule to the SDN switch 30, and the SDN switch 30 replicates the video stream flowing through the SDN switch 30 according to the replication rule, and since the replication of the video stream by the SDN switch 30 belongs to hardware replication, additional consumption of resources caused by software replication and processing delay added by switching between user space and kernel space are avoided, and video stream processing efficiency is improved.
The video stream processing method provided by the embodiment of the invention can control the SDN switch to copy the video stream forwarded to the first application platform based on the pull request and forward the video stream to the second application platform when receiving the pull request of the second application platform, thereby reducing the redundant transmission of the video stream in the SDN, further reducing the load pressure brought by the transmission of the video stream to the network bandwidth, and realizing the efficient sharing of the video stream among multiple application platforms.
In the prior art, in order to implement that the video stream of the same webcam 20 is shared among a plurality of application platforms, before an application platform sends a pull request to the webcam 20, the webcam 20 needs to register with the application platform, so that a transmission connection of the video stream between the webcam 20 and the application platform can be established, for example, in the application scenario of fig. 1, in order to implement that the video stream of the webcam 20 is shared between a first application platform 40 and a second application platform 50, the prior art generally adopts a way that the webcam 20 registers with the first application platform 40 and the second application platform 50 in different manners, and the webcam 20 sends the video streams to the first application platform 40 and the second application platform 50 according to different protocols, respectively, which causes the load pressure of the network bandwidth to double, and at the same time, since operators will charge based on bandwidth, additional operating costs will be incurred.
In view of the above problems existing in the registration method, the inventor provides a new method for registering the webcam 20 with the application platform, please refer to fig. 5, where fig. 5 shows a flowchart of another video stream processing method provided in an embodiment of the present invention, where the method includes the following steps:
step S200, when a first registration request sent to a first application platform by a network camera is detected through an SDN switch, copying registration information carried by the first registration request to obtain a registration information copy.
In this embodiment, the first registration request may include a registration mode and basic information of the network camera 20, the registration information may be the basic information of the network camera 20, and the registration information may be, but is not limited to, an identifier of the network camera 20, an IP address of the network camera 20, and the like. The registration method may be a transmission protocol or a video stream coding protocol used for video stream transmission connection between the network camera 20 and the application platform.
Step S210, generating a second registration request according to the registration information copy, and sending the first registration request and the second registration request to the first application platform and the second application platform respectively, so as to establish video stream transmission connection between the network camera and the first application platform and the second application platform respectively.
In this embodiment, since the national standard protocol GB/T28181 specifies that one network camera 20 can only register to one application platform in the same protocol, the registration information in the first registration request and the second registration request are the same, but the protocols used in the registration of the two requests are different, and the SDN controller 10 generates the copy rule according to the registration protocol agreed when the network camera 20 registers to different application platforms, so that the SDN switch 30 copies the video stream according to the copy rule and transmits the video stream to the corresponding application platform according to each registration protocol.
In the video stream processing method provided by the embodiment of the present invention, the SDN switch 30 intercepts and analyzes the first registration request sent by the network camera to the first application platform, copies the registration information in the first registration request, and generates the second registration request registered to the second application platform, so that the network camera can complete registration to multiple application platforms only by sending a registration request once, thereby reducing redundant transmission and processing of registration messages, and reducing bandwidth pressure on a network caused by registration.
In this embodiment, the SDN may include multiple SDN switches, and in order to further reduce redundant transmission of a video stream in the SDN, an embodiment of the present invention further provides an implementation manner of determining a target SDN switch, and sending a replication rule to the target SDN switch to reduce redundant transmission of the video stream in the SDN as much as possible, please refer to fig. 6, where fig. 6 shows a flowchart of another video stream processing method provided in the embodiment of the present invention, where the method includes the following steps:
step S300, network configuration information of multiple SDN switches is obtained.
In this embodiment, the network configuration information of the SDN switch 30 includes, but is not limited to, vlan, IP address, egress port, MAC address, and the like.
Step S310, generating a corresponding network topology structure according to network configuration information of the SDN switches, where the network topology structure is used to characterize a network location of each SDN switch in the SDN.
In this embodiment, it can be known whether there is a reachable path between any two SDN switches 30 in the SDN according to the network topology.
Step S320, a first path from the webcam to the first application platform and a second path from the webcam to the second application platform are generated according to the network topology.
In this embodiment, the first path is used to represent a reachable path between the network camera 20 and the first application platform, the second path is used to represent a reachable path between the network camera 20 and the second application platform, and both the first path and the second path may be multiple paths, or may be optimal paths determined from respective multiple reachable paths.
Step S330, determining a target SDN switch from the SDN switches according to the first path and the second path.
In this embodiment, the target SDN switch is an SDN switch 30 that replicates video streams and minimizes redundant transport.
In this embodiment, as a specific implementation manner, the method for determining the target SDN switch may be:
and traversing the first path and the second path from the network camera, and taking a second SDN switch with the last one in the second path being the same as the first SDN switch as a target SDN switch.
In this embodiment, the first path includes a first SDN switch that sequentially passes from the network camera to the first application platform, and the second path includes a second SDN switch that sequentially passes from the network camera to the second application platform, for example, the first path is: the network camera 20- > sw1- > sw2- > sw3- > the first application platform 40, and the first SDN switch sequentially comprises: sw1, sw2 and sw 3. The second path is: the network camera 20- > sw1- > sw2- > sw4- > the second application platform 50, the second SDN switch sequentially: if the sw1, sw2 and sw4 send the copy rule to the sw1, and the video stream is copied on the sw1, two paths of video streams flow from the sw1 to the sw2, so that redundant transmission exists, the sw2 which is the last second SDN switch in the second path and is the same as the first SDN switch is used as the target SDN switch, the sw3 copies the video stream according to the copy rule, one video stream is sent to the sw3, and the other video stream is sent to the sw4, so that redundant transmission of the video stream from the sw1 to the sw2 is avoided, and increase of network bandwidth pressure caused by the redundant transmission is reduced.
Step S340, sending the replication rule to the target SDN switch.
The video stream processing method provided by the embodiment of the invention determines the most appropriate implementation mode of the target SDN switch from the plurality of SDN switches, and sends the replication rule to the target SDN switch so as to reduce redundant transmission of the video stream in the SDN as much as possible.
In this embodiment, when the second application platform does not need the video stream from the network camera 20, in order to timely stop the SDN switch from sending the video stream to the second application platform, an embodiment of the present invention further provides an implementation manner for terminating sending the video stream, please refer to fig. 7, where fig. 7 shows a flowchart of another video stream processing method provided by the embodiment of the present invention, where the method includes the following steps:
step S400, when a flow interruption request sent by the second application platform is detected by the SDN switch, sending a deletion command aiming at the replication rule to the SDN switch so that the SDN switch deletes the replication rule, wherein the flow interruption request is used for representing that the second application platform requests not to receive the video stream of the network camera.
In this embodiment, the flow interruption request may be a flow interruption request message generated according to the national standard protocol GB/T28181. When the second application platform 50 does not need a video stream from the network camera 20, a flow interruption request message is sent to the network camera 20 through the SDN switch 30, when the SDN controller 10 obtains the flow interruption request message through the SDN switch 30, the flow interruption request message does not need to be sent to the network camera 20, but a deletion command for deleting the replication rule is directly issued to the SDN switch 30, and the SDN switch does not continue to send the video stream from the network camera 20 to the second application platform 50 after deleting the replication rule, so that message transmission between the network camera 20 and the second application platform 50 is reduced, and network bandwidth consumption is reduced.
In the video stream processing method provided by the embodiment of the present invention, when the second application platform sends the cut-off request, the sending of the video stream to the second application platform is stopped in time by deleting the copy rule.
In order to perform the corresponding steps in the above embodiments and various possible implementations, an implementation of the video stream processing apparatus 100 is given below. Referring to fig. 8, fig. 8 is a block diagram illustrating a video stream processing apparatus 100 according to an embodiment of the present invention. It should be noted that the basic principle and the resulting technical effects of the video stream processing apparatus 100 provided in this embodiment are the same as those of the above embodiments, and for the sake of brief description, no reference is made to this embodiment.
The video stream processing apparatus 100 includes an obtaining module 110, a copying module 120, a sending module 130, a registering module 140, and a deleting module 150.
An obtaining module 110, configured to obtain, by an SDN switch, a pull request sent by a second application platform, where the pull request is used to characterize that the second application platform requests to obtain a video stream of a network camera.
The replication module 120 is configured to generate a replication rule based on the pull request, where the replication rule is used to characterize a video stream sent to the first application platform by a network camera received by the SDN switch, and send a video stream replica obtained by replicating the video stream to the second application platform.
As a specific embodiment, the replication module 120 is further configured to: acquiring network configuration information of a plurality of SDN switches; generating a corresponding network topology structure according to network configuration information of a plurality of SDN switches, wherein the network topology structure is used for representing the network position of each SDN switch in the SDN; generating a first path from the network camera to the first application platform and a second path from the network camera to the second application platform according to the network topology structure; determining a target SDN switch from the SDN switches according to the first path and the second path; sending the replication rules to the target SDN switch.
As a specific embodiment, the first path includes a first SDN switch sequentially passing from the webcam to the first application platform, the second path includes a second SDN switch sequentially passing from the webcam to the second application platform, and the replication module 120, when executing the step of determining the target SDN switch from the SDN switches according to the first path and the second path, is specifically configured to: and traversing the first path and the second path from the network camera, and taking a second SDN switch which is the same as the first SDN switch in the last second path as a target SDN switch.
A sending module 130, configured to send the replication rule to the SDN switch, so that the SDN switch replicates, according to the replication rule, the video stream sent to the first application platform by the network camera, and sends a video stream replica obtained by replicating the video stream to the second application platform.
A registration module 140 configured to: when a first registration request sent to a first application platform by a network camera is detected through an SDN switch, copying registration information carried by the first registration request to obtain a registration information copy; and generating a second registration request according to the registration information copy, and respectively sending the first registration request and the second registration request to the first application platform and the second application platform so as to respectively establish video stream transmission connection between the network camera and the first application platform and the second application platform.
When a flow interruption request sent by the second application platform is detected by the SDN switch, the deletion module 150 is configured to send a deletion command for the replication rule to the SDN switch, so that the SDN switch deletes the replication rule, where the flow interruption request is used to characterize that the second application platform requests not to receive the video stream of the network camera.
The present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a video stream processing method as described above.
In summary, embodiments of the present invention provide a video stream processing method, an apparatus, an SDN controller, and a storage medium, where the method is applied to an SDN controller in a software defined network SDN, the SDN further includes an SDN switch, the SDN controller is in communication connection with the SDN switch, and the SDN switch is in communication connection with a network camera, a first application platform, and a second application platform, and the method includes: acquiring a pull flow request sent by a second application platform through an SDN switch, wherein the pull flow request is used for representing that the second application platform requests to acquire a video flow of a network camera; generating a replication rule based on the pull stream request, wherein the replication rule is used for representing that a video stream sent to a first application platform by a network camera received by the SDN switch is replicated and a video stream replica obtained by replicating the video stream is sent to a second application platform; and sending the replication rule to the SDN switch so that the SDN switch replicates the video stream sent to the first application platform by the network camera according to the replication rule, and sending the video stream replica obtained by replicating the video stream to the second application platform. Compared with the prior art, the method and the device for controlling the video stream transmission can control the SDN switch to copy the video stream transmitted to the first application platform based on the pull request and transmit the video stream to the second application platform when receiving the pull request of the second application platform, thereby reducing the redundant transmission of the video stream in the SDN, further reducing the load pressure brought to network bandwidth by transmitting the video stream, and realizing the efficient sharing of the video stream among multiple application platforms.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (8)

1. A video stream processing method applied to an SDN controller in an SDN, the SDN further comprising an SDN switch, the SDN controller being in communication with the SDN switch, the SDN switch being in communication with a webcam, a first application platform, and a second application platform, the method comprising:
when a first registration request sent to the first application platform by the network camera is detected through the SDN switch, copying registration information carried by the first registration request to obtain a registration information copy;
generating a second registration request according to the registration information copy, and respectively sending the first registration request and the second registration request to the first application platform and the second application platform so as to respectively establish video stream transmission connection between the network camera and the first application platform and the second application platform;
acquiring, by the SDN switch, a pull request sent by the second application platform, wherein the pull request is used for characterizing that the second application platform requests to acquire a video stream of the network camera;
generating a replication rule based on the pull stream request, wherein the replication rule is used for characterizing that a video stream sent to the first application platform by the network camera and received by the SDN switch is replicated and a video stream replica obtained by replicating the video stream is sent to the second application platform;
sending the copy rule to the SDN switch so that the SDN switch copies the video stream sent by the network camera to the first application platform according to the copy rule and sends a video stream copy obtained by copying the video stream to the second application platform.
2. The method of processing video streams of claim 1, wherein the SDN switch is plural, the method further comprising:
acquiring network configuration information of a plurality of SDN switches;
generating a corresponding network topology according to network configuration information of a plurality of SDN switches, wherein the network topology is used for characterizing the network position of each SDN switch in the SDN;
generating a first path from the network camera to the first application platform and a second path from the network camera to the second application platform according to the network topology structure;
determining a target SDN switch from the SDN switches according to the first path and the second path;
sending the replication rule to the target SDN switch.
3. The method of claim 2, wherein the first path comprises a first SDN switch passing in sequence from the web camera to the first application platform, wherein the second path comprises a second SDN switch passing in sequence from the web camera to the second application platform, and wherein determining the target SDN switch from the plurality of SDN switches according to the first path and the second path comprises:
traversing the first path and the second path starting from the network camera, and regarding a last second SDN switch in the second path identical to the first SDN switch as a target SDN switch.
4. The video stream processing method according to claim 1, further comprising:
when a flow interruption request sent by the second application platform is detected through the SDN switch, sending a deletion command aiming at the replication rule to the SDN switch so as to enable the SDN switch to delete the replication rule, wherein the flow interruption request is used for representing that the second application platform requests not to receive the video stream of the network camera.
5. A video stream processing apparatus for use in an SDN controller in an SDN, the SDN further comprising an SDN switch, the SDN controller communicatively coupled to the SDN switch, the SDN switch communicatively coupled to each of a webcam, a first application platform, and a second application platform, the apparatus comprising:
a registration module to: when a first registration request sent to the first application platform by the network camera is detected through the SDN switch, copying registration information carried by the first registration request to obtain a registration information copy; generating a second registration request according to the registration information copy, and respectively sending the first registration request and the second registration request to the first application platform and the second application platform so as to respectively establish video stream transmission connection between the network camera and the first application platform and the second application platform;
an obtaining module, configured to obtain, by the SDN switch, a pull request sent by the second application platform, where the pull request is used to characterize that the second application platform requests to obtain a video stream of the network camera;
a replication module, configured to generate a replication rule based on the pull request, where the replication rule is used to characterize a video stream sent to the first application platform by the network camera and received by an SDN switch, and send a video stream replica obtained by replicating the video stream to the second application platform;
a sending module, configured to send the replication rule to the SDN switch, so that the SDN switch replicates, according to the replication rule, the video stream sent to the first application platform by the network camera, and sends a video stream replica obtained by replicating the video stream to the second application platform.
6. The video stream processing apparatus of claim 5, wherein the apparatus further comprises a deletion module configured to:
when a flow interruption request sent by the second application platform is detected through the SDN switch, sending a deletion command aiming at the replication rule to the SDN switch so as to enable the SDN switch to delete the replication rule, wherein the flow interruption request is used for representing that the second application platform requests not to receive the video stream of the network camera.
7. An SDN controller, wherein the SDN controller comprises:
one or more processors;
memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the video stream processing method of any of claims 1-4.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the video stream processing method according to any one of claims 1 to 4.
CN202010899406.3A 2020-08-31 2020-08-31 Video stream processing method and device, SDN controller and storage medium Active CN111970497B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010899406.3A CN111970497B (en) 2020-08-31 2020-08-31 Video stream processing method and device, SDN controller and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010899406.3A CN111970497B (en) 2020-08-31 2020-08-31 Video stream processing method and device, SDN controller and storage medium

Publications (2)

Publication Number Publication Date
CN111970497A CN111970497A (en) 2020-11-20
CN111970497B true CN111970497B (en) 2022-06-03

Family

ID=73400172

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010899406.3A Active CN111970497B (en) 2020-08-31 2020-08-31 Video stream processing method and device, SDN controller and storage medium

Country Status (1)

Country Link
CN (1) CN111970497B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113422775B (en) * 2021-06-23 2022-12-02 重庆紫光华山智安科技有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN115086707B (en) * 2022-05-10 2024-02-06 北京千方科技股份有限公司 Video stream transmission method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017093800A1 (en) * 2015-12-01 2017-06-08 Alcatel Lucent Method and apparatus for controlling and facilitating control of data stream of user in sdn network
CN107086963A (en) * 2017-03-10 2017-08-22 中国传媒大学 A kind of accurate video switching method of destination based on SDN
CN108040268A (en) * 2017-11-30 2018-05-15 浙江宇视科技有限公司 A kind of video surveillance network method of controlling security and system based on SDN
CN109168050A (en) * 2018-09-30 2019-01-08 电子科技大学 A kind of video multicast method based on SDN
CN109600318A (en) * 2018-11-29 2019-04-09 新华三技术有限公司合肥分公司 A kind of method and SDN controller monitoring application program in SDN
CN109995600A (en) * 2017-12-29 2019-07-09 浙江宇视科技有限公司 A kind of big pressure service test method and system based on SDN

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9330156B2 (en) * 2013-10-18 2016-05-03 Cisco Technology, Inc. System and method for software defined network aware data replication
US9270612B2 (en) * 2013-12-13 2016-02-23 International Business Machines Corporation Software-defined networking interface between multiple platform managers
US9369744B2 (en) * 2014-10-15 2016-06-14 Fortinet, Inc. Optimizing multimedia streaming in WLANs (wireless local access networks)
US10038651B2 (en) * 2015-09-05 2018-07-31 Nevion Europe As Asynchronous switching system and method
CN107204867B (en) * 2016-03-18 2020-03-24 中兴通讯股份有限公司 Information transmission method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017093800A1 (en) * 2015-12-01 2017-06-08 Alcatel Lucent Method and apparatus for controlling and facilitating control of data stream of user in sdn network
CN107086963A (en) * 2017-03-10 2017-08-22 中国传媒大学 A kind of accurate video switching method of destination based on SDN
CN108040268A (en) * 2017-11-30 2018-05-15 浙江宇视科技有限公司 A kind of video surveillance network method of controlling security and system based on SDN
CN109995600A (en) * 2017-12-29 2019-07-09 浙江宇视科技有限公司 A kind of big pressure service test method and system based on SDN
CN109168050A (en) * 2018-09-30 2019-01-08 电子科技大学 A kind of video multicast method based on SDN
CN109600318A (en) * 2018-11-29 2019-04-09 新华三技术有限公司合肥分公司 A kind of method and SDN controller monitoring application program in SDN

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"SDN分层组播视频会议系统设计与实现";张琳凯;《小型微型计算机系统》;20170331;全文 *

Also Published As

Publication number Publication date
CN111970497A (en) 2020-11-20

Similar Documents

Publication Publication Date Title
US7912959B2 (en) Architecture for building a peer to peer messaging platform
CN108712459B (en) Protocol message cross-layer communication method and device and electronic equipment
CN102449954B (en) A system and method for converting unicast client requests into multicast client requests
CN112291293B (en) Task processing method, related equipment and computer storage medium
US8743881B2 (en) Link data transmission method, node and system
CN111970497B (en) Video stream processing method and device, SDN controller and storage medium
US20060236017A1 (en) Synchronizing primary and secondary fabric managers in a switch fabric
KR100865192B1 (en) System and method of message-based power management
US10609125B2 (en) Method and system for transmitting communication data
WO2021128927A1 (en) Message processing method and apparatus, storage medium, and electronic apparatus
US20120166556A1 (en) Method, device and system for real-time publish subscribe discovery based on distributed hash table
WO2009039745A1 (en) A data processing method, apparatus and system
CN103731758B (en) A kind of video stream transmission method and device
WO2022017475A1 (en) Data access method and related device
CN110838935A (en) High-availability SDN controller clustering method, system, storage medium and equipment
US8134915B2 (en) Method and apparatus for providing network redundancy
US7730214B2 (en) Communication paths from an InfiniBand host
CN114025002A (en) MQTT information transmission method, system and communication equipment
WO2016131359A1 (en) Multicast line switching method and device for ring-shaped network
US8931085B2 (en) Download optimization in the presence of multicast data
Saveliev et al. Architecture of data exchange with minimal client-server interaction at multipoint video conferencing
US20180255157A1 (en) Network service chains using hardware logic devices in an information handling system
CN114785695A (en) High-performance network communication library realized based on zeroC ICE
CN111240845A (en) Data processing method, device and storage medium
KR20030087434A (en) Table management methode for distributed forwarding in high speed router

Legal Events

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