Video playing method and device, computer equipment, storage medium and product

By receiving HLS video playback requests from user terminals and obtaining and reporting the storage path of RTMP slice data, the problem of resource waste in live streaming is solved, enabling fast startup and continuous playback, and improving system resource utilization and user experience.

CN121585846APending Publication Date: 2026-02-27CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511753724.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

In live streaming, the RTMP to HLS conversion process of the HLS protocol suffers from excessive resource consumption, leading to wasted server resources and increased operating costs.

Method used

By receiving HLS video playback requests from user terminals, obtaining RTMP slice data, and providing the storage path, the user terminals can obtain and play RTMP slice data based on the storage path, avoiding unnecessary resource consumption and improving system resource utilization.

Benefits of technology

It enables targeted data acquisition based on user video playback needs, reduces resource consumption, ensures fast video startup and continuous playback, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121585846A_ABST
    Figure CN121585846A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet, in particular to a video playing method and device, computer equipment, a storage medium and a product. The method comprises the following steps: receiving a hyper text transfer protocol HLS video playing request sent by a user terminal; performing data acquisition on a target real-time message transmission protocol RTMP data source corresponding to the HLS video playing request to obtain at least one piece of RTMP slice data and a storage path of each piece of RTMP slice data; and feeding back the storage path of each piece of RTMP slice data to the user terminal, so that the user terminal can obtain each piece of RTMP slice data based on the storage path, and performs video playing based on each piece of RTMP slice data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet, in particular to a video playing method and device, computer equipment, storage medium and product. BACKGROUND

[0002] In the live streaming technology system, the HLS (HTTP Live Streaming, HyperText Transfer Protocol Live Streaming) protocol has become the mainstream choice in the industry due to its excellent adaptability and stability. The core mechanism of HLS is to divide the continuous video stream into multiple small TS (Transport Stream, a packaging format of a video protocol) files, each file containing short-time video content, and each file is written to the local disk for access.

[0003] However, the number of live streams on the Internet is large and diverse, and at the same time, the pull streaming protocols used by the audience are also different. Therefore, when each user needs to play the video, each user needs to perform video protocol switching from HLS to RTMP (Real-Time Messaging Protocol, Real-Time Messaging Protocol), which wastes a large amount of resource cost. SUMMARY

[0004] Therefore, it is necessary to provide a video playing method, device, computer equipment, storage medium and product capable of reducing resource consumption in view of the above technical problems.

[0005] In a first aspect, the present application provides a video playing method. The method comprises:

[0006] receiving a HyperText Transfer Protocol Live Streaming (HLS) video playing request sent by a user terminal;

[0007] performing data acquisition on a target Real-Time Messaging Protocol (RTMP) data source corresponding to the HLS video playing request to obtain at least one RTMP slice data and a storage path of each RTMP slice data;

[0008] feeding back the storage path of each RTMP slice data to the user terminal, so that the user terminal can acquire each RTMP slice data based on the storage path and play the video based on each RTMP slice data.

[0009] In one embodiment, the data acquisition on the target Real-Time Messaging Protocol (RTMP) data source corresponding to the HLS video playing request to obtain at least one RTMP slice data comprises:

[0010] pull data from the RTMP data source corresponding to the HLS video play request to obtain RTMP video data;

[0011] slice and package the RTMP video data to obtain at least one RTMP slice data.

[0012] In one of the embodiments, the RTMP video data includes cache data and real-time stream data, and the pulling of the RTMP video data from the RTMP data source corresponding to the HLS video play request includes:

[0013] pulling cache data from the RTMP data source corresponding to the HLS video play request to obtain the cache data;

[0014] pulling real-time stream data from the RTMP data source corresponding to the HLS video play request to obtain the real-time stream data.

[0015] In one of the embodiments, the slicing and packaging of the RTMP video data to obtain at least one RTMP slice data includes:

[0016] slicing and packaging the RTMP video data according to a preset slice duration to obtain at least one RTMP slice data.

[0017] In one of the embodiments, the feeding of the storage path of each RTMP slice data to the user terminal includes:

[0018] determining index data corresponding to each RTMP slice data according to the storage path of each RTMP slice data;

