Video playing method and device, equipment, storage medium and computer program product

By dynamically adjusting the frame rate based on the motion information of the video frames during playback, the increased power consumption and stuttering caused by high refresh rates are solved, achieving low power consumption and smooth video playback.

CN121644898APending Publication Date: 2026-03-10HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

When playing videos at high refresh rates, the power consumption of the terminal device increases, resulting in shorter battery life, and users may experience stuttering.

Method used

By acquiring the motion information of the current video frame of the target video, the frequency of image changes is determined, and the screen refresh or layer composition frequency is adjusted according to this frequency to make it less than or equal to the video frame rate, thereby dynamically adjusting the speed of screen image changes.

Benefits of technology

It minimizes power consumption during video playback, avoids perceptible lag for users, and extends the battery life of terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121644898A_ABST
    Figure CN121644898A_ABST
Patent Text Reader

Abstract

The invention discloses a video playing method and device, equipment, a storage medium and a computer program product, and belongs to the technical field of display. In the process of playing the target video, the corresponding picture change frequency is dynamically determined according to the motion condition of each video frame, the picture change frequency is smaller than or equal to the frame rate of the target video, and the picture change frequency is not limited to be equal to the frequency of the target video at least. Therefore, the change speed of the screen picture can be dynamically adjusted according to the picture change frequency corresponding to each video frame, and especially under the condition that the picture of the video frame is static, the determined picture change frequency is far less than the frame rate of the target video, so that the change speed of the screen picture can be maximally reduced, and the user experience is improved. Therefore, the power consumption of playing the video is reduced to the maximum extent, a user can be prevented from perceiving jamming, the heating condition of the terminal equipment is reduced, and the endurance time of the terminal equipment is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of display, in particular to a video playing method and device, equipment, storage medium and computer program product. BACKGROUND

[0002] With the development of display technology, the highest refresh rate supported by terminal devices such as mobile phones and tablets is continuously improved. For example, the current highest refresh rate is generally 120Hz or above. The increase of refresh rate can improve the fluency, but at the same time, the power consumption will also increase, which will significantly reduce the endurance time of the terminal device. Therefore, in the video playing scenario, how to balance the fluency and power consumption has become a problem to be solved at present. SUMMARY

[0003] The present application provides a video playing method, device, equipment, storage medium and computer program product, which can maximize the reduction of power consumption of playing video, and also avoid the user from perceiving the lag, reduce the heating of the terminal device, and prolong the endurance time of the terminal device. The technical solution is as follows:

[0004] In a first aspect, a video playing method is provided, applied to a terminal device, and the method comprises: acquiring motion information of a current video frame in a target video, the motion information indicating the motion condition of the current video frame relative to a reference video frame of the current video frame; determining a picture change frequency corresponding to the current video frame based on the motion information of the current video frame, the picture change frequency being less than or equal to the frame rate of the target video; and playing the target video according to the picture change frequency.

[0005] The present application determines the picture change frequency corresponding to the current video frame through the motion information of the current video in the target video, and the picture change frequency is less than or equal to the frame rate of the target video, and then the target video is played according to the picture change frequency. That is, in the process of playing the target video, the picture change frequency corresponding to each video frame can be dynamically determined according to the motion condition of each video frame, and the picture change frequency is less than or equal to the frame rate of the target video, and there is no limitation that the picture change frequency is equal to the lowest frequency of the target video. In this way, the change speed of the screen picture can be dynamically adjusted according to the picture change frequency corresponding to each video frame, especially in the case that the picture of the video frame is static, the determined picture change frequency will be much smaller than the frame rate of the target video, which can maximize the reduction of the change speed of the screen picture, thereby maximizing the reduction of the power consumption of playing the video, and also avoiding the user from perceiving the lag, reducing the heating of the terminal device, and prolonging the endurance time of the terminal device.

[0006] The target video refers to a video to be played currently. The target video can be a video provided by a video application in the terminal device, or another video stored in the terminal device.

[0007] The current video frame includes a plurality of image blocks, and the motion information of the current video frame includes motion vectors corresponding to the plurality of image blocks. The motion vector includes a motion amplitude and a motion direction. The motion amplitude is also referred to as a position offset. The motion direction is also referred to as an offset direction.

[0008] It should be noted that there can be image blocks that do not move in the plurality of image blocks, that is, there can be still image blocks in the plurality of image blocks. For the still image blocks, the motion information of the current video frame can include motion vectors corresponding to the image blocks, and the motion vectors corresponding to the image blocks are 0. Alternatively, the motion information of the current video frame does not include the motion vectors corresponding to the image blocks. Hereinafter, the motion information of the current video frame includes the motion vectors corresponding to the image blocks, and the motion vectors corresponding to the image blocks are 0 are introduced.

[0009] In a possible implementation, the determining, based on the motion information of the current video frame, of the picture change frequency corresponding to the current video frame includes: determining a motion feature of the current video frame based on the motion information of the current video frame; and taking the motion feature as an input of a target network model to obtain the picture change frequency output by the target network model.

[0010] In a possible implementation, the current video frame includes a plurality of image blocks, and the motion feature includes at least one of but is not limited to the following: a motion speed, a motion region size, a motion consistency, and a motion duration.

[0011] The motion speed is an average motion speed of the image blocks in the current video frame that move relative to the reference video frame, the motion region size is a total size of the image blocks in the current video frame that move relative to the reference video frame, the motion consistency is a difference degree of the motion directions of the image blocks in the current video frame that move relative to the reference video frame, and the motion duration is an average continuous motion duration of the image blocks in the current video frame that move relative to the reference video frame.

[0012] When the motion vector of each image block includes motion amplitude and motion direction, motion speed indicates the average motion amplitude corresponding to the image blocks with motion amplitude greater than 0 in the current video frame, motion region size indicates the total size of the image blocks with motion amplitude greater than 0 in the current video frame, motion consistency indicates the variance of the motion direction corresponding to the image blocks with motion amplitude greater than 0 in the current video frame, and motion duration indicates the average number of consecutive motions corresponding to the image blocks with motion amplitude greater than 0 in the current video frame.

[0013] In one possible implementation, before using the motion features as input to the target network model to obtain the screen change frequency output by the target network model, the method further includes: acquiring the screen change frequency of multiple sample videos and the motion information corresponding to each sample video frame in the multiple sample videos; determining the motion features of each sample video frame based on the motion information corresponding to each sample video frame; using the motion features of each sample video frame in the multiple sample videos as input to an initial network model to be trained, using the screen change frequency of the multiple sample videos as output of the initial network model, and training the initial network model to obtain the target network model.

[0014] The frame change frequency of each sample video is the lowest frequency at which the smoothness of that sample video is not different, and this frequency is less than or equal to the frame rate of the sample video. Therefore, after training the target network model according to the frame change frequency of these multiple sample videos and the motion information corresponding to each sample video frame in these multiple sample videos, the frame change frequency predicted by the target network model will be less than or equal to the frame rate of the corresponding video. Moreover, the smoothness effect of playing the target video according to the frame change frequency predicted by the target network model is basically no different from the original smoothness effect, and there will be no stuttering.

[0015] In one possible implementation, determining the frame change frequency corresponding to the current video frame based on the motion information of the current video frame includes: using the current video frame and the motion information as input to the target network model to obtain the frame change frequency output by the target network model.

[0016] By directly inputting the current video frame and its motion information into the target network model, the frequency of frame changes in the current video frame can be determined. This avoids the operation of extracting motion features. Moreover, by directly inputting the current video frame and its motion information into the target network model, the fitting ability of the target network model can be fully utilized, making the accuracy of the frame change frequency predicted by the target network model higher.

[0017] In one possible implementation, the target network model is a deep neural network model, which includes a feature extraction layer, a feature fusion layer, and a result classification layer. The step of using the current video frame and the motion information as input to the target network model to obtain the screen change frequency output by the target network model includes: determining the spatial features of the current video frame through the feature extraction layer based on the current video frame; determining the temporal features of the current video frame through the feature extraction layer based on the motion information; fusing the spatial and temporal features of the current video frame, as well as the spatial and temporal features of at least one video frame preceding the current video frame, through the feature fusion layer to obtain fused features; and determining the screen change frequency through the result classification layer based on the fused features.

[0018] Spatial features are used to indicate the spatial characteristics of the current video frame, such as brightness, contrast, and gradient. Temporal features are used to indicate the temporal characteristics of the current video frame, such as motion speed, motion region size, motion consistency, and motion duration.

[0019] In one possible implementation, before using the current video frame and the motion information as input to the target network model to obtain the screen change frequency output by the target network model, the method further includes: acquiring the screen change frequency of multiple sample videos and the motion information corresponding to each sample video frame in the multiple sample videos; using each sample video frame and the motion information corresponding to each sample video frame in the multiple sample videos as input to an initial network model to be trained, using the screen change frequency of the multiple sample videos as the output of the initial network model, training the initial network model to obtain the target network model.

