Live stream multi-route transmission method and its device, equipment, medium
By performing segmented cache of live streams and real-time route scheduling, the problem of unstable live streaming transmission in large-scale live network live broadcasts is solved, and stable and high-speed live streaming transmission and audience experience are improved.
Patent Information
- Application Number
- CN202310885434.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-18
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2043-07-18
AI Technical Summary
In large-scale live events, when multiple live broadcast terminals conduct network live broadcasts at the same time, the network data transmission pressure is too high, resulting in the live stream being unable to be transmitted stably, affecting the live broadcast experience and event publicity effects, and may even lead to network crashes.
By receiving multiple live streams and splitting them into multiple live stream segments to store them in the cache area, using multiple data transmission routes for live stream broadcasting, and monitoring transmission capabilities in real time, scheduling routes with strong data transmission capabilities for live stream push, and retransmitting lost live stream segments from the cache area when switching low-capacity routes.
It ensures the stable transmission and high speed of live streams, avoids interruption of live streams on the live screen, improves the viewing experience of live viewers, and ensures the stability and publicity effect of online live streaming at large-scale events.
Smart Images

Figure CN116962734B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network live broadcast, and particularly to a method for multi-route transmission of live streams, a corresponding device, a device for multi-route transmission of live streams, and a computer-readable storage medium. Background Art
[0002] With the development of network live broadcast technology, in many offline activities, media personnel are invited to conduct network live broadcasts on-site to promote the activities or products through network live broadcasts. However, on-site network live broadcasts require high network conditions. Especially when the offline activity is a large-scale on-site event, there will be a large number of live terminals conducting network live broadcasts simultaneously at the event site. The huge data stream formed by the live streams to be pushed by a large number of live terminals places a significant data transmission pressure on the network services provided at the event site. If the network service conditions provided at the offline event site cannot bear the data transmission pressure required for network live broadcasts, resulting in unstable transmission of the live stream, the live terminals will not be able to publicize the on-site event information through network live broadcasts, which will not only affect the network live broadcast experience of media personnel and online live broadcast audiences, but also affect the publicity timeliness of offline activities. Even due to the large data transmission pressure, the network at the event site may collapse, making it impossible to conduct online publicity for offline activities through network live broadcasts. Summary of the Invention
[0003] The purpose of this application is to solve the above problems and provide a method for multi-route transmission of live streams, a corresponding device, a device for multi-route transmission of live streams, a computer-readable storage medium, and a computer program product.
[0004] According to one aspect of this application, a method for multi-route transmission of live streams is provided, including the following steps:
[0005] Receive the live streams pushed by multiple live terminals respectively, and split each of the live streams into multiple live stream segments and store them in the live stream buffer area;
[0006] Use multiple data transmission routes in the transmission route pool to push each of the live streams to the media service for live stream broadcasting;
[0007] Monitor the data transmission capabilities of each data transmission route in the transmission route pool. When it is monitored that there is a target data transmission route whose data transmission capability does not meet the preset conditions, determine the target live stream pushed by the target data transmission link;
[0008] Combine the live stream segments corresponding to the target live stream in the live stream buffer area into the target live stream, and schedule the data transmission route with stronger data transmission capability in the transmission route pool to push the target live stream to the media service for live stream broadcasting.
[0009] In a further embodiment, in the step of receiving live streams pushed by multiple live terminals respectively and splitting each of the live streams into multiple live stream segments and storing them in a live stream buffer, the following steps are included:
[0010] Receive the live stream pushed by the live terminal, and according to a preset live stream segmentation duration, divide multiple live stream intervals corresponding to the live stream segmentation time in the live stream;
[0011] Split the live stream into live stream segments corresponding to the live stream intervals, and obtain the start time of each live stream interval as the cache time of each live stream segment;
[0012] Map and store each live stream segment and the corresponding cache time in the live stream buffer.
[0013] In a further embodiment, in the step of receiving live streams pushed by multiple live terminals respectively and splitting each of the live streams into multiple live stream segments and storing them in a live stream buffer, the following steps are included:
[0014] Monitor the cache duration of the live stream segments in the live stream buffer, where the cache duration is the time difference between the cache time of the live stream segment and the current time;
[0015] Detect the timeout cache live stream segments in the live stream buffer whose cache duration exceeds a preset duration threshold, and remove the timeout cache live stream segments from the live stream buffer;
[0016] Respond to the disconnection event of the live terminal, determine the live stream identifier corresponding to the disconnection event of the live terminal, and remove the live stream segments mapped and stored in the live stream buffer with the live stream identifier.
[0017] In a further embodiment, before the step of receiving live streams pushed by multiple live terminals respectively and splitting each of the live streams into multiple live stream segments and storing them in a live stream buffer, the following steps are included:
[0018] Establish data communication connections with multiple communication routers, and store each of the communication routers as a data transmission route in a transmission route pool;
[0019] Generate a connection request including the route identifiers of each data transmission route in the transmission route pool and push it to the gateway server to drive the gateway server to establish data communication connections with each of the data transmission routes.
[0020] In a further embodiment, in the step of using multiple data transmission routes in the transmission route pool to push each of the live streams to a media service for live stream broadcasting, the following steps are included:
[0021] Determine the target data transmission routes in the transmission route pool whose data transmission capabilities meet the preset conditions;
[0022] Use each of the target data transmission routes to push the currently acquired live stream to the gateway server, so as to drive the gateway server to push the live stream to the media service for live stream broadcasting.
[0023] In a further embodiment, when monitoring the data transmission capabilities of each data transmission route in the transmission route pool and determining that there is a target data transmission route whose data transmission capability does not meet the preset conditions, the steps of determining the target live stream pushed by the target data transmission link include the following steps:
[0024] Monitor the data transmission capabilities of the data transmission routes in the transmission route pool, and the capability indicators in the data transmission capabilities include route bandwidth, route delay, data packet loss rate, or data throughput;
[0025] When it is monitored that there is a target data transmission route in the transmission route pool whose one or more capability indicators in the data transmission capability do not meet the corresponding capability conditions, determine the target live stream currently pushed by the target data transmission route;
[0026] Push a restart instruction to the communication router to which the target data transmission route belongs, and drive the communication router to restart and then establish a data transmission route connection.
[0027] In a further embodiment, in the step of combining the live stream segments corresponding to the target live stream in the live stream buffer into the target live stream and scheduling the data transmission routes with stronger data transmission capabilities in the transmission route pool to push the target live stream to the media service for live stream broadcasting, the following steps are included:
[0028] Respond to the live stream push route switching event, determine the route switching time corresponding to the live stream push route switching event, and determine the time interval with a duration of the preset retransmission live stream duration before the route switching time as the retransmission time interval;
[0029] Determine the target live stream currently pushed by the target data transmission route corresponding to the live stream push route switching event, and query multiple target live stream segments corresponding to the target live stream from the live stream buffer;
[0030] Determine one or more retransmission live stream segments among the target live stream segments whose cache times are within the retransmission time interval, and combine each of the retransmission live stream segments to the playback position corresponding to the target live stream according to the cache times of each retransmission live stream segment.
[0031] According to another aspect of the present application, there is provided a multi-route transmission device for live streams, including:
[0032] A live broadcast cache module, configured to receive live streams respectively pushed by multiple live terminals, and split each of the live streams into multiple live stream segments and store them in a live stream buffer area;
[0033] A live broadcast module, configured to use multiple data transmission routes in a transmission route pool to push each of the live streams to a media service for live stream broadcasting;
[0034] A route monitoring module, configured to monitor the data transmission capabilities of each data transmission route in the transmission route pool. When it is monitored that there is a target data transmission route whose data transmission capability does not meet a preset condition, determine the target live stream pushed by the target data transmission link;
[0035] A route scheduling module, configured to combine the live stream segments corresponding to the target live stream in the live stream buffer area into the target live stream, and schedule a data transmission route with a stronger data transmission capability in the transmission route pool to push the target live stream to a media service for live stream broadcasting.
[0036] According to another aspect of the present application, there is provided a multi-route transmission device for live streams, including a central processing unit and a memory. The central processing unit is configured to call and run a computer program stored in the memory to execute the steps of the multi-route transmission method for live streams according to the present application.
[0037] According to another aspect of the present application, there is provided a computer-readable storage medium, which stores a computer program implemented according to the multi-route transmission method for live streams in the form of computer-readable instructions. When the computer program is called and run by a computer, it executes the steps included in the method.
[0038] According to another aspect of the present application, there is provided a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, the steps of the method in any embodiment of the present application are implemented.
[0039] This application constructs a multi - route data transmission service to provide stable and high - speed network communication services for live terminals to conduct network live broadcasts. The multi - data transmission service can route the live streams pushed by each live terminal accessing the service to the media server for broadcasting through multiple data transmission lines in the transmission route pool. It schedules the transmission of live stream data on each data transmission line in the transmission route pool, which can ensure that the live stream is quickly transmitted to the media server of the corresponding network live platform for broadcast, enabling live viewers to watch live video images with low latency. Moreover, it can monitor the data transmission capabilities of each data transmission line in the transmission route pool in real - time, detect whether the transmission performance indicators of each data transmission line meet the standards when pushing the live stream. For data transmission lines with unqualified data transmission capabilities, the live stream that the data transmission line is responsible for transmitting is handed over to the data transmission lines with qualified data transmission capabilities in the transmission route pool for transmission. That is, by monitoring the data transmission capabilities of each data transmission line, it can schedule data transmission lines with excellent data transmission capabilities in real - time for live stream transmission for live terminals, ensuring the data transmission stability and transmission rate of the live stream, as well as the network live broadcast stability of the live terminal. For a large number of live terminals conducting network live broadcasts in large - scale offline activities, the multi - route data transmission service can handle the huge data transmission pressure formed by the live streams pushed by a large number of live terminals, provide reliable network communication services for the live terminals at the event site to conduct network live broadcasts, and also improve the enthusiasm of the people at the event site for network live broadcasts, enabling offline activities to be effectively promoted through network live broadcasts.
[0040] Secondly, this application will perform segmented caching on the live stream pushed by the live terminal. When using multiple data transmission lines to push the live stream, it will additionally cache multiple live stream segments of the live stream into the live stream buffer area. When it is detected that there is a data transmission line with unqualified data transmission capabilities among the data transmission lines pushing the live stream and a data transmission line switch is performed, the live stream segments corresponding to the live stream are obtained from the live stream buffer area to form a re - transmission live stream combination into the live stream, and the part of the live stream that is lost due to the data transmission line switch for the live stream or the data transmission line with low data transmission capabilities causing a live stream interruption is re - transmitted, so that when the live stream is broadcast and played in the live broadcast room, there will be no phenomenon of a black screen or dropped frames in the live broadcast image caused by the lack of part of the live stream, ensuring the live viewing experience of live viewers. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The above - mentioned and / or additional aspects and advantages of this application will become obvious and easy to understand from the following description of the embodiments in conjunction with the drawings, where:
[0042] Figure 1 It is a schematic diagram of a typical network deployment architecture related to implementing the technical solution of this application;
[0043] Figure 2 Schematic flow chart of a typical embodiment of the multi-route transmission method for live streams in this application;
[0044] Figure 3 Schematic flow chart formed by a specific embodiment in this application regarding generating corresponding live stream segments of a segmented live stream and caching them in a live stream buffer area;
[0045] Figure 4 Schematic flow chart formed by a specific embodiment in an embodiment of this application regarding clearing the live stream segments with timeout in the live stream buffer area and the live stream segments belonging to the disconnected live terminal;
[0046] Figure 5 Schematic flow chart formed by a specific embodiment in this application regarding initializing a transmission route pool and initializing a data communication connection between an aggregation router and a gateway server;
[0047] Figure 6 Schematic flow chart of a schematic flow chart formed by a specific embodiment in this application regarding pushing a live stream by invoking a data transmission route in a transmission route pool whose data transmission capability meets a preset condition;
[0048] Figure 7 Schematic flow chart formed by a specific embodiment in this application regarding monitoring the data transmission capabilities of data transmission routes in a transmission route pool and driving a communication router to which a data transmission route with a data transmission capability not meeting a preset condition belongs to perform a restart operation;
[0049] Figure 8 Schematic flow chart formed by a specific embodiment in this application regarding obtaining and combining retransmission live stream segments from a live stream buffer area for a live stream that switches a data transmission route;
[0050] Figure 9 Principle block diagram of a typical embodiment of the multi-route transmission device for live streams in this application;
[0051] Figure 10 Basic structural block diagram of a multi-route transmission device for live streams in an embodiment of this application. Detailed implementation manners
[0052] The "server" mentioned in this application can similarly be extended to the case applicable to a service cluster. According to the network deployment principle understood by those skilled in the art, the servers should be logically divided. Physically, these servers can either be independent of each other but can be invoked through interfaces, or integrated into a physical computer or a set of computer clusters. Those skilled in the art should understand this variation and should not be restricted by this when implementing the network deployment method of this application.
[0053] Those skilled in the art should be aware that: Although the various methods of this application are described based on the same concept and thus show commonality with each other, unless otherwise specified, these methods can be executed independently. Similarly, for the various embodiments disclosed in this application, they are all proposed based on the same inventive concept. Therefore, concepts with the same expression, as well as concepts that are only appropriately transformed for convenience although the concept expressions are different, should be understood equivalently.
[0054] For the various embodiments to be disclosed in this application, unless explicitly stated to be mutually exclusive, the relevant technical features involved in each embodiment can be cross - combined to flexibly construct new embodiments, as long as such combination does not deviate from the creative spirit of this application and can meet the requirements in the prior art or solve certain deficiencies in the prior art. Those skilled in the art should be aware of this flexibility.
[0055] Please refer to Figure 1 , the hardware foundation required for implementing the relevant technical solutions of this application can be deployed according to the architecture shown in the figure. The live - broadcast terminal referred to in this application, such as Figure 1 the live - broadcast terminal 101 shown. Generally, the host user conducts network live - broadcasts through the shown live - broadcast terminal 101. Figure 1 Taking the mobile - phone terminal as an example, but the live - broadcast terminal is not limited to the shown mobile - phone terminal, and can also be a computer terminal, a shooting terminal (such as a camera or a single - lens reflex camera, etc., a shooting terminal with network - communication function). The aggregation router referred to in this application, such as Figure 1 the aggregation router 102 shown, which receives the live - broadcast streams that each shown live - broadcast terminal 101 needs to broadcast. The gateway server referred to in this application Figure 3 the gateway server 104 shown, which is generally deployed in the cloud and communicates remotely with the shown aggregation router 102. The communication router in which this application is located, such as Figure 1 the communication router 103 shown, which provides a data - transmission link for the shown aggregation router 102 and the shown gateway server 104 to transmit the live - broadcast stream between them. The media server referred to in this application, such as Figure 1 the media server 105 shown, which generally belongs to the platform for the shown live - broadcast terminal 101 to conduct network live - broadcasts. The shown gateway server 104 forwards the live - broadcast stream pushed by the data - transmission route provided by the shown aggregation router 102 through one or more shown communication routers 103 to the shown media server 105, so that the shown media server 105 broadcasts the live - broadcast stream to the viewer - user terminals of the platform for playing; It can be seen that Figure 1The shown aggregation router 102, the shown communication router 103, and the shown gateway server 104 form a multi - route data transmission system to provide network communication services for the shown live terminal 101 and push live streams. The live stream push system is responsible for pushing the live streams that need to be broadcast for the network live broadcast of the live terminal 101 to the media server 105 deployed in the network live broadcast platform where the live terminal 101 is located for live stream broadcasting. Among them, the shown communication router 103 is the data transmission route in the live stream routing and push system, and the shown aggregation router 102 or the shown gateway server 104 can schedule the data transmission routes for live stream transmission to ensure that the live streams of the shown live terminal 101 can be stably and highly - speed pushed to the media server 105 for live stream broadcasting. For the offline event site, having multiple data transmission routes has strong data transmission capabilities, and can handle the data formed by the live streams pushed by a large number of live terminals for network live broadcast on - site, ensuring the stable progress of the network live broadcast at the offline event site.
[0056] Please refer to Figure 2 , in a typical embodiment of a multi - route transmission method for live streams in this application, it includes the following steps:
[0057] Step S11, receive the live streams pushed by multiple live terminals respectively, and split each of the live streams into multiple live stream segments and store them in the live stream buffer:
[0058] The live terminal is a terminal device accessing the aggregation router. The aggregation router provides network communication services for each accessed live terminal. The aggregation router conducts data transmission and interaction with the gateway server through the data transmission routes provided by multiple communication routers in the transmission route pool. The aggregation router pushes the live streams and live data (such as the host user name or the host user information such as the live platform user account password, etc.) that the live terminal needs to push for network live broadcast to the gateway server through the data transmission routes provided by the communication routers, and then the gateway server forwards and pushes the live streams and live data to the media server of the network live broadcast platform, so that the media server authenticates the platform identity of the host user of the live terminal according to the live user information contained in the live data, and broadcasts the live stream to the live room where the host user of the live terminal is located, so that the terminals where the audience users in the live room are located receive the live stream for playing.
[0059] The live terminal generally accesses the aggregation router through the wireless network connection service provided by the aggregation router (such as WIFI service), or accesses the aggregation router through the wired network interface of the aggregation router (such as LAN network interface). After the aggregation router responds to the terminal access request pushed by the live terminal, it can verify the live terminal. For example, when the aggregation router sets an access password, the aggregation router will verify whether the access password included in the received terminal access request is the preset verification password. If so, the live terminal of the terminal access request passes the verification, and the live terminal is allowed to access and network communication services are provided for it.
[0060] Regarding the live stream pushed by the live terminal, generally, the live terminal itself performs the live stream encoding operation. Of course, it can also be handed over to the aggregation router or the gateway server for the live stream encoding operation.
[0061] After the aggregation router receives the live stream pushed by the live terminal, in addition to scheduling the data transmission routes in the transmission route pool to transmit the live stream to the gateway server for forwarding and pushing to the media server for live stream broadcasting, it also splits the live stream into multiple live stream segments and stores them in the live stream buffer area to perform segmented caching operation on the live stream. So that when switching to a data transmission route with stronger data transmission ability for pushing the live stream causes a live stream disconnection, the live stream segments cached in the live stream buffer area can be combined into the live stream for pushing, supplementing the part of the live stream lost due to the disconnection in the live stream, so that when the live stream is broadcast in the live room for playing, there will be no phenomenon of missing part of the live stream causing the lack of the live picture, resulting in a black screen or dropped frames of the live picture, ensuring the live viewing experience of the live audience.
[0062] Regarding the specific implementation method of the segmented caching of the live stream by the aggregation router, after the aggregation router receives the live stream pushed by the live terminal, according to the preset live stream segmentation duration, it divides multiple live stream intervals corresponding to the live stream segmentation time in the live stream. The segmentation duration is generally set within the duration range of 10 to 20 ms. Of course, those skilled in the art can flexibly design according to needs. After dividing each of the live stream intervals of the currently received live stream, it splits the live stream into live stream segments corresponding to each of the live stream intervals, and obtains the start time of each of the live stream intervals as the caching time of each of the live stream segments, so as to facilitate the subsequent combination of the live stream corresponding to the obtained caching time into the live stream in sequence. Furthermore, it maps and stores each of the live stream segments and the corresponding caching time in the live stream buffer area.
[0063] The aggregation router can set a corresponding live stream buffer for each live stream it receives, that is, one live stream buffer is used to store the live stream segments of one live stream, and the live stream buffers can be distinguished by the live stream identifiers of the corresponding live streams. Of course, the aggregation router can also store the live stream segments of multiple live streams in the same live stream buffer, and the live stream segments in the live stream buffer are distinguished by the live stream identifiers of the live streams to which they belong.
[0064] To save the storage space of the aggregation router and improve the rate of querying live stream segments in the live stream buffer subsequently, the aggregation router will regularly clean the live stream segments in the live buffer. The aggregation router listens to the cache duration corresponding to each live stream segment in the live stream buffer. The cache duration is the time difference between the cache time of the live stream segment and the current time, or can also be the time difference between the storage time when the live stream segment is stored in the live stream buffer and the current time, so as to detect one or more live streams in the live stream buffer whose cache duration exceeds a preset duration threshold as timeout cached live stream segments, and then remove each of the timeout cached live stream segments from the live stream buffer.
[0065] In addition, for a live terminal that is disconnected from the aggregation router, the aggregation router will also remove the live stream segments corresponding to the disconnected live terminal from the live stream buffer. When the live terminal disconnects from the aggregation router, a live terminal disconnection event acting on the live terminal will be triggered. The aggregation router responds to the live terminal disconnection time, determines the live stream identifier corresponding to the live stream pushed by the live terminal, and then removes the live stream segments corresponding to the live stream identifier from the live stream buffer to unlock the storage space of the aggregation router.
[0066] Step S12, use multiple data transmission routes in the transmission route pool to push each of the live streams to the media service for live stream broadcasting:
[0067] The multiple data transmission routes in the transmission route pool are generally provided by communication routers that are wirelessly or wiredly connected to the aggregation router. The communication router can be understood as a router that accesses the Global System for Mobile Communications (GSM system) through a Subscriber Identity Module (SIM card) to obtain network communication services. For example, devices such as a wireless router (CPE) or a mobile communication device (mobile phone), or a router that accesses the Global System for Mobile Communications (GSM system) through its own optical modem to obtain network communication services, such as a broadband optical modem and other devices. The aggregation router establishes data communication connections with multiple communication routers and stores each of the communication routers as a data transmission route in the transmission route pool to collectively use the network communication services provided by each of the communication routers for live stream transmission.
[0068] In the initialization stage of a multi-route data transmission system composed of an aggregation router, communication routers, and a gateway server, the aggregation router needs to communicate and connect with multiple communication routers, so that the aggregation router takes each communication router connected to it as a data transmission route, and these data transmission routes are constructed into a transmission route pool for centralized management. After the aggregation router completes the construction of the transmission route pool, it will generate a connection request containing the route identifiers corresponding to the communication routers to which the data transmission routes in the transmission route pool belong. For example, when a communication router is a router with a user identification card, its corresponding route identifier is the communication IP corresponding to the user identification card (such as 5G IP). The aggregation router pushes the generated connection request to the gateway server, driving the gateway server to establish a data communication connection with each of the data transmission routes, so that the aggregation router can push the live stream to the gateway server through each of the data transmission routes, and then the gateway server pushes the live stream to the media server for live broadcast.
[0069] In a multi-route data transmission system, the aggregation router or the gateway server monitors the data transmission capabilities of the data transmission routes in the transmission route pool, and then schedules the data transmission routes with stronger data transmission capabilities to push the live stream, ensuring that the live streams pushed by each live terminal can be pushed stably and at a high rate. The data transmission capability generally refers to the ability indicators such as the route bandwidth, route delay, data packet loss rate, or data throughput of the data transmission route. It is necessary to monitor in real time whether the ability indicators of the data transmission routes in the transmission route pool meet the standards, so as to call the data transmission routes that meet the standards in multiple ability indicators to push the live stream. That is, using the data transmission routes with stronger data transmission capabilities to push the live stream can also be regarded as the multi-route data transmission system will monitor in real time the data transmission capabilities of the network communication services provided by each accessed communication router, so as to use the data transmission routes corresponding to the communication router with the strongest data transmission capability of the network communication service to push the live stream, ensuring a stable network communication service for the accessed live terminals to carry out network live broadcast services.
[0070] Step S13, monitor the data transmission capabilities of the data transmission routes in the transmission route pool. When a target data transmission route whose data transmission capability does not meet the preset conditions is monitored, determine the target live stream pushed by the target data transmission link:
[0071] When it is monitored that there is a target data transmission route in the transmission route pool whose data transmission capability does not meet the preset conditions, one or more target live streams currently pushed by the target data transmission route will be determined, so as to call the data transmission routes in the transmission route pool whose data transmission capabilities meet the preset conditions and are stronger to push each of the target live streams, ensuring the stable and high-rate pushing of each of the target live streams.
[0072] Regarding monitoring the data transmission capabilities of each data transmission route in the transmission route pool to detect whether the data transmission capabilities of each data transmission route meet the preset conditions, generally, it is to detect whether each capability index in the data transmission capabilities meets its corresponding capability condition, that is, to detect whether each capability index meets the standard. The capability indexes corresponding to the data transmission capabilities include route bandwidth, route delay, data packet loss rate, or data throughput. For example, a minimum broadband threshold is preset for the route bandwidth as the capability condition, and then it is judged whether the route broadband of the data transmission route exceeds the minimum broadband threshold. A maximum delay threshold is preset for the route delay, and then it is judged whether the route delay of the data transmission route is lower than the minimum delay threshold. And so on, corresponding capability conditions are set for other capability indexes such as data packet loss rate or data throughput for detection, and it is comprehensively judged whether the data transmission capabilities of each data transmission route in the transmission route pool meet the preset conditions. For a data transmission route whose data transmission capability does not meet the preset conditions, generally, the use of this data transmission route for live stream pushing will be stopped, and the communication router to which the data transmission route belongs will be restarted or the communication router will be driven to obtain network communication services from the global mobile communication system again to restart the data transmission route corresponding to the communication router, so that the data transmission capability of the data transmission route can meet the preset conditions, and then the data transmission route can be used again for stable and high-rate live stream transmission.
[0073] Step S14, combine the live stream segments corresponding to the target live stream in the live stream buffer into the target live stream, and schedule the data transmission route with stronger data transmission capability in the transmission route pool to push the target live stream to the media service for live stream broadcasting:
[0074] After detecting a data transmission route in the transmission route pool whose current data transmission capability does not meet the preset conditions and determining the target live stream currently being transmitted by this data transmission route, the live stream segments corresponding to the target live stream will be obtained from the live stream buffer for combination, and then the data transmission route with data transmission capability meeting the preset conditions and being stronger in the transmission route pool will be called to push the target live stream again.
[0075] Regarding the specific implementation manner of combining the live stream segments corresponding to the live stream for obtaining the current switched data transmission route from the live stream buffer, the aggregation router will determine the route switching time for the live stream switching data transmission route, that is, determine the time when it is detected that the data transmission capacity of the data transmission route for the live stream transmission is weak and a route switch is required. Furthermore, calculate the time interval with a duration of the pre-set retransmission live duration before the route switching time, and determine this time interval as the retransmission time interval for the live stream. For example, when the route switching time is 16:20:30 and the retransmission live duration is 2s, then the retransmission time interval is from 16:20:28 to 16:20:30 as the corresponding retransmission time interval; query the target live stream segments corresponding to the live stream from the live stream buffer, and determine the live stream segments whose cache times are within the retransmission time interval from these target live stream segments, and combine these live stream segments according to their cache times into a retransmitted live stream and synthesize it into the live stream. For example, combine the live stream segments with earlier cache times to the earlier playback positions, and combine the live stream segments with later cache times to the later playback positions, so as to form a retransmitted live stream according to the cache times of each live stream segment, so that the part of the live stream lost during the transmission due to the weak data transmission capacity of the data transmission route for the live stream can be re-obtained from the live stream buffer and the live stream segments in the corresponding time interval can be combined into the live stream for transmission, enabling the lost part of the live stream to be retransmitted, and enabling the terminal device where the live stream viewer is located to obtain a complete live stream for playback.
[0076] In addition, it is also possible to, after switching the data transmission route for the live stream, that is, after scheduling a data transmission route with strong data transmission capacity that meets the preset conditions in the route pool, then obtain the corresponding live stream segments from the live stream buffer for combination. At this time, the time interval from the time when it is detected that the data transmission capacity of the data transmission route for the live stream does not meet the preset conditions to the time when it is switched to a data transmission route with strong data transmission capacity that meets the preset conditions is used as the retransmission time interval. Furthermore, obtain the live stream segments within the retransmission time interval from the live stream segments corresponding to the live stream from the live stream buffer for live stream combination, so that the part of the live stream lost during the time of switching the data transmission route can be combined into the live stream for retransmission.
[0077] After obtaining the live stream segments corresponding to the live stream of the currently switched data transmission route from the live stream buffer area and combining them, the data transmission route with stronger data transmission capacity that meets the preset conditions in the scheduling transmission route pool is responsible for pushing the live stream to the gateway server, so as to ensure that the live stream can be stably and efficiently pushed to the gateway server for forwarding by the newly scheduled data transmission route, thereby reducing the route delay of the live stream, ensuring the timeliness of the network live broadcast of the live terminal, and enabling the live audience users to immediately receive the live stream for playback display.
[0078] The above typical embodiments and their variant embodiments fully disclose the typical implementation schemes of the multi-route transmission method of the live stream of the present application. However, various variant embodiments of this method can still be deduced by transforming and amplifying some technical means. Other embodiments are briefly described as follows:
[0079] According to another embodiment of the present application, please refer to Figure 3 , in the step of receiving the live streams pushed by multiple live terminals respectively and splitting each of the live streams into multiple live stream segments and storing them in the live stream buffer area, the following steps are included:
[0080] Step S111, receiving the live stream pushed by the live terminal, and dividing the live stream into multiple live stream intervals corresponding to the live stream segmentation duration according to the preset live stream segmentation duration:
[0081] The aggregation router receives the live stream pushed by the accessed live terminal, and divides the live stream into multiple live stream intervals corresponding to the live stream segmentation data according to the preset live stream segmentation duration. Generally, the live stream intervals are divided from the time axis of the live stream. For example, when the live stream is a video stream, one or more live stream intervals with the duration of the live stream segmentation duration are divided from the video time axis.
[0082] Step S112, splitting the live stream into live stream segments corresponding to the live stream intervals, and obtaining the start time of each live stream interval as the cache time of each live stream segment:
[0083] After dividing multiple live stream intervals from the live stream, the live stream is split into live stream segments corresponding to the live stream intervals, and the start time of each live stream interval is obtained as the cache time of the live stream segment. For example, when the live stream interval is from 17:20:30.20 to 17:20:30.30, the start time corresponding to the live stream interval is 17:20:30.20, and the cache time of the live stream segment corresponding to the live stream is 17:20:30.20 represented by the start time.
[0084] Step S113, map and store each of the live stream segments and their corresponding cache times in the live stream buffer:
[0085] After splitting a plurality of live stream segments from the live stream and determining the cache time corresponding to each live stream segment, store these live stream segments and their cache times in the live stream buffer as mapping relationship data.
[0086] In the embodiments disclosed above, by dividing the live stream into multiple live stream intervals with a preset duration, the live stream is split into live stream segments in each live stream interval for caching, so that when switching the data transmission route for the live stream, the corresponding live stream segments can be obtained from the live stream buffer for combination to retransmit the lost live stream due to switching the data transmission route or data packet loss occurring in the switched data transmission route with relatively weak transmission capacity. And record the cache time of each live stream segment, which is convenient for locating the corresponding live stream segment for recombination and determining the playback position of each live stream segment during recombination.
[0087] According to another embodiment of the present application, please refer to Figure 4 , in the step of receiving the live streams respectively pushed by multiple live terminals and splitting each of the live streams into multiple live stream segments and storing them in the live stream buffer, the following steps are included:
[0088] Step S111’, monitor the cache duration of the live stream segments in the live stream buffer, where the cache duration is the time difference between the cache time of the live stream segment and the current time:
[0089] The cache duration refers to the duration of caching the live stream segment in the live stream buffer. Generally, the time difference between the cache time of the live stream segment and the current time is used as the cache duration. Monitoring the cache duration of each live stream segment in the live stream buffer can be understood as monitoring the duration of caching each live stream segment in the live stream buffer.
[0090] Step S112’, detect the timeout cached live stream segments in the live stream buffer whose cache duration exceeds the preset duration threshold, and remove the timeout cached live stream segments from the live stream buffer:
[0091] Monitor the cache duration of each live stream segment in the live stream buffer in real time. The live stream segments detected with a cache duration exceeding the preset duration threshold will be determined as the cached live stream segments, that is, it indicates that the live stream segment is a timeout cached live stream segment whose caching duration in the live stream buffer has exceeded the preset duration threshold. At this time, the detected timeout cached live stream segments will be removed from the live stream buffer to save the storage space of the live stream buffer.
[0092] Step S113’, in response to the live terminal disconnection event, determine the live stream identifier corresponding to the live terminal disconnection event, and remove the live stream segments mapped and stored in the live stream buffer area with the live stream identifier:
[0093] The live terminal disconnection event is an event triggered when there is a live segment disconnected from the aggregation router. For example, when the geographical location of the live terminal exceeds the connection range of the aggregation router, or when the live terminal automatically disconnects from the aggregation router, the live terminal disconnection event acting on the live terminal will be triggered.
[0094] In response to the live terminal disconnection event, determine the live terminal that is currently disconnected from the aggregation router, and then query the live stream segments corresponding to the live stream identifier of the live terminal from the live stream buffer area, that is, query the live stream segments split from the live stream of the live terminal, and then remove these live stream segments from the live stream buffer area to save the storage space of the live stream buffer area.
[0095] In the embodiments disclosed above, the aggregation router will clear the live stream segments with timeout cache in the live cache area, as well as the live stream segments of the disconnected live terminal, so as to save the storage space of the aggregation router and improve the rate of querying live stream segments in the live stream buffer area subsequently.
[0096] According to another embodiment of the present application, please refer to Figure 5 , before the step of receiving the live streams pushed by multiple live terminals respectively and splitting each live stream into multiple live stream segments and storing them in the live stream buffer area, the following steps are included:
[0097] Step S09, establish data communication connections with multiple communication routers, and store each of the communication routers as a data transmission route in the transmission route pool:
[0098] The aggregation router generally establishes data communication connections through the wireless network connection service (such as WIFI service) provided by the communication router, or through the wired network interface (such as LAN network interface) provided by the communication router, and then stores the network communication service provided by the communication router for data communication connection as a data transmission route in the transmission route pool, so as to aggregate the network communication services of each communication router for live stream data transmission.
[0099] Step S10, generate a connection request including the route identifiers of each data transmission route in the transmission route pool and push it to the gateway server, and drive the gateway server to establish data communication connections with each of the data transmission routes:
[0100] In order to push the live stream to the gateway server through each data transmission route in the transmission route pool, the aggregation router needs to first push the route identifiers of each data transmission route in the transmission route pool to the gateway server, so as to facilitate the gateway server to connect to each of the data transmission routes. The aggregation router generates a connection request containing the route identifiers of each of the data transmission routes and pushes the connection request to the gateway server, so that the gateway server can connect to the data transmission routes corresponding to each route identifier in the connection request.
[0101] In the embodiments disclosed above, the aggregation router connects to each communication router and constructs a transmission route pool to store the data transmission routes of the communication routers, so as to aggregate the network communication services provided by each communication router to push the live stream, and drives the gateway server to connect to each data transmission route, facilitating the aggregation router to schedule each data transmission route to transmit the live stream with the gateway server, improving the transmission rate and transmission stability of the live stream.
[0102] According to another embodiment of the present application, please refer to Figure 6 , in the step of pushing each of the live streams to the media service for live stream broadcasting using multiple data transmission routes in the transmission route pool, the following steps are included:
[0103] Step S121, determining target data transmission routes in the transmission route pool whose data transmission capabilities meet preset conditions:
[0104] When the aggregation router receives the live stream pushed by the live terminal, in addition to segmentally caching the live stream, it also schedules multiple target data transmission routes in the transmission route pool whose data transmission capabilities meet preset conditions to perform the live stream transmission.
[0105] Step S122, using each of the target data transmission routes to push the currently acquired live stream to the gateway server, so as to drive the gateway server to push the live stream to the media service for live stream broadcasting:
[0106] The aggregation router pushes the live stream pushed by the live terminal to the gateway server through multiple target data transmission routes whose data transmission capabilities meet preset conditions, so as to drive the gateway server to forward the live stream received through the multiple target data transmission routes to the media server for network live broadcast of the live terminal, and then the media server broadcasts the live stream to the live audience terminals of the audience for playback display.
[0107] In the embodiments disclosed above, the aggregation router calls multiple data transmission routes that meet the preset conditions for the live stream pushed to the live terminal, that is, calls the data transmission route with stronger data transmission ability to transmit the live stream, so as to improve the transmission stability and transmission rate of the live stream. And through the gateway server for live stream forwarding and pushing, it can ensure that the live stream can be stably transmitted to the media server for broadcast, ensuring the stability of the live terminal for network live broadcast.
[0108] According to another embodiment of the present application, please refer to Figure 7 , in the step of listening to the data transmission capabilities of each data transmission route in the transmission route pool and determining the target live stream pushed by the target data transmission link when it is monitored that there is a target data transmission route whose data transmission capability does not meet the preset conditions, the following steps are included:
[0109] Step S131, listen to the data transmission capabilities of the data transmission routes in the transmission route pool, and the ability indicators in the data transmission capabilities include route bandwidth, route delay, data packet loss rate or data throughput:
[0110] Listen to the data transmission capabilities of all data transmission routes in the transmission route pool, that is, monitor the data transmission capabilities of the communication routers connected to the aggregation router in real time. Listening to the data transmission capabilities of the data transmission routes means listening to the various ability indicators that characterize its data transmission capabilities. The ability indicators include route bandwidth, route delay, data packet loss rate or data throughput; among them, the route bandwidth characterizes the maximum rate of data transmission on the current data transmission route, that is, the number of bits (bps) that the data transmission route can transmit per second, the route delay characterizes the node processing delay (d_proc), queuing delay (d_queue), route delay (d_trans) and propagation delay (d_prop) of the data transmission route, the data packet loss rate characterizes the packet loss probability of the data transmission route, and the data throughput characterizes the instantaneous throughput and average throughput of the data transmission route.
[0111] Step S132, when it is monitored that there is a target data transmission route in the transmission route pool whose one or more ability indicators in the data transmission capabilities do not meet the corresponding ability conditions, determine the target live stream currently pushed by the target data transmission route:
[0112] When listening to the various ability indicators (the route bandwidth, route delay, data packet loss rate or data throughput) that characterize the data transmission capabilities of the data transmission routes, detect that there are ability indicators that do not meet the corresponding ability conditions among the various ability indicators. For example, when the ability indicator is that the route bandwidth is lower than the preset minimum broadband threshold, it means that the ability indicator does not meet the corresponding ability conditions.
[0113] To ensure the most stable and fastest data transmission of the live stream, it can be set that when it is monitored that one of the ability indicators of the data transmission route responsible for pushing the live stream does not meet the corresponding ability condition, the data transmission route is deactivated, and the target live stream currently pushed by the data transmission route is determined, so as to schedule a data transmission route for which all ability indicators of the target live stream meet the corresponding ability conditions for pushing.
[0114] It is also possible to set the corresponding maximum non-compliance ability threshold. When it is monitored that the number of ability indicators that do not meet the corresponding ability conditions in the data transmission routes responsible for pushing the live stream exceeds the maximum non-compliance ability threshold, the data transmission route will be deactivated, so as to schedule a data transmission route for which the number of ability indicators that do not meet the corresponding ability conditions does not exceed the maximum non-compliance ability threshold for the target live stream currently pushed by the data transmission route for pushing.
[0115] In addition, corresponding weights can be preset for each ability indicator. Then, according to the preset weights for each ability, it is judged whether to switch the data transmission route. For example, when the ability indicators are route bandwidth, route delay, data packet loss rate, and data throughput, corresponding weights can be set for these ability indicators. A corresponding minimum ability indicator weight threshold can be set. When it is detected that among the ability indicators of the data transmission route responsible for pushing the live stream, the total weight of the ability indicators that meet the corresponding conditions is lower than the minimum ability indicator weight threshold, the data transmission route will be deactivated, so as to schedule a data transmission route for which the total weight of the ability indicators that meet the corresponding ability conditions exceeds the minimum ability indicator weight threshold for the target live stream currently pushed by the data transmission route for pushing.
[0116] Step S133, push a restart instruction to the communication router to which the target data transmission route belongs, and drive the communication router to restart and then establish a data transmission route connection:
[0117] For the target data transmission route in the transmission route pool whose data transmission ability does not meet the preset conditions, the aggregation router will push a restart instruction to the communication router to which the target data transmission route belongs to drive the communication router to restart the device or restart the network communication service. After the communication router completes the device restart or network communication service restart, the aggregation router will re-connect to the communication router to obtain the data transmission route after the communication router performs the restart operation and store it in the transmission route pool for live stream pushing.
[0118] In the embodiments disclosed above, various capability indicators of the data transmission routes in the transmission route pool are monitored in real time. When a data transmission route whose capability indicators do not meet the standards is detected, the use of the data transmission route for live stream push will be stopped, and the live stream that the data transmission route is responsible for pushing will be determined, so that the data transmission route with various capability indicators that meet the standards can be scheduled for push, thereby ensuring that the live stream can be stably and efficiently pushed to the media server for broadcast playback.
[0119] According to another embodiment of the present application, please refer to Figure 8 , combining the live stream segments corresponding to the target live stream in the live stream buffer area into the target live stream, scheduling a data transmission route with a stronger data transmission capability in the transmission route pool to push the target live stream to the media service for live stream broadcasting, including the following steps:
[0120] Step S141, in response to the live stream push route switching event, determining the route switching time corresponding to the live stream push route switching event, and determining the time interval before the route switching time as the preset retransmission live broadcast time interval as the retransmission time interval:
[0121] When a data transmission route with stronger data transmission capacity in a transmission route pool is scheduled for transmission of a live stream, the time for switching the data transmission route for the live stream is determined as the route switching time, or the time when the data transmission capacity of the data transmission route responsible for transmitting the live stream is previously monitored to not meet the preset conditions is determined as the route switching time, and then a time interval before the route switching time is determined to be the preset retransmission live broadcast time, and the time interval is used as the retransmission time interval acting on the live stream. For example, when the preset retransmission live broadcast time is 2 seconds and the route switching time is 15:20:31, the corresponding retransmission time interval is 15:20:29 to 15:20:31.
[0122] Step S142, determining the target live stream that is currently pushed by the target data transmission route corresponding to the live stream push route switching event, and querying multiple target live stream segments corresponding to the target live stream from the live stream buffer area:
[0123] The target live stream currently being route-switched is determined, and multiple target live stream segments belonging to the target live stream are queried from the live stream cache area, that is, multiple target live stream segments previously cached in segments from the target live stream are determined from the live stream cache area.
[0124] Step S143, determining one or more retransmitted live stream segments whose cache time is within the retransmission time interval in each target live stream segment, and combining each retransmitted live stream segment to a playback position corresponding to the target live stream according to the cache time of each retransmitted live stream segment:
[0125] After determining each target live stream segment corresponding to the target live stream from the live stream buffer, one or more retransmission live stream segments whose caching times are within the retransmission time interval are determined from these target live stream segments. For example, if the retransmission time interval is from 15:20:29 to 15:20:31, then the target live stream segments whose caching times are within the retransmission time interval will be determined as the retransmission live stream segments for the target live stream.
[0126] After determining the retransmission live stream segments for the target live stream from the live stream buffer, according to the caching times of each retransmission live stream segment, each retransmission live stream segment is combined into the playback position corresponding to the target live stream. For example, when the retransmission live stream segments for the target live stream are respectively the first live stream segment with a caching time of 15:20:29.20, the second live stream segment with a caching time of 15:20:29.40, and the third live stream segment with a caching time of 15:20:29.60 (of course, in the actual application scenario, there are more retransmission live streams for the target live stream than the above first to third live stream segments, and this is an example for easy understanding), then the first live stream segment is combined into the target live stream at the playback position of 15:20:29.20, the second live stream segment is combined into the target live stream at the playback position of 15:20:29.40, and the third live stream segment is combined into the target live stream at the playback position of 15:20:29.60.
[0127] In the embodiments disclosed above, by using the live stream segments cached in the live stream buffer to be combined into the live stream for retransmission, the part of the live stream lost due to the switching of the data transmission route of the live stream or the data transmission route with low data transmission capacity is supplemented, so that when the live stream is broadcast and played in the live broadcast room, there will be no phenomenon that the live broadcast screen is missing due to the lack of some live stream segments, causing the live broadcast screen to go black or have dropped frames, and ensuring the live viewing experience of the live broadcast audience.
[0128] Please refer to Figure 9, A multi - route transmission device for live - streaming adapted to one of the purposes of the present application: A live - streaming cache module 11, which is used to receive live - streams pushed by multiple live - streaming terminals respectively, and split each of the live - streams into multiple live - stream segments and store them in the live - stream buffer area; A live - streaming broadcast module 12, which is used to use multiple data transmission routes in the transmission route pool to push each of the live - streams to the media service for live - streaming broadcast; A route monitoring module 13, which is used to monitor the data transmission capabilities of each data transmission route in the transmission route pool. When it monitors that there is a target data transmission route whose data transmission capability does not meet the preset conditions, it determines the target live - stream pushed by the target data transmission link; A route scheduling module 14, which is used to combine the live - stream segments corresponding to the target live - stream in the live - stream buffer area into the target live - stream, and schedule the data transmission route with stronger data transmission capability in the transmission route pool to push the target live - stream to the media service for live - streaming broadcast.
[0129] In one embodiment, the live - streaming cache module 11 includes: A live - stream interval division sub - module, which is used to receive the live - stream pushed by the live - streaming terminal, and divide the live - stream into multiple live - stream intervals corresponding to the live - stream segmentation duration according to the preset live - stream segmentation duration; A live - stream splitting sub - module, which is used to split the live - stream into live - stream segments corresponding to each of the live - stream intervals, and obtain the start time of each of the live - stream intervals as the cache time of each of the live - stream segments; A live - stream segment caching sub - module, which is used to map - store each of the live - stream segments and the corresponding cache time in the live - stream buffer area.
[0130] In another embodiment, the live - streaming cache module 11 further includes: A cache duration monitoring sub - module, which is used to monitor the cache duration of the live - stream segments in the live - stream buffer area, and the cache duration is the time difference between the cache time of the live - stream segment and the current time; A timeout live - stream removal sub - module, which is used to detect the timeout - cached live - stream segments in the live - stream buffer area whose cache duration exceeds the preset duration threshold, and remove the timeout - cached live - stream segments from the live - stream buffer area; A disconnected - terminal stream removal sub - module, which is used to respond to the live - streaming terminal disconnection event, determine the live - stream identifier corresponding to the live - streaming terminal disconnection event, and remove the live - stream segments mapped and stored with the live - stream identifier in the live - stream buffer area.
[0131] In one embodiment, the route monitoring module 13 includes: a transmission capacity monitoring sub-module, configured to monitor the data transmission capacity of the data transmission routes in the transmission route pool, where the capacity indicators in the data transmission capacity include route bandwidth, route delay, data packet loss rate, or data throughput; a low-capacity route determination sub-module, configured to determine the target live stream currently pushed by the target data transmission route when it is monitored that there is a target data transmission route in the transmission route pool whose one or more capacity indicators in the data transmission capacity do not meet the corresponding capacity conditions; a route reconnection sub-module, configured to push a restart instruction to the communication router to which the target data transmission route belongs, and drive the communication router to reconnect the data transmission route after restarting.
[0132] In one embodiment, the route scheduling module 14 includes: a retransmission time interval determination sub-module, configured to respond to a live stream push route switching event, determine the route switching time corresponding to the live stream push route switching event, and determine a time interval with a duration of a preset retransmission live stream duration before the route switching time as the retransmission time interval; a target live stream segment query sub-module, configured to determine the target live stream currently pushed by the target data transmission route corresponding to the live stream push route switching event, and query multiple target live stream segments corresponding to the target live stream from the live stream buffer; a live stream segment combination sub-module, configured to determine one or more retransmission live stream segments whose cache times are within the retransmission time interval among the target live stream segments, and combine the retransmission live stream segments to the playing position corresponding to the target live stream according to the cache times of the retransmission live stream segments.
[0133] Another embodiment of the present application further provides a live stream multi-route transmission device. As Figure 10 shown, the live stream multi-route transmission device can be implemented by a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected through a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database can store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a live stream multi-route transmission method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device can store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the live stream multi-route transmission method of the present application. The network interface of the computer device is used to connect and communicate with the terminal. Those skilled in the art can understand, Figure 10The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0134] In this embodiment, the processor is used to execute Figure 10 the specific functions of each module in. The memory stores the program codes and various types of data required to execute the above modules or sub-modules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program codes and data required to execute all modules in the multi-route live stream transmission device of this application, and the server can call the program codes and data of the server to execute the functions of all modules.
[0135] This application also provides a computer-readable instruction storage medium. When the computer-readable instructions are executed by one or more processors, the one or more processors are caused to execute the steps of the multi-route live stream transmission method according to any embodiment of this application.
[0136] This application also provides a computer program product, including computer programs / instructions. When the computer programs / instructions are executed by one or more processors, the steps of the method according to any embodiment of this application are implemented.
[0137] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments of this application can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (RAM), etc.
[0138] The above are only some embodiments of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of this application.
[0139] To sum up, the multi-route data transmission service of this application provides a stable and high-speed network communication service for the live terminal for network live broadcast, ensures the network live broadcast stability of the live terminal, and at the same time caches the live stream pushed to the live terminal in segments to ensure the live viewing experience of the live audience.
Claims
1. A multi - route transmission method for live streams, characterized in that, Applied to an aggregation router, the aggregation router provides network communication services for each live terminal accessing it. The aggregation router performs data transmission interaction with a gateway server through data transmission routes provided by multiple communication routers in a transmission route pool. The live terminal is a terminal device accessing the aggregation router, and the live terminal is used to perform live stream encoding operations on its live stream. The method includes the following steps: Receiving live streams pushed by multiple live terminals respectively, and splitting each live stream into multiple live stream segments according to a preset live stream segmentation duration and storing them in a live stream buffer area, including: receiving the live stream pushed by the live terminal, and according to the preset live stream segmentation duration, dividing multiple live stream intervals corresponding to the live stream segmentation time in the live stream; splitting the live stream into live stream segments corresponding to each live stream interval, and obtaining the start time of each live stream interval as the cache time of each live stream segment; mapping and storing each live stream segment and the corresponding cache time in the live stream buffer area; Using multiple data transmission routes in the transmission route pool to push each live stream to a media service for live stream broadcasting, including: determining target data transmission routes in the transmission route pool whose multiple data transmission capabilities meet preset conditions; using each target data transmission route to push the currently obtained live stream to the gateway server, so as to drive the gateway server to push the live stream to the media service for live stream broadcasting; Monitoring the data transmission capabilities of each data transmission route in the transmission route pool, and when it is monitored that there is a target data transmission route whose data transmission capability does not meet the preset conditions, determining the target live stream pushed by the target data transmission route; Combining the live stream segments corresponding to the target live stream in the live stream buffer area into the target live stream, and scheduling a data transmission route with stronger data transmission capability in the transmission route pool to push the target live stream to the media service for live stream broadcasting, including: responding to a live stream push route switching event, determining the route switching time corresponding to the live stream push route switching event, and determining a time interval with a duration of a preset retransmission live duration before the route switching time as a retransmission time interval; determining the target live stream currently pushed by the target data transmission route corresponding to the live stream push route switching event, and querying multiple target live stream segments corresponding to the target live stream from the live stream buffer area; determining one or more retransmission live stream segments among the target live stream segments whose cache time is in the retransmission time interval, and combining each retransmission live stream segment into the playback position corresponding to the target live stream according to the cache time of each retransmission live stream segment.
2. The method according to claim 1, characterized in that, In the step of receiving live streams pushed by multiple live terminals respectively, and splitting each live stream into multiple live stream segments according to a preset live stream segmentation duration and storing them in a live stream buffer area, the following steps are included: Monitoring the cache duration of the live stream segments in the live stream buffer area, where the cache duration is the time difference between the cache time of the live stream segment and the current time; Detect the timeout cached live stream segments in the live stream buffer area whose cached duration exceeds the preset duration threshold, and remove the timeout cached live stream segments from the live stream buffer area; In response to the live terminal disconnection event, determine the live stream identifier corresponding to the live terminal disconnection event, and remove the live stream segments mapped and stored with the live stream identifier in the live stream buffer area.
3. The method according to claim 1, characterized in that Before the step of receiving the live streams pushed by multiple live terminals respectively and splitting each of the live streams into multiple live stream segments and storing them in the live stream buffer area, the following steps are included: Establish data communication connections with multiple communication routers, and store each of the communication routers as a data transmission route in the transmission route pool; Generate a connection request containing the route identifiers of each data transmission route in the transmission route pool and push it to the gateway server, driving the gateway server to establish data communication connections with each of the data transmission routes.
4. The method according to claim 3, wherein In the step of using multiple data transmission routes in the transmission route pool to push each of the live streams to the media service for live stream broadcasting, the following steps are included: Determine the target data transmission routes in the transmission route pool whose multiple data transmission capabilities meet the preset conditions; Use each of the target data transmission routes to push the currently acquired live stream to the gateway server, so as to drive the gateway server to push the live stream to the media service for live stream broadcasting.
5. The method according to any one of claims 1 to 4, characterized in that In the step of monitoring the data transmission capabilities of each data transmission route in the transmission route pool, when it is monitored that there is a target data transmission route whose data transmission capability does not meet the preset conditions, the following steps are included in determining the target live stream pushed by the target data transmission route: Monitor the data transmission capabilities of the data transmission routes in the transmission route pool, and the capability indicators in the data transmission capabilities include route bandwidth, route delay, data packet loss rate or data throughput; When it is monitored that there is a target data transmission route in the transmission route pool whose one or more capability indicators in the data transmission capability do not meet the corresponding capability conditions, determine the target live stream currently pushed by the target data transmission route; Push a restart instruction to the communication router to which the target data transmission route belongs, and drive the communication router to restart and then perform data transmission route connection.
6. A live stream multi-route transmission device, characterized in that, Implementing the method as described in any one of claims 1 to 5 includes: A live cache module, configured to receive the live streams pushed by multiple live terminals respectively, and split each of the live streams into multiple live stream segments according to the preset live stream segmentation duration and store them in the live stream buffer area; A live broadcast module, configured to use multiple data transmission routes in the transmission route pool to push each of the live streams to the media service for live stream broadcasting; A route monitoring module, configured to monitor the data transmission capabilities of each data transmission route in the transmission route pool, and when it is monitored that there is a target data transmission route whose data transmission capability does not meet the preset conditions, determine the target live stream pushed by the target data transmission route; The route scheduling module is used to combine the live stream segments corresponding to the target live stream in the live stream cache area into the target live stream, and schedule the data transmission route with stronger data transmission capacity in the transmission route pool to push the target live stream to the media service for live stream broadcasting.
7. A live stream multi-route transmission device, comprising a central processing unit and a memory, characterized in that, The central processing unit is used to call and run the computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that It stores a computer program implemented according to the method described in any one of claims 1 to 5 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
Citation Information
Patent Citations
Link sharing service apparatus and communication method thereof
CN101039310A
Internet video direct broadcasting method and system
CN105392020A
Live broadcast data processing method and apparatus, computer device and storage medium
CN108260024A
Data sending method and device
CN113301375A
Data transmission method and device, storage medium and electronic device
CN113365252A