Video processing methods, apparatus, devices, and media

The server-based method for determining video playback page backgrounds addresses the inefficiencies in existing technologies by dynamically matching theme colors with video content, improving user experience and reducing client processing load.

JP2026512533APending Publication Date: 2026-04-16BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-04-11
Publication Date
2026-04-16

AI Technical Summary

Technical Problem

Existing video processing technologies face challenges in dynamically matching the background color of video playback pages with the video content, particularly with rapidly changing frames, leading to inefficient CPU usage and poor user experience due to fixed or improperly determined theme colors.

Method used

A method where a server determines the target theme color of keyframes based on color density sorting and selection criteria, sending this information to the client for rendering the video playback page background, thereby reducing client processing load and improving accuracy.

Benefits of technology

This approach enhances user experience by dynamically matching the background with the video content, reducing client computing resources and installation package size while ensuring accurate and reliable theme color determination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026512533000001_ABST
    Figure 2026512533000001_ABST
Patent Text Reader

Abstract

Embodiments of this disclosure relate to video processing methods, apparatus, devices, and media, the method including obtaining keyframes of a target video (S102), obtaining the sorting result of the color density of the keyframes, determining a target theme color corresponding to the keyframe based on the sorting result of the color density and predetermined theme color selection conditions (S104), and transmitting target theme color information to the client so that the client renders the background of the playback page of the target video based on the target theme color of the keyframe (S106). Embodiments of this disclosure can effectively guarantee rendering effects and further improve the user's video viewing experience while reducing the burden on the client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] [Cross - reference to Related Applications] This application claims priority to a Chinese patent application with the invention title "Video Processing Method, Apparatus, Device, and Medium", application number 202310418380X, filed on April 18, 2023, the entire content of which is incorporated herein by reference.

[0002] [Technical Field] This disclosure relates to the technical field of video processing, and particularly to video processing methods, apparatuses, devices, and media.

Background Art

[0003] With the popularization of multimedia, video has become an indispensable information carrier in people's daily life and work. Users can view the video screens presented on video playback pages. The inventor has found through research that in related technologies, there is a need to improve the processing method for the background of the video playback page (i.e., the background other than the video screen on the video playback page).

Summary of the Invention

[0004] This disclosure provides a video processing method, apparatus, device, and medium.

[0005] Embodiments of this disclosure provide a video processing method applicable to a server. This method includes obtaining a key frame of a target video, obtaining a sorting result of the color density of the key frame, determining a target theme color corresponding to the key frame based on the sorting result of the color density and a predetermined theme color selection condition, and sending information about the target theme color to the client so that the client renders the background of the playback page of the target video based on the target theme color of the key frame.

[0006] Embodiments of the present disclosure also provide a video processing device applicable to a server, the device comprising: a keyframe acquisition module for acquiring keyframes of a target video; a target theme color determination module for acquiring sorted color intensity results of the keyframes and determining a target theme color corresponding to the keyframes based on the sorted color intensity results and predetermined theme color selection conditions; and a background rendering module for transmitting information about the target theme color to the client so that the client renders the background of the playback page of the target video based on the target theme color of the keyframes.

[0007] Embodiments of the present disclosure also provide electronic equipment comprising a processor and memory for storing instructions executable by the processor, wherein the processor is used to read the executable instructions from the memory and execute the instructions to implement a video processing method provided by embodiments of the present disclosure.

[0008] The embodiments of this disclosure also provide a computer-readable storage medium in which a computer program for performing a video processing method provided by the embodiments of this disclosure is stored.

[0009] The embodiments of the present disclosure also provide a computer program product that, when executed by a processor, includes a computer program that implements the video processing method provided by the embodiments of the present disclosure.

[0010] It should be understood that the contents described in this section are not intended to limit the main or important features of the embodiments of this disclosure, nor to limit the scope of this disclosure. Other features of this disclosure will be readily apparent from the following specification. [Brief explanation of the drawing]

[0011] The accompanying drawings are incorporated herein and constitute part of this specification, illustrating embodiments conforming to this disclosure and are used together with the specification to interpret the principles of this disclosure.

[0012] To more clearly illustrate the embodiments of this disclosure or the technical concepts in the prior art, the accompanying drawings that may be used in the description of the embodiments or the prior art are briefly introduced below, although it will be obvious to those skilled in the art that other drawings can be obtained from these accompanying drawings without expending any creative effort. [Figure 1] This is a schematic diagram of the flow of a video processing method provided by embodiments of the present disclosure. [Figure 2] This is a flowchart of the method for determining a target theme color provided by the embodiments of this disclosure. [Figure 3] This is a schematic diagram of the configuration of a video processing device provided by an embodiment of the present disclosure. [Figure 4] This is a schematic diagram of the configuration of an electronic device provided by the embodiments of this disclosure. [Modes for carrying out the invention]

[0013] To better understand the above-mentioned objectives, features, and benefits of this disclosure, the solutions of this disclosure are further described below. Note that the embodiments and features of this disclosure can be combined with each other without contradiction.

