Playback control method, device, storage medium and electronic device

By dynamically determining the playback cache threshold in the terminal device, based on the stuttering data of the playback device, the stuttering problem caused by unstable network status during media data playback is solved, and a smoother playback experience is achieved.

CN116017026BActive Publication Date: 2025-03-18DOUYIN VISION CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211597554.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-12
Publication Date
2025-03-18
Estimated Expiration
2042-12-12

AI Technical Summary

Technical Problem

When playing media data in a terminal device, unstable network status may cause lag, and the prior art cannot dynamically adjust the cache threshold to adapt to different network statuses, resulting in the impact of playback fluency.

Method used

When the media data is in a non-play state, the stuttering data of the playback device in the preset time window is obtained, and the playback cache threshold is dynamically determined based on the data, and whether the current cached data meets the playback conditions, and switch to the playback status when the conditions are met.

Benefits of technology

By dynamically adjusting the cache threshold, adapting to different network states, ensuring the fluency of media data during playback, and reducing the occurrence of lag.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116017026B_ABST
    Figure CN116017026B_ABST
Patent Text Reader

Abstract

The disclosed embodiments provide a playback control method, device, storage medium and electronic device. The method includes: when the media data is in a non-playing state, obtaining the current cache data of the media data, and obtaining the jamming data of the playback device within a preset time window; determining the playback cache threshold based on the jamming data; making a playback judgment on the current cache data based on the playback cache threshold, and if the current cache data meets the playback condition corresponding to the playback cache threshold, switching the non-playing state to the playback state, and playing the media data based on the current cache data. By determining a dynamic playback cache threshold, the playback condition of the current cache data is accurately judged, the switching accuracy of the playback state is improved, and the jamming phenomenon during playback is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to computer technology, and more particularly to a playback control method, device, storage medium, and electronic device. Background Art

[0002] With the continuous development of terminal devices, playing video, audio and other media data through terminals is widely used by users. In the process of playing the above media data, it is necessary to obtain the corresponding data from the server and play it.

[0003] Due to the network status of the terminal device, there may be problems such as freezing during the playback of media data. In order to ensure the smoothness of media data playback, cache data of media data is set on the terminal. Therefore, the size of cache data is an important factor to pay attention to during the playback of media data. Summary of the invention

[0004] The present disclosure provides a playback control method, device, storage medium and electronic device to achieve smoothness of media data during playback.

[0005] In a first aspect, an embodiment of the present disclosure provides a playback control method, including:

[0006] When the media data is in a non-playing state, obtaining current cache data of the media data, and obtaining freeze data of the playback device within a preset time window;

[0007] Determine a playback buffer threshold based on the jam data;

[0008] A playback determination is performed on the current cached data based on the playback cache threshold; if the current cached data meets a playback condition corresponding to the playback cache threshold, the non-playback state is switched to a playback state, and the media data is played based on the current cached data.

[0009] In a second aspect, the present disclosure also provides a playback control device, including:

[0010] A data acquisition module, used to acquire the current cache data of the media data when the media data is not in a playback state, and to acquire the jamming data of the playback device within a preset time window;

[0011] A playback buffer threshold determination module, used to determine a playback buffer threshold based on the jam data;

[0012] The playback module is used to make a playback decision on the current cached data based on the playback cache threshold. If the current cached data meets the playback condition corresponding to the playback cache threshold, the non-playback state is switched to the playback state, and the media data is played based on the current cached data.

[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, characterized in that the electronic device includes:

[0014] one or more processors;

[0015] a storage device for storing one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the playback control method provided by the embodiment of the present disclosure.

[0017] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute a playback control method as provided in an embodiment of the present disclosure.

[0018] The technical solution provided by the embodiment of the present disclosure is that when a playback device plays media data and the media data is in a non-playing state, the jam data of the playback device in a preset time window is read to determine the playback cache threshold suitable for the current playback device based on the jam data. The recent cause effect of jams is fully considered, and the jam data in the preset time window is updated in real time. In the case of a non-playing state, the latest jam data is read to ensure the accuracy of the jam data. The playback cache threshold is determined by the jam data, that is, the obtained playback cache threshold meets the requirements of the jam data, that is, meets the requirements of the network status of the playback device. The current cache data is judged by the playback cache threshold to determine whether the playback conditions are met, and the playback state is switched to play when the playback conditions are met to play the media data. Among them, the current cache threshold meets the playback conditions, indicating that the cache data continuously obtained under this network state can ensure the smoothness of playback and reduce playback jams. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0020] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0021] Figure 2 It is a flowchart of a playback control method provided by an embodiment of the present disclosure;

