Video playing method and device, equipment and storage medium

By setting multiple cache areas in the video playback device and reading data alternately, the problem of lag caused by frequent disconnection and requesting the network when playing videos online is solved, and the smoothness and experience of video playback are improved.

CN119988766APending Publication Date: 2025-05-13SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510068530.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In the prior art, video playback stuttering is prone to occur during online playback of videos, mainly due to frequent disconnection and requesting of the network caused by user network environment factors and playback interaction, especially in video stream data with uneven distribution of large-code rates and audio and video streams.

Method used

By setting the first cache area and the second cache area in the video playback device, and alternately reading the target cache data according to the playback control instructions and cache data, the probability of frequent disconnection of the cache area and connecting to the server is reduced.

Benefits of technology

Without increasing additional resource consumption, video playback lag caused by frequent requests for network cache during playback is reduced, and the smoothness and playback experience of online video playback are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988766A_ABST
    Figure CN119988766A_ABST
Patent Text Reader

Abstract

The invention provides a video playing method and device, equipment and a storage medium, and the method comprises the steps: responding to a video playing request, and determining a playing control instruction corresponding to the video playing request; determining target cache data according to a first cache region and / or a second cache region and the playing control instruction; and outputting target audio-visual content corresponding to the target cache data by using a target player corresponding to the video playing request. According to the technical scheme, under the condition that extra resource consumption is not increased, the situation that video playing lags due to the fact that network cache is frequently requested in the playing process is reduced, the playing fluency of the online video is improved, and the playing experience of the online video is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a video playback method, device, equipment and storage medium. Background Art

[0002] At present, with the rapid development of Internet technology and digital media technology, more and more users are accustomed to playing video data through online network streaming media, so that they can directly watch video content without downloading the video file in full, saving the waiting time for watching the video. However, in the existing online video playback process, due to the user's network environment factors and the user's possible use of playback interactive operations such as double-speed playback, fast forward and fast rewind during playback, when playing video bitstream data with large bitrate and uneven distribution of audio and video streams, it is easy to cause frequent disconnection and network requests, resulting in video playback jams, affecting the user's online video viewing experience. Summary of the invention

[0003] The embodiments of the present application provide a video playback method, apparatus, device and storage medium, aiming to solve the technical problem in the prior art that video playback may be easily interrupted during online video playback.

[0004] On the one hand, an embodiment of the present application provides a video playback method, the video playback method comprising the following steps:

[0005] In response to a video playback request, determining a playback control instruction corresponding to the video playback request;

[0006] Determining target cache data according to the first cache area and / or the second cache area and the playback control instruction;

[0007] The target player corresponding to the video playback request is used to output the target audio-visual content corresponding to the target cache data.

[0008] In a possible implementation of the present application, determining the target cache data according to the first cache area and / or the second cache area and the playback control instruction includes:

[0009] Obtaining a target jump position corresponding to the playback control instruction and video stream data corresponding to the video playback request;

[0010] Determine the target request data corresponding to the video playback request according to the video code stream data and the target jump position;

[0011] The target cache data to be played is determined according to the target request data, the first cache area and / or the second cache area.

[0012] In a possible implementation of the present application, obtaining a target jump position corresponding to the playback control instruction includes:

[0013] Parsing the playback control instruction to determine the playback control type corresponding to the playback control instruction;

[0014] If the playback control type is a start playback control type, the start playback position or the breakpoint playback position of the video code stream data is determined as the target jump position;

[0015] If the playback control type is a jump control type, the target jump position of the playback control instruction is determined according to the jump timestamp and / or the target jump parameter of the playback control instruction.

[0016] In a possible implementation of the present application, determining the target cache data to be played according to the target request data, the first cache area and / or the second cache area includes:

[0017] Acquire the backup cache data in the first cache area;

[0018] If there is an overlapping data area between the target request data and the backup cache data, acquiring the target cache data in the first cache area;

[0019] If the target request data and the backup cache data are not the same, the target cache data to be played is acquired according to the target request data and the second cache area.

[0020] In a possible implementation of the present application, the step of acquiring the target cache data to be played according to the target request data and the second cache area includes:

[0021] Acquire a first request parameter and a second request parameter in the target request data, and generate a data cache request according to the first request parameter and the second request parameter;

[0022] updating data in the second cache area according to the data cache request and a preset bitstream server to obtain an updated second cache area;

[0023] The target cache data associated with the target request data in the updated second cache area is read.

[0024] In a possible implementation of the present application, after determining the target cache data according to the first cache area and / or the second cache area and the playback control instruction, the method further includes:

[0025] Counting the number of backup cache hits of the first cache area, and obtaining a cache hit threshold corresponding to the first cache area;

[0026] If the number of hits in the backup cache is less than the cache hit threshold, releasing the first cache area;

[0027] The first cache area is replaced by the second cache area to obtain an updated first cache area.

[0028] In a possible implementation of the present application, the outputting of the target audio-visual content corresponding to the target cache data by using the target player corresponding to the video playback request includes:

[0029] Utilizing a playback demultiplexing module in the target player to parse the target cache data, and obtain target video data and target audio data;

[0030] Decoding the target video data and the target audio data to obtain decoded video data and decoded audio data;

[0031] Performing data synchronization processing on the decoded video data and the decoded audio data to obtain synchronized playback data;

[0032] The target player is used to output the target audio-visual content corresponding to the synchronous playback data.