[0019] feeding the index data to the user terminal.

[0020] In one of the embodiments, the pulling of the RTMP video data from the RTMP data source corresponding to the HLS video play request includes:

[0021] verifying whether there is a historical video play request for a target RTMP data source;

[0022] If not, pulling the RTMP video data from the RTMP data source corresponding to the HLS video play request to obtain at least one RTMP slice data.

[0023] In a second aspect, the application further provides a video play device. The device includes:

[0024] a receiving module configured to receive a hypertext transfer protocol live streaming (HLS) video play request sent by a user terminal;

[0025] The acquisition module is configured to acquire target real-time message transmission protocol (RTMP) data sources corresponding to the HLS video playback request to obtain at least one RTMP slice data.

[0026] The feedback module is configured to feed back storage paths of the RTMP slice data to the user terminal, so that the user terminal can acquire the RTMP slice data based on the storage paths and perform video playback based on the RTMP slice data.

[0027] In a third aspect, the present application further provides a computer device. The computer device comprises a memory and a processor. The memory stores a computer program. The processor implements the following steps when executing the computer program:

[0028] receiving a hypertext transfer protocol live streaming (HLS) video playback request sent by a user terminal;

[0029] acquiring target real-time message transmission protocol (RTMP) data sources corresponding to the HLS video playback request to obtain at least one RTMP slice data and storage paths of the RTMP slice data;

[0030] feeding back the storage paths of the RTMP slice data to the user terminal, so that the user terminal can acquire the RTMP slice data based on the storage paths and perform video playback based on the RTMP slice data.

[0031] In a fourth aspect, the present application further provides a computer readable storage medium. The computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the following steps:

[0032] receiving a hypertext transfer protocol live streaming (HLS) video playback request sent by a user terminal;

[0033] acquiring target real-time message transmission protocol (RTMP) data sources corresponding to the HLS video playback request to obtain at least one RTMP slice data and storage paths of the RTMP slice data;

[0034] feeding back the storage paths of the RTMP slice data to the user terminal, so that the user terminal can acquire the RTMP slice data based on the storage paths and perform video playback based on the RTMP slice data.

[0035] In a fifth aspect, the present application further provides a computer program product. The computer program product comprises a computer program. The computer program is executed by a processor to implement the following steps:

[0036] receiving a hypertext transfer protocol live streaming (HLS) video playing request sent by a user terminal;

[0037] performing data acquisition on a target real-time message transfer protocol (RTMP) data source corresponding to the HLS video playing request to obtain at least one RTMP slice data and a storage path of each of the RTMP slice data;

[0038] feeding back the storage path of each of the RTMP slice data to the user terminal, so that the user terminal can acquire each of the RTMP slice data based on the storage path and perform video playing based on each of the RTMP slice data.

[0039] The video playing method, device, computer device, storage medium and product provided in the embodiments of the present application can receive an HLS video playing request sent by a user terminal, perform data acquisition on a target real-time message transfer protocol (RTMP) data source corresponding to the HLS video playing request to obtain at least one RTMP slice data, feed back the storage path of each of the RTMP slice data to the user terminal, so that the user terminal can acquire each of the RTMP slice data based on the storage path and perform video playing based on each of the RTMP slice data. According to the above content, it can be known that the present application can perform targeted data acquisition according to the HLS video playing request sent by the user terminal in the process of video playing, avoid unnecessary resource occupation, and improve the utilization rate of system resources. In addition, the at least one RTMP slice data is obtained by slicing the cache data and the real-time stream data, so as to ensure that the user can perform video playing in a short time. In addition, the key frame information in the cache data can be used to realize fast start playing of the video, and the continuity between the cache data and the real-time stream data can be used to ensure the continuity of video playing. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 a video playing method provided in the embodiments of the present application;

[0041] Figure 2 a flowchart of a first video playing method provided in the embodiments of the present application;

[0042] Figure 3 a flowchart of a second video playing method provided in the embodiments of the present application;

[0043] Figure 4 a flowchart of a third video playing method provided in the embodiments of the present application;

[0044] Figure 5A flowchart of a fourth video playing method provided in an embodiment of the present application;

