WO2023197810A1 - 预加载方法、装置、电子设备及介质 - Google Patents

预加载方法、装置、电子设备及介质 Download PDF

Info

Publication number
WO2023197810A1
WO2023197810A1 PCT/CN2023/081498 CN2023081498W WO2023197810A1 WO 2023197810 A1 WO2023197810 A1 WO 2023197810A1 CN 2023081498 W CN2023081498 W CN 2023081498W WO 2023197810 A1 WO2023197810 A1 WO 2023197810A1
Authority
WO
WIPO (PCT)
Prior art keywords
preloading
preload
parameter
coefficient
threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/081498
Other languages
English (en)
French (fr)
Inventor
何伟
张傲阳
钟振东
马茜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to US18/856,843 priority Critical patent/US20250254383A1/en
Publication of WO2023197810A1 publication Critical patent/WO2023197810A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content

Definitions

  • Embodiments of the present disclosure relate to the field of computer technology, for example, to a preloading method, device, electronic equipment, and media.
  • video playback applications mainly adopt a preloading method.
  • Embodiments of the present disclosure provide a preloading method, device, electronic device, and medium.
  • embodiments of the present disclosure provide a preloading method, including:
  • Preloading of data within the application is performed based on the target preloading parameters.
  • embodiments of the present disclosure also provide a preloading device, including:
  • the first determination module is set to determine the lag coefficient based on the historical lag information of the application
  • the second determination module is configured to determine the target preloading parameter based on the comparison result between the stuck coefficient and the set threshold;
  • a preloading module configured to preload data within the application based on the target preloading parameters.
  • embodiments of the present disclosure also provide an electronic device, including:
  • a storage device configured to store one or more programs
  • the one or more programs are executed by the one or more processing devices, so that the one or more processing devices implement the preloading method provided by the embodiment of the present disclosure.
  • embodiments of the disclosure also provide a computer-readable medium on which a computer program is stored. When the program is executed by a processing device, the preloading method provided by the embodiment of the disclosure is implemented.
  • Figure 1 is a schematic flowchart of a preloading method provided by Embodiment 1 of the present disclosure
  • Figure 2 is a schematic flow chart of a preloading method provided by Embodiment 2 of the present disclosure
  • Figure 3 is a schematic flowchart of a preloading method provided in Embodiment 2 of the present disclosure
  • Figure 4 is a schematic structural diagram of a preloading device provided in Embodiment 3 of the present disclosure.
  • FIG. 5 is a schematic structural diagram of an electronic device provided in Embodiment 4 of the present disclosure.
  • One type of preloading method is to preload based on the status of the currently playing video, such as the player buffer length, whether the download is completed, etc.
  • embodiments of the present disclosure provide a preloading method, device, electronic device, and medium.
  • the term “include” and its variations are open-ended, ie, “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”; and the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • each embodiment provides optional features and examples at the same time.
  • Each feature recorded in the embodiments can be combined to form multiple embodiments.
  • Each numbered embodiment should not be regarded as just one. An example.
  • the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
  • Figure 1 is a schematic flowchart of a preloading method provided by Embodiment 1 of the present disclosure.
  • the method can preload a video.
  • the method can be executed by a preloading device, where the device can be implemented by software and/or hardware, and It is generally integrated on an electronic device.
  • the electronic device includes but is not limited to: a computer, a laptop, a tablet, and/or a mobile phone.
  • the first frame will take time, that is, the client needs to request video data from the server and transmit it After controlling the protocol (Transmission Control Protocol, TCP) establishment, transmission, decapsulation, decoding and other processes, the video data will be rendered to the client's screen and start playing.
  • TCP Transmission Control Protocol
  • one type of video playback method mainly adopts the preloading method, that is, when playing the current video, the data of the subsequent video is requested to be downloaded in advance and cached locally.
  • the preloading method that is, when playing the current video, the data of the subsequent video is requested to be downloaded in advance and cached locally.
  • it can reduce the time spent on the first frame of subsequent video playback and reduce the proportion of unstarted videos, thereby improving the smoothness of users watching videos; on the other hand, it can play videos without network, increasing the user's viewing time.
  • the purpose of preloading is to reduce the time consuming of the first frame and the proportion of unstarted playback.
  • the size of the loaded data in one type of preloading method has far exceeded the actual amount of data required for video playback, and there is a lot of data redundancy.
  • the preloading method often does not consider historical playback quality information. For example, users often experience freezes when watching videos. At this time, the preload size cannot be reduced, but new video data should be preloaded as much as possible when the network condition is good; If the user has never experienced freezes while watching videos, the preload size can be reduced to reduce data waste.
  • a preloading method provided by Embodiment 1 of the present disclosure includes the following steps:
  • the historical lag information can be understood as the lag situation of the application when playing videos in history, which may include, for example, the number of lags and/or the duration of the lags.
  • the historical stuck information represents The time period for stuck situations is not limited, it can be a specific time period, or it can be within the application life cycle.
  • the freezing coefficient can be used to characterize the freezing situation of the current application.
  • the lag coefficient can be determined based on the historical lag information of the application. This embodiment does not limit the specific steps for determining the lag coefficient.
  • the lag coefficient can be determined based on the number of lags within a set time period, or The lag coefficient can be comprehensively determined based on the number of lags in a long period of time, the number of lags in a recent period of time (such as a set time period), and the lag duration corresponding to each lag coefficient in the most recent period.
  • the set threshold may refer to a critical value set in advance by the system or relevant personnel, which is used to determine the target preloading parameters.
  • the set threshold may be a fixed value, or may include a first threshold and a second threshold. In this embodiment, This is not a limitation.
  • the target preloading parameters can be considered as parameters for preloading data in the application, which can include preloading timing, preloading size and/or preloading number, etc.
  • the preloading timing can refer to the timing of downloading subsequent videos in advance. It can be understood as time or conditions, that is, when a certain time point is reached or a certain condition is met, subsequent videos can be downloaded in advance to achieve preloading.
  • the specific content of the time point and conditions is not limited here, such as After setting the duration from the start of the video, subsequent videos can be downloaded in advance; it can also be done when the playback progress of the currently playing video reaches two-thirds, or when the number of loaded videos is less than the set value.
  • Preloading, set duration and set value can be set by relevant personnel and are not further limited here.
  • the preload size can be thought of as the size of the preloaded video, that is, the size of the video that needs to be downloaded in advance. For example, it can be the sum of the sizes of each video that needs to be downloaded in advance, or it can be the size of each video, the size of each video It can be one-third of the total size of each video downloaded in advance; the number of preloads can be understood as the number of videos that need to be downloaded in advance.
  • the stuck coefficient can be compared with the set threshold to obtain the comparison result, and then the target preloading parameter can be determined based on the comparison result. For example, when the freezing coefficient is greater than the set threshold, the timing of preloading can be delayed and the number and size of preloading can be increased. For example, when the set threshold includes a first threshold and a second threshold, when the freezing coefficient is greater than or equal to the first threshold, the target preload parameter can be set to delay the timing of preloading, and the number of preloads can be increased.
  • the in-application data can be preloaded based on the determined target preloading parameters.
  • Embodiment 1 of the present disclosure provides a preloading method.
  • the method includes: determining a lag coefficient based on historical lag information of an application; and determining a target preload based on a comparison result between the lag coefficient and a set threshold. Parameters; perform preloading of data within the application based on the target preloading parameters.
  • the lag coefficient can be determined based on the historical lag information of the application, and then the target preload parameters can be determined based on the comparison result of the lag coefficient and the set threshold, thereby achieving dynamic adjustment of the target preload parameters and realizing In order to optimize the video viewing experience while reducing the waste rate of preloading data.
  • the historical lag information includes first lag information and second lag information.
  • the first lag information includes the number of lags within the life cycle of the application.
  • the second lag information includes the number of pauses within a set time period and the corresponding pause duration.
  • the set time period is a set duration before the current time.
  • the first lag information may refer to the lag situation of the application in its life cycle.
  • the first lag information may include the number of lags in the life cycle of the application, where the life cycle may be understood as The entire process from creation to completion of the application process. This embodiment can obtain the first stuck information in the time period from the creation of the application process to the current moment.
  • the second lag information may refer to the lag situation of the application within the set time period.
  • the second lag information may include the number of lags within the set time period and the corresponding lag duration, etc., wherein, it is assumed that The fixed time period can be considered as a time period with a set duration before the current time.
  • the set duration can be set by the system or relevant personnel, which is not limited in this embodiment.
  • determining the lag coefficient based on the historical lag information of the application includes:
  • the weighted value of the first coefficient and the second coefficient is determined as a stall coefficient.
  • the first coefficient can be considered as the stall coefficient determined based on the first stall information
  • the second coefficient can be considered as the stall coefficient determined based on the weighted value of the second stall information. This step does not determine the third stall coefficient.
  • the first lag information can be counted within The first coefficient is determined by summing the number of jams
  • the second coefficient is determined by weighting the number of jams and jam duration counted in the second jam information.
  • the lag can be determined based on the weighted values of the first coefficient and the second coefficient.
  • Coefficients where the weight coefficient during the weighting operation of the first coefficient and the second coefficient can be determined based on empirical values, and is not limited here.
  • the weighting coefficients corresponding to different users may be different.
  • the weighting value may be the sum of a times the first coefficient and b times the second coefficient.
  • the values of a and b depend on the user's sensitivity to lag.
  • the means of determining sensitivity are not limited here. For example, if the user is sensitive to freezing, the value of b can be greater than the value of a.
  • determining the second coefficient based on the weighted value of the second stuck information includes:
  • the corresponding jam durations are weighted and summed, where the weight coefficient of each jam duration is determined based on the timestamp of the jam duration;
  • the result of the weighted summation is determined as the second coefficient.
  • the weight coefficient of each jam duration can be determined based on the timestamp of the jam duration. For example, when the set time period corresponding to the second jam information is 5 minutes, and within five minutes, the current time is If the lag occurs in the first two minutes and the first four minutes, each lag is 30 seconds. At this time, the weight coefficient corresponding to the lag duration of the first two minutes can be 0.7, and the weight coefficient corresponding to the lag duration of the first four minutes can be 0.7. The weight coefficient can be 0.3. The result of the weighted sum can then be determined as a second coefficient.
  • FIG. 2 is a schematic flowchart of a preloading method provided in Embodiment 2 of the present disclosure.
  • Embodiment 2 is adjusted based on each of the above embodiments.
  • the set threshold includes a first threshold and a second threshold, the first threshold is greater than the second threshold, and the target preload parameters include preload timing, preload size, and preload number.
  • this embodiment will also determine the target preloading parameter based on the comparison result between the stuck coefficient and the set threshold.
  • the predetermined first preload parameter is determined as the target preload parameter; when the stall coefficient is less than the first threshold and greater than the second threshold, the last determined target preload parameter is The parameter is determined as the target preloading parameter this time; when the stall coefficient is less than or equal to the second threshold value, the second preload parameter is determined as the target preload parameter; wherein the preload timing included in the first preload parameter is later than the preload timing included in the second preload parameter, so
  • the preload size included in the first preload parameter is greater than the preload size included in the second preload parameter, and the number of preloads included in the first preload parameter is greater than the number of preloads included in the second preload parameter. Number of loads.
  • Embodiment 1 Please refer to Embodiment 1 for details that are not yet detailed in this embodiment.
  • a preloading method provided by Embodiment 2 of the present disclosure includes the following steps:
  • the freezing coefficient can be compared with a set threshold.
  • the setting threshold includes a first threshold and a second threshold
  • the first threshold is greater than the second threshold
  • the target preloading parameters include preloading timing, preloading time, and preloading time.
  • the first threshold can be understood as a preset danger threshold.
  • the first preload parameter can be determined as the target preload parameter, so as to control the application according to the first preload parameter.
  • the data in the program is preloaded; the second threshold can be understood as a preset safety threshold.
  • the second preload parameter can be determined as the target preload parameter, based on The second preload parameter preloads the data within the application; in addition, when the freezing coefficient is less than the first threshold and greater than the second threshold, the target preload parameter determined last time can be determined as the target preload parameter this time. , to preload in-app data based on the last determined target preload parameters.
  • the first threshold may be 5 and the second threshold may be 10.
  • the preload timing included in the first preload parameter is later than the preload timing included in the second preload parameter, and the preload size included in the first preload parameter is larger than the preload size included in the second preload parameter. Size, the number of preloads included in the first preload parameter is greater than the number of preloads included in the second preload parameter.
  • S250 Preload the data in the application based on the target preloading parameter.
  • Embodiment 2 of the present disclosure provides a preloading method that can set a first threshold and a second threshold.
  • the corresponding target preloading parameter can be determined based on the freezing coefficient and the first threshold and the second threshold, which reduces the waste rate of preloading data without degrading the playback quality.
  • FIG 3 is a schematic flowchart of a preloading method provided in Embodiment 2 of the present disclosure.
  • a timer is regularly triggered to count the historical lag situations (i.e., historical lag information) during video playback. For example, statistics are collected separately.
  • the number of jams that occur in a long period of time (i.e., the first jam information) and the jam conditions that occur in a short period of time (the number of jams, the duration of jams) (that is, the second jam information), are weighted to calculate the jam coefficient;
  • the preload adjustment logic is triggered, delaying the timing of subsequent video preloads and increasing the number and size of preloads, using the preload parameter pa (i.e., the first preload parameter );
  • the preload timing, preload number and size of the last decision will be continued (i.e.
  • the target preload parameters determined last time When the stuck coefficient is lower than the safety threshold, advance the preload triggering time, reduce the number and size of preloads, and use the preload parameter pb (that is, the second preload parameter). Therefore, the setting of safety threshold and danger threshold can effectively strike a balance between freezing rate and data waste.
  • the embodiment of the present disclosure introduces the historical stuck information of the video playback process, and sets two parameters, the safety threshold and the danger threshold. , to adjust the preloading parameters (preloading timing, preloading number and preloading size).
  • This embodiment sets two sets of fixed preloading parameters (pa, pb), including preloading timing, preloading number, and preloading size.
  • the calculated freezing coefficient is greater than the danger threshold, it means that the current playback quality is poor.
  • the lag coefficient is less than the safety threshold, it means that the current playback quality is good.
  • the safety threshold can be 5
  • the danger threshold can be 10. You can also advance the timing of preloading subsequent videos.
  • Embodiments of the present disclosure can also appropriately reduce the redundancy of preloaded data, such as reducing The number of preloads, reduce the preload size, and delay the preload timing to ensure playback quality; when lags have never occurred (high probability), that is, the number of lags included in the historical lag information is less than the first count threshold , Embodiments of the present disclosure can also increase the redundancy of preload data, such as increasing the number of preloads, increasing the preload size, and advancing the preload timing, thereby ensuring the current playback quality while saving costs. On this basis, dynamic adjustment of application preloading is achieved, making the preloading method more accurate.
  • a description of an embodiment may be as follows:
  • the target preloading parameters are determined based on the comparison result between the freezing coefficient and the set threshold, including:
  • the second preload parameter corresponding to the second threshold is adjusted based on the difference, and a target preload parameter is determined.
  • the preload timing included in the target preload parameter is earlier than the preload included in the second preload parameter. timing, the number of preloads included in the target preloading timing is greater than the number of preloads included in the second preloading parameter, and the preloading size included in the target preloading timing is larger than the number of preloading included in the second preloading parameter. Includes preload size.
  • the first count threshold can be understood as the minimum critical value of the number of freezes, which can be preset by relevant personnel.
  • the lag coefficient and the number of lags included in the set threshold can be calculated.
  • the difference between the two thresholds is used to adjust the second preload parameter corresponding to the second threshold based on the difference, thereby determining the adjusted second preload parameter as the target preload parameter.
  • the preloading timing included in the target preloading parameter (i.e., the adjusted second preloading parameter) is earlier than the preloading timing included in the second preloading parameter, and the target preloading timing includes more preloading times than The number of preloads included in the second preload parameter and the preload size included in the target preload opportunity are greater than the preload size included in the second preload parameter.
  • the target preload parameters are dynamically adjusted to advance the preload timing, increase the number of preloads and/or increase the preload size, so as to reduce and improve video playback quality.
  • the target preloading parameters are determined based on the comparison result between the freezing coefficient and the set threshold, including:
  • the first preload parameter corresponding to the first threshold is adjusted based on the difference, and a target preload parameter is determined.
  • the preload timing included in the target preload parameter is later than the preload included in the first preload parameter. timing, the number of preloads included in the target preloading timing is less than the number of preloads included in the first preloading parameter, and the preloading size included in the target preloading timing is smaller than the number of preloading included in the first preloading parameter. Includes preload size.
  • the second number threshold can be understood as the maximum critical value of the number of stalls, which can be preset by relevant personnel.
  • the difference between the jam coefficient and the first threshold included in the set threshold can be calculated.
  • the preload timing included in the target preload parameter i.e., the adjusted first preload parameter
  • the target preload timing includes less than
  • the number of preloads included in the first preload parameter and the preload size included in the target preload opportunity are smaller than the preload size included in the first preload parameter.
  • the target preload parameters are dynamically adjusted, the preload timing is delayed, the number of preloads is reduced and/or the preload size is reduced, so as to reduce the probability of freezes.
  • the lag coefficient can be composed of two parts.
  • the first part is the number of lags in the video played by the user this time (calculated from the time the app is opened to watch the video, that is, the application life cycle).
  • the second part is the specific time.
  • the jamming situation (such as the number of jams and the corresponding jamming duration) in the latest period of time is statistically obtained within the window (such as 5 minutes, that is, the set time period), and finally the two values (i.e., the first coefficient and the third Two coefficients) are weighted to calculate the final lag coefficient.
  • the player i.e., the electronic device that installs the application
  • the player can adjust the target preset value based on the difference between the freezing coefficient and the two thresholds.
  • Loading parameters preloading timing, preloading number, and preloading size). That is, when the number of jams included in the historical jam information is greater than the second threshold, the difference between the jam coefficient and the first threshold is determined, and the first preload parameter corresponding to the first threshold is adjusted based on the difference.
  • the embodiments of the present disclosure avoid the situation where the waste rate of preloading data is high, and reduce the waste of preloading data without degrading the playback quality as much as possible.
  • the disclosed embodiments can calculate the theoretical maximum and minimum benefits based on data analysis: on the one hand, the preload size of all videos is reduced from 800KB to 600KB, which reduces the preloading cost by 25% and the total bandwidth cost by approximately 1%; on the other hand, the preloading cost of all videos is reduced from 800KB to 600KB. On the other hand, as long as the user encounters freezes during video playback, the preload size will be restored to 800KB. Based on the current freeze penetration rate of 35%, even if preloading 600KB causes the penetration rate to rise to 38.5%, there will still be 61.5%. The video preload size is reduced, the preload cost can be reduced by 15%, and the total bandwidth cost is reduced by approximately 0.6%.
  • Figure 4 is a schematic structural diagram of a preloading device provided in Embodiment 3 of the present disclosure.
  • the device can preload videos.
  • the device can be implemented by software and/or hardware, and is generally integrated on an electronic device.
  • the device includes:
  • the first determination module 310 is configured to determine the lag coefficient based on the historical lag information of the application program
  • the second determination module 320 is configured to determine the target preloading parameter based on the comparison result between the stuck coefficient and the set threshold;
  • the preloading module 330 is configured to preload data within the application based on the target preloading parameters.
  • the device determines the lag coefficient based on the historical lag information of the application through the first determination module 310; and determines the target through the second determination module 320 based on the comparison result between the lag coefficient and the set threshold.
  • Preloading parameters The preloading module 330 performs preloading of data within the application based on the target preloading parameters. This device can be used to determine the lag coefficient based on the historical lag information of the application, and then determine the target preload parameter based on the comparison result between the lag coefficient and the set threshold, thereby realizing dynamic adjustment of the target preload parameter and realizing In order to optimize the video viewing experience while reducing the waste rate of preloading data.
  • the historical lag information includes first lag information and second lag information.
  • the first lag information includes the number of lags within the life cycle of the application.
  • the second lag information includes the number of pauses within a set time period and the corresponding pause duration.
  • the set time period is a set duration before the current time.
  • the first determining module 310 includes:
  • the first coefficient determination unit is configured to determine the first coefficient based on the statistical value of the first jam information
  • the second coefficient determination unit is configured to determine the second coefficient based on the weighted value of the second jamming information
  • the stall coefficient determining unit is configured to determine the weighted value of the first coefficient and the second coefficient as the stall coefficient.
  • the second coefficient determination unit is configured as:
  • the corresponding jam durations are weighted and summed, where the weight coefficient of each jam duration is determined based on the timestamp of the jam duration;
  • the result of the weighted summation is determined as the second coefficient.
  • the set threshold includes a first threshold and a second threshold, and the first threshold is greater than At the second threshold, the target preload parameters include preload timing, preload size and preload number.
  • the second determination module 320 is set to:
  • the predetermined first preload parameter as the target preload parameter
  • the preloading timing included in the first preloading parameter is later than the preloading timing included in the second preloading parameter, and the preloading size included in the first preloading parameter is larger than that of the second preloading parameter.
  • the preload size included in the parameter, the number of preloads included in the first preload parameter is greater than the number of preloads included in the second preload parameter.
  • the second determination module 320 is configured to:
  • the second preload parameter corresponding to the second threshold is adjusted based on the difference, and a target preload parameter is determined.
  • the preload timing included in the target preload parameter is earlier than the preload included in the second preload parameter. timing, the number of preloads included in the target preloading timing is greater than the number of preloads included in the second preloading parameter, and the preloading size included in the target preloading timing is larger than the number of preloading included in the second preloading parameter. Includes preload size.
  • the second determination module 320 is configured to:
  • the first preload parameter corresponding to the first threshold is adjusted based on the difference, and a target preload parameter is determined.
  • the preload timing included in the target preload parameter is later than the preload included in the first preload parameter. timing, the number of preloads included in the target preloading timing is less than the number of preloads included in the first preloading parameter, and the preloading size included in the target preloading timing is smaller than the number of preloading included in the first preloading parameter. Includes preload size.
  • the above-mentioned preloading device can execute the preloading method provided by any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution method.
  • FIG. 5 is a schematic structural diagram of an electronic device provided in Embodiment 4 of the present disclosure.
  • Figure 5 shows the appropriate A schematic structural diagram of an electronic device 400 used to implement an embodiment of the present disclosure.
  • the electronic device 400 in the embodiment of the present disclosure may include, but is not limited to, mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (Personal Digital Assistants, PDAs), tablet computers (PAD), portable multimedia players (Portable Media Mobile terminals such as Player, PMP), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital televisions (Television, TV), desktop computers, and the like.
  • PDAs Personal Digital Assistants
  • PDAs tablet computers
  • portable multimedia players Portable Media Mobile terminals
  • PMP Portable Media Mobile terminals
  • vehicle-mounted terminals such as vehicle-mounted navigation terminals
  • fixed terminals such as digital televisions (Television, TV), desktop computers, and the like.
  • the electronic device 400 shown in FIG. 5 is only an example and should not bring
  • the electronic device 400 may include one or more processing devices (such as a central processing unit, a graphics processor, etc.) 401, which may process data according to a program stored in a read-only memory (Read-Only Memory, ROM) 402. Or the program loaded from the storage device 408 into the random access memory (Random Access Memory, RAM) 403 executes various appropriate actions and processes.
  • One or more processing devices 401 implement the preloading method as provided by this disclosure.
  • various programs and data required for the operation of the electronic device 400 are also stored.
  • the processing device 401, ROM 402 and RAM 403 are connected to each other via a bus 404.
  • An input/output (I/O) interface 405 is also connected to bus 404.
  • the following devices can be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a Liquid Crystal Display (LCD) , an output device 407 such as a speaker, a vibrator, etc.; a storage device 408 including, for example, a tape, a hard disk, etc., the storage device 408 is used to store one or more programs; and a communication device 409.
  • the communication device 409 may allow the electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data.
  • FIG. 5 illustrates electronic device 400 with various means, it should be understood that implementation or availability of all illustrated means is not required. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product including a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via communication device 409, or from storage device 408, or from ROM 402.
  • the processing device 401 When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
  • the computer-readable medium mentioned above in the present disclosure 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. pieces, or any combination of the above.
  • Examples of computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), erasable programmable read only memory Memory (Erasable Programmable Read-Only Memory, EPROM) or flash memory, optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above .
  • a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
  • Program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, radio frequency (Radio Frequency, RF), etc., or any suitable combination of the above.
  • the client and server can communicate using any currently known or future developed network protocol, such as HyperText Transfer Protocol (HTTP), and can communicate with digital data in any form or medium.
  • HTTP HyperText Transfer Protocol
  • Data communications e.g., communications network
  • Examples of communication networks include Local Area Networks (LANs), Wide Area Networks (WANs), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any current network for knowledge or future research and development.
  • LANs Local Area Networks
  • WANs Wide Area Networks
  • the Internet e.g., the Internet
  • end-to-end networks e.g., ad hoc end-to-end networks
  • the computer-readable medium may be included in the electronic device 400; it may also exist independently without being assembled into the electronic device 400.
  • the above-mentioned computer-readable medium stores one or more computer programs.
  • the above-mentioned one or more programs are executed by the processing device, the following methods are implemented:
  • Preloading of data within the application is performed based on the target preloading parameters.
  • the storage medium may be a non-transitory storage medium.
  • the computer-readable medium carries one or more programs.
  • the electronic device 400 can be written in one or more programming languages or a combination thereof.
  • Computer program code for performing operations of the present disclosure the above-mentioned programming language package This includes object-oriented programming languages, such as Java, Smalltalk, and C++, as well as conventional procedural programming languages, such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer, such as through the Internet using an Internet service provider. ).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more executable instructions for implementing the specified logical function.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.
  • the modules involved in the embodiments of the present disclosure can be implemented in software or hardware. Among them, the name of the module does not constitute a limitation on the module itself under certain circumstances.
  • exemplary types of hardware logic components include: field programmable gate array (Field Programmable Gate Array, FPGA), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), application specific standard product (Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programming Logic Device (CPLD), etc.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing.
  • machine-readable storage media examples include one or more wires based electrical connection, portable computer disk, hard drive, random access memory Access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, fiber optics, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage equipment, or any suitable combination of the above.
  • RAM random access memory Access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory fiber optics
  • CD-ROM compact disk read-only memory
  • optical storage devices magnetic storage equipment, or any suitable combination of the above.
  • Example 1 provides a preloading method, including:
  • Preloading of data within the application is performed based on the target preloading parameters.
  • Example 2 is a method according to Example 1,
  • the historical lag information includes first lag information and second lag information.
  • the first lag information includes the number of lags within the life cycle of the application.
  • the second lag information includes a set time. The number of freezes in the segment and the corresponding freeze duration.
  • the set time period is the set time period before the current time.
  • Example 3 is according to the method described in Example 2,
  • Determining the lag coefficient based on the historical lag information of the application includes:
  • the weighted value of the first coefficient and the second coefficient is determined as a stall coefficient.
  • Example 4 is according to the method of Example 3,
  • Determining the second coefficient based on the weighted value of the second stuck information includes:
  • the corresponding jam durations are weighted and summed, where the weight coefficient of each jam duration is determined based on the timestamp of the jam duration;
  • the result of the weighted summation is determined as the second coefficient.
  • Example 5 is according to the method of Example 1,
  • the set threshold includes a first threshold and a second threshold, the first threshold is greater than the second threshold, the target preloading parameters include preloading timing, preloading size and preloading number, correspondingly, based on The comparison result between the stuck coefficient and the set threshold determines the target preloading parameters, including:
  • the predetermined first preload parameter as the target preload parameter
  • the preloading timing included in the first preloading parameter is later than the preloading timing included in the second preloading parameter, and the preloading size included in the first preloading parameter is larger than that of the second preloading parameter.
  • the preload size included in the parameter, the number of preloads included in the first preload parameter is greater than the number of preloads included in the second preload parameter.
  • Example 6 is a method according to Example 1,
  • Determining the target preloading parameters based on the comparison result between the freezing coefficient and the set threshold includes:
  • the second preload parameter corresponding to the second threshold is adjusted based on the difference, and a target preload parameter is determined.
  • the preload timing included in the target preload parameter is earlier than the preload included in the second preload parameter. timing, the number of preloads included in the target preloading timing is greater than the number of preloads included in the second preloading parameter, and the preloading size included in the target preloading timing is larger than the number of preloading included in the second preloading parameter. Includes preload size.
  • Example 7 is a method according to Example 1,
  • Determining the target preloading parameters based on the comparison result between the freezing coefficient and the set threshold includes:
  • the first preload parameter corresponding to the first threshold is adjusted based on the difference, and a target preload parameter is determined.
  • the preload timing included in the target preload parameter is later than the preload included in the first preload parameter. timing, the number of preloads included in the target preloading timing is less than the number of preloads included in the first preloading parameter, and the preloading size included in the target preloading timing is smaller than the number of preloading included in the first preloading parameter. Includes preload size.
  • Example 8 provides a preloading device, including:
  • the first determination module is set to determine the lag coefficient based on the historical lag information of the application
  • the second determination module is configured to determine the target preloading parameter based on the comparison result between the stuck coefficient and the set threshold;
  • a preloading module configured to preload data within the application based on the target preloading parameters.
  • Example 9 provides an electronic device, including:
  • a storage device configured to store one or more programs
  • the one or more processing devices When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the method as described in any one of Examples 1-7.
  • Example 10 provides a computer-readable medium having a computer program stored thereon, which when executed by a processing device implements the method described in any one of Examples 1-7.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开实施例提供了一种预加载方法、装置、电子设备及介质,所述方法包括:基于应用程序的历史卡顿信息,确定卡顿系数;基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数;基于所述目标预加载参数进行所述应用程序内数据的预加载。

Description

预加载方法、装置、电子设备及介质
本申请要求在2022年04月15日提交中国专利局、申请号为202210399971.2的中国专利申请的优先权,以上申请的全部内容通过引用结合在本申请中。
技术领域
本公开实施例涉及计算机技术领域,例如涉及一种预加载方法、装置、电子设备及介质。
背景技术
为了优化用户观看视频的体验,视频播放的应用程序主要采取预加载的方式。
发明内容
本公开实施例提供了一种预加载方法、装置、电子设备及介质。
第一方面,本公开实施例提供了一种预加载方法,包括:
基于应用程序的历史卡顿信息,确定卡顿系数;
基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数;
基于所述目标预加载参数进行所述应用程序内数据的预加载。
第二方面,本公开实施例还提供了一种预加载装置,包括:
第一确定模块,设置为基于应用程序的历史卡顿信息,确定卡顿系数;
第二确定模块,设置为基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数;
预加载模块,设置为基于所述目标预加载参数进行所述应用程序内数据的预加载。
第三方面,本公开实施例还提供了一种电子设备,包括:
一个或多个处理装置;
存储装置,设置为存储一个或多个程序;
所述一个或多个程序被所述一个或多个处理装置执行,使得所述一个或多个处理装置实现本公开实施例提供的预加载方法。
第四方面,本公开实施例还提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现本公开实施例提供的预加载方法。
附图说明
贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1为本公开实施例一提供的一种预加载方法的流程示意图;
图2为本公开实施例二提供的一种预加载方法的流程示意图;
图3为本公开实施例二提供的一种预加载方法的流程示意图;
图4为本公开实施例三提供的一种预加载装置的结构示意图;
图5为本公开实施例四提供的一种电子设备的结构示意图。
具体实施方式
一类预加载方式是根据当前播放视频的状态,如播放器缓冲度长度、是否下载完成等,来进行预加载。
然而,上述预加载方式在优化用户体验的同时,也会带来数据的浪费,存在许多视频提前缓存好之后并没有被用户观看,或者观看的数据量远小于提前预加载的数据量的情况。
考虑到上述情况,本公开实施例提供了一种预加载方法、装置、电子设备及介质。
下面将参照附图描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
下述各实施例中,每个实施例中同时提供了可选特征和示例,实施例中记载的各个特征可进行组合,形成多个实施例,不应将每个编号的实施例仅视为一个实施例。此外,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。
实施例一
图1为本公开实施例一提供的一种预加载方法的流程示意图,该方法可对视频进行预加载,该方法可以由预加载装置来执行,其中该装置可由软件和/或硬件实现,并一般集成在电子设备上,在本实施例中电子设备包括但不限于:计算机、笔记本电脑、平板电脑和/或手机等设备。
可以理解的是,在客户端中用户播放一个新视频时,从点击播放按钮开始,一直到视频真正开始播放为止,会存在首帧耗时,即客户端需要向服务器请求视频数据,并经过传输控制协议(Transmission Control Protocol,TCP)建联、传输、解封装、解码等过程,视频数据才会渲染到客户端的屏幕上开始播放。
为了优化用户的观看体验,一类视频播放的方式中主要采取预加载的方式,即在播放当前视频时提前请求下载后续视频的数据,并缓存到本地。一方面可以减少后续视频播放的首帧耗时,降低未起播比例,从而提升用户观看视频的流畅度;另一方面可以实现无网状态播放视频,增加了用户的观播时长。
然而,预加载的目的是为了减少首帧耗时和未起播比例,一类预加载方式中加载数据的大小已远超过视频起播所需要的真正数据量,存在大量的数据冗余。此外,往往预加载方式没有考虑历史的播放质量信息,比如用户在观看视频经常发生卡顿,此时不能减少预加载大小,而是尽可能在网络状况好的情况下预加载新的视频数据;若用户历史观看视频时从未发生卡顿,此时可以减少预加载大小,从而减少数据的浪费。
基于此,本公开实施例一提供的一种预加载方法,包括如下步骤:
S110、基于应用程序的历史卡顿信息,确定卡顿系数。
其中,历史卡顿信息可以理解为应用程序在历史播放视频时的卡顿情况,例如可以包括卡顿次数和/或卡顿时长等。在本实施例中,历史卡顿信息所表征 卡顿情况的时间段不限,可以为特定时间段,也可以为应用程序生命周期内。卡顿系数可以用于表征当前应用程序的卡顿情况。
例如,可以基于应用程序的历史卡顿信息来确定卡顿系数,本实施例不对确定卡顿系数的具体步骤进行限定,例如可以根据设定时间段内的卡顿次数来确定卡顿系数,也可以根据长时间段内的卡顿次数、最近一段时间(如设定时间段内)内的卡顿次数及最近一段时间内每一卡顿系数对应的卡顿时长来综合确定卡顿系数等。
S120、基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数。
设定阈值可以是指系统或相关人员预先进行设定的临界值,用于确定目标预加载参数,设定阈值可以为一固定值,也可以包括第一阈值和第二阈值,本实施例对此不作限定。
目标预加载参数可以认为是对应用程序内数据进行预加载的参数,可以包括预加载时机、预加载大小和/或预加载个数等,预加载时机可以是指提前下载后续视频的时机,时机可以理解为时间,也可以理解为条件,即当到达某个时间点或满足某个条件时,就可以提前下载后续视频以实现预加载,此处不对时间点和条件的具体内容进行限定,如从视频起播设定时长后,即可以提前下载后续视频;也可以是当前播放视频的播放进度达到三分之二处,又或者是已加载的视频的数量小于设定数值时,则可进行预加载,设定时长和设定数值可以由相关人员进行设定,此处不作进一步限定。预加载大小可以认为是预加载视频的大小,即需要提前下载的视频的大小,例如可以为需要提前下载的每个视频的大小之和,又或者是每个视频的大小,每个视频的大小可以为每个提前下载的视频总大小的三分之一;预加载个数则可以理解为需要提前下载的视频的数量。
在得到卡顿系数后,可以将卡顿系数和设定阈值进行比较,得到比较结果,进而可以根据比较结果,来确定目标预加载参数。示例性的,当卡顿系数大于设定阈值时,可以延迟预加载的时机,增加预加载个数和大小。示例性的,还可以在设定阈值包括第一阈值和第二阈值时,当卡顿系数大于或等于第一阈值的情况下,令目标预加载参数为延迟预加载的时机,增加预加载个数和大小;当卡顿系数小于第一阈值且大于第二阈值的情况下,令目标预加载参数为上一次确定的目标预加载参数;当卡顿系数小于或等于第二阈值的情况下,令目标预加载参数为提前预加载的时机,减小预加载个数和大小。本实施例对此不进行限定。
S130、基于所述目标预加载参数进行所述应用程序内数据的预加载。
在确定目标预加载参数后,可以基于确定的目标预加载参数对应用程序内数据进行预加载。
本公开实施例一提供的一种预加载方法,所述方法包括:基于应用程序的历史卡顿信息,确定卡顿系数;基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数;基于所述目标预加载参数进行所述应用程序内数据的预加载。利用上述方法,能够基于应用程序的历史卡顿信息来确定卡顿系数,进而根据卡顿系数和设定阈值的比较结果确定了目标预加载参数,从而实现了目标预加载参数的动态调整,实现了在优化观看视频体验的同时,降低预加载数据的浪费率。
在上述实施例的基础上,提出了上述实施例的变型实施例,在此需要说明的是,为了使描述简要,在变型实施例中仅描述与上述实施例的不同之处。
在一个实施例中,所述历史卡顿信息包括第一卡顿信息和第二卡顿信息,所述第一卡顿信息包括所述应用程序生命周期内的卡顿次数,所述第二卡顿信息包括设定时间段内的卡顿次数及所对应的卡顿时长,所述设定时间段为当前时刻前设定时长的时间段。
在本实施例中,第一卡顿信息可以是指应用程序在生命周期内的卡顿情况,例如第一卡顿信息可以包括应用程序生命周期内的卡顿次数,其中,生命周期可以理解为应用程序进程创建到结束的全过程。本实施例可以获取应用程序进程创建到当前时刻的时间段内的第一卡顿信息。
第二卡顿信息可以是指应用程序在设定时间段内的卡顿情况,例如第二卡顿信息可以包括设定时间段内的卡顿次数及所对应的卡顿时长等,其中,设定时间段可以认为是当前时刻前设定时长的时间段,设定时长可以由系统或相关人员进行设定,本实施例对此不作限定。
在一个实施例中,所述基于应用程序的历史卡顿信息,确定卡顿系数,包括:
基于所述第一卡顿信息的统计值,确定第一系数;
基于所述第二卡顿信息的加权值,确定第二系数;
将所述第一系数和所述第二系数的加权值,确定为卡顿系数。
在本实施例中,第一系数可以认为是根据第一卡顿信息确定的卡顿系数,第二系数可以认为是根据第二卡顿信息的加权值确定的卡顿系数,本步骤不对确定第一系数和第二系数的方法进行展开,例如,可以将第一卡顿信息内统计 的卡顿次数求和来确定第一系数,将第二卡顿信息内统计的卡顿次数和卡顿时长进行加权计算后确定第二系数。
例如,在基于第一卡顿信息的统计值确定第一系数,以及基于第二卡顿信息的加权值确定第二系数后,可以根据第一系数和第二系数的加权值,来确定卡顿系数,其中第一系数和第二系数的加权运算时的权重系数可以由经验值进行确定,此处不作限定。
如不同用户对应的权重系数可以不同,如加权值可以为a倍的第一系数和b倍的第二系数的和。其中,a和b的取值取决于用户对卡顿的敏感度。此处不对敏感度的确定手段进行限定。如,若用户对卡顿较敏感,则b的取值可以大于a的取值。
在一个实施例中,所述基于所述第二卡顿信息的加权值,确定第二系数,包括:
基于卡顿次数,将对应的卡顿时长进行加权求和,其中,每个卡顿时长的权重系数基于所述卡顿时长的时间戳确定;
将加权求和的结果确定为第二系数。
可以理解的是,在基于第二卡顿信息的加权值确定第二系数时,首先可以基于第二卡顿信息中的卡顿次数,将各卡顿次数对应的卡顿时长进行加权求和,其中,每个卡顿时长的权重系数可以基于卡顿时长的时间戳来确定,例如,在当第二卡顿信息所对应的设定时间段为5分钟,且五分钟内分别在当前时刻的前两分钟和前四分钟发生卡顿,各卡顿30s,此时前两分钟发生卡顿的卡顿时长所对应的权重系数可以为0.7,前四分钟发生卡顿的卡顿时长所对应的权重系数可以为0.3。然后可以将加权求和的结果确定为第二系数。
实施例二
图2为本公开实施例二提供的一种预加载方法的流程示意图,本实施例二在上述各实施例中各个实施例为基础进行调整。在本实施例中,设定阈值包括第一阈值和第二阈值,所述第一阈值大于第二阈值,所述目标预加载参数包括预加载时机、预加载大小和预加载个数。
在一示例中,本实施例还将基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数,一类示例为:在所述卡顿系数大于或等于所述第一阈值的情况下,将预先确定的第一预加载参数确定为目标预加载参数;在所述卡顿系数小于所述第一阈值且大于所述第二阈值的情况下,将上一次确定的目标预加载参数确定为本次的目标预加载参数;在所述卡顿系数小于或等于所述第二阈 值的情况下,将第二预加载参数确定为目标预加载参数;其中,所述第一预加载参数所包括的预加载时机晚于所述第二预加载参数所包括的预加载时机,所述第一预加载参数所包括预加载大小大于所述第二预加载参数所包括预加载大小,所述第一预加载参数所包括预加载个数多于所述第二预加载参数所包括预加载个数。
本实施例尚未详尽的内容请参考实施例一。
如图2所示,本公开实施例二提供的一种预加载方法,包括如下步骤:
S210、基于应用程序的历史卡顿信息,确定卡顿系数。
在确定卡顿系数后,可以将卡顿系数与设定阈值进行比较,当设定阈值包括第一阈值和第二阈值,第一阈值大于第二阈值,目标预加载参数包括预加载时机、预加载大小和预加载个数时,可以根据比较结果来确定目标预加载参数中的预加载时机、预加载大小和预加载个数。
其中,第一阈值可以理解为预先设定的危险阈值,当卡顿系数大于或等于第一阈值时,可以将第一预加载参数确定为目标预加载参数,以根据第一预加载参数对应用程序内数据进行预加载;第二阈值可以理解为预先设定的安全阈值,当卡顿系数小于或等于第二阈值的情况时,可以将第二预加载参数确定为目标预加载参数,以根据第二预加载参数对应用程序内数据进行预加载;此外,当卡顿系数小于第一阈值且大于第二阈值时,可以将上一次确定的目标预加载参数确定为本次的目标预加载参数,以根据上一次确定的目标预加载参数对应用程序内数据进行预加载。例如第一阈值可以是5,第二阈值可以为10。
需要说明的是,第一预加载参数所包括的预加载时机晚于第二预加载参数所包括的预加载时机,第一预加载参数所包括预加载大小大于第二预加载参数所包括预加载大小,第一预加载参数所包括预加载个数多于第二预加载参数所包括预加载个数。
S220、在所述卡顿系数大于或等于所述第一阈值的情况下,将预先确定的第一预加载参数确定为目标预加载参数,执行S250。
S230、在所述卡顿系数小于所述第一阈值且大于所述第二阈值的情况下,将上一次确定的目标预加载参数确定为本次的目标预加载参数,执行S250。
S240、在所述卡顿系数小于或等于所述第二阈值的情况下,将第二预加载参数确定为目标预加载参数,执行S250。
S250、基于所述目标预加载参数进行所述应用程序内数据的预加载。
本公开实施例二提供的一种预加载方法,通过设置第一阈值和第二阈值能 够根据卡顿系数与第一阈值和第二阈值的大小来确定对应的目标预加载参数,在播放质量不劣化的前提下,减少了预加载数据的浪费率。
图3为本公开实施例二提供的一种预加载方法的流程示意图,如图3所示,定时器定时触发统计视频播放过程中的历史卡顿情况(即历史卡顿信息),例如分别统计长时间内发生的卡顿次数(即第一卡顿信息)和短时间内发生的卡顿情况(卡顿次数、卡顿时长)(即第二卡顿信息),加权计算得到卡顿系数;当该卡顿系数高于危险阈值(即第一阈值),触发预加载调整逻辑,延迟后续视频预加载的时机并增加预加载个数和大小,使用预加载参数pa(即第一预加载参数);当卡顿系数低于危险阈值,但是高于安全阈值(即第二阈值)时,延续上一次决策的预加载时机、预加载个数和大小(即上一次确定的目标预加载参数);当卡顿系数低于安全阈值时,提前预加载触发时机,并减少预加载个数和大小,使用预加载参数pb(即第二预加载参数)。由此通过安全阈值和危险阈值的设置可以有效地在卡顿率与数据浪费之间取得平衡。
通过上述描述可以发现,为了在播放质量尽可能不劣化的前提下减少预加载数据的浪费,本公开实施例引入了视频播放过程的历史卡顿信息,并设置了安全阈值和危险阈值两个参数,来调整预加载参数(预加载时机、预加载个数以及预加载大小)。本实施例设置了两组固定的预加载参数(pa、pb),包含预加载时机、预加载个数以及预加载大小。
当计算得到的卡顿系数大于危险阈值时,说明当前播放质量较差,一方面需要延迟后续视频预加载时机,尽可能保证当前播放视频的播放质量;另一方面需要增加后续视频预加载大小,以延迟后续播放视频卡顿发生的时机。当卡顿系数小于安全阈值时,说明当前播放质量较好,可以适当减少后续视频预加载个数以及降低预加载大小,以减少预加载数据的浪费,例如安全阈值可以是5,危险阈值可以为10。还可以将后续视频预加载的时机提前。
可以理解的是,当卡顿频繁发生时(概率较低),即历史卡顿信息所包括卡顿次数大于第二次数阈值,本公开实施例还可以适当减少预加载数据的冗余,如减少预加载个数,降低预加载大小,延后预加载时机,以保证播放质量;当卡顿从来没有发生时(概率较高),即历史卡顿信息所包括卡顿次数小于第一次数阈值,本公开实施例还可以增加预加载数据的冗余,如增加预加载个数,提预加载大小,提前预加载时机,在节约成本的同时保证当前的播放质量。在此基础上,实现了对应用程序预加载的动态调整,使预加载方法更加精准。实施例的描述可以如下:
在一个实施例中,所述基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数,包括:
在基于所述历史卡顿信息所包括卡顿次数小于第一次数阈值的情况下,确定所述卡顿系数和所述设定阈值所包括第二阈值的差值;
基于所述差值调整所述第二阈值所对应的第二预加载参数,确定目标预加载参数,所述目标预加载参数所包括预加载时机早于所述第二预加载参数所包括预加载时机,所述目标预加载时机所包括预加载个数多于所述第二预加载参数所包括预加载个数,所述目标预加载时机所包括预加载大小大于所述第二预加载参数所包括预加载大小。
其中,第一次数阈值可以理解为卡顿次数的最小临界值,可以由相关人员进行预设。
例如,当基于历史卡顿信息所包括卡顿次数小于第一次数阈值时,可以认为历史时间段内没有发生卡顿的概率较高,此时可以计算卡顿系数和设定阈值所包括第二阈值的差值,以基于差值调整第二阈值所对应的第二预加载参数,从而将调整后的第二预加载参数确定为目标预加载参数。可以认为的是,目标预加载参数(即调整后的第二预加载参数)所包括预加载时机早于第二预加载参数所包括预加载时机,目标预加载时机所包括预加载个数多于第二预加载参数所包括预加载个数,目标预加载时机所包括预加载大小大于第二预加载参数所包括预加载大小。
本实施例,在卡顿不频繁发生时,动态调整目标预加载参数,将预加载时机提前,预加载个数增多和/或预加载大小增加,以降低提升视频播放质量。
在一个实施例中,所述基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数,包括:
在基于所述历史卡顿信息所包括卡顿次数大于第二次数阈值的情况下,确定所述卡顿系数和所述设定阈值所包括第一阈值的差值;
基于所述差值调整所述第一阈值所对应的第一预加载参数,确定目标预加载参数,所述目标预加载参数所包括预加载时机晚于所述第一预加载参数所包括预加载时机,所述目标预加载时机所包括预加载个数少于所述第一预加载参数所包括预加载个数,所述目标预加载时机所包括预加载大小小于所述第一预加载参数所包括预加载大小。
其中,第二次数阈值可以理解为卡顿次数的最大临界值,可以由相关人员进行预设。
例如,当基于历史卡顿信息所包括卡顿次数大于第二次数阈值时,可以认为历史时间段内卡顿频繁发生,此时可以计算卡顿系数和设定阈值所包括第一阈值的差值,以基于差值调整第一阈值所对应的第一预加载参数,从而将调整后的第一预加载参数确定为目标预加载参数。可以认为的是,目标预加载参数(即调整后的第一预加载参数)所包括预加载时机晚于第一预加载参数所包括预加载时机,目标预加载时机所包括预加载个数少于第一预加载参数所包括预加载个数,目标预加载时机所包括预加载大小小于第一预加载参数所包括预加载大小。
本实施例,在卡顿频繁发生时,动态调整目标预加载参数,将预加载时机延后,预加载个数减少和/或预加载大小减小,以降低卡顿发生的概率。
下面对动态调整预加载的方法进行示例性的描述:
首先确定卡顿系数:卡顿系数可以由两部分组成,第一部分为用户本次播放(从打开app开始观看视频开始计算,即应用程序生命周期)视频的卡顿次数,第二部分为特定时间窗口(比如5分钟,即设定时间段)内统计得到的最近一段时间内的卡顿情况(如卡顿次数及所对应的卡顿时长),最后将两个值(即第一系数和第二系数)加权计算得到最终的卡顿系数。
然后设置安全阈值(即第二阈值)和危险阈值(即第一阈值),播放器(即安装应用程序的电子设备)可以根据卡顿系数与两个阈值之间的差值,来调整目标预加载参数(预加载时机、预加载个数以及预加载大小)。即在基于历史卡顿信息所包括卡顿次数大于第二次数阈值的情况下,确定卡顿系数和第一阈值的差值,并基于此差值调整第一阈值所对应的第一预加载参数;在基于历史卡顿信息所包括卡顿次数小于第一次数阈值的情况下,确定卡顿系数和第二阈值的差值,并基于此差值调整第二阈值所对应的第二预加载参数,从而确定目标预加载参数。由此本公开实施例避免了预加载数据浪费率较高的情况,在播放质量尽可能不劣化的前提下减少了预加载数据的浪费。
本公开实施例可以基于数据分析,计算理论的最大和最小收益:一方面,所有视频的预加载大小由800KB降为600KB,使得预加载成本降低25%,总带宽成本约降低1%;另一方面,只要用户播放视频的过程中发生过卡顿,就恢复预加载大小800KB,按照目前的卡顿渗透率35%来算,即使预加载600KB导致渗透率上涨到38.5%,还有61.5%的视频预加载大小得到降低,预加载成本可以降低15%,总带宽成本约降低0.6%。
实施例三
图4为本公开实施例三提供的一种预加载装置的结构示意图,该装置可对视频进行预加载,其中该装置可由软件和/或硬件实现,并一般集成在电子设备上。
如图4所示,该装置包括:
第一确定模块310,设置为基于应用程序的历史卡顿信息,确定卡顿系数;
第二确定模块320,设置为基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数;
预加载模块330,设置为基于所述目标预加载参数进行所述应用程序内数据的预加载。
在本实施例中,该装置通过第一确定模块310基于应用程序的历史卡顿信息,确定卡顿系数;通过第二确定模块320基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数;通过预加载模块330基于所述目标预加载参数进行所述应用程序内数据的预加载。利用该装置,能够基于应用程序的历史卡顿信息来确定卡顿系数,进而根据卡顿系数和设定阈值的比较结果确定了目标预加载参数,从而实现了目标预加载参数的动态调整,实现了在优化观看视频体验的同时,降低预加载数据的浪费率。
在一实施例中,所述历史卡顿信息包括第一卡顿信息和第二卡顿信息,所述第一卡顿信息包括所述应用程序生命周期内的卡顿次数,所述第二卡顿信息包括设定时间段内的卡顿次数及所对应的卡顿时长,所述设定时间段为当前时刻前设定时长的时间段。
在一实施例中,所述第一确定模块310包括:
第一系数确定单元,设置为基于所述第一卡顿信息的统计值,确定第一系数;
第二系数确定单元,设置为基于所述第二卡顿信息的加权值,确定第二系数;
卡顿系数确定单元,设置为将所述第一系数和所述第二系数的加权值,确定为卡顿系数。
在一实施例中,所述第二系数确定单元设置为:
基于卡顿次数,将对应的卡顿时长进行加权求和,其中,每个卡顿时长的权重系数基于所述卡顿时长的时间戳确定;
将加权求和的结果确定为第二系数。
在一实施例中,所述设定阈值包括第一阈值和第二阈值,所述第一阈值大 于第二阈值,所述目标预加载参数包括预加载时机、预加载大小和预加载个数,相应的,所述第二确定模块320设置为:
在所述卡顿系数大于或等于所述第一阈值的情况下,将预先确定的第一预加载参数确定为目标预加载参数;
在所述卡顿系数小于所述第一阈值且大于所述第二阈值的情况下,将上一次确定的目标预加载参数确定为本次的目标预加载参数;
在所述卡顿系数小于或等于所述第二阈值的情况下,将第二预加载参数确定为目标预加载参数;
其中,所述第一预加载参数所包括的预加载时机晚于所述第二预加载参数所包括的预加载时机,所述第一预加载参数所包括预加载大小大于所述第二预加载参数所包括预加载大小,所述第一预加载参数所包括预加载个数多于所述第二预加载参数所包括预加载个数。
在一实施例中,所述第二确定模块320设置为:
在基于所述历史卡顿信息所包括卡顿次数小于第一次数阈值的情况下,确定所述卡顿系数和所述设定阈值所包括第二阈值的差值;
基于所述差值调整所述第二阈值所对应的第二预加载参数,确定目标预加载参数,所述目标预加载参数所包括预加载时机早于所述第二预加载参数所包括预加载时机,所述目标预加载时机所包括预加载个数多于所述第二预加载参数所包括预加载个数,所述目标预加载时机所包括预加载大小大于所述第二预加载参数所包括预加载大小。
在一实施例中,所述第二确定模块320设置为:
在基于所述历史卡顿信息所包括卡顿次数大于第二次数阈值的情况下,确定所述卡顿系数和所述设定阈值所包括第一阈值的差值;
基于所述差值调整所述第一阈值所对应的第一预加载参数,确定目标预加载参数,所述目标预加载参数所包括预加载时机晚于所述第一预加载参数所包括预加载时机,所述目标预加载时机所包括预加载个数少于所述第一预加载参数所包括预加载个数,所述目标预加载时机所包括预加载大小小于所述第一预加载参数所包括预加载大小。
上述预加载装置可执行本公开任意实施例所提供的预加载方法,具备执行方法相应的功能模块和有益效果。
实施例四
图5为本公开实施例四提供的一种电子设备的结构示意图。图5示出了适 于用来实现本公开实施例的电子设备400的结构示意图。本公开实施例中的电子设备400可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,PDA)、平板电脑(PAD)、便携式多媒体播放器(Portable Media Player,PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字电视(Television,TV)、台式计算机等等的固定终端。图5示出的电子设备400仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图5所示,电子设备400可以包括一个或多个处理装置(例如中央处理器、图形处理器等)401,其可以根据存储在只读存储器(Read-Only Memory,ROM)402中的程序或者从存储装置408加载到随机访问存储器(Random Access Memory,RAM)403中的程序而执行各种适当的动作和处理。一个或多个处理装置401实现如本公开提供的预加载方法。在RAM403中,还存储有电子设备400操作所需的各种程序和数据。处理装置401、ROM 402以及RAM403通过总线404彼此相连。输入/输出(Input/Output,I/O)接口405也连接至总线404。
通常,以下装置可以连接至I/O接口405:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置406;包括例如液晶显示器(Liquid Crystal Display,LCD)、扬声器、振动器等的输出装置407;包括例如磁带、硬盘等的存储装置408,存储装置408用于存储一个或多个程序;以及通信装置409。通信装置409可以允许电子设备400与其他设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备400,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置409从网络上被下载和安装,或者从存储装置408被安装,或者从ROM402被安装。在该计算机程序被处理装置401执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是,但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器 件,或者任意以上的组合。计算机可读存储介质的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)或闪存、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如超文本传输协议(Hyper Text Transfer Protocol,HTTP)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备400中所包含的;也可以是单独存在,而未装配入该电子设备400中。
上述计算机可读介质存储有一个或者多个计算机程序,当上述一个或者多个程序被处理装置执行时实现如下方法:
基于应用程序的历史卡顿信息,确定卡顿系数;
基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数;
基于所述目标预加载参数进行所述应用程序内数据的预加载。
存储介质可以是非暂态(non-transitory)存储介质。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备400:可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包 括面向对象的程序设计语言,诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言,诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN)连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(Field Programmable Gate Array,FPGA)、专用集成电路(Application Specific Integrated Circuit,ASIC)、专用标准产品(Application Specific Standard Parts,ASSP)、片上系统(System on Chip,SOC)、复杂可编程逻辑设备(Complex Programming logic device,CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存 取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM)或快闪存储器、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,示例1提供了一种预加载方法,包括:
基于应用程序的历史卡顿信息,确定卡顿系数;
基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数;
基于所述目标预加载参数进行所述应用程序内数据的预加载。
根据本公开的一个或多个实施例,示例2根据示例1所述的方法,
所述历史卡顿信息包括第一卡顿信息和第二卡顿信息,所述第一卡顿信息包括所述应用程序生命周期内的卡顿次数,所述第二卡顿信息包括设定时间段内的卡顿次数及所对应的卡顿时长,所述设定时间段为当前时刻前设定时长的时间段。
根据本公开的一个或多个实施例,示例3根据示例2所述的方法,
所述基于应用程序的历史卡顿信息,确定卡顿系数,包括:
基于所述第一卡顿信息的统计值,确定第一系数;
基于所述第二卡顿信息的加权值,确定第二系数;
将所述第一系数和所述第二系数的加权值,确定为卡顿系数。
根据本公开的一个或多个实施例,示例4根据示例3所述的方法,
所述基于所述第二卡顿信息的加权值,确定第二系数,包括:
基于卡顿次数,将对应的卡顿时长进行加权求和,其中,每个卡顿时长的权重系数基于所述卡顿时长的时间戳确定;
将加权求和的结果确定为第二系数。
根据本公开的一个或多个实施例,示例5根据示例1所述的方法,
所述设定阈值包括第一阈值和第二阈值,所述第一阈值大于第二阈值,所述目标预加载参数包括预加载时机、预加载大小和预加载个数,相应的,所述基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数,包括:
在所述卡顿系数大于或等于所述第一阈值的情况下,将预先确定的第一预加载参数确定为目标预加载参数;
在所述卡顿系数小于所述第一阈值且大于所述第二阈值的情况下,将上一次确定的目标预加载参数确定为本次的目标预加载参数;
在所述卡顿系数小于或等于所述第二阈值的情况下,将第二预加载参数确定为目标预加载参数;
其中,所述第一预加载参数所包括的预加载时机晚于所述第二预加载参数所包括的预加载时机,所述第一预加载参数所包括预加载大小大于所述第二预加载参数所包括预加载大小,所述第一预加载参数所包括预加载个数多于所述第二预加载参数所包括预加载个数。
根据本公开的一个或多个实施例,示例6根据示例1所述的方法,
所述基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数,包括:
在基于所述历史卡顿信息所包括卡顿次数小于第一次数阈值的情况下,确定所述卡顿系数和所述设定阈值所包括第二阈值的差值;
基于所述差值调整所述第二阈值所对应的第二预加载参数,确定目标预加载参数,所述目标预加载参数所包括预加载时机早于所述第二预加载参数所包括预加载时机,所述目标预加载时机所包括预加载个数多于所述第二预加载参数所包括预加载个数,所述目标预加载时机所包括预加载大小大于所述第二预加载参数所包括预加载大小。
根据本公开的一个或多个实施例,示例7根据示例1所述的方法,
所述基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数,包括:
在基于所述历史卡顿信息所包括卡顿次数大于第二次数阈值的情况下,确定所述卡顿系数和所述设定阈值所包括第一阈值的差值;
基于所述差值调整所述第一阈值所对应的第一预加载参数,确定目标预加载参数,所述目标预加载参数所包括预加载时机晚于所述第一预加载参数所包括预加载时机,所述目标预加载时机所包括预加载个数少于所述第一预加载参数所包括预加载个数,所述目标预加载时机所包括预加载大小小于所述第一预加载参数所包括预加载大小。
根据本公开的一个或多个实施例,示例8提供了一种预加载装置,包括:
第一确定模块,设置为基于应用程序的历史卡顿信息,确定卡顿系数;
第二确定模块,设置为基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数;
预加载模块,设置为基于所述目标预加载参数进行所述应用程序内数据的预加载。
根据本公开的一个或多个实施例,示例9提供了一种电子设备,包括:
一个或多个处理装置;
存储装置,设置为存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理装置执行,使得所述一个或多个处理装置实现如示例1-7中任一所述的方法。
根据本公开的一个或多个实施例,示例10提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现如示例1-7中任一所述的方法。
本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的实施例,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它实施例。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的实施例。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (10)

  1. 一种预加载方法,包括:
    基于应用程序的历史卡顿信息,确定卡顿系数;
    基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数;
    基于所述目标预加载参数进行所述应用程序内数据的预加载。
  2. 根据权利要求1所述的方法,其中,所述历史卡顿信息包括第一卡顿信息和第二卡顿信息,所述第一卡顿信息包括所述应用程序生命周期内的卡顿次数,所述第二卡顿信息包括设定时间段内的卡顿次数及所对应的卡顿时长,所述设定时间段为当前时刻前设定时长的时间段。
  3. 根据权利要求2所述的方法,其中,所述基于应用程序的历史卡顿信息,确定卡顿系数,包括:
    基于所述第一卡顿信息的统计值,确定第一系数;
    基于所述第二卡顿信息的加权值,确定第二系数;
    将所述第一系数和所述第二系数的加权值,确定为卡顿系数。
  4. 根据权利要求3所述的方法,其中,所述基于所述第二卡顿信息的加权值,确定第二系数,包括:
    基于卡顿次数,将对应的卡顿时长进行加权求和,其中,每个卡顿时长的权重系数基于所述卡顿时长的时间戳确定;
    将加权求和的结果确定为第二系数。
  5. 根据权利要求1所述的方法,其中,所述设定阈值包括第一阈值和第二阈值,所述第一阈值大于第二阈值,所述目标预加载参数包括预加载时机、预加载大小和预加载个数;所述基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数,包括:
    响应于所述卡顿系数大于或等于所述第一阈值,将预先确定的第一预加载参数确定为目标预加载参数;
    响应于所述卡顿系数小于所述第一阈值且大于所述第二阈值,将上一次确定的目标预加载参数确定为本次的目标预加载参数;
    响应于所述卡顿系数小于或等于所述第二阈值,将第二预加载参数确定为目标预加载参数;
    其中,所述第一预加载参数所包括的预加载时机晚于所述第二预加载参数所包括的预加载时机,所述第一预加载参数所包括预加载大小大于所述第二预加载参数所包括预加载大小,所述第一预加载参数所包括预加载个数多于所述第二预加载参数所包括预加载个数。
  6. 根据权利要求1所述的方法,其中,所述基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数,包括:
    响应于基于所述历史卡顿信息所包括卡顿次数小于第一次数阈值,确定所述卡顿系数和所述设定阈值所包括第二阈值的差值;
    基于所述差值调整所述第二阈值所对应的第二预加载参数,确定目标预加载参数,所述目标预加载参数所包括预加载时机早于所述第二预加载参数所包括预加载时机,所述目标预加载时机所包括预加载个数多于所述第二预加载参数所包括预加载个数,所述目标预加载时机所包括预加载大小大于所述第二预加载参数所包括预加载大小。
  7. 根据权利要求1所述的方法,其中,所述基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数,包括:
    响应于基于所述历史卡顿信息所包括卡顿次数大于第二次数阈值,确定所述卡顿系数和所述设定阈值所包括第一阈值的差值;
    基于所述差值调整所述第一阈值所对应的第一预加载参数,确定目标预加载参数,所述目标预加载参数所包括预加载时机晚于所述第一预加载参数所包括预加载时机,所述目标预加载时机所包括预加载个数少于所述第一预加载参数所包括预加载个数,所述目标预加载时机所包括预加载大小小于所述第一预加载参数所包括预加载大小。
  8. 一种预加载装置,包括:
    第一确定模块,设置为基于应用程序的历史卡顿信息,确定卡顿系数;
    第二确定模块,设置为基于所述卡顿系数和设定阈值的比较结果,确定目标预加载参数;
    预加载模块,设置为基于所述目标预加载参数进行所述应用程序内数据的预加载。
  9. 一种电子设备,包括:
    一个或多个处理装置;
    存储装置,设置为存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理装置执行,使得所述一个或多个处理装置实现如权利要求1-7中任一所述的方法。
  10. 一种计算机可读介质,所述计算机可读介质上存储有计算机程序,所述计算机程序被处理装置执行时实现如权利要求1-7中任一所述的方法。