[0033] In another aspect, the present application provides a video playback device, the video playback device comprising:

[0034] An instruction acquisition module is configured to respond to a video playback request and determine a playback control instruction corresponding to the video playback request;

[0035] A cache acquisition module, configured to determine target cache data according to the first cache area and / or the second cache area and the playback control instruction;

[0036] The video playing module is configured to output the target audio-visual content corresponding to the target cache data using the target player corresponding to the video playing request.

[0037] On the other hand, the present application also provides a video playback device, the video playback device comprising:

[0038] one or more processors;

[0039] Memory; and

[0040] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps of the video playback method.

[0041] On the other hand, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the steps in the video playback method.

[0042] In this application, by responding to a video playback request, the playback control instruction corresponding to the video playback request is determined; the target cache data is determined according to the first cache area and / or the second cache area, and the playback control instruction; and the target audio-visual content corresponding to the target cache data is outputted using the target player corresponding to the video playback request. When playing streaming media video data online, in addition to the conventional cache area, a first cache area is added as a backup cache area, and the target cache data is read alternately according to the playback control instruction and the first cache area and / or the second cache area, thereby reducing the probability of the cache area frequently disconnecting and connecting to the server, and using the target player to play the target audio-visual content corresponding to the target cache data, thereby reducing the situation of video playback jamming caused by frequent requests for network cache during playback without increasing additional resource consumption, improving the smoothness of online video playback, and optimizing the online video playback experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0044] Figure 1 A schematic diagram of a scenario of a video playback method according to an embodiment of the present application;

[0045] Figure 2 A schematic diagram of a flow chart of an embodiment of a video playback method in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of a scenario of an embodiment of online video playback in a video playback method provided in an embodiment of the present application;

[0047] Figure 4 A schematic diagram of a flow chart of an embodiment of obtaining target cache data from a first cache area in a video playback method provided in an embodiment of the present application;

[0048] Figure 5a A schematic diagram of a scenario of an embodiment of determining an overlapping data area in a video playback method provided in an embodiment of the present application;

[0049] Figure 5bA schematic diagram of a scenario in which there is no overlapping data area in the first cache area in the video playback method provided in an embodiment of the present application;

[0050] Figure 6 A schematic diagram of a flow chart of an embodiment of updating a first cache area in a video playback method provided in an embodiment of the present application;

[0051] Figure 7 A schematic diagram of the structure of an embodiment of a video playback device provided in an embodiment of the present application;

[0052] Figure 8 A schematic diagram of the structure of an embodiment of a video playback device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0054] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0055] In this application, the word "exemplary" is used to mean "serving as an example, illustration, or illustration." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any person skilled in the art to implement and use the invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the invention can be implemented without using these specific details. In other instances, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in this application.

[0056] At present, with the rapid development of Internet technology and digital media technology, more and more users are accustomed to playing video data through online network streaming media, so that they can directly watch video content without downloading the video file in full, saving the waiting time for watching the video. However, in the existing online video playback process, due to the user's network environment factors and the user's possible use of playback interactive operations such as double-speed playback, fast forward and fast rewind during playback, when playing video bitstream data with large bitrate and uneven distribution of audio and video streams, it is easy to cause frequent disconnection and network requests, resulting in video playback jams, affecting the user's online video viewing experience.

[0057] Based on this, the present application proposes a video playback method, device, equipment and computer-readable storage medium to solve the technical problem in the prior art that video playback is prone to freezes during online video playback.

[0058] The video playback method in the embodiment of the present invention is applied to a video playback device, which is arranged in a video playback device. The video playback device is provided with one or more processors, a memory, and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the video playback method; wherein the video playback device can be an intelligent terminal capable of online audio and video playback, such as a mobile phone, a tablet computer, a smart TV, a virtual reality device, a smart computer and other intelligent devices; optionally, the video playback device can also be a server, or a service cluster composed of multiple servers.

[0059] like Figure 1 As shown, Figure 1 This is a scene diagram of the video playback method in an embodiment of the present application. The video playback scene in the embodiment of the present invention includes a video playback device 100 (a video playback device is integrated in the video playback device 100), and a computer-readable storage medium corresponding to the video playback method is running in the video playback device 100 to execute the steps of the video playback method.

[0060] Understandably, Figure 1 The video playback device in the video playback method scenario shown, or the devices included in the video playback device, does not constitute a limitation on the embodiments of the present invention, that is, the number and type of video playback devices included in the video playback method scenario, or the number and type of devices included in each device, do not affect the overall implementation of the technical solution in the embodiments of the present invention, and can all be regarded as equivalent replacements or derivatives of the technical solution claimed to be protected in the embodiments of the present invention.

[0061] The video playback device 100 in the embodiment of the present invention is mainly used to: respond to a video playback request and determine a playback control instruction corresponding to the video playback request;

[0062] Determining target cache data according to the first cache area and / or the second cache area and the playback control instruction;

[0063] The target player corresponding to the video playback request is used to output the target audio-visual content corresponding to the target cache data.

[0064] The video playback device 100 in the embodiment of the present invention may be an independent video playback device, such as a smart terminal such as a mobile phone, a tablet computer, a smart TV, and a smart computer, or may be a video playback network or a video playback cluster composed of multiple video playback devices.

[0065] The embodiments of the present application provide a video playback method, apparatus, device, and computer-readable storage medium, which are described in detail below.

