Pseudo live broadcast processing method and device, equipment and storage medium
By compressing, encoding and slicing the pre-acquisitioned videos to be broadcast, distributing them to the CDN edge node, and feedbacking the video slice and index files when the user requests, the problem of Internet live broadcast interruption or jitter is solved, and the pseudo-live broadcast effect with high fluency and stability is achieved.
Patent Information
- Application Number
- CN202411847537.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-22
AI Technical Summary
In Internet live broadcasts, pre-recorded live broadcast content may cause interruption or jitter due to network jitter or server instability, especially in large-scale events, such failures can have serious impacts.
By compressing and encoding and slicing the pre-acquisitioned video to be broadcast, the video slice and its corresponding index file are generated and distributed to the CDN edge node. When the user initiates a video streaming request, the CDN edge node feedbacks the pre-prepared video slices and index files to achieve a pseudo-live broadcast effect.
Reduces the delay in real-time encoding and slicing processing, improves the fluency and stability of live broadcasts, reduces server pressure, and improves user experience.
Smart Images

Figure CN119865628A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of video processing technology, and in particular to a pseudo live broadcast processing method, device, equipment and storage medium. Background Art
[0002] The HLS protocol is widely used in the field of Internet live broadcasting due to its simplicity and strong compatibility. In the field of Internet live broadcasting, there are some large-scale events, evening parties and other live broadcasting scenes. Due to factors such as organizers or supervision, the live broadcast content is actually recorded in advance. At the beginning of the event, it is broadcast to the outside world by simulating the anchor's push stream. However, in this case, due to network jitter, or other unexpected factors such as unstable production servers, it may cause live broadcast interruption, live broadcast jitter, etc. In large-scale events, the impact of this fault is quite severe and may cause significant losses. Summary of the invention
[0003] The embodiments of the present application provide a pseudo live broadcast processing method, device, equipment and storage medium.
[0004] In a first aspect, an embodiment of the present application provides a pseudo live broadcast processing method, the method comprising:
[0005] Compressing and encoding the pre-acquired live video to obtain compressed video data;
[0006] Slicing the compressed video data to obtain a plurality of video slices and index files corresponding to the video slices;
[0007] Pull the video slice and the index file to the CDN edge node through the live broadcast dialing system;
[0008] When it is detected that a user initiates a video streaming request, the index file corresponding to the video streaming request and the pseudo live video composed of the video slices are fed back to the user through the CDN edge node.
[0009] Optionally, compressing and encoding the pre-acquired video to be broadcast live to obtain compressed video data includes:
[0010] The pre-acquired live video is compressed and encoded according to different resolutions to obtain compressed video data corresponding to the different resolutions.
[0011] Optionally, pulling the video slice and the index file to the CDN edge node through the live broadcast dialing system includes:
[0012] Storing the video slices and index files corresponding to the video slices in a live broadcast source station;
[0013] The video slices and the index files are pulled to the CDN edge node through the live dialing system.
[0014] Optionally, the compressed video data is sliced to obtain a plurality of video slices, and the index files corresponding to the video slices include:
[0015] Slicing the compressed video data to obtain at least one video slice;
[0016] An index file corresponding to the video slice is generated according to a preset time point and the video slice corresponding to the time point.
[0017] Optionally, slicing the compressed video data to obtain at least one video slice includes:
[0018] The compressed video data is sliced according to GOP to obtain at least one video slice.
[0019] Optionally, the video streaming request includes a request time point, and when it is detected that a user initiates a video streaming request, feeding back to the user through the CDN edge node the index file corresponding to the video streaming request and the pseudo live video composed of the video slices, including:
[0020] When it is detected that a user initiates a video streaming request, the index file and the video slice corresponding to the time point are fed back to the user through the CDN edge node;
[0021] Pseudo live broadcast is started according to the index file and the video slices.
[0022] Optionally, the file name corresponding to the video slice is randomly generated, and the file name corresponding to the index file is generated through UTC.
[0023] In a second aspect, an embodiment of the present application provides a pseudo live broadcast processing device, the pseudo live broadcast processing device comprising:
[0024] The encoding module is used to compress and encode the pre-acquired live video to obtain compressed video data;
[0025] A slicing module, used for slicing the compressed video data to obtain a plurality of video slices and index files corresponding to the video slices;
[0026] A pulling module, used to pull the video slice and the index file to the CDN edge node through the live dialing system;
[0027] The pseudo live broadcast module is used to feed back the index file corresponding to the video streaming request and the pseudo live broadcast video composed of the video slices to the user through the CDN edge node when detecting that the user initiates a video streaming request.
[0028] Optionally, the encoding module includes:
[0029] The encoding submodule is used to compress and encode the pre-acquired live video according to different resolutions to obtain compressed video data corresponding to different resolutions.
[0030] Optionally, the pulling module includes:
[0031] A first pulling submodule, used to store the video slice and the index file corresponding to the video slice in the live broadcast source station;
[0032] The second pulling submodule is used to pull the video slice and the index file to the CDN edge node through the live broadcast dialing system.
[0033] Optionally, the slicing module further includes:
[0034] A first slicing submodule, configured to slice the compressed video data to obtain at least one video slice;
[0035] The second slicing submodule is used to generate an index file corresponding to the video slice according to a preset time point and the video slice corresponding to the time point.
[0036] Optionally, the first slicing submodule includes:
[0037] The first slicing unit is used to slice the compressed video data according to GOP to obtain at least one video slice.
[0038] Optionally, the pseudo live broadcast module includes:
[0039] The first pseudo live broadcast submodule is used to feed back the index file and the video slice corresponding to the time point to the user through the CDN edge node when detecting that the user initiates a video streaming request;
[0040] The second pseudo live broadcast submodule is used to start pseudo live broadcast according to the index file and the video slice.
[0041] Optionally, the slicing module is specifically used to randomly generate the file name corresponding to the video slice, and the file name corresponding to the index file is generated through UTC.
[0042] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement any of the pseudo live broadcast processing methods described above.
[0043] In a fifth aspect, an embodiment of the present application further provides a storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute any of the pseudo live broadcast processing methods described above.
[0044] In an embodiment of the present application, compressed video data is obtained by compressing and encoding the pre-acquired live video; the compressed video data is sliced to obtain several video slices and index files corresponding to the video slices; the video slices and the index files are pulled to the CDN edge node through the live dialing system; when a user is detected to initiate a video streaming request, the index file corresponding to the video streaming request and the pseudo live video composed of the video slices are fed back to the user through the CDN edge node. That is, in an embodiment of the present application, the video slices and index files required for live broadcast are distributed in advance, that is, the video content required for live broadcast is sent to the designated CDN edge node, and the simulation of the live content is completed by constructing the index file in advance, that is, the embodiment of the present application obtains the live video in advance and compresses and encodes and slices it, generates video slices and their corresponding index files, and distributes them to the CDN edge node. When the user initiates a video streaming request, the CDN edge node can respond quickly and directly feedback the pre-prepared video slices and index files, thereby achieving a pseudo live broadcast effect. This method not only reduces the delay of real-time encoding and slicing processing, but also improves the fluency and stability of live broadcast, while reducing server pressure and improving user experience.
[0045] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0047] Figure 1 It is a flowchart of a pseudo live broadcast processing method provided by an embodiment of the present application;
[0048] Figure 2 is a device block diagram of a pseudo live broadcast processing device provided in an embodiment of the present application;
[0049] Figure 3 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0050] Figure 4 This is a flowchart of an exemplary pseudo live broadcast processing method provided in an embodiment of the present application;
[0051] Figure 5 is a schematic diagram of an exemplary pseudo live broadcast processing scenario architecture provided in an embodiment of the present application;
[0052] Figure 6 This is a schematic diagram of user flow pulling in an exemplary related technology provided in an embodiment of the present application;
[0053] Figure 7 This is a schematic diagram of user streaming in an exemplary pseudo live broadcast processing method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0055] It should be noted that in the embodiments of the present application, some terms are explained to facilitate understanding by those skilled in the art.
[0056] HLS (HTTP Live Streaming) is a streaming network transmission protocol based on HTTP. It cuts the entire streaming media into a series of small media files (usually in TS format) and provides a matching media list file (m3u8 format). The client pulls these media files sequentially and plays them, thus achieving the effect of playing a continuous streaming media.
[0057] CDN (Content Delivery Network) is an intelligent virtual network built on the existing network. It deploys multiple edge server nodes in a distributed manner around the world or in a specific area, and uses the load balancing, content distribution, scheduling and other functional modules of the central platform to enable users to obtain the required content nearby, thereby reducing network congestion and improving user access response speed and hit rate.
[0058] GOP (Group of Pictures) is a concept in video coding. Specifically, GOP refers to the distance between two I frames (i.e. key frames or intra-coded frames) in a video coding sequence. A GOP is a group of continuous pictures, which is used to assist random access. The first picture of a GOP must be an I frame, which ensures that the GOP does not need to refer to other pictures and can be decoded independently. When compressing a video, the video sequence is first divided into several groups of pictures GOP, and then compressed in units of GOP.
[0059] UTC (Coordinated Universal Time) is a time measurement system based on the length of atomic seconds. It aims to overcome the time differences between different countries and regions and achieve global time synchronization.
[0060] The live broadcast source station refers to the server or device responsible for generating, providing or storing live video streams during the live broadcast process. It is the starting point of the live stream, that is, the live content is encoded, transmitted and finally presented to the audience from here.
[0061] The live broadcast test system is an automated testing tool that tests and monitors various indicators of online live broadcast services by simulating the behavior of users watching live broadcasts. The system can collect performance data and quality information during the live broadcast process, helping developers and operation and maintenance personnel to discover and solve problems in a timely manner, and improve the stability of live broadcast services and user experience.
[0062] Figure 1 is a flowchart of a pseudo live broadcast processing method provided by an embodiment of the present application, such as Figure 1 As shown, the method includes:
[0063] Step 101, compressing and encoding the pre-acquired live video to obtain compressed video data;
[0064] Furthermore, the pre-acquired live video is compressed and encoded to obtain compressed video data, including:
[0065] The pre-acquired live video is compressed and encoded according to different resolutions to obtain compressed video data corresponding to the different resolutions.
[0066] It should be noted that, in the embodiment of the present application, before pseudo live broadcast, the master piece is firstly compressed and encoded with high quality, wherein the master piece is the pre-acquired video to be broadcast live.
[0067] After getting the master film, it is necessary to compress and encode it in multiple levels according to the preset encoding strategy to meet the output of different clarity. If you want to compare it with the traditional live broadcast scene, since it can be non-real-time compression, a higher computational complexity encoding strategy can be used to reduce the file size and improve the image quality.
[0068] Specifically, the encoding strategy may be to compress and encode the master film at various levels through an encoder, wherein a level with a high compression rate takes a long time, but the final effect is to reduce the size of the video file while ensuring the video quality.
[0069] Step 102, slicing the compressed video data to obtain a plurality of video slices and index files corresponding to the video slices;
[0070] It should be noted that in the embodiment of the present application, after the video is compressed in step 101, the compressed video is processed to generate HLS slices and index files.
[0071] Further, the compressed video data is sliced to obtain a plurality of video slices, and the index files corresponding to the video slices include:
[0072] Slicing the compressed video data to obtain at least one video slice;
[0073] An index file corresponding to the video slice is generated according to a preset time point and the video slice corresponding to the time point.
[0074] The slicing the compressed video data to obtain at least one video slice comprises:
[0075] The compressed video data is sliced according to GOP to obtain at least one video slice.
[0076] Specifically, according to the HLS protocol, videos of different resolutions are sliced. Generally, one slice needs to be generated according to one GOP.
[0077] Among them, GOP (Group of Pictures) is a concept in video coding. Specifically, GOP refers to the distance between two I frames (i.e. key frames or intra-coded frames) in a video coding sequence. A GOP is a group of continuous pictures, which is used to assist random access. The first image of a GOP must be an I frame, so that the GOP can be decoded independently without referring to other images. When compressing a video, the video sequence is first divided into several groups of pictures GOP, and then compressed in units of GOP. Therefore, in an embodiment of the present application, it can be assumed that the GOP of the master slice is 1s.
[0078] Furthermore, the file name corresponding to the video slice is randomly generated, and the file name corresponding to the index file is generated through UTC.
[0079] It should be noted that in the embodiment of the present application, the generated slice file name needs to be named in a random and irregular manner to prevent the slice from being stolen in advance, for example: segmentkErbZtpPLe.m4s, segmentvxewKLKnhg.m4s, segmentqBvsGmNIep.m4s, segmentCWXVNocJbE.m4s, segmentMfMaWwwxaD.m4s.
[0080] Since it needs to be distributed in advance, it is also necessary to generate an index file in accordance with the simulated live broadcast HLS method. It is assumed that the start time of the party is 20:00:00 Beijing time on October 1, 2024, and the end time is 22:00:00 Beijing time on October 1, 2024. Therefore, in the embodiment of the present application, in order to eliminate time zone problems, the index file name is uniformly generated in UTC.
[0081] Among them, UTC (Coordinated Universal Time) is a time measurement system based on the length of atomic time seconds. It aims to overcome the time differences between different countries and regions and achieve global time synchronization.
[0082] Therefore, based on the above, assuming that the GOP of the video is 1s, the m3u8 contents are:
[0083] 1727784000.m3u8 (October 1, 2024, 20:00:01)
[0084] #EXTM3U
[0085] #EXT-X-VERSION:7
[0086] #EXT-X-START:TIME-OFFSET=0
[0087] #EXT-X-MEDIA-SEQUENCE:1
[0088] #EXT-X-TARGETDURATION:1
[0089] #EXT-X-MAP:URI="init.m4s"
[0090] #EXTINF:1.00
[0091] segmentkErbZtpPLe.m4s;
[0092] 1727784001.m3u8 (October 1, 2024 20 points 00 minutes 02 seconds)
[0093] #EXTM3U
[0094] #EXT-X-VERSION:7
[0095] #EXT-X-START:TIME-OFFSET=0
[0096] #EXT-X-MEDIA-SEQUENCE:1
[0097] #EXT-X-TARGETDURATION:1
[0098] #EXT-X-MAP:URI="init.m4s"
[0099] #EXTINF:1.00
[0100] segmentkErbZtpPLe.m4s
[0101] #EXTINF:1.00
[0102] segmentvxewKLKnhg.m4s;
[0103] 1727784002.m3u8 (October 1, 2024 20 points 00 minutes 03 seconds) #EXTM3U
[0104] #EXT-X-VERSION:7
[0105] #EXT-X-START:TIME-OFFSET=0
[0106] #EXT-X-MEDIA-SEQUENCE:1
[0107] #EXT-X-TARGETDURATION:1
[0108] #EXT-X-MAP:URI="init.m4s"
[0109] #EXTINF:1.00
[0110] segmentkErbZtpPLe.m4s
[0111] #EXTINF:1.00
[0112] segmentvxewKLKnhg.m4s
[0113] #EXTINF:1.00
[0114] segmentqBvsGmNIep.m4s
[0115] 1727784003.m3u8 (October 1, 2024 20:00:04)#EXTM3U
[0116] #EXT-X-VERSION:7
[0117] #EXT-X-START:TIME-OFFSET=0
[0118] #EXT-X-MEDIA-SEQUENCE:1
[0119] #EXT-X-TARGETDURATION:1
[0120] #EXT-X-MAP:URI="init.m4s"
[0121] #EXTINF:1.00
[0122] segmentkErbZtpPLe.m4s
[0123] #EXTINF:1.00
[0124] segmentvxewKLKnhg.m4s
[0125] #EXTINF:1.00
[0126] segmentqBvsGmNIep.m4s
[0127] #EXTINF:1.00
[0128] segmentCWXVNocJbE.m4s;
[0129] …
[0130] 1727791200.m3u8 (October 1, 2024 22:00:00)#EXTM3U
[0131] #EXT-X-VERSION:7
[0132] #EXT-X-START:TIME-OFFSET=0
[0133] #EXT-X-MEDIA-SEQUENCE:1
[0134] #EXT-X-TARGETDURATION:1
[0135] #EXT-X-MAP:URI="init.m4s"
[0136] #EXTINF:1.00
[0137] segmentMfMaWwwxaD.m4s
[0138] #EXTINF:1.00
[0139] segmentoayCQtyCsu.m4s
[0140] #EXTINF:1.00
[0141] segmentuCLfiHfIla.m4s
[0142] #EXTINF:1.00
[0143] segmentwvxSXioacA.m4s
[0144] #EXTINF:1.00
[0145] segmentXlMDjaMwuq.m4s
[0146] #EXTINF:1.00
[0147] segemntbiCjvuosoE.m4s
[0148] #EXTINF:1.00
[0149] segmentlwByUKbPxH.m4s
[0150] #EXT-X-ENDLIST
[0151] Therefore, it can be seen that according to the GOP of 1s, several video slices and index files corresponding to the video slices are obtained, wherein the index file is a way to record the sliced video files and can be used as a slice directory.
[0152] Step 103, pulling the video slice and the index file to the CDN edge node through the live broadcast dialing system;
[0153] Furthermore, the step of pulling the video slice and the index file to the CDN edge node through the live dialing system includes:
[0154] Storing the video slices and index files corresponding to the video slices in a live broadcast source station;
[0155] The video slices and the index files are pulled to the CDN edge node through the live dialing system.
[0156] It should be noted that in the embodiment of the present application, the HLS slices and index files are distributed in advance on the CDN.
[0157] Specifically, refer to Figure 5 After the HLS slices and index files are generated in step 102, they need to be stored on the live broadcast source station. Some time before the live broadcast activity starts, the content is pulled in advance through the live broadcast dialing system to simulate the user's playback behavior, and the HLS slices and index files are cached on the CDN edge node, so that the content is distributed in advance before the live broadcast starts.
[0158] Step 104: when it is detected that a user initiates a video streaming request, the index file corresponding to the video streaming request and the pseudo live video composed of the video slices are fed back to the user through the CDN edge node;
[0159] Further, the video streaming request includes a request time point, and when it is detected that a user initiates a video streaming request, the index file corresponding to the video streaming request and the pseudo live video composed of the video slices are fed back to the user through the CDN edge node, including:
[0160] When it is detected that a user initiates a video streaming request, the index file and the video slice corresponding to the time point are fed back to the user through the CDN edge node;
[0161] Pseudo live broadcast is started according to the index file and the video slices.
[0162] It should be noted that in the embodiment of the present application, the scheduling capability is officially opened to the user side, and the user-side player can request the video streaming address, for example, by requesting http: / / xxxxx / live / room8888 / live.m3u8? fakeLive=1 to obtain the playback content. At this time, the CDN side needs to request the value of the fakeLive reference for judgment. If it is 1, it is necessary to redirect the live.m3u8 request content to utc.m3u8. In this way, each time the player requests, it can request the m3u8 content at the corresponding time point, thereby completing the live event.
[0163] Specifically, refer to Figure 6 and Figure 7It can be clearly seen that through the method of the embodiment of the present application, during the user's streaming request process, the network request link becomes shorter, so the download speed will become faster, the live broadcast quality will be significantly optimized, and the viewing experience will also be improved.
[0164] In summary, refer to Figure 4 This application simulates live broadcast based on the HLS protocol, that is, pseudo live broadcast, by producing HLS video slices and HLS index files in advance, and using CDN to send them to server nodes close to users in advance. When the live broadcast starts, unified scheduling is performed externally to complete the live broadcast content. This method can transform the original push file into a live stream by converting it into slices through the HLS protocol and sending it in advance, reducing the live broadcast network link and the risk of server failure. It can also use high-quality transcoding strategies to compress the bit rate, and because the user download link becomes shorter, it improves the user's viewing fluency.
[0165] In an embodiment of the present application, compressed video data is obtained by compressing and encoding the pre-acquired live video; the compressed video data is sliced to obtain several video slices and index files corresponding to the video slices; the video slices and the index files are pulled to the CDN edge node through the live dialing system; when a user is detected to initiate a video streaming request, the index file corresponding to the video streaming request and the pseudo live video composed of the video slices are fed back to the user through the CDN edge node. That is, in an embodiment of the present application, the video slices and index files required for live broadcast are distributed in advance, that is, the video content required for live broadcast is sent to the designated CDN edge node, and the simulation of the live content is completed by constructing the index file in advance, that is, the embodiment of the present application obtains the live video in advance and compresses and encodes and slices it, generates video slices and their corresponding index files, and distributes them to the CDN edge node. When the user initiates a video streaming request, the CDN edge node can respond quickly and directly feedback the pre-prepared video slices and index files, thereby achieving a pseudo live broadcast effect. This method not only reduces the delay of real-time encoding and slicing processing, but also improves the fluency and stability of live broadcast, while reducing server pressure and improving user experience.
[0166] Figure 2 is a device block diagram of a pseudo live broadcast processing device provided in an embodiment of the present application, such as Figure 2 As shown, the device comprises:
[0167] The encoding module 201 is used to compress and encode the pre-acquired live video to obtain compressed video data;
[0168] A slicing module 202, configured to slice the compressed video data to obtain a plurality of video slices and index files corresponding to the video slices;
[0169] The pulling module 203 is used to pull the video slice and the index file to the CDN edge node through the live broadcast dialing system;
[0170] The pseudo live broadcast module 204 is used to feed back the index file corresponding to the video streaming request and the pseudo live broadcast video composed of the video slices to the user through the CDN edge node when detecting that the user initiates a video streaming request.
[0171] Optionally, the encoding module includes:
[0172] The encoding submodule is used to compress and encode the pre-acquired live video according to different resolutions to obtain compressed video data corresponding to different resolutions.
[0173] Optionally, the pulling module includes:
[0174] A first pulling submodule, used to store the video slice and the index file corresponding to the video slice in the live broadcast source station;
[0175] The second pulling submodule is used to pull the video slice and the index file to the CDN edge node through the live broadcast dialing system.
[0176] Optionally, the slicing module further includes:
[0177] A first slicing submodule, configured to slice the compressed video data to obtain at least one video slice;
[0178] The second slicing submodule is used to generate an index file corresponding to the video slice according to a preset time point and the video slice corresponding to the time point.
[0179] Optionally, the first slicing submodule includes:
[0180] The first slicing unit is used to slice the compressed video data according to GOP to obtain at least one video slice.
[0181] Optionally, the pseudo live broadcast module includes:
[0182] The first pseudo live broadcast submodule is used to feed back the index file and the video slice corresponding to the time point to the user through the CDN edge node when detecting that the user initiates a video streaming request;
[0183] The second pseudo live broadcast submodule is used to start pseudo live broadcast according to the index file and the video slice.
[0184] Optionally, the slicing module is specifically used to randomly generate the file name corresponding to the video slice, and the file name corresponding to the index file is generated through UTC.
[0185] In an embodiment of the present application, compressed video data is obtained by compressing and encoding the pre-acquired live video; the compressed video data is sliced to obtain several video slices and index files corresponding to the video slices; the video slices and the index files are pulled to the CDN edge node through the live dialing system; when a user is detected to initiate a video streaming request, the index file corresponding to the video streaming request and the pseudo live video composed of the video slices are fed back to the user through the CDN edge node. That is, in an embodiment of the present application, the video slices and index files required for live broadcast are distributed in advance, that is, the video content required for live broadcast is sent to the designated CDN edge node, and the simulation of the live content is completed by constructing the index file in advance, that is, the embodiment of the present application obtains the live video in advance and compresses and encodes and slices it, generates video slices and their corresponding index files, and distributes them to the CDN edge node. When the user initiates a video streaming request, the CDN edge node can respond quickly and directly feedback the pre-prepared video slices and index files, thereby achieving a pseudo live broadcast effect. This method not only reduces the delay of real-time encoding and slicing processing, but also improves the fluency and stability of live broadcast, while reducing server pressure and improving user experience.
[0186] Figure 3 This is a structural diagram of an electronic device M00 provided in an embodiment of the present application. In the figure, the electronic device M00 includes a processor M01 and a memory M02. The electronic device includes: a processor; a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement any of the pseudo live broadcast processing methods described above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0187] In an embodiment of the present application, the memory M02 can be used to store software programs and various data. The memory M02 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory M02 may include a volatile memory or a non-volatile memory, or the memory x09 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory M02 in the embodiment of the present application includes but is not limited to these and any other suitable types of memories.
[0188] The processor M01 may include one or more processing units; optionally, the processor M01 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor M01.
[0189] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned pseudo live broadcast processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0190] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0191] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned pseudo live broadcast processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0192] It should be understood that the chip involved in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0193] An embodiment of the present application also provides a storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute any of the pseudo live broadcast processing methods described above.
[0194] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the pseudo live broadcast processing method embodiment as described above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0195] An embodiment of the present application also provides a vehicle, which includes the pseudo live broadcast processing device as described above.
[0196] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the 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 further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0197] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0198] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A pseudo live broadcast processing method, characterized in that: The method comprises: Compressing and encoding the pre-acquired live video to obtain compressed video data; Slicing the compressed video data to obtain a plurality of video slices and index files corresponding to the video slices; Pull the video slice and the index file to the CDN edge node through the live broadcast dialing system; When it is detected that a user initiates a video streaming request, the index file corresponding to the video streaming request and the pseudo live video composed of the video slices are fed back to the user through the CDN edge node.
2. The method according to claim 1, characterized in that: The step of compressing and encoding the pre-acquired live video to obtain compressed video data includes: The pre-acquired live video is compressed and encoded according to different resolutions to obtain compressed video data corresponding to the different resolutions.
3. The method according to claim 1, characterized in that Pulling the video slice and the index file to the CDN edge node through the live broadcast dialing system includes: Storing the video slices and index files corresponding to the video slices in a live broadcast source station; The video slices and the index files are pulled to the CDN edge node through the live dialing system.
4. The method according to claim 1, characterized in that: The compressed video data is sliced to obtain a plurality of video slices, and the index files corresponding to the video slices include: Slicing the compressed video data to obtain at least one video slice; An index file corresponding to the video slice is generated according to a preset time point and the video slice corresponding to the time point.
5. The method according to claim 4, characterized in that The slicing the compressed video data to obtain at least one video slice comprises: The compressed video data is sliced according to GOP to obtain at least one video slice.
6. The method according to claim 4, characterized in that The video streaming request includes a request time point, and when it is detected that a user initiates a video streaming request, the index file corresponding to the video streaming request and the pseudo live video composed of the video slices are fed back to the user through the CDN edge node, including: When it is detected that a user initiates a video streaming request, the index file and the video slice corresponding to the time point are fed back to the user through the CDN edge node; Pseudo live broadcast is started according to the index file and the video slices.
7. The method according to claim 1, characterized in that The file name corresponding to the video slice is randomly generated, and the file name corresponding to the index file is generated through UTC.
8. A pseudo live broadcast processing device, characterized in that: The pseudo live broadcast processing device comprises: The encoding module is used to compress and encode the pre-acquired live video to obtain compressed video data; A slicing module, used for slicing the compressed video data to obtain a plurality of video slices and index files corresponding to the video slices; A pulling module, used to pull the video slice and the index file to the CDN edge node through the live dialing system; The pseudo live broadcast module is used to feed back the index file corresponding to the video streaming request and the pseudo live broadcast video composed of the video slices to the user through the CDN edge node when detecting that the user initiates a video streaming request.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the instructions to implement the pseudo live broadcast processing method as described in any one of claims 1-7.
10. A computer storage medium, a readable storage medium, for storing a program, characterized in that: When the program is executed by a processor, the pseudo live broadcast processing method as described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Program playing method, server side and client
CN103747285A
HLS live broadcast rapid play starting method and system
CN110677737A
Audio and video file storage and distribution method and device
CN112118461A
Live streaming content playback method, system and device, and readable storage medium
CN112468839A
Server, terminal and non-transitory computer-readable medium
US20240107087A1