[0020] In one possible implementation, obtaining the frame rate variation frequency of the plurality of sample videos includes: for each of the plurality of sample videos, using the frame rate of the sample video as a first candidate frequency, reducing the frame rate of the sample video to obtain a second candidate frequency; playing the sample video according to the first candidate frequency and the second candidate frequency respectively; obtaining a smoothness score result, the smoothness score result indicating whether there is a difference in smoothness after the sample video is played according to the first candidate frequency and the second candidate frequency; if the smoothness score result indicates that there is no difference in the smoothness of the sample video, then continuing to reduce the frame rate of the sample video to obtain a second candidate frequency again, and returning to the step of playing the sample video according to the first candidate frequency and the second candidate frequency respectively; if the smoothness score result indicates that there is a difference in the smoothness of the sample video, then determining the previously obtained second candidate frequency as the frame rate variation frequency of the sample video.

[0021] If the fluency score indicates a difference in the fluency of the sample video, it means that the human eye has perceived the difference brought about by the second candidate frequency. If this is the first time a fluency score has been given, it means that the first candidate frequency is the lowest frequency at which the human eye does not perceive a difference; therefore, the first candidate frequency is determined as the frame change frequency of the sample video. If this is not the first time a fluency score has been given, it means that the second candidate frequency obtained in the previous test was the lowest frequency at which the human eye did not perceive a difference; therefore, the second candidate frequency obtained in the previous test is determined as the frame change frequency of the sample video.

[0022] In one possible implementation, different video frame rates correspond to different network models. Therefore, the method further includes: determining the current frame rate of the target video; and determining the target network model from multiple network models corresponding to the current frame rate. This allows for the determination of the frame change frequency corresponding to the current video frame through the target network model, thereby improving the accuracy of the frame change frequency determination.

[0023] In one possible implementation, the screen of the terminal device supports dynamic adjustment of the refresh rate, and the screen refresh frequency includes a first refresh rate; playing the target video according to the screen refresh frequency includes: adjusting the screen refresh rate to the first refresh rate; and refreshing the video screen according to the first refresh rate to play the target video.

[0024] It should be noted that this screen can be the aforementioned LTPO screen, or it can be any other screen that supports dynamic refresh rate adjustment.

[0025] Since the frame rate of the current video frame is less than or equal to the frame rate of the target video, and this frame rate includes the first refresh rate, it can be understood that the first refresh rate is also less than or equal to the frame rate of the target video. Therefore, for the current video frame, the screen refreshes according to the first refresh rate, making the terminal device's screen refresh rate less than or equal to the frame rate of the target video. Furthermore, the corresponding screen refresh rate is dynamically determined based on the motion of each video frame. This allows for dynamic adjustment of the screen refresh rate according to the screen refresh rate corresponding to each video frame. Especially when the video frame is static, the determined screen refresh rate will be much lower than the frame rate of the target video, maximizing the reduction of the screen refresh rate and thus minimizing the power consumption during video playback.

[0026] In one possible implementation, the screen of the terminal device does not support dynamic adjustment of the refresh rate, and the screen change frequency includes a first layer composition frequency; playing the target video according to the screen change frequency includes: adjusting the frequency of the vertical synchronization signal of the mobile terminal to the first layer composition frequency; and compositing the layers of video frames in the target video according to the first layer composition frequency to play the target video.

[0027] Since the frame rate of the current video frame is less than or equal to the frame rate of the target video, and this frame rate includes the first layer composition frequency, it can be understood that the first layer composition frequency is also less than or equal to the frame rate of the target video. Therefore, for the current video frame, the screen image is composed according to the first layer composition frequency, making the screen image composition frequency less than or equal to the frame rate of the target video. Furthermore, the corresponding layer composition frequency is dynamically determined based on the motion of each video frame. This allows for dynamic adjustment of the screen image composition speed according to the layer composition frequency corresponding to each video frame. Especially when the video frame is static, the determined layer composition frequency will be much lower than the frame rate of the target video, maximizing the reduction of the screen image composition speed and thus minimizing the power consumption of video playback.

[0028] In one possible implementation, in addition to displaying video frames of the target video, the screen also displays UI information and receives touch signals input by the user on the screen; these can all be referred to as layers above the video frames. That is, the upper layer of the video frame also has at least one layer. Therefore, before playing the target video according to the frame change frequency, the method further includes: obtaining the layer change frequency corresponding to at least one layer above the current video frame; determining a target frequency based on the frame change frequency and the layer change frequency corresponding to the at least one layer; and playing the target video according to the frame change frequency includes: playing the target video according to the target frequency.

[0029] Secondly, a video playback device is provided, which has the function of implementing the method behavior described in the first aspect. The video playback device includes at least one module for implementing the method provided in the first aspect.

[0030] Thirdly, a terminal device is provided, the terminal device including a processor coupled to a memory for storing programs or instructions, wherein when the program or instructions are executed by the processor, the terminal device performs the method described in the first aspect.

[0031] Fourthly, a computer-readable storage medium is provided, including program code that, when executed on a computer, causes the computer to perform the method described in the first aspect.

[0032] Fifthly, a computer program product is provided, including instructions that, when executed on a computer, cause the computer to perform the method described in the first aspect.

[0033] The technical effects achieved by the second to fifth aspects mentioned above are similar to those achieved by the corresponding technical means in the first aspect, and will not be repeated here. Attached Figure Description

[0034] Figure 1 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;

[0035] Figure 2 This is a schematic diagram of the structure of another terminal device provided in an embodiment of this application;

[0036] Figure 3 This is a schematic diagram of layer compositing performed by a graphics subsystem provided in an embodiment of this application;

[0037] Figure 4 This is a flowchart of a video playback method provided in an embodiment of this application;

[0038] Figure 5 This is a schematic diagram of a fluency scoring interface provided in an embodiment of this application;

[0039] Figure 6 This is a schematic diagram illustrating the frame change frequency of a sample video provided in an embodiment of this application;

[0040] Figure 7 This is a schematic diagram illustrating a deep neural network model for determining the frequency of image changes, provided in an embodiment of this application.

[0041] Figure 8 This is a schematic diagram illustrating how to determine the frame change frequency of the current video frame according to an embodiment of this application;

[0042] Figure 9 This is a schematic diagram illustrating another method for determining the frame change frequency of the current video frame, provided in an embodiment of this application.

[0043] Figure 10 This is a schematic diagram illustrating the effect of reducing screen refresh rate according to an embodiment of this application;

[0044] Figure 11 This is a schematic diagram illustrating the effect of reducing the frequency of the vertical synchronization signal provided in an embodiment of this application;

[0045] Figure 12 This is a comparative schematic diagram of user subjective MOS for a 60FPS video provided in an embodiment of this application;

[0046] Figure 13 This is a comparative schematic diagram of user subjective MOS for a 30FPS video provided in an embodiment of this application;

[0047] Figure 14 This is a schematic diagram of the structure of a video playback device provided in an embodiment of this application. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0049] Before providing a detailed explanation of the video playback method provided in the embodiments of this application, the terms, application scenarios, and implementation environments involved in the embodiments of this application will be introduced first.

[0050] First, the terms used in the embodiments of this application will be introduced.

[0051] 1. Refresh rate

[0052] Refresh rate refers to the number of times the screen's image is refreshed per second. It is also called screen refresh rate or refresh frequency. Its unit is Hertz (Hz).

[0053] 2. Frame rate

[0054] Frame rate refers to the number of video frames per second. It is also called video frame rate. Its unit is frames per second (FPS). The frame rate of a video may not be equal to the refresh rate. If the video's frame rate is less than the refresh rate, some video frames will be repeatedly displayed on the screen; if the video's frame rate is greater than the refresh rate, some video frames will be discarded.

[0055] 3. Sports Information

[0056] In the field of video encoding and decoding, motion information is used to indicate the motion of the current video frame relative to a reference video frame. Typically, a current video frame comprises multiple image blocks, and the motion information corresponding to the current video frame includes the motion vectors (MVs) for each of these image blocks. The motion vector for each image block includes its positional offset and direction of offset within the current video frame and within the reference video frame. This positional offset is also called the motion amplitude, and the offset direction is also called the motion direction. In other words, the motion vector for each image block includes both the motion amplitude and the motion direction for that image block.

[0057] 4. Low-temperature polycrystalline oxide (LTPO) screen

[0058] LTPO screens are a combination of low-temperature polysilicon (LTPS) and indium gallium zinc oxide (IGZO), the mainstream materials for organic light-emitting diode (OLED) screens. A key feature of LTPO screens is their ability to dynamically adjust the refresh rate, down to a minimum of 1Hz.

[0059] 5. Graphics Subsystem

[0060] The graphics subsystem is a very important subsystem in the operating system, responsible for functions such as rendering and compositing different layers, frame dropping control, and screen refresh rate decision-making.

[0061] 6. Vertical synchronization (Vsync) signal

[0062] The purpose of vertical synchronization is to unify the rhythm of application layer rendering, graphics subsystem layer compositing, and screen refresh. In other words, by using vertical synchronization, the frequency of application layer rendering, graphics subsystem layer compositing, and screen refresh can be kept consistent, thereby stabilizing the output quality of the image.

[0063] 7. Decision Tree