[0066] It can be understood by those skilled in the art that Figure 1 The application environment shown in is only one of the application scenarios related to the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 More or fewer video playback devices, or video playback network connection relationships shown, such as Figure 1 Only one video playback device is shown in the figure. It can be understood that the scenario of the video playback method can also include one or more video playback devices, which is not specifically limited here. The video playback device 100 can also include a memory for storing data to be played and other data.

[0067] It should be noted that Figure 1 The scene diagram of the video playback method shown is only an example. The scene of the video playback method described in the embodiment of the present invention is to more clearly illustrate the technical solution of the embodiment of the present invention, and does not constitute a limitation on the technical solution provided by the embodiment of the present invention.

[0068] Based on the scenario of the above-mentioned video playback method, various embodiments of the video playback method disclosed in the present invention are proposed.

[0069] like Figure 2 As shown, Figure 2 This is a flow chart of an embodiment of a video playback method in an embodiment of the present application. The video playback method includes the following steps 201 to 203:

[0070] 201. Respond to a video playback request and determine a playback control instruction corresponding to the video playback request;

[0071] The video playback method in this embodiment is applied to video playback devices, and the type and number of video playback devices are not specifically limited. That is, the video playback device can be one or more smart display terminals that support online playback of audio and video. In a specific embodiment, the video playback device can be a smart display terminal such as a smart computer, smart phone, tablet computer, and smart TV that can watch online audio and video such as streaming media.

[0072] Specifically, the video playback device plays audio and video online in the following manner: when the video playback device is connected to the Internet, it sends a connection request to a bitstream server pointed to by a specified link address through an online network, and after receiving response information fed back by the bitstream server based on the sent request, it establishes a network connection with the bitstream server, receives video bitstream data transmitted by the bitstream server, caches the video bitstream data in a specified cache area, and drives the target player to periodically read the audio and video cache data to be played from the specified cache area for playback.

[0073] Specifically, during operation, the video playback device responds to a video playback request, wherein the video playback request is an operation request that drives the video playback device to play the target audio-visual content in the specified cache area online according to the video playback request. The triggering method of the video playback request is not specifically limited here, that is, the video playback request can be a video playback request triggered by the user when the online video starts playing, that is, the user requests to play the video content in the specified target player, and the video playback request is triggered when the target player starts playing the corresponding video content. In addition, the video playback request can also be a video playback request triggered by the user performing a corresponding interactive operation (such as double-speed playback, fast forward, fast rewind, and jump to a specified playback node) when the target player plays the corresponding video content.

[0074] Specifically, after receiving the playback control request corresponding to the target player, the video playback device parses the playback control request and reads the playback control instruction carried in the playback control request. The playback control instruction is an operation instruction that represents the control of the target player to perform playback control during the online playback of the target audio and video data. Optionally, in a specific embodiment, the playback control instruction may include a playback interaction control instruction such as a start control instruction, a multiple speed playback control instruction, a fast forward playback control instruction, a fast rewind playback control instruction, and a jump playback control instruction.

[0075] The start control instruction is a playback interactive control instruction that drives the target player to start online playback of the pointed online video content.

[0076] The speed-up playback control instruction is a playback interaction control instruction for driving the target player to play the online video content pointed to online at a specified playback speed.

[0077] Among them, the fast-forward playback control instruction is a playback interactive control instruction that drives the target player to jump to a specified video content position for online playback according to the fast-forward control parameters.

[0078] The fast-rewind playback control instruction is a playback interaction control instruction that drives the target player to jump to a designated video content position for online playback according to the fast-rewind control parameters.

[0079] Among them, the jump play control instruction is a play interaction control instruction that drives the target player to jump to the specified video content for online play according to the jump control parameters.

[0080] 202. Determine target cache data according to the first cache area and / or the second cache area and the playback control instruction;

[0081] Specifically, after obtaining the playback control instruction corresponding to the video playback request, the video playback device determines the target cache data to be played through the playback control instruction and the first cache area and / or the second cache area.

[0082] Specifically, Figure 3 As shown, Figure 3 A schematic diagram of a scenario of an embodiment of online video playback in a video playback method provided in an embodiment of the present application. Figure 3 It can be seen that in order to avoid the situation where the online video playback may be stuck due to factors such as insufficient input data volume and frequent triggering of playback control instructions causing the cache area corresponding to the target player to frequently disconnect from the bitstream server and re-establish the connection, the video playback device pre-sets a first cache area and a second cache area during the online playback of the target player, and alternately reads the target cache data to be played through the first cache area and / or the second cache area, thereby increasing the input data volume and reducing the frequency of re-establishing the connection between the second cache area and the bitstream server, thereby effectively improving the stability and smoothness of the online video playback of the video playback device.

[0083] The first cache area is a backup cache area for pre-caching video data to be played corresponding to the target player when playing the video online. Each cache area in the backup cache area stores backup cache data, each cache area is connected in series by a linked list, and the backup cache data in each cache area includes a first backup cache parameter and a second backup cache parameter, wherein the first backup cache parameter is a parameter characterizing the backup cache data and the starting position of the corresponding cache area. The second backup cache parameter is a parameter characterizing the backup cache data and the length of the corresponding cache area.

[0084] The second cache area is a video cache area corresponding to the target player for pre-caching video data to be played when playing the video online.