[0045] Figure 6 A flowchart of a fifth video playing method provided in an embodiment of the present application;

[0046] Figure 7 A structure block diagram of a video playing device provided in an embodiment of the present application;

[0047] Figure 8 An internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION

[0048] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.

[0049] In the live streaming technology system, the HLS (HTTP Live Streaming) protocol has become the mainstream choice in the industry due to its excellent adaptability and stability. The core mechanism of HLS is to divide the continuous video stream into multiple small TS (Transport Stream) files (i.e., subsequent RTMP slice data), each file containing short-time video content, and each file is written to the local disk for access. This segmentation method not only makes the video stream easier to transmit in the network, but also effectively deals with network fluctuations to ensure smooth playback.

[0050] However, although HLS has many advantages, there is a significant problem in the process of converting RTMP to HLS: excessive consumption of resources. In the standard conversion process, the CDN server will actively convert after receiving the RTMP live stream. That is, when the CDN server receives the live stream pushed by the host through the RTMP protocol, it will immediately convert the stream into the HLS format.

[0051] The number of live streams on the Internet is large and diverse, and at the same time, the pull stream protocols used by the audience are also different. Not all live streams have audiences using the HLS protocol, and even if they do, these audiences do not pull streams all the time and continuously. Therefore, if all live streams are converted from RTMP to HLS in real time, it will cause serious waste of server resources.

[0052] In this case, if real-time HLS conversion protocol is implemented indiscriminately for all accessed RTMP live streams, it will undoubtedly cause significant waste of server resources, specifically, excessive occupation of CPU computing resources, unnecessary consumption of memory space, and a surge in disk I / O operation frequency. This not only affects the overall response speed and stability of the CDN service, but also increases operating costs, which has a negative impact on the economic benefits of service providers.

[0053] To solve the above technical problems, the video playing method provided by the embodiments of the present application can be applied in the application environment as shown in Figure 1 The terminal 102 communicates with the server 104 through the network. The data storage system can store the data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. By receiving the HLS video playing request sent by the user terminal, the target real-time message transmission protocol (RTMP) data source corresponding to the HLS video playing request is realized to obtain data, at least one RTMP slice data is obtained, and then the storage path of each RTMP slice data is fed back to the user terminal, so that the user terminal can obtain each RTMP slice data based on the storage path, and perform video playing based on each RTMP slice data. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be realized by an independent server or a server cluster composed of multiple servers.

[0054] In one embodiment, as shown in Figure 2 A video playing method is provided, which is taken as an example to illustrate the video playing in Figure 1 The method includes the following steps:

[0055] S201, receiving a hypertext transfer protocol (HTTP) live streaming (HLS) video playing request sent by a user terminal.

[0056] It should be noted that the user terminal sends the HLS video playing request through an HTTP request.

[0057] In an embodiment of the present application, if the hypertext transfer protocol (HTTP) live streaming (HLS) video playing request sent by the user terminal is received, a pre-constructed conversion protocol model is mounted, wherein the conversion protocol model is used to execute the subsequent steps of video playing.

[0058] Further, if receiving the HLS video play requests sent by at least two user terminals, the conversion protocol model can construct a request list for the multiple HLS video play requests, so as to record all the HLS video play requests waiting for execution.

[0059] S202, data acquisition is performed on a target real-time message transmission protocol (RTMP) data source corresponding to the HLS video play request, at least one RTMP slice data is obtained, and a storage path of each RTMP slice data is obtained.

[0060] It should be noted that when data acquisition is performed on the target real-time message transmission protocol (RTMP) data source corresponding to the HLS video play request, the following content can be included: data pulling is performed on the RTMP data source corresponding to the HLS video play request, and RTMP video data is obtained; and the RTMP video data is sliced and packaged, and at least one RTMP slice data is obtained.

[0061] Further, in order to ensure that the data pulling is successfully performed on the RTMP data source corresponding to the HLS video play request, an RTMP client corresponding to the HLS video play request can be created in advance; and then, the data pulling is performed on the RTMP data source corresponding to the HLS video play request by using the RTMP client, and the RTMP video data is obtained.