[0064] Decision trees are a commonly used classification method. It is a form of supervised learning, where a set of samples, each with a set of attributes and a predefined category, is used to learn the attributes and categories of these samples. This process allows the creation of a classifier (also known as a decision tree model) that can correctly classify new objects.

[0065] 8. Data labeling

[0066] Data annotation is the process of processing unprocessed data such as speech, images, text, and video into machine-readable information for training network models.

[0067] 9. Deep Neural Networks

[0068] Deep neural networks consist of multiple network layers that receive input from other layers and produce outputs until a final result is obtained. Deep neural networks can have any number of hidden layers, and the more layers a deep neural network has, the higher its complexity. Traditional neural networks typically consist of 2 or 3 hidden layers, while deep neural networks can have 150 or more hidden layers.

[0069] 10. System-on-chip (SoC)

[0070] An SoC is a chip that fully integrates a central processing unit (CPU), a graphics processing unit (GPU), and communication modules.

[0071] 11. Operating System Layering

[0072] Operating system layering refers to dividing the operating system into multiple layers based on functionality. Each layer is responsible for a specific function and interacts with adjacent layers through interfaces. This layered structure facilitates modular design of the operating system, improving its maintainability and scalability. Taking Android as an example, it consists of four layers: application layer, application framework layer, system runtime library layer, and kernel layer.

[0073] Secondly, the application scenarios involved in the embodiments of this application will be introduced.

[0074] Increasing refresh rates improves smoothness, but it also increases power consumption for both the SoC and the screen, significantly impacting battery life. This is especially true for mobile devices like phones and tablets, severely affecting their battery life. To balance smoothness and power consumption, LTPO screens are widely used. LTPO screens allow for dynamic refresh rate adjustment, using different refresh rates for different usage scenarios. However, in video playback scenarios, the refresh rate requirement is often low; playing videos at a high refresh rate wastes system power.

[0075] The related technology provides a video playback method. In this method, the default refresh rate of video applications is 60Hz. During video playback, if the user enables subtitles (or "bullet comments"), the screen refresh rate is set to 40Hz based on the number of subtitles; if the user disables subtitles, the screen refresh rate is set to the video source's frame rate, such as 24Hz. This method avoids the screen running at a constant 60Hz refresh rate, thus saving power. However, the minimum screen refresh rate is the video frame rate. If the video frame rate is greater than or equal to the application's default refresh rate, there is essentially no benefit in terms of power saving.

[0076] Based on this, embodiments of this application provide a video playback method. This method determines the frame change frequency corresponding to the current video frame based on motion information in the target video, and this frame change frequency is less than or equal to the frame rate of the target video. Then, the target video is played according to this frame change frequency. In other words, during the playback of the target video, the corresponding frame change frequency can be dynamically determined based on the motion of each video frame, and the frame change frequency is less than or equal to the frame rate of the target video, without limiting the frame change frequency to a minimum equal to the target video's frequency. This allows for dynamic adjustment of the screen's frame change speed according to the frame change frequency corresponding to each video frame. Especially when the video frame is static, the determined frame change frequency will be much lower than the target video's frame rate, maximizing the reduction of the screen's frame change speed and thus minimizing power consumption during video playback. Furthermore, it avoids perceptible stuttering for the user, reduces heat generation on the terminal device, and extends the terminal device's battery life.

[0077] Finally, the implementation environment involved in the embodiments of this application will be described.

[0078] The method provided in this application can be applied to terminal devices, which may include mobile phones, smartphones, personal digital assistants (PDAs), wearable devices, pocket PCs (PPCs), tablet computers, smart car systems, smart TVs, smart speakers, desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, handsets such as so-called "smart" phones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.

[0079] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. The terminal device includes one or more processors 101, a memory 102, and a screen 103.

[0080] Processor 101 can be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or one or more integrated circuits for implementing the solutions of this application, such as application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof. For example, processor 101 runs video-related applications, and processor 101 also includes a decoder and a video processing module.

[0081] Memory 102 may include random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (such as optical discs, magnetic disks, or other magnetic storage devices), or any other media that stores program code in the form of instructions or data structures and is accessible by the computer. Memory 102 may exist independently and be connected to processor 101 via a communication bus. Memory 102 may also be integrated with processor 101.

[0082] Screen 103 is used for playing video and displaying user interface (UI) information, including bullet comments and special effects, which can be graphics, text, icons, and any combination thereof. When screen 103 is a touchscreen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 101 for processing. In this case, screen 103 can also provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In other words, in addition to playing video, screen 103 also displays UI information and receives touch signals input by the user on screen 103.

[0083] In some embodiments, there may be one screen 103, which serves as the front panel of the terminal device; in other embodiments, there may be at least two screens 103, which are respectively disposed on different surfaces of the terminal device or have a foldable design; in still other embodiments, the screen 103 may be a flexible display screen, disposed on a curved or folded surface of the terminal device. Furthermore, the screen 103 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The screen 103 may be made of materials such as liquid crystal display (LCD) or OLED.

[0084] In some embodiments, the memory 102 stores at least one instruction, which is executed by the processor 101 to play video on the screen 103 according to the method provided in this application embodiment. For example, the decoder in the processor 101 can decode video from a video application or video stored in the memory 102. The video processing module determines the frame variation frequency corresponding to the video frame decoded by the decoder according to the method provided in this application embodiment, and then plays the video on the screen 103 according to the frame variation frequency.

[0085] In some embodiments, the terminal device further includes a power supply 104, an audio circuit 105, a radio frequency circuit 106, a sensor module 107, and so on.

[0086] Power supply 104 is used to power various components in the terminal device. Power supply 104 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 104 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, while a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0087] The audio circuit 105 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 101 for processing, or input to the radio frequency circuit 106 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned in a different part of the terminal device. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 101 or the radio frequency circuit 106 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 107 may also include a headphone jack.

[0088] The radio frequency (RF) circuit 106 is used to receive and transmit radio frequency (RF) signals, also known as electromagnetic signals. The RF circuit 106 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 106 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the RF circuit 106 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 106 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or wireless fidelity (WIFI) networks. In some embodiments, the RF circuit 106 may also include circuitry related to Near Field Communication (NFC), which is not limited in this application embodiment.

[0089] The sensor module 107 includes, but is not limited to: an accelerometer, a gyroscope, a pressure sensor, a fingerprint sensor, an optical sensor, and a proximity sensor.

[0090] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0091] The above Figure 1 The first description is from the perspective of the terminal device's hardware structure; the next description will be from the perspective of the terminal device's system layering. Please refer to [link / reference]. Figure 2 , Figure 2 This is a system block diagram of a terminal device provided in an embodiment of this application. The terminal device includes an application layer, a framework and system layer, a kernel layer, and a hardware layer.

[0092] The application layer includes video applications, which users can interact with to select the videos they want to play.

[0093] The framework and system layer includes a decoder, a video processing module, and a graphics subsystem. The decoder is used to decode the video stream of a video application to obtain video frames. Alternatively, the decoder is used to decode the video stream stored in memory to obtain video frames. The video processing module is used to determine the frame variation frequency of each video frame according to the method provided in the embodiments of this application.

[0094] In some embodiments, the framework and system layer further includes at least one of a UI framework and an input subsystem. The UI framework is used to determine the layer change frequency of the UI layer. The input subsystem is used to determine the layer change frequency of the input layer. Here, the UI layer refers to the UI information displayed on the screen. The input layer refers to the touch signals input by the user on the screen. In this case, the graphics subsystem is used to determine the target frequency based on the frame change frequency of the video frames output by the video processing module, the layer change frequency output by the UI framework, and the layer change frequency output by the input subsystem.

[0095] In some embodiments, please refer to Figure 3 The graphics subsystem also acquires video and non-video layers, composites them, and stores the composited image in the display buffer. This allows the kernel layer to transmit the image from the display buffer to the hardware layer, which then displays it for the user to see. In other words, the screen image seen by the user requires three operations: decoding, compositing, and display. Furthermore, the graphics subsystem typically triggers layer compositing via a vertical synchronization signal; the frequency of layer compositing depends on the frequency of the vertical synchronization signal.

[0096] The kernel layer includes the display driver, and the hardware layer includes the screen.

[0097] It should be noted that the inputs for the UI framework and input subsystem may or may not be empty. When the inputs for the UI framework and input subsystem are empty, the video is played based on the frequency of video frame changes. When the inputs for the UI framework and input subsystem are not empty, the video is played based on a target frequency. Furthermore, the screen may or may not support dynamic refresh rate adjustment. If the screen supports dynamic refresh rate adjustment, power consumption can be saved by adjusting the screen's refresh rate; in this case, the video frame change frequency includes a first refresh rate, and the target frequency includes a second refresh rate. If the screen does not support dynamic refresh rate adjustment, power consumption can be saved by adjusting the layer composition frequency; in this case, the video frame change frequency includes a first layer composition frequency, and the target frequency includes a second layer composition frequency.

[0098] The methods for playing videos vary depending on the situation. These will be explained separately below.

