Live streaming method, content distribution service device, and storage medium

By querying the origin-fetching status of shared memory data in the live streaming system and reusing live streaming data, the device pressure caused by the high number of origin-fetching operations on internet live streaming platforms is solved, improving user experience and saving costs.

CN116033191BActive Publication Date: 2025-11-04ZTE TECH & SERVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111239620.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-25
Publication Date
2025-11-04
Estimated Expiration
2041-10-25

AI Technical Summary

Technical Problem

When facing a large number of users, internet live streaming platforms face immense pressure on live streaming data services, resulting in a poor user experience. Existing technologies struggle to effectively reduce the number of times live streams need to be retrieved from their source.

Method used

The main process distributes live streaming requests to the first-line process. The first-line process queries the origin status of the shared memory data and, if the data has already been returned to the origin through the second-line process, sends the request to the second-line process, thereby reusing live streaming data and reducing the number of origin requests.

Benefits of technology

It effectively reduces the pressure on live streaming source equipment stations, saves equipment investment and technical transformation costs, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116033191B_ABST
    Figure CN116033191B_ABST
Patent Text Reader

Abstract

The application discloses a live broadcast method, a content distribution service device and a storage medium. The live broadcast method comprises the following steps: firstly, a first live broadcast request is distributed to a first line process by a main process, the first live broadcast request representing that a first terminal device requests to acquire a first live broadcast data stream; then, the first line process queries a back-to-source state of the first live broadcast data stream from shared memory data according to the first live broadcast request, and obtains a query result; and in the case that the query result is that the first live broadcast data stream has been back-sourced by a second line process, the first line process sends the first live broadcast request to the second line process, so that the second line process sends the first live broadcast data stream to the first terminal device according to the first live broadcast request. Therefore, the reuse of the same first live broadcast data can be realized, the number of live broadcast back-to-source is effectively reduced, the pressure of a live broadcast source device station is reduced, and the device investment and technical transformation cost can be saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of live streaming technology, and in particular to a live streaming method, content distribution service equipment, and storage medium. Background Technology

[0002] In the early stages of internet development, limited network bandwidth hindered the growth of live streaming. Limited protocol support across platforms resulted in higher latency and a less-than-ideal user experience. However, the rapid development and widespread adoption of 4G and 5G technologies in recent years have propelled the live streaming industry to new heights, leading to significant growth in both market size and user base. This rapid growth, however, has also increased the pressure on live streaming platforms to handle the massive volume of data, resulting in further issues with user experience. Summary of the Invention

[0003] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.

[0004] This invention provides a live streaming method, a content distribution service device, and a storage medium, which can reduce the number of times live streaming requests are routed back to the source and reduce the pressure on the live streaming source device site of the Internet live streaming platform.

[0005] In a first aspect, embodiments of the present invention provide a live streaming method applied to a content distribution service device, the content distribution service device comprising a main process, a first-line process, and a second-line process, the method comprising:

[0006] The main process allocates the first live streaming request to the first line process, and the first live streaming request represents the first terminal device's request to obtain the first live streaming data stream;

[0007] The first-line process queries the source status of the first live data stream from the shared memory data according to the first live request, and obtains the query result;

[0008] If the query result indicates that the first live data stream has been retrieved from the source via the second line process, the first line process sends the first live request to the second line process, and the second line process sends the first live data stream to the first terminal device according to the first live request.

[0009] If the query result indicates that the first live data stream does not exist in the shared memory data, the first line process performs source-back processing on the first live data stream from the live source device according to the first live request, obtains the first live data stream, and sends the first live data stream to the first terminal device.

[0010] Secondly, embodiments of the present invention also provide a content distribution service device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the live streaming method described in the first aspect above.

[0011] Thirdly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for performing the live streaming method described above.