[0085] Specifically, after receiving a video playback request, the video playback device obtains a video address identifier corresponding to the video playback request, accesses a designated bitstream server according to the video address identifier, and caches the corresponding video bitstream data from the bitstream server into a first cache area or a second cache area, and performs cache hit identification according to the playback control instruction and the first cache area and / or the second cache area, thereby obtaining the target cache data hit in the first cache area and / or the second cache area, so as to realize alternating reading of the target cache data to be played through the first cache area and / or the second cache area.

[0086] Optionally, in a specific embodiment, after obtaining the playback control instruction in the video playback request, the video playback device also obtains the target jump position corresponding to the playback control instruction and the video code stream data pointed to by the video playback request. The target jump position is a parameter representing the progress jump position corresponding to the video data to be played by the target player. The video code stream data is the complete video code stream data corresponding to the online playback process of the target player.

[0087] Among them, the video code stream data is the streaming media video data obtained by the video playback device when it is in an online state, sending a connection request to the code stream server pointed to by the specified link address through the online network, receiving the response information fed back by the code stream server based on the sending request, and then establishing a network connection with the code stream server, sending online video identification information to the code stream server, and obtaining the streaming media video data from the code stream server.

[0088] Optionally, in a specific embodiment, the video code stream data can be streaming media video data with a resolution of 2K, a video code rate of 80Mbps average code rate, a data format of MP4 format, and containing 1 Video data, 1 Audio data, 1 Subtit le data, and evenly distributed audio, video and subtitles.

[0089] Optionally, in another specific embodiment, the video code stream data can be online streaming media video data with a resolution of 4K, a video code rate of 130Mbps average code rate, a data format of MP4 format, and including 1 Video data, 1 Audio data, 1 subtitle data, and evenly distributed audio, video and subtitles.

[0090] Optionally, in another specific embodiment, the video code stream data can also be online streaming video data with a resolution of 4K, a video code rate of 130Mbps average code rate, a data format of FMP4 format, including 1 Video data, 2 Audio data, no subtitles, uneven audio distribution, and block distribution.

[0091] Optionally, in a specific embodiment, after the video playback device obtains the playback control instruction, it also determines the target jump position corresponding to the playback control request according to the playback control type. Optionally, the video playback device can classify the playback control instruction into different playback control types according to different control types of the playback control instruction. In a specific embodiment, the playback control type includes a start control type and a jump control type.

[0092] Optionally, the video playback device determines the playback control type corresponding to the start control instruction as the start control type. The video playback device also determines the playback control type of video control instructions such as the double speed playback control instruction, the fast forward playback control instruction, the fast rewind playback control instruction and the jump playback control instruction as the jump control type.

[0093] Specifically, after acquiring the playback control type corresponding to the playback control instruction, the video playback device determines the target jump position of the playback control instruction according to the playback control type and / or the jump timestamp and / or the target jump parameter corresponding to the playback control instruction.

[0094] Optionally, in an optional embodiment, after obtaining the playback control type corresponding to the playback control instruction, the video playback device determines that the playback control type is a start control type, and then determines the starting playback position or breakpoint playback position of the video stream data as the target jump position.

[0095] That is, after determining that the playback control type is the start playback control type, the video playback device accesses the historical playback record in the target browser. If there is no historical playback record of the video code stream data in the historical playback record, the video playback device determines the start playback position of the video code stream data as the target jump position. If there is a historical playback record of the video code stream data in the historical playback record, the historical playback position in the historical playback record is determined as the breakpoint playback position, and the breakpoint playback position is determined as the target jump position.

[0096] Optionally, in another optional embodiment, after the video playback device obtains the playback control type corresponding to the playback control instruction, it determines that the playback control type is a jump control type, and then determines the target jump position of the playback control instruction according to the jump timestamp and / or target jump parameter of the playback control instruction. Among them, the target jump parameter is a progress parameter that points to the corresponding video content (such as actors and role highlights) and drives the target player to jump to the corresponding video content. For example, in a specific embodiment, the user can choose the target player to only watch a certain role / actor during the online video playback process, and determine the corresponding progress parameter of the role / actor's appearance as the target jump parameter. In addition, in another specific embodiment, the target player can pre-mark part of the wonderful content in the video content corresponding to the video stream data, and generate a target jump parameter for jumping to the part of the wonderful content.

[0097] That is, after determining that the playback control type is a jump control type, the video playback device reads the jump timestamp and / or target jump parameter in the playback control instruction, and determines the playback progress position corresponding to the jump timestamp and / or target jump parameter as the target jump position of the playback control instruction.

[0098] Specifically, after obtaining the target jump position of the playback control instruction, the video playback device determines the target request data corresponding to the video playback request according to the target jump position and the video stream data, wherein the target request data is a request data parameter corresponding to the part of the video stream data to be cached and played by the video playback device.

[0099] That is, after obtaining the target jump position, the video playback device locates the data to be requested to be played by the target player in the video stream data through the target jump position, that is, the part of the video stream data corresponding to the target jump position and subsequent progress in the video stream data is determined as the target request data to be requested by the target player for online playback.

[0100] Specifically, after obtaining the target request data, the video playback device also determines the target cache data to be played according to the target request data and the first cache area and / or the second cache area. That is, after determining the target request data to be requested, the video playback device compares the target request data with the cache data in the first cache area and / or the second cache area, thereby determining whether there is a hit target cache data in the first cache area and / or the second cache area.

[0101] Specifically, after obtaining the target request data, the video playback device searches for the target backup cache data associated with the target request data from the backup cache data cached in the first cache area. That is, the video playback device matches the target request data with the backup cache data to determine whether the target backup cache data to be played is cached in the first cache area.

