Method, apparatus and computer readable storage medium for streaming media forwarding

By using asynchronous events and forwarding queues at the network layer, the problems of high latency and insufficient concurrency in streaming media forwarding are solved, enabling high-concurrency, low-latency streaming media transmission and improving user experience.

CN115776480BActive Publication Date: 2026-04-17SHANGHAI YUNCHONG ENTERPRISE DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI YUNCHONG ENTERPRISE DEV CO LTD
Filing Date
2022-12-20
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

The insufficient concurrency of streaming media forwarding services leads to high operating costs, high latency, and poor smoothness, which affects the user experience.

Method used

By utilizing data reception completion events and transmission completion events at the network layer, asynchronous transmission of streaming media data is achieved through a forwarding queue, reducing thread scheduling, improving concurrency, and lowering latency.

Benefits of technology

Significantly reduces streaming media forwarding latency, improves concurrent performance, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115776480B_ABST
    Figure CN115776480B_ABST
Patent Text Reader

Abstract

This invention relates to the field of computer processing technology, specifically providing a streaming media forwarding method, apparatus, and computer-readable storage medium. The method includes: sending first streaming media data to a forwarding device; receiving second streaming media data from a publishing device, wherein the first streaming media data is the previous streaming media data of the second streaming media data; upon completion of receiving the second streaming media data, generating a data reception completion event and sending it through the network layer to a preset publishing end, which, upon receiving the data reception completion event, places the second streaming media data into a preset forwarding queue; upon completion of sending the first streaming media data, generating a data transmission completion event and sending it through the network layer to a preset forwarding end, which, upon receiving the data transmission completion event, retrieves the second streaming media data from the forwarding queue; and sending the retrieved second streaming media data to the forwarding device. This invention fully utilizes asynchronous network events for streaming media forwarding, significantly reducing forwarding latency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and specifically provides a streaming media forwarding method, apparatus, and computer-readable storage medium. Background Technology

[0002] With the increasingly widespread application of streaming media technology across various industries, users have higher and higher requirements for the transmission experience of streaming media (compressed and segmented transmission of multimedia data). The concurrency performance of streaming media forwarding servers affects the overall operating costs of the servers. In practice, streaming media forwarding mainly encounters the following problems: insufficient concurrency capacity of streaming media forwarding services, leading to high operating costs; streaming media services generally have a certain latency in forwarding streaming media, and the higher the concurrency, the higher the latency; the smoothness of forwarding is affected by service concurrency, that is, the higher the concurrency, the worse the smoothness. Therefore, how to reduce latency during streaming media transmission directly affects the user's streaming media experience.

[0003] Therefore, a new technical solution is needed to effectively reduce the latency of streaming media forwarding, so as to improve the operation of streaming media services and enhance the user experience. Summary of the Invention

[0004] To overcome the above-mentioned defects, this invention is proposed to provide a streaming media forwarding method, terminal, device, and computer-readable storage medium that can reduce streaming media forwarding latency.

[0005] In a first aspect, the present invention provides a streaming media forwarding method, comprising: sending first streaming media data to a forwarding device; receiving second streaming media data from a publishing device, wherein the first streaming media data is the previous streaming media data of the second streaming media data; generating a data reception completion event when the second streaming media data is received, and sending it to a preset publishing end through a network layer, wherein the publishing end is configured to place the second streaming media data into a preset forwarding queue upon receiving the data reception completion event; generating a data transmission completion event when the first streaming media data is sent, and sending it to a preset forwarding end through a network layer, wherein the forwarding end is configured to retrieve the second streaming media data from the forwarding queue upon receiving the data transmission completion event; and sending the retrieved second streaming media data to the forwarding device.

[0006] Preferably, the aforementioned streaming media forwarding method further includes the step of "the forwarding end retrieving the second streaming media data from the forwarding queue when receiving the data transmission completion event" as follows: the forwarding end enters a data waiting state when it has not retrieved the second streaming media data; the step of "the publishing end placing the second streaming media data into a preset forwarding queue when receiving the data reception completion event" further includes: the publishing end sending the second streaming media data to the forwarding end which is in the data waiting state.