[0012] In this embodiment of the invention, the main process first allocates a first live streaming request to a first-line process. The first live streaming request represents a first terminal device requesting to obtain a first live streaming data stream. Then, the first-line process queries the shared memory data for the origin-fetching status of the first live streaming data stream based on the first live streaming request, obtaining the query result. If the query result indicates that the first live streaming data stream has already been processed for origin-fetching by a second-line process, the first-line process sends the first live streaming request to the second-line process, enabling the second-line process to send the first live streaming data stream to the first terminal device based on the first live streaming request. In other words, this embodiment of the invention, by querying the origin-fetching status of the first live streaming data stream from the shared memory data, and based on the query result, sending the first live streaming request to the second-line process that has already processed the origin-fetching of the first live streaming data stream, and then having the second-line process send the first live streaming data stream to the first terminal device, enables the reuse of the same first live streaming data, effectively reducing the number of live streaming origin-fetching operations, thereby reducing the pressure on the live streaming source equipment station and saving equipment investment and technical transformation costs.

[0013] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description, claims, and drawings. Attached Figure Description

[0014] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.

[0015] Figure 1 This is a schematic diagram of a system architecture for performing a live streaming method according to an embodiment of the present invention;

[0016] Figure 2 This is a flowchart of a live streaming method provided in one embodiment of the present invention;

[0017] Figure 3This is a flowchart of the back-to-source process in the case of the absence of a first live streaming data stream in a live streaming method provided by an embodiment of the present invention;

[0018] Figure 4 This is a flowchart of the first reception of a live streaming request and the return to the source in a live streaming method provided in an embodiment of the present invention;

[0019] Figure 5 This is a flowchart of the RTMP format to FLV format conversion process in a live streaming method provided by an embodiment of the present invention;

[0020] Figure 6 This is a flowchart illustrating the conversion of RTMP format to TS file format in a live streaming method provided by an embodiment of the present invention;

[0021] Figure 7 This is a flowchart of the aging live streaming data stream in a live streaming method provided in an embodiment of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0023] It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0024] This invention provides a live streaming method, a content distribution service device, and a storage medium. The live streaming method includes: firstly, a main process allocates a first live streaming request to a first-line process. The first live streaming request represents a first terminal device requesting to obtain a first live streaming data stream. Then, the first-line process queries the origin-fetching status of the first live streaming data stream from shared memory data based on the first live streaming request, obtaining a query result. If the query result indicates that the first live streaming data stream has already been processed for origin-fetching by a second-line process, the first-line process sends the first live streaming request to the second-line process, enabling the second-line process to send the first live streaming data stream to the first terminal device based on the first live streaming request. In other words, this embodiment of the invention, by querying the origin-fetching status of the first live streaming data stream from shared memory data and sending the first live streaming request to the second-line process that has already processed the origin-fetching of the first live streaming data stream based on the query result, and then sending the first live streaming data stream to the first terminal device through the second-line process, enables the reuse of the same first live streaming data, effectively reducing the number of times the live streaming data stream needs to be processed for origin-fetching, thereby reducing the pressure on the live streaming source device station and saving equipment investment and technical transformation costs.

[0025] The embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0026] like Figure 1 As shown, Figure 1 This is a schematic diagram of a system architecture platform for executing a live streaming method provided in one embodiment of the present invention.

[0027] exist Figure 1 In the example, the system architecture platform 100 includes a live streaming source device 110, a content distribution service device 120, and multiple terminal devices 130. The content distribution service device 120 includes a main process 121 and multiple line processes. The main process 121 is used to distribute the received live streaming requests to the line processes for processing. The line processes are used to return the live streaming data stream to the source according to the live streaming request and send the live streaming data stream to the terminal device 130 corresponding to the live streaming request.

[0028] It should be noted that multiple line processes may include a first line process 122, a second line process 123, a third line process 124 and a fourth line process 125, or may include a first line process 122 and a second line process 123. This embodiment does not specifically limit the number of line processes.

[0029] It should be noted that the system architecture platform 100 is applicable to scenarios such as live streaming rooms, live conferences, and live sports events, but this embodiment does not impose specific limitations on it.