[0014] Many specific details are described below in order to fully understand this disclosure, but this disclosure may be implemented in forms other than those described herein. Clearly, the examples in the specification are only a selection of the examples of this disclosure, not all of them.

[0015] The inventors, through research, have found that there is a need to improve the method of handling the background of video playback pages in related technologies. Specifically, in some related technologies, the background of the playback page is directly set to a fixed color such as black or gray, resulting in a single background display that fails to meet user needs. In some other related technologies, the client executes a theme color determination algorithm (which can be abbreviated as a color extraction algorithm) to determine the theme color of the background of the playback page based on the target video being played. However, it usually takes a certain amount of time for the client to execute the color extraction algorithm, and problems arise in that it cannot process rapidly changing video frames (such as those larger than 24fps) in a timely manner, resulting in the current background color not matching well with the video playback screen. Furthermore, integrating a color extraction algorithm into the client not only burdens the client's CPU but also increases the size of the client's installation package, which is disadvantageous for transmission and subsequent updates and iterations. Furthermore, the color extraction algorithms used by clients also need improvement. These algorithms are primarily based on extracting theme colors from still images, such as binary color extraction algorithms and octree color extraction algorithms. Not only are they difficult to adapt to video, but they also tend to select theme colors that do not meet user needs, resulting in a poor viewing experience for users.

[0016] To address at least one of the above-mentioned problems, embodiments of this disclosure provide video processing methods, apparatus, devices, and media, which are described below in detail.

[0017] Figure 1 is a schematic diagram of the flow of a video processing method provided by an embodiment of the present disclosure, the method which may be performed by a video processing device, which may be implemented using software and / or hardware, and may be integrated into an electronic device which may generally be a server. As shown in Figure 1, the method mainly comprises the following steps S102 to S106.

[0018] In step S102, keyframes of the target video are obtained.

[0019] The embodiments of this disclosure are not limited to the type and content of the target video, and the number of keyframes in the target video may be multiple. Specifically, the video may be considered as a collection of several pictures containing timing information, and in some embodiments, keyframes may be extracted from the target video at predetermined time intervals that can be flexibly set as needed. Exemplarily, assuming that the time interval is t and the number of frames played per second is f, the keyframes of the target video to be obtained may include the [0, f*t, 2*f*t, ..., n*f*t]th frame. The method of extracting keyframes at predetermined time intervals can reduce the processing resources that need to be spent compared to analyzing all frames of the target video, avoid wasting processing resources due to differences between adjacent frames being too small, and improve processing efficiency. Furthermore, the method of extracting keyframes at predetermined time intervals is simpler and easier to implement, and the resulting keyframes have a certain degree of representativeness, which helps to reasonably and reliably determine the background of the video playback page based on the keyframes in subsequent steps.

[0020] In step S104, the sorting result of the color density of the keyframes is obtained, and the target theme color corresponding to the keyframe is determined based on the sorting result of the color density and predetermined theme color selection conditions.

[0021] In practical applications, keyframes can first be tensorized. For example, keyframes can be converted into a tensor with dimensions [W, H, C], where W represents the width, H represents the height, and C represents the number of channels. For example, a color image may be converted into a 480*360*3 tensor, where 3 represents the number of channels corresponding to the three color channels: red, green, and blue. These may be abbreviated as R channel, G channel, and B channel. Embodiments of this disclosure can determine the dominant color in a keyframe (i.e., the theme color) by obtaining the color intensity of the keyframes and sorting the color intensity of the keyframes. Furthermore, based on the sorting result of the color intensity, a target theme color for keyframes that satisfy the theme color selection criteria can be determined.

[0022] In some embodiments, the predetermined theme color selection condition includes a constraint on the number of target theme colors. For example, the constraint indicates that N target theme colors must be selected, where N is a positive integer and can be flexibly set as specifically required, and is not limited herein. For example, N may be 2.

[0023] In some embodiments, the predetermined theme color selection condition further includes a color value constraint condition for the target theme color. For example, in order to restrict the color value conditions that the target theme color needs to satisfy as required, by filtering out undesirable color values such as black and white, it can be ensured that the finally selected target theme color conforms to the aesthetics of the general public or has a better scene performance effect. Exemplarily, the color value constraint condition may include that the difference between any two of the color values of the R channel, G channel, and B channel of the target theme color is not less than a predetermined threshold value (specifically, it may be flexibly set according to actual requirements, for example, it may be 30). In other words, the color value constraint condition can filter out theme colors in which the difference between any two of the color values of the R channel, G channel, and B channel of the target theme color is less than a predetermined threshold value, that is, it can filter out colors with close R, G, and B values, such as almost pure black and almost pure white. However, using such colors as the background color of the video playback page has a single scene performance effect presented to people and cannot meet the needs of users. Therefore, by setting the color value constraint condition, the background presentation effect of the video playback page rendered based on the finally selected target theme color can be effectively guaranteed, and the visual and auditory experience of users can be ensured.