[0007] Preferably, in the aforementioned streaming media forwarding method, the step of "the publishing end placing the second streaming media data into a preset forwarding queue when receiving the data reception completion event" includes: the publishing end generating a second streaming media data object, the second streaming media data object including the second streaming media data and an identifier of the second streaming media data object, and placing the second streaming media data object into the forwarding queue; the step of "the forwarding end retrieving the second streaming media data from the forwarding queue when receiving the data transmission completion event" includes: the forwarding end retrieving the second streaming media data object from the forwarding queue, and retrieving the second streaming media data from the second streaming media data object.

[0008] Preferably, the aforementioned streaming media forwarding method, after the step of "the publishing end placing the second streaming media data into a preset forwarding queue when receiving the data reception completion event", further includes: determining whether there are multiple picture groups corresponding to all streaming media data objects in the forwarding queue, and deleting the streaming media data object corresponding to the non-latest picture group from the forwarding queue when the determination result is yes.

[0009] Preferably, in the aforementioned streaming media forwarding method, the step of "the forwarding end obtaining the second streaming media data object from the forwarding queue" includes: the forwarding end determining the identifier of the second streaming media data object based on the known identifier of the first streaming media data object, and obtaining the second streaming media data object from the forwarding queue according to the identifier of the second streaming media data object.

[0010] Preferably, the aforementioned streaming media forwarding method further includes, before the steps of "sending first streaming media data to the forwarding device and receiving second streaming media data from the publishing device": obtaining a connection request command of the forwarding device through the network layer, wherein the connection request command carries a stream identifier; and creating the forwarding end corresponding to the stream identifier when the session layer detects that the publishing end corresponds to the stream identifier.

[0011] Preferably, the aforementioned streaming media forwarding method further includes: obtaining a timeout or connection disconnection event through the network layer; when the session layer detects that the timeout or connection disconnection event is related to the publishing device, clearing the publishing end and all forwarding ends corresponding to the publishing end; when the session layer detects that the timeout or connection disconnection event is related to the forwarding device, clearing the forwarding end, and clearing the publishing end when there are no other forwarding ends corresponding to the publishing end.

[0012] In a second aspect, the present invention provides a streaming media forwarding device, comprising: a transceiver module for sending first streaming media data to a forwarding device and receiving second streaming media data from a publishing device, wherein the first streaming media data is the previous streaming media data of the second streaming media data; a publishing module for generating a data reception completion event when the second streaming media data is received, and sending it to a preset publishing end through a network layer, wherein the publishing end is used to put the second streaming media data into a preset forwarding queue upon receiving the data reception completion event; a forwarding module for generating a data transmission completion event when the first streaming media data is sent, and sending it to a preset forwarding end through a network layer, wherein the forwarding end is used to retrieve the second streaming media data from the forwarding queue upon receiving the data transmission completion event; and the transceiver module for sending the retrieved second streaming media data to the forwarding device.

[0013] In a third aspect, the present invention provides a control device including a processor and a storage device, the storage device being adapted to store a plurality of program codes, characterized in that the program codes are adapted to be loaded and run by the processor to perform the aforementioned streaming media forwarding method.

[0014] In a fourth aspect, the present invention provides a computer-readable storage medium storing a plurality of program codes adapted to be loaded and run by a processor to perform the streaming media forwarding method described in any of the above-described technical solutions.

[0015] The above-described technical solutions of the present invention have at least one or more of the following beneficial effects:

[0016] In the technical solution of this invention, when the streaming media data reception is completed, the data reception completion event of the network layer is used to trigger the streaming media data publication. When the streaming media data transmission is completed, the data transmission completion event of the network layer is used to trigger the next streaming media data forwarding. That is, this invention makes full use of asynchronous network events for streaming media forwarding, which can significantly reduce forwarding latency. At the same time, since there is no need to open a thread for data forwarding, the scheduling of threads is reduced, resulting in higher forwarding performance and stronger concurrency. Attached Figure Description

[0017] The disclosure of this invention will become more readily understood with reference to the accompanying drawings. It will be readily understood by those skilled in the art that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. Wherein:

[0018] Figure 1 This is a flowchart of a streaming media forwarding method according to an embodiment of the present invention;

[0019] Figure 2 This is a flowchart of a streaming media forwarding method according to an embodiment of the present invention;