[0062] S203, the storage path of each RTMP slice data is fed back to the user terminal, so that the user terminal can acquire each RTMP slice data based on the storage path, and perform video play based on each RTMP slice data.

[0063] In an embodiment of the present application, after the storage path of each RTMP slice data is fed back to the user terminal, the user terminal can determine the corresponding RTMP slice data through the storage path according to the play order between different RTMP slice data, and then perform video play based on each RTMP slice data.

[0064] In another embodiment of the present application, index data corresponding to each RTMP slice data can also be determined; and then, the user terminal can perform video play according to the index data; wherein the index data is an m3u8 file corresponding to each RTMP slice data.

[0065] Specifically, the terminal parses the m3u8 file, acquires an RTMP slice data list and RTMP slice data related information, and then downloads the RTMP slice data in the order listed in the m3u8 file. Since each RTMP slice data is an independent media file, the user terminal can immediately start playing the first available RTMP slice data without waiting for the entire stream to be downloaded.

[0066] Further, in the live scene, the user terminal will periodically re-request the m3u8 file to obtain the newly generated RTMP slice data, so as to realize the continuous playing of the live scene.

[0067] In an embodiment of the present application, when performing the operation of data acquisition on the target Real Time Message Transport Protocol (RTMP) data source corresponding to the HLS video playing request, a task maintenance timer can be started, which is used to monitor the persistence of the HLS video playing request. If there is no new HLS access request in the preset time window, the data acquisition is stopped and the related resources are released. If there is a new HLS video playing request, the current data acquisition state will be maintained to continue running.

[0068] The value of the time window can be set or adjusted according to actual conditions, and the specific value of the time window is not limited here.

[0069] The above video playing method receives the HLS video playing request sent by the user terminal, realizes data acquisition on the target Real Time Message Transport Protocol (RTMP) data source corresponding to the HLS video playing request, obtains at least one RTMP slice data, and then feeds back the storage path of each RTMP slice data to the user terminal, so that the user terminal can obtain each RTMP slice data based on the storage path and play the video based on each RTMP slice data. According to the above content, it can be known that the present application can realize targeted data acquisition according to the HLS video playing request sent by the user terminal in the process of video playing, avoid unnecessary resource occupation, and improve the utilization rate of system resources. In addition, through the at least one RTMP slice data obtained by slicing the cache data and the real-time stream data, it is ensured that the user can play the video in a short time, and through the key frame information in the cache data, the quick start playing of the video is realized, and through the continuity between the cache data and the real-time stream data, the playing continuity of the video is ensured.

[0070] In an embodiment, as shown in Figure 3 When data acquisition on the Real Time Message Transport Protocol (RTMP) target data source corresponding to the HLS video playing request is needed to obtain at least one RTMP slice data, the following content can be included:

[0071] S301, data pulling is performed on the RTMP data source corresponding to the HLS video playing request to obtain RTMP video data.

[0072] It should be noted that when it is necessary to obtain at least one RTMP slice data from the real-time message transmission protocol target RTMP data source corresponding to the HLS video playing request, the following content can be included: performing data pulling on the RTMP data source corresponding to the HLS video playing request to obtain RTMP video data; and performing slice packaging on the RTMP video data to obtain at least one RTMP slice data.

[0073] Further, to ensure that the data pulling on the RTMP data source corresponding to the HLS video playing request can be successfully performed, an RTMP client corresponding to the HLS video playing request (i.e., a client) can be created, and then the RTMP client is connected to a stream pulling channel to implement the data pulling on the RTMP data source corresponding to the HLS video playing request.

[0074] Specifically, when it is necessary to obtain RTMP video data by performing data pulling on the RTMP data source corresponding to the HLS video playing request, the RTMP client can be used to perform cache data pulling on the RTMP data source corresponding to the HLS video playing request to obtain cache data, and after the cache data is obtained, the RTMP client is used to perform real-time stream data pulling on the RTMP data source corresponding to the HLS video playing request to obtain real-time stream data.

[0075] S302, performing slice packaging on the RTMP video data to obtain at least one RTMP slice data.

