A video stream forwarding method and device, a storage medium and an electronic device

By establishing module binding between the video stream sender and receiver, flexible forwarding of the video stream is achieved, solving the problem of resource waste caused by multiple forwardings of the video stream and improving forwarding efficiency.

CN116264563BActive Publication Date: 2026-07-24ZHEJIANG UNIVIEW TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIVIEW TECH CO LTD
Filing Date
2021-12-13
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In decoding and splicing equipment, when the same video stream needs to be forwarded multiple times, it consumes a lot of network bandwidth resources and local acquisition and encoding capabilities, resulting in resource waste.

Method used

By establishing module binding between the video stream sender and receiver, the first forwarding module receives the target video stream and sends it to the second forwarding module, thereby enabling flexible forwarding of the video stream and reducing multiple requests and encoding processes.

Benefits of technology

It saves network bandwidth resources and local acquisition and encoding capabilities, and improves the efficiency of video stream forwarding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116264563B_ABST
    Figure CN116264563B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a video stream forwarding method and device, a storage medium and an electronic device. The method comprises: receiving a target video stream by a first forwarding module of a video stream sending end; and sending the received target video stream to a second forwarding module of a video stream receiving end by the first forwarding module, so that the video stream receiving end obtains the target video stream from the second forwarding module; wherein the first forwarding module and the second forwarding module are bound by a forwarding function establishing module. The technical solution can flexibly control the realization of video stream forwarding through the binding between modules, thereby saving network bandwidth resources and local acquisition and coding capacity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video data transmission technology, and in particular to a video stream forwarding method, apparatus, storage medium, and electronic device. Background Technology

[0002] With the development of IoT and network technologies, current decoding and splicing control equipment is performing more and more functions, and the number of video streams required is also increasing. Decoding and splicing control equipment is used to connect multiple cameras and multiple large screens to jointly realize surveillance assembly.

[0003] In decoding and control equipment, a terminal device can request a video stream from a front-end video acquisition device. When the front-end video acquisition device receives the request message, it can transmit the video stream to the requesting device. The video stream needs to be encoded during transmission.

[0004] The decoding and splicing equipment contains multiple devices, and the same video stream needs to be forwarded multiple times. During the forwarding process, multiple requests and multiple encodings are required, which consumes a lot of network bandwidth resources and local acquisition and encoding capabilities. Summary of the Invention

[0005] This application provides a video stream forwarding method, apparatus, storage medium, and electronic device, which can flexibly control video stream forwarding through module binding, saving network bandwidth resources and local acquisition and encoding capabilities.

[0006] In a first aspect, embodiments of this application provide a video stream forwarding method, the method comprising:

[0007] The target video stream is received using the first forwarding module of the video stream sender.

[0008] The first forwarding module sends the received target video stream to the second forwarding module of the video stream receiving end, so that the video stream receiving end can obtain the target video stream from the second forwarding module;

[0009] The first forwarding module and the second forwarding module are bound together by a forwarding function.

[0010] Secondly, embodiments of this application provide a video stream forwarding device, the device comprising:

[0011] The target video stream receiving unit is used to receive the target video stream using the first forwarding module of the video stream sending end;

[0012] The target video stream forwarding unit is used to send the received target video stream to the second forwarding module of the video stream receiving end using the first forwarding module, so that the video stream receiving end can obtain the target video stream from the second forwarding module.

[0013] The first forwarding module and the second forwarding module are bound together by a forwarding function.

[0014] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the video stream forwarding method as described in embodiments of this application.

[0015] Fourthly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the video stream forwarding method as described in embodiments of this application.

[0016] The technical solution provided in this application embodiment employs a first forwarding module at the video stream sending end to receive the target video stream, and then uses the first forwarding module to send the received target video stream to a second forwarding module at the video stream receiving end, so that the video stream receiving end can obtain the target video stream from the second forwarding module; wherein, the first forwarding module and the second forwarding module establish module binding through a forwarding function. This technical solution can flexibly control video stream forwarding through module binding, saving network bandwidth resources and local acquisition and encoding capabilities. Attached Figure Description

[0017] Figure 1 This is a flowchart of the video stream forwarding method provided in Embodiment 1 of this application;

[0018] Figure 2 This is a schematic diagram of video stream forwarding provided in Embodiment 1 of this application;