[0022] Figure 3 It is a flowchart of a playback control method provided by an embodiment of the present disclosure;

[0023] Figure 4 is a structural schematic diagram of a playback control device provided by an embodiment of the present disclosure;

[0024] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0026] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0027] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0028] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0029] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0030] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0031] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0032] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0033] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0034] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0035] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0036] For example, see Figure 1 , Figure 1 : is a schematic diagram of an application scenario provided by an embodiment of the present disclosure. Among them, the uploading terminal is connected to the server in communication, and the server is connected to the viewing terminal in communication. The uploading terminal is used to upload media data to the server, and the server stores the media data uploaded by the uploading terminal. The viewing terminal requests the media data from the server, caches it locally and plays it. It can be understood that the uploading terminal and the viewing terminal can be the same electronic device or different electronic devices. Here, the uploading terminal and the viewing terminal can include but are not limited to electronic devices such as mobile phones, tablet computers, PCs or computers.

[0037] In this embodiment, the media data includes but is not limited to audio data, video data, etc. Among them, the video data includes long videos or short videos, etc.

[0038] During the playback of any of the above types of media data, the media data is requested from the server and cached locally. The cached data is judged by the cache threshold, and the media data is played when the amount of cached data meets the cache threshold. At present, the cache threshold is generally a pre-set fixed value. Therefore, the cache threshold cannot be dynamically adjusted and cannot be applied to different terminals, especially terminals with poor network status. Compared with terminals with good network status, the above cached data is judged based on the same cache threshold. Terminals with poor network status are more likely to experience playback jams, which affects the smoothness of the media data playback process.

[0039] In view of the above technical problems, an embodiment of the present invention provides a playback control method, see Figure 2 , Figure 2 The present invention provides a flowchart of a playback control method provided by an embodiment of the present invention. The present invention is applicable to the case where the cached data is judged when the media data is in a non-playing state to switch to a playing state. The method can be executed by a playback control device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, PC, etc. Figure 2 As shown, the method includes:

[0040] S110: When the media data is in a non-playing state, obtain current cache data of the media data, and obtain freeze data of the playback device within a preset time window.

[0041] S120: Determine a playback cache threshold based on the jamming data.

[0042] S130: Perform a playback determination on the current cached data based on the playback cache threshold; if the current cached data satisfies a playback condition corresponding to the playback cache threshold, switch the non-playback state to a playback state, and play the media data based on the current cached data.

[0043] In this embodiment, the non-playing state of the media data includes a stuck state and an unstarted state, wherein the unstarted state is a state where the media data is not started to play. The stuck state is a paused state caused by a stuck play during the playing of the media data.

[0044] When the terminal is in a non-playing state or a stuck state, media data is requested from the server and cached locally, that is, the cached data of the media data continues to increase. Switching from the non-playing state to the playing state, and switching from the stuck state to the continued playing state, both require that the amount of cached data is greater than or equal to the playback cache threshold. Here, the playback cache threshold is a dynamic threshold, that is, when the media data switches to the non-playing state, the playback cache threshold applicable to the current non-playing state is determined, and the amount of cached data in the current non-playing state is determined.

[0045] In this embodiment, when it is detected that the media data is in a non-playing state, the jamming data of the playback device within a preset time window is obtained to determine the current playback cache threshold. The preset time window may be a historical time period before the current moment, and the current moment is the end time of the preset time window. Exemplarily, the duration of the preset time window may be 100ms, 1 minute, 5 minutes, etc., which may be determined according to the detection requirements.

[0046] The jamming data characterizes the jamming degree within a preset time window. For example, the larger the jamming data, the more serious the jamming state. Furthermore, the jamming data can characterize the network state of the playback device (such as a viewing terminal). For example, the smaller the jamming data, the better the network state of the playback device within the preset time window, and the larger the jamming data, the worse the network state of the playback device within the preset time window. By determining the jamming data and determining the playback cache threshold based on the jamming data, the determined playback cache threshold is applicable to the network state of the playback device.

[0047] Optionally, obtaining the jamming data of the playback device within a preset time window may be to obtain the number of jamming times within the preset time window as the jamming data. A jamming data set may be created in advance, and the jamming data set is used to store jamming information, wherein the jamming information may include a jamming identifier and a jamming timestamp. In the event that any media data is detected to be jammed during playback, jamming information is generated and stored in the above-mentioned jamming data set. In some embodiments, multiple jamming data sets may be created and maintained according to the type of media data, for example, including a video jamming data set, an audio jamming data set, etc. Accordingly, when the media data is in a non-playing state, a jamming data set of a corresponding type is called according to the type of the media data to determine the jamming data of the corresponding type of media data.