[0099] If the input of the UI framework and the input subsystem is empty, then if the screen supports dynamic refresh rate adjustment, the screen refresh rate is adjusted to the first refresh rate through the display driver, so that the screen refreshes the video frame according to the first refresh rate to play the video. If the screen does not support dynamic refresh rate adjustment, the frequency of the vertical synchronization signal is directly adjusted to the first layer composition frequency, so that the graphics subsystem performs layer composition of the video frame according to the first layer composition frequency to play the video.

[0100] If the input of the UI framework and the input subsystem is not empty, then if the screen supports dynamic refresh rate adjustment, the screen refresh rate is adjusted to the second refresh rate through the display driver, so that the screen refreshes the video frame according to the second refresh rate to play the video. If the screen does not support dynamic refresh rate adjustment, the frequency of the vertical synchronization signal is directly adjusted to the second layer composition frequency, so that the graphics subsystem performs layer composition of the video frame according to the second layer composition frequency to play the video.

[0101] The above describes adjusting the frequency of the vertical sync signal when the screen does not support dynamic refresh rate adjustment. In other embodiments, the frequency of the vertical sync signal can also be adjusted when the screen supports dynamic refresh rate adjustment.

[0102] It should be noted that the application scenarios and implementation environments described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, as the application scenarios and implementation environments evolve, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0103] The video playback method provided in the embodiments of this application will now be explained in detail.

[0104] Figure 4 This is a flowchart illustrating a video playback method provided in an embodiment of this application, which is applied to a terminal device. Please refer to... Figure 4 The method includes the following steps.

[0105] Step 401: Obtain the motion information of the current video frame in the target video. This motion information indicates the motion of the current video frame relative to the reference video frame.

[0106] The target video refers to the video that is currently to be played. The target video can be a video provided by a video application on the terminal device, or it can be other videos stored on the terminal device.

[0107] The current video frame comprises multiple image blocks. The motion information of the current video frame includes motion vectors corresponding to these image blocks, which include motion amplitude and motion direction. The motion amplitude is also called the position offset. The motion direction is also called the offset direction.

[0108] It should be noted that among these multiple image patches, there may be some that are not moving; that is, there may be stationary image patches. For stationary image patches, the motion information of the current video frame may include the motion vectors corresponding to these image patches, and the motion vectors corresponding to these image patches are 0. Alternatively, the motion information of the current video frame may not include the motion vectors corresponding to these image patches. The following discussion will focus on the scenario where the motion information of the current video frame includes the motion vectors corresponding to these image patches, and the motion vectors corresponding to these image patches are 0.

[0109] Step 402: Based on the motion information of the current video frame, determine the frame change frequency corresponding to the current video frame. The frame change frequency is less than or equal to the frame rate of the target video.

[0110] There are several ways to determine the frequency of image changes corresponding to the current video frame based on the motion information of the current video frame. Two of them will be introduced below.

[0111] The first method involves determining the motion characteristics of the current video frame based on its motion information, using these characteristics as input to the target network model, and then obtaining the frequency of image changes output by the target network model.

[0112] The current video frame includes multiple image blocks, and the motion features of the current video frame include, but are not limited to, at least one of the following: motion speed, motion region size, motion consistency, and motion duration; wherein, motion speed is the average motion speed of the image blocks in the current video frame that move relative to the reference video frame, motion region size is the total size of the image blocks in the current video frame that move relative to the reference video frame, motion consistency is the degree of difference in the motion direction of the image blocks in the current video frame that move relative to the reference video frame, and motion duration is the average continuous motion duration of the image blocks in the current video frame that move relative to the reference video frame.

[0113] When the motion vector of each image block includes motion amplitude and motion direction, motion speed indicates the average motion amplitude corresponding to the image blocks with motion amplitude greater than 0 in the current video frame, motion region size indicates the total size of the image blocks with motion amplitude greater than 0 in the current video frame, motion consistency indicates the variance of the motion direction corresponding to the image blocks with motion amplitude greater than 0 in the current video frame, and motion duration indicates the average number of consecutive motions corresponding to the image blocks with motion amplitude greater than 0 in the current video frame.

[0114] In some embodiments, the motion amplitude includes horizontal and vertical motion amplitudes. For any image block among the plurality of image blocks, if the horizontal and / or vertical motion amplitude of the image block is greater than 0, then the image block is determined as having a motion amplitude greater than 0. Then, the sum of the squares of the horizontal and vertical motion amplitudes of the image block is determined, and the square root of this sum is taken to obtain the motion offset of the image block. The average motion offset of all image blocks with motion amplitudes greater than 0 in the current video frame is determined as the motion speed of the current video frame. Similarly, the total area of ​​all image blocks with motion amplitudes greater than 0 in the current video frame is determined as the motion region size of the current video frame.

[0115] For example, the current video frame includes four image blocks: image block 1 has a motion amplitude of (0, 0), image block 2 has a motion amplitude of (1, 2), image block 3 has a motion amplitude of (3, 4), and image block 4 has a motion amplitude of (3, 3). Image blocks 2 through 4 are image blocks with motion amplitude values ​​greater than 0. The motion offset of image block 2 is... The motion offset of image block 3 is The motion offset of image block 4 is The average motion offset of image block 2 to image block 4 is (2.24+5+4.24) / 3 = 3.83, which means the motion speed of the current video frame is 3.83.

[0116] In some embodiments, the motion direction includes a horizontal motion direction and a vertical motion direction. For any image block in the current video frame with a motion amplitude greater than 0, the motion angle of that image block is determined based on its horizontal and vertical motion directions. Then, the variance of the motion angles of all image blocks with motion amplitude greater than 0 in the current video frame is determined to obtain the motion consistency of the current video frame.

[0117] For example, the current video frame includes four image blocks. Image block 1 moves in the direction of (0, 0), image block 2 moves in the direction of (0, 1), image block 3 moves in the direction of (1, 0), and image block 4 moves in the direction of (1, 1). Image blocks 2 through 4 have motion amplitudes greater than 0. The motion angle of image block 2 is 90 degrees, the motion angle of image block 3 is 0 degrees, and the motion angle of image block 4 is 45 degrees. The average motion angle of image blocks 2 through 4 is (90 + 0 + 45) / 3 = 45 degrees, and the variance of the motion angle of image blocks 2 through 4 is {(90 - 45)}. 2 +(0-45) 2 +(45-45) 2} / 3 = 1350, meaning the motion consistency of the current video frame is 1350.

[0118] In some embodiments, for any image block in the current video frame, the image block may have motion in the current video frame and may have also motiond in one or more previous video frames. Therefore, the number of consecutive video frames in which the image block has motioned is determined from the current video frame and all video frames preceding it, and this number is taken as the number of consecutive motions of the image block. After determining the number of consecutive motions of all image blocks in the current video frame whose motion amplitude is greater than 0, the average of the number of consecutive motions of these image blocks is determined as the motion duration of the current video frame.

[0119] For example, the current video frame includes four image blocks, where image blocks 2 through 4 have motion amplitudes greater than 0. Assuming the current video frame is the i-th frame in the target video, image block 2 moves in frames i and (i-1) and does not move in frame i-2, so the number of consecutive movements for image block 2 is 2. Image block 3 moves in frames i, (i-1) and (i-2) and does not move in frame i-3, so the number of consecutive movements for image block 3 is 3. Image block 4 moves in frames i and (i-1) and does not move in frame i-2, so the number of consecutive movements for image block 4 is 2. The average number of consecutive movements for image blocks 2 through 4 is (2+3+2) / 3 = 2.33, meaning the duration of motion in the current video frame is 2.33 seconds.

[0120] The target network model mentioned above can be a decision tree model or other types of models.

[0121] The target network model described above is a trained network model. The training process for the target network model includes: acquiring the frame change frequencies of multiple sample videos and the motion information corresponding to each sample video frame in these multiple sample videos; determining the motion features of each sample video frame based on the motion information corresponding to each sample video frame; using the motion features of each sample video frame in these multiple sample videos as input to the initial network model to be trained; using the frame change frequencies of these multiple sample videos as the output of the initial network model; and training the initial network model to obtain the target network model.

[0122] The method for determining the frequency of frame changes in these multiple sample videos includes the following steps:

[0123] (1) For each of the multiple sample videos, the frame rate of the sample video is used as the first candidate frequency, and the frame rate of the sample video is reduced to obtain the second candidate frequency.

[0124] There are several methods to reduce the frame rate of the sample video. As an example, one could use 1 / n of the sample video's frame rate as a second candidate frame rate, where n is an integer greater than 1. Alternatively, one could reduce the sample video's frame rate at a fixed frequency less than the sample video's frame rate to obtain a second candidate frame rate.

[0125] It should be noted that n and the fixed frequency are set empirically; for example, n equals 2. Additionally, the frame rate of the sample video remains constant, meaning that the frame rate of each video segment in the sample video remains consistent.

[0126] (2) Play the sample videos according to the first candidate frequency and the second candidate frequency respectively.

[0127] Based on the above description, embodiments of this application can adjust the screen refresh rate and the frequency of the vertical synchronization signal. If the screen refresh rate is adjusted, the first candidate frequency and the second candidate frequency are used as the screen refresh rate to play the sample video. If the frequency of the vertical synchronization signal is adjusted, the first candidate frequency and the second candidate frequency are used as the frequency of the vertical synchronization signal to play the sample video.

