Live broadcast stream processing method and device, electronic equipment, storage medium and product
Through data analysis of the live stream, acquisition of transcoding instruction information, and pre-transcoding processing, the problem of first frame loading delay and resource waste in live content transmission is solved, and the audience experience and resource utilization efficiency are improved.
Patent Information
- Application Number
- CN202410753856.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-24
AI Technical Summary
In the existing technology, during the transmission of live broadcast content, the first frame loading delay is high, resulting in video freezes, and the transcoding task scheduling is not dynamic enough, affecting the audience experience and causing serious waste of resources.
Through data analysis of the live stream, the live stream attribute information is generated, the transcoding instruction information is obtained, the transcoding is pre-processed, the first frame loading delay of the first pull request is reduced, and the resource allocation is dynamically adjusted according to the importance of transcoding.
It improves the live viewing experience, reduces the first frame loading delay of the first pull request, optimizes resource utilization, and avoids waste of bit rate resources.
Smart Images

Figure CN118695000A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of video transmission technology, and in particular to a live streaming processing method, device, electronic device, storage medium and product. Background Art
[0002] With current technology, when providing live content to users, transcoding is performed according to the stream pull request. The transcoding task is submitted only when the transcoding request arrives. When the user side makes the first stream pull request, it may cause a high delay in loading the first frame on the user side, causing the first user watching the live broadcast to experience video freezes. In addition, the transcoding task scheduling adopts a first-in-first-out queue mode based on task priority and creation time. When there are important transcoding tasks, non-important transcoding tasks are suspended, and resources cannot be dynamically adjusted according to the live stream importance label. Therefore, for some popular live broadcasts with a lower priority, transcoding may be interrupted, which will greatly affect the audience's viewing experience. In addition, since the resources allocated to multi-bitrate transcoding tasks for a single live stream are the same, the bitrate for watching the live broadcast with less bitrate will cause a waste of transcoding cluster resources. Summary of the invention
[0003] In order to solve the above technical problems, the embodiments of the present disclosure provide a live streaming processing method, device, electronic device, storage medium and product to achieve preprocessing of video transcoding and improve user experience.
[0004] A first aspect of the embodiments of the present disclosure provides a live streaming processing method, including:
[0005] Perform data analysis on the live stream to generate live stream attribute information;
[0006] According to the live stream attribute information, transcoding indication information of the live stream is obtained.
[0007] A second aspect of the embodiments of the present disclosure provides a device, including:
[0008] A data analysis module is configured to perform data analysis on the live stream to generate live stream attribute information;
[0009] An acquisition module, configured to acquire transcoding indication information of the live stream according to the live stream attribute information;
[0010] An execution module is configured to transcode or output the live stream according to the transcoding indication information.
[0011] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0012] at least one processor;
[0013] a memory for storing the at least one processor-executable instruction;
[0014] Wherein, the at least one processor is used to execute the instructions to implement the above method.
[0015] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the above method.
[0016] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, including a computer program, which implements the steps of the above-mentioned live stream processing method when executed by a processor.
[0017] At least one of the above-mentioned technical solutions adopted in the embodiments of the present disclosure can achieve the following beneficial effects: different from the prior art that transcodes after receiving the stream pulling request, this solution obtains the live broadcast attribute information of the live broadcast stream through data analysis, and transcodes the live broadcast stream that is judged to need transcoding according to the transcoding indication information in the live broadcast attribute information, that is, all transcodings are pre-transcoded before the stream pulling request, which reduces the first frame loading delay of the first stream pulling request and can improve the live broadcast viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 A system structure and logic diagram of live streaming processing provided by an embodiment of the present disclosure;
[0021] Figure 2 A flowchart of a live streaming processing method provided by an embodiment of the present disclosure;
[0022] Figure 3 A logical schematic diagram of transcoding task scheduling of a live stream processing method provided by an embodiment of the present disclosure;
[0023] Figure 4 A schematic diagram of resource allocation logic when there is a new live streaming transcoding task in an embodiment of the present disclosure;
[0024] Figure 5A schematic diagram of the structure of a live broadcast transcoding device provided by an embodiment of the present disclosure;
[0025] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;
[0026] Figure 7 A schematic diagram of the structure of an exemplary computer system provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0028] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0029] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0030] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0031] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0032] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0033] Combine the following Figure 1-Figure 7 , the method, device, electronic device, storage medium and product for live streaming processing provided by the embodiments of the present disclosure are described.
[0034] Figure 1 The system structure and logic diagram of the live streaming processing provided by the embodiment of the present disclosure are as follows: Figure 1 As shown, the present disclosure can be applied to Figure 1 In the system structure shown in Figure 1 The system structure shown includes but is not limited to: a streaming console, a data analysis module, and a source station transcoding part.
[0035] Streaming media console: mainly serves as the background control module of live streaming. Its key data includes the bit rate allowed by live streaming, the playback time of live streaming, etc.
[0036] Data analysis module: used to collect information related to the current live stream, historical data of the live broadcast room or this type of event, and streaming console properties, to generate the live stream property information, determine whether the live stream is transcoded, and the importance of transcoding the live stream.
[0037] Among them, the current live stream related information includes but is not limited to: the bit rate requested by the user client, the number of people waiting for the live broadcast or the number of people watching the live broadcast, the number of bit rate conversions and the target bit rate during the waiting or watching process, user VIP (Very Important Person, referred to as VIP) attribute information, and live event information.
[0038] Live broadcast room or historical data of this type of event: This type of live broadcast room, such as the pre-match commentary and other fixed live broadcast rooms, the main historical data includes the number of viewers, bit rate type ratio, live broadcast time, hot events, hot figures, etc.; This type of event information mainly refers to consecutive series of events such as international sports games, Universiade, Men's World Cup, etc. The main historical data includes the number of viewers, bit rate type ratio, live broadcast time, hot events, hot figures, etc.
[0039] Source station transcoding part: transcode the live stream.
[0040] Figure 2 A flowchart of a live streaming processing method provided by an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the method includes:
[0041] S211, performing data analysis on the live stream to generate live stream attribute information;
[0042] like Figure 1 As shown, for a certain live broadcast room, the data analysis module generates the live broadcast attribute information of the live broadcast according to the streaming media console and the live broadcast history information.
[0043] S212, acquiring transcoding instruction information of the live stream according to the live stream attribute information;
[0044] Generate transcoding indication information of the live stream according to the live stream attribute information, which is used to indicate whether the live stream should be transcoded.
[0045] S213: Transcode or output the live stream according to the transcoding instruction information.
[0046] like Figure 1 As shown, when the transcoding indication information indicates that transcoding is not required, the live stream is output, that is, based on the transcoding indication information obtained in step S212, when the transcoding indication information indicates that transcoding is not required, the live stream that does not require transcoding is directly submitted to the push stream edge node, and is directly output to the viewer client via the pull stream edge node. For example, some small live broadcasts with a single bit rate are judged to not require transcoding, and are directly submitted to the push stream edge node and pushed to the viewer client; when the transcoding indication information indicates that transcoding is required, the live stream is transcoded, that is, according to the transcoding indication information, the live stream that needs to be transcoded is submitted to the push stream center node. For example, for medium and large live broadcasts with multiple bit rates, it will be converted into 4K, 2K, 1080P, 720P, 480P and other bit rates, and the live stream transcoding task needs to be submitted to the source station transcoding part via the push stream center node, and pushed to the viewer client after transcoding.
[0047] In the disclosed embodiment, different from the prior art which performs transcoding after receiving the stream pulling request, the present solution obtains the live broadcast attribute information of the live broadcast stream through data analysis, and transcodes the live broadcast stream that is judged to need transcoding according to the transcoding indication information in the live broadcast attribute information, that is, all transcodings are pre-transcoded before the stream pulling request, thereby reducing the first frame loading delay of the first stream pulling request and improving the viewing experience of the live broadcast.
[0048] In one embodiment of the present disclosure, Figure 1 As shown, the processing of the live stream includes a transcoding task submission phase and a transcoding task scheduling phase.
[0049] During the transcoding task submission phase, it is necessary to determine whether the live stream should be transcoded and the importance of transcoding the live stream.
[0050] 1. Factors for determining whether the live broadcast needs to be transcoded. The main criteria for determining whether the live broadcast needs to be transcoded include but are not limited to the following:
[0051] The current number of viewers is greater than A;
[0052] The number of regions where the current number of viewers is greater than B;
[0053] The peak number of people who watched the live broadcast in history was greater than 2*A;
[0054] The number of regions where the live broadcast has been conducted in the past is greater than B;
[0055] The number of VIP users watching is greater than A / 2, and the historical peak number of VIP users watching is greater than A;
[0056] The types of live broadcasts include world-class, national-level and other series of events held by key countries.
[0057] 2. Determine the importance of transcoding the live broadcast and obtain attribute information of the importance of transcoding.
[0058] The importance of transcoding is mainly determined by gradient, including but not limited to the following:
[0059] Live broadcast type; historical number of viewers; current number of viewers; current live broadcast time.
[0060] Among them, the live broadcast type: the classification level is (the score is based on the historical data switch and is not limited to this score classification)
[0061]
[0062] Historical number of viewers: divided into levels
[0063] Serial number Live Broadcast Number of People Points 1 100K-250K 95 2 10K-100K 50 3 5K-10K 30 4 <10K 10
[0064] Current number of viewers: divided into levels (exponentially increasing)
[0065] Serial number Live Broadcast Number of People Points 1 100K-250K 95 2 10K-100K 50 3 5K-10K 30 4 <10K 10
[0066] Current live broadcast time:
[0067]
[0068] Determine the current live transcoding bitrate, mainly based on the bitrate allowed by the console;
[0069] After judgment by the data analysis module, the live stream attribute information of the live stream will be generated. The live stream attribute information mainly includes:
[0070] Target location, edge nodes for pulling streams, and central nodes for pushing streams;
[0071] Type of live stream bitrate;
[0072] The transcoding importance attribute information summarizes the above gradient values / dimension quantity as the final importance score of the live transcoding stream, that is, the transcoding importance attribute information.
[0073] In the disclosed embodiment, the data analysis module provides live stream attribute information once a minute. During the live data upload process, the target location is determined based on the live stream attribute information provided each time. When the target location changes, the client needs to determine whether the second target location is available, and switch when it is available.
[0074] Figure 3 A logical schematic diagram of transcoding task scheduling of a live streaming processing method provided in an embodiment of the present disclosure, in some embodiments, such as Figure 3As shown in the figure, in the transcoding task scheduling stage, the live stream that needs to be transcoded passes through the push center node. The push center node submits the live stream carrying the live stream attribute information to the transcoding master node of the live source station transcoding part. According to the transcoding importance attribute information in the live stream attribute information, the transcoding master node performs task segmentation, different queue allocation, and resource allocation for each task of the live stream. The transcoding slave node dynamically allocates the resources used for transcoding according to the corresponding resource shortage degree to ensure that all transcoding tasks can be transcoded.
[0075] That is, when the transcoding indication information of multiple live streams indicates that transcoding is required, the multiple live streams that need to be transcoded are segmented into transcoding tasks according to the transcoding importance attribute information of the multiple live streams. The segmentation of transcoding tasks includes: video segmentation tasks, different bitrate transcoding tasks, etc.
[0076] Based on the preset queue allocation rules, the segmented transcoding tasks are submitted to each transcoding task queue; based on the preset resource allocation rules, resources are allocated to each transcoding task queue.
[0077] Different queue allocation: The disclosed embodiment preferably divides the queues by different bit rates, and can also be divided into VIP user tasks, important events or non-important events, etc., which are not limited by the disclosed embodiment. Each transcoding task is submitted to the queue, and the transcoding tasks are executed in parallel. Different transcoding tasks obtain different resources according to their importance.
[0078] The resource allocation of each transcoding task queue based on the preset resource allocation rules includes the following rules:
[0079] Allocate resources to each transcoding task queue according to the importance of the transcoding task;
[0080] The front queue of each transcoding task queue reserves resources for new transcoding tasks;
[0081] Each transcoding task queue releases resources after the transcoding task is completed.
[0082] The resource allocation of each transcoding task queue based on the preset resource allocation rule includes:
[0083] Obtaining the hunger level of each transcoding task;
[0084] When all the transcoding tasks are starving transcoding tasks, the transcoding tasks with smaller resource allocation ratios give priority to using resources;
[0085] When all the transcoding tasks are non-starved transcoding tasks, the transcoding task with the smaller resource usage weight ratio has priority in using resources; when the resource usage weight ratios are the same, the resources are used in the order in which the transcoding tasks are submitted;
[0086] When there are both the starved transcoding tasks and the non-starved transcoding tasks among the transcoding tasks, the starved transcoding tasks preferentially use resources.
[0087] Among them, by way of example, the division of task resources adopts the following principle:
[0088] The transcoding resources are based on XXX, and the score is based on 50. When the task score is 60, 1.2 times the benchmark value resources of XXX will be obtained; when the task score is 40, 0.8 times the benchmark value resources of XXX will be obtained;
[0089] If the sum of resources in the current queue is AAA and the sum of the benchmark value resources of all tasks in the current queue is BBB, then the final resource value of each task is 1.2 times XXX * AAA * 0.9 / BBB resources;
[0090] 10% of the resources in the sum of resources in the current queue will be reserved for the submission of new live tasks;
[0091] When a new task is submitted, the reserved 10% resources will be used as the sum of resources in the current queue for initial resources;
[0092] After the transcoding task ends, the resources will be released. When the same live stream task is submitted next time, the resource situation of the current queue will be judged. Figure 4 This is a schematic diagram of the resource allocation logic when there is a new live stream transcoding task in the embodiment of the present disclosure. The judgment logic is as Figure 4 shown. When there is a new transcoding task, judge the starvation degree of the transcoding task.
[0093] When all transcoding tasks are starved transcoding tasks, the transcoding task with a smaller resource allocation ratio preferentially uses resources;
[0094] When all transcoding tasks are non-starved transcoding tasks, the transcoding task with a smaller resource usage weight ratio preferentially uses resources. When the resource usage weight ratios are the same, use resources in the order of the submission time of each transcoding task;
[0095] When there are starved transcoding tasks among the transcoding tasks, the starved transcoding tasks preferentially use resources.
[0096] The following are the explanations of relevant concepts:
[0097] Actual minimum resource share: mindshare = Min(benchmark value resources, configured minimum resources)
[0098] Whether it is starved: isNeedy = actual resource value < mindshare (actual minimum resource share)
[0099] Resource allocation ratio: minShareRatio = actual resource value / Max(mindshare,1)
[0100] Resource use weight ratio: useToWeightRatio = actual resource value / weight (i.e. importance score)
[0101] The final result of the above scheduling strategy is: the actual resource value / importance score of the transcoding stream converges to 1, but at the same time it is guaranteed that all live streams have transcoding resources.
[0102] In the disclosed embodiment, the fair scheduling model proposed in the transcoding task scheduling stage ensures that important transcoding tasks obtain sufficient resources while satisfying the execution of transcoding tasks of other levels, while ensuring that transcoding cluster resources are also utilized to the maximum extent.
[0103] The disclosed embodiment combines multiple judgment factors to transcode all bit rates supported by the client, so that the audience can watch directly without the client buffering process; for high and low priority transcoding tasks, the audience on the client perceives the delay of live viewing (that is, the low priority transcoding live broadcast is delayed by a few seconds compared to the high priority transcoding live broadcast, or causes freezes, frame drops, etc.); the data analysis module in the transcoding task submission stage allows the bit rate type to be set as the pre-transcoding stream type based on the console, initializes the transcoding task importance score based on the existing live data and historical live data, and dynamically adjusts the task importance score; based on the algorithm of the bit rate benefit ratio (not limited to parameters such as the number of viewers), different resources are allocated to different bit rates to achieve a strategy in which the bit rate benefit ratio is close to the resource ratio; the fair scheduling model proposed in the transcoding task scheduling stage, based on the transcoding type and importance score of the live stream, important tasks obtain greater resources, and low priority tasks can also be allocated resources, to ensure that the transcoding task obtains resources in units of (actual resources of the live stream / importance resource value).
[0104] Figure 5 A schematic diagram of the structure of a live broadcast transcoding device provided by an embodiment of the present disclosure is shown in FIG. Figure 5 As shown, the device 500 includes:
[0105] The data analysis module 501 is configured to perform data analysis on the live stream to generate live stream attribute information;
[0106] The acquisition module 502 is configured to acquire transcoding indication information of the live stream according to the live stream attribute information;
[0107] The execution module 503 is configured to transcode or output the live stream according to the transcoding indication information.
[0108] In some embodiments, the execution module 503 includes:
[0109] A segmentation module is configured to segment the multiple live streams that need to be transcoded into transcoding tasks according to transcoding importance attribute information when the transcoding indication information of the multiple live streams indicates that transcoding is required;
[0110] The queue module is configured to submit the segmented transcoding tasks to each transcoding task queue based on a preset queue allocation rule;
[0111] The resource module is configured to perform resource allocation for each of the transcoding task queues based on a preset resource allocation rule.
[0112] In some embodiments, the resource module includes:
[0113] A judgment module is configured to obtain the hunger level of each transcoding task;
[0114] The allocation module is configured such that when all the transcoding tasks are hungry transcoding tasks, the transcoding tasks with smaller resource allocation ratios give priority to using resources; it is also configured such that when all the transcoding tasks are non-hungry transcoding tasks, the transcoding tasks with smaller resource usage weight ratios give priority to using resources; when the resource usage weight ratios are the same, the resources are used in the order of the time in which the transcoding tasks are submitted; it is also configured such that when the hungry transcoding tasks and the non-hungry transcoding tasks exist among the transcoding tasks, the hungry transcoding tasks give priority to using resources.
[0115] In some embodiments, the resource module further includes:
[0116] A priority module, configured to allocate resources to each of the transcoding task queues according to the importance of the transcoding task;
[0117] A reservation module, configured to reserve resources for a new transcoding task in the front queue of each transcoding task queue;
[0118] The release module is configured to release resources of each transcoding task queue after the transcoding task is completed.
[0119] In some embodiments, the acquisition module 502 is further configured to obtain the transcoding indication information of the live stream as requiring transcoding based on the live stream attribute information and satisfying at least one of the following criteria, including:
[0120] The current number of viewers is greater than the first threshold;
[0121] The historical peak number of viewers is greater than the second threshold;
[0122] The number of regions where the current number of viewers is located is greater than the third threshold;
[0123] The number of regions where the number of historical viewers is greater than the fourth threshold;
[0124] The current number of VIP users watching is greater than the fifth threshold;
[0125] The historical peak number of VIP users viewing is greater than the sixth threshold;
[0126] Live broadcast types include national-level and above events.
[0127] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0128] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure is shown in FIG. Figure 6 As shown, an embodiment of the present disclosure also provides an electronic device, which includes at least one processor 601 and a memory 602 coupled to the processor 601, and the memory 602 is used to store executable instructions for at least one processor 601, wherein the at least one processor 601 is used to execute instructions to implement the steps of the above method of the embodiment of the present disclosure.
[0129] The processor 601 may also be referred to as a central processing unit (CPU), which may be an integrated circuit chip having signal processing capabilities. Each step in the method of the embodiment of the present disclosure may be completed by an integrated logic circuit of hardware in the processor 601 or by instructions in the form of software. The processor 601 may be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method in conjunction with the embodiment of the present disclosure may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a memory 602, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, or other mature storage media in the art. The processor 601 reads the information in the memory 602 and completes the steps of the method in conjunction with its hardware.
[0130] Figure 7The schematic diagram of the structure of an exemplary computer system provided by the embodiment of the present disclosure is as follows. According to the various operations / processing of the embodiment of the present disclosure, when implemented by software and / or firmware, the computer system having a dedicated hardware structure can be transmitted from a storage medium or a network, for example, Figure 7 The computer system 700 shown is installed with the programs constituting the software. When the various programs are installed, the computer system can execute various functions, including the functions described above.
[0131] Computer system 700 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0132] like Figure 7 As shown, the computer system 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the computer system 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0133] A plurality of components in the computer system 700 are connected to the I / O interface 705, including: an input unit 706, an output unit 707, a storage unit 708, and a communication unit 709. The input unit 706 may be any type of device capable of inputting information to the computer system 700, and the input unit 706 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 707 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 708 may include, but is not limited to, a disk, an optical disk. The communication unit 709 allows the computer system 700 to exchange information / data with other devices over a network such as the Internet, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, for example, a Bluetooth™ device, a WI-FI device, a WiMax device, a cellular communication device, and / or the like.
[0134] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above. For example, in some embodiments, the above-mentioned method of the embodiment of the present disclosure may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via ROM 702 and / or a communication unit 709. In some embodiments, the computing unit 701 may be configured to perform the above-mentioned method of the embodiment of the present disclosure in any other appropriate manner (e.g., by means of firmware).
[0135] An embodiment of the present disclosure provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the above method of the embodiment of the present disclosure.
[0136] The computer-readable storage medium may be a volatile memory, such as a random-access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or it may be a respective device including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc.
[0137] It should be noted that the computer-readable storage medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0138] An embodiment of the present disclosure provides a computer program product, including a computer program, which implements the steps of the above-mentioned live stream processing method when executed by a processor.
[0139] In embodiments of the present disclosure, computer program codes for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the computer, partially on the computer, as an independent software package, partially on the computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0140] The modules, components or units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the names of the modules, components or units do not, in some cases, limit the modules, components or units themselves.
[0141] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, exemplary hardware logic components that may be used include, without limitation, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), etc.
[0142] It should be noted that, in this article, terms such as "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0143] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features applied herein.
Claims
1. A live stream processing method, It is characterized in that include: Perform data analysis on the live stream to generate live stream attribute information; According to the live stream attribute information, obtaining transcoding indication information of the live stream; The live stream is transcoded or outputted according to the transcoding instruction information.
2. The method according to claim 1, It is characterized in that The live stream attribute information includes transcoding importance attribute information, and the transcoding or outputting the live stream according to the transcoding indication information includes: When the transcoding indication information of the multiple live streams indicates that transcoding is required, dividing the multiple live streams that need to be transcoded into transcoding tasks according to the transcoding importance attribute information; Based on the preset queue allocation rules, the segmented transcoding tasks are submitted to each transcoding task queue; Based on the preset resource allocation rules, resources are allocated to each of the transcoding task queues.
3. The method according to claim 2, It is characterized in that The resource allocation of each transcoding task queue based on a preset resource allocation rule includes: Obtaining the hunger level of each transcoding task; When all the transcoding tasks are starving transcoding tasks, the transcoding tasks with smaller resource allocation ratios give priority to using resources; When all the transcoding tasks are non-starved transcoding tasks, the transcoding task with the smaller resource usage weight ratio has priority in using resources; when the resource usage weight ratios are the same, the resources are used in the order in which the transcoding tasks are submitted; When the starving transcoding task and the non-starving transcoding task exist in each of the transcoding tasks, the starving transcoding task has priority in using resources.
4. The method according to claim 2, It is characterized in that The resource allocation of each transcoding task queue based on a preset resource allocation rule includes: Allocating resources to each transcoding task queue according to the importance of the transcoding task; The front queue of each transcoding task queue reserves resources for a new transcoding task; Each of the transcoding task queues releases resources after the transcoding task is completed.
5. The method according to claim 1, It is characterized in that The acquiring, according to the live stream attribute information, transcoding indication information of the live stream comprises: According to the live stream attribute information, at least one of the following conditions is satisfied, and the transcoding indication information of the live stream is obtained, indicating that transcoding is required, including: The current number of viewers is greater than the first threshold; The historical peak number of viewers is greater than the second threshold; The number of regions where the current number of viewers is located is greater than the third threshold; The number of regions where the number of historical viewers is greater than the fourth threshold; The current number of VIP users watching is greater than the fifth threshold; The historical peak number of VIP users viewing is greater than the sixth threshold; Live broadcast types include national-level and above events.
6. The method according to claim 1, It is characterized in that The transcoding or outputting the live stream according to the transcoding indication information includes: When the transcoding indication information indicates that transcoding is not required, the live stream is output.
7. A device, It is characterized in that include: A data analysis module is configured to perform data analysis on the live stream to generate live stream attribute information; An acquisition module, configured to acquire transcoding indication information of the live stream according to the live stream attribute information; The execution module is configured to transcode or output the live stream according to the transcoding indication information.
8. An electronic device, It is characterized in that include: at least one processor; a memory for storing the at least one processor-executable instruction; The at least one processor is configured to execute the instructions to implement the method as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium, It is characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the live stream processing method according to any one of claims 1 to 6 are implemented.