[0048] According to the preset time window, a match is performed in the above-mentioned jamming data set to determine the jamming information / jamming identification where the jamming timestamp is within the above-mentioned preset time window, and the number of the above-mentioned jamming information / jamming identification, that is, the number of jamming times, is counted as the jamming data.

[0049] In some embodiments, the jamming data set may be a jamming data set corresponding to a preset time window, that is, when a new jamming occurs, the generated jamming information is added to the jamming data set, and when the timestamp corresponding to the stored jamming information exceeds the time range of the preset time window, the jamming information is removed from the jamming data set. Accordingly, the number of jamming information / jamming identifiers in the jamming data set is counted to obtain the number of jamming times as the jamming data within the preset time window.

[0050] Optionally, obtaining the jamming data of the playback device within a preset time window may be to obtain the jamming duration within the preset time window as the jamming data. The jamming timestamp in the jamming information in the jamming data set may include a jamming start timestamp and a jamming end timestamp, and the jamming duration of each jamming may be determined based on the jamming timestamp. The jamming duration within the preset time window is determined by summing the jamming durations corresponding to the jamming information within the preset time window, and the jamming duration within the preset time window is determined as the jamming data.

[0051] Optionally, obtaining the jamming data of the playback device within a preset time window may be by obtaining the number of jamming times within the preset time window, obtaining the jamming duration within the preset time window, and determining the jamming data based on the number of jamming times and the jamming duration. Exemplarily, the jamming data may be determined as the product of the number of jamming times and the jamming duration. Exemplarily, the jamming data may be determined based on (1+number of jamming times)*(1+jamming duration). The jamming data is determined by the number of jamming times and the jamming duration, thereby improving the accuracy of the jamming data.

[0052] Since the playback duration in the preset time window is uncertain, the number of freezes in the two preset time windows is n, and the playback duration in the first preset time window is longer than that in the second preset time window. Accordingly, it can be known that the network status of the playback device in the first preset time window is better than that in the second preset time window. In order to avoid the interference of the above-mentioned playback duration on the freeze data and network status, the freeze data of the playback device in the preset time window can be obtained by obtaining the number of freezes in the preset time window and the playback duration of the preset time window, and taking the ratio data of the number of freezes to the playback duration as the freeze data. Among them, the playback duration of the preset time window can be determined according to the playback time information of the historical media data, and the total playback duration in the preset time window is determined. By taking the ratio data of the number of freezes to the playback duration as the freeze data, the accuracy of the freeze data is improved.

[0053] In some embodiments, the playback duration of the playback device in the preset time window may be the playback duration of media data of the same type as the media data currently being played within the preset time window.

[0054] Optionally, obtaining the jamming data of the playback device within a preset time window may be to obtain the jamming duration within the preset time window and the playback duration of the preset time window, and use the ratio data of the jamming duration to the playback duration as the jamming data. Here, the method for determining the jamming duration within the preset time window and the playback duration of the preset time window is not repeated.

[0055] On the basis of the above embodiments, the playback cache threshold is determined based on the stuttering data determined by any of the above methods. It should be noted that the non-playback state includes a stuttering state and a not-started state, wherein the playback cache thresholds determined by the stuttering state and the not-started state are different. Here, the status identifier of the playback device may be read to determine whether the playback device is in a stuttering state or a not-started state. Exemplarily, the status identifier may be 1 or 0, wherein 1 may represent a stuttering state and 0 may represent a not-started state. The specific form of the status identifier is not limited here, and it can be used to distinguish between a stuttering state and a not-started state.

[0056] In some embodiments, the determination strategies of the playback cache thresholds corresponding to the stuck state and the non-starting state are pre-set, and the corresponding determination strategies of the playback cache thresholds are called according to the determined stuck state or non-starting state, and the current playback cache threshold is obtained based on the stuck data and the above-mentioned determination strategies of the playback cache thresholds. Among them, the determination strategy of the playback cache threshold may include calculation rules and calculation factors, and accordingly, in the determination strategies of the playback cache thresholds corresponding to the stuck state and the non-starting state, one or more of the calculation rules and calculation factors are different. Among them, the calculation factor is a parameter in the calculation rule, which can be one or more, determined according to the calculation requirements. The calculation rule is a processing rule for the calculation factor and the stuck data to obtain the playback cache threshold. Accordingly, the determination strategy of the playback cache threshold is called according to the state type, and the determination strategy of the playback cache threshold may include a preset calculation formula, and the calculation formula includes the to-be-determined stuck data and the preset calculation factor, and the stuck data is input into the above-mentioned determination strategy of the playback cache threshold to obtain the playback cache threshold corresponding to the state type.