[0020] Figure 3 This is a schematic diagram of a streaming media forwarding method according to an embodiment of the present invention;

[0021] Figure 4 This is a schematic diagram of a streaming media forwarding method according to an embodiment of the present invention;

[0022] Figure 5 This is a schematic diagram of a streaming media forwarding method according to an embodiment of the present invention;

[0023] Figure 6 This is a schematic diagram of a streaming media forwarding method according to an embodiment of the present invention;

[0024] Figure 7 This is a schematic diagram of a streaming media forwarding method according to an embodiment of the present invention;

[0025] Figure 8 This is a schematic diagram of a streaming media forwarding method according to an embodiment of the present invention. Detailed Implementation

[0026] Some embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0027] In the description of this invention, "module" and "processor" can include hardware, software, or a combination of both. A module can include hardware circuitry, various suitable sensors, communication ports, memory, and may also include software components, such as program code, or a combination of software and hardware. A processor can be a central processing unit, microprocessor, image processor, digital signal processor, or any other suitable processor. The processor has data and / or signal processing capabilities. The processor can be implemented in software, in hardware, or a combination of both. Non-transitory computer-readable storage media includes any suitable medium capable of storing program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random access memory, etc. The term "A and / or B" means all possible combinations of A and B, such as only A, only B, or A and B. The terms "at least one A or B" or "at least one of A and B" have a similar meaning to "A and / or B" and can include only A, only B, or A and B. The singular terms "a" or "this" can also include plural forms.

[0028] like Figure 1 As shown, one embodiment of the present invention provides a streaming media forwarding method, the method comprising:

[0029] Step S110: Send the first streaming media data to the forwarding device and receive the second streaming media data from the publishing device. The first streaming media data is the previous streaming media data of the second streaming media data.

[0030] The technical solution of this embodiment can be implemented on a streaming media forwarding server to complete the transmission of streaming media data from the publishing device to the forwarding device.

[0031] Step S120: When the second streaming media data reception is completed, a data reception completion event is generated and sent to a preset publishing end through the network layer. The publishing end is used to put the second streaming media data into a preset forwarding queue when it receives the data reception completion event.

[0032] In this embodiment, the publishing end is an object created based on the publishing device. In this embodiment, the streaming media data publishing is triggered by a network layer data reception completion event when streaming media data reception is complete. In this embodiment, the data reception completion event is an asynchronous network event.

[0033] Step S130: When the first streaming media data is sent, a data transmission completion event is generated and sent to a preset forwarding end through the network layer. The forwarding end is used to retrieve the second streaming media data from the forwarding queue when it receives the data transmission completion event.

[0034] In this embodiment, the forwarding end is an object created based on the forwarding device. In this embodiment, when streaming media data transmission is complete, the network layer's data transmission completion event triggers the next streaming media data forwarding. In this embodiment, the data transmission completion event is an asynchronous network event.

[0035] Step S140: Send the retrieved second streaming media data to the forwarding device.

[0036] According to the technical solution of this embodiment, the asynchronous network events are fully utilized for streaming media forwarding, which can significantly reduce forwarding latency. At the same time, since no thread is needed for data forwarding, thread scheduling is reduced, resulting in higher forwarding performance and stronger concurrency capabilities.

[0037] like Figure 2 As shown, one embodiment of the present invention provides a streaming media forwarding method, the method comprising:

[0038] Step S210: Obtain the connection request command from the forwarding device through the network layer. The connection request command carries the flow identifier.

[0039] Step S220: When the session layer detects that the publishing end corresponds to the flow identifier, a forwarding end corresponding to the flow identifier is created.

[0040] In this embodiment, the connection request command is identified as originating from a forwarding device at the session layer. If no publishing end corresponding to the flow identifier is found, the creation of a forwarding end in the form of an object is cancelled. In this embodiment, the connection request command from the publishing device is also obtained through the network layer. When the connection request command is identified as originating from the publishing device at the session layer, a publishing end is created in the form of an object.