[0024] Also, in practical applications, the server may store the target theme color corresponding to the key frame of the target video in the database in association with the information of the target video, and the specific storage method is not limited in this specification.

[0025] In step S106, the client is sent the information of the target theme color so that the client can render the background of the playback page of the target video based on the target theme color of the key frame.

[0026] For example, in response to receiving a video information retrieval request issued by the client for a target video, the server can send the target video footage and the target theme color information of the keyframes together to the client, allowing the client to render the background of the target video playback page directly using the target theme color of the keyframes predetermined by the server. In practical applications, there may be multiple keyframes, each keyframe may have one or more target theme colors, and the target theme colors of each keyframe may be sent together with the video footage in the form of an RGB list. This allows the client to process the background of the target video playback page based on the RGB list when playing the target video based on the video footage, thereby achieving effects such as dynamic color changes.

[0027] In summary, the video processing method provided by the embodiments of this disclosure has one or more of the following advantages: 1) The client does not need to determine the target theme color of keyframes themselves, as the server determines the target theme color of the keyframes of the target video, thereby saving the client's computing resources and helping the client perform rendering in a timely manner. 2) Since the client does not need to integrate an algorithm for determining the target theme color of video keyframes, this not only effectively reduces the size of the installation package corresponding to the client, but also makes it easier for the server to subsequently optimize and adjust the algorithm. 3) The target theme color is determined based on the sorting results of the color density of the keyframes and the theme color selection criteria, and the accuracy and reliability of the target theme color can be effectively guaranteed under the assurance that the target theme color matches the requirements. 4) By rendering the background of the playback page of the target video based on the target theme color, the background of the playback page matches the target video, effectively improving the user's video viewing experience.

[0028] In some embodiments, the embodiments of the present disclosure provide an implementation for obtaining sorted results of keyframe color densities, which may be performed by referring to steps A to C below.

[0029] In step A, the pixels within the keyframe are projected onto a predetermined initial color space. The initial color space may be, for example, the RGB color space (also called the RGB color space), and the colors are characterized in the form of a cube by constructing the color values ​​of the three color channels R, G, and B in the Cartesian coordinate system. The specific method of constructing the color space can be found in related technologies and will not be explained again here.

[0030] In step B, pixel information of the keyframe is obtained, and the initial color space is sliced ​​based on the pixel information to obtain multiple target color spaces. In actual applications, the number of target color spaces is a multiple of 2, for example, 64, 128, etc., and the specific number can be flexibly set as required. Exemplaryly, at least one slicing operation can be performed on the initial color space based on the pixel information until a predetermined number of target color spaces are obtained. Here, the slicing operation is used to slice each current color space into two color spaces, the current color space corresponding to the first slicing operation is the initial color space, and the current color space corresponding to a slice operation that is not the first is the color space obtained by the previous slicing operation. For example, the initial color space B is sliced ​​to obtain two color spaces B1 and B2. Then, each of these two color spaces is sliced, with B1 being sliced ​​into B1.1 and B1.2, and B2 being sliced ​​into B2.1 and B2.2. This process continues until a predetermined number of color spaces are obtained, and the final color space obtained becomes the target color space.

[0031] As described above, it is possible to obtain mapping results of pixels within keyframes to multiple target color spaces, classify pixels within keyframes through the target color spaces, and further analyze the pixel colors within keyframes on a unit-by-unit basis of the target color spaces. This is not only convenient and efficient, but the theme color of the extracted keyframes is also more accurate.

[0032] In some specific examples, the above slicing is performed according to steps 1-3.

[0033] Step 1 determines the color value information of multiple target pixels projected onto the current color space by the keyframe, and the distribution count of each target pixel in the current color space. As mentioned above, the current color space corresponding to the first slice operation is the initial color space, and the current color space corresponding to subsequent slice operations is the color space obtained from the previous slice operation. Exemplarily, different target pixels have different color values. Here, the color value information includes the color values ​​of the R channel, G channel, and B channel. Furthermore, in the keyframe image, pixels with a certain color value may appear multiple times; for example, all n pixel points in the keyframe may be (255,255,255), and the distribution count can be interpreted as the number of times a certain color appears.

[0034] In step 2, the target channel is determined from the R, G, and B channels based on the color value information of multiple target pixels. Here, the difference in the corresponding color values ​​of multiple target pixels in the target channel is greater than the difference in the corresponding color values ​​of multiple target pixels in the other channels. Each target pixel corresponds to an R color value, a G color value, and a B color value. The maximum color value difference corresponding to the R channel is assumed to be the difference between the maximum and minimum R color values ​​of the multiple target pixels, which is Rd. The maximum color value difference corresponding to the G channel is assumed to be the difference between the maximum and minimum G color values ​​of the multiple target pixels, which is Gd. The maximum color value difference corresponding to the B channel is assumed to be the difference between the maximum and minimum B color values ​​of the multiple target pixels, which is Bd. The color channel corresponding to the maximum value among Rd, Gd, and Bd is set as the target channel. In this way, the target channel with the largest color value difference can be effectively determined, and then the current color space can be easily sliced ​​based on the target channel.