[0030] In one embodiment, the content distribution service device 120, also known as a CDN content distribution service system, can receive live audio and video data in real time via pull or push streaming. It then transmits this data to the terminal device 130 via Real-Time Messaging Protocol (RTMP), HTTP-FLV protocol (which encapsulates audio and video data into streaming media (FLASH VIDEO, FLV) format and transmits it via HyperText Transfer Protocol (HTTP)), and HTTP-based adaptive bitrate streaming media transmission protocol (HTTP Live). Streaming (HLS) repackages and encapsulates the received live data stream (including live audio and video data and / or live video data). When terminal device 130 sends a live request using RTMP, HTTP-FLV, or HLS protocols, the live request can be scheduled to a CDN content distribution server through a load balancer (LVS / SLB). The CDN content distribution server will respond with a live data stream corresponding to the live protocol sent by the client and send it to the terminal device 130 corresponding to the live request, so that the terminal device 130 can play the live data stream after receiving it.

[0031] As will be understood by those skilled in the art, terminal device 130 may also be referred to as user equipment (UE), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent, or user device. In the embodiments of this application, terminal device 130 may be a mobile phone, tablet computer, computer with wireless transceiver capabilities, virtual reality (VR) terminal device, augmented reality (AR) terminal device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical care, wireless terminal in smart grid, wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home, etc.

[0032] Those skilled in the art will understand that the system architecture platform 100 can be applied to 2G, 3G, 4G, 5G communication network systems and subsequent evolved mobile communication network systems, etc., and this embodiment does not specifically limit it in this regard.

[0033] It will be understood by those skilled in the art that Figure 1 The system architecture platform shown does not constitute a limitation on the embodiments of the present invention, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0034] Based on the above system architecture platform, various embodiments of the live streaming method of the present invention are proposed below.

[0035] like Figure 2 As shown, Figure 2 This is a flowchart of a live streaming method provided in an embodiment of the present invention. The live streaming method is applied to a content distribution service device, which includes a main process, a first-line process, and a second-line process. The live streaming method includes, but is not limited to, steps S100, S200, and S300.

[0036] In step S100, the main process allocates the first live streaming request to the first-line process. The first live streaming request represents the first terminal device's request to obtain the first live streaming data stream.

[0037] Specifically, when the main process of the content distribution service device receives a first live request from the first terminal device to request the acquisition of the first live data stream, the main process can determine the first live request as the first line process from among multiple line processes, and then assign the first live request to the first line process for processing.

[0038] It should be noted that the main process is mainly used to distribute the received live streaming requests to the line processes for processing. The main process can distribute the live streaming requests evenly to each line process based on the number of live streaming requests and the number of line processes, or it can distribute the live streaming requests to a target line process based on the processing capacity of the line processes. This example does not make specific restrictions on how the main process distributes live streaming requests to line processes.

[0039] In step S200, the first-line process queries the source status of the first live data stream from the shared memory data according to the first live request, and obtains the query result.

[0040] Specifically, the first-line process can retrieve the origin status of the first live data stream from the shared memory data based on the first live request, thereby obtaining the query results.

[0041] Understandably, after each line process (first line process or second line process) performs source back processing on the live data stream, it stores the live data stream in memory, and then updates the shared memory data with the information corresponding to the live data stream and the line process information, so that each line process can look up the source back status of all line processes from the shared memory data.

[0042] In step S300, if the query result indicates that the first live data stream has been returned to the source through the second-line process, the first-line process sends the first live request to the second-line process, so that the second-line process sends the first live data stream to the first terminal device according to the first live request.

[0043] Specifically, the first-line process can determine the processing method for the first live broadcast request based on the query results. If the query result indicates that the first live broadcast data stream has been returned to the source through the second-line process, the first-line process can send the first live broadcast request to the second-line process, so that the second-line process can send the first live broadcast data stream to the first terminal device according to the first live broadcast request. This enables the reuse of the same first live broadcast data, effectively reduces the number of live broadcasts returning to the source, thereby reducing the pressure on the live broadcast source device station and saving equipment investment and technical transformation costs.

