CN111212326A - Video playing method, electronic equipment and storage medium - Google Patents

Video playing method, electronic equipment and storage medium Download PDF

Info

Publication number
CN111212326A
CN111212326A CN202010038375.2A CN202010038375A CN111212326A CN 111212326 A CN111212326 A CN 111212326A CN 202010038375 A CN202010038375 A CN 202010038375A CN 111212326 A CN111212326 A CN 111212326A
Authority
CN
China
Prior art keywords
playing
video
electric quantity
speed
current
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.)
Pending
Application number
CN202010038375.2A
Other languages
Chinese (zh)
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.)
China Mobile Communications Group Co Ltd
MIGU Video Technology Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
MIGU Video Technology Co Ltd
MIGU Culture 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 China Mobile Communications Group Co Ltd, MIGU Video Technology Co Ltd, MIGU Culture Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202010038375.2A priority Critical patent/CN111212326A/en
Publication of CN111212326A publication Critical patent/CN111212326A/en
Pending legal-status Critical Current

Links

Images

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/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
    • H04N21/47202End-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 for requesting content on demand, e.g. video on demand
    • 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
    • H04N21/4436Power management, e.g. shutting down unused components of the receiver
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/63Generation or supply of power specially adapted for television receivers

Abstract

The embodiment of the invention provides a video playing method, electronic equipment and a storage medium, wherein the method comprises the following steps: determining power consumption parameters and video playing parameters corresponding to video playing, wherein the power consumption parameters at least comprise current electric quantity, first preset residual electric quantity and electric quantity consumption speed, and the video playing parameters at least comprise current playing speed and residual playing duration of the video; determining the playing speed of the video to be adjusted based on the power utilization parameter and the video playing parameter; and playing the video based on the to-be-adjusted playing speed. According to the video playing method, the electronic device and the storage medium provided by the embodiment of the invention, in the process that the user plays the video by using the terminal, the playing speed to be adjusted of the video is determined based on the power consumption parameter and the video playing parameter, and the video is played according to the playing speed to be adjusted, so that the residual electric quantity of the terminal is enough for the user to watch the currently played video.

Description