[0035] In step 3, the sorting result of the color values ​​corresponding to multiple target pixels in the target channel is obtained, and the current color space is sliced ​​based on the sorting result of the color values ​​and the distribution number of each target pixel in the current color space.

[0036] Assuming the target channel is the R channel, the target pixels are sorted in descending order based on the R color value of each target pixel, thereby obtaining a sorted color value. Furthermore, the current color space can be sliced ​​based on the sorted color value and the distribution number of each target pixel to obtain two sliced ​​color spaces corresponding to the current color space. In some specific embodiments, the median color value of the sorted color value can be determined, and the current color space can be sliced ​​based on the median color value and the distribution number of each target pixel in the current color space to obtain two new color spaces. Here, all color values ​​corresponding to target pixels in the target channel of one new color space are greater than the median color value, and all color values ​​corresponding to target pixels in the target channel of the other new color space are not greater than the median color value, and the number of each target pixel in each new color space is equal to the distribution number of each target pixel in the current color space. For ease of understanding, steps 3.1 and 3.2 below can be referenced when implementing this specifically.

[0037] In step 3.1, the median color value of the sorted color values ​​is determined, and based on the median color value, multiple target pixels are divided into two groups of pixels.

[0038] The median color value is the color value located in the middle of the sorted color values. For example, the sorted color values ​​are in descending order. Based on the median color value, the sorted color values ​​can be divided into two groups. Accordingly, multiple target pixels can be divided into two groups of pixels. In one group, all the color values ​​corresponding to the target pixels in the target channel are greater than the median color value, while in the other group, all the color values ​​corresponding to the target pixels in the target channel are not greater than the median color value. In other words, pixels in the current color space can be divided into two categories based on their color values, and then the current color space can be rationally sliced ​​based on the result of the pixel division.

[0039] In step 3.2, the current color space is sliced ​​to obtain two new color spaces based on two pixel groups and the distribution of each target pixel in the current color space. Here, there is a one-to-one correspondence between the pixel groups and the new color spaces, and the number of each target pixel in the corresponding pixel group included in the new color space is equal to the distribution of each target pixel in the current color space. That is, if we assume that the number of target pixels A in the current color space is N1 and the number of target pixels B is N2, and that the pixel group to which target pixels A belong corresponds to one new color space, then the number of target pixels A included in that color space is N1. If we assume that the pixel group to which target pixels B belong corresponds to another new color space, then the number of target pixels B included in that color space is N2. In this way, pixels in the current color space can be rationally and reliably classified, the two new color spaces obtained by slicing can be determined, and the dominant color can be extracted based on the distribution of target pixels.

[0040] In step C, the keyframes are sorted based on their color intensity in each of the multiple target color spaces to obtain a sorted result of the keyframe color intensity. Color intensity can be understood as pixel density, and specifically, as the density of target pixels in the keyframes contained within the target color space. By sorting the color intensity corresponding to the multiple target color spaces in descending order, a descending sorted result of the keyframe color intensity is obtained. Since the colors at the top of the descending sort result can be considered to occupy a dominant position in the keyframe, the theme color of the keyframe can be determined rationally and reliably based on this.

[0041] Furthermore, when determining the target theme color corresponding to a keyframe based on the sorting results of color density and predetermined theme color selection conditions, the following steps a to c can be referred to.

[0042] In step a, the centroid color of each of the multiple target color spaces is obtained, and based on the centroid color, a theme color corresponding to each of the multiple target color spaces is determined.

[0043] In the embodiments of this disclosure, the centroid color of the target color space may be directly adopted as the theme color of the target color space. For example, the method for obtaining the centroid color may involve calculating the R mean, G mean, and B mean of the target color space, and specifically, averaging the color values ​​of all pixels in the target color space in the R channel to obtain the R mean. The same applies to the G mean and B mean, and will not be repeated in this explanation. In this way, a theme color corresponding to each target color space can be obtained simply and quickly.

[0044] In step b, based on the sorting result of color intensity, a descending sort result of the theme colors corresponding to each of the multiple target color spaces is obtained. Assuming that the sorting result of color intensity is in descending order, the descending sort result of theme colors will match the descending sort result of color intensity. For example, if the color intensity of target color space 1 > the color intensity of target color space 2 > the color intensity of target color space 3, the descending sort result of theme colors will be, from top to bottom, the theme color of target color space 1, the theme color of target color space 2, and the theme color of target color space 3, respectively.

[0045] In step c, a target theme color that satisfies predetermined theme color selection criteria is selected based on the descending sort result. For example, target theme colors that satisfy predetermined theme color selection criteria can be selected from top to bottom.

[0046] The result of sorting in descending order can be characterized in the form of a theme color list. Starting with the first theme color, it is determined whether or not it satisfies the theme color selection conditions. If it does, that theme color is designated as the target theme color. Then, it is determined whether or not the second theme color satisfies the theme color selection conditions, and so on, until all target theme colors that satisfy the theme color selection conditions are selected. For example, the theme color selection conditions may include a number constraint (e.g., N target theme colors must be selected) and a color value constraint (conditions that the R, G, and B color values ​​of the target theme colors must satisfy). Using the method described above, based on the result of sorting the theme colors in descending order, the first N theme colors that satisfy the color value constraints are selected as target theme colors.