[0057] In some embodiments, determining the playback cache threshold based on the jam data includes: obtaining the state type of the non-playing state of the media data, determining the corresponding calculation factor based on the state type; and determining the playback cache threshold corresponding to the state type based on the calculation factor and the jam data. Here, the state types of the non-playing state include the jam state and the non-playing state. Accordingly, the jam state and the non-playing state have different calculation factors corresponding to them, and the calculation factor corresponding to the current state data is read. Based on the read calculation factor and the determined jam data, the playback cache threshold corresponding to the state type is determined.

[0058] Optionally, the calculation factor includes initial data and growth parameters, wherein the initial data may be a minimum playback cache threshold. The playback cache threshold increases with the increase of the jam data, and the growth data may be unit growth data of the playback cache threshold. Accordingly, determining the playback cache threshold corresponding to the state type based on the calculation factor and the jam data includes: determining the growth data based on the growth parameter and the jam data, and determining the playback cache threshold based on the growth data and the initial data.

[0059] Exemplarily, the product of the jam data and the growth data may be determined as the growth data; Exemplarily, the jam data may be processed by a preset type to obtain a jam parameter, and the product of the jam parameter and the growth data may be determined as the growth data. The preset types of jam data processing herein include, but are not limited to, exponential data, preset type processing, etc., which are not limited here.

[0060] In some embodiments, determining the growth data based on the growth parameter and the jamming data includes: performing preset type processing on the jamming data to obtain the jamming parameter; determining the growth data based on the jamming parameter and the growth parameter. Among them, the preset type processing includes logarithmic function processing, exponential function processing, power function processing, etc. In some embodiments, the preset type processing is logarithmic function processing. By performing logarithmic function processing on the jamming data, when the jamming data increases, it can be clearly reflected in the growth data and the playback cache threshold, and the playback cache threshold applicable to the jamming data is obtained, and the cache data in the current non-playing state is determined.

[0061] Exemplarily, the growth data may be determined by: growth parameter * log (1 + stuck data). Furthermore, the sum of the above growth data and the initial data is determined as the playback cache threshold, or the playback cache threshold is calculated based on the following formula: initial data * (1 + growth data). In summary, for the stuck state, the first growth parameter and the first initial data corresponding to the stuck state are read, the first growth data is determined based on the first growth parameter and the stuck data, and the playback cache threshold corresponding to the stuck state is determined based on the first growth data and the first initial data. For the not-started state, the second growth parameter and the second initial data corresponding to the not-started state are read, the second growth data is determined based on the second growth parameter and the stuck data, and the playback cache threshold corresponding to the not-started state is determined based on the second growth data and the second initial data.

[0062] On the basis of the above-mentioned embodiment, before playing the media data, the media data is preloaded and cached, and when switching to playing the media data, the media data is played based on the preloaded data. It should be noted that when switching to playing the media data, the preloading process of the media data is stopped, and the amount of preloaded data no longer increases, but the cached data of the media data can continue to be obtained to increase the amount of cached data. In this embodiment, the network status of the playback device can be characterized according to the amount of preloaded data, wherein the larger the amount of preloaded data, the better the network status of the playback device, and conversely, the smaller the amount of preloaded data, the worse the network status of the playback device. In the non-playing state, different playback cache thresholds are determined according to the amount of preloaded data to adapt to different network states and improve the accuracy of the playback cache threshold.

[0063] For the non-started state, the preloaded data for the media data is determined, and the start type of the media data is determined based on the preloaded data, and the start type includes preloaded start and non-preloaded start. Wherein, when the amount of preloaded data is greater than or equal to the preset preload threshold, the start type is determined to be preloaded start, and when the amount of preloaded data is less than the preset preload threshold, the start type is determined to be non-preloaded start. Wherein, preloaded start and non-preloaded start can respectively correspond to different playback cache threshold determination strategies, that is, preloaded start and non-preloaded start can correspond to different calculation factors and / or calculation rules.

[0064] In some embodiments, the method for determining the playback cache threshold includes: calling the corresponding calculation factor according to the determined start type; and determining the playback cache threshold corresponding to the start type based on the determined calculation factor and the freeze data. Correspondingly, the playback cache threshold corresponding to the non-start state includes a preloaded playback cache threshold and a non-preloaded playback cache threshold.