[0019] Figure 3 This is a schematic diagram of the inter-module binding provided in Embodiment 1 of this application;

[0020] Figure 4 This is a schematic diagram of the video stream forwarding process provided in Embodiment 2 of this application;

[0021] Figure 5 This is a flowchart of adding forwarding relationships provided in Embodiment 2 of this application;

[0022] Figure 6 This is a schematic diagram of another video stream forwarding process provided in Embodiment 3 of this application;

[0023] Figure 7 This is a flowchart of the inter-device flow forwarding implementation provided in Embodiment 3 of this application;

[0024] Figure 8 This is a flowchart of inter-module forwarding provided in Embodiment 3 of this application;

[0025] Figure 9This is a schematic diagram of the video stream forwarding device provided in Embodiment 4 of this application;

[0026] Figure 10 This is a schematic diagram of the structure of an electronic device provided in Embodiment Six of this application. Detailed Implementation

[0027] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present application, not the entire structure.

[0028] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. The process can be terminated when its operation is complete, but may also have additional steps not included in the figures. The process can correspond to a method, function, procedure, subroutine, subroutine, etc.

[0029] Example 1

[0030] Figure 1 This is a flowchart of a video stream forwarding method provided in Embodiment 1 of this application. This embodiment can be applied to situations where video stream forwarding is controlled. The method can be executed by the video stream forwarding device provided in this embodiment. The device can be implemented in software and / or hardware and can be integrated into devices such as smart terminals used for data transmission.

[0031] like Figure 1 As shown, the video stream forwarding method includes:

[0032] S110. The first forwarding module of the video stream sending end is used to receive the target video stream;

[0033] In this solution, the decoding and control device is used to connect multiple devices to achieve monitoring and assembly. When the decoding and control device receives a video stream, it forwards the video stream to other central processing units, or to other devices, clients, etc. The client is mainly used for playback preview, while intra-device or inter-device forwarding is mainly used for decoding output display. During the video stream forwarding process, a module binding mechanism is used to achieve one-to-many video stream conversion through internal module forwarding.

[0034] For example, Figure 2 This is a schematic diagram of video stream forwarding provided in Embodiment 1 of this application, as shown below. Figure 2As shown, after receiving the target video stream, device 1 can send the target video stream to other slave CPUs via the internal network, or to clients or other devices via the external network. Other devices, upon receiving the target video stream, can similarly send it to other slave CPUs (central processing units). Forwarding the same video stream multiple times only requires one stream request or one encoding.

[0035] The target video stream can be a network stream or a local stream, and can be sent to the video stream receiving end via the network.

[0036] In this embodiment, the forwarding module includes information such as forwarding functions, channel identifiers, and linked list nodes, which are used to forward the video stream.

[0037] In this solution, the video stream sender includes at least one forwarding module for receiving the target video stream and sending it to the video stream receiver for decoding and display. The video stream receiver may belong to the same device as the video stream sender or to a different device.

[0038] In this technical solution, optionally, a first forwarding module of the video stream sender is used to receive the target video stream, including:

[0039] If the target video stream is a network stream, the data receiving module at the video stream sending end obtains the network stream and sends the network stream to the first forwarding module;

[0040] If the target video stream is a local stream, then the local stream is obtained by the first forwarding module of the frequency stream sending end.

[0041] In this scheme, if the target video stream is a network stream, i.e., the target video stream is generated by an external device, then the data receiving module of the video sending end receives the network stream and sends the received network stream to the first forwarding module. Before sending the received network stream to the first forwarding module, the network stream can also be sent to the first storage module, and the first storage module will then send the network stream to the first forwarding module.

[0042] In this embodiment, if the target video stream is a local stream, meaning it is generated by the current device, the local stream can be directly obtained from the first forwarding module of the video stream sender. Alternatively, the local stream can be obtained from the first storage module of the video stream sender and then sent to the first forwarding module.

[0043] By acquiring the target video stream, forwarding can be achieved through inter-module binding, allowing for flexible control of video stream forwarding, saving network bandwidth resources and local acquisition and encoding capabilities.

[0044] S120. The first forwarding module sends the received target video stream to the second forwarding module of the video stream receiving end, so that the video stream receiving end can obtain the target video stream from the second forwarding module.