[0076] It should be noted that when it is necessary to perform slice packaging on the RTMP video data to obtain at least one RTMP slice data, the following content can be included: performing slice packaging on the RTMP video data according to a pre-set slice time length to obtain at least one RTMP slice data.

[0077] The slice time length can be set or adjusted according to actual conditions and user requirements, and the specific content of the slice time length is not limited herein.

[0078] In an embodiment of the present application, a slice rule can be pre-obtained, and the slice rule records the slice time length; then, the RTMP video data is packaged according to the slice rule to obtain at least one RTMP slice data; and each RTMP slice data is stored in a pre-set accessible server to obtain a storage path of each RTMP slice data.

[0079] The video playing method can ensure that the user can start watching the video in a very short time and reduce the start delay by pulling the RTMP data source corresponding to the HLS video playing request to obtain the RTMP video data and slicing and packaging the RTMP video data to obtain at least one RTMP slice data. Meanwhile, the flexible slicing and packaging mechanism ensures smooth playing of the video content and improves the user experience.

[0080] In an embodiment, as shown in Figure 4 When it is necessary to feed back the storage path of each RTMP slice data to the user terminal, the following content can be included.

[0081] S401, determining the index data corresponding to each RTMP slice data according to the storage path of each RTMP slice data.

[0082] It should be noted that the index data is an m3u8 (live streaming media index) file corresponding to each RTMP slice data. The index data can realize navigation of the RTMP slice data, that is, the URL (Uniform Resource Locator, Internet Location Identifier) of the RTMP slice data arranged in the playing order.

[0083] S402, feeding back the index data to the user terminal.

[0084] In an embodiment of the present application, the storage path of each RTMP slice data recorded in the index data is used to realize positioning of each RTMP slice data. Then, at least one server storing each RTMP slice data is accessed through the storage path of each RTMP slice data, so that the user terminal can obtain each RTMP slice data based on the storage path and play the video based on each RTMP slice data.

[0085] The video playing method can ensure that the user terminal can obtain each RTMP slice data based on the storage path and play the video based on each RTMP slice data by determining the index data corresponding to each RTMP slice data and feeding back the index data to the user terminal.

[0086] In an embodiment, as shown in Figure 5 When it is necessary to obtain at least one RTMP slice data from the real-time message transmission protocol (RTMP) data source corresponding to the HLS video playing request, the following content can be included.

[0087] S501, verifying whether there is a historical video playing request for the target RTMP data source.

[0088] It should be noted that verifying whether there is a historical video playback request for the target RTMP data source means verifying whether there is an unfinished historical video playback request for the target RTMP data source at the current time; if there is,

[0089] S502, if not, data acquisition is performed on a real-time message transmission protocol (RTMP) data source corresponding to the HLS video playback request to obtain at least one RTMP slice data.

[0090] It should be noted that if there is a historical video playback request for the target RTMP data source, it means that at least one RTMP slice data corresponding to the target RTMP data source currently exists, and therefore, the operation of performing data acquisition on the target real-time message transmission protocol (RTMP) data source corresponding to the HLS video playback request to obtain at least one RTMP slice data is not needed, and at this time, the HLS video playback request can be responded to by using at least one RTMP slice data corresponding to the historical video playback request.

[0091] If there is no historical video playback request for the target RTMP data source, it means that at least one RTMP slice data corresponding to the target RTMP data source currently does not exist, and therefore, data acquisition needs to be performed on the real-time message transmission protocol (RTMP) data source corresponding to the HLS video playback request to obtain at least one RTMP slice data.

[0092] The above video playback method verifies whether there is a historical video playback request for the target RTMP data source, and in the case of no historical video playback request, performs data acquisition on a real-time message transmission protocol (RTMP) data source corresponding to the HLS video playback request to obtain at least one RTMP slice data, thereby achieving the judgment of whether there is at least one RTMP slice data corresponding to the target RTMP data source, and achieving the purpose of reducing resource consumption when there is a historical video playback request for the target RTMP data source.

[0093] In an embodiment, as shown in Figure 6 When the user terminal needs to perform video playback, the following content can be included:

[0094] S601, receiving a hypertext transfer protocol live streaming (HLS) video playback request sent by a user terminal.

[0095] S602, performing cache data pulling on a real-time message transmission protocol (RTMP) data source corresponding to the HLS video playback request to obtain cache data.

[0096] S603, performing real-time stream data pulling on the RTMP data source corresponding to the HLS video playback request to obtain real-time stream data.

[0097] S604, slice packaging is performed on the RTMP video data according to a preset slice time length, and at least one RTMP slice data is obtained.

[0098] S605, index data corresponding to each RTMP slice data is determined according to a storage path of each RTMP slice data.

[0099] S606, the index data is fed back to the user terminal, so that the user terminal can obtain each RTMP slice data based on the storage path, and perform video playing based on each RTMP slice data.

[0100] The above video playing method, by receiving the HLS video playing request sent by the user terminal, realizes data acquisition on the target real-time message transmission protocol RTMP data source corresponding to the HLS video playing request, obtains at least one RTMP slice data, and then feeds back the storage path of each RTMP slice data to the user terminal, so that the user terminal can obtain each RTMP slice data based on the storage path, and perform video playing based on each RTMP slice data. According to the above content, it can be known that in the process of video playing, the application can realize targeted data acquisition according to the HLS video playing request sent by the user terminal, avoid unnecessary resource occupation, and improve the utilization rate of system resources; and through the at least one RTMP slice data, the RTMP slice data is obtained by slicing the cache data and the real-time stream data, so as to ensure that the user can play the video in a short time, and through the key frame information in the cache data, the quick start playing of the video is realized, and through the continuity between the cache data and the real-time stream data, the continuity of the video playing is ensured.

[0101] It should be understood that although each step in the flowchart involved in each of the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps has no strict sequence limitation, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each of the above embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be alternately executed with other steps or steps or stages in other steps.

[0102] Based on the same inventive concept, the embodiments of the present application also provide a video playing device for implementing the video playing method described above. The implementation scheme of the device for solving the problem is similar to the implementation scheme described in the above method, so the specific limitations in one or more video playing device embodiments provided below can refer to the limitations of the video playing method described above, which will not be repeated here.

[0103] In one embodiment, as shown in Figure 7 A video playing device is provided, comprising: a receiving module 10, an obtaining module 20 and a feedback module 30, wherein:

[0104] The receiving module 10 is configured to receive a hypertext transfer protocol live streaming (HLS) video playing request sent by a user terminal.

[0105] The obtaining module 20 is configured to obtain target real-time message transmission protocol (RTMP) data source corresponding to the HLS video playing request to obtain at least one RTMP slice data.

[0106] The feedback module 30 is configured to feed back storage paths of the RTMP slice data to the user terminal, so that the user terminal can obtain the RTMP slice data based on the storage paths and perform video playing based on the RTMP slice data.

[0107] In one embodiment, data of the RTMP data source corresponding to the HLS video playing request is pulled to obtain RTMP video data;

[0108] The RTMP video data is sliced and packaged to obtain at least one RTMP slice data. The data of the RTMP data source corresponding to the HLS video playing request is pulled to obtain cache data; the real-time stream data of the RTMP data source corresponding to the HLS video playing request is pulled to obtain real-time stream data. According to a pre-set slice duration, the RTMP video data is sliced and packaged to obtain at least one RTMP slice data. According to the storage paths of the RTMP slice data, index data corresponding to the RTMP slice data is determined; and the index data is fed back to the user terminal. In one embodiment, it is verified whether there is a historical video playing request for the target RTMP data source; if not, the real-time message transmission protocol (RTMP) data source corresponding to the HLS video playing request is obtained to obtain at least one RTMP slice data.

[0109] The above-mentioned modules in the video playing device can be all or partially realized by software, hardware and combinations thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above-mentioned modules.

[0110] In one embodiment, a computer device is provided, which can be a terminal, and an internal structure diagram thereof can be as shown in the figure. Figure 8 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 through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is configured 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 running the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to perform wired or wireless communication with external terminals. The wireless communication can be achieved through WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies. The computer program is executed by the processor to implement a video playing method. The display unit of the computer device is configured to form a visually visible picture, which can 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. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, a trackball or a touchpad arranged on the shell of the computer device, or an external keyboard, a touchpad or a mouse, etc.