[0065] Optionally, the calculation factor corresponding to the preloaded start is smaller than the calculation factor corresponding to the non-preloaded start. Furthermore, when the jamming data is the same, the preloaded start cache threshold is smaller than the non-preloaded start cache threshold to ensure that the number of jamming events is reduced after switching to the playback state.

[0066] On the basis of the above embodiment, after determining the playback cache threshold corresponding to the state type based on the calculation factor and the jamming data, it also includes: obtaining the preset maximum threshold corresponding to the state type; if the playback cache threshold corresponding to the state type exceeds the preset maximum threshold corresponding to the state type, updating the playback cache threshold based on the preset maximum threshold.

[0067] In order to avoid the situation where the playback cache threshold is too large, resulting in a long non-playing state, a preset maximum threshold corresponding to each state type is set, and the determined playback cache threshold is determined to avoid the problem of being in the non-playing state for too long.

[0068] After determining the playback cache threshold corresponding to the current non-playing state, the data volume of the current cached data is determined based on the playback cache threshold, and it is determined that the data volume of the current cached data is greater than or equal to the playback cache threshold. If so, it indicates that the current cached data meets the playback condition, and the media data is played based on the current cached data. If not, it indicates that the current cached data does not meet the playback condition, then continue to obtain the cached data, and re-read the current cached data after a preset time interval to re-determine the playback condition until the playback condition is met or the duration of the non-playing state meets the timeout duration, switch to the playback state, and play the media data based on the current cached data.

[0069] In some embodiments, when the current cached data does not meet the playback conditions, the jamming data can be reacquired and the playback cache threshold can be re-determined. Accordingly, after a preset time interval, the current cached data to be read is determined based on the re-determined playback cache threshold.

[0070] The technical solution of the disclosed embodiment is that when a playback device plays media data and the media data is in a non-playing state, the jamming data of the playback device in a preset time window is read to determine a playback cache threshold suitable for the current playback device based on the jamming data. The recent cause effect of jamming is fully considered, and the jamming data in the preset time window is updated in real time. In the case of a non-playing state, the latest jamming data is read to ensure the accuracy of the jamming data. The playback cache threshold is determined by the jamming data, that is, the obtained playback cache threshold meets the requirements of the jamming data, that is, meets the requirements of the network status of the playback device. The current cache data is judged by the playback cache threshold to determine whether the playback conditions are met, and the playback state is switched to play the media data when the playback conditions are met. Among them, the current cache threshold meets the playback conditions, indicating that the cache data continuously obtained under this network state can ensure the smoothness of playback and reduce playback jams.

[0071] Based on the above embodiment, a preferred example of a playback control method is provided. Figure 3 , Figure 3It is a flow chart of a playback control method provided by an embodiment of the present invention. When the media data is in a non-playing state, it is determined that the state type of the non-playing state is a stuck state or a non-playing state. For the stuck state, the stuck data and the current cached data in the preset time window are read, and the corresponding playback cache threshold is determined based on the stuck data, that is, the stuck water level rebuf_dur. Specifically, it can be calculated based on the following formula: rebuf_dur = min(rebuf_dur_min*(1+rebuf_dur_inc_factor*log(1+rebuf_count)), rebuf_dur_max), where rebuf_dur_min is the initial data corresponding to the stuck state, rebuf_dur_inc_factor is the growth data corresponding to the stuck state, rebuf_count is the number of stuck times, that is, the stuck data, and rebuf_dur_max is the preset maximum threshold corresponding to the stuck state. It should be noted that rebuf_count here is only an example of jamming data. In other embodiments, the jamming data may also be the jamming duration rebuf_time, or the jamming data determined by the number of jamming times and the jamming duration, or the jamming data determined by the number of jamming times and the playing duration, or the jamming data determined by the jamming duration and the playing duration, etc. For example, rebuf_dur = min(rebuf_dur_min*(1+rebuf_dur_inc_factor*log(1+(1+rebuf_count)*(1+rebuf_time))), rebuf_dur_max).

[0072] The current cached data is compared with the playback cache threshold corresponding to the stuck state, and the media data is played when the current cached data is greater than or equal to the playback cache threshold corresponding to the stuck state. When the current cached data is less than the playback cache threshold corresponding to the stuck state, the stuck data and the current cached data within the preset time window are returned to be re-acquired, and the playback cache threshold is re-determined, and the re-acquired current cached data is judged.