[0128] As an example, if the screen refresh rate is adjusted, the screen refresh rate of the first annotation device is adjusted to the first candidate frequency, and the screen refresh rate of the second annotation device is adjusted to the second candidate frequency. The first annotation device refreshes the video on its own screen according to the first candidate frequency to play the sample video, and the second annotation device refreshes the video on its own screen according to the second candidate frequency to play the sample video.

[0129] Similarly, if the frequency of the vertical synchronization signal is adjusted, the frequency of the vertical synchronization signal of the first annotation device is adjusted to the first candidate frequency, and the frequency of the vertical synchronization signal of the second annotation device is adjusted to the second candidate frequency. The first annotation device synthesizes the layers of video frames in the sample video according to the first candidate frequency to play the sample video, and the second annotation device synthesizes the layers of video frames in the sample video according to the second candidate frequency to play the sample video.

[0130] It should be noted that the first annotation device and the second annotation device are the same model of device, or in other words, the screen parameters or screen model of the first annotation device and the second annotation device are the same. Moreover, the first annotation device and the second annotation device can be the same device or two different devices, and this application embodiment does not limit this.

[0131] (3) Obtain the fluency score result, which indicates whether there is a difference in fluency when the sample video is played at the first candidate frequency and the second candidate frequency.

[0132] In some embodiments, a fluency scoring interface is displayed, which includes fluency Q&A information. In response to the annotator's selection of the fluency Q&A information, a fluency score for the sample video is determined based on the annotator's selection of the fluency Q&A information.

[0133] For example, suppose the sample video played at the first candidate frequency is video A, and the sample video played at the second candidate frequency is video B. The smoothness scoring interface is as follows: Figure 5 As shown, the smoothness scoring interface includes the following smoothness question: "Q: Based on your own experience, which video do you find to be smoother? A. Video A is smoother; B. They are about the same; C. Video B is smoother." If the annotator selects option A, it is determined that the sample video, when played at the first candidate frequency and the second candidate frequency, has a difference in smoothness. If the annotator selects option B or option C, it is determined that the sample video, when played at the first candidate frequency and the second candidate frequency, has no difference in smoothness.

[0134] (4) If the fluency score indicates that there is no difference in the fluency of the sample video, then continue to reduce the frame rate of the sample video to obtain the second candidate frequency again, and return to step (2).

[0135] If the fluency score indicates that there is no difference in fluency for the sample video, it means that the human eye does not perceive a difference, and the impact of reducing the frame rate on the human eye is negligible. In this case, the frame rate of the sample video can be further reduced to obtain a second candidate frequency.

[0136] As an example, 1 / (n+1) of the frame rate of the sample video can be used as the redefined second candidate frame rate. Alternatively, the frame rate of the sample video can be reduced again by a fixed frequency to obtain the redefined second candidate frame rate.

[0137] (5) If the smoothness score indicates that the smoothness of the sample video is different and this is the first time a smoothness score has been performed, then the first candidate frequency is determined as the frame change frequency of the sample video. If the smoothness score indicates that the smoothness of the sample video is different and this is not the first time a smoothness score has been performed, then the second candidate frequency obtained in the previous test is determined as the frame change frequency of the sample video.

[0138] If the fluency score indicates a difference in the fluency of the sample video, it means that the human eye has perceived the difference brought about by the second candidate frequency. If this is the first time a fluency score has been given, it means that the first candidate frequency is the lowest frequency at which the human eye does not perceive a difference; therefore, the first candidate frequency is determined as the frame change frequency of the sample video. If this is not the first time a fluency score has been given, it means that the second candidate frequency obtained in the previous test was the lowest frequency at which the human eye did not perceive a difference; therefore, the second candidate frequency obtained in the previous test is determined as the frame change frequency of the sample video.

[0139] Since the frame change frequency of each sample video is the lowest frequency at which the smoothness of the sample video is not different, and this frequency is less than or equal to the frame rate of the sample video, after training the target network model according to the frame change frequency of the multiple sample videos and the motion information corresponding to each sample video frame in the multiple sample videos, the frame change frequency predicted by the target network model will be less than or equal to the frame rate of the corresponding video. Moreover, the smoothness effect of playing the target video according to the frame change frequency predicted by the target network model is basically no different from the original smoothness effect, and there will be no stuttering.

[0140] The method for determining the motion features of each sample video frame is described above and will not be repeated here.

[0141] The above steps (1)-(5) are the process by which the annotators annotate the frequency of image changes in the sample video. Next, through... Figure 5 This annotation process is illustrated with examples.

[0142] Please refer to Figure 6 The process begins by setting the first candidate refresh rate to the frame rate of the sample video and the second candidate refresh rate to 1 / n of the frame rate, where n = 2. The sample video is then played using both the first and second candidate refresh rates, and a subjective smoothness score is given. If the annotator deems the first candidate refresh rate smoother, the annotation process ends. If this is the first smoothness score, the first candidate frequency is used to determine the frequency of frame changes in the sample video; otherwise, the previously obtained second candidate frequency is used. If the annotator considers both to be similar or the second candidate refresh rate smoother, n = n + 1, and the second candidate refresh rate is updated to 1 / n of the frame rate of the sample video. The process then returns to the steps of playing the sample video using both the first and second candidate refresh rates and giving a subjective smoothness score.

[0143] The second method uses the current video frame and its motion information as input to the target network model to obtain the frequency of image changes output by the target network model.

[0144] In some embodiments, the target network model is a deep neural network model, which includes a feature extraction layer, a feature fusion layer, and a result classification layer. In this case, the current video frame and its motion information are used as input to the target network model to obtain the screen change frequency output by the target network model. This includes: determining the spatial features of the current video frame using the feature extraction layer based on the current video frame; determining the temporal features of the current video frame using the feature extraction layer based on the motion information of the current video frame; fusing the spatial and temporal features of the current video frame, as well as the spatial and temporal features of at least one video frame preceding the current video frame, using the feature fusion layer to obtain fused features; and determining the screen change frequency using the result classification layer based on the fused features.

[0145] Spatial features are used to indicate the spatial characteristics of the current video frame, such as brightness, contrast, and gradient. Temporal features are used to indicate the temporal characteristics of the current video frame, such as motion speed, motion region size, motion consistency, and motion duration.

[0146] Next, through Figure 7 An example is provided to illustrate the process by which a deep neural network model determines the frequency of image changes corresponding to the current video frame.

[0147] Please refer to Figure 7 Assuming the current video frame is the i-th frame in the target video, the motion information of the i-th frame and the i-th frame itself are input to the feature extraction layer. The feature extraction layer extracts the spatial features of the i-th frame from its spatial features and the temporal features from its motion information. A feature fusion layer then fuses the spatial and temporal features of the i-th frame, and also fuses the spatial and temporal features of the (i-1)-th frame to obtain the fused features. Finally, a result classification layer determines the frame change frequency of the i-th frame.

[0148] The target network model described above is a trained network model. The training process of the target network model includes: acquiring the frame change frequency of multiple sample videos and the motion information corresponding to each sample video frame in the multiple sample videos. Each sample video frame and its corresponding motion information are used as input to the initial network model to be trained, and the frame change frequency of the multiple sample videos is used as the output of the initial network model. The initial network model is then trained to obtain the target network model.

[0149] For the relevant content in the second method, please refer to the relevant explanation in the first method above, which will not be repeated here.

[0150] The second method described above directly inputs the current video frame and its motion information into the target network model to determine the frequency of frame changes in the current video frame. This avoids the operation of extracting motion features, and by directly inputting the current video frame and its motion information into the target network model, the fitting ability of the target network model can be fully utilized, making the accuracy of the frame change frequency predicted by the target network model higher.

[0151] In some embodiments, different video frame rates correspond to different network models. Therefore, in the two methods described above, before determining the frame change frequency through the target network model, the target network model can be determined from multiple network models corresponding to the frame rate of the target video, and then the frame change frequency corresponding to the current video frame can be determined through the target network model in the two methods described above.

[0152] In some embodiments, the frame rate of the entire target video may remain constant. In this case, the target network model can be determined directly from multiple network models corresponding to different frame rates. In other embodiments, the frame rates of different video segments in the target video may be different. Therefore, the current frame rate of the target video can be determined, and the target network model can be determined from multiple network models corresponding to different frame rates based on the current frame rate of the target video.

[0153] The process of determining the current frame rate of the target video includes: obtaining the display time of the current video frame and the display time of the previous video frame adjacent to the current video frame, determining the time difference between the display time of the current video frame and the display time of the previous video frame, and determining the current frame rate of the target video based on the time difference.

[0154] The display time of a video frame refers to the actual display time of that video frame during the playback of the target video, and the display time of each video frame is usually carried in the video bitstream.

[0155] Since frame rate refers to the number of video frames per second, and 1 second equals 1000 milliseconds (ms), when determining the current frame rate of the target video based on this time difference, 1000 can be divided by this time difference to obtain the current frame rate of the target video.

