Video optimization method, device, equipment and storage medium
By adjusting the current video frame according to the motion characteristics of the previous frame and global image characteristics during video playback, and performing feature adjustments in local areas, the consistency problem between video frames is solved, and the adaptive dynamic optimization of the video is achieved, improving user experience.
Patent Information
- Application Number
- CN202410947344.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-07-16
AI Technical Summary
Existing video optimization technology is difficult to achieve temporal consistency between video frames, resulting in flickering or unnatural transition effects in the generated video, making it impossible to adapt to dynamic optimization.
By adjusting according to the motion characteristics and global image characteristics of the previous video frame of the current video frame, the time dimension is processed, and the characteristics are adjusted in the local area to generate the target video frame to achieve adaptive dynamic optimization.
It improves the adaptive dynamic optimization capabilities of video, reduces visual mutations and flickers, and improves user satisfaction and video stream coherence.
Smart Images

Figure CN118509646B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, in particular to the field of video frame technology, and specifically to a video optimization method, apparatus, device and storage medium. Background Art
[0002] With the rapid development of Internet technology, video streaming and playback has become a daily network behavior. High definition, no buffering, and fast loading have become basic expectations of users. In order to meet these expectations, a variety of video optimization technologies have emerged.
[0003] A common technical solution is to use a deep learning model to directly learn the mapping relationship from low-resolution input to high-resolution output. These methods usually involve a large amount of parameter training and require large-scale high-quality training data sets. Although these methods have achieved certain success in improving video resolution, they often ignore the temporal consistency between video frames, making it difficult to achieve adaptive dynamic optimization of videos, resulting in the generated videos to have visual flickering or unnatural transition effects. Summary of the invention
[0004] The present application provides a video optimization method, apparatus, device and storage medium to achieve adaptive dynamic optimization of videos and improve user satisfaction.
[0005] According to one aspect of the present application, a video optimization method is provided, the method comprising:
[0006] According to the motion features of a previous video frame of the current video frame and the previous global image features, the current video frame is adjusted to obtain a first video frame;
[0007] Performing time dimension processing on the first video frame to obtain a second video frame;
[0008] Adjusting the current local image features of the current local area of the second video frame to obtain a target video frame;
[0009] The target video frame is played.
[0010] According to another aspect of the present application, a video optimization device is provided, the device comprising:
[0011] A video frame adjustment module, used to adjust the current video frame according to the motion characteristics of the previous video frame and the previous global image characteristics of the current video frame to obtain a first video frame;
[0012] A video frame processing module, used for performing time dimension processing on the first video frame to obtain a second video frame;
[0013] A feature adjustment module, used for adjusting the current local image feature of the current local area of the second video frame to obtain a target video frame;
[0014] The video playing module is used to play the target video frame.
[0015] According to another aspect of the present application, an electronic device is provided, the electronic device comprising:
[0016] one or more processors;
[0017] A memory for storing one or more programs;
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement any one of the video optimization methods provided in the embodiments of the present application.
[0019] According to another aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, any one of the video optimization methods provided in the embodiments of the present application is implemented.
[0020] The present application adjusts the current video frame according to the motion features of the previous video frame and the previous global image features of the current video frame to obtain a first video frame; performs time dimension processing on the first video frame to obtain a second video frame; adjusts the current local image features of the current local area of the second video frame to obtain a target video frame; and plays the target video frame. The above technical solution can achieve adaptive dynamic optimization of the video by optimizing the current video frame to be played during the video playback process, which helps to improve user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a flow chart of a video optimization method provided according to Embodiment 1 of the present application;
[0022] Figure 2 is a flow chart of a video optimization method provided according to Embodiment 2 of the present application;
[0023] Figure 3 is a structural schematic diagram of a video optimization device provided according to Embodiment 3 of the present application;
[0024] Figure 4 It is a structural schematic diagram of an electronic device for implementing the video optimization method of an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] In addition, it should be noted that in the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of relevant data such as current video frames and motion features are in compliance with the relevant laws and regulations and do not violate public order and good morals.
[0028] Embodiment 1
[0029] Figure 1 This is a flow chart of a video optimization method provided according to the first embodiment of the present application. This embodiment is applicable to the case of adaptive dynamic optimization of the playback of the target video, and can be executed by a video optimization device. The video optimization device can be implemented in the form of hardware and / or software. The video optimization device can be configured in a computer device, such as a server. Figure 1 As shown, the method includes:
[0030] S110 . Adjust the current video frame according to the motion features of a previous video frame and the previous global image features of the current video frame to obtain a first video frame.
[0031] Among them, the current video frame refers to the current frame in the video sequence being processed, and is the frame that needs to be adjusted or processed during the video playback process. The previous video frame refers to the frame before the current video frame. Motion features are features used to describe the movement state of pixels in time, and may include at least one of motion direction and motion intensity. The previous global image feature refers to the potential feature that describes the content or structure of the previous video frame, usually including color distribution, texture features, edge information, etc., which is used to analyze and process the video frame as a whole. The first video frame refers to the current video frame after the global image feature is adjusted.
[0032] Optionally, based on an optical flow algorithm, a motion feature of a previous video frame of the current video frame is determined; and according to the motion feature of the previous video frame and a previous global image feature, a current global image feature of the current video frame is adjusted to obtain a first video frame.
[0033] The optical flow algorithm refers to an algorithm for calculating the motion vector of each pixel in the current frame image between two frames; generally, the motion vector of the pixel is calculated by comparing the pixel intensity between adjacent frames. The current global image feature refers to the global image feature pre-set by the current frame itself during the target video playback process.
[0034] S120: Perform time dimension processing on the first video frame to obtain a second video frame.
[0035] The time dimension processing refers to the time sequence processing of the video frame. The second video frame refers to the first video frame processed by the time dimension.
[0036] Optionally, the current global image features of the first video frame are processed in terms of time dimension to obtain candidate global image features; the candidate global image features are integrated with the first video frame to obtain a second video frame.
[0037] The current global image feature refers to a potential feature describing the content or structure of the first video frame, which usually includes color distribution, texture features, edge information, etc., and is used to analyze and process the video frame as a whole. The candidate global image feature refers to a potential feature describing the content or structure of the first video frame obtained by processing the current global image feature in the time dimension.
[0038] S130: Adjust the current local image features of the current local area of the second video frame to obtain a target video frame.
[0039] The current local area refers to an area in the second video frame where pixels have obvious differences, and may include at least one of a high contrast area and a high detail area, etc. The target video frame refers to a video frame for playback obtained after a series of optimizations are performed on the current video frame.
[0040] Optionally, determine the current local area of the second video frame, and determine the current local image features of the current layout area; select an area corresponding to the current local area from the previous video frame as the previous local area, and determine the previous local image features of the previous local area; compare the previous local image features with the current local image features to obtain a feature comparison result; adjust the current local image features based on the feature comparison results to obtain a target video frame.
[0041] Among them, the current local image feature refers to the image feature in the current local area, which may include color distribution, texture, edge, etc. The previous local area refers to the area in the previous video frame that corresponds to the current local area, which is used for comparison or other processing with the current local area. The previous local image feature refers to the image feature of the corresponding area in the previous video frame, which is similar to the current local image feature and may include color, texture, edge, etc. The feature comparison result refers to the result obtained by comparing the previous local image feature with the current local image feature, which may include at least one of the measurement indicators such as similarity and difference.
[0042] It should be noted that adjusting the current local image features may include at least one of color adjustment, contrast adjustment, brightness adjustment, sharpening, blurring, noise removal, edge enhancement, texture enhancement, and shape transformation.
[0043] S140: Play the target video frame.
[0044] Specifically, after the target video frame is determined, a normal playback operation may be performed on the target video frame.
[0045] In an optional implementation, the real-time network status of the target video during playback and the real-time device performance of the target device are detected in real time; the target device refers to the terminal device currently used to play the target video; according to the real-time network status and the real-time device performance, the initial playback parameters of the target video are adjusted to obtain the target playback parameters of the target video frame; accordingly, the target video frame can be played according to the target playback parameters.
[0046] Among them, the real-time network status refers to the network status monitored in real time during the playback of the target video, which may include network indicators such as bandwidth, delay, and packet loss rate. Real-time device performance refers to the hardware performance status monitored in real time when the target device is playing the video, which may include the utilization of resources such as CPU (Central Processing Unit), GPU (Graphics Processing Unit), memory, and battery status. Initial playback parameters refer to parameters that affect the quality and performance of video playback, which may include at least one of diffusion depth and decoding speed. Target playback parameters refer to playback parameters obtained after adjustment based on real-time network status and real-time device performance, and are used to optimize video playback quality and performance.
[0047] For example, the optimization of the two parameters of diffusion step number and decoding speed is taken as an example; according to the real-time network status and real-time device performance, the initial playback parameters of the target video are adjusted to obtain the target playback parameters of the target video frame, which can be achieved by the following formula:
[0048]
[0049] Among them, round refers to the rounding function, which is used to ensure that the calculation results of S and V are integers. S refers to the number of diffusion steps. V refers to the decoding speed. It is a sensitivity coefficient, which is used to indicate the system's response sensitivity to changes in network conditions. By adjusting this sensitivity coefficient, the speed and degree of the system's adaptation to network changes can be controlled. N refers to the real-time network status indicator. Refers to the baseline value of the network status in the initial playback parameters. It is a sensitivity coefficient, which is used to indicate the system's response sensitivity to changes in device performance. By adjusting this sensitivity coefficient, the speed and degree of the system's adaptation to network changes can be controlled. P refers to the real-time device performance indicator. Refers to the baseline value of device performance in the initial playback parameters.
[0050] It is understandable that the dynamic adjustment mechanism based on real-time data enables the video stream processing system to flexibly adapt to changes in the network and equipment, optimize video quality, and improve user experience; through real-time feedback adjustment, the system can automatically adjust the processing strategy under different operating conditions to ensure that the video content is presented to the user with the best possible quality, while taking into account the effective use of network resources and the processing power of the terminal device. In addition, by applying the rounding function to the calculation results of S and V, the practical applicability of these parameters is ensured.
[0051] Optionally, before playing the target video, the current network status of the target video and the current device performance of the target device may be detected; and initial playback parameters of the target video may be determined based on the current network status and the current device performance.
[0052] For example, taking the two parameters of diffusion depth and decoding detail level as an example, the initial playback parameters of the target video are determined according to the current network status and the current device performance, which can be determined in the following manner:
[0053]
[0054] in, Refers to diffusion depth. BW is used to indicate the current network status and refers to the maximum data rate that can be used for video data transmission under the current network conditions for playing the target video. It refers to the bandwidth threshold, which is a preset parameter used to map the network bandwidth to a reasonable diffusion depth range. It represents the expected or ideal data transmission efficiency of the system under a specific network bandwidth. It refers to the maximum possible value of the diffusion depth, which defines the upper limit of the highest diffusion depth that the system can handle, ensuring that the algorithm runs within the hardware capabilities. Refers to the level of decoding details. CP is used to indicate the current device performance. It refers to the computing power indicator of the terminal device, measured in billions of floating-point operations per second, and is used to measure the ability of the terminal device to process video data. It refers to the computing power threshold, which is a preset parameter used to map the computing power of the terminal device to the range of decoding detail levels. It reflects the optimal decoding detail level that the system can support under a specific computing power. Refers to the maximum possible value of the decoding detail level, defines the upper limit of the decoding detail level that the system can handle, and ensures that the algorithm runs within the hardware capability. min() and max() refer to the minimum and maximum value functions, which are used to ensure that the calculated and The value will not exceed the reasonable range.
[0055] It can be understood that by adaptively adjusting the video playback parameters according to network conditions and device performance, the flexibility and robustness of the video transmission and playback system are significantly improved, enabling it to quickly adapt to new conditions when the network fluctuates or device performance changes, and maintain high-quality output of video content. In addition, by limiting the parameters within a reasonable range, the system avoids excessive computing load or data transmission congestion caused by improper parameter settings, further ensuring smooth playback and efficient processing of video streams.
[0056] The embodiment of the present application adjusts the current video frame according to the motion features of the previous video frame of the current video frame and the previous global image features to obtain a first video frame; performs time dimension processing on the first video frame to obtain a second video frame; adjusts the current local image features of the current local area of the second video frame to obtain a target video frame; and plays the target video frame. The above technical solution can achieve adaptive dynamic optimization of the video by optimizing the current video frame to be played during the video playback process, which helps to improve user satisfaction.
[0057] Embodiment 2
[0058] Figure 2 This is a flow chart of a video optimization method provided in accordance with the second embodiment of the present application. Based on the technical solutions of the above embodiments, this embodiment refines "adjusting the current video frame according to the motion features of the previous video frame of the current video frame and the previous global image features to obtain the first video frame" into "calculating the gradient of the motion features of the previous video frame of the current video frame and the previous global image features to obtain the feature gradient data of the previous video frame; adjusting the current global image features of the current video frame according to the feature gradient data and the previous global image features to obtain the first video frame". It should be noted that for the parts not described in detail in the embodiments of the present application, please refer to the relevant statements of other embodiments. Figure 2 As shown, the method includes:
[0059] S210 , performing gradient calculation on motion features of a previous video frame and previous global image features of the current video frame to obtain feature gradient data of the previous video frame.
[0060] Among them, gradient calculation refers to calculating the rate of change of an image or feature in space. Feature gradient data refers to the data obtained after gradient calculation of image features, which reflects the change of the image or feature in space.
[0061] S220: Adjust the current global image feature of the current video frame according to the feature gradient data and the previous global image feature to obtain a first video frame.
[0062] Optionally, performing gradient calculation on the motion features of the previous video frame and the previous global image features of the current video frame to obtain feature gradient data of the previous video frame; adjusting the current global image features of the current video frame according to the feature gradient data and the previous global image features to obtain the first video frame can be achieved by the following formula:
[0063]
[0064] in, It refers to the current global image feature of the current video frame. The global image feature is an internal representation of the current video frame during processing or generation, and carries important information and details of the video frame. It refers to the previous global image feature of the previous video frame. The global image feature is an internal representation of the current video frame being processed or generated, and carries important information and details of the video frame. Alpha is a learning rate parameter, which is used to control the influence of motion features on the update of latent features; a higher learning rate means that motion information plays a greater role in updating latent features, while a lower learning rate weakens this influence. grand() refers to the gradient function, which is used to calculate the gradient of motion features and the previous global image feature. This gradient indicates how to adjust the global image feature to better reflect the motion changes of the video content. It refers to the motion characteristics at time t, which is usually extracted by the optical flow algorithm; the optical flow algorithm can estimate the pixel motion between video frames and provide detailed information on the direction and intensity of the motion.
[0065] It can be understood that by deeply analyzing the intrinsic characteristics of video content, namely motion features, the working mode of video processing algorithms can be dynamically adjusted to produce high-quality video output in a variety of different scenarios and conditions; this method not only improves the visual effect of the video, but also provides new ideas and possibilities for the development of video coding and decoding technology.
[0066] S230: Perform time dimension processing on the first video frame to obtain a second video frame.
[0067] Optionally, the current global image features of the first video frame are filtered in the time dimension to obtain candidate global image features of the first video frame; the candidate global image features are integrated with the first video frame to obtain a second video frame.
[0068] The candidate global image features refer to the current global image features after filtering.
[0069] Exemplarily, the second video frame may be determined by the following formula:
[0070]
[0071] in, Refers to the second video frame, which represents the video quality output at time point t. It is a video frame after time perception processing, which reflects the optimized continuity and detail consistency. intergrate() is an integration function that integrates the candidate global image features obtained after filtering with the current global image features to generate the final video frame; this step is to concretize the processing results of the time dimension to each frame, ensuring the improvement of video quality. Refers to the current global image features of the first video frame. Filter(T) represents a filter applied in the time dimension to enhance the continuity between video frames. This filter considers the temporal relationship between consecutive frames to smooth the transition and reduce inter-frame breaks; T represents a time window or time interval, which is used to consider the temporal relationship between consecutive frames in a video frame sequence.
[0072] It is understandable that in video stream processing, especially in videos containing fast motion or scene changes, there may be large differences between frames. If this difference is not handled properly, it will cause perceived freezes or flickers during viewing, affecting the viewing experience. Using information in the time dimension to guide the generation of video frames ensures the coherence of the video stream and the natural transition of visual effects. In addition, by applying filters in the time dimension, a smooth transition effect can be created between consecutive frames to reduce visual mutations. This filtering process not only focuses on the quality of a single frame, but more importantly, considers the relationship between frames to ensure the consistency and smoothness of the entire video stream.
[0073] S240: Adjust the current local image features of the current local area of the second video frame to obtain a target video frame.
[0074] Optionally, determine the current local area of the second video frame; select an area corresponding to the current local area from the previous video frame as the previous local area, and determine the previous local image features of the previous local area; perform weighted processing on the previous local image features and the current local image features to obtain feature difference values; adjust the current local image features according to the feature difference values to obtain the target video frame.
[0075] The feature difference value refers to the difference value between two local image features obtained by weighted processing, which reflects the degree of change of the local area between two moments or frames.
[0076] Exemplarily, the characteristic difference value can be determined by the following formula:
[0077]
[0078] Among them, SW refers to the feature difference value, which is a quantitative indicator used to measure the structural optimization effect of the video frame, especially in the processing of key structural areas. sum() is a summation function used to calculate the sum of all elements in the weight matrix, or the sum of weighted differences. abs() is an absolute value function used to calculate the absolute value of the difference between the previous local image feature and the current local image feature to ensure the non-negativity of the difference measure. C refers to the current local image feature. Refers to the previous local image feature. W refers to the structural weight matrix, which is used to emphasize the key structural areas in the video frame. This matrix is dynamically adjusted according to the specific features of the video frame so that these key areas can be focused on during the optimization process.
[0079] It can be understood that by introducing the structural weight matrix, the key structural areas in the video frame can be identified and focused on; by accurately processing the key structural areas in the video, the video quality is significantly improved; this method not only enhances the visual effect of the video frame, but also effectively reduces visual interference and artifacts by maintaining the structural consistency between frames, providing viewers with a smoother and more comfortable viewing experience. SW, as a quantitative indicator for evaluating this optimization effect, can effectively guide the video processing algorithm to adjust its optimization strategy to minimize the visual differences in the key structural areas.
[0080] S250: Play the target video frame.
[0081] In an optional implementation, viewing feedback information of the viewers is collected in real time, and the viewing feedback information is analyzed to obtain a video adjustment strategy for the current video frame; the video adjustment strategy includes an adjustment strategy for video clarity, loading speed, and freeze frequency; according to the adjustment strategy, the current video frame is adjusted to obtain a target video frame.
[0082] The viewer refers to the user who is currently watching the target video. Feedback refers to the feedback on the viewing experience provided by the user or automatically collected through technical means when watching the target video, which may include information on the flow, cleanliness, loading speed, etc. of the video playback. The video adjustment strategy refers to the adjustment plan for the current video frame based on the analysis results of the viewing feedback information, which may include strategies such as adjusting the video clarity, loading speed, and freeze frequency.
[0083] Optionally, the target adjustment strategy can be determined by the following formula:
[0084]
[0085] Adjustments refers to adjustment decisions based on feedback, which includes a series of adjustment measures or parameter changes, aiming to optimize the encoding and decoding process and final quality of the video. E refers to video processing parameters, which may include at least one of the diffusion steps and decoding speed. Refers to the analysis results of decoding feedback and user experience feedback. This analysis process covers multi-dimensional feedback from technical level to user satisfaction, including but not limited to encoding and decoding efficiency, video playback quality, loading time, and user viewing experience. Adjust() refers to the adjustment function, which is used to dynamically adjust video processing parameters based on the input feedback analysis data to respond to identified problems or optimization needs.
[0086] It should be noted that The process is a key link in the codec feedback loop. It converts feedback data into valuable insights, pointing out problems or room for improvement in the video processing process. This analysis is not only based on quantitative technical indicators, but also includes an assessment of user satisfaction to ensure a balance between technical optimization and user needs.
[0087] Exemplarily, taking the video processing parameters as diffusion steps and decoding speed as an example, the target adjustment strategy can also be determined by the following formula:
[0088]
[0089] Among them, S refers to the number of diffusion steps. V refers to the decoding speed. Adjust() refers to the adjustment function, which updates the number of diffusion steps and decoding speed according to the feedback analysis results.
[0090] It can be understood that, through a structured feedback collection, analysis and adjustment process, the video processing system can dynamically adapt to environmental changes and user needs and continuously optimize the encoding and decoding quality of the video content.
[0091] The embodiment of the present application obtains feature gradient data of the previous video frame by performing gradient calculation on the motion features of the previous video frame and the previous global image features of the current video frame; adjusts the current global image features of the current video frame according to the feature gradient data and the previous global image features to obtain a first video frame; performs time dimension processing on the first video frame to obtain a second video frame; adjusts the current local image features of the current local area of the second video frame to obtain a target video frame; and plays the target video frame. The above technical solution finely adjusts the global image features by the motion features of the previous video frame and the previous global image features to reflect the motion features of the actual video content, thereby maintaining motion consistency with the previous and next frames when generating a new video frame.
[0092] Embodiment 3
[0093] Figure 3 This is a schematic diagram of the structure of a video optimization device provided in accordance with the third embodiment of the present application, which can be applied to the case of adaptive dynamic optimization of the playback of the target video. The video optimization device can be implemented in the form of hardware and / or software, and the video optimization device can be configured in a computer device, such as a server. Figure 3 As shown, the device comprises:
[0094] The video frame adjustment module 310 is used to adjust the current video frame according to the motion characteristics of the previous video frame and the previous global image characteristics of the current video frame to obtain a first video frame;
[0095] The video frame processing module 320 is used to perform time dimension processing on the first video frame to obtain a second video frame;
[0096] The feature adjustment module 330 is used to adjust the current local image feature of the current local area of the second video frame to obtain a target video frame;
[0097] The video playing module 340 is used to play the target video frame.
[0098] The embodiment of the present application adjusts the current video frame according to the motion features of the previous video frame of the current video frame and the previous global image features to obtain a first video frame; performs time dimension processing on the first video frame to obtain a second video frame; adjusts the current local image features of the current local area of the second video frame to obtain a target video frame; and plays the target video frame. The above technical solution can achieve adaptive dynamic optimization of the video by optimizing the current video frame to be played during the video playback process, which helps to improve user satisfaction.
[0099] Optionally, the video frame adjustment module 310 is specifically configured to:
[0100] Performing gradient calculation on the motion features of the previous video frame and the previous global image features of the current video frame to obtain feature gradient data of the previous video frame;
[0101] According to the feature gradient data and the previous global image feature, the current global image feature of the current video frame is adjusted to obtain a first video frame.
[0102] Optionally, the video frame processing module 320 is specifically configured to:
[0103] Performing filtering processing on the current global image feature of the first video frame in the time dimension to obtain a candidate global image feature of the first video frame;
[0104] The candidate global image features are integrated with the first video frame to obtain a second video frame.
[0105] Optionally, the feature adjustment module 330 is specifically configured to:
[0106] determining a current local area of a second video frame;
[0107] Selecting a region corresponding to the current local region from a previous video frame as a previous local region, and determining a previous local image feature of the previous local region;
[0108] Perform weighted processing on the previous local image feature and the current local image feature to obtain a feature difference value;
[0109] According to the feature difference value, the current local image feature is adjusted to obtain the target video frame.
[0110] Optionally, the device further includes: a real-time parameter adjustment module, used to:
[0111] Real-time detection of the real-time network status of the target video during playback and the real-time device performance of the target device; the target device refers to the terminal device currently used to play the target video;
[0112] According to the real-time network status and the real-time device performance, the initial playback parameters of the target video are adjusted to obtain the target playback parameters of the target video frame;
[0113] Accordingly, the video playback module 340 is also used for:
[0114] The target video frame is played according to the target playback parameters.
[0115] Optionally, the device further includes: a user feedback module, configured to:
[0116] Collect the viewing feedback information of the viewers in real time, analyze the viewing feedback information, and obtain the video adjustment strategy of the current video frame; the video adjustment strategy includes the adjustment strategy of the video clarity, loading speed and freeze frequency;
[0117] According to the adjustment strategy, the current video frame is adjusted to obtain the target video frame.
[0118] The video optimization device provided in the embodiments of the present application can execute the video optimization method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects for executing each video optimization method.
[0119] Embodiment 4
[0120] Figure 4 4 is a schematic diagram of the structure of an electronic device 410 for implementing the video optimization method of an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0121] like Figure 4As shown, the electronic device 410 includes at least one processor 411, and a memory connected to the at least one processor 411 in communication, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 to the random access memory (RAM) 413. In RAM413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, ROM412 and RAM413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.
[0122] Multiple components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0123] The processor 411 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 411 performs the various methods and processes described above, such as a video optimization method.
[0124] In some embodiments, the video optimization method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the video optimization method described above may be performed. Alternatively, in other embodiments, the processor 411 may be configured as a video optimization method in any other appropriate manner (e.g., by means of firmware).
[0125] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0126] The computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable video optimization device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0127] In the context of the present application, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0128] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0129] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0130] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0131] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.
[0132] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A video optimization method, characterized in that: include: According to the motion features of a previous video frame of the current video frame and the previous global image features, the current video frame is adjusted to obtain a first video frame; Performing time dimension processing on the first video frame to obtain a second video frame; Adjusting the current local image features of the current local area of the second video frame to obtain a target video frame; Playing the target video frame; The step of adjusting the current video frame according to the motion features of a previous video frame and the previous global image features of the current video frame to obtain the first video frame includes: Performing gradient calculation on the motion features of a previous video frame and the previous global image features of the current video frame to obtain feature gradient data of the previous video frame; Adjusting the current global image feature of the current video frame according to the feature gradient data and the previous global image feature to obtain a first video frame; The performing time dimension processing on the first video frame to obtain a second video frame includes: Performing filtering processing on the current global image feature of the first video frame in a time dimension to obtain candidate global image features of the first video frame; Integrating the candidate global image feature with the first video frame to obtain a second video frame; The step of adjusting the current local image features of the current local area of the second video frame to obtain the target video frame includes: determining a current local area of the second video frame; Selecting a region corresponding to the current local region from the previous video frame as a previous local region, and determining a previous local image feature of the previous local region; Performing weighted processing on the previous local image feature and the current local image feature to obtain a feature difference value; The current local image feature is adjusted according to the feature difference value to obtain a target video frame.
2. The method according to claim 1, characterized in that The method further comprises: Real-time detection of the real-time network status of the target video during playback and the real-time device performance of the target device; the target device refers to the terminal device currently used to play the target video; According to the real-time network status and the real-time device performance, the initial playback parameters of the target video are adjusted to obtain the target playback parameters of the target video frame; Accordingly, playing the target video frame includes: The target video frame is played according to the target playback parameter.
3. The method according to claim 1, characterized in that The method further comprises: Collecting viewing feedback information from viewers in real time, and analyzing the viewing feedback information to obtain a video adjustment strategy for the current video frame; the video adjustment strategy includes an adjustment strategy for video clarity, loading speed, and freeze frequency; According to the adjustment strategy, the current video frame is adjusted to obtain a target video frame.
4. A video optimization device, characterized in that: include: A video frame adjustment module, used to adjust the current video frame according to the motion characteristics of the previous video frame and the previous global image characteristics of the current video frame to obtain a first video frame; A video frame processing module, used for performing time dimension processing on the first video frame to obtain a second video frame; A feature adjustment module, used for adjusting the current local image feature of the current local area of the second video frame to obtain a target video frame; A video playing module, used for playing the target video frame; Wherein, the video frame adjustment module is specifically used for: Performing gradient calculation on the motion features of a previous video frame and the previous global image features of the current video frame to obtain feature gradient data of the previous video frame; Adjusting the current global image feature of the current video frame according to the feature gradient data and the previous global image feature to obtain a first video frame; Wherein, the video frame processing module is specifically used for: Performing filtering processing on the current global image feature of the first video frame in a time dimension to obtain candidate global image features of the first video frame; Integrating the candidate global image feature with the first video frame to obtain a second video frame; Wherein, the feature adjustment module is specifically used for: determining a current local area of the second video frame; Selecting a region corresponding to the current local region from the previous video frame as a previous local region, and determining a previous local image feature of the previous local region; Performing weighted processing on the previous local image feature and the current local image feature to obtain a feature difference value; The current local image feature is adjusted according to the feature difference value to obtain a target video frame.
5. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the video optimization method as described in any one of claims 1-3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the video optimization method as described in any one of claims 1 to 3 is implemented.
7. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the video optimization method according to any one of claims 1 to 3.