[0047] By using the method described above, the desired number of target theme colors can be selected, and the color values ​​of the selected target theme colors can meet the needs and guarantee a satisfactory viewing experience for the user.

[0048] In addition to the above, you can refer to the flowchart for determining the target theme color shown in Figure 2, which mainly includes the following steps S202 to S210.

[0049] In step S202, keyframes are extracted from the target video at predetermined time intervals.

[0050] In step S204, the pixels within the keyframe are projected into a predetermined initial color space.

[0051] In step S206, the color value information of multiple target pixels projected onto the current color space by the keyframe, and the distribution number of each target pixel in the current color space are determined, with the color values ​​differing depending on the target pixel. In the case of the first slice operation, the current color space is the initial color space; otherwise, the current color space is the color space obtained from the previous slice.

[0052] In step S208, the target channel is determined from the R channel, G channel, and B channel based on the color value information of multiple target pixels, where the difference in the corresponding color values ​​of multiple target pixels in the target channel is greater than the difference in the corresponding color values ​​of multiple target pixels in the other channels.

[0053] In step S210, the sorting result of the color values ​​corresponding to multiple target pixels in the target channel is obtained, and the current color space is sliced ​​into two color spaces based on the sorting result of the color values ​​and the distribution number of each target pixel in the current color space.

[0054] In step S212, it is determined whether the number of existing color spaces has reached a predetermined number. If YES, step S214 is executed; otherwise, the process returns to step S206. The color spaces are continuously sliced ​​using the above recursive method until the desired predetermined number of target color spaces is reached.

[0055] In step S214, the color density of the keyframes corresponding to each of the predetermined number of target color spaces obtained by slicing is sorted to obtain the sort result of the keyframe color density.

[0056] In step S216, the centroid color of each of the multiple target color spaces is obtained, and based on the centroid color, the theme color corresponding to each of the multiple target color spaces is determined.

[0057] In step S218, based on the sorting results of color density, the theme colors corresponding to each of the multiple target color spaces are sorted in descending order.

[0058] In step S220, based on the sorting result of the theme colors in descending order, target theme colors that satisfy predetermined theme color selection conditions are selected from top to bottom.

[0059] In this way, the server can rationally and reliably select the target theme color for the keyframes of the target video. Specific methods for implementing the above steps can be found in the aforementioned related content and are not limited to those described herein.

[0060] After the server determines the target theme color corresponding to the keyframes of the target video in the form provided by the embodiments of this disclosure, it sends the target theme color corresponding to the keyframes to the client, so that the client can directly render the background of the target video playback page based on the target theme color. Exemplaryly, embodiments of this disclosure provide specific embodiments in which the client renders the background of the target video playback page based on the target theme color, which may include, for example, steps 1) to 3) below.

[0061] Step 1) determines the video time information corresponding to the target theme color of a keyframe based on the total duration of the target video and the number of keyframes. It should be understood that in the embodiments of this disclosure, the server does not timestamp each keyframe or notify the client of a specific time interval for extracting keyframes; rather, the client calculates the timestamp information corresponding to the target theme color of each keyframe based on the total duration of the target video and the number of keyframes. In practical implementation, the server and client may agree in advance to extract keyframes at equal intervals, but the server does not need to send the client a specific time interval to be used for keyframe extraction or the time of each keyframe. The client can determine the time interval of adjacent keyframes by the ratio of the total duration of the target video to the number of keyframes, and further determine the video time corresponding to the target theme color of each keyframe, which not only saves storage and bandwidth but also makes it easier for the server to dynamically adjust the interval at which it extracts frames.

[0062] In step 2), theme color information corresponding to the time interval between adjacent keyframes is determined based on the video time information corresponding to the target theme color. Specifically, in addition to the target theme color corresponding to each adjacent keyframe, a color gradient algorithm may be used to determine the theme color for each specified time interval between adjacent keyframes. This specified time may be determined, for example, based on the ratio of the time interval to a given time interval, or based on the playback time of the video frame of the target video included in the adjacent keyframe, and can be flexibly set as needed.

[0063] To facilitate understanding, let's assume that adjacent keyframes include keyframe A at time T1 and keyframe B at time T2, with keyframe A corresponding to theme color A and keyframe B corresponding to theme color B. Then, depending on theme colors A and B, we can determine gradient theme colors corresponding to multiple times within the time range from time T1 to time T2, and by enabling a gradual, dynamic gradient from theme color A at time T1 to theme color B at time T2, we can ensure the user's visual perception.

[0064] In step 3), the background of the target video playback page is rendered based on the target theme color corresponding to the keyframe and the theme color information corresponding to the time interval between adjacent keyframes.