Video playing method, electronic equipment and storage medium
Technical Field
The present invention relates to the field of video processing technologies, and in particular, to a video playing method, an electronic device, and a storage medium.
Background
The user plays the video often through using the terminal, for example, plays online video and local video to accelerate the electric quantity consumption at terminal, when the electric quantity is low excessively, prior art can adopt to change current screen brightness, close modes such as bluetooth, GPS, in order to reach the purpose of saving the electric quantity, and realize increasing terminal continuation of the journey.
However, even with the above prior art method, it still cannot be guaranteed that the remaining power of the terminal is enough for the user to watch the currently played video.
Disclosure of Invention
To solve the problems in the prior art, embodiments of the present invention provide a video playing method, an electronic device, and a storage medium.
The embodiment of the invention provides a video playing method, which comprises the following steps:
determining power consumption parameters and video playing parameters corresponding to video playing, wherein the power consumption parameters at least comprise current electric quantity, first preset residual electric quantity and electric quantity consumption speed, and the video playing parameters at least comprise current playing speed and residual playing duration of the video;
determining the playing speed of the video to be adjusted based on the power utilization parameter and the video playing parameter;
and playing the video based on the to-be-adjusted playing speed.
Wherein, the determining the playing speed of the video to be adjusted based on the power consumption parameter and the video playing parameter comprises:
determining the adjustment multiplying power of the playing speed of the video based on the remaining playing time, the current electric quantity, the first preset remaining electric quantity and the electric quantity consumption speed;
determining the playing speed of the video to be adjusted based on the adjusting multiplying power;
if the adjusting multiplying power is larger than 1, determining the playing speed to be adjusted based on the adjusting multiplying power and the current playing speed;
and if the adjusting multiplying power is less than or equal to 1, taking the current playing speed as the playing speed to be adjusted.
Wherein the determining an adjustment magnification of the playing speed of the video based on the remaining playing time, the current electric quantity, the first preset remaining electric quantity and the electric quantity consumption speed comprises:
determining the adjustment multiplying power of the video playing speed according to the following formula:
the adjustment multiplying factor is the remaining playing time length/{ (current electric quantity-first preset remaining electric quantity)/electric quantity consumption speed }.
The video playing method further comprises the step of determining the electricity consumption speed, and specifically comprises the following steps:
determining the electric quantity consumption speed according to the electric quantity at the starting moment of playing the video, the current electric quantity, the current moment corresponding to the current electric quantity and the starting moment; or
And determining the electric quantity consumption speed according to the electric quantity at the moment corresponding to the previous preset period, the current electric quantity, the current moment corresponding to the current electric quantity and the moment corresponding to the previous preset period.
Wherein, include:
determining the power consumption rate according to the following formula:
the power consumption rate is (power at the start time of playing the video-the current power)/(current time corresponding to the current power-the start time);
alternatively, the power consumption rate is determined according to the following formula:
the power consumption rate is (power at a time corresponding to a previous preset period-the current power)/(current time corresponding to the current power-the time corresponding to the previous preset period).
The video playing method further comprises the following steps:
if the following preset conditions are met, determining the playing speed of the video to be adjusted based on the power utilization parameters and the video playing parameters:
the preset conditions include: determining that a supported playing time length is less than the remaining playing time length based on the current electric quantity, the electric quantity consumption speed and a second preset remaining electric quantity; and the second preset residual capacity is greater than the first preset residual capacity.
The video playing method further comprises the following steps:
if the video is played at the current playing speed, the following preset conditions are met, and when the current electric quantity reaches the second preset residual electric quantity, the step of determining the playing speed to be adjusted of the video based on the power consumption parameter and the video playing parameter is executed:
the preset conditions include: determining that a supported playing time length is less than the remaining playing time length based on the current electric quantity, the electric quantity consumption speed and a second preset remaining electric quantity; and the second preset residual capacity is greater than the first preset residual capacity.
The video playing method further comprises the following steps:
if the terminal type of the terminal for video playing is determined to be a communication terminal, determining the first preset residual capacity to be the lowest residual capacity for executing the communication function;
and if the terminal type of the terminal for video playing is determined to be a non-communication terminal, determining that the first preset residual electric quantity is zero.
The video playing method further comprises the following steps:
and periodically executing the steps of determining the playing speed to be adjusted of the video based on the power utilization parameter and the video playing parameter, and playing the video based on the playing speed to be adjusted.
An embodiment of the present invention provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein,
the processor, when executing the computer program, implements the method steps of:
determining power consumption parameters and video playing parameters corresponding to video playing, wherein the power consumption parameters at least comprise current electric quantity, first preset residual electric quantity and electric quantity consumption speed, and the video playing parameters at least comprise current playing speed and residual playing duration of the video;
determining the playing speed of the video to be adjusted based on the power utilization parameter and the video playing parameter;
and playing the video based on the to-be-adjusted playing speed.
An embodiment of the invention provides a non-transitory computer readable storage medium having a computer program stored thereon, which when executed by a processor implements the following method steps:
determining power consumption parameters and video playing parameters corresponding to video playing, wherein the power consumption parameters at least comprise current electric quantity, first preset residual electric quantity and electric quantity consumption speed, and the video playing parameters at least comprise current playing speed and residual playing duration of the video;
determining the playing speed of the video to be adjusted based on the power utilization parameter and the video playing parameter;
and playing the video based on the to-be-adjusted playing speed.
According to the video playing method, the electronic device and the storage medium provided by the embodiment of the invention, in the process that the user plays the video by using the terminal, the playing speed to be adjusted of the video is determined based on the power consumption parameter and the video playing parameter, and the video is played according to the playing speed to be adjusted, so that the residual electric quantity of the terminal is enough for the user to watch the currently played video.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a video playing method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a video playback device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a video playing method according to an embodiment of the present invention, and as shown in fig. 1, a video playing method according to an embodiment of the present invention includes the following steps:
s101: determining power consumption parameters and video playing parameters corresponding to video playing, wherein the power consumption parameters at least comprise current electric quantity, first preset residual electric quantity and electric quantity consumption speed, and the video playing parameters at least comprise current playing speed and residual playing duration of the video.
Specifically, power consumption parameters and video playing parameters corresponding to playing of the video are determined, the power consumption parameters at least comprise current electric quantity, first preset residual electric quantity and electric quantity consumption speed, and the video playing parameters at least comprise current playing speed and residual playing duration of the video. The method comprises the steps that a terminal can be executed, the terminal type of the terminal can comprise a communication terminal or a non-communication terminal, the communication terminal can comprise a mobile phone and the like, the non-communication terminal can comprise a tablet computer and the like, the first preset residual electric quantity can be set independently according to actual conditions, for the communication terminal, the lowest residual electric quantity for executing the communication function can be determined, the lowest residual electric quantity of the terminal can be understood (namely the lowest residual electric quantity capable of realizing the communication function) can be selected as 10% of the battery capacity, and namely when the electric quantity is less than 10%, the user can be reminded again in order to ensure that the user can normally communicate. For the non-communication terminal, the first preset residual electric quantity can be determined to be zero without the bottom-guaranteed electric quantity of communication.
The video can be a short video with a highlight clip or a long video such as a movie, and for the video played for the first time and at the starting time of playing, the remaining playing time length is equal to the total playing time length of the video; for the video which is not played for the first time, the playing breakpoint can be recorded, and at the starting moment of playing again, the remaining playing time length is equal to the time length from the playing moment corresponding to the playing breakpoint to the playing moment corresponding to the video which is played completely.
The current charge may be calculated according to the following formula:
the current electric quantity is equal to the percentage of the residual electric quantity multiplied by the battery capacity; the battery capacity can be acquired through the model of the mobile phone or system information. The mobile phone of part of the operating system can acquire more accurate electric quantity, for example, ios, and the more accurate and accurate electric quantity can be acquired through the IOKit.
The power consumption rate may be determined according to the power of the video at the starting time, the current power, the current time corresponding to the current power, and the starting time, and may specifically be calculated according to the following formula:
the power consumption rate is (power at the start time of playing the video-the current power)/(current time corresponding to the current power-the start time). The current time corresponding to the current electric quantity may be a play time; correspondingly, the starting time of playing the video is also the playing time. The current time corresponding to the current electric quantity may be a system time (e.g., beijing time displayed by the terminal); correspondingly, the starting time for playing the video is also the system time. Taking the playing time as an example, the starting time of playing the video is 00:00:00, and the electric quantity at the moment is 20% of the battery capacity; at time 00:05:00, the current capacity is 18% of the battery capacity, and if the battery capacity is 4000mAh, the power consumption rate is (2% × 4000mAh)/5min is 16 mAh/min.
Or, the power consumption rate may be determined according to the power amount at the time corresponding to the previous preset period, the current power amount, the current time corresponding to the current power amount, and the time corresponding to the previous preset period, and specifically may be calculated according to the following formula:
the power consumption rate is (power at a time corresponding to a previous preset period-the current power)/(current time corresponding to the current power-the time corresponding to the previous preset period). The preset period may be set autonomously according to actual conditions, and may be, for example, every minute, where the current time corresponds to a time 00:05:00, the current electric quantity is 18% of the battery capacity, the previous minute corresponds to a time 00:04:00, and the electric quantity at this time is 18.5% of the battery capacity, and if the battery capacity is 4000mAh, the electric quantity consumption rate is (0.5% × 4000mAh)/1min is 20 mAh/min.
S102: and determining the playing speed of the video to be adjusted based on the power utilization parameter and the video playing parameter.
Specifically, the to-be-adjusted playing speed of the video is determined based on the power utilization parameter and the video playing parameter. The method can specifically comprise the following steps: determining the adjustment multiplying power of the playing speed of the video based on the remaining playing time, the current electric quantity, the first preset remaining electric quantity and the electric quantity consumption speed; further, the adjustment magnification of the playing speed of the video may be calculated according to the following formula:
the adjustment multiplying factor is the remaining playing time length/{ (current electric quantity-first preset remaining electric quantity)/electric quantity consumption speed }. Taking the above power consumption speed as 16mAh/min as an example, if the remaining playing time is 40min, the current power is 18% of the battery capacity, and the first preset remaining power is 10% of the battery capacity, the adjustment magnification is 40min/{ (8% of the battery capacity)/(16 mAh/min) }, and if the battery capacity is 4000mAh, the adjustment magnification is 2 times.
Determining the playing speed of the video to be adjusted based on the adjusting multiplying power; if the adjusting multiplying power is larger than 1, determining the playing speed to be adjusted based on the adjusting multiplying power and the current playing speed; that is, if the adjustment magnification is greater than 1, the product of the adjustment magnification and the current playing speed may be used as the playing speed to be adjusted. If the current playing speed is 25 frames/s, the playing speed to be adjusted is 50 frames/s. And if the adjusting multiplying power is less than or equal to 1, taking the current playing speed as the playing speed to be adjusted. Referring to the above example, the video is again played at 25 frames/s.
S103: and playing the video based on the to-be-adjusted playing speed.
Specifically, the video is played based on the to-be-adjusted playing speed. Referring to the above example, if the current time is 00:05:00, the video is played at a play speed of 50 frames/s or is also played at 25 frames/s from that time.
According to the video playing method provided by the embodiment of the invention, in the process of playing the video by using the terminal, the playing speed of the video to be adjusted is determined based on the power consumption parameter and the video playing parameter, and the video is played according to the playing speed to be adjusted, so that the residual electric quantity of the terminal is enough for the user to watch the currently played video.
On the basis of the above embodiment, the determining the to-be-adjusted playing speed of the video based on the power consumption parameter and the video playing parameter includes:
specifically, based on the remaining playing time, the current electric quantity, the first preset remaining electric quantity and the electric quantity consumption speed, determining an adjustment magnification of the playing speed of the video; reference is made to the above description and no further description is made.
Specifically, based on the adjustment multiplying power, the to-be-adjusted playing speed of the video is determined; reference is made to the above description and no further description is made.
Specifically, if the adjustment magnification is greater than 1, determining the playing speed to be adjusted based on the adjustment magnification and the current playing speed; reference is made to the above description and no further description is made.
Specifically, if the adjustment magnification is less than or equal to 1, the current playing speed is used as the playing speed to be adjusted. Reference is made to the above description and no further description is made.
According to the video playing method provided by the embodiment of the invention, the playing speed to be adjusted is further determined according to the adjusting multiplying power of the playing speed of the video, and the residual electric quantity of the terminal can be further ensured to be enough for a user to watch the currently played video.
On the basis of the foregoing embodiment, the determining an adjustment magnification of the playing speed of the video based on the remaining playing time, the current electric quantity, the first preset remaining electric quantity, and the electric quantity consumption speed includes:
specifically, the adjustment magnification of the video playing speed is determined according to the following formula:
the adjustment multiplying factor is the remaining playing time length/{ (current electric quantity-first preset remaining electric quantity)/electric quantity consumption speed }. Reference is made to the above description and no further description is made.
According to the video playing method provided by the embodiment of the invention, the adjusting multiplying power of the playing speed of the video is calculated according to a specific formula, so that the playing speed to be adjusted is determined, and further, the residual electric quantity of the terminal can be ensured to be enough for a user to watch the currently played video.
On the basis of the above embodiment, the video playing method further includes a step of determining the power consumption rate, and specifically includes:
specifically, the power consumption speed is determined according to the power of the video at the starting time, the current power, the current time corresponding to the current power and the starting time; or
And determining the electric quantity consumption speed according to the electric quantity at the moment corresponding to the previous preset period, the current electric quantity, the current moment corresponding to the current electric quantity and the moment corresponding to the previous preset period. Reference is made to the above description and no further description is made.
According to the video playing method provided by the embodiment of the invention, the electric quantity consumption speed is respectively determined according to the electric quantity at the starting moment of the video and the electric quantity at the moment corresponding to the previous preset period, the playing speed to be adjusted can be accurately determined, and further the residual electric quantity of the terminal can be ensured to be enough for a user to watch the currently played video.
On the basis of the above-described embodiment, the power consumption rate is determined according to the following formula:
the power consumption rate is (power at the start time of playing the video-the current power)/(current time corresponding to the current power-the start time);
alternatively, the power consumption rate is determined according to the following formula:
the power consumption rate is (power at a time corresponding to a previous preset period-the current power)/(current time corresponding to the current power-the time corresponding to the previous preset period). Reference is made to the above description and no further description is made.
According to the video playing method provided by the embodiment of the invention, the electric quantity consumption speed is calculated according to the specific formula, the playing speed to be adjusted can be accurately determined, and the condition that the residual electric quantity of the terminal is enough for a user to watch the currently played video can be further ensured.
On the basis of the above embodiment, the video playing method further includes:
if the following preset conditions are met, determining the playing speed of the video to be adjusted based on the power utilization parameters and the video playing parameters:
the preset conditions include: determining that a supported playing time length is less than the remaining playing time length based on the current electric quantity, the electric quantity consumption speed and a second preset remaining electric quantity; and the second preset residual capacity is greater than the first preset residual capacity.
Specifically, the supported play time length may be determined according to the following formula:
{ (the current capacity-a second preset remaining capacity)/the capacity consumption speed };
the second preset residual capacity can be set independently according to actual conditions, and can be understood as early warning electric quantity, namely, the residual capacity value of the terminal for reminding the user aiming at the condition of insufficient electric quantity for the first time can be selected to be 30% of the battery capacity and is larger than the first preset residual capacity. If the current electric quantity is 38% of the battery capacity (corresponding to the time 00:05: 00), the electric quantity consumption speed is 16mAh/min, and the remaining playing time length is 40min, then:
{ (8% × 4000mAh)/(16mAh/min) } 20min <40min, the condition is satisfied, and therefore, from the time point 00:05:00, the adjustment magnification of the playback speed of the video is calculated according to the following formula:
the adjustment magnification is equal to the remaining playing time length/{ (current power-first preset remaining power)/power consumption speed }, equal to 40min/{ (28% × 4000mAh)/(16mAh/min) } equal to 0.57, which is smaller than 1, and therefore, the current playing speed is taken as the playing speed to be adjusted.
If the remaining playing time length is 100min and other parameters are not changed, the adjustment magnification is 1.43, and the value is greater than 1, so that if the current playing speed is 25 frames/s, the playing speed to be adjusted is 1.43 x (25 frames/s) 35.75 frames/s, that is, the video is played according to 35.75 frames/s from the time corresponding to 00:05: 00.
And if the preset condition is not met, determining the playing speed of the video to be adjusted based on the power utilization parameter and the video playing parameter. The embodiment of the invention realizes the following conditions:
the { (the current electric quantity-the second preset remaining electric quantity)/the electric quantity consumption speed } is greater than or equal to the remaining playing time, the video is played according to the current playing speed on the premise that the electric quantity is enough to play the video, the video playing effect is ensured, and the user experience is improved.
According to the video playing method provided by the embodiment of the invention, the step of determining the playing speed to be adjusted is executed according to the triggered preset condition, so that the residual electric quantity of the terminal is further ensured to be enough for a user to watch the currently played video, and the video playing effect can be ensured by controlling the playing speed of the video.
On the basis of the above embodiment, the video playing method further includes:
if the video is played at the current playing speed, the following preset conditions are met, and when the current electric quantity reaches the second preset residual electric quantity, the step of determining the playing speed to be adjusted of the video based on the power consumption parameter and the video playing parameter is executed:
the preset conditions include: determining that a supported playing time length is less than the remaining playing time length based on the current electric quantity, the electric quantity consumption speed and a second preset remaining electric quantity; and the second preset residual capacity is greater than the first preset residual capacity.
Specifically, referring to the above example, for the case that the remaining playing time is 100min, the video is played at 25 frames/s from the time 00:05:00, and if the current electric quantity reaches 30% × 4000mAh at the time 00:10:00, the adjustment rate of the playing speed of the video is calculated according to the following formula:
the adjustment magnification is equal to the remaining playing time length/{ (current power-first preset remaining power)/power consumption speed }, which is equal to 95min/{ (20% × 4000mAh)/(16mAh/min) } is equal to 1.9, and the value is greater than 1, so that if the current playing speed is 25 frames/s, the playing speed to be adjusted is 1.9 × (25 frames/s) × (47.5 frames/s, that is, the video is played according to 47.5 frames/s from the time when the corresponding time is 00:10: 00. According to the embodiment of the invention, the video is played at the current playing speed on the premise that the electric quantity is enough to play the video, the video playing effect is ensured, and the user experience is improved.
The video playing method provided by the embodiment of the invention further executes the step of determining the playing speed to be adjusted according to the preset triggering condition, further can ensure that the residual electric quantity of the terminal is enough for a user to watch the currently played video, and can further ensure the video playing effect by controlling the playing speed of the video.
On the basis of the above embodiment, the video playing method further includes:
specifically, if it is determined that the terminal type of the terminal performing video playing is a communication terminal, the first preset remaining power is determined to be the lowest remaining power for executing the communication function. Reference is made to the above description and no further description is made.
Specifically, if the terminal type of the terminal performing video playing is determined to be a non-communication terminal, it is determined that the first preset remaining power is zero. Reference is made to the above description and no further description is made.
The video playing method provided by the embodiment of the invention reasonably determines the specific numerical value of the first preset residual electric quantity aiming at different terminal types, thereby improving the applicability of the method to different terminals.
On the basis of the above embodiment, the video playing method further includes:
specifically, the step of determining the to-be-adjusted playing speed of the video based on the power consumption parameter and the video playing parameter, and the step of playing the video based on the to-be-adjusted playing speed are periodically executed. For the online video, the downloading speed is accelerated due to the adjustment of the playing speed, the power consumption is increased, so that the power consumption fluctuation is large, and the playing speed to be adjusted needs to be calculated in real time, therefore, the step of determining the playing speed to be adjusted of the video according to the current power, the first preset remaining power, the current playing speed of the video, the remaining playing time and the power consumption speed can be periodically executed according to a preset periodic interval, and the preset periodic interval can be autonomously set according to the actual situation and needs to be smaller than the remaining playing time.
The video playing method provided by the embodiment of the invention improves the applicability of the method for the application scene with large fluctuation of electric quantity consumption.
The embodiment of the invention can be combined with the prior art without conflict, and further ensures that a user can completely watch the video before the electric quantity reaches a critical point on the basis of the prior art.
Fig. 2 is a schematic structural diagram of an embodiment of a video playing apparatus according to the present invention, and as shown in fig. 2, an embodiment of the present invention provides a video playing apparatus, including a first determining unit 201, a second determining unit 202, and a playing unit 203, where:
a first determining unit 201, configured to determine power consumption parameters and video playing parameters corresponding to playing of a video, where the power consumption parameters at least include a current power amount, a first preset remaining power amount, and a power consumption rate, and the video playing parameters at least include a current playing speed and a remaining playing duration of the video; a second determining unit 202, configured to determine, based on the power consumption parameter and the video playing parameter, a playing speed of the video to be adjusted; a playing unit 203, configured to play the video based on the to-be-adjusted playing speed.
Specifically, the first determining unit 201 is configured to determine an electricity consumption parameter and a video playing parameter corresponding to a playing video, where the electricity consumption parameter at least includes a current electric quantity, a first preset remaining electric quantity, and an electric quantity consumption speed, and the video playing parameter at least includes a current playing speed and a remaining playing duration of the video; a second determining unit 202, configured to determine, based on the power consumption parameter and the video playing parameter, a playing speed of the video to be adjusted; a playing unit 203, configured to play the video based on the to-be-adjusted playing speed.
According to the video playing device provided by the embodiment of the invention, in the process of playing the video by using the terminal, the playing speed of the video to be adjusted is determined based on the power consumption parameter and the video playing parameter, and the video is played according to the playing speed to be adjusted, so that the residual electric quantity of the terminal is enough for the user to watch the currently played video.
The video playing apparatus provided in the embodiment of the present invention may be specifically configured to execute the processing flows of the above method embodiments, and the functions of the video playing apparatus are not described herein again, and reference may be made to the detailed description of the above method embodiments.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 3, the electronic device includes: a processor (processor)301, a memory (memory)302, and a bus 303;
the processor 301 and the memory 302 complete communication with each other through a bus 303;
the processor 301 is configured to call program instructions in the memory 302 to perform the methods provided by the above-mentioned method embodiments, including: determining power consumption parameters and video playing parameters corresponding to video playing, wherein the power consumption parameters at least comprise current electric quantity, first preset residual electric quantity and electric quantity consumption speed, and the video playing parameters at least comprise current playing speed and residual playing duration of the video; determining the playing speed of the video to be adjusted based on the power utilization parameter and the video playing parameter; and playing the video based on the to-be-adjusted playing speed.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: determining power consumption parameters and video playing parameters corresponding to video playing, wherein the power consumption parameters at least comprise current electric quantity, first preset residual electric quantity and electric quantity consumption speed, and the video playing parameters at least comprise current playing speed and residual playing duration of the video; determining the playing speed of the video to be adjusted based on the power utilization parameter and the video playing parameter; and playing the video based on the to-be-adjusted playing speed.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A video playback method, comprising:
determining power consumption parameters and video playing parameters corresponding to video playing, wherein the power consumption parameters at least comprise current electric quantity, first preset residual electric quantity and electric quantity consumption speed, and the video playing parameters at least comprise current playing speed and residual playing duration of the video;
determining the playing speed of the video to be adjusted based on the power utilization parameter and the video playing parameter;
and playing the video based on the to-be-adjusted playing speed.
2. The video playing method according to claim 1, wherein the determining the to-be-adjusted playing speed of the video based on the power consumption parameter and the video playing parameter comprises:
determining the adjustment multiplying power of the playing speed of the video based on the remaining playing time, the current electric quantity, the first preset remaining electric quantity and the electric quantity consumption speed;
determining the playing speed of the video to be adjusted based on the adjusting multiplying power;
if the adjusting multiplying power is larger than 1, determining the playing speed to be adjusted based on the adjusting multiplying power and the current playing speed;
and if the adjusting multiplying power is less than or equal to 1, taking the current playing speed as the playing speed to be adjusted.
3. The video playing method according to claim 2, wherein the determining an adjustment magnification of the playing speed of the video based on the remaining playing time, the current electric quantity, the first preset remaining electric quantity and the electric quantity consumption speed comprises:
determining the adjustment multiplying power of the video playing speed according to the following formula:
the adjustment multiplying factor is the remaining playing time length/{ (current electric quantity-first preset remaining electric quantity)/electric quantity consumption speed }.
4. The video playing method according to claim 1, wherein the video playing method further comprises the step of determining the power consumption rate, specifically comprising:
determining the electric quantity consumption speed according to the electric quantity at the starting moment of playing the video, the current electric quantity, the current moment corresponding to the current electric quantity and the starting moment; or
And determining the electric quantity consumption speed according to the electric quantity at the moment corresponding to the previous preset period, the current electric quantity, the current moment corresponding to the current electric quantity and the moment corresponding to the previous preset period.
5. The video playing method according to claim 4, comprising:
determining the power consumption rate according to the following formula:
the power consumption rate is (power at the start time of playing the video-the current power)/(current time corresponding to the current power-the start time);
alternatively, the power consumption rate is determined according to the following formula:
the power consumption rate is (power at a time corresponding to a previous preset period-the current power)/(current time corresponding to the current power-the time corresponding to the previous preset period).
6. The video playback method according to claim 1, further comprising:
if the following preset conditions are met, determining the playing speed of the video to be adjusted based on the power utilization parameters and the video playing parameters:
the preset conditions include: determining that a supported playing time length is less than the remaining playing time length based on the current electric quantity, the electric quantity consumption speed and a second preset remaining electric quantity; and the second preset residual capacity is greater than the first preset residual capacity.
7. The video playback method according to claim 1, further comprising:
if the video is played at the current playing speed, the following preset conditions are met, and when the current electric quantity reaches the second preset residual electric quantity, the step of determining the playing speed to be adjusted of the video based on the power consumption parameter and the video playing parameter is executed:
the preset conditions include: determining that a supported playing time length is less than the remaining playing time length based on the current electric quantity, the electric quantity consumption speed and a second preset remaining electric quantity; and the second preset residual capacity is greater than the first preset residual capacity.
8. The video playback method according to any one of claims 1 to 7, wherein the video playback method further comprises:
if the terminal type of the terminal for video playing is determined to be a communication terminal, determining the first preset residual capacity to be the lowest residual capacity for executing the communication function;
and if the terminal type of the terminal for video playing is determined to be a non-communication terminal, determining that the first preset residual electric quantity is zero.
9. The video playback method according to any one of claims 1 to 7, wherein the video playback method further comprises:
and periodically executing the steps of determining the playing speed to be adjusted of the video based on the power utilization parameter and the video playing parameter, and playing the video based on the playing speed to be adjusted.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the video playback method according to any of claims 1 to 9 are implemented when the computer program is executed by the processor.
11. A non-transitory computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the video playback method according to any one of claims 1 to 9.
CN202010038375.2A 2020-01-14 2020-01-14 Video playing method, electronic equipment and storage medium Pending CN111212326A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010038375.2A CN111212326A (en) 2020-01-14 2020-01-14 Video playing method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010038375.2A CN111212326A (en) 2020-01-14 2020-01-14 Video playing method, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111212326A true CN111212326A (en) 2020-05-29

Family

ID=70788143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010038375.2A Pending CN111212326A (en) 2020-01-14 2020-01-14 Video playing method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111212326A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113012506A (en) * 2021-03-01 2021-06-22 深圳市微幼科技有限公司 Interactive teaching system based on big data
CN113821188A (en) * 2021-08-25 2021-12-21 深圳市声扬科技有限公司 Method and device for adjusting audio playing speed, electronic equipment and storage medium
CN114727137A (en) * 2021-01-04 2022-07-08 腾讯科技(深圳)有限公司 Video playing method and device, storage medium and computer equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050213929A1 (en) * 2004-03-29 2005-09-29 Yiou-Wen Cheng Method and system for regulating power in portable audio/video playback device
CN104156050A (en) * 2014-08-18 2014-11-19 联想(北京)有限公司 Task monitoring method and electronic device
CN104580969A (en) * 2013-10-23 2015-04-29 中兴通讯股份有限公司 Video frame rate adjusting method and device
CN105872701A (en) * 2015-12-03 2016-08-17 乐视致新电子科技(天津)有限公司 Method and mobile terminal for realizing video playing control
CN106383572A (en) * 2016-09-29 2017-02-08 深圳天珑无线科技有限公司 Information output method and device
US20180255350A1 (en) * 2015-09-15 2018-09-06 Thomson Licensing Method and apparatus for providing power saving media content

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050213929A1 (en) * 2004-03-29 2005-09-29 Yiou-Wen Cheng Method and system for regulating power in portable audio/video playback device
CN104580969A (en) * 2013-10-23 2015-04-29 中兴通讯股份有限公司 Video frame rate adjusting method and device
CN104156050A (en) * 2014-08-18 2014-11-19 联想(北京)有限公司 Task monitoring method and electronic device
US20180255350A1 (en) * 2015-09-15 2018-09-06 Thomson Licensing Method and apparatus for providing power saving media content
CN105872701A (en) * 2015-12-03 2016-08-17 乐视致新电子科技(天津)有限公司 Method and mobile terminal for realizing video playing control
CN106383572A (en) * 2016-09-29 2017-02-08 深圳天珑无线科技有限公司 Information output method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114727137A (en) * 2021-01-04 2022-07-08 腾讯科技(深圳)有限公司 Video playing method and device, storage medium and computer equipment
CN114727137B (en) * 2021-01-04 2024-03-12 腾讯科技(深圳)有限公司 Video playing method and device, storage medium and computer equipment
CN113012506A (en) * 2021-03-01 2021-06-22 深圳市微幼科技有限公司 Interactive teaching system based on big data
CN113821188A (en) * 2021-08-25 2021-12-21 深圳市声扬科技有限公司 Method and device for adjusting audio playing speed, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111212326A (en) Video playing method, electronic equipment and storage medium
CN108984243B (en) Application use timeout reminding method and device and readable storage medium
CN109002387B (en) User reminding method and device of application program, terminal equipment and storage medium
CN106998494B (en) Video recording method and related device
CN109346071A (en) Wake up processing method, device and electronic equipment
CN111610848A (en) Screen refresh rate adjusting method and device, electronic equipment and storage medium
CN107077181A (en) A kind of charging current limiter method, device and electronic equipment
CN110554762A (en) Method and terminal for controlling application program
CN111063955A (en) Charging method and device, equipment and storage medium
CN108156314B (en) Electric quantity reminding method and device, electronic equipment and storage medium
CN111467798A (en) Frame display method, device, terminal and storage medium in game application program
CN110190643B (en) Method and device for reminding user of charging, wearable device and storage medium
CN107992393A (en) A kind of statistical method and system of electronic curtain usage time
CN112701736A (en) Charging method, charging device, electronic device and storage medium
CN115544704A (en) Charging pile topology determination method and device and storage medium
CN113487711B (en) Blink control method and device for avatar, electronic equipment and storage medium
CN114466365A (en) Spectrum resource acquisition method, spectrum resource acquisition device and computer readable storage medium
CN111510747B (en) Video definition determination method, system, computer device and storage medium
CN112423099A (en) Video loading method and device and electronic equipment
CN112531809A (en) Charging control method and device of mobile power supply based on intelligent charging cabinet
JP6858907B1 (en) Information terminal, information terminal control program and information terminal control method
CN111431247A (en) Charging control method, charging control device, electronic device and medium
CN106776204B (en) Method and device for determining power consumption application
CN105306750B (en) A kind of information processing method and electronic equipment
CN111078434A (en) Control method, control device and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200529