[0041] In this embodiment, the management of the session layer can be specifically as follows: Figure 3 As shown: Step S310, parse the connection request command. The connection request command includes information such as the stream ID (identifier) ​​and whether it is a publishing device. Determine whether the command comes from a streaming media publishing device or a receiving device based on the connection request command. If it is a publishing device, proceed to step S320; if it is a forwarding device, proceed to step S330. Step S320, create a publishing end object and save the publishing end and the corresponding stream ID record. Step S330, based on the stream ID, search for whether a publishing end exists in the created objects in the session management record. If it exists, proceed to step S340; otherwise, return an error to the requester. Step S340, create a forwarding end object and save the forwarding end and the corresponding stream ID record.

[0042] Step S230: Send the first streaming media data to the forwarding device and receive the second streaming media data from the publishing device. The first streaming media data is the previous streaming media data of the second streaming media data.

[0043] Step S240: When the second streaming media data reception is completed, a data reception completion event is generated and sent to a preset publishing end through the network layer. The publishing end is used to generate a second streaming media data object when it receives the data reception completion event. The second streaming media data object includes the second streaming media data and the identifier of the second streaming media data object, and puts the second streaming media data object into the forwarding queue.

[0044] Step S250: Determine whether there are multiple GOPs (a group of encoded frames containing a keyframe) corresponding to all streaming media data objects in the forwarding queue. If the determination result is yes, delete the streaming media data object corresponding to the non-latest GOP from the forwarding queue.

[0045] In this embodiment, only the streaming media data object corresponding to the latest picture group is retained in the forwarding queue to reduce the content of the forwarding queue, which is beneficial for the fast access of the forwarding queue.

[0046] In step S260, if the forwarding end is in a waiting state for data, the publishing end sends the second streaming media data to the forwarding end.

[0047] In this embodiment, when the forwarding end is in a waiting state for data, it means that the forwarding end has finished sending the previous streaming media data object. At this time, the publishing end will actively send the streaming media data object to the forwarding end.

[0048] In this embodiment, the process of publishing streaming media data can be specifically as follows: Figure 4 As shown: Step S410, after receiving the data reception completion event, the publishing end reads the received streaming media data from the receiving buffer according to the transmission protocol; Step S420, the publishing end creates a streaming media data object from the received streaming media data, which includes information such as stream ID, streaming media data, object identifier, reception time, and whether it is a keyframe; Step S430, the publishing end writes the streaming media data object into the streaming media sending queue corresponding to the stream ID, and the streaming media sending queue exists for each stream ID; Step S440, the streaming media information in the queue is counted to determine whether the stored streaming media information exceeds one GOP; Step S450, the streaming media data object corresponding to the earliest GOP in the queue is deleted; Step S460, if there is a forwarding end waiting for data, the latest data object is provided to the forwarding end.

[0049] Step S270: When the first streaming media data transmission is completed, a data transmission completion event is generated and sent to a preset forwarding end through the network layer. The forwarding end is used to obtain the second streaming media data object from the forwarding queue when it receives the data transmission completion event, and to obtain the second streaming media data from the second streaming media data object.

[0050] Specifically, the forwarding end determines the identifier of the second streaming media data object based on the known identifier of the first streaming media data object, and retrieves the second streaming media data object from the forwarding queue according to the identifier of the second streaming media data object.

[0051] In step S280, the forwarding end enters a data waiting state before retrieving the second streaming media data.

[0052] In this embodiment, when the forwarding end cannot obtain streaming media data from the forwarding queue, it enters a waiting data state, waiting for the publishing end to send streaming media data to it directly.

[0053] In this embodiment, the process of forwarding streaming media data can be specifically as follows: Figure 5 As shown: Step S510, retrieve the next unsent data object from the queue corresponding to the stream ID. The criterion for retrieving the next data object is the identifier of the data object that has been successfully sent last time. If the retrieval is successful, proceed to step S520; otherwise, jump to step S530. Step S520, write the streaming media data in the retrieved data object into the sending buffer and wait for the data to be sent. Step S530, the forwarding end switches to the waiting state for data and reactivates data forwarding after the publishing end has new data.

[0054] Step S290: Send the retrieved second streaming media data to the forwarding device.

[0055] Step S2100: Obtain timeout or connection disconnection events through the network layer.

[0056] Step S2110: When the session layer detects a timeout or connection disconnection event related to the publishing device, clear the publishing end and all forwarding ends corresponding to the publishing end.