[0073] For the state of not starting to play, the preloaded data, the current cached data and the jamming data in the preset time window are obtained to calculate the playback cache threshold corresponding to the state of not starting to play, that is, the startup water level startup_buf_dur. Accordingly, the playback cache threshold can be determined by different calculation formulas according to the size of the preloaded data. Exemplarily, the amount of preloaded data preload_size is greater than the preload threshold startup_cache_size, which can be 500kb. The start type of the unstarted state is determined to be preloaded start, and the playback cache threshold is min(startup_buf_dur_preloaded_init*(1+startup_buf_inc_factor_preloaded*log(1+rebuf_count)), startup_buf_dur_preloaded_max), wherein startup_buf_dur_preloaded_init is the initial data corresponding to the preloaded start, startup_buf_inc_factor_preloaded is the growth parameter corresponding to the preloaded start, and rebuf_count is the number of freezes, i.e., a type of freeze data. Similarly, the number of freezes can also be freeze data determined by other methods. startup_buf_dur_preloaded_max is the preset maximum threshold corresponding to the preloaded start.

[0074] The data amount preload_size of the preloaded data is less than the preload threshold startup_cache_size, and the start type of the unstarted state is determined to be non-preloaded start, and the playback cache threshold is min(startup_buf_dur_nonpreloaded_init*(1+startup_buf_inc_factor_nonpreloaded*log(1+rebuf_count)), startup_buf_dur_nonpreloaded_max), startup_buf_dur_nonpreloaded_init is the initial data corresponding to the non-preloaded start, startup_buf_inc_factor_nonpreloaded is the growth parameter corresponding to the non-preloaded start, and startup_buf_dur_nonpreloaded_max is the preset maximum threshold corresponding to the non-preloaded start.

[0075] Compare the current cached data with the playback cache threshold corresponding to the not-started state, and play the media data if the current cached data is greater than or equal to the playback cache threshold corresponding to the not-started state. If the current cached data is less than the playback cache threshold corresponding to the not-started state, return to re-acquire the jam data, current cached data, and preloaded data within the preset time window, re-determine the playback cache threshold, and make a judgment on the re-acquired current cached data.

[0076] Figure 4 A schematic diagram of the structure of a playback control device provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the device includes: a data acquisition module 210 , a playback buffer threshold determination module 220 and a playback module 230 .

[0077] The data acquisition module 210 is used to acquire the current cache data of the media data when the media data is not in a playback state, and acquire the freeze data of the playback device within a preset time window;

[0078] A playback buffer threshold determination module 220, configured to determine a playback buffer threshold based on the jamming data;

[0079] The playback module 230 is used to make a playback decision on the current cached data based on the playback cache threshold. If the current cached data meets the playback condition corresponding to the playback cache threshold, the non-playback state is switched to the playback state, and the media data is played based on the current cached data.

[0080] Based on the above embodiment, optionally, the non-playing state includes a stuck state and a not-played state;

[0081] The playback buffer threshold determination module 220 includes:

[0082] a calculation factor determination unit, configured to obtain a state type of the non-playing state of the media data, and determine a corresponding calculation factor based on the state type;

[0083] A playback cache threshold determination unit is used to determine a playback cache threshold corresponding to the state type based on the calculation factor and the jam data.

[0084] Based on the above embodiment, optionally, the calculation factor includes initial data and growth parameters;

[0085] The playback cache threshold determination unit is used to: determine the growth data based on the growth parameter and the jamming data, and determine the playback cache threshold based on the growth data and the initial data.

[0086] Optionally, the playback cache threshold determination unit is used to: perform preset type processing on the jamming data to obtain a jamming parameter; and determine the growth data based on the jamming parameter and the growth parameter.

[0087] Optionally, the calculation factor determination unit is used to: for the non-playing state, determine preloaded data for the media data, and determine a play start type of the media data based on the preloaded data, wherein the play start type includes preloaded play start and non-preloaded play start; and call a corresponding calculation factor according to the determined play start type;

[0088] Correspondingly, the playback buffer threshold corresponding to the not-played state includes a preloaded playback buffer threshold and a non-preloaded playback buffer threshold.

[0089] Based on the above embodiment, optionally, the playback buffer threshold determination module 220 further includes:

[0090] A playback cache threshold verification module is used to obtain a preset maximum threshold corresponding to the state type after determining the playback cache threshold corresponding to the state type based on the calculation factor and the jamming data; if the playback cache threshold corresponding to the state type exceeds the preset maximum threshold corresponding to the state type, the playback cache threshold is updated based on the preset maximum threshold.

[0091] Based on the above embodiment, optionally, the data acquisition module 210 is used to:

[0092] Obtaining the number of freezes within the preset time window as the freeze data;