[0065] By rendering the background of the target video's playback page in the manner described above, the background of the playback page can be dynamically matched to the target video, allowing users watching the target video to experience immersion and significantly improving the user experience.

[0066] The above-described technical solution provided by the embodiments of this disclosure allows the server to acquire keyframes of a target video, determine a target theme color corresponding to the keyframe based on the sorting result of the keyframe's color density and theme color selection criteria, and send it to the client, which helps the client directly render the background of the target video's playback page based on the target theme color of the keyframe. The above method has one or more of the following advantages: 1) The client does not need to determine the target theme color of the keyframe itself, as the server determines the target theme color of the keyframe of the target video, thus saving the client's computing resources and helping the client perform timely rendering. 2) The client does not need to integrate an algorithm for determining the target theme color of the video's keyframes, which not only effectively reduces the size of the installation package corresponding to the client but also makes it easier for the server to subsequently optimize and adjust the above algorithm. 3) The accuracy and reliability of the target theme color can be effectively guaranteed, under the assurance that the target theme color matches the requirements, by determining the target theme color based on the sorting result of the keyframe's color density and theme color selection criteria. 4) The background of the target video playback page is rendered based on the target theme color, and the background of the playback page is matched to the target video, thereby effectively improving the user's video viewing experience. In summary, the method of rendering the background of a video playback page provided by the embodiments of this disclosure is superior, effectively guaranteeing rendering effects while reducing the burden on the client, and further improving the user's video viewing experience.

[0067] Corresponding to the video processing method described above, Figure 3 is a schematic diagram of the configuration of a video processing device provided by an embodiment of the present disclosure, which is implemented by software and / or hardware, is generally integrated into electronic equipment, and may be applied to a server, as shown in Figure 3, A keyframe acquisition module 302 for obtaining keyframes of the target video, A target theme color determination module 304 obtains the sorting result of the color density of keyframes and determines the target theme color corresponding to the keyframe based on the sorting result of the color density and predetermined theme color selection conditions. The system includes a background rendering module 306 for sending target theme color information to the client so that the client renders the background of the target video playback page based on the target theme color of the keyframes.

[0068] The above configuration has one or more of the following advantages: 1) The client does not need to determine the target theme color of keyframes themselves, as the server determines the target theme color of the target video's keyframes, thus saving the client's computing resources and helping the client perform rendering in a timely manner. 2) The client does not need to integrate an algorithm for determining the target theme color of video keyframes, which not only effectively reduces the size of the installation package corresponding to the client but also makes it easier for the server to subsequently optimize and adjust the algorithm. 3) The target theme color is determined based on the sorting results of the keyframe color density and theme color selection criteria, effectively guaranteeing the accuracy and reliability of the target theme color under the assurance that the target theme color matches the requirements. 4) The background of the target video's playback page is rendered based on the target theme color, matching the playback page background to the target video and effectively improving the user's video viewing experience.

[0069] In some embodiments, the target theme color determination module 304 is specifically used to project pixels in a keyframe into a predetermined initial color space, acquire pixel information of the keyframe, slice the initial color space based on the pixel information to obtain a plurality of target color spaces, and sort each of the plurality of target color spaces based on the color density of the keyframe to obtain a sorted result of the color density of the keyframe.

[0070] In some embodiments, the target theme color determination module 304 is specifically used to perform at least one slicing operation on the initial color space until a predetermined number of target color spaces are obtained, based on pixel information. Here, the slicing operation is used to slice each current color space into two color spaces, where the current color space corresponding to the first slicing operation is the initial color space, and the current color space corresponding to a non-first slicing operation is the color space obtained by the previous slicing operation.

[0071] In some embodiments, the slicing operation includes determining the color value information of a plurality of target pixels projected onto the current color space by a keyframe, and the distribution number of each target pixel in the current color space; determining a target channel from the R channel, G channel, and B channel based on the color value information of the plurality of target pixels, wherein the difference in the corresponding color values ​​of the plurality of target pixels in the target channel is greater than the difference in the corresponding color values ​​of the plurality of target pixels in the other channels; obtaining a sort result of the corresponding color values ​​of the plurality of target pixels in the target channel, and slicing the current color space based on the sort result of the color values ​​and the distribution number of each target pixel in the current color space.

[0072] In some embodiments, the slicing operation further includes determining the median color value of the sorted color values, and slicing the current color space to obtain two new color spaces based on the median color value and the number of each target pixel in the current color space.

[0073] In some embodiments, the target theme color determination module 304 is specifically used to obtain the centroid color of each of a plurality of target color spaces, determine a theme color corresponding to each of the plurality of target color spaces based on the centroid color, obtain a descending sort result of the theme colors corresponding to each of the plurality of target color spaces based on the sort result of color density, and select a target theme color that satisfies predetermined theme color selection conditions based on the descending sort result.

[0074] In some embodiments, the predetermined theme color selection criteria include a constraint on the number of target theme colors.

[0075] In some embodiments, the predetermined theme color selection criteria further include color value constraints for the target theme color.