[0156] For example, suppose the current video frame is displayed at 33.33ms, the previous video frame is displayed at 16.66ms, and the time difference between the current and previous video frames is 16.66ms. The current frame rate of the target video is 1000 / 16.66 = 60.

[0157] When different frame rates correspond to different network models, the frame rates of the sample videos used to train the initial network model are the same in both of the above methods. When the frame rate of the entire target video remains constant, the frame rate of the target video is the same as the frame rate of the sample videos. When the frame rates of different video segments of the target video are different, the current frame rate of the target video is the same as the frame rate of the sample videos.

[0158] Next, through Figure 8 and Figure 9 The two methods described above will be illustrated with examples.

[0159] Please refer to Figure 8 The decoder obtains the current video frame and its motion information, and outputs these to the video processing module. The video processing module determines the motion characteristics of the current video frame using its motion information. These characteristics include motion speed, motion area size, motion consistency, and motion duration. Then, the video processing module determines the current frame rate of the target video and selects a target decision tree model based on that rate. Furthermore, based on the motion characteristics of the current video frame, the target decision tree model determines the frame change frequency corresponding to that frame and outputs the current video frame and its corresponding frame change frequency.

[0160] Please refer to Figure 9 The decoder obtains the current video frame and its motion information, and outputs these information to the video processing module. The video processing module determines the current frame rate of the target video, selects a target deep neural network model based on this rate, and then, based on the current video frame and its motion information, determines the frame change frequency corresponding to the current video frame using the target deep neural network model, and outputs the frame change frequency corresponding to the current video frame.

[0161] Step 403: Play the target video according to the frame change frequency corresponding to the current video frame.

[0162] In some embodiments, the screen of the terminal device supports dynamic adjustment of the refresh rate, and the screen change frequency includes a first refresh rate; at this time, the process of playing the target video according to the screen change frequency corresponding to the current video frame includes: adjusting the screen refresh rate to the first refresh rate, and refreshing the video screen according to the first refresh rate to play the target video.

[0163] It should be noted that this screen can be the aforementioned LTPO screen, or it can be any other screen that supports dynamic refresh rate adjustment.

[0164] Since the frame rate of the current video frame is less than or equal to the frame rate of the target video, and this frame rate includes the first refresh rate, it can be understood that the first refresh rate is also less than or equal to the frame rate of the target video. Therefore, for the current video frame, the screen refreshes according to the first refresh rate, making the terminal device's screen refresh rate less than or equal to the frame rate of the target video. Furthermore, the corresponding screen refresh rate is dynamically determined based on the motion of each video frame. This allows for dynamic adjustment of the screen refresh rate according to the screen refresh rate corresponding to each video frame. Especially when the video frame is static, the determined screen refresh rate will be much lower than the frame rate of the target video, maximizing the reduction of the screen refresh rate and thus minimizing the power consumption during video playback.

[0165] For example, such as Figure 10 As shown, the target video has a frame rate of 60 FPS, and the display time interval between two adjacent video frames is 16.66 ms. When the video processing module outputs a first refresh rate of 30 Hz, the screen refresh rate is set to 30 Hz. At this time, the display time interval between two adjacent video frames becomes 33.33 ms, reducing the screen refresh rate and consequently reducing power consumption. When the video processing module outputs a first refresh rate of 60 Hz, the screen refresh rate is set to 60 Hz, and the display time interval between two adjacent video frames returns to 16.66 ms.

[0166] In other embodiments, the screen of the terminal device does not support dynamic adjustment of the refresh rate, and the screen change frequency includes the first layer composition frequency; in this case, the process of playing the target video according to the screen change frequency corresponding to the current video frame includes: adjusting the frequency of the vertical synchronization signal of the mobile terminal to the first layer composition frequency, and compositing the layers of the video frames in the target video according to the first layer composition frequency to play the target video.

[0167] Since the frame rate of the current video frame is less than or equal to the frame rate of the target video, and this frame rate includes the first layer composition frequency, it can be understood that the first layer composition frequency is also less than or equal to the frame rate of the target video. Therefore, for the current video frame, the screen image is composed according to the first layer composition frequency, making the screen image composition frequency less than or equal to the frame rate of the target video. Furthermore, the corresponding layer composition frequency is dynamically determined based on the motion of each video frame. This allows for dynamic adjustment of the screen image composition speed according to the layer composition frequency corresponding to each video frame. Especially when the video frame is static, the determined layer composition frequency will be much lower than the frame rate of the target video, maximizing the reduction of the screen image composition speed and thus minimizing the power consumption of video playback.

[0168] For example, such as Figure 11 As shown, the decoder decodes the video stream to obtain decoded frames. The graphics subsystem performs layer composition according to the frequency of the vertical sync signal (VSYNC) to obtain composed frames. The screen refreshes the image according to the refresh rate to obtain displayed frames. (Reference) Figure 11 In the upper part, under normal circumstances, the decoding frequency, layer composition frequency, and display frequency are all consistent. (Reference) Figure 11 In the second half, after the motion speed of a certain video frame slows down, the frequency of layer compositing is reduced, while the decoding and display frequencies remain unchanged. At this point, the speed at which the composite frame is obtained decreases, and the power consumption decreases accordingly.

[0169] The above describes adjusting the screen refresh rate when the terminal device's screen supports dynamic refresh rate adjustment, and adjusting the frequency of the vertical sync signal when the terminal device's screen does not support dynamic refresh rate adjustment. Of course, if the terminal device's screen supports dynamic refresh rate adjustment, the frequency of the vertical sync signal can also be adjusted.

[0170] Based on the above description, in addition to displaying the video frames of the target video, the screen also displays UI information and receives touch signals input by the user. These can all be referred to as layers above the video frames. In other words, there is at least one layer above the video frame. Therefore, the layer change frequency corresponding to at least one layer above the current video frame can be obtained; based on the image change frequency corresponding to the current video frame and the layer change frequency corresponding to that at least one layer, the target frequency is determined; then, the target video is played according to the target frequency.

[0171] The layer change frequency corresponding to at least one layer above the video frame is stored in advance. Furthermore, the response speed of this at least one layer affects the user experience; therefore, the maximum value between the frame change frequency of the current video frame and the layer change frequency of this at least one layer can be determined as the target frequency.

[0172] In some embodiments, the target frequency includes a second refresh rate; in this case, the process of playing the target video at the target frequency includes: adjusting the screen refresh rate to the second refresh rate, and refreshing the video frame on the screen according to the second refresh rate to play the target video.

[0173] In other embodiments, the target frequency includes the second layer synthesis frequency; in this case, the process of playing the target video according to the target frequency includes: adjusting the frequency of the vertical synchronization signal of the mobile terminal to the second layer synthesis frequency, and synthesizing the layers of video frames in the target video according to the second layer synthesis frequency to play the target video.

[0174] The following example illustrates the effects achieved by the method provided in this application.

[0175] Video 1 and Video 2 were acquired. Video 1 has a frame rate of 60 FPS, and Video 2 has a frame rate of 30 FPS. As shown in Table 1, the power consumption of the two videos was tested using the original method, and the results showed that the total power consumption of the two videos was 291.3 kW and 206.76 kW, respectively. Using the method provided in this embodiment, the average refresh rates of the two videos were tested, and the corresponding power consumption of the two videos was 262.3 kW and 202.46 kW, respectively. It can be seen that Video 1 saves 29 kW of power consumption, and Video 2 saves 4.3 kW. Simultaneously, the screen power consumption was also tested, and the screen power consumption of Video 1 saved 15.5 kW, while that of Video 2 saved 4.37 kW.

[0176] Table 1

[0177]

[0178] It should be noted that the data in Table 1 above represents the results of one test. The actual power consumption gain is related to the software and hardware platform and the video content. The data in Table 1 above is only used to represent typical power consumption gains. The embodiments of this application do not limit the power consumption gains obtained.

[0179] As can be seen from Table 1 above, after playing the video according to the method provided in this application embodiment, the average frame rate of the video ultimately viewed by the user is lower than the original frame rate. Furthermore, in order to evaluate the impact of the method provided in this application embodiment on user experience and avoid affecting the user's smoothness experience, the mean opinion score (MOS) of users for Video 1 and Video 2 was also obtained. Please refer to... Figure 12 After playing video 1 at a fixed frame rate of 60 FPS and using the method provided in this embodiment, 15 user subjective MOS scores for video 1 were collected. Please refer to... Figure 13 After playing video 2 at a fixed frame rate of 30 FPS and using the method provided in this embodiment, 11 user subjective MOS scores for video 1 were collected. Figure 12 It can be seen that after playing video 1 at a fixed frame rate, the average user subjective MOS is 4.66; after playing video 1 according to the method of this application embodiment, the average user subjective MOS is 4.64. Figure 13 As can be seen, after playing video 2 at a fixed frame rate, the average subjective MOS value of the user is 4.76. After playing video 2 according to the method of this application embodiment, the average subjective MOS value of the user is 4.77. It is evident that playing video according to the method provided in this application embodiment has a very slight impact on the user experience.