[0102] Optionally, if the first cache area in the video playback device does not cache the target cache data corresponding to the target request data, the video playback device obtains the target cache data to be played according to the target request data and the second cache area.

[0103] That is, after the video playback device determines that the target cache data corresponding to the target request data does not exist in the first cache area, the video playback device controls the target player to disconnect the communication connection with the bitstream server, and establishes a new data cache request with the bitstream server according to the target request data, and then caches part of the video bitstream data associated with the target request data from the bitstream server to the second cache area, so that the video playback device can read the target cache data associated with the target request data in the second cache area.

[0104] Optionally, in a specific embodiment, after determining that the target cache data corresponding to the target request data does not exist in the first cache area, the video playback device clears the initial cache data of each cache area in the target player. In addition, the video playback device also obtains the first request parameter and the second request parameter in the initial target request, and generates a data cache request based on the first request parameter and the second request parameter. The first request parameter is a parameter representing the starting position of the video code stream data to be cached. The second request parameter is a data length representing the video code stream data to be cached. The video playback device generates a data cache request for requesting the code stream server to send the corresponding video code stream data based on the first request parameter and the second request parameter.

[0105] Specifically, the video playback device establishes a connection with the bitstream server based on the data cache request, obtains the video bitstream data sent by the bitstream server based on the data cache request, caches the video bitstream data to the second cache area to update the data in the second cache area, and obtains the updated second cache area.

[0106] Specifically, after obtaining the updated second cache area, the video playback device reads the video cache data associated with the target request data in the updated second cache area, and determines the video cache data as the target cache data, thereby reducing the number of times the video playback device requests reconstruction with the bitstream server, reducing the time loss caused by frequent disconnection and connection to the bitstream server, increasing the cache of downloaded data, and improving the fluency of online playback.

[0107] Optionally, in other embodiments, the video playback device further updates and replaces the first cache area according to the second cache area to obtain an updated first cache area.

[0108] 203. Use the target player corresponding to the video playback request to output the target audio-visual content corresponding to the target cache data.

[0109] Specifically, after acquiring the target cache data, the video playback device uses the target player to output the target video content corresponding to the target cache data.

[0110] Optional, in Figure 3 In the specific embodiment shown, the target player in the video playback device also includes a playback demultiplexing module, a target decoding module, a data synchronization module and an audio-visual playback module.

[0111] Specifically, after obtaining the target cache data to be played, the video playback device uses the playback demultiplexing module in the target player to parse the target cache data to obtain the target video data and target audio data corresponding to the target cache data. In a specific embodiment, the playback demultiplexing module is a Demux module.

[0112] Specifically, after acquiring the target video data and the target audio data, the video playback device inputs the target video data and the target audio data into a target decoding module for decoding processing to obtain decoded video data and decoded audio data.

[0113] Specifically, after the video playback device obtains the decoded video data and the decoded audio data, in order to avoid audio and video asynchrony, the video playback device also inputs the decoded video data and the decoded audio data into the data synchronization module of the target player, and uses the data synchronization module to perform data synchronization processing on the decoded video data and the decoded audio data to obtain synchronized playback data.

[0114] Specifically, after acquiring the synchronous playback data, the video playback device inputs the synchronous playback data into the audio-visual playback module in the target player, and uses the audio-visual playback module of the target player to output the target audio-visual content corresponding to the synchronous playback data.

[0115] In this embodiment, the video playback device determines the playback control instruction corresponding to the video playback request by responding to the video playback request; determines the target cache data according to the first cache area and / or the second cache area and the playback control instruction; and uses the target player corresponding to the video playback request to output the target audio-visual content corresponding to the target cache data. When playing streaming media video data online, in addition to the conventional cache area, a first cache area is added as a backup cache area, and the target cache data is read alternately according to the playback control instruction and the first cache area and / or the second cache area, thereby reducing the probability of the cache area frequently disconnecting and connecting to the server, and using the target player to play the target audio-visual content corresponding to the target cache data, thereby reducing the situation of video playback jamming caused by frequent requests for network cache during playback without increasing additional resource consumption, improving the smoothness of online video playback, and optimizing the online video playback experience.

[0116] like Figure 4 As shown, Figure 4 The flowchart of an embodiment of obtaining target cache data from the first cache area in the video playback method provided in the embodiment of the present application is as follows. Specifically, based on the above embodiment, in this embodiment, the video playback method further includes steps 301 to 303:

[0117] 301. Obtain backup cache data in the first cache area;

[0118] 302. If there is an overlapping data area between the target request data and the backup cache data, obtain the target cache data in the first cache area;

[0119] 303. If the target request data and the backup cache data are different, obtain the target cache data to be played according to the target request data and the second cache area.

[0120] Based on the above embodiments, in this embodiment, after receiving a video playback request, the video playback device obtains a video address identifier corresponding to the video playback request, accesses a designated bitstream server according to the video address identifier, and caches the corresponding video bitstream data from the bitstream server into a first cache area or a second cache area, and performs cache hit identification according to the playback control instruction and the first cache area and / or the second cache area, thereby obtaining the target cache data hit in the first cache area, so as to realize alternating reading of the target cache data to be played through the first cache area and / or the second cache area.