PCT/CN2023/081498 2022-04-15 2023-03-15 预加载方法、装置、电子设备及介质 Ceased WO2023197810A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/856,843 US20250254383A1 (en) 2022-04-15 2023-03-15 Preloading method, electronic device and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210399971.2A CN114786055B (zh) 2022-04-15 2022-04-15 一种预加载方法、装置、电子设备及介质
CN202210399971.2 2022-04-15

Publications (1)

Publication Number Publication Date
WO2023197810A1 true WO2023197810A1 (zh) 2023-10-19

Family

ID=82429701

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/081498 Ceased WO2023197810A1 (zh) 2022-04-15 2023-03-15 预加载方法、装置、电子设备及介质

Country Status (3)

Country Link
US (1) US20250254383A1 (zh)
CN (1) CN114786055B (zh)
WO (1) WO2023197810A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117575654A (zh) * 2023-11-27 2024-02-20 数翊科技(北京)有限公司 数据加工作业的调度方法及装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114786055B (zh) * 2022-04-15 2024-11-19 北京字节跳动网络技术有限公司 一种预加载方法、装置、电子设备及介质
CN115665488B (zh) * 2022-10-26 2025-03-18 抖音视界有限公司 视频播放信息处理方法、播放方法、装置、设备及介质
CN116156264B (zh) * 2022-10-28 2025-04-29 湖南快乐阳光互动娱乐传媒有限公司 一种视频播放数据源确定方法及装置
CN116339860A (zh) * 2023-03-31 2023-06-27 网易(杭州)网络有限公司 资源加载方法、装置、电子设备及计算机可读存储介质
CN119653120A (zh) * 2023-09-15 2025-03-18 北京字跳网络技术有限公司 直播处理方法、装置及终端设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150108662A (ko) * 2014-03-18 2015-09-30 연세대학교 산학협력단 데이터 프리로드 관리 방법 및 그 단말
US20180081984A1 (en) * 2013-10-25 2018-03-22 Uc Mobile Co., Ltd. Methods and devices for preloading webpages
CN109710448A (zh) * 2019-01-10 2019-05-03 湖南快乐阳光互动娱乐传媒有限公司 一种改善移动终端卡顿的方法及装置
CN110647366A (zh) * 2019-09-19 2020-01-03 Oppo广东移动通信有限公司 处理卡顿的方法、装置、终端及存储介质
CN113766261A (zh) * 2021-09-06 2021-12-07 百果园技术(新加坡)有限公司 一种确定预拉取时长方法、装置、电子设备及存储介质
CN114786055A (zh) * 2022-04-15 2022-07-22 北京字节跳动网络技术有限公司 一种预加载方法、装置、电子设备及介质

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104683857B (zh) * 2015-01-23 2018-05-29 华为技术有限公司 用于数据预加载的可视化呈现的方法和设备
WO2017201711A1 (zh) * 2016-05-26 2017-11-30 华为技术有限公司 视频优化方法和装置
CN110611829B (zh) * 2019-09-11 2022-01-21 北京达佳互联信息技术有限公司 视频预加载的方法、装置、电子设备及存储介质
WO2021077261A1 (zh) * 2019-10-21 2021-04-29 深圳市欢太科技有限公司 应用程序管理方法及装置、电子设备以及存储介质
CN112135169B (zh) * 2020-09-18 2022-11-11 脸萌有限公司 一种媒体内容加载方法、装置、设备和介质
CN112887795B (zh) * 2021-01-26 2023-04-21 脸萌有限公司 视频播放方法、装置、设备和介质
CN113765993B (zh) * 2021-05-12 2024-05-07 腾讯科技(北京)有限公司 一种下载速度预测方法、装置及存储介质
CN113254834B (zh) * 2021-06-08 2021-10-15 北京达佳互联信息技术有限公司 页面内容加载方法、装置、电子设备及可读存储介质
CN113779461B (zh) * 2021-09-02 2024-09-27 北京有竹居网络技术有限公司 数据加载方法、装置和电子设备
CN114040230B (zh) * 2021-11-08 2024-03-29 北京达佳互联信息技术有限公司 视频码率确定方法、装置、电子设备及其存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180081984A1 (en) * 2013-10-25 2018-03-22 Uc Mobile Co., Ltd. Methods and devices for preloading webpages
KR20150108662A (ko) * 2014-03-18 2015-09-30 연세대학교 산학협력단 데이터 프리로드 관리 방법 및 그 단말
CN109710448A (zh) * 2019-01-10 2019-05-03 湖南快乐阳光互动娱乐传媒有限公司 一种改善移动终端卡顿的方法及装置
CN110647366A (zh) * 2019-09-19 2020-01-03 Oppo广东移动通信有限公司 处理卡顿的方法、装置、终端及存储介质
CN113766261A (zh) * 2021-09-06 2021-12-07 百果园技术(新加坡)有限公司 一种确定预拉取时长方法、装置、电子设备及存储介质
CN114786055A (zh) * 2022-04-15 2022-07-22 北京字节跳动网络技术有限公司 一种预加载方法、装置、电子设备及介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117575654A (zh) * 2023-11-27 2024-02-20 数翊科技(北京)有限公司 数据加工作业的调度方法及装置
CN117575654B (zh) * 2023-11-27 2024-05-14 数翊科技(北京)有限公司 数据加工作业的调度方法及装置