[0044] In one embodiment, when multiple line processes include a first line process, a second line process, and a third line process, and the query result indicates that the first live data stream has been retrieved from the source via the second line process, the first line process receives a first live request representing a first terminal device requesting to obtain the first live data stream, and the third line process receives a second live request representing a second terminal device requesting to obtain the first live data stream. The first line process can then send the first live request to the second line process, enabling the second line process to send the first live data stream to the first terminal device based on the first live request. Similarly, the third line process can send the second live request to the second line process, enabling the second line process to send the first live data stream to the second terminal device based on the second live request. This allows for the reuse of the same first live data, effectively reducing the number of times the live data stream is retrieved from the source, thereby reducing the pressure on the live source device station and saving on equipment investment and technical upgrade costs.

[0045] In some embodiments, such as Figure 3 As shown, the live streaming method also includes, but is not limited to, the following steps S310.

[0046] In step S310, if the query result shows that the first live data stream does not exist in the shared memory data, the first-line process performs source-back processing on the first live data stream from the live source device according to the first live request, obtains the first live data stream, and sends the first live data stream to the first terminal device.

[0047] Specifically, if the query result indicates that the first live data stream is not present in the shared memory data, it can be understood that no line process is performing a back-to-origin request for the first live data stream, or the first live data stream has been aged in memory. In this case, the first line process can perform a back-to-origin request for the first live data stream from the live source device based on the first live request, obtain the first live data stream, and send the first live data stream to the first terminal device. At the same time, the first line process can share the back-to-origin status of the first live data stream in the shared memory data, so that other line processes can look up the back-to-origin status of the first line process in the shared memory data. This enables the reuse of the same first live data, effectively reduces the number of live back-to-origin requests, thereby reducing the pressure on the live source device station and saving equipment investment and technical transformation costs.

[0048] In one embodiment, such as Figure 4 As shown, steps S410 and S420 are included before step S300.

[0049] Step S410: The main process allocates the second live streaming request to the second-line process. The second live streaming request represents the second terminal device's request to obtain the first live streaming data stream.

[0050] In step S420, the second-line process performs source-back processing on the first live data stream according to the second live request, obtains the first live data stream, and sends the first live data stream to the second terminal device.

[0051] Specifically, when the main process receives a second live streaming request, which represents a second terminal device requesting to obtain the first live streaming data stream, the main process can allocate the second live streaming request to a second-line process. Then, the second-line process can perform source retrieval processing on the first live streaming data stream according to the second live streaming request, obtain the first live streaming data stream, and send the first live streaming data stream to the second terminal device. At the same time, the second-line process can share the source retrieval status of the first live streaming data stream in shared memory data, so that other line processes can look up the source retrieval status of the first-line process from the shared memory data. This enables the reuse of the same first live streaming data, effectively reduces the number of live streaming source retrievals, thereby reducing the pressure on the live streaming source device station and saving equipment investment and technical transformation costs.

[0052] In one embodiment, when the main process receives a second live streaming request, which represents a second terminal device requesting to obtain the first live streaming data stream, the main process can obtain the load balancing information of all line processes, then determine the target line process as the second line process based on the load balancing information, and allocate the second live streaming request to the second line process. The second line process can then perform source-back processing on the first live streaming data stream according to the second live streaming request, obtain the first live streaming data stream, and send the first live streaming data stream to the second terminal device. At the same time, the second line process can share the source-back status of the first live streaming data stream in shared memory data, so that other line processes can look up the source-back status of the first line process from the shared memory data. This enables the reuse of the same first live streaming data, effectively reduces the number of live streaming source-back operations, thereby reducing the pressure on the live streaming source device station and saving equipment investment and technical transformation costs.

[0053] In one embodiment, such as Figure 5 As shown, step S300 includes, but is not limited to, the following steps S510, S520 and S530.

[0054] Step S510: The first-line process performs source-back processing on the first live data stream from the live source device according to the first live request, and obtains the first live data stream in RTMP format.

[0055] Step S520: The first-line process performs format conversion processing on the first live data stream in RTMP format to obtain the first live data stream in FLV format.

[0056] In step S530, the first-line process sends the first live data stream in FLV format to the first terminal device via the Hypertext Transfer Protocol (HTTP).