[0180] In summary, this embodiment determines the frame change frequency corresponding to the current video frame by using the motion information of the current video in the target video. This frame change frequency is less than or equal to the frame rate of the target video, and the target video is then played according to this frame change frequency. In other words, during the playback of the target video, the corresponding frame change frequency can be dynamically determined based on the motion of each video frame, and the frame change frequency is less than or equal to the frame rate of the target video, without limiting the frame change frequency to a minimum equal to the target video's frequency. This allows for dynamic adjustment of the screen's frame change speed according to the frame change frequency corresponding to each video frame. Especially when the video frame is static, the determined frame change frequency will be much lower than the frame rate of the target video, maximizing the reduction of the screen's frame change speed and thus minimizing power consumption during video playback. Furthermore, it avoids perceptible stuttering for the user, reduces heat generation on the terminal device, and extends the terminal device's battery life.

[0181] Figure 14 This is a schematic diagram of a video playback device provided in an embodiment of this application. The device can be implemented as part or all of a terminal device by software, hardware, or a combination of both. This terminal device can be the terminal device shown above. See also... Figure 14 The device includes: a motion information acquisition module 1401, a screen change frequency determination module 1402, and a video playback module 1403.

[0182] The motion information acquisition module 1401 is used to acquire motion information of the current video frame in the target video. The motion information indicates the motion of the current video frame relative to the reference video frame of the current video frame.

[0183] The frame change frequency determination module 1402 is used to determine the frame change frequency corresponding to the current video frame based on the motion information of the current video frame. The frame change frequency is less than or equal to the frame rate of the target video.

[0184] The video playback module 1403 is used to play the target video according to the frequency of the screen changes.

[0185] In one possible implementation, the screen change frequency determination module 1402 is specifically used for:

[0186] Based on the motion information of the current video frame, determine the motion characteristics of the current video frame;

[0187] By using motion features as input to the target network model, the frequency of image changes output by the target network model is obtained.

[0188] In one possible implementation, the current video frame includes multiple image blocks, and the motion features include, but are not limited to, at least one of the following: motion speed, motion region size, motion consistency, and motion duration;

[0189] Among them, motion speed is the average motion speed of the image blocks that move relative to the reference video frame in the current video frame, motion area size is the total size of the image blocks that move relative to the reference video frame in the current video frame, motion consistency is the degree of difference in the motion direction of the image blocks that move relative to the reference video frame in the current video frame, and motion duration is the average continuous motion duration of the image blocks that move relative to the reference video frame in the current video frame.

[0190] In one possible implementation, the device further includes:

[0191] The sample acquisition module is used to acquire the frame change frequency of multiple sample videos and the motion information corresponding to each sample video frame in the multiple sample videos;

[0192] The motion feature determination module is used to determine the motion features of each sample video frame based on the motion information corresponding to each sample video frame.

[0193] The model training module is used to take the motion features of each sample video frame in multiple sample videos as the input of the initial network model to be trained, and take the frame change frequency of multiple sample videos as the output of the initial network model to train the initial network model to obtain the target network model.

[0194] In one possible implementation, the screen change frequency determination module 1402 is specifically used for:

[0195] The current video frame and motion information are used as input to the target network model to obtain the frequency of frame changes output by the target network model.

[0196] In one possible implementation, the target network model is a deep neural network model, which includes a feature extraction layer, a feature fusion layer, and a result classification layer.

[0197] The image change frequency determination module 1402 is specifically used for:

[0198] Based on the current video frame, the spatial features of the current video frame are determined through the feature extraction layer, and based on motion information, the temporal features of the current video frame are determined through the feature extraction layer.

[0199] Based on the spatial and temporal features of the current video frame, and the spatial and temporal features of at least one video frame preceding the current video frame, a feature fusion layer is used to fuse them to obtain fused features.

[0200] Based on the fusion features, the frequency of image changes is determined through the result classification layer.

[0201] In one possible implementation, the device further includes:

[0202] The sample acquisition module is used to acquire the frame change frequency of multiple sample videos and the motion information corresponding to each sample video frame in the multiple sample videos;

[0203] The model training module is used to take each sample video frame and the corresponding motion information of each sample video frame as input to the initial network model to be trained, and take the frame change frequency of the multiple sample videos as output to the initial network model to train the initial network model and obtain the target network model.

[0204] In one possible implementation, the sample acquisition module is specifically used for:

[0205] For each of the multiple sample videos, the frame rate of the sample video is used as the first candidate frequency, and the frame rate of the sample video is reduced to obtain the second candidate frequency.

[0206] Play the sample videos according to the first candidate frequency and the second candidate frequency respectively;

[0207] Obtain the fluency score result, which indicates whether there is a difference in fluency when the sample video is played at the first candidate frequency and the second candidate frequency;

[0208] If the fluency score indicates that there is no difference in the fluency of the sample videos, then continue to reduce the frame rate of the sample videos to obtain the second candidate frequency, and return to the step of playing the sample videos according to the first candidate frequency and the second candidate frequency respectively.

[0209] If the smoothness score indicates a difference in the smoothness of the sample videos, then the second candidate frequency obtained in the previous test is determined as the frequency of frame changes in the sample videos.

[0210] In one possible implementation, the device further includes:

[0211] The frame rate determination module is used to determine the current frame rate of the target video;

[0212] The model determination module is used to determine the target network model from multiple network models corresponding to the current frame rate.

[0213] In one possible implementation, the screen of the terminal device supports dynamic adjustment of the refresh rate, and the screen change frequency includes a first refresh rate;

[0214] The video playback module 1403 is specifically used for:

[0215] Adjust the screen refresh rate to the first refresh rate;

[0216] The screen refreshes the video feed according to the first refresh rate to play the target video.

[0217] In one possible implementation, the screen of the terminal device does not support dynamic adjustment of the refresh rate, and the frequency of screen changes includes the composition frequency of the first layer;

[0218] The video playback module 1403 is specifically used for:

[0219] Adjust the frequency of the vertical synchronization signal of the mobile terminal to the synthesis frequency of the first layer;

[0220] The target video is composited based on the first layer's composite frequency to play the target video.

[0221] In one possible implementation, the device further includes:

[0222] The layer change frequency acquisition module is used to acquire the layer change frequency of at least one layer above the current video frame.

[0223] The target frequency determination module is used to determine the target frequency based on the screen change frequency and the layer change frequency corresponding to at least one layer;

[0224] The video playback module 1403 is specifically used for:

[0225] Play the target video at the target frequency.

[0226] In this embodiment, the frame rate of the current video frame is determined by the motion information of the current video in the target video. This frame rate is less than or equal to the frame rate of the target video, and the target video is then played according to this frame rate. In other words, during the playback of the target video, the frame rate of each video frame can be dynamically determined based on its motion, and there is no restriction that the frame rate must be equal to the target video's frame rate. This allows for dynamic adjustment of the screen's frame rate according to the frame rate of each video frame. Especially when the video frame is static, the determined frame rate will be much lower than the target video's frame rate, maximizing the reduction of the screen's frame rate and thus minimizing power consumption during video playback. Furthermore, it avoids perceptible stuttering for the user, reduces heat generation on the terminal device, and extends the device's battery life.

[0227] It should be noted that the video playback device provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the video playback device and the video playback method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0228] This application also provides a computer-readable storage medium including program code, which, when run on a computer, causes the computer to perform the video playback method described above.

[0229] This application also provides a computer program product, including instructions that, when executed on a computer, cause the computer to perform the video playback method described above.

[0230] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital versatile disc (DVD)), or a semiconductor medium (e.g., solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiments of this application can be a non-volatile storage medium; in other words, it can be a non-transient storage medium.

[0231] It should be understood that "multiple" as mentioned herein refers to two or more. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. In addition, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first," "second," etc., are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and the terms "first," "second," etc., do not necessarily imply that they are different.

[0232] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0233] The above descriptions are embodiments provided in this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A video playing method, characterized in that, The method is applied to a terminal device, and comprises: obtaining motion information of a current video frame in a target video, the motion information indicating a motion condition of the current video frame relative to a reference video frame of the current video frame; determining a picture change frequency corresponding to the current video frame based on the motion information of the current video frame, the picture change frequency being less than or equal to a frame rate of the target video; playing the target video according to the picture change frequency.

2. The method of claim 1, wherein, The method further comprises: determining a motion feature of the current video frame based on the motion information of the current video frame; inputting the motion feature into a target network model as an input of the target network model to obtain the picture change frequency output by the target network model.

3. The method of claim 2, wherein, The current video frame comprises a plurality of image blocks, and the motion feature comprises at least one of a motion speed, a motion region size, a motion consistency, and a motion duration. The motion speed is an average motion speed of the image blocks in the current video frame that move relative to the reference video frame, the motion region size is a total size of the image blocks in the current video frame that move relative to the reference video frame, the motion consistency is a difference degree of motion directions of the image blocks in the current video frame that move relative to the reference video frame, and the motion duration is an average continuous motion duration of the image blocks in the current video frame that move relative to the reference video frame.