Also Published As

Publication number Publication date
CN114786055B (zh) 2024-11-19
US20250254383A1 (en) 2025-08-07
CN114786055A (zh) 2022-07-22

Similar Documents

Publication Publication Date Title
WO2023197810A1 (zh) 预加载方法、装置、电子设备及介质
CN113014969B (zh) 视频播放的控制方法、终端设备、服务器和存储介质
US9043797B2 (en) Using pause on an electronic device to manage resources
US20250159285A1 (en) Video stutter prediction method and apparatus, device and medium
CN116745012A (zh) 涉及在云游戏中调整用户输入的方法、装置和系统
CN112135169B (zh) 一种媒体内容加载方法、装置、设备和介质
CN115348460B (zh) 视频的预加载方法、装置、设备及存储介质
CN112887795B (zh) 视频播放方法、装置、设备和介质
WO2023169262A1 (zh) 一种视频动态下载方法、装置、电子设备及存储介质
CN112543487B (zh) 电子设备的控制方法、装置、终端和存储介质
CN114979799A (zh) 一种全景视频处理方法、装置、设备和存储介质
CN111225209A (zh) 视频数据推流方法、装置、终端及存储介质
CN112235587B (zh) 直播的开播方法及设备
CN120342966A (zh) 基于长短期记忆网络的显式拥塞通知动态优化方法、装置、设备及存储介质
WO2025194876A1 (zh) 拥塞窗口的自适应调整方法、装置、设备及介质
CN107333147B (zh) 一种视频缓冲控制方法、终端及存储装置
WO2023035884A1 (zh) 动态画质视频播放方法、装置、电子设备及存储介质
CN115103210B (zh) 信息处理方法、装置、终端和存储介质
CN114257870B (zh) 短视频播放方法、装置、设备及存储介质
CN116304427A (zh) 一种预加载方法、装置、存储介质及电子设备
WO2023226757A1 (zh) 视频缓存方法、装置、设备及存储介质
CN113810773A (zh) 视频下载方法及装置、电子设备和存储介质
CN114915849B (zh) 视频的预加载方法、装置、设备和介质
CN111478916A (zh) 基于视频流的数据传输方法、设备和存储介质
CN114979712B (zh) 视频起播方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23787458

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18856843

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 30-01-2025)

WWP Wipo information: published in national office

Ref document number: 18856843

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 23787458

Country of ref document: EP

Kind code of ref document: A1