[0057] In one embodiment, when the first terminal device indicates that it needs to obtain a first live data stream in FLV format, since the first live data stream returned from the live source device is in RTMP format, the first process needs to perform format conversion processing on the RTMP format first live data stream to obtain the first live data stream in FLV format, and then send the first live data stream in FLV format to the first terminal device through the Hypertext Transfer Protocol (HTTP), so that the first terminal device can play the audio and video content of the first live data stream.

[0058] In one embodiment, after acquiring the first live data stream in RTMP format, the first-line process can perform format conversion processing on the first live data stream in RTMP format to obtain the first live data stream in FLV format. Then, the first-line process divides the first live data stream in FLV format into blocks according to the chunked transmission CHUNK encoding of the HTTP protocol, and sends the block-processed first live data stream in FLV format to the first terminal device, thereby enabling the first terminal device to play the audio and video content of the first live data stream.

[0059] In one embodiment, when the first terminal device indicates that it needs to obtain a first live data stream in FLV format, since the first live data stream returned from the live source device is in RTMP format, the first-line process can transcode the RTMP format first live data stream according to the HTTP-FLV protocol and virtualize it into an infinitely large FLV format first live data stream, and transmit it through the HTTP protocol. The first terminal device only sends an HTTP GET request, which carries the live stream name corresponding to the first live data stream to be accessed. The CDN content distribution service system can return an HTTP response, which does not carry the message body length. It directly sends the infinitely long FLV file content to the first terminal device, or uses the HTTP CHUNK mode to send the infinitely long FLV file to the first terminal device in a segmented mode, so that the first terminal device can play the audio and video content of the first live data stream.

[0060] In one embodiment, such as Figure 6 As shown, step S300 includes, but is not limited to, the following steps: S610, S620, S630, and S640.

[0061] Step S610: The first-line process performs source processing on the first live data stream from the live source device according to the first live request, and obtains the first live data stream in Real-Time Message Transmission Protocol (RTMP) format.

[0062] Step S620: The first live data stream in RTMP format is sliced ​​according to the HLS protocol of dynamic bitrate adaptation technology to generate multiple first live data streams in TS file format.

[0063] Step S630: Generate a live streaming mapping list based on the first live streaming data stream in multiple TS file formats;

[0064] Step S640: The first live data stream in TS file format is sent to the first terminal device via HTTP protocol according to the live streaming mapping list.

[0065] In one embodiment, when the first terminal device indicates that it needs to acquire a first live data stream in TS file format, since the first live data stream returned from the live source device is in RTMP format, the first-line process needs to slice the RTMP format first live data stream according to the HLS protocol to generate multiple TS file format first live data streams. Then, a live mapping list is generated based on the multiple TS file format first live data streams, and the TS file format first live data streams are sent to the first terminal device via HTTP protocol according to the live mapping list, so that the first terminal device can play the audio and video content of the first live data stream.

[0066] In one embodiment, after the first-line process receives the first live data stream in RTMP format from the source, it can generate TS slices from the first live data stream in RTMP format according to the HLS protocol, establish a storage mapping table for each TS slice, generate a live M3U8 list based on the storage mapping table of the TS slices, and then send the first live data stream in TS file format to the first terminal device via the HTTP protocol according to the live M3U8 list, thereby enabling the first terminal device to play the audio and video content of the first live data stream.

[0067] In one embodiment, such as Figure 7 As shown, the live streaming method also includes, but is not limited to, the following steps S710, S720, S730 and S740.

[0068] Step S710: The first-line process sets up a circular buffer queue in memory, which includes the first frame of data and the last frame of data.

[0069] Step S720: Determine the second video keyframe data based on multiple video keyframe data;

[0070] Step S730: If the time difference between the timestamp of the last frame data and the timestamp of the second video keyframe is greater than the preset buffer time, all live data streams in the time period between the timestamp of the first frame data and the first timestamp are aged. The first timestamp is the timestamp of the first frame data plus the preset buffer time. All live data streams include the first live data stream.