[0057] Step S2120: When the session layer detects a timeout or connection disconnection event related to the forwarding device, the forwarding end is cleared, and the publishing end is cleared if there are no other forwarding ends corresponding to the publishing end.

[0058] In this embodiment, the process of handling timeout and connection disconnection events can be specifically as follows: Figure 6As shown: Step S610, after the network layer obtains the timeout and connection disconnection events, the session layer determines whether the event was caused by the publishing device or the forwarding device. If it was caused by the publishing device, proceed to step S620; if it was caused by the forwarding device, proceed to step S640. Step S620, release the publishing end object corresponding to the event (i.e., eliminate the publishing end). Step S630, based on the flow ID of the publishing end object released in S620, release all forwarding end objects with that flow ID. Step S640, release the forwarding end object corresponding to the event (i.e., eliminate the forwarding end). Step S650, based on the flow ID of the object, check whether there are other associated forwarding end objects for the publishing end of that flow ID. If not, proceed to step S660. Step S660, release the publishing end object corresponding to the flow ID of the forwarding object in S650.

[0059] In this embodiment, asynchronous network events at the network layer are used for streaming media forwarding. The network layer management work can be specifically described as follows: Figure 7 As shown: Step S710, start network port listening at the network layer; Step S720, set a new data receiving request at the network layer, and wait for the data from the publishing device to be received; Step S730, when the publishing device finishes pushing streaming media data, the network layer will trigger a data receiving completion event and send the event back to the publishing end for publishing; Step S740, set a new data sending request at the network layer, and wait for the data sent to the forwarding device to be sent; Step S750, when the data is successfully forwarded to the forwarding device, the network layer will trigger a data sending completion event and send the event back to the forwarding end to continue forwarding.

[0060] In summary, the technical solution of this embodiment provides a high-concurrency, low-latency streaming media forwarding method, which can be abstracted into a three-layer logical architecture, such as... Figure 8 As shown, the structure comprises a network layer, a publishing end and a forwarding end, and a session layer. The network layer receives and sends streaming media data and connection request commands, and sends callbacks to the session layer, the publishing end, and the forwarding end upon completion of connection, data reception, and transmission, respectively. The publishing end parses the received streaming media data and places the parsed data into a forwarding queue. The forwarding end retrieves the streaming media data from the forwarding queue and forwards it to the corresponding forwarding device. The session layer parses the connection request commands of the publishing device and the forwarding device to create publishing end and forwarding end objects, and eliminates the publishing end and the forwarding end upon timeout to disconnect the connection between the publishing device and the forwarding device. The high-concurrency, low-latency streaming media forwarding method provided in this embodiment can effectively solve the problems of insufficient concurrency, high latency, and insufficient smoothness in the streaming media forwarding process, achieving a better streaming media forwarding effect.

[0061] Those skilled in the art will understand that all or part of the processes in the method of the above embodiment of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable storage medium can include any entity or device capable of carrying the computer program code, a medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.

[0062] Furthermore, the present invention also provides a computer-readable storage medium. In one embodiment of the computer-readable storage medium according to the present invention, the computer-readable storage medium can be configured to store a program that performs the streaming media forwarding method of the above-described method embodiments. This program can be loaded and run by a processor to implement the above-described streaming media forwarding method. For ease of explanation, only the parts related to the embodiments of the present invention are shown; for specific technical details not disclosed, please refer to the method section of the embodiments of the present invention. The computer-readable storage medium can be a storage device comprising various electronic devices. Optionally, in the embodiments of the present invention, the computer-readable storage medium is a non-transitory computer-readable storage medium.

[0063] Furthermore, it should be understood that since the various modules are only provided to illustrate the functional units of the device of the present invention, the physical devices corresponding to these modules may be the processor itself, or a part of the processor's software, hardware, or a combination of software and hardware. Therefore, the number of modules shown in the figures is merely illustrative.

[0064] Those skilled in the art will understand that the various modules in the device can be adaptively split or combined. Such splitting or combining of specific modules will not cause the technical solution to deviate from the principles of the present invention; therefore, the technical solutions after splitting or combining will fall within the protection scope of the present invention.

[0065] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will all fall within the scope of protection of the present invention.

Claims