[0045] The first forwarding module and the second forwarding module are bound together by a forwarding function.

[0046] In this embodiment, after receiving the target video stream, the first forwarding module can send the target video stream to the second forwarding module of the video stream receiving end of the same device via the internal network; alternatively, it can send the target video stream to the second forwarding module of the video stream receiving end of other devices via the external network. When the same target video stream is forwarded multiple times, it does not need to request or encode multiple times; it only needs to pass through the first forwarding module and the second forwarding module to achieve the forwarding of the target video stream.

[0047] For example, Figure 3 This is a schematic diagram of the inter-module binding provided in Embodiment 1 of this application, as shown below. Figure 3 As shown, module 2 is the first forwarding module, and modules 3 and 5 are the second forwarding modules. Modules 3 and 5 can be connected to module 2 respectively to achieve module binding.

[0048] The technical solution provided in this application embodiment employs a first forwarding module at the video stream sending end to receive the target video stream, and then uses the first forwarding module to send the received target video stream to a second forwarding module at the video stream receiving end, so that the video stream receiving end can obtain the target video stream from the second forwarding module; wherein, the first forwarding module and the second forwarding module establish module binding through a forwarding function. By implementing this technical solution, forwarding can be achieved through inter-module binding, allowing for flexible control of video stream forwarding, saving network bandwidth resources and local acquisition and encoding capabilities.

[0049] Example 2

[0050] Figure 4 This is a schematic diagram of the video stream forwarding process provided in Embodiment 2 of this application. Embodiment 2 is a further optimization based on Embodiment 1. Specifically, the optimization involves: using the first forwarding module to send the received target video stream to the second forwarding module of the video stream receiving end, including: when the first and second forwarding modules belong to the same device, traversing the control block linked list head of the first forwarding module to determine channel information; wherein, the channel information includes a forwarding function and a channel identifier; if the forwarding function is not empty, then according to the channel identifier, using the first forwarding module to send the received target video stream to the second forwarding module of the video stream receiving end. For details not described in this embodiment, please refer to Embodiment 1. Figure 4 As shown, the method includes the following steps:

[0051] S410: The first forwarding module of the video stream sender receives the target video stream;

[0052] S420. When the first forwarding module and the second forwarding module belong to the same device, traverse the control block list head of the first forwarding module to determine the channel information; wherein, the channel information includes the forwarding function and the channel identifier;

[0053] Among them, the forwarding function is used to forward the video stream; the channel identifier is used to distinguish the central processing unit to which the module belongs.

[0054] In this scheme, when the first forwarding module and the second forwarding module belong to the same device, the target video stream is forwarded within the device. The control block linked list head of the first forwarding module is traversed to obtain channel information, which is then used to forward the target video stream within the device based on the channel information.

[0055] In this technical solution, optionally, before traversing the control block linked list head of the first forwarding module to determine the channel information, the method further includes:

[0056] Establish a connection between the first forwarding module and the second forwarding module;

[0057] Determine whether the channel identifier of the second forwarding module meets the preset identifier constraint conditions;

[0058] If the conditions are met, the channel information of the second forwarding module is added to the head of the control block linked list of the first forwarding module.

[0059] The preset identifier constraint can be set according to the number of the central processing unit. For example, the identifier constraint can be set to 1, that is, when the channel identifier of the second forwarding module is 1, the preset identifier constraint is satisfied.

[0060] In this embodiment, the channel of the first forwarding module is sent to the second forwarding module. The first forwarding module binds the channel of the second forwarding module and determines whether the channel of the second forwarding module is a local CPU channel. That is, if the channel identifier of the second forwarding module meets the preset identifier constraint condition, then the channel of the second forwarding module is a local CPU channel. At this time, the channel information of the second forwarding module is added to the control block linked list head of the first forwarding module.

[0061] By adding the channel information of the second forwarding module to the control block list head of the first forwarding module, the forwarding of the target video stream within the local CPU can be achieved through the binding between modules.

[0062] In this technical solution, optionally, determining whether the channel identifier of the second forwarding module meets the preset identifier constraint conditions includes:

[0063] If the conditions are not met, the channel information of the network module is added to the head of the control block linked list of the first forwarding module;