[0093] Obtain the number of freezes in the preset time window and the playback duration of the preset time window, and use the ratio of the number of freezes to the playback duration as the freeze data;

[0094] Obtaining the freeze duration within the preset time window as the freeze data;

[0095] Obtaining the freeze duration in the preset time window and the playback duration in the preset time window, and taking the ratio of the freeze duration to the playback duration as the freeze data;

[0096] The number of freezes in the preset time window is obtained, the duration of freezes in the preset time window is obtained, and the freeze data is determined based on the number of freezes and the duration of freezes.

[0097] The playback control device provided in the embodiments of the present disclosure can execute the playback control method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0098] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0099] Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 5 , which shows an electronic device (eg, Figure 5 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0100] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.

[0101] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0102] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0103] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0104] The electronic device provided by the embodiment of the present disclosure and the playback control method provided by the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0105] The embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the playback control method provided by the above embodiment is implemented.

[0106] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0107] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0108] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0109] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0110] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: when the media data is in a non-playing state, obtains the current cached data of the media data, and obtains the jamming data of the playback device within a preset time window; determines the playback cache threshold based on the jamming data; makes a playback judgment on the current cached data based on the playback cache threshold, and if the current cached data meets the playback condition corresponding to the playback cache threshold, switches the non-playing state to the playing state, and plays the media data based on the current cached data.

[0111] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0112] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0113] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0114] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0115] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0116] [In the detailed description section, after the full text is finished, please repeat all the contents that you want to protect in the form of claims in the following form:]

[0117] According to one or more embodiments of the present disclosure, [Example 1] provides a playback control method, including:

[0118] When the media data is in a non-playing state, obtain the current cached data of the media data, and obtain the jamming data of the playback device within a preset time window; determine the playback cache threshold based on the jamming data; make a playback determination on the current cached data based on the playback cache threshold, and if the current cached data meets the playback condition corresponding to the playback cache threshold, switch the non-playing state to the playing state, and play the media data based on the current cached data.

[0119] According to one or more embodiments of the present disclosure, [Example 2] provides the playback control method of Example 1, further comprising:

[0120] The non-playing state includes a stuck state and a not-played state;

[0121] The determining of the playback cache threshold based on the jamming data includes: obtaining the state type of the non-playing state of the media data, and determining a corresponding calculation factor based on the state type; and determining the playback cache threshold corresponding to the state type based on the calculation factor and the jamming data.

[0122] According to one or more embodiments of the present disclosure, [Example 3] provides the playback control method of Example 1, further comprising:

[0123] The calculation factors include initial data and growth parameters;

[0124] The determining of the playback cache threshold corresponding to the state type based on the calculation factor and the jamming data includes: determining the growth data based on the growth parameter and the jamming data, and determining the playback cache threshold based on the growth data and the initial data.

[0125] According to one or more embodiments of the present disclosure, [Example 4] provides the playback control method of Example 1, further comprising:

[0126] The determining of the growth data based on the growth parameter and the jamming data includes: performing preset type processing on the jamming data to obtain the jamming parameter; and determining the growth data based on the jamming parameter and the growth parameter.

[0127] According to one or more embodiments of the present disclosure, [Example 5] provides the playback control method of Example 1, further comprising:

[0128] The determining of the corresponding calculation factor based on the state type includes: for the non-playing state, determining preloading data for the media data, and determining the play type of the media data based on the preloading data, wherein the play type includes preloading play and non-preloading play; and calling the corresponding calculation factor according to the determined play type;

[0129] Correspondingly, the playback buffer threshold corresponding to the not-played state includes a preloaded playback buffer threshold and a non-preloaded playback buffer threshold.

[0130] According to one or more embodiments of the present disclosure, [Example 6] provides the playback control method of Example 1, further comprising:

[0131] After determining the playback cache threshold corresponding to the state type based on the calculation factor and the jamming data, it also includes: obtaining a preset maximum threshold corresponding to the state type; if the playback cache threshold corresponding to the state type exceeds the preset maximum threshold corresponding to the state type, updating the playback cache threshold based on the preset maximum threshold.

[0132] According to one or more embodiments of the present disclosure, [Example 7] provides the playback control method of Example 1, further comprising:

[0133] The obtaining of the jamming data of the playback device within a preset time window includes any of the following:

[0134] Obtaining the number of freezes within the preset time window as the freeze data;

[0135] Obtain the number of freezes in the preset time window and the playback duration of the preset time window, and use the ratio of the number of freezes to the playback duration as the freeze data;

[0136] Obtaining the freeze duration within the preset time window as the freeze data;