[0121] The first cache area is a backup cache area for pre-caching video data to be played corresponding to the target player when playing the video online. Each cache area in the backup cache area stores backup cache data, each cache area is connected in series by a linked list, and the backup cache data in each cache area includes a first backup cache parameter and a second backup cache parameter, wherein the first backup cache parameter is a parameter characterizing the backup cache data and the starting position of the corresponding cache area. The second backup cache parameter is a parameter characterizing the backup cache data and the length of the corresponding cache area.

[0122] Specifically, after obtaining the target request data, the video playback device further obtains the backup cache data cached in the first cache area, and obtains the first cache parameter and the second cache parameter in the backup cache data. The first cache parameter is a data parameter that characterizes the data starting position of each backup cache data. The second cache parameter is a data parameter that characterizes the data length of each backup cache data.

[0123] Specifically, after obtaining the target request data and the backup cache data, the video playback device also compares the target request data and the backup cache data to determine whether there is an overlapping data area between the target request data and the backup cache data, and hits the target cache data in the first cache area according to the overlapping data area. The overlapping data area includes a partial data overlapping area and a complete data overlapping area.

[0124] That is, the video playback device determines the request data area corresponding to the target request data according to the first request parameter and the second request parameter in the target request data, and the first cache parameter and the second cache parameter of the backup cache data according to the first cache parameter and the second cache parameter, and determines the cache data area corresponding to the backup cache data according to the first cache parameter and the second cache parameter, and determines whether there is an overlapping data area between the target request data and the backup cache data by comparing the request data area and the cache data area.

[0125] like Figure 5a As shown, Figure 5a A schematic diagram of a scenario of an embodiment of determining an overlapping data area in a video playback method provided in an embodiment of the present application, wherein Figure 5a In the illustrated embodiment, if the request data area and the cache data area partially overlap or completely overlap (that is, the cache data area is larger than the request data area and larger than the request data area), it is determined that the target request data and the backup cache data have an overlapping data area, and the backup cache data corresponding to the overlapping data area in the first cache area is determined as the target cache data.

[0126] Optional, such as Figure 5b As shown, Figure 5bA schematic diagram of a scenario in which there is no overlapping data area in the first cache area in the video playback method provided in the embodiment of the present application. Figure 5b In the illustrated embodiment, if the first cache area and the request data area do not overlap at all, it is determined that the target request data and the backup cache data are different, and the video playback device determines that the target cache data corresponding to the target request data is not cached in the first cache area, then the video playback device obtains the target cache data to be played based on the target request data and the second cache area.

[0127] That is, after the video playback device determines that the target cache data corresponding to the target request data does not exist in the first cache area, the video playback device controls the target player to disconnect the communication connection with the code stream server, and establishes a new data cache request with the code stream server according to the target request data, and then caches part of the video code stream data associated with the target request data from the code stream server to the second cache area, so that the video playback device can read the target cache data associated with the target request data in the second cache area, and realizes the alternating reading of the target cache data according to the first cache area and the second cache area, thereby reducing the number of times the video playback device and the code stream server request reconstruction, reducing the time loss caused by frequent disconnection and connection to the code stream server, increasing the cache of downloaded data, and improving the fluency of online playback.

[0128] In this embodiment, the video playback device obtains the backup cache data in the first cache area; if the target request data and the backup cache data have overlapping data areas, the target cache data in the first cache area is obtained; if the target request data and the backup cache data are different, the target cache data to be played is obtained according to the target request data and the second cache area. The backup cache area is used to read the video data to be played, and the smoothness of online video playback is improved and the online playback freeze rate is reduced without adding additional resources.

[0129] like Figure 6 As shown, Figure 6 This is a flow chart of an embodiment of updating the first cache area in the video playback method provided in the embodiment of the present application. Specifically, in this embodiment, the video playback method further includes steps 401 to 403:

[0130] 401. Count the number of backup cache hits of the first cache area, and obtain a cache hit threshold corresponding to the first cache area;

[0131] 402. If the number of hits in the backup cache is less than the cache hit threshold, releasing the first cache area;

[0132] 403. Use the second cache area to replace the first cache area to obtain an updated first cache area.

[0133] Based on the above embodiment, in this embodiment, the video playback device also updates and replaces the first cache area according to the number of backup cache hits corresponding to the target cache data in the first cache area to obtain an updated first cache area. That is, when the video playback device obtains the target cache data from the second cache area multiple times, it determines that the cache hit rate of the first cache area is low, and replaces the first cache area with the second cache area to obtain an updated first cache area.

[0134] Specifically, the video playback device also obtains a cache hit threshold associated with the first cache area, and compares the number of backup cache hits of the first cache area during online playback with the cache hit number, thereby determining a cache hit rate of the first cache area, and then determining whether the first cache area needs to be updated based on the cache hit rate.

[0135] Optionally, if the number of backup cache hits is less than the cache hit threshold, the video playback device determines that the cache hit rate of the first cache area is low, and the video playback device releases the first cache area, that is, the video playback device clears the first cache area and replaces the first cache area with the second cache area to obtain an updated first cache area, thereby improving the cache hit rate of the first cache area.

[0136] In this embodiment, the video playback device obtains the cache hit threshold corresponding to the first cache area by counting the number of backup cache hits of the first cache area; if the number of backup cache hits is less than the cache hit threshold, the first cache area is released; the first cache area is replaced with the second cache area to obtain an updated first cache area. When the cache hit probability of the backup cache area is low, the backup cache area is replaced with the second cache area to improve the cache hit rate of the backup cache area, thereby improving the smoothness of online video playback.