[0071] In one embodiment, the first-line process first sets up a circular buffer queue in memory. For example, the number of items in the circular buffer queue can be configured by default to 2048 items, and a cache time is preset. Each item in the circular buffer queue stores one frame of audio / video data. The first frame in the circular queue is set as gop_po, and the last frame in the circular queue is set as gop_last. When the timestamp of the frame data corresponding to the live data stream stored in the circular buffer queue exceeds the cache time, the aging rule can be set as follows: if there is only one video keyframe in the circular queue, the live data stream is not aged. At this time, it is possible that the timestamp of the frame data corresponding to the live data stream actually stored in the circular queue is greater than the cache time. When the second keyframe arrives, if the time difference between the timestamp of the frame data corresponding to gop_last and the timestamp of the second video keyframe is greater than the cache time, then all frame data (including the live data stream) from gop_pos to gop_pos+cache time is aged out. The gos_pos of the circular buffer queue jumps forward every once in a while, while gop_last increments, returning to the head of the queue after reaching the tail.

[0072] It should be noted that the number of items in the circular buffer queue can be set to 2048 items or 1024 items; this embodiment does not impose a specific limitation on it.

[0073] Under normal circumstances, when the first terminal device triggers a channel back-to-origin request, the progress of the live data stream obtained by the user, client_pos and gop_pos, should be basically consistent. However, if there is a delay in sending the live data stream to the first terminal device due to network issues, speed limits, or other reasons, client_pos will gradually fall behind gop_pos. When client_pos falls behind gop_pos by a cachetime, the client_pos of the first terminal device will jump forward by a cachetime to make client_pos equal to gop_pos.

[0074] When the second terminal device needs to watch the live data stream of the same channel as the first terminal device, the client_pos of the second terminal device is set to equal gop_pos. Then, the live data stream of client_pos + cachetime is sent to the second terminal device. The client_pos of the second terminal device will then jump forward by cachetime to make client_pos equal to gop_pos. If the low-latency mode is enabled, when the client_pos of the second terminal device is behind the most recent keyframe, it will jump forward to the latest video keyframe.

[0075] It should be noted that the above-mentioned embodiments of the live streaming method on the content distribution service device side all belong to the same inventive concept, and therefore these embodiments have the same implementation principle and technical effect, which will not be described in detail here.

[0076] In addition, one embodiment of the present invention provides a content distribution service device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0077] The processor and memory can be connected via a bus or other means.

[0078] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor 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.

[0079] It should be noted that the content distribution service device in this embodiment can be applied to, for example... Figure 1 The content distribution service device 120 in the illustrated embodiment can be configured as follows: Figure 1 The system architecture shown in the embodiments is part of the same inventive concept. Therefore, these embodiments have the same implementation principle and technical effect, which will not be described in detail here.

[0080] The non-transient software program and instructions required to implement the live streaming method of the above embodiments are stored in memory. When executed by a processor, the live streaming method in the above embodiments is executed, for example, the method described above is executed. Figure 2 Method steps S100 to S300 in the text Figure 3 Method steps S310, Figure 4 Method steps S410 to S420 in the text Figure 5 Method steps S510 to S530 in the text Figure 6 Method steps S610 to S640 in the text Figure 7 Method steps S710 to S730.

[0081] In addition, one embodiment of the present invention provides a smart panel, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0082] The processor and memory can be connected via a bus or other means.

[0083] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor 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.

[0084] The communication device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0085] Furthermore, one embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions that are executed by a processor or controller, for example, by a processor in the above-described communication device embodiment, causing the processor to perform the live streaming method described above, for example, performing the above-described... Figure 2 Method steps S100 to S300 in the text Figure 3 Method steps S310, Figure 4 Method steps S410 to S420 in the text Figure 5 Method steps S510 to S530 in the text Figure 6 Method steps S610 to S640 in the text Figure 7 Method steps S710 to S730.