[0064] Correspondingly, if the forwarding function is not empty, then according to the channel identifier, the first forwarding module sends the received target video stream to the second forwarding module of the video stream receiving end, including:

[0065] If the forwarding function of the network module is not empty, then according to the channel identifier of the network module, the first forwarding module sends the received target video stream to the network module, and the network module sends the received target video stream to the second forwarding module of the video stream receiving end.

[0066] In this embodiment, if the channel identifier of the second forwarding module does not meet the preset identifier constraint condition, i.e., the channel of the second forwarding module is a non-local CPU channel, then the forwarding of the target video stream is a cross-CPU forwarding. In this case, the channel information of the network module is added to the head of the control block linked list of the first forwarding module. The first forwarding module then sends the received target video stream to the network module, and the network module then sends the received target video stream to the second forwarding module at the video stream receiving end. The network module stores the channel information of the second forwarding module and can directly send the target video stream to the second forwarding module via the network.

[0067] By adding the channel information of the network module to the control block linked list head of the first forwarding module, the forwarding of the target video stream across CPUs can be achieved through the binding between modules.

[0068] For example, Figure 5 This is a flowchart of adding forwarding relationships provided in Embodiment 2 of this application, such as... Figure 5 As shown, the first forwarding module channel forwards to the second forwarding module channel. The first forwarding module channel first binds to the second forwarding module channel and determines whether the second forwarding module channel is a local CPU. If it is a local CPU, the channel information of the second forwarding module is added to the control block linked list head of the first forwarding module. Otherwise, the channel information of a network module is obtained and added to the control block linked list head of the first forwarding module.

[0069] S430. If the forwarding function is not empty, then according to the channel identifier, the first forwarding module sends the received target video stream to the second forwarding module of the video stream receiving end.

[0070] In this embodiment, when the device starts up, the forwarding function of the channel that needs to forward the target video stream is pre-assigned. When forwarding the target video stream, it is determined whether the forwarding function of the second forwarding module is empty. If it is not empty, the target video stream can be forwarded from the first forwarding module to the second forwarding module based on the channel identifier.

[0071] The technical solution provided in this application embodiment uses a first forwarding module at the video stream sending end to receive the target video stream. When the first and second forwarding modules belong to the same device, the control block linked list head of the first forwarding module is traversed to determine the channel information. The channel information includes a forwarding function and a channel identifier. If the forwarding function is not empty, the first forwarding module sends the received target video stream to the second forwarding module at the video stream receiving end based on the channel identifier. By implementing this technical solution, video stream forwarding within the device can be achieved through inter-module binding, enabling one-to-many conversion. Decoding the same network stream only requires requesting the stream once, saving network bandwidth and local acquisition and encoding capabilities.

[0072] Example 3

[0073] Figure 6 This is a schematic diagram of another video stream forwarding process provided in Embodiment 3 of this application. Embodiment 3 further optimizes Embodiment 1. Specifically, the optimization includes: using the first forwarding module to send the received target video stream to the second forwarding module of the video stream receiving end; and further includes: when the first forwarding module and the second forwarding module belong to different devices, traversing the control block linked list head of the first forwarding module to determine node information; wherein, the node information includes device address and device port; and according to the node information, using the first forwarding module to send the received target video stream to the second forwarding module of the video stream receiving end. For details not described in this embodiment, please refer to Embodiment 1.

[0074] like Figure 6 As shown, the method includes the following steps:

[0075] S610, The first forwarding module of the video stream sending end is used to receive the target video stream;

[0076] S620. When the first forwarding module and the second forwarding module belong to different devices, traverse the control block linked list head of the first forwarding module to determine the node information; wherein, the node information includes the device address and the device port;

[0077] In this embodiment, when the first forwarding module and the second forwarding module belong to different devices, the forwarding of the target video stream between devices, including sending it to the client, involves calling the forwarding function of the first forwarding module. Based on the forwarding function, the control block linked list head of the first forwarding module is traversed to obtain the node information of the second forwarding module.

[0078] In this technical solution, optionally, before traversing the control block linked list head of the first forwarding module to determine the node information, the method further includes:

[0079] The node information is added to the head of the control block linked list of the first forwarding module.

[0080] In response to input operations from the client or target device, node information can be added to the head of the control block linked list of the first forwarding module.