[0111] Those skilled in the art can understand that Figure 8 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0112] In one embodiment, a computer device is provided, which includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the following steps:

[0113] receiving a hypertext transfer protocol live streaming (HLS) video playing request sent by a user terminal;

[0114] performing data acquisition on a target real-time message protocol (RTMP) data source corresponding to the HLS video playing request to obtain at least one RTMP slice data and a storage path of each RTMP slice data;

[0115] The storage path of each RTMP slice data is fed back to the user terminal, so that the user terminal can obtain each RTMP slice data based on the storage path, and perform video playing based on each RTMP slice data.

[0116] In one embodiment, the processor, when executing the computer program, also implements the following steps:

[0117] The RTMP data source corresponding to the HLS video playing request is subjected to data pulling to obtain RTMP video data.

[0118] The RTMP video data is subjected to slice packaging to obtain at least one RTMP slice data.

[0119] In one embodiment, the processor, when executing the computer program, also implements the following steps:

[0120] The RTMP data source corresponding to the HLS video playing request is subjected to cache data pulling to obtain cache data.

[0121] The RTMP data source corresponding to the HLS video playing request is subjected to real-time stream data pulling to obtain real-time stream data.

[0122] In one embodiment, the processor, when executing the computer program, also implements the following steps:

[0123] The RTMP video data is subjected to slice packaging according to a preset slice duration to obtain at least one RTMP slice data.

[0124] In one embodiment, the processor, when executing the computer program, also implements the following steps:

[0125] Index data corresponding to each RTMP slice data is determined according to the storage path of each RTMP slice data.

[0126] The index data is fed back to the user terminal.

[0127] In one embodiment, the processor, when executing the computer program, also implements the following steps:

[0128] It is verified whether there is a historical video playing request for the target RTMP data source.

[0129] If not, the real-time message transmission protocol (RTMP) data source corresponding to the HLS video playing request is subjected to data obtaining to obtain at least one RTMP slice data.

[0130] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium has a computer program stored thereon. The computer program is executed by a processor to implement the following steps:

[0131] receive a hypertext transfer protocol live streaming (HLS) video playing request sent by a user terminal;

[0132] perform data acquisition on a target real-time message protocol (RTMP) data source corresponding to the HLS video playing request to obtain at least one RTMP slice data and a storage path of each RTMP slice data;

[0133] feed back the storage path of each RTMP slice data to the user terminal, so that the user terminal can acquire each RTMP slice data based on the storage path and perform video playing based on each RTMP slice data.

[0134] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0135] perform data acquisition on a target real-time message protocol (RTMP) data source corresponding to the HLS video playing request to obtain at least one RTMP slice data and a storage path of each RTMP slice data;

[0136] perform data acquisition on a target real-time message protocol (RTMP) data source corresponding to the HLS video playing request to obtain at least one RTMP slice data and a storage path of each RTMP slice data;

[0137] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0138] perform data acquisition on a target real-time message protocol (RTMP) data source corresponding to the HLS video playing request to obtain at least one RTMP slice data and a storage path of each RTMP slice data;

[0139] perform data acquisition on a target real-time message protocol (RTMP) data source corresponding to the HLS video playing request to obtain at least one RTMP slice data and a storage path of each RTMP slice data.

[0140] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0141] perform data acquisition on a target real-time message protocol (RTMP) data source corresponding to the HLS video playing request to obtain at least one RTMP slice data and a storage path of each RTMP slice data.

[0142] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0143] determine index data corresponding to each RTMP slice data according to the storage path of each RTMP slice data;

[0144] feed back the index data to the user terminal.

[0145] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0146] verify whether there is a historical video playing request for the target RTMP data source;

[0147] If not, data acquisition is performed on a real-time message transmission protocol (RTMP) data source corresponding to the HLS video playing request, to obtain at least one RTMP slice data.

[0148] In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the following steps:

[0149] receiving a hypertext transfer protocol live streaming (HLS) video playing request sent by a user terminal;

[0150] performing data acquisition on a target real-time message transmission protocol (RTMP) data source corresponding to the HLS video playing request, to obtain at least one RTMP slice data and a storage path of each RTMP slice data;

[0151] feeding back the storage path of each RTMP slice data to the user terminal, so that the user terminal can acquire each RTMP slice data based on the storage path and perform video playing based on each RTMP slice data.

[0152] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0153] performing data pulling on an RTMP data source corresponding to the HLS video playing request, to obtain RTMP video data;

[0154] performing slice packaging on the RTMP video data, to obtain at least one RTMP slice data.

[0155] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0156] performing cache data pulling on an RTMP data source corresponding to the HLS video playing request, to obtain cache data;

[0157] performing real-time stream data pulling on an RTMP data source corresponding to the HLS video playing request, to obtain real-time stream data.

[0158] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0159] performing slice packaging on the RTMP video data according to a pre-set slice duration, to obtain at least one RTMP slice data.

[0160] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0161] determining index data corresponding to each RTMP slice data according to the storage path of each RTMP slice data;

[0162] The index data is fed back to the user terminal.

[0163] In one embodiment, the computer program, when executed by the processor, also implements the following steps:

[0164] Verifying whether there is a historical video playback request for the target RTMP data source;

[0165] If not, data acquisition is performed on a real-time message transmission protocol (RTMP) data source corresponding to the HLS video playback request, to obtain at least one RTMP slice data.

[0166] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0167] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0168] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.

[0169] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A video playback method, characterized in that, The method includes: Receives a Hypertext Transfer Protocol (HTTP) live stream HLS video playback request sent by a user terminal; Data is acquired from the target Real-Time Messaging Protocol (RTMP) data source corresponding to the HLS video playback request to obtain at least one RTMP slice data and the storage path of each RTMP slice data. The storage path of each RTMP slice data is fed back to the user terminal so that the user terminal can obtain each RTMP slice data based on the storage path and play the video based on each RTMP slice data.

2. The method according to claim 1, characterized in that, The process of acquiring data from the target RTMP data source corresponding to the HLS video playback request to obtain at least one RTMP slice data includes: The RTMP data source corresponding to the HLS video playback request is retrieved to obtain RTMP video data. The RTMP video data is sliced ​​and encapsulated to obtain at least one RTMP slice data.

3. The method according to claim 2, characterized in that, The RTMP video data includes cached data and real-time streaming data. The step of fetching data from the RTMP data source corresponding to the HLS video playback request to obtain the RTMP video data includes: The cached data is retrieved from the RTMP data source corresponding to the HLS video playback request. The real-time streaming data is obtained by pulling real-time streaming data from the RTMP data source corresponding to the HLS video playback request.

4. The method according to claim 2, characterized in that, The step of slicing and encapsulating the RTMP video data to obtain at least one RTMP slice data includes: The RTMP video data is sliced ​​and encapsulated according to a preset slice duration to obtain at least one RTMP slice data.

5. The method according to any one of claims 1-4, characterized in that, The step of feeding back the storage path of each RTMP slice data to the user terminal includes: Based on the storage path of each RTMP slice data, determine the index data corresponding to each RTMP slice data; The index data is then fed back to the user terminal.

6. The method according to any one of claims 1-4, characterized in that, The process of acquiring data from the Real-Time Message Transport Protocol (RTMP) data source corresponding to the HLS video playback request to obtain at least one RTMP slice data includes: Verify that there are historical video playback requests for the target RTMP data source; If it does not exist, then the data source corresponding to the HLS video playback request is retrieved using the Real-Time Messaging Protocol (RTMP) data source to obtain at least one RTMP slice data.

7. A video playback device, characterized in that, The device includes: The receiving module is used to receive HLS video playback requests sent by user terminals. The acquisition module is used to acquire data from the target Real-Time Messaging Protocol (RTMP) data source corresponding to the HLS video playback request, and obtain at least one RTMP slice data. The feedback module is used to feed back the storage path of each RTMP slice data to the user terminal, so that the user terminal can obtain each RTMP slice data based on the storage path and play video based on each RTMP slice data.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.