[0076] In some embodiments, the color value constraints include the fact that the color values ​​of the R channel, G channel, and B channel of the target theme color are not all less than a predetermined threshold.

[0077] In some embodiments, the keyframe acquisition module 302 is specifically used to extract keyframes from a target video at predetermined time intervals.

[0078] In some embodiments, the background rendering module 306 is specifically used to determine video time information corresponding to the target theme color of a keyframe based on the total duration and number of keyframes of the target video; to determine theme color information corresponding to the time interval between adjacent keyframes based on the video time information corresponding to the target theme color; and to render the background of the playback page of the target video based on the target theme color corresponding to the keyframe and the theme color information corresponding to the time interval between adjacent keyframes.

[0079] A video processing apparatus provided by an embodiment of the present disclosure can perform a video processing method provided by any embodiment of the present disclosure and has the execution of a functional module corresponding to the method and beneficial effects.

[0080] As will be obvious to those skilled in the art, for the sake of convenience and brevity of explanation, the specific working processes of the apparatus embodiments described above can be referenced to the corresponding processes in the method embodiments and will not be repeated here.

[0081] Figure 4 is a schematic diagram of the configuration of an electronic device provided by an embodiment of the present disclosure. As shown in Figure 4, the electronic device 400 comprises one or more processors 401 and memory 402.

[0082] The processor 401 may be a central processing unit (CPU) or another type of processing unit having data processing capability and / or instruction execution capability, and can control other components in the electronic device 400 to perform a desired function.

[0083] Memory 402 includes one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions are stored in the computer-readable storage media, and the processor 401 may execute the program instructions to realize the video processing method and / or other desired functions of the embodiments of this disclosure described above. In addition, various things such as input signals, signal components, and noise components may be stored in the computer-readable storage media.

[0084] In one example, the electronic device 400 may further include an input device 403 and an output device 404, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0085] Furthermore, this input device 403 may include, for example, a keyboard, a mouse, and the like.

[0086] This output device 404 may output various information, including determined distance information and direction information, to an external source. This output device 404 may include, for example, a display, a speaker, a printer, a communication network, and a remote output device connected thereto.

[0087] Of course, for the sake of simplification, only some of the components relating to this disclosure in the electronic device 400 are shown in Figure 4, and components such as buses and input / output interfaces are omitted. In addition, the electronic device 400 may include any other appropriate components depending on the specific application.

[0088] In addition to the methods and apparatus described above, embodiments of the present disclosure may also be computer program products that, when executed by a processor, include computer program instructions causing the processor to perform the video processing method provided by embodiments of the present disclosure.

[0089] The computer program product, for performing the operations of the embodiments of this disclosure, can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java® and C++, and conventional procedural programming languages ​​such as the C language or similar programming languages. The program code may run entirely on a user computing device, partially on a user computing device, as a standalone software package, partially on a user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0090] Furthermore, embodiments of the present disclosure may be computer-readable storage media that, when executed by a processor, stores computer program instructions causing the processor to execute the video processing method provided by embodiments of the present disclosure.

[0091] Computer-readable storage media may employ any combination of one or more readable media. A readable media may be a readable signal medium or a readable storage medium. A readable storage medium includes, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, CD-ROMs, optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0092] The embodiments of the present disclosure also provide a computer program product that, when executed by a processor, includes a computer program / instructions that implements the video processing method in the embodiments of the present disclosure.

[0093] Before using the technical proposals disclosed in each example of this publication, please understand that you should notify the user of the types of personal information related to this publication, the scope of use, and the usage scenarios through appropriate means in accordance with applicable laws and regulations, and obtain the user's consent.

[0094] For example, in response to receiving an unsolicited request from a user, a prompt message is sent to the user explicitly informing them that the requested action requires access to and use of the user's personal information. This allows the user to autonomously choose, based on the prompt message, whether or not to provide personal information to software or hardware such as electronic devices, applications, servers, or storage media that perform the actions of the proposed technical demonstration of this disclosure.

[0095] As an optional and non-exclusive implementation method, a method for sending a prompt message to the user in response to receiving an unsolicited request from the user may be, for example, by means of a pop-up window, in which the prompt message may be presented in text. Furthermore, the pop-up window may include a selection controller for the user to choose whether to "agree" or "disagree" to providing personal information to the electronic device.

[0096] The above notice and user authorization process are merely illustrative and do not limit how this disclosure can be implemented. You should understand that other methods that comply with applicable laws and regulations may also be applied to how this disclosure can be implemented.

[0097] It should be noted that, in this specification, relational terms such as “first” and “second” are used solely to distinguish one entity or operation from another, and do not necessarily require or suggest that such an actual relationship or order exists between these entities or operations. Furthermore, “includes,” “equips,” or other variations are intended to be non-limiting inclusions, meaning that a process, method, article, or device of a set of elements includes not only these elements but also other elements not explicitly enumerated, or elements specific to such a process, method, article, or device. Where further limitation is not applicable, an element defined by the expression “includes one…” does not preclude the presence of another identical element in a process, method, article, or device that includes that element.