[0081] By adding node information to the control block linked list head of the first forwarding module, the forwarding of target video streams between devices can be achieved based on the binding between modules.

[0082] S630. Based on the node information, the first forwarding module sends the received target video stream to the second forwarding module of the video stream receiving end.

[0083] In this scheme, after obtaining the device address and device port, the received target video stream can be sent to the second forwarding module of the video stream receiver via an external network.

[0084] For example, Figure 7 This is a flowchart of the inter-device flow forwarding implementation provided in Embodiment 3 of this application, as follows: Figure 7 As shown, node information is added to the control block linked list head of the channel of the first forwarding module. The stream forwarding calls the forwarding function of the first forwarding module. The implementation of the forwarding function is actually to traverse the control block linked list head of the channel of the first forwarding module, obtain the node information of the second forwarding module, and send the target video stream to the destination IP and port through the network sending function.

[0085] The technical solution provided in this application embodiment uses a first forwarding module at the video stream sending end to receive the target video stream. When the first and second forwarding modules belong to different devices, the control block linked list head of the first forwarding module is traversed to determine node information; wherein, the node information includes the device address and device port; based on the node information, the first forwarding module sends the received target video stream to the second forwarding module at the video stream receiving end. By implementing this technical solution, inter-device video stream forwarding can be achieved through module binding, enabling one-to-many conversion. Decoding the same network stream only requires requesting the stream once, saving network bandwidth and local acquisition and encoding capabilities.

[0086] For example, Figure 8 This is a flowchart of inter-module forwarding provided in Embodiment 3 of this application, such as... Figure 8 As shown, the inter-module forwarding process includes:

[0087] If the target video stream is a network stream, the data receiving module of the video stream sending end receives the network stream data; the data receiving module forwards the received target video stream to module 1, which stores the target video stream; module 1 forwards the received target video stream to module 2; if the target video stream is a local stream, the target video stream is sent to module 4, which forwards the data to module 2.

[0088] If it is an intra-device forwarding, module 2 determines whether it needs to cross CPUs when forwarding the target video stream to module 3; if not, it is forwarded directly to module 3; if not, it is forwarded to module 3 through the network module.

[0089] If it is a forwarding between devices, the target video stream needs to be forwarded from module 2 to module 5. Module 5 sends the target video stream to the corresponding device by calling the sending function of the data forwarding module. After receiving the target video stream, the client directly decodes and displays it.

[0090] In this process, after other devices receive the target video stream, they also forward the target video stream within the device following the same procedure.

[0091] Example 4

[0092] Figure 9 This is a schematic diagram of the video stream forwarding device provided in Embodiment 4 of this application, as shown below. Figure 9 As shown, the video stream forwarding device includes:

[0093] The target video stream receiving unit 910 is used to receive the target video stream using the first forwarding module of the video stream sending end;

[0094] The target video stream forwarding unit 920 is used to send the received target video stream to the second forwarding module of the video stream receiving end using the first forwarding module, so that the video stream receiving end can obtain the target video stream from the second forwarding module.

[0095] The first forwarding module and the second forwarding module are bound together by a forwarding function.

[0096] In this technical solution, optionally, the target video stream forwarding unit 920 includes:

[0097] The channel information determination subunit is used to determine the channel information by traversing the control block linked list head of the first forwarding module when the first forwarding module and the second forwarding module belong to the same device; wherein, the channel information includes a forwarding function and a channel identifier;

[0098] The target video stream forwarding subunit is used to send the received target video stream to the second forwarding module of the video stream receiving end according to the channel identifier, based on the channel identifier, if the forwarding function is not empty.

[0099] In this technical solution, optionally, the target video stream forwarding unit 920 further includes:

[0100] A connection establishment subunit is used to establish a connection between the first forwarding module and the second forwarding module;

[0101] The channel identifier determination subunit is used to determine whether the channel identifier of the second forwarding module meets the preset identifier constraint conditions;

[0102] The channel information adding subunit of the second forwarding module is used to add the channel information of the second forwarding module to the head of the control block linked list of the first forwarding module if the conditions are met.

[0103] In this technical solution, the optional channel identifier determination subunit is specifically used for:

[0104] If the conditions are not met, the channel information of the network module is added to the head of the control block linked list of the first forwarding module;

[0105] Correspondingly, the target video stream forwarding subunit is specifically used for:

[0106] If the forwarding function of the network module is not empty, then according to the channel identifier of the network module, the first forwarding module sends the received target video stream to the network module, and the network module sends the received target video stream to the second forwarding module of the video stream receiving end.

[0107] In this technical solution, optionally, the target video stream forwarding unit 920 further includes:

[0108] The node information determination subunit is used to traverse the control block linked list head of the first forwarding module to determine the node information when the first forwarding module and the second forwarding module belong to different devices; wherein, the node information includes the device address and the device port;

[0109] The target video stream sending subunit is used to send the received target video stream to the second forwarding module of the video stream receiving end using the first forwarding module, based on the node information.

[0110] In this technical solution, optionally, the target video stream forwarding unit 920 further includes:

[0111] The node information adding subunit is used to add the node information to the control block linked list head of the first forwarding module.

[0112] In this technical solution, optionally, the target video stream receiving unit 910 includes:

[0113] The network stream acquisition subunit is used to acquire the network stream based on the data receiving module of the video stream sending end if the target video stream is a network stream, and send the network stream to the first forwarding module.

[0114] The local stream acquisition subunit is used to acquire the local stream based on the first forwarding module of the frequency stream sending end if the target video stream is a local stream.

[0115] The above-mentioned products can perform the methods provided in the embodiments of this application, and have the corresponding functional modules and beneficial effects of performing the methods.

[0116] Example 5

[0117] This application also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a video stream forwarding method, the method comprising:

[0118] The target video stream is received using the first forwarding module of the video stream sender.

[0119] The first forwarding module sends the received target video stream to the second forwarding module of the video stream receiving end, so that the video stream receiving end can obtain the target video stream from the second forwarding module;

[0120] The first forwarding module and the second forwarding module are bound together by a forwarding function.

[0121] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a computer system in which a program is executed, or it may reside in a different second computer system connected to the computer system via a network (such as the Internet). The second computer system can provide program instructions to the computer for execution. The term “storage medium” can include two or more storage media that may reside in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) that can be executed by one or more processors.

[0122] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the video stream forwarding operations described above, but can also execute related operations in the video stream forwarding method provided in any embodiment of this application.

[0123] Example 6

[0124] This application provides an electronic device that can integrate the video stream forwarding device provided in this application. Figure 10 This is a schematic diagram of the structure of an electronic device provided in Embodiment Six of this application. Figure 10 As shown, this embodiment provides an electronic device 1000, which includes: one or more processors 1020; and a storage device 1010 for storing one or more programs. When the one or more programs are executed by the one or more processors 1020, the one or more processors 1020 implement the video stream forwarding method provided in this embodiment, the method including:

[0125] The target video stream is received using the first forwarding module of the video stream sender.

[0126] The first forwarding module sends the received target video stream to the second forwarding module of the video stream receiving end, so that the video stream receiving end can obtain the target video stream from the second forwarding module;

[0127] The first forwarding module and the second forwarding module are bound together by a forwarding function.

[0128] Of course, those skilled in the art will understand that the processor 1020 also implements the technical solutions of the video stream forwarding method provided in any embodiment of this application.

[0129] Figure 10 The electronic device 1000 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0130] like Figure 10 As shown, the electronic device 1000 includes a processor 1020, a storage device 1010, an input device 1030, and an output device 1040; the number of processors 1020 in the electronic device can be one or more. Figure 10 Taking a processor 1020 as an example; the processor 1020, storage device 1010, input device 1030, and output device 1040 in the electronic device can be connected via a bus or other means. Figure 10 Taking the connection between China and Israel via bus 1050 as an example.

[0131] The storage device 1010, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and module units, such as the program instructions corresponding to the video stream forwarding method in the embodiments of this application.

[0132] Storage device 1010 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on terminal usage. Furthermore, storage device 1010 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, storage device 1010 may further include memory remotely located relative to processor 1020, and these remote memories can be connected via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0133] Input device 1030 can be used to receive input digital, character, or voice information, and to generate key signal inputs related to user settings and function control of the electronic device. Output device 1040 may include electronic devices such as a display screen and a speaker.

[0134] The electronic device provided in this application embodiment can achieve forwarding through inter-module binding, flexibly control video stream forwarding, and save network bandwidth resources and local acquisition and encoding capabilities.