4. The method of claim 2 or 3, wherein, The method further comprises: obtaining picture change frequencies of a plurality of sample videos and motion information corresponding to each sample video frame in the plurality of sample videos; determining a motion feature of each sample video frame based on the motion information corresponding to the each sample video frame; inputting the motion feature of each sample video frame in the plurality of sample videos into an initial network model to be trained as an input of the initial network model, inputting the picture change frequencies of the plurality of sample videos into the initial network model as an output of the initial network model, training the initial network model to obtain the target network model.

5. The method of claim 1, wherein, The method further comprises: inputting the current video frame and the motion information into the target network model as an input of the target network model to obtain the picture change frequency output by the target network model.

6. The method of claim 5, wherein, The target network model is a deep neural network model, and the deep neural network model comprises a feature extraction layer, a feature fusion layer, and a result classification layer. The method further comprises: determining a spatial domain feature of the current video frame based on the current video frame by using the feature extraction layer, and determining a time domain feature of the current video frame based on the motion information by using the feature extraction layer. The spatial features and the temporal features of the current video frame and the spatial features and the temporal features of at least one video frame before the current video frame are fused by the feature fusion layer to obtain fused features; The result classification layer determines the picture change frequency based on the fused features.

7. The method of claim 5 or 6, wherein, Before the current video frame and the motion information are input into the target network model to obtain the picture change frequency output by the target network model, the method further comprises: Obtaining picture change frequencies of a plurality of sample videos and motion information corresponding to each sample video frame in the plurality of sample videos; Taking each sample video frame and the motion information corresponding to each sample video frame in the plurality of sample videos as input of an initial network model to be trained, taking the picture change frequencies of the plurality of sample videos as output of the initial network model, and training the initial network model to obtain the target network model.

8. The method of claim 4 or 7, wherein, The method further comprises: For each sample video in the plurality of sample videos, taking a frame rate of the sample video as a first candidate frequency, and reducing the frame rate of the sample video to obtain a second candidate frequency; Playing the sample video according to the first candidate frequency and the second candidate frequency respectively; Obtaining a fluency score result indicating whether there is a difference in fluency after the sample video is played according to the first candidate frequency and the second candidate frequency; If the fluency score result indicates that there is no difference in fluency of the sample video, the frame rate of the sample video is continuously reduced to obtain a second candidate frequency again, and the step of playing the sample video according to the first candidate frequency and the second candidate frequency respectively is returned; If the fluency score result indicates that there is a difference in fluency of the sample video, the second candidate frequency obtained last time is determined as the picture change frequency of the sample video.

9. The method of claim 2 or 5, wherein, The method further comprises: Determining a current frame rate of the target video; Based on the current frame rate, determining the target network model from a plurality of network models corresponding to frame rates.

10. The method of any one of claims 1-9, wherein, The screen of the terminal device supports dynamic adjustment of refresh rate, and the picture change frequency comprises a first refresh rate; The playing of the target video according to the picture change frequency comprises: Adjusting the refresh rate of the screen to the first refresh rate; Refreshing the video picture of the screen according to the first refresh rate to play the target video.

11. The method according to any one of claims 1 to 9, wherein The screen of the terminal device does not support dynamic adjustment of refresh rate, and the picture change frequency comprises a first layer synthesis frequency; The playing of the target video according to the picture change frequency comprises: Adjusting the frequency of the vertical synchronization signal of the mobile terminal to the first layer synthesis frequency; Synthesizing the layers of the video frames in the target video according to the first layer synthesis frequency to play the target video.

12. The method of any one of claims 1-11, wherein, Before the target video is played according to the picture change frequency, the method further comprises: Obtaining a layer change frequency corresponding to at least one layer above the current video frame; determine a target frequency based on the picture change frequency and a layer change frequency corresponding to the at least one layer; the playing the target video according to the picture change frequency comprises: playing the target video according to the target frequency.

13. A video playback device, comprising: The device comprises: a motion information acquisition module configured to acquire motion information of a current video frame in a target video, the motion information indicating a motion condition of the current video frame relative to a reference video frame of the current video frame; a picture change frequency determination module configured to determine a picture change frequency corresponding to the current video frame based on the motion information of the current video frame, the picture change frequency being less than or equal to a frame rate of the target video; a video playing module configured to play the target video according to the picture change frequency.

14. The apparatus of claim 13, wherein, The picture change frequency determination module is specifically configured to: determine a motion feature of the current video frame based on the motion information of the current video frame; and input the motion feature into a target network model to obtain the picture change frequency output by the target network model.

15. The apparatus of claim 14, wherein, The current video frame comprises a plurality of image blocks, and the motion feature comprises at least one of the following: motion speed, motion region size, motion consistency, and motion duration. The motion speed is an average motion speed of image blocks in the current video frame that move relative to the reference video frame, the motion region size is a total size of the image blocks in the current video frame that move relative to the reference video frame, the motion consistency is a difference degree of motion directions of the image blocks in the current video frame that move relative to the reference video frame, and the motion duration is an average continuous motion duration of the image blocks in the current video frame that move relative to the reference video frame.

16. The apparatus of claim 14 or 15, wherein, The device further comprises: a sample acquisition module configured to acquire picture change frequencies of a plurality of sample videos and motion information corresponding to each sample video frame in the plurality of sample videos; a motion feature determination module configured to determine a motion feature of each sample video frame based on the motion information corresponding to the sample video frame; a model training module configured to input the motion feature of each sample video frame in the plurality of sample videos into an initial network model to be trained, input the picture change frequencies of the plurality of sample videos as an output of the initial network model, and train the initial network model to obtain the target network model.

17. The apparatus of claim 13, wherein, The picture change frequency determination module is specifically configured to: input the current video frame and the motion information into the target network model to obtain the picture change frequency output by the target network model.

18. The apparatus of claim 17, wherein, The target network model is a deep neural network model, and the deep neural network model comprises a feature extraction layer, a feature fusion layer, and a result classification layer. The picture change frequency determination module is specifically configured to: determine a spatial domain feature of the current video frame based on the current video frame by using the feature extraction layer, and determine a time domain feature of the current video frame based on the motion information by using the feature extraction layer; and The spatial feature and the temporal feature of the current video frame and the spatial feature and the temporal feature of at least one video frame before the current video frame are fused by the feature fusion layer to obtain a fused feature; The result classification layer is used to determine the picture change frequency based on the fused feature.

19. The apparatus of claim 17 or 18, wherein, The device further comprises: a sample acquisition module configured to acquire picture change frequencies of a plurality of sample videos and motion information corresponding to each sample video frame in the plurality of sample videos; a model training module configured to train an initial network model by taking each sample video frame and the motion information corresponding to each sample video frame in the plurality of sample videos as input and taking the picture change frequencies of the plurality of sample videos as output, to obtain the target network model.

20. The apparatus of claim 16 or 19, wherein, The sample acquisition module is specifically configured to: for each sample video in the plurality of sample videos, take the frame rate of the sample video as a first candidate frequency, and reduce the frame rate of the sample video to obtain a second candidate frequency; play the sample video according to the first candidate frequency and the second candidate frequency respectively; acquire a fluency score result indicating whether there is a difference in fluency after the sample video is played according to the first candidate frequency and the second candidate frequency; if the fluency score result indicates that there is no difference in fluency of the sample video, continue to reduce the frame rate of the sample video to obtain a second candidate frequency again, and return to the step of playing the sample video according to the first candidate frequency and the second candidate frequency respectively; if the fluency score result indicates that there is a difference in fluency of the sample video, determine the second candidate frequency obtained last time as the picture change frequency of the sample video.

21. The apparatus of claim 14 or 17, wherein, The device further comprises: a frame rate determination module configured to determine a current frame rate of the target video; a model determination module configured to determine the target network model from a plurality of network models corresponding to frame rates based on the current frame rate.

22. The apparatus of any one of claims 13-21, wherein, The screen of the terminal device supports dynamic adjustment of refresh rate, and the picture change frequency includes a first refresh rate; The video playing module is specifically configured to: adjust the refresh rate of the screen to the first refresh rate; refresh the video picture of the screen according to the first refresh rate to play the target video.

23. The apparatus of any one of claims 13-21, wherein, The screen of the terminal device does not support dynamic adjustment of refresh rate, and the picture change frequency includes a first layer synthesis frequency; The video playing module is specifically configured to: adjust the frequency of a vertical synchronization signal of the mobile terminal to the first layer synthesis frequency; synthesize the layers of the video frames in the target video according to the first layer synthesis frequency to play the target video.

24. The apparatus of any one of claims 13-23, wherein, The device further comprises: a layer change frequency acquisition module configured to acquire layer change frequencies corresponding to at least one layer on the upper layer of the current video frame; a target frequency determination module configured to determine a target frequency based on the picture change frequency and the layer change frequencies corresponding to the at least one layer; The video playing module is specifically configured to: In accordance with the target frequency, the target video is played.

25. A terminal device, comprising: The terminal device comprises a processor coupled with a memory, the memory being configured to store programs or instructions, which, when executed by the processor, cause the terminal device to perform the method of any one of claims 1-12.

26. A computer-readable storage medium, characterized in that, A computer program product comprising program code which, when run on a computer, causes the computer to perform the method of any one of claims 1-12.

27. A computer program product, characterised in that, A computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1-12.