[0137] Obtaining the freeze duration in the preset time window and the playback duration in the preset time window, and taking the ratio of the freeze duration to the playback duration as the freeze data;

[0138] The number of freezes in the preset time window is obtained, the duration of freezes in the preset time window is obtained, and the freeze data is determined based on the number of freezes and the duration of freezes.

[0139] According to one or more embodiments of the present disclosure, [Example 8] provides a playback control device, including:

[0140] A data acquisition module, used to acquire the current cache data of the media data when the media data is not in a playback state, and to acquire the jamming data of the playback device within a preset time window;

[0141] A playback buffer threshold determination module, used to determine a playback buffer threshold based on the jam data;

[0142] The playback module is used to make a playback decision on the current cached data based on the playback cache threshold. If the current cached data meets the playback condition corresponding to the playback cache threshold, the non-playback state is switched to the playback state, and the media data is played based on the current cached data.

[0143] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0144] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0145] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A playback control method, characterized in that: include: When the media data is in a non-playing state, obtaining the current cached data of the media data and obtaining the freeze data of the playback device within a preset time window; the non-playing state includes a freeze state and a non-playing state; Determine a playback buffer threshold based on the jam data; The playback buffer thresholds corresponding to the stuck state and the not-played state are different; A playback determination is performed on the current cached data based on the playback cache threshold; if the current cached data meets a playback condition corresponding to the playback cache threshold, the non-playback state is switched to a playback state, and the media data is played based on the current cached data.

2. The method according to claim 1, characterized in that The determining the playback buffer threshold based on the jam data includes: Obtaining a state type of the non-playing state of the media data, and determining a corresponding calculation factor based on the state type; A playback buffer threshold corresponding to the state type is determined based on the calculation factor and the jam data.

3. The method according to claim 2, characterized in that The calculation factors include initial data and growth parameters; The determining, based on the calculation factor and the jam data, a playback buffer threshold corresponding to the state type includes: Growth data is determined based on the growth parameter and the jam data, and the playback cache threshold is determined based on the growth data and the initial data.

4. The method according to claim 3, characterized in that The determining the growth data based on the growth parameter and the jam data includes: Performing preset type processing on the jam data to obtain jam parameters; The growth data is determined based on the jamming parameter and the growth parameter.

5. The method according to claim 2, characterized in that The determining of the corresponding calculation factor based on the state type includes: For the non-playing state, determining preloaded data for the media data, and determining a play type of the media data based on the preloaded data, the play type including preloaded play and non-preloaded play; According to the determined start type, calling the corresponding calculation factor; Correspondingly, the playback buffer threshold corresponding to the not-yet-started state includes a preloaded playback buffer threshold and a non-preloaded playback buffer threshold.

6. The method according to claim 2, characterized in that After determining the playback buffer threshold corresponding to the state type based on the calculation factor and the jam data, the method further includes: Obtaining a preset maximum threshold corresponding to the state type; If the playback buffer threshold corresponding to the state type exceeds a preset maximum threshold corresponding to the state type, the playback buffer threshold is updated based on the preset maximum threshold.

7. The method according to claim 1, characterized in that The obtaining of the jamming data of the playback device within a preset time window includes any of the following: Obtaining the number of freezes within the preset time window as the freeze data; Obtaining the number of freezes within the preset time window and the playback duration of the preset time window, and using the ratio of the number of freezes to the playback duration as the freeze data; Obtaining the duration of the freeze within the preset time window as the freeze data; Obtaining a freeze duration within the preset time window and a playback duration within the preset time window, and using a ratio of the freeze duration to the playback duration as the freeze data; Obtain the number of freezes within the preset time window, obtain the freeze duration within the preset time window, and determine the freeze data based on the number of freezes and the freeze duration.

8. A playback control device, characterized in that: include: A data acquisition module is used to acquire the current cached data of the media data and the freeze data of the playback device within a preset time window when the media data is in a non-playing state; the non-playing state includes a freeze state and a non-playing state; a playback buffer threshold determination module, configured to determine a playback buffer threshold based on the jam data; wherein the playback buffer thresholds corresponding to the jam state and the unstarted state are different; A playback module is used to make a playback determination on the current cached data based on the playback cache threshold. If the current cached data meets the playback condition corresponding to the playback cache threshold, the non-playback state is switched to the playback state, and the media data is played based on the current cached data.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the playback control method according to any one of claims 1 to 7.

10. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the playback control method according to any one of claims 1 to 7 when executed by a computer processor.

Citation Information

Patent Citations

  • Live broadcast data processing method, computing device and readable storage medium

    CN114885209A