[0135] The video stream forwarding device, storage medium, and electronic device provided in the above embodiments can execute the video stream forwarding method provided in any embodiment of this application, and have the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in the above embodiments can be found in the video stream forwarding method provided in any embodiment of this application.

[0136] Note that the above are merely preferred embodiments and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the appended claims.

Claims

1. A video stream forwarding method, characterized in that, include: The target video stream is received using the first forwarding module of the video stream sender. The first forwarding module sends the received target video stream to the second forwarding module of the video stream receiving end, so that the video stream receiving end can obtain the target video stream from the second forwarding module; The first forwarding module and the second forwarding module establish module binding through a forwarding function; The method of using the first forwarding module to send the received target video stream to the second forwarding module at the video stream receiving end includes: When the first forwarding module and the second forwarding module belong to the same device, the control block linked list head of the first forwarding module is traversed to determine the channel information; wherein, the channel information includes the forwarding function and the channel identifier; If the forwarding function is not empty, then according to the channel identifier, the first forwarding module sends the received target video stream to the second forwarding module of the video stream receiving end. The second forwarding module, which uses the first forwarding module to send the received target video stream to the video stream receiving end, further includes: When the first forwarding module and the second forwarding module belong to different devices, the control block linked list head of the first forwarding module is traversed to determine the node information; wherein, the node information includes the device address and the device port; Based on the node information, the first forwarding module sends the received target video stream to the second forwarding module of the video stream receiving end.

2. The method according to claim 1, characterized in that, Before traversing the control block linked list head of the first forwarding module to determine the channel information, the method further includes: Establish a connection between the first forwarding module and the second forwarding module; Determine whether the channel identifier of the second forwarding module meets the preset identifier constraint conditions; If the conditions are met, the channel information of the second forwarding module is added to the head of the control block linked list of the first forwarding module.

3. The method according to claim 2, characterized in that, Determining whether the channel identifier of the second forwarding module meets the preset identifier constraint conditions includes: If the conditions are not met, the channel information of the network module is added to the head of the control block linked list of the first forwarding module; Correspondingly, if the forwarding function is not empty, then according to the channel identifier, the first forwarding module sends the received target video stream to the second forwarding module of the video stream receiving end, including: If the forwarding function of the network module is not empty, then according to the channel identifier of the network module, the first forwarding module sends the received target video stream to the network module, and the network module sends the received target video stream to the second forwarding module of the video stream receiving end.

4. The method according to claim 1, characterized in that, Before traversing the control block linked list head of the first forwarding module to determine the node information, the method further includes: The node information is added to the head of the control block linked list of the first forwarding module.

5. The method according to claim 1, characterized in that, The first forwarding module of the video stream sender receives the target video stream, including: If the target video stream is a network stream, the data receiving module at the video stream sending end obtains the network stream and sends the network stream to the first forwarding module; If the target video stream is a local stream, then the local stream is obtained based on the first forwarding module of the video stream sending end.

6. A video stream forwarding device, characterized in that, include: The target video stream receiving unit is used to receive the target video stream using the first forwarding module of the video stream sending end; The target video stream forwarding unit is used to send the received target video stream to the second forwarding module of the video stream receiving end using the first forwarding module, so that the video stream receiving end can obtain the target video stream from the second forwarding module. The first forwarding module and the second forwarding module establish module binding through a forwarding function; The method of using the first forwarding module to send the received target video stream to the second forwarding module at the video stream receiving end includes: When the first forwarding module and the second forwarding module belong to the same device, the control block linked list head of the first forwarding module is traversed to determine the channel information; wherein, the channel information includes the forwarding function and the channel identifier; If the forwarding function is not empty, then according to the channel identifier, the first forwarding module sends the received target video stream to the second forwarding module of the video stream receiving end. The second forwarding module, which uses the first forwarding module to send the received target video stream to the video stream receiving end, further includes: When the first forwarding module and the second forwarding module belong to different devices, the control block linked list head of the first forwarding module is traversed to determine the node information; wherein, the node information includes the device address and the device port; Based on the node information, the first forwarding module sends the received target video stream to the second forwarding module of the video stream receiving end.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the video stream forwarding method as described in any one of claims 1-5.

8. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the video stream forwarding method as described in any one of claims 1-5.