CN109587558B - Video processing method, video processing device, electronic equipment and storage medium - Google Patents

Video processing method, video processing device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109587558B
CN109587558B CN201811429232.3A CN201811429232A CN109587558B CN 109587558 B CN109587558 B CN 109587558B CN 201811429232 A CN201811429232 A CN 201811429232A CN 109587558 B CN109587558 B CN 109587558B
Authority
CN
China
Prior art keywords
electric quantity
video
electronic device
resource file
residual electric
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.)
Active
Application number
CN201811429232.3A
Other languages
Chinese (zh)
Other versions
CN109587558A (en
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811429232.3A priority Critical patent/CN109587558B/en
Publication of CN109587558A publication Critical patent/CN109587558A/en
Application granted granted Critical
Publication of CN109587558B publication Critical patent/CN109587558B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • 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/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • 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/485End-user interface for client configuration
    • H04N21/4854End-user interface for client configuration for modifying image parameters, e.g. image brightness, contrast

Abstract

The embodiment of the application discloses a video processing method and device, electronic equipment and a storage medium, and relates to the technical field of electronic equipment. The method is applied to the electronic equipment, and comprises the following steps: when the electronic equipment plays the video resource file, the residual electric quantity of the electronic equipment is detected, a target optimization parameter corresponding to the residual electric quantity is selected from all optimization parameters based on the residual electric quantity, and the video file is subjected to display enhancement processing based on the target optimization parameter, wherein the display enhancement processing improves the video image quality of the video resource file by processing images in the video resource file through the target optimization parameter. The video processing method, the video processing device, the electronic equipment and the storage medium provided by the embodiment of the application determine different optimization parameters according to different residual capacities, so that the video resource file is subjected to display enhancement processing through the optimization parameters corresponding to the residual capacities, and the display effect of a video picture is improved.

Description

Video processing method, video processing device, electronic equipment and storage medium
Technical Field
The present application relates to the field of electronic device technologies, and in particular, to a video processing method and apparatus, an electronic device, and a storage medium.
Background
With the development of science and technology, electronic devices have become one of the most common electronic products in people's daily life. Moreover, users often play games, watch videos and the like through the electronic equipment, but at present, the processing mode of the electronic equipment to the video data is fixed, and the user experience is not good.
Disclosure of Invention
In view of the above problems, the present application provides a video processing method, an apparatus, an electronic device, and a storage medium to solve the above problems.
In a first aspect, an embodiment of the present application provides a video processing method, which is applied to an electronic device, and the method includes: when the electronic equipment plays the video resource file, detecting the residual electric quantity of the electronic equipment; selecting a target optimization parameter corresponding to the residual electric quantity from all optimization parameters based on the residual electric quantity; and performing display enhancement processing on the video resource file based on the target optimization parameter, wherein the display enhancement processing improves the video image quality of the video resource file by processing the image in the video resource file through the target optimization parameter.
In a second aspect, an embodiment of the present application provides a video processing apparatus, which is applied to an electronic device, and the apparatus includes: the detection module is used for detecting the residual electric quantity of the electronic equipment when the electronic equipment plays the video resource file; the selection module is used for selecting a target optimization parameter corresponding to the residual electric quantity from all the optimization parameters based on the residual electric quantity; and the processing module is used for performing display enhancement processing on the video resource file based on the target optimization parameters, wherein the display enhancement processing improves the video image quality of the video resource file by processing the images in the video resource file through the target optimization parameters.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, the memory being coupled to the processor, the memory storing instructions, and the processor performing the above method when the instructions are executed by the processor.
In a fourth aspect, the present application provides a computer-readable storage medium, in which a program code is stored, and the program code can be called by a processor to execute the above method.
According to the video processing method and device, the electronic device and the storage medium, when the electronic device plays a video resource file, the residual electric quantity of the electronic device is detected, a target optimization parameter corresponding to the residual electric quantity is selected from all optimization parameters based on the residual electric quantity, and the video file is subjected to display enhancement processing based on the target optimization parameter, wherein the display enhancement processing improves the video image quality of the video resource file by processing images in the video resource file through the target optimization parameter, so that different optimization parameters are determined according to different residual electric quantities, the video resource file is subjected to display enhancement processing through the optimization parameter corresponding to the residual electric quantity, and the display effect of a video image is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating video playing provided by an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating a video processing method according to an embodiment of the present application;
fig. 3 is a flow chart illustrating a video processing method according to another embodiment of the present application;
FIG. 4 shows a flow chart of step S230 of the video processing method shown in FIG. 3 of the present application;
FIG. 5 shows a flow chart of step S250 of the video processing method shown in FIG. 3 of the present application;
fig. 6 is a flow chart illustrating a video processing method according to still another embodiment of the present application;
fig. 7 shows a block diagram of a video processing apparatus provided in an embodiment of the present application;
fig. 8 is a block diagram of an electronic device for executing a video processing method according to an embodiment of the present application;
fig. 9 illustrates a storage unit for storing or carrying program codes for implementing a video processing method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Referring to fig. 1, fig. 1 shows a video playing process. Specifically, when the operating system acquires data to be played, the next task is to analyze audio/video data. The general video file is composed of a video stream and an audio stream, and the audio and video packaging formats of different video formats are different. The process of combining audio and video streams into a file is called muxer, whereas the process of separating audio and video streams from a media file is called demux. The audio stream and the video stream need to be separated from the file stream for playing the video file and decoded respectively, the decoded video frame can be directly rendered, the audio frame can be sent to a buffer area of the audio output device for playing, and certainly, timestamps of the video rendering and the audio playing need to be controlled to be synchronous.
Specifically, the video decoding may include hard decoding and soft decoding, where the hardware decoding is performed by submitting a part of video data, which is originally completely processed by a Central Processing Unit (CPU), to a Graphics Processing Unit (GPU), and the GPU has a parallel operation capability much higher than that of the CPU, so that a load on the CPU can be greatly reduced, and some other programs can be run simultaneously after the CPU has a low occupancy rate, and certainly, for a better processor, such as i 52320 or any type of AMD four-core processor, both hard decoding and soft decoding can be performed.
Specifically, as shown in fig. 1, a multimedia Framework (Media Framework) acquires a Video file to be played by a client through an API interface with the client, and delivers the Video file to a Video codec (Video decoder), where the Media Framework is a multimedia Framework in an Android system, and three parts, namely, MediaPlayer, mediaplayservice and stagefrigidplayer, form a basic Framework of an Android multimedia. The multimedia frame part adopts a C/S structure, the MediaPlayer is used as a Client terminal of the C/S structure, the mediaplayservice and the stagefrigtheyer are used as a C/S structure Server terminal, the responsibility of playing the multimedia file is born, and the Server terminal completes the request of the Client terminal and responds through the stagefrigtheyer. Video Decode is a super decoder that integrates the most common audio and Video decoding and playback for decoding Video data.
In the soft decoding, the CPU decodes the video through software. And hard decoding means that the video decoding task is independently completed through a special daughter card device without the aid of a CPU.
Whether the decoding is hard decoding or soft decoding, after the video data is decoded, the decoded video data is sent to a layer delivery module (surfefinger), and the decoded video data is rendered and synthesized by the surfefinger and then displayed on a display screen. The Surface flunger is an independent Service, receives all the Surface of windows as input, calculates the position of each Surface in a final composite image according to parameters such as ZOrder, transparency, size and position, and then sends the position to HWComposer or OpenGL to generate a final display Buffer, and then displays the final display Buffer on a specific display device.
As shown in fig. 1, in the soft decoding, the CPU decodes the video data and then gives it to the surface flag rendering and compositing, and in the hard decoding, the CPU decodes the video data and then gives it to the surface flag rendering and compositing. And the SurfaceFlinger calls the GPU to render and synthesize the image, and the image is displayed on the display screen.
The processing mode of the video data by the electronic device is fixed at present, for example, when the electronic device runs a video resource file, all the video file resources are subjected to display enhancement processing, or none of the video file resources are subjected to display enhancement processing, and when the electronic device performs display enhancement processing on the video resource file, the modes of performing display enhancement processing are the same, and display enhancement processing cannot be performed by selecting a display enhancement mode adapted to the electronic device according to different states of the electronic device, so that the effect of display enhancement processing is unsatisfactory, and user experience is poor. In view of the above problems, the inventors have found and proposed, through long-term research, a video processing method, an apparatus, an electronic device, and a storage medium provided in the embodiments of the present application, that different optimization parameters are determined according to different remaining power amounts, so as to perform display enhancement processing on a video resource file through the optimization parameters corresponding to the remaining power amounts, thereby improving a display effect of a video picture. The specific video processing method is described in detail in the following embodiments.
Examples
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a video processing method according to an embodiment of the present application. The video processing method is used for determining different optimization parameters according to different residual capacities, and performing display enhancement processing on the video resource file through the optimization parameters corresponding to the residual capacities so as to improve the display effect of the video picture. In a specific embodiment, the video processing method is applied to the video processing apparatus 200 shown in fig. 7 and the electronic device 100 (fig. 8) configured with the video processing apparatus 200. The specific flow of the embodiment will be described below by taking an electronic device as an example, and it is understood that the electronic device applied in the embodiment may be a smart phone, a tablet computer, a wearable electronic device, a vehicle-mounted device, a gateway, and the like, and is not limited specifically herein. As will be described in detail with respect to the flow shown in fig. 2, the video processing method may specifically include the following steps:
step S110: and when the electronic equipment plays the video resource file, detecting the residual electric quantity of the electronic equipment.
In this embodiment, the video resource files played by the electronic device may include a video resource file played in a foreground of the electronic device, a video resource file played in a background of the electronic device, and a video resource file played in a foreground and a background of the electronic device in a switching manner, which is not specifically limited herein. The video resource file played in the foreground is a video resource file which can be interacted with a user and can be displayed in the foreground, and the video resource file can be suspended when the video resource file is invisible; the video resource file played in the background has very limited interaction with a user, and except for the configuration period, the other time of the life cycle of the video resource file is hidden; the video resource file played in the foreground and the background of the electronic equipment is a video resource file which can be switched between the foreground and the background at will. Optionally, in this embodiment, the video resource file played by the electronic device is a video resource file played in the foreground of the electronic device.
The video resource file may be a local resource file or a network resource file, which is not limited herein. Specifically, if the video resource file is a local resource file, the video resource file may be downloaded from a server in advance by an electronic device and stored locally, and when playing the video resource file, the electronic device may directly read and play from the local, for example, may directly read and play from a memory of the electronic device. As another mode, if the video resource file is a network resource file, the video resource file may be obtained and played online by the electronic device from a server, where the electronic device may obtain the video resource file online from the server through a wireless network, or may obtain the video resource file online from the server through a data network, which is not limited herein, where the data network may include a 2G network, a 3G network, a 4G network, or a 5G network.
In addition, when the video resource file is a network resource file, the electronic device may be equipped with a video playing application program, and display an application program icon corresponding to the video playing application program on a desktop of the electronic device, and when a touch operation of a user on the application program icon is detected, the electronic device may operate the video playing application program as a response, and acquire the video resource file from a server through a network; as another mode, the electronic device may be equipped with a browser, and based on a user operation, enter a video playing interface through a web page of the browser, and obtain a video resource file from a server under the video playing interface.
As one way, when it is determined that the electronic device plays the video resource file, the remaining power of the electronic device may be detected and obtained. The method for detecting the remaining power may include a voltage measurement method, a battery modeling method, a coulometer, and the like, and specifically, when the remaining power of the electronic device is detected by the voltage measurement method, the remaining power may be obtained by simply monitoring the voltage of the battery of the electronic device, although the method is simple, since the power and the voltage of the battery are not in a linear relationship, the accuracy of the remaining power measured by the voltage measurement method is low; when the residual electric quantity of the electronic equipment is detected by a battery modeling method, a data table can be established according to a discharge curve of a battery of the electronic equipment, and electric quantity values under different voltages can be marked in the data table, so that the measurement precision of the residual electric quantity can be improved; when the coulometer is used for detecting the residual capacity of the electronic equipment, a current detection resistor can be connected in series with the anode and the cathode of a battery of the electronic equipment, when current flows through the resistor, Vsense can be generated, the current flowing through the battery can be calculated by detecting the Vsense, the capacity change of the battery can be accurately tracked, and the detection precision of the residual capacity is improved.
Further, for example, in the Android system, the remaining power of the BATTERY of the electronic device may be obtained by using characteristics of broadcastrechiver, and the intetfilter set when the broadcastrechiver is registered is used to obtain the internal.
Step S120: and selecting a target optimization parameter corresponding to the residual electric quantity from all optimization parameters based on the residual electric quantity.
In this embodiment, the electronic device may store a plurality of remaining capacities and a plurality of optimization parameters, and store a corresponding relationship between the plurality of remaining capacities and the plurality of optimization parameters, where the corresponding relationship may include that one remaining capacity corresponds to one or more optimization parameters, and may also include that one optimization parameter corresponds to one or more remaining capacities, which is not limited herein. The corresponding relationship between the remaining power and the optimization parameter may be stored in the electronic device after being preset by the user, may be stored after being preset automatically by the electronic device, or may be sent to the electronic device after being preset by the server, which is not limited herein. In this embodiment, the optimization effect of each of the optimization parameters on the video resource file may be different, that is, the display enhancement effect achieved by processing the same video resource file through each of the optimization parameters may be different.
Wherein the optimization parameters may include exposure enhancement, dessication, edge sharpening, contrast increase, saturation increase, and the like, and the target optimization parameters may include a combination of one or more of exposure enhancement, dessication, edge sharpening, contrast increase, and saturation increase, e.g., the target optimization parameters are exposure enhancement, the target optimization parameters are dessication, the target optimization parameters include exposure enhancement and dessication, the target optimization parameters include exposure enhancement, dessication, edge sharpening, contrast increase, saturation increase, and the like.
Specifically, a video resource file displayed by the electronic device is decoded image content, and since the decoded image content is data in an RGBA format, in order to optimize the image content, the data in the RGBA format needs to be converted into an HSV format, specifically, a histogram of the image content is obtained, a parameter for converting the data in the RGBA format into the HSV format is obtained by performing statistics on the histogram, and the data in the RGBA format is converted into the HSV format according to the parameter.
In order to enhance the brightness of an image by enhancing the exposure, the luminance value of an area where the luminance values intersect may be increased by a histogram of the image, or the luminance of the image may be increased by nonlinear superposition, specifically, if I denotes a dark image to be processed and T denotes a comparatively bright image after the processing, the exposure may be enhanced by T (x) I (x) (1-I (x)). Wherein, T and I are both [0,1] valued images. The algorithm can iterate multiple times if one is not effective.
The image content is denoised to remove noise of the image, and particularly, the image is degraded due to interference and influence of various noises in the generation and transmission processes, which adversely affects the processing of subsequent images and the image visual effect. The noise is of many kinds, such as: electrical noise, mechanical noise, channel noise and other noise. Therefore, in order to suppress noise, improve image quality, and facilitate higher-level processing, it is necessary to perform denoising preprocessing on an image. From the probability distribution of noise, there are gaussian noise, rayleigh noise, gamma noise, exponential noise and uniform noise.
Specifically, the image can be denoised by a gaussian filter, wherein the gaussian filter is a linear filter, and can effectively suppress noise and smooth the image. The principle of action is similar to that of an averaging filter, and the average value of pixels in a filter window is taken as output. The coefficients of the window template are different from those of the average filter, and the template coefficients of the average filter are all the same and are 1; while the coefficients of the template of the gaussian filter decrease with increasing distance from the center of the template. Therefore, the gaussian filter blurs the image to a lesser extent than the mean filter.
For example, a 5 × 5 gaussian filter window is generated, and sampling is performed with the center position of the template as the origin of coordinates. And substituting the coordinates of each position of the template into a Gaussian function, wherein the obtained value is the coefficient of the template. And then the Gaussian filter window is convolved with the image to denoise the image.
Wherein edge sharpening is used to sharpen the blurred image. There are generally two methods for image sharpening: one is a differential method, and the other is a high-pass filtering method.
In particular, contrast stretching is a method for enhancing an image, and also belongs to a gray scale transformation operation. By stretching the grey value through the grey scale transformation to the whole interval 0-255, the contrast is clearly greatly enhanced. The following formula can be used to map the gray value of a certain pixel to a larger gray space:
I(x,y)=[(I(x,y)-Imin)/(Imax-Imin)](MAX-MIN)+MIN;
where Imin, Imax are the minimum and maximum grayscale values of the original image, and MIN and MAX are the minimum and maximum grayscale values of the grayscale space to be stretched.
Therefore, in this embodiment, after determining the remaining power of the electronic device, the optimization parameter corresponding to the remaining power may be selected from all the optimization parameters based on the corresponding relationship between the remaining power and the optimization parameter, and is used as the target optimization parameter, and it can be understood that the target optimization parameter may include one optimization parameter or may include a plurality of optimization parameters, which is not limited herein.
Step S130: and performing display enhancement processing on the video resource file based on the target optimization parameter.
Further, after the target optimization parameter corresponding to the residual electric quantity is determined, the video resource file is subjected to display enhancement processing based on the target optimization parameter, wherein the display enhancement processing processes the image in the video resource file through the determined target optimization parameter, improves the video image quality of the video resource file, and performs display enhancement processing on the video resource file through the optimization parameter adaptive to the residual electric quantity of the electronic equipment, so that the display effect of the video resource file is improved, and meanwhile, excessive consumption of the electric quantity of the electronic equipment is avoided. The image quality includes definition, sharpness, lens distortion, color, resolution, color gamut range, purity, etc., and different combinations thereof may have different display enhancement effects. It should be noted that the display enhancement processing on the video resource file can also be understood as a series of operations performed before formal processing is performed on the video resource file, including image enhancement, image restoration, and the like, and the image enhancement is to add some information or transform data to the original image by a certain means, selectively highlight interesting features in the image or inhibit some unnecessary features in the image, so that the image is matched with target optimization parameters, thereby improving the image quality and enhancing the visual effect.
As a mode, the higher the remaining power of the electronic device is, the more the remaining power representing the electronic device is sufficient to support a larger power consumption, so that the picture optimization quality corresponding to the target optimization parameter corresponding to the remaining power may be higher to improve the display effect, and the lower the remaining power of the electronic device is, the less the remaining power representing the electronic device is sufficient to support a larger power consumption, so that the picture optimization quality corresponding to the target optimization parameter corresponding to the remaining power may be lower to reduce the power consumption. For example, when the remaining power is 80% of the total power, the exposure enhancement, the desiccation removal, the edge sharpening, the contrast enhancement and the saturation enhancement can be selected as target optimization parameters together to maximize the display effect of the video resource file; when the residual electric quantity is 40% of the total electric quantity, the exposure enhancement can be selected as a target optimization parameter, the display effect of the video resource file can be improved to a smaller degree, and excessive electric quantity consumption of the electronic equipment is avoided on the basis of improving the display effect of the video resource file.
According to the video processing method provided by one embodiment of the application, when the electronic equipment plays the video resource file, the residual electric quantity of the electronic equipment is detected, the target optimization parameter corresponding to the residual electric quantity is selected from all the optimization parameters based on the residual electric quantity, and the video file is subjected to display enhancement processing based on the target optimization parameter, wherein the display enhancement processing improves the video image quality of the video resource file by processing the image in the video resource file through the target optimization parameter, so that different optimization parameters are determined according to different residual electric quantities, the video resource file is subjected to display enhancement processing through the optimization parameter corresponding to the residual electric quantity, and the display effect of the video image is improved.
Referring to fig. 3, fig. 3 is a flow chart illustrating a video processing method according to another embodiment of the present application. As will be described in detail with respect to the flow shown in fig. 3, the video processing method may specifically include the following steps:
step S210: and when the electronic equipment plays the video resource file, detecting the residual electric quantity of the electronic equipment.
For detailed description of step S210, please refer to step S110, which is not described herein again.
Step S220: and judging whether the residual electric quantity is higher than the specified electric quantity.
As one way, the electronic device is provided with a specified amount of power, which is used as a criterion for determining the remaining power of the electronic device. It can be understood that the specified electric quantity may be stored locally by the electronic device in advance, or may be set again when judged, which is not limited herein. In addition, the specified electric quantity may be automatically configured by the electronic device, may be manually set by a user, or may be transmitted to the electronic device after the configuration is completed by the server, which is not limited herein. In this embodiment, the specified power may include 60% of the total power, 40% of the total power, or 20% of the total power, and the like, and is not limited herein, therefore, in this embodiment, after the remaining power of the electronic device is obtained, the remaining power may be compared with the specified power, for example, the remaining power is compared with 20% of the total power, so as to determine whether the remaining power is higher than the specified power.
Step S230: and when the residual electric quantity is higher than the specified electric quantity, selecting a target optimization parameter corresponding to the residual electric quantity from all optimization parameters based on the residual electric quantity.
When it is determined that the remaining power is higher than the specified power, for example, when it is determined that the remaining power is higher than 20% of the total power, a target optimization parameter corresponding to the remaining power may be selected from all the optimization parameters based on the remaining power.
As an embodiment, a target display enhancement manner corresponding to the remaining power may be determined from a plurality of display enhancement manners, and the video resource file may be subjected to display enhancement processing by the target display enhancement manner, where the target enhancement manner at least includes a target optimization parameter, and each display enhancement manner in the plurality of display enhancement manners differs in video quality obtained by processing the video resource file. For example, the target display enhancement mode includes a first target display enhancement mode and a second target display enhancement mode, and the first target display enhancement mode at least includes a target optimization parameter consisting of exposure enhancement, desiccation removal, edge sharpening, contrast enhancement, and saturation enhancement, and the second target display enhancement mode at least includes a target optimization parameter consisting of exposure enhancement and desiccation removal.
Specifically, in this embodiment, the electronic device may store a plurality of display enhancement modes and a plurality of remaining power amounts, and store a corresponding relationship between the plurality of display enhancement modes and the plurality of remaining power amounts, where the corresponding relationship may include that one display enhancement mode corresponds to one or more remaining power amounts, and may also include that one remaining power amount corresponds to one or more display enhancement modes, which is not limited herein. The corresponding relationship between the display enhancement mode and the remaining power may be stored in the electronic device after being preset by the user, may be stored after being preset automatically by the electronic device, or may be sent to the electronic device after being preset by the server, which is not limited herein.
In this embodiment, each of the display enhancement modes has different video quality obtained by processing the video resource file, that is, the same video resource file is processed through each of the display enhancement modes, and the achieved display enhancement effects are different, for example, different optimization parameters, different numbers of optimization parameters, different optimization modes of the optimization parameters, and the like adopted by each display enhancement mode can achieve different optimization effects on the same video resource file.
As one way, the electronic device may create a mapping table, where the mapping table may include a plurality of display enhancement manners and a plurality of corresponding relationships between remaining power amounts, for example, the mapping table may be as shown in table 1, where the display enhancement manners are represented by a and the remaining power amounts are represented by B, and then, through the mapping table, the electronic device may set the corresponding relationships between the display enhancement manners and the remaining power amounts and store the corresponding relationships locally in the electronic device.
TABLE 1
Display enhancement mode Residual capacity
A1 B1
A2 B2
A3 B3
A4 B4
Further, in this embodiment, after determining the remaining power of the electronic device, the remaining power corresponding to the remaining power of the electronic device may be searched from the mapping relationship table, and then, based on the corresponding relationship between the display enhancement mode and the remaining power in the mapping relationship table, the display enhancement mode corresponding to the remaining power may be searched, and the display enhancement mode is determined as the target display enhancement mode. For example, when it is determined that the remaining power of the electronic device is 80% of the total power, the electronic device may search for the remaining power that is consistent with the remaining power of the electronic device, and if the remaining power is found to be consistent with the remaining power B1, it may be further determined that the display enhancement mode corresponding to the remaining power B1 is a1 based on the mapping relationship table, then it may be determined that the display enhancement mode corresponding to the remaining power that is 80% of the total power is a1, and the display enhancement mode a1 may include exposure enhancement, dryness removal, edge sharpening, contrast increase, and saturation increase in the optimization parameters.
Referring to fig. 4, fig. 4 is a flowchart illustrating step S230 of the video processing method illustrated in fig. 3 of the present application. As will be explained in detail with respect to the flow shown in fig. 4, the method may specifically include the following steps:
step S231: and when the residual electric quantity is higher than the specified electric quantity, detecting the file size of the video resource file to be played in the video resource file.
It can be understood that the file size of the video resource file and the power consumption of the display enhancement processing are in positive correlation, that is, when the file size of the video resource file is larger, the power consumption of the display enhancement processing on the video resource file is larger, and therefore, if the display enhancement processing is performed on the video resource file, the electronic device needs to have higher electric quantity as a support; when the file size of the video resource file is smaller, the power consumption for performing display enhancement processing on the video resource file is smaller, so that the electronic device can have lower electric quantity as a support if the display enhancement processing is performed on the video resource file.
Further, in the process of playing the video resource file, the file size of the video resource file to be played in the video resource file is continuously reduced, and the remaining power of the electronic device is also continuously reduced, so that as a mode, the remaining power of the electronic device can be monitored, and when the remaining power is monitored to be higher than the specified power, the file size of the video resource file to be played in the video resource file is detected.
Step S232: and judging whether the file size is smaller than a specified size.
As one way, the electronic device is provided with a specified size, and the specified size is used as a basis for judging the file size of the video resource file to be played of the electronic device. It is to be understood that the specified size may be stored locally by the electronic device in advance, or may be set again at the time of judgment, which is not limited herein. In addition, the designated size may be automatically configured by the electronic device, may be manually set by a user, or may be transmitted to the electronic device after being configured by the server, which is not limited herein. In this embodiment, the specified size may include 500M, 300M, and the like, and therefore, when the file size of the video resource file to be played is obtained, the file size of the video resource file to be played may be compared with the specified size to determine whether the file size of the video resource file to be played is smaller than the specified size.
Step S233: and when the file size is smaller than the specified size, selecting a target optimization parameter corresponding to the residual electric quantity from all the optimization parameters based on the residual electric quantity.
When the file size of the video resource file to be played is determined to be smaller than the designated size, the residual electric quantity representing the electronic equipment can be enough to support the display enhancement processing on the video resource file to be played, so that the target optimization parameter corresponding to the residual electric quantity can be selected from all the optimization parameters based on the residual electric quantity, and the display enhancement processing on the video resource file to be played can be performed through the target optimization parameter.
Step S240: and when the residual electric quantity is not higher than the specified electric quantity, judging whether the electronic equipment is in a charging state.
As a manner, if the detection result indicates that the remaining power of the electronic device is not higher than the specified power, for example, when the remaining power of the electronic device is not higher than 20% of the total power, the electronic device may be prohibited from performing display enhancement processing on the video resource file, so as to reduce power consumption of the electronic device.
Alternatively, if the detection result indicates that the remaining power of the electronic device is not higher than the specified power, for example, when the remaining power of the electronic device is higher than 20% of the total power, whether the electronic device is in a charging state may be detected and determined. Specifically, as a way to determine the charging state of the electronic device by looking up the state of the charging connection hole of the electronic device, for example, when the charging connection hole of the electronic device is connected with an adapter, a first state value is returned, and when the charging connection hole of the electronic device is not connected with an adapter, a second state value is returned, so that whether the electronic device is connected with an adapter or not can be determined by detecting the first state value and the second state value, it can be understood that when the electronic device is connected with an adapter, it can be characterized that the electronic device is in the charging state, and when the electronic device is not connected with an adapter, it can be characterized that the electronic device is not in the charging state; as another mode, the Android system can send out a broadcast when the charging wire is inserted into and pulled out of the charging connection hole, so that the electronic device can determine whether the adapter is connected currently by monitoring the broadcast, and thus, can determine whether the electronic device is in a charging state. Of course, in this embodiment, whether the electronic device is in the charging state may also be monitored through a built-in application program, which is not described herein again.
Step S250: and when the electronic equipment is in a charging state, selecting a target optimization parameter corresponding to the residual electric quantity from all optimization parameters based on the residual electric quantity.
When it is determined that the remaining power of the electronic device is not higher than the specified power and the electronic device is not in a charging state, the representation that the remaining power of the electronic device is not enough to support the display enhancement processing on the video resource file is performed, and the electronic device is not supplemented with power, so that the display enhancement processing on the video resource file can be prohibited, the power consumption speed of the electronic device can be reduced, and the service life of the electronic device can be prolonged.
In addition, when it is determined that the remaining capacity of the electronic device is not higher than the specified capacity and the electronic device is in a charging state, it is characterized that although the remaining capacity of the electronic device is not enough to support the display enhancement processing on the video resource file, the electronic device is supplemented with the capacity of electricity, so that a target optimization parameter corresponding to the remaining capacity can be selected from all optimization parameters based on the remaining capacity, and the display enhancement processing on the video resource file is performed based on the target optimization parameter.
Referring to fig. 5, fig. 5 is a flowchart illustrating a step S250 of the video processing method illustrated in fig. 3 according to the present application. As will be explained in detail with respect to the flow shown in fig. 5, the method may specifically include the following steps:
step S251: when the electronic equipment is in a charging state, detecting the power consumption speed of the electronic equipment.
Generally, the power consumption speed of an electronic device is increased positively when the electronic device is in a charging state, that is, the charging speed of the electronic device is greater than the power consumption speed, but in some cases, for example, when the electronic device is in a charging state and runs a high-power-consumption application program, the power consumption speed of the electronic device may be increased negatively, that is, the charging speed of the electronic device is less than the power consumption speed. In this embodiment, since the electronic device is in the high power consumption state when playing the video resource file, when the electronic device is in the charging state, the power consumption speed of the electronic device may be detected, where the power consumption speed of the electronic device may be detected by an application program built in the electronic device, which is not described herein again.
Step S252: and judging whether the power consumption speed is lower than a specified speed or not.
As one mode, the electronic apparatus is provided with a specified speed which is used as a criterion of the power consumption speed of the electronic apparatus. It is to be understood that the designated speed may be stored locally by the electronic device in advance, or may be set again at the time of judgment, which is not limited herein. In addition, the designated speed may be automatically configured by the electronic device, may be manually set by the user, or may be transmitted to the electronic device after being configured by the server, which is not limited herein. In this embodiment, the specified speed may include a charging speed, that is, it may be determined whether the power consumption speed of the electronic device is lower than the charging speed, where when the power consumption speed of the electronic device is lower than the charging speed, it indicates that the remaining power of the electronic device is increasing; when the power consumption speed of the electronic equipment is equal to the charging speed, representing that the residual capacity of the electronic equipment is kept unchanged; when the power consumption speed of the electronic equipment is higher than the charging speed, the residual capacity of the electronic equipment is represented to be increased negatively.
Step S253: and when the power consumption speed is lower than the designated speed, selecting a target optimization parameter corresponding to the residual power from all optimization parameters based on the residual power.
When the power consumption speed is determined to be lower than a specified speed, for example, when the remaining power of the electronic device is determined to be increasing, the remaining power representing the electronic device may be sufficient to perform display enhancement processing on the video resource file, and therefore, a target optimization parameter corresponding to the remaining power may be selected from all the optimization parameters based on the remaining power, so as to perform display enhancement processing on the video resource file through the target optimization parameter.
Step S260: and performing display enhancement processing on the video resource file based on the target optimization parameter, wherein the display enhancement processing improves the video image quality of the video resource file by processing the image in the video resource file through the target optimization parameter.
For detailed description of step S260, please refer to step S130, which is not described herein again.
In another embodiment of the present application, when an electronic device plays a video resource file, a remaining power of the electronic device is detected, whether the remaining power is higher than a specified power is determined, when the remaining power is higher than the specified power, a target optimization parameter corresponding to the remaining power is selected from all optimization parameters based on the remaining power, when the remaining power is not higher than the specified power, whether the electronic device is in a charging state is determined, when the electronic device is in the charging state, a target optimization parameter corresponding to the remaining power is selected from all optimization parameters based on the remaining power, and a display enhancement process is performed on the video resource file based on the target optimization parameter. Compared with the video processing method shown in fig. 2, in this embodiment, it is further determined whether the remaining power is higher than the specified power, and whether the electronic device is in the charging state when the remaining power is not higher than the specified power is determined, so as to improve the rationality of the display enhancement processing, and improve the display effect and user experience of the video resource file.
Referring to fig. 6, fig. 6 is a schematic flowchart illustrating a video processing method according to still another embodiment of the present application. As will be described in detail with respect to the flow shown in fig. 7, the video processing method may specifically include the following steps:
step S310: and when the electronic equipment plays the video resource file, detecting the residual electric quantity of the electronic equipment.
Step S320: and judging whether the residual electric quantity is higher than the specified electric quantity.
Step S330: and when the residual electric quantity is higher than the specified electric quantity, selecting a target optimization parameter corresponding to the residual electric quantity from all optimization parameters based on the residual electric quantity.
Step S340: and performing display enhancement processing on the video resource file based on the target optimization parameter, wherein the display enhancement processing improves the video image quality of the video resource file by processing the image in the video resource file through the target optimization parameter.
For the detailed description of steps S310 to S340, please refer to steps S210 to S230 and step S260, which are not described herein again.
Step S350: and when the residual electric quantity is not higher than the specified electric quantity, detecting other resource files operated by the electronic equipment.
As a manner, if the detection result indicates that the remaining power of the electronic device is not higher than the specified power, for example, when the remaining power of the electronic device is not higher than 20% of the total power, the other resource files run by the electronic device may be detected, and it can be understood that the other resource files run by the electronic device include other resource files running in the foreground of the sub-electronic device, other resource files running in the background of the electronic device, and resource files switching between the foreground and the background of the electronic device, which is not limited herein. The electronic equipment is operated in the foreground, namely other resource files which can be interacted with a user and can be displayed in the foreground are suspended when being invisible; running in the background of the electronic equipment means that the interaction with a user is very limited, and the life time of the electronic equipment is hidden except during configuration; the switching operation between the foreground and the background of the electronic equipment refers to other resource files which can be switched between the foreground and the background at will.
Step S360: and acquiring the power consumption of the other resource files.
Further, after determining other resource files operated by the electronic device, the power consumption of each of the other resource files may be obtained, where the power consumption of each of the other resource files may be detected by an application program built in the electronic device, and is not described herein again.
Step S370: and when the power consumption of the other resource files is higher than the specified power consumption, closing the other resource files.
In one mode, the electronic device is provided with a specific power consumption amount, and the specific power consumption amount is used as a judgment basis for the power consumption amount of the other resource file. It should be understood that the specified power consumption may be stored locally by the electronic device in advance, or may be set again at the time of determination, and is not limited herein. The specified power consumption may be automatically configured by the electronic device, may be manually set by the user, or may be transmitted to the electronic device after the configuration is completed by the server, which is not limited herein. Therefore, after the power consumption of each other resource file is obtained, the power consumption of each other resource file is compared with the specified power consumption to judge whether the power consumption of each other resource file is higher than the specified power consumption, and it can be understood that if the power consumption of the other resource file is higher than the specified power consumption, the power consumption of the other resource file is represented to be too high, and the other resource file can be closed to reduce the power consumption of the electronic device.
In another embodiment of the present application, when an electronic device plays a video resource file, a remaining power of the electronic device is detected, whether the remaining power is higher than a specified power is determined, when the remaining power is higher than the specified power, a target optimization parameter corresponding to the remaining power is selected from all optimization parameters based on the remaining power, a video resource file is displayed and enhanced based on the target optimization parameter, when the remaining power is not higher than the specified power, other resource files operated by the electronic device are detected, power consumption of the other resource files is obtained, and when the power consumption of the other resource files is higher than the specified power consumption, the other resource files are closed. Compared with the video processing method shown in fig. 2, in this embodiment, it is further determined whether the remaining power is higher than the specified power, and when the remaining power is not higher than the specified power and the power consumption of other resource files operated by the electronic device is higher than the specified power consumption, the other resource files are closed, so as to reduce the power consumption of the electronic device and prolong the service life of the electronic device.
Referring to fig. 7, fig. 7 is a block diagram illustrating a video processing apparatus 200 according to an embodiment of the present disclosure. The video processing apparatus 200 is applied to the above electronic device, and will be described with reference to the block diagram shown in fig. 7, the video processing apparatus 200 includes: a detection module 210, a selection module 220, and a processing module 230, wherein:
the detecting module 210 is configured to detect a remaining power of the electronic device when the electronic device plays the video resource file.
A selecting module 220, configured to select a target optimization parameter corresponding to the remaining power from all optimization parameters based on the remaining power. Further, the selecting module 220 includes: the system comprises a residual electric quantity judgment submodule, a first selection submodule, a charging state detection submodule, a second selection submodule, other resource file detection submodules, an electric power consumption acquisition submodule and other resource file closing submodules, wherein:
and the residual electric quantity judgment submodule is used for judging whether the residual electric quantity is higher than the specified electric quantity.
And the first selection submodule is used for selecting a target optimization parameter corresponding to the residual electric quantity from all optimization parameters based on the residual electric quantity when the residual electric quantity is higher than the specified electric quantity. Further, the first selecting submodule includes: file size detecting unit, file size judging unit and first selecting unit, wherein:
and the file size detection unit is used for detecting the file size of the video resource file to be played in the video resource file when the residual electric quantity is higher than the specified electric quantity.
And the file size judging unit is used for judging whether the file size is smaller than a specified size.
And the first selection unit is used for selecting a target optimization parameter corresponding to the residual electric quantity from all the optimization parameters based on the residual electric quantity when the size of the file is smaller than the specified size.
And the charging state detection submodule is used for judging whether the electronic equipment is in a charging state or not when the residual electric quantity is not higher than the specified electric quantity.
And the second selection submodule is used for selecting a target optimization parameter corresponding to the residual electric quantity from all the optimization parameters based on the residual electric quantity when the electronic equipment is in a charging state. Further, the second selection submodule includes: power consumption speed detecting unit, power consumption speed judging unit and second select the unit, wherein:
and the power consumption speed detection unit is used for detecting the power consumption speed of the electronic equipment when the electronic equipment is in a charging state.
And the power consumption speed judging unit is used for judging whether the power consumption speed is lower than a specified speed or not.
And the second selection unit is used for selecting a target optimization parameter corresponding to the residual electric quantity from all the optimization parameters based on the residual electric quantity when the power consumption speed is lower than the specified speed. Further, the second selecting unit includes: other resource file detection submodule, power consumption acquisition submodule and other resource file closing submodule, wherein:
and the other resource file detection submodule is used for detecting other resource files operated by the electronic equipment when the residual electric quantity is not higher than the specified electric quantity.
And the power consumption obtaining submodule is used for obtaining the power consumption of the other resource files.
And the other resource file closing submodule is used for closing the other resource files when the power consumption of the other resource files is higher than the specified power consumption.
A processing module 230, configured to perform display enhancement processing on the video resource file based on the target optimization parameter, where the display enhancement processing improves video quality of the video resource file by processing an image in the video resource file through the target optimization parameter.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 8, a block diagram of an electronic device 100 according to an embodiment of the present disclosure is shown. The electronic device 100 may be a smart phone, a tablet computer, an electronic book, or other electronic devices capable of running an application. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, a screen 130, a codec 140, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more programs configured to perform the method as described in the aforementioned method embodiments.
Processor 110 may include one or more processing cores, among other things. The processor 110 connects various parts within the overall electronic device 100 using various interfaces and lines, and performs various functions of the electronic device 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and calling data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the terminal 100 in use, such as a phonebook, audio-video data, chat log data, and the like.
The codec 140 may be configured to encode or decode video data, and then transmit the decoded video data to the screen 130 for display, where the codec 140 may be a GPU, a dedicated DSP, an FPGA, an ASIG chip, or the like.
Referring to fig. 9, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 300 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 300 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 300 includes a non-volatile computer-readable storage medium. The computer readable storage medium 300 has storage space for program code 310 for performing any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 310 may be compressed, for example, in a suitable form.
To sum up, according to the video processing method, the video processing apparatus, the electronic device, and the storage medium provided in the embodiments of the present application, when a video resource file is played by the electronic device, a remaining power of the electronic device is detected, a target optimization parameter corresponding to the remaining power is selected from all optimization parameters based on the remaining power, and a display enhancement process is performed on the video resource file based on the target optimization parameter, wherein the display enhancement process processes an image in the video resource file through the target optimization parameter to improve a video image quality of the video resource file, so that different optimization parameters are determined according to different remaining powers, and the display enhancement process is performed on the video resource file through the optimization parameter corresponding to the remaining power to improve a display effect of the video image.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application 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; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (9)

1. A video processing method applied to an electronic device, the method comprising:
when the electronic equipment plays the video resource file, detecting the residual electric quantity of the electronic equipment;
judging whether the residual electric quantity is higher than a specified electric quantity;
when the residual electric quantity is higher than the specified electric quantity, selecting a target optimization parameter corresponding to the residual electric quantity from all optimization parameters based on the residual electric quantity and a specified corresponding relation, wherein the specified corresponding relation comprises one or more optimization parameters corresponding to the residual electric quantity;
and performing display enhancement processing on the video resource file based on the target optimization parameter, wherein the display enhancement processing improves the video image quality of the video resource file by processing the image in the video resource file through the target optimization parameter.
2. The method of claim 1, wherein when the remaining power is higher than the specified power, selecting a target optimization parameter corresponding to the remaining power from all optimization parameters based on the remaining power comprises:
when the residual electric quantity is higher than the specified electric quantity, detecting the file size of a video resource file to be played in the video resource file;
judging whether the file size is smaller than a specified size;
and when the file size is smaller than the specified size, selecting a target optimization parameter corresponding to the residual electric quantity from all the optimization parameters based on the residual electric quantity.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
when the residual electric quantity is not higher than the specified electric quantity, judging whether the electronic equipment is in a charging state;
and when the electronic equipment is in a charging state, selecting a target optimization parameter corresponding to the residual electric quantity from all optimization parameters based on the residual electric quantity.
4. The method according to claim 3, wherein selecting a target optimization parameter corresponding to the remaining power from all optimization parameters based on the remaining power when the electronic device is in a charging state comprises:
detecting a power consumption speed of the electronic device when the electronic device is in a charging state;
judging whether the power consumption speed is lower than a specified speed or not;
and when the power consumption speed is lower than the designated speed, selecting a target optimization parameter corresponding to the residual power from all optimization parameters based on the residual power.
5. The method of claim 1, further comprising:
when the residual electric quantity is not higher than the specified electric quantity, detecting other resource files operated by the electronic equipment;
acquiring the power consumption of the other resource files;
and when the power consumption of the other resource files is higher than the specified power consumption, closing the other resource files.
6. The method according to claim 1, wherein the higher the remaining power is, the higher the picture optimization quality corresponding to the target optimization parameter is.
7. A video processing apparatus, applied to an electronic device, the apparatus comprising:
the detection module is used for detecting the residual electric quantity of the electronic equipment when the electronic equipment plays the video resource file;
the residual electric quantity judgment submodule is used for judging whether the residual electric quantity is higher than the specified electric quantity;
the first selection submodule is used for selecting a target optimization parameter corresponding to the residual electric quantity from all optimization parameters based on the residual electric quantity and a specified corresponding relation when the residual electric quantity is higher than the specified electric quantity, wherein the specified corresponding relation comprises one or more optimization parameters corresponding to the residual electric quantity;
and the processing module is used for performing display enhancement processing on the video resource file based on the target optimization parameters, wherein the display enhancement processing improves the video image quality of the video resource file by processing the images in the video resource file through the target optimization parameters.
8. An electronic device comprising a memory and a processor, the memory coupled to the processor, the memory storing instructions that, when executed by the processor, the processor performs the method of any of claims 1-6.
9. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 6.
CN201811429232.3A 2018-11-27 2018-11-27 Video processing method, video processing device, electronic equipment and storage medium Active CN109587558B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811429232.3A CN109587558B (en) 2018-11-27 2018-11-27 Video processing method, video processing device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811429232.3A CN109587558B (en) 2018-11-27 2018-11-27 Video processing method, video processing device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109587558A CN109587558A (en) 2019-04-05
CN109587558B true CN109587558B (en) 2020-12-29

Family

ID=65924961

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811429232.3A Active CN109587558B (en) 2018-11-27 2018-11-27 Video processing method, video processing device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109587558B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110072146B (en) * 2019-04-17 2021-07-16 长沙理工大学 Power-saving method and device for playing online video by mobile terminal and storage medium
CN111541915B (en) * 2020-07-07 2020-11-13 鹏城实验室 Low-power-consumption video processing method, device and equipment for mobile terminal and storage medium
CN111954285A (en) * 2020-08-05 2020-11-17 Oppo广东移动通信有限公司 Power saving control method and device, terminal and readable storage medium
CN114727137B (en) * 2021-01-04 2024-03-12 腾讯科技(深圳)有限公司 Video playing method and device, storage medium and computer equipment
CN114845089B (en) * 2022-07-04 2022-12-06 浙江大华技术股份有限公司 Video picture transmission method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101640755B (en) * 2008-08-01 2012-02-29 中兴通讯股份有限公司 Method for prolonging image media playing time and terminal thereof
US20170134461A1 (en) * 2015-11-09 2017-05-11 Le Shi Zhi Xin Electronic Technology (Tian Jin) Limited Method and device for adjusting definition of a video adaptively
CN107659828B (en) * 2017-10-30 2020-01-14 Oppo广东移动通信有限公司 Video image quality adjusting method and device, terminal equipment and storage medium
CN108762467A (en) * 2018-05-10 2018-11-06 Oppo广东移动通信有限公司 Application processing method, device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN109587558A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
CN109685726B (en) Game scene processing method and device, electronic equipment and storage medium
CN109587558B (en) Video processing method, video processing device, electronic equipment and storage medium
WO2020107989A1 (en) Video processing method and apparatus, and electronic device and storage medium
US20210281718A1 (en) Video Processing Method, Electronic Device and Storage Medium
US20210274251A1 (en) Video Processing Method, Electronic Device and Computer-Readable Medium
CN109379627B (en) Video processing method, video processing device, electronic equipment and storage medium
CN109120988B (en) Decoding method, decoding device, electronic device and storage medium
CN109729405B (en) Video processing method and device, electronic equipment and storage medium
WO2022179335A1 (en) Video processing method and apparatus, electronic device, and storage medium
WO2020108010A1 (en) Video processing method and apparatus, electronic device and storage medium
EP2791897B1 (en) Control of video processing algorithms based on measured perceptual quality characteristics
KR102558385B1 (en) Video augmentation control method, device, electronic device and storage medium
WO2020108060A1 (en) Video processing method and apparatus, and electronic device and storage medium
CN109618228B (en) Video enhancement control method and device and electronic equipment
WO2023226584A1 (en) Image noise reduction method and apparatus, filtering data processing method and apparatus, and computer device
US11562772B2 (en) Video processing method, electronic device, and storage medium
CN109167946B (en) Video processing method, video processing device, electronic equipment and storage medium
WO2020038071A1 (en) Video enhancement control method, device, electronic apparatus, and storage medium
CN109218803B (en) Video enhancement control method and device and electronic equipment
CN113409199A (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN109712100B (en) Video enhancement control method and device and electronic equipment
CN115311161B (en) Image enhancement method, device, equipment and storage medium based on artificial intelligence
CN109257636B (en) Switching method and device for video enhancement, electronic equipment and storage medium
CN115034967A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium

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
GR01 Patent grant
GR01 Patent grant