[0086] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0087] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A live streaming method applied to a content distribution service device, the content distribution service device comprising a main process, a first-line process, and a second-line process, the method comprising: The main process allocates the first live streaming request to the first line process, and the first live streaming request represents the first terminal device's request to obtain the first live streaming data stream; The first-line process queries the source status of the first live data stream from the shared memory data according to the first live request, and obtains the query result; If the query result indicates that the first live data stream has been retrieved from the source via the second line process, the first line process sends the first live request to the second line process, so that the second line process sends the first live data stream to the first terminal device according to the first live request; The method further includes: A circular buffer queue is set up for memory, the circular buffer queue including the first frame of data and the last frame of data; Obtain multiple video keyframe data from the circular buffer queue; Determine the second video keyframe data based on the plurality of video keyframe data; If the time difference between the timestamp of the last frame data and the timestamp of the second video keyframe is greater than the preset buffer time, all live data streams in the time period between the timestamp of the first frame data and the first timestamp will be aged. The first timestamp is the timestamp of the first frame data plus the preset buffer time. All live data streams include the first live data stream.

2. The live streaming method according to claim 1, characterized in that, The method further includes: If the query result indicates that the first live data stream does not exist in the shared memory data, the first line process performs source-back processing on the first live data stream from the live source device according to the first live request, obtains the first live data stream, and sends the first live data stream to the first terminal device.

3. The live streaming method according to claim 1, characterized in that, Before the query result indicates that the first live data stream has been retrieved from the source via the second line process, and before the first line process sends the first live request to the second line process, and the second line process sends the first live data stream to the first terminal device based on the first live request, the method further includes: The main process allocates the second live streaming request to the second line process, and the second live streaming request represents a second terminal device requesting to obtain the first live streaming data stream; The second line process performs source-back processing on the first live data stream according to the second live request, obtains the first live data stream, and sends the first live data stream to the second terminal device.

4. The live streaming method according to claim 1, characterized in that, The main process allocates the first live streaming request to the first line process, including: The main process acquires load balancing information from the line processes; The main process allocates the first live streaming request to the first line process based on the load balancing information.

5. The live streaming method according to any one of claims 2 to 4, characterized in that, When the first live stream request indicates that the first terminal device needs to obtain a first live stream data stream in FLV format, the first thread process performs source-back processing on the first live stream data stream from the live stream source device according to the first live stream request, obtains the first live stream data stream, and sends the first live stream data stream to the first terminal device, including: The first line process performs source processing on the first live stream data stream from the live stream source device according to the first live stream request, and obtains the first live stream data stream in Real-Time Message Transfer Protocol (RTMP) format. The first line process performs format conversion processing on the first live data stream in RTMP format to obtain the first live data stream in FLV format; The first line process sends the first live data stream in FLV format to the first terminal device via the Hypertext Transfer Protocol (HTTP).

6. The live streaming method according to claim 5, characterized in that, Sending the first live data stream in FLV format to the first terminal device via the Hypertext Transfer Protocol (HTTP) includes: The first line process divides the first live data stream in FLV format into blocks according to the chunked transmission CHUNK encoding of the HTTP protocol, and sends the chunked first live data stream in FLV format to the first terminal device.

7. The live streaming method according to any one of claims 2 to 4, characterized in that, When the first live stream request indicates that the first terminal device needs to obtain a first live stream data stream in TS file format, the first thread process performs source-back processing on the first live stream data stream from the live stream source device according to the first live stream request, obtains the first live stream data stream, and sends the first live stream data stream to the first terminal device, including: The first line process performs source processing on the first live stream data stream from the live stream source device according to the first live stream request, and obtains the first live stream data stream in Real-Time Message Transfer Protocol (RTMP) format. The first live data stream in RTMP format is sliced ​​according to the HLS protocol of dynamic bitrate adaptive technology to generate multiple first live data streams in TS file format. A live streaming mapping list is generated based on the first live streaming data streams in multiple TS file formats; According to the live streaming mapping list, the first live streaming data stream in TS file format is sent to the first terminal device via HTTP protocol.

8. A content delivery service device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the live streaming method as described in any one of claims 1 to 7.

9. A computer-readable storage medium storing computer-executable instructions for performing the live streaming method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Merging back-source method and device for multiple processes of streaming media service

    CN105824707A

  • Pull stream control method, pull stream control device, readable storage medium and stream media server

    CN107302525A