[0098] The above are merely specific embodiments of the Disclosure that a person skilled in the art can understand or implement. Various modifications to these embodiments will be obvious to a person skilled in the art, and the general principles defined herein can be realized in other embodiments without departing from the spirit or scope of the Disclosure. Accordingly, the Disclosure is not limited to these embodiments described herein, but adheres to the broadest scope consistent with the principles and novel features disclosed herein.

Claims

1. A video processing method applied to a server, Obtaining keyframes from the target video, The sorting result of the color density of the keyframes is obtained, and a target theme color corresponding to the keyframe is determined based on the sorting result of the color density and predetermined theme color selection conditions. Sending information about the target theme color to the client so that the client renders the background of the playback page of the target video based on the target theme color of the keyframe, A video processing method characterized by including the following.

2. Obtaining the sort result of the color density of the aforementioned keyframes is: Projecting the pixels within the aforementioned keyframe into a predetermined initial color space, The process involves obtaining pixel information of the keyframe, slicing the initial color space based on the pixel information to obtain multiple target color spaces, The sorting is performed based on the color intensity of the keyframes corresponding to each of the aforementioned multiple target color spaces, and the sorting result of the color intensity of the keyframes is obtained. The method according to claim 1, characterized by including the following:

3. Obtaining multiple target color spaces by slicing the initial color space based on the aforementioned pixel information is: The method according to the 2, characterized in that it includes performing at least one slicing operation on the initial color space based on the pixel information until a predetermined number of target color spaces are obtained.

4. The aforementioned slice is A step of determining the color value information of a plurality of target pixels projected onto the current color space by the keyframe, and the distribution number of each target pixel in the current color space, wherein the current color space corresponding to the first slice operation is the initial color space, and the current color space corresponding to a slice operation other than the first is the color space obtained by the previous slice operation, A step of determining a target channel from the R channel and the G channel and the B channel based on the color value information of the plurality of target pixels, wherein the difference in the color values ​​corresponding to the plurality of target pixels in the target channel is greater than the difference in the color values ​​corresponding to the plurality of target pixels in the other channels. The method according to 2 or 3, characterized in that the plurality of target pixels obtain a sort result of corresponding color values ​​in the target channel, and slice the current color space based on the sort result of color values ​​and the number of distributions of each target pixel in the current color space.

5. Slicing the current color space based on the sorting result of the color values ​​and the distribution number of each target pixel in the current color space is: The method according to claim 4, characterized in that it includes determining the median color value of the sorted color values, and slicing the current color space to obtain two new color spaces based on the median color value and the number of distributions of each target pixel in the current color space.

6. Determining the target theme color corresponding to the keyframe based on the sorting result of the color density and predetermined theme color selection conditions is: The process involves obtaining the centroid color for each of the multiple target color spaces, and determining a theme color corresponding to each of the multiple target color spaces based on the centroid color. Based on the sorting result of the color density, a descending sort result of the theme colors corresponding to each of the multiple target color spaces is obtained. Based on the descending sort result, select a target theme color that satisfies predetermined theme color selection criteria, The method according to the second invention, characterized by including the following:

7. The method according to claim 1, characterized in that the predetermined theme color selection condition includes a constraint on the number of target theme colors.

8. The method according to 7, characterized in that the predetermined theme color selection conditions further include color value constraint conditions for the target theme color.

9. The method according to 8, characterized in that the color value constraint condition includes the fact that the difference between any two of the color values ​​of the R channel, G channel, and B channel of the target theme color is not less than a predetermined threshold.

10. Obtaining keyframes from the aforementioned target video is: The method according to claim 1, characterized by including extracting keyframes from the target video at predetermined time intervals.

11. Rendering the background of the target video playback page based on the target theme color is: Based on the total duration of the target video and the number of keyframes, the video duration information corresponding to the target theme color of the keyframe is determined. Based on the video time information corresponding to the aforementioned target theme color, the theme color information corresponding to the time period between adjacent keyframes is determined, The background of the playback page for the target video is rendered based on the target theme color corresponding to the keyframe and the theme color information corresponding to the time interval between adjacent keyframes. The method according to claim 1, characterized by including the following:

12. A video processing device applied to a server, A keyframe acquisition module for obtaining keyframes from the target video, A target theme color determination module for obtaining the sorting result of the color density of the keyframes and determining a target theme color corresponding to the keyframe based on the sorting result of the color density and predetermined theme color selection conditions, A background rendering module for sending information about the target theme color to the client so that the client renders the background of the playback page of the target video based on the target theme color of the keyframe, A video processing device characterized by comprising:

13. Processor and The system comprises a memory for storing instructions that can be executed by the processor, The processor is used to read the executable instructions from the memory and execute the instructions to realize the video processing method described in any one of claims 1 to 11.

14. A computer-readable storage medium characterized by storing a computer program for performing the video processing method described in any one of claims 1 to 11.

15. A computer program product characterized by including a computer program that, when executed by a processor, realizes the video processing method described in any one of claims 1 to 11.