1. A method of streaming media forwarding, the method comprising: include: Send first streaming media data to the forwarding device and receive second streaming media data from the publishing device, wherein the first streaming media data is the previous streaming media data of the second streaming media data; When the second streaming media data reception is completed, a data reception completion event is generated and sent to a preset publishing end through the network layer. The publishing end is used to put the second streaming media data into a preset forwarding queue when it receives the data reception completion event. When the first streaming media data is sent, a data sending completion event is generated and sent to a preset forwarding end through the network layer. The forwarding end is used to retrieve the second streaming media data from the forwarding queue when it receives the data sending completion event. The retrieved second streaming media data is sent to the forwarding device.

2. The stream forwarding method of claim 1, wherein, The step of "the forwarding end retrieving the second streaming media data from the forwarding queue upon receiving the data transmission completion event" further includes: When the forwarding terminal has not retrieved the second streaming media data, it enters a data waiting state. The step of "the publishing end placing the second streaming media data into a preset forwarding queue upon receiving the data reception completion event" further includes: The publishing end sends the second streaming media data to the forwarding end, which is in the data waiting state.

3. The stream forwarding method of claim 1, wherein, The step of "the publishing end placing the second streaming media data into a preset forwarding queue upon receiving the data reception completion event" includes: The publishing end generates a second streaming media data object, which includes the second streaming media data and the identifier of the second streaming media data object, and puts the second streaming media data object into the forwarding queue. The step of "the forwarding end retrieving the second streaming media data from the forwarding queue upon receiving the data transmission completion event" includes: The forwarding end obtains the second streaming media data object from the forwarding queue and obtains the second streaming media data from the second streaming media data object.

4. The stream media forwarding method of claim 3, wherein, Following the step of "the publishing end placing the second streaming media data into a preset forwarding queue upon receiving the data reception completion event," the method further includes: Determine whether there are multiple picture groups corresponding to all streaming media data objects in the forwarding queue. If the determination result is yes, delete the streaming media data object corresponding to the non-latest picture group from the forwarding queue.

5. The stream media forwarding method of claim 3, wherein, The step of "the forwarding end obtaining the second streaming media data object from the forwarding queue" includes: The forwarding end determines the identifier of the second streaming media data object based on the known identifier of the first streaming media data object, and retrieves the second streaming media data object from the forwarding queue according to the identifier of the second streaming media data object.

6. The streaming media forwarding method according to claim 1, characterized in that, Before the step of "sending the first streaming media data to the forwarding device and receiving the second streaming media data from the publishing device", the following is also included: The connection request command of the forwarding device is obtained through the network layer, and the connection request command carries a flow identifier. When the session layer detects that the publishing end corresponds to the flow identifier, the forwarding end corresponding to the flow identifier is created.

7. The streaming media forwarding method according to claim 1, characterized in that, Also includes: Obtain timeout or connection loss events through the network layer; When the session layer detects that the timeout or connection disconnection event is related to the publishing device, the publishing end and all forwarding ends corresponding to the publishing end are cleared. When the session layer detects that the timeout or connection loss event is related to the forwarding device, the forwarding end is cleared, and the publishing end is cleared if there are no other forwarding ends corresponding to the publishing end.

8. A streaming media forwarding device, characterized in that, include: The transceiver module sends first streaming media data to the forwarding device and receives second streaming media data from the publishing device. The first streaming media data is the previous streaming media data of the second streaming media data. The publishing module generates a data reception completion event when the second streaming media data reception is completed, and sends it to a preset publishing end through the network layer. The publishing end is used to put the second streaming media data into a preset forwarding queue when it receives the data reception completion event. The forwarding module generates a data transmission completion event when the first streaming media data transmission is completed, and sends it to a preset forwarding end through the network layer. The forwarding end is used to retrieve the second streaming media data from the forwarding queue when it receives the data transmission completion event. The transceiver module sends the retrieved second streaming media data to the forwarding device.

9. A control device, comprising a processor and a storage device, said storage device being adapted to store a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by the processor to perform the streaming media forwarding method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by a processor to perform the streaming media forwarding method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Transmission method of streaming media, storage medium and stream media server

    CN107404480A

  • Data forwarding system and method of streaming media forwarding server

    CN111586436A