Flow pushing method and device, computer equipment and computer readable storage medium
By obtaining the historical broadcast data of the target channel, determining whether to perform streaming is performed, and determining the target streaming provider in the content distribution network, the problem of slow audio and video streaming speed is solved and the user experience is improved.
Patent Information
- Application Number
- CN202411699298.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-02-25
AI Technical Summary
The audio and video streaming method based on the content distribution network has the problem of slow audio/video output, resulting in low user experience.
By obtaining the historical broadcast data of the target channel, we judge whether the push flow conditions are met, and when the conditions are met, the target push flow provider is determined, and the target push flow is pushed through the target edge server.
When the first audience enters the live broadcast room of the target channel, the audio and video stream has been actively pushed to the target edge server to realize cache preheating, improve the video output speed of the audience when entering the live broadcast room, and improve the user experience.
Smart Images

Figure CN119520838A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of content distribution, and in particular to a streaming method, apparatus, computer device, and computer-readable storage medium. Background Art
[0002] With the development of online live broadcast technology, the business content and user volume of live broadcast have also increased significantly, and the demand for audio and video backend servers will also increase. In response to this, most live broadcast platforms will choose CDN (Content Delivery Network) to push audio and video streams. On the one hand, it can reduce the pressure on the platform server and better control the cost of audio and video live broadcast; on the other hand, it has alternative transmission lines for live broadcast viewing and better disaster recovery methods.
[0003] However, the audio and video streaming method based on the content distribution network in the related art has the problem of slow audio / video output speed, resulting in a low user experience. Summary of the invention
[0004] Based on this, it is necessary to provide a streaming method, apparatus, computer device and computer-readable storage medium that can improve user experience in response to the above technical problems.
[0005] In a first aspect, the present application provides a streaming method, the method comprising:
[0006] Get the historical broadcast data of the target channel;
[0007] Determine whether the historical broadcast data meets the streaming condition, and obtain the determination result;
[0008] If the judgment result is that the historical broadcast data meets the streaming condition, determining a target streaming provider of the target channel in the content distribution network;
[0009] The target channel is streamed through a target edge server in the content distribution network provided by the target stream provider.
[0010] In one embodiment, the historical broadcast data includes the historical number of viewers of the target channel within a preset time period; and determining whether the historical broadcast data meets the streaming condition and obtaining the determination result includes:
[0011] Determine the maximum number of historical viewers according to the historical number of viewers of the target channel within the preset time period;
[0012] When the preset number of viewers is greater than or equal to the maximum number of historical viewers, determining that the judgment result is that the historical broadcast data meets the streaming condition;
[0013] When the preset number of viewers threshold is less than the historical maximum number of viewers, it is determined that the judgment result is that the historical broadcast data does not meet the streaming condition.
[0014] In one of the embodiments, determining a target streaming provider of the target channel in a content distribution network includes:
[0015] Acquire real-time resource information of multiple streaming providers associated with the target channel in the content distribution network;
[0016] A target streaming provider is determined from the plurality of streaming providers according to the real-time resource information of each streaming provider.
[0017] In one embodiment, the real-time resource information includes the number of available streaming channels; and determining a target streaming provider from the plurality of streaming providers according to the real-time resource information of each streaming provider includes:
[0018] Obtaining bandwidth subscriptions of the target channel from each of the streaming providers;
[0019] Determine a candidate streaming provider from the plurality of streaming providers according to each bandwidth subscription amount;
[0020] When the number of available streaming channels of the candidate streaming provider is greater than a preset channel number threshold, the candidate streaming provider is determined as the target streaming provider.
[0021] In one embodiment, determining a candidate streaming provider from the plurality of streaming providers according to each bandwidth subscription amount includes:
[0022] Determine the total bandwidth subscription amount of the target channel according to each bandwidth subscription amount;
[0023] Determine the selection weight ratio of each streaming provider according to the bandwidth subscription amount and the total bandwidth subscription amount;
[0024] A candidate streaming provider is determined from the plurality of streaming providers according to a selection weight ratio of each streaming provider and a preset selection algorithm.
[0025] In one embodiment, the method further comprises:
[0026] When the number of available stream push paths of the candidate stream push provider is less than or equal to the preset path number threshold, marking the candidate stream push provider as an abnormal stream push provider;
[0027] Determine a new candidate streaming provider from among multiple streaming providers excluding the abnormal streaming provider according to each bandwidth subscription amount;
[0028] Whether the candidate streaming provider is a target streaming provider is determined according to the number of streaming paths available for the candidate streaming provider.
[0029] In a second aspect, the present application provides a flow-pushing device, the device comprising:
[0030] The first acquisition module is used to acquire the historical broadcast data of the target channel;
[0031] A first judgment module is used to judge whether the historical broadcast data meets the streaming condition and obtain the judgment result;
[0032] A first determination module is used to determine a target streaming provider of the target channel in a content distribution network when the judgment result is that the historical broadcast data meets the streaming condition;
[0033] The first streaming module is configured to stream the target channel via a target edge server in the content distribution network provided by the target streaming provider.
[0034] In a third aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the streaming method described in any one of the above embodiments are implemented.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the streaming method described in any one of the above embodiments are implemented.
[0036] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the streaming method described in any one of the above embodiments.
[0037] The above-mentioned streaming method, device, computer equipment and computer-readable storage medium can determine whether it is necessary to stream the target channel through the historical broadcast data of the target channel, and can accurately screen out the target channel that needs to be streamed; when the historical broadcast data meets the streaming conditions, a target streaming provider is determined from multiple streaming providers of the target channel of the content distribution network, and the target channel is streamed through the target streaming provider on the target edge server in the content distribution network, so that when the first viewer enters the live broadcast room of the target channel, the audio and video stream of the target channel has been actively pushed to the target edge server, so that the audio and video stream of the target channel can be cached and preheated, thereby increasing the video output speed when the viewer enters the live broadcast room, and improving the viewer's experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0039] FIG1 is a schematic diagram of a flow chart of a streaming method in one embodiment;
[0040] FIG2 is a schematic diagram of a flow chart of step S102 in one embodiment;
[0041] FIG3 is a schematic diagram of a flow chart of step S103 in one embodiment;
[0042] FIG4 is a schematic diagram of a flow chart of step S302 in one embodiment;
[0043] FIG5 is a schematic diagram of a flow chart of step S402 in one embodiment;
[0044] FIG6 is a schematic diagram of a flow chart of a streaming method in another embodiment;
[0045] FIG7 is a structural block diagram of a flow-pushing device in one embodiment;
[0046] FIG. 8 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] In an exemplary embodiment, please refer to FIG. 1 , the present application provides a streaming method, which includes steps S101 to S104 , and the following description will be given by taking the application of the method to a control system as an example.
[0049] S101: Acquire historical broadcast data of a target channel.
[0050] In one example, the control system may include a control module and a channel data storage module, and the channel data storage module may record the number of viewers in the live broadcast room after each broadcast of the target channel, and generate historical broadcast data based on the recorded number of viewers. When the broadcast of the target channel is detected, the control module may call the historical broadcast data of the target channel stored in the channel data storage module to determine whether the target channel needs to be pushed according to the historical broadcast data of the target channel.
[0051] S102: Determine whether the historical broadcast data meets the streaming conditions, and obtain the determination result.
[0052] It is understandable that if the number of viewers of a live broadcast channel is small each time in the past period of time, if the live broadcast channel has been broadcasting based on the server where its own live broadcast platform is located, it may affect the viewing experience of the audience when they enter the live broadcast room. In order to improve the viewing experience of the audience, this application determines whether the historical broadcast data meets the streaming conditions and whether to actively push the audio and video streams of the live broadcast channel to the edge server in advance, so as to increase the video speed when the audience enters the live broadcast room and enhance the audience's experience.
[0053] S103: When the judgment result is that the historical broadcast data meets the streaming condition, a target streaming provider of the target channel in the content distribution network is determined.
[0054] The control system may further include a resource configuration module, which is used to record the real-time resource information of each streaming provider corresponding to the target channel, such as the number of available streaming channels, bandwidth, channel streaming threshold and other parameters of each streaming provider. If the judgment result is that the historical broadcast data meets the streaming conditions, the control module may obtain the bandwidth subscribed by the target channel from each streaming provider and the current available streaming channels of each streaming provider through the resource configuration module, and determine a target streaming provider from each streaming provider.
[0055] S104: Push streaming to the target channel through the target edge server of the target streaming provider in the content distribution network.
[0056] After determining the target streaming provider, the target edge server can be selected from the edge servers of the target streaming provider. The control module can control the edge streaming node to establish a connection with the edge control node of the target edge server, and use the RTMP protocol to stream the audio and video data from the source server of the live broadcast platform where the target channel is located to the target edge server.
[0057] The above-mentioned streaming method determines whether it is necessary to stream the target channel through the historical broadcast data of the target channel, and can accurately screen out the target channel that needs to be streamed; when the historical broadcast data meets the streaming conditions, a target streaming provider is determined from multiple streaming providers of the target channel of the content distribution network, and the target channel is streamed through the target edge server in the content distribution network by the target streaming provider, so that when the first viewer enters the live broadcast room of the target channel, the audio and video stream of the target channel has been actively pushed to the target edge server, so that the audio and video stream of the target channel can be cached and preheated, thereby increasing the video output speed when the viewer enters the live broadcast room, and improving the viewer's experience.
[0058] In an exemplary embodiment, please refer to FIG. 2 , step S102 , determining whether the historical broadcast data meets the streaming condition, and obtaining the determination result, including steps S201 to S203 .
[0059] S201: Determine the maximum number of historical viewers according to the number of historical viewers of the target channel within a preset time period.
[0060] In the application, the historical broadcast data includes the historical number of viewers of the target channel within a preset time period, for example, it may include the historical number of online viewers seven days before the current broadcast of the target channel. It is understandable that the number of online viewers of the target channel after each broadcast will fluctuate, so the maximum value max of the historical number of viewers of the target channel within the preset time period can be determined based on the historical broadcast data.
[0061] S202: When the preset number of viewers is greater than or equal to the maximum number of viewers in history, it is determined that the historical broadcast data meets the streaming condition.
[0062] In this embodiment, if the preset viewer number threshold x is greater than or equal to the historical viewer number maximum value max, max≤x, it indicates that the target channel can be pushed according to the push streaming method of the present application.
[0063] S203: When the preset number of viewers is less than the maximum number of viewers in history, it is determined that the historical broadcast data does not meet the streaming condition.
[0064] In the application, if the preset viewer threshold x is less than the historical maximum viewer value max of the target channel, it indicates that the target channel has had a large number of viewers during each live broadcast in the past period of time, and the audio and video streams of the target channel have been preheated, so there is no need to push the stream to the target channel according to the push streaming method of this application.
[0065] In an exemplary embodiment, referring to FIG. 3 , step S103 of determining a target streaming provider of a target channel in a content distribution network includes steps S301 and S302 .
[0066] S301: Acquire real-time resource information of multiple streaming providers associated with a target channel in a content distribution network.
[0067] In this embodiment, when the control module determines that it can push streams with the target channel according to the push stream method of the present application, the control module can obtain real-time resource information of multiple push stream providers associated with the target channel from the resource configuration module, such as the bandwidth subscription amount of the target channel associated with each push stream provider and the current number of push streams available for each push stream provider.
[0068] S302: Determine a target streaming provider from multiple streaming providers according to the real-time resource information of each streaming provider.
[0069] After obtaining the real-time resource information of each streaming provider, the control module can select a streaming provider that can meet the streaming demand of the target channel from among the streaming providers as the target streaming provider according to the real-time resource information of each streaming provider.
[0070] In an exemplary embodiment, please refer to FIG. 4 , step S302 , determining a target streaming provider from multiple streaming providers according to the real-time resource information of each streaming provider, including steps S401 to S403 .
[0071] S401: Obtain the bandwidth subscription amount of the target channel from each streaming provider.
[0072] In this embodiment, the real-time resource information may include the bandwidth subscription amount associated with the target channel in each streaming provider. In an example, it is assumed that the target channel has subscribed to bandwidth in three streaming providers, where the target channel has subscribed to 60Mbps bandwidth in streaming provider A, 40Mbps bandwidth in streaming provider B, and 20Mbps bandwidth in streaming provider C. This information is stored in the resource configuration module. When it is necessary to push the stream to the target channel, the control module can retrieve the bandwidth subscription amount of the target channel in each streaming provider from the resource configuration module.
[0073] S402: Determine a candidate streaming provider from a plurality of streaming providers according to each bandwidth subscription amount.
[0074] After obtaining the bandwidth subscription amount of the target channel in each streaming provider, the control module can determine a candidate streaming provider from the multiple streaming providers according to the proportion of the bandwidth subscribed by the target channel in each streaming provider.
[0075] S403: When the number of available streaming channels of the candidate streaming provider is greater than a preset channel number threshold, the candidate streaming provider is determined as the target streaming provider.
[0076] Among them, the real-time resource information may also include the current number of pushable stream paths of each push stream provider. After determining the candidate push stream provider, it is also necessary to determine whether the candidate push stream provider can push the stream based on the current number of pushable stream paths of the candidate push stream provider. Among them, the preset path threshold may be 0. If the number of pushable stream paths of the candidate push stream provider is less than or equal to the preset path threshold, it indicates that the candidate push stream provider currently does not have the ability to push the stream to the target channel. Only when the number of pushable stream paths of the candidate push stream provider is greater than the preset path threshold can the candidate push stream provider be determined as the target push stream provider.
[0077] In an exemplary embodiment, please refer to FIG. 5 , step S402 , determining a candidate streaming provider from a plurality of streaming providers according to each bandwidth subscription amount, includes steps S501 to S503 .
[0078] S501: Determine the total bandwidth subscription amount of the target channel according to each bandwidth subscription amount.
[0079] In the application, after obtaining the bandwidth subscription of the target channel in each streaming provider, the control module can first calculate the total bandwidth subscription of the target channel according to the bandwidth subscription of the target channel in each streaming provider. For example, the bandwidth subscription of the target channel in streaming provider A is 60Mbps, the bandwidth subscription of the target channel in streaming provider B is 40Mbps, and the bandwidth subscription of the target channel in streaming provider C is 20Mbps, then the total bandwidth subscription of the target channel is 120Mbps.
[0080] S502: Determine the selection weight ratio of each streaming provider according to the bandwidth subscription amount of each bandwidth and the total bandwidth subscription amount.
[0081] After that, the bandwidth subscription ratio of each streaming provider can be calculated based on the bandwidth subscription amount and total bandwidth subscription amount of the target channel in each streaming provider, and then the selection weight ratio of each streaming provider can be determined. Continuing with the above example, the bandwidth subscription ratio of the target channel in streaming provider A, streaming provider B and streaming provider C is approximately 3:2:1, and then the selection weight ratio of each streaming provider can be determined to be 3:2:1.
[0082] S503: Determine a candidate streaming provider from among multiple streaming providers according to the selection weight ratio of each streaming provider and a preset selection algorithm.
[0083] Then, a candidate push stream provider can be determined from each push stream provider through a preset selection algorithm, so that the proportion of each push stream provider determined as a candidate push stream provider within a certain selection number range roughly conforms to the selection weight ratio. Continuing with the above example, when a candidate push stream provider is determined from each push stream provider through a preset selection algorithm, in the process of selecting candidate push stream providers six times, push stream provider A is selected approximately three times, push stream provider B is selected twice, and push stream provider C is selected once.
[0084] In an exemplary embodiment, referring to FIG. 6 , the streaming method of the present application further includes steps S601 to S603 .
[0085] S601: When the number of available streaming channels of the candidate streaming provider is less than or equal to a preset channel number threshold, the candidate streaming provider is marked as an abnormal streaming provider.
[0086] If the number of available streaming channels of the selected candidate streaming provider is less than or equal to the preset channel number threshold, it indicates that the candidate streaming provider currently does not have the ability to push streams to the target channel. At this time, the candidate streaming provider should be marked as an abnormal streaming provider and a new candidate streaming provider should be selected.
[0087] S602: Determine a new candidate streaming provider from among multiple streaming providers excluding abnormal streaming providers according to each bandwidth subscription amount.
[0088] Similarly, a new candidate streaming provider is determined according to a preset algorithm based on the bandwidth subscription amounts of the remaining streaming providers among the multiple streaming providers excluding the abnormal streaming provider.
[0089] S603: Determine whether the candidate streaming provider is the target streaming provider according to the number of streaming paths available for the candidate streaming provider.
[0090] Similarly, only when the number of available streaming channels of the candidate streaming provider is greater than the preset channel threshold, can the candidate streaming provider be determined as the target streaming provider.
[0091] In another example, assuming that the number of current streaming channels that can be pushed by each streaming provider associated with the target channel is less than or equal to the preset channel threshold, that is, all streaming providers are unable to push streams to the target channel, the target channel can broadcast live based on the server where its own live broadcast platform is located without pushing streams.
[0092] In a detailed embodiment, when it is detected that the target channel has started broadcasting, the control module can obtain the historical broadcasting data stored in the channel data storage module, that is, obtain the historical number of viewers of the target channel within a preset time period, and determine the maximum historical number of viewers of the target channel based on the historical number of viewers of the target channel within the preset time period, and determine whether it is necessary to push the stream to the target channel based on the maximum historical number of viewers and the preset number of viewers threshold.
[0093] When it is determined that the maximum value of the number of historical viewers is less than or equal to the preset number of viewers threshold, the control module obtains the bandwidth subscription amount of the target channel associated with each streaming provider and the current number of available streaming channels of each streaming provider through the resource configuration module, and determines the selection weight ratio of each streaming provider according to the bandwidth subscription amount of the target channel associated with each streaming provider, and selects a candidate streaming provider from multiple streaming providers according to the preset algorithm and the selection weight ratio of each streaming provider. Afterwards, it is determined whether the current candidate streaming provider can stream the target channel according to the current number of available streaming channels of the candidate streaming provider. If the current number of available streaming channels of the candidate streaming provider is greater than 0, it indicates that the candidate streaming provider can stream the target channel, and then the target edge server can be selected from the edge servers of the target streaming provider, and the audio and video data can be streamed from the source server of the live broadcast platform where the target channel is located to the target edge server using the RTMP protocol.
[0094] If the current number of available stream paths of a candidate streaming provider is 0, it indicates that the candidate streaming provider cannot stream the target channel. Therefore, it is necessary to select a new candidate streaming provider from the remaining streaming providers excluding the candidate streaming provider according to the preset algorithm and the selection weight ratio of each streaming provider, and then determine whether the new candidate streaming provider can stream the target channel according to the number of available stream paths of the new candidate streaming provider. If the current number of available stream paths of all streaming providers is 0, the target channel will broadcast live based on the server where its own live broadcast platform is located, and will not stream.
[0095] Through the streaming method of the present application, live broadcast channels with fewer viewers can be preheated, and the target streaming provider can be flexibly selected through the real-time resource information of each streaming provider to push the stream to the target channel. When the first viewer enters the live broadcast room of the target channel, the audio and video stream of the target channel has been actively pushed to the target edge server, and there is no need to go back to the source to pull the stream after the viewer enters the live broadcast room, which improves the video output speed and can bring a good user experience.
[0096] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0097] Based on the same inventive concept, the embodiment of the present application also provides a flow-pushing device for implementing the flow-pushing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more flow-pushing device embodiments provided below can refer to the limitations of the flow-pushing method above, and will not be repeated here.
[0098] In an exemplary embodiment, as shown in FIG. 7 , the present application provides a streaming device, which includes a first acquisition module 701 , a first judgment module 702 , a first determination module 703 and a first streaming module 704 .
[0099] The first acquisition module 701 is used to acquire historical broadcast data of a target channel.
[0100] The first judgment module 702 is used to judge whether the historical broadcast data meets the streaming condition and obtain the judgment result.
[0101] The first determination module 703 is used to determine a target streaming provider of a target channel in a content distribution network when the judgment result is that the historical broadcast data meets the streaming condition.
[0102] The first streaming module 704 is used to stream a target channel through a target edge server of a target streaming provider in a content distribution network.
[0103] In an exemplary embodiment, the historical broadcast data includes the historical number of viewers of the target channel within a preset time period; the first judgment module 702 includes:
[0104] The first determination submodule is used to determine the maximum value of the number of historical viewers according to the number of historical viewers of the target channel within a preset time period.
[0105] The second determination submodule is used to determine that the historical broadcast data meets the streaming condition when the preset viewer number threshold is greater than or equal to the historical viewer number maximum value.
[0106] The third determination submodule is used to determine that the historical broadcast data does not meet the streaming condition when the preset viewer number threshold is less than the historical viewer number maximum value.
[0107] In an exemplary embodiment, the first determining module includes:
[0108] The first acquisition submodule is used to acquire real-time resource information of multiple streaming providers associated with the target channel in the content distribution network.
[0109] The fourth determination submodule is used to determine a target streaming provider from multiple streaming providers according to the real-time resource information of each streaming provider.
[0110] In an exemplary embodiment, the real-time resource information includes the number of pushable streams; the fourth determination submodule includes:
[0111] The first acquisition unit is used to acquire the bandwidth subscription amount of the target channel from each streaming provider.
[0112] The first determining unit is used to determine a candidate streaming provider from a plurality of streaming providers according to each bandwidth subscription amount.
[0113] The second determining unit is configured to determine the candidate streaming provider as the target streaming provider when the number of available streaming channels of the candidate streaming provider is greater than a preset channel number threshold.
[0114] In an exemplary embodiment, the first determining unit includes:
[0115] The first determining subunit is used to determine the total bandwidth subscription amount of the target channel according to each bandwidth subscription amount.
[0116] The second determining subunit is used to determine the selection weight ratio of each streaming provider according to the bandwidth subscription amount and the total bandwidth subscription amount.
[0117] The third determining subunit is used to determine a candidate streaming provider from a plurality of streaming providers according to a selection weight ratio of each streaming provider and a preset selection algorithm.
[0118] In an exemplary embodiment, the flow-pushing device further comprises:
[0119] The second execution module is configured to mark the candidate streaming provider as an abnormal streaming provider when the number of available streaming channels of the candidate streaming provider is less than or equal to a preset channel number threshold.
[0120] The second determining module is used to determine a new candidate streaming provider from among multiple streaming providers excluding abnormal streaming providers according to each bandwidth subscription amount.
[0121] The third determination module is used to determine whether the candidate streaming provider is the target streaming provider according to the number of streaming paths available for the candidate streaming provider.
[0122] Each module in the above streaming device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0123] In an exemplary embodiment, a computer device is provided. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of the streaming method described in any one of the above embodiments are implemented.
[0124] The computer device may be a terminal, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a streaming method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0125] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0126] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the streaming method described in any of the above embodiments are implemented.
[0127] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the streaming method described in any one of the above embodiments when executed by a processor.
[0128] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0129] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0130] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0131] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A streaming method, characterized in that: The method comprises: Get the historical broadcast data of the target channel; Determine whether the historical broadcast data meets the streaming condition, and obtain the determination result; If the judgment result is that the historical broadcast data meets the streaming condition, determining a target streaming provider of the target channel in the content distribution network; The target channel is streamed through a target edge server in the content distribution network provided by the target stream provider.
2. The streaming method according to claim 1, characterized in that: The historical broadcast data includes the historical number of viewers of the target channel within a preset time period; the determining whether the historical broadcast data meets the streaming condition and obtaining the determination result includes: Determine the maximum number of historical viewers according to the historical number of viewers of the target channel within a preset time period; When the preset number of viewers is greater than or equal to the maximum number of historical viewers, determining that the judgment result is that the historical broadcast data meets the streaming condition; When the preset number of viewers threshold is less than the historical maximum number of viewers, it is determined that the judgment result is that the historical broadcast data does not meet the streaming condition.
3. The streaming method according to claim 1, characterized in that: The step of determining a target streaming provider of the target channel in the content distribution network includes: Acquire real-time resource information of multiple streaming providers associated with the target channel in the content distribution network; A target streaming provider is determined from the plurality of streaming providers according to the real-time resource information of each streaming provider.
4. The streaming method according to claim 3, characterized in that: The real-time resource information includes the number of available streaming channels; and determining a target streaming provider from a plurality of streaming providers according to the real-time resource information of each streaming provider includes: Obtaining bandwidth subscriptions of the target channel from each of the streaming providers; Determine a candidate streaming provider from the plurality of streaming providers according to each bandwidth subscription amount; When the number of available streaming channels of the candidate streaming provider is greater than a preset channel number threshold, the candidate streaming provider is determined as the target streaming provider.
5. The streaming method according to claim 4, characterized in that: The step of determining a candidate streaming provider from the plurality of streaming providers according to each bandwidth subscription amount includes: Determine the total bandwidth subscription amount of the target channel according to each bandwidth subscription amount; Determine the selection weight ratio of each streaming provider according to the bandwidth subscription amount and the total bandwidth subscription amount; A candidate streaming provider is determined from the plurality of streaming providers according to a selection weight ratio of each streaming provider and a preset selection algorithm.
6. The streaming method according to claim 4, characterized in that: The method further comprises: When the number of available stream push paths of the candidate stream push provider is less than or equal to the preset path number threshold, marking the candidate stream push provider as an abnormal stream push provider; Determine a new candidate streaming provider from among multiple streaming providers excluding the abnormal streaming provider according to each bandwidth subscription amount; Whether the candidate streaming provider is a target streaming provider is determined according to the number of streaming paths available for the candidate streaming provider.
7. A flow-pushing device, characterized in that: The device comprises: The first acquisition module is used to acquire the historical broadcast data of the target channel; A first judgment module is used to judge whether the historical broadcast data meets the streaming condition and obtain the judgment result; A first determination module is used to determine a target streaming provider of the target channel in a content distribution network when the judgment result is that the historical broadcast data meets the streaming condition; The first streaming module is configured to stream the target channel via a target edge server in the content distribution network provided by the target streaming provider.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.