[0137] In order to better implement the video playback method in the embodiment of the present application, based on the video playback method, the embodiment of the present application also provides a video playback device, such as Figure 7 As shown, Figure 7 The structure diagram of an embodiment of a video playback device provided in an embodiment of the present application is as follows. Specifically, the video playback device 500 includes:

[0138] The instruction acquisition module 501 is configured to respond to a video playback request and determine a playback control instruction corresponding to the video playback request;

[0139] The cache acquisition module 502 is configured to determine target cache data according to the first cache area and / or the second cache area and the playback control instruction;

[0140] The video playing module 503 is configured to output the target audio-visual content corresponding to the target cache data using the target player corresponding to the video playing request.

[0141] In a possible implementation of this embodiment, the video playback device determines the target cache data according to the first cache area and / or the second cache area and the playback control instruction, including:

[0142] Obtaining a target jump position corresponding to the playback control instruction and video stream data corresponding to the video playback request;

[0143] Determine the target request data corresponding to the video playback request according to the video code stream data and the target jump position;

[0144] The target cache data to be played is determined according to the target request data, the first cache area and / or the second cache area.

[0145] In a possible implementation of this embodiment, the video playback device obtains the target jump position corresponding to the playback control instruction and the video stream data corresponding to the video playback request, including:

[0146] Parsing the playback control instruction to determine the playback control type corresponding to the playback control instruction;

[0147] If the playback control type is a start playback control type, the start playback position or the breakpoint playback position of the video code stream data is determined as the target jump position;

[0148] If the playback control type is a jump control type, the target jump position of the playback control instruction is determined according to the jump timestamp and / or the target jump parameter of the playback control instruction.

[0149] In a possible implementation of this embodiment, the video playback device determines the target cache data to be played according to the target request data, the first cache area and / or the second cache area, including:

[0150] Acquire the backup cache data in the first cache area;

[0151] If there is an overlapping data area between the target request data and the backup cache data, acquiring the target cache data in the first cache area;

[0152] If the target request data and the backup cache data are not the same, the target cache data to be played is acquired according to the target request data and the second cache area.

[0153] In a possible implementation of this embodiment, the video playback device obtains the target cache data to be played according to the target request data and the second cache area, including:

[0154] Acquire a first request parameter and a second request parameter in the target request data, and generate a data cache request according to the first request parameter and the second request parameter;

[0155] updating data in the second cache area according to the data cache request and a preset bitstream server to obtain an updated second cache area;

[0156] The target cache data associated with the target request data in the updated second cache area is read.

[0157] In a possible implementation of this embodiment, after the video playback device determines the target cache data according to the first cache area and / or the second cache area and the playback control instruction, it further includes:

[0158] Counting the number of backup cache hits of the first cache area, and obtaining a cache hit threshold corresponding to the first cache area;

[0159] If the number of hits in the backup cache is less than the cache hit threshold, releasing the first cache area;

[0160] The first cache area is replaced by the second cache area to obtain an updated first cache area.

[0161] In a possible implementation of this embodiment, the video playback device uses the target player corresponding to the video playback request to output the target audio-visual content corresponding to the target cache data, including:

[0162] Utilizing a playback demultiplexing module in the target player to parse the target cache data, and obtain target video data and target audio data;

[0163] Decoding the target video data and the target audio data to obtain decoded video data and decoded audio data;

[0164] Performing data synchronization processing on the decoded video data and the decoded audio data to obtain synchronized playback data;

[0165] The target player is used to output the target audio-visual content corresponding to the synchronous playback data.

[0166] In this embodiment, the video playback device determines the playback control instruction corresponding to the video playback request by responding to the video playback request; determines the target cache data according to the first cache area and / or the second cache area and the playback control instruction; and uses the target player corresponding to the video playback request to output the target audio-visual content corresponding to the target cache data. When playing streaming media video data online, in addition to the conventional cache area, a first cache area is added as a backup cache area, and the target cache data is read alternately according to the playback control instruction and the first cache area and / or the second cache area, thereby reducing the probability of the cache area frequently disconnecting and connecting to the server, and using the target player to play the target audio-visual content corresponding to the target cache data, thereby reducing the situation of video playback jamming caused by frequent requests for network cache during playback without increasing additional resource consumption, improving the smoothness of online video playback, and optimizing the online video playback experience.

[0167] The embodiment of the present invention also provides a video playback device, such as Figure 8 As shown, Figure 8 A schematic diagram of the structure of an embodiment of a video playback device provided in an embodiment of the present application.

[0168] The video playback device integrates any one of the video playback devices provided in the embodiments of the present invention, and the video playback device includes:

[0169] one or more processors;

[0170] Memory; and

[0171] One or more applications, wherein the one or more applications are stored in the memory and are configured so that the processor executes the steps of the video playback method described in any of the above-mentioned video playback method embodiments.

[0172] Specifically, the video playback device may include one or more processors 601 of processing cores, one or more computer-readable storage media memories 602, a power supply 603, an input unit 604 and other components. Those skilled in the art will appreciate that Figure 8 The video playback device structure shown in the figure does not constitute a limitation on the video playback device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0173] The processor 601 is the control center of the video playback device. It uses various interfaces and lines to connect various parts of the entire video playback device. By running or executing software programs and / or modules stored in the memory 602, and calling data stored in the memory 602, it executes various functions of the video playback device and processes data, thereby monitoring the video playback device as a whole. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601.

[0174] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the video playback device, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.

[0175] The video playback device also includes a power supply 603 for supplying power to each component. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 603 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0176] The video playback device may further include an input unit 604, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0177] Although not shown, the video playback device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 601 in the video playback device will load the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 will run the application programs stored in the memory 602, thereby realizing various functions, as follows:

[0178] In response to a video playback request, determining a playback control instruction corresponding to the video playback request;

[0179] Determining target cache data according to the first cache area and / or the second cache area and the playback control instruction;

[0180] The target player corresponding to the video playback request is used to output the target audio-visual content corresponding to the target cache data.

[0181] In this embodiment, the video playback device determines the playback control instruction corresponding to the video playback request by responding to the video playback request; determines the target cache data according to the first cache area and / or the second cache area and the playback control instruction; and uses the target player corresponding to the video playback request to output the target audio-visual content corresponding to the target cache data. When playing streaming media video data online, in addition to the conventional cache area, a first cache area is added as a backup cache area, and the target cache data is read alternately according to the playback control instruction and the first cache area and / or the second cache area, thereby reducing the probability of the cache area frequently disconnecting and connecting to the server, and using the target player to play the target audio-visual content corresponding to the target cache data, thereby reducing the situation of video playback jamming caused by frequent requests for network cache during playback without increasing additional resource consumption, improving the smoothness of online video playback, and optimizing the online video playback experience.

[0182] To this end, an embodiment of the present invention provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any video playback method provided in an embodiment of the present invention. For example, the computer program is loaded by a processor to execute the following steps:

[0183] In response to a video playback request, determining a playback control instruction corresponding to the video playback request;

[0184] Determining target cache data according to the first cache area and / or the second cache area and the playback control instruction;

[0185] The target player corresponding to the video playback request is used to output the target audio-visual content corresponding to the target cache data.

[0186] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.

[0187] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.

[0188] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0189] The above is a detailed introduction to a video playback method provided in an embodiment of the present application. Specific embodiments are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A video playback method, characterized in that: The video playing method comprises: In response to a video playback request, determining a playback control instruction corresponding to the video playback request; Determining target cache data according to the first cache area and / or the second cache area and the playback control instruction; The target player corresponding to the video playback request is used to output the target audio-visual content corresponding to the target cache data.

2. The video playback method according to claim 1, characterized in that: The determining the target cache data according to the first cache area and / or the second cache area and the playback control instruction includes: Obtaining a target jump position corresponding to the playback control instruction and video stream data corresponding to the video playback request; Determine the target request data corresponding to the video playback request according to the video code stream data and the target jump position; The target cache data to be played is determined according to the target request data, the first cache area and / or the second cache area.

3. The video playback method according to claim 2, characterized in that: The obtaining of the target jump position corresponding to the playback control instruction includes: Parsing the playback control instruction to determine the playback control type corresponding to the playback control instruction; If the playback control type is a start playback control type, the start playback position or the breakpoint playback position of the video code stream data is determined as the target jump position; If the playback control type is a jump control type, the target jump position of the playback control instruction is determined according to the jump timestamp and / or the target jump parameter of the playback control instruction.

4. The video playback method according to claim 2, characterized in that: The step of determining the target cache data to be played according to the target request data, the first cache area and / or the second cache area includes: Acquire the backup cache data in the first cache area; If there is an overlapping data area between the target request data and the backup cache data, acquiring the target cache data in the first cache area; If the target request data and the backup cache data are not the same, the target cache data to be played is acquired according to the target request data and the second cache area.

5. The video playback method according to claim 4, characterized in that: The step of acquiring the target cache data to be played according to the target request data and the second cache area includes: Acquire a first request parameter and a second request parameter in the target request data, and generate a data cache request according to the first request parameter and the second request parameter; updating data in the second cache area according to the data cache request and a preset bitstream server to obtain an updated second cache area; The target cache data associated with the target request data in the updated second cache area is read.

6. The video playback method according to claim 1, characterized in that: After determining the target cache data according to the first cache area and / or the second cache area and the playback control instruction, the method further includes: Counting the number of backup cache hits of the first cache area, and obtaining a cache hit threshold corresponding to the first cache area; If the number of hits in the backup cache is less than the cache hit threshold, releasing the first cache area; The first cache area is replaced by the second cache area to obtain an updated first cache area.

7. The video playback method according to any one of claims 1 to 6, characterized in that: The step of using the target player corresponding to the video playback request to output the target audio-visual content corresponding to the target cache data includes: Utilizing a playback demultiplexing module in the target player to parse the target cache data, and obtain target video data and target audio data; Decoding the target video data and the target audio data to obtain decoded video data and decoded audio data; Performing data synchronization processing on the decoded video data and the decoded audio data to obtain synchronized playback data; The target player is used to output the target audio-visual content corresponding to the synchronous playback data.

8. A video playback device, characterized in that: The video playback device comprises: An instruction acquisition module is configured to respond to a video playback request and determine a playback control instruction corresponding to the video playback request; A cache acquisition module, configured to determine target cache data according to the first cache area and / or the second cache area and the playback control instruction; The video playing module is configured to output the target audio-visual content corresponding to the target cache data using the target player corresponding to the video playing request.

9. A video playback device, characterized in that: The video playback device comprises: one or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the processor to implement the steps of the video playback method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps of the video playing method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Video playback method, apparatus and device, and storage medium

    WO2026152882A1