Video generation method, video playing method, computing device and computer readable storage medium

By dividing and merging the color rendering channels of the video material on the cloud server, a target foreground frame sequence including a transparency rendering channel is generated, and the rendering is performed according to the rendering level. This solves the problem of improving the visual effects of video content in the existing technology and achieves It achieves a higher sense of realism and delicacy, improving the user experience.

CN119364055APending Publication Date: 2025-01-24SHUXING TECH (BEIJING) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411418042.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

It is difficult for the prior art to effectively improve the visual effect of video content, especially in user interface design. How to improve the realism and delicateness of video display is a challenge.

Method used

By dividing the video material into color rendering channels on the cloud server, multi-color channels and single-color channels are determined. Based on these channels, the video frame sequence is fused to generate a target foreground frame sequence including a transparency rendering channel, and the target foreground frame sequence is generated according to the rendering level. The target foreground frame sequence and background frame sequence are rendered to obtain the target video.

Benefits of technology

This method not only increases the layers and visual richness of the video content, so that the foreground frame sequence can naturally be presented without affecting the background, which improves the authenticity and delicateness of the picture, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119364055A_ABST
    Figure CN119364055A_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a video generation method, a video playing method, a computing device and a computer readable storage medium, the video generation method being applied to a cloud server of a target application, the method comprising: acquiring a video material, the video material comprising an initial foreground frame sequence and a background frame sequence; color rendering channel division is carried out on the initial foreground frame sequence, a first color rendering channel and a second color rendering channel are determined, the first color rendering channel is a multi-color channel, and the second color rendering channel is a single-color channel; based on the first color rendering channel and the second color rendering channel, performing fusion processing on color information of the initial foreground frame sequence to obtain a target foreground frame sequence including a transparency rendering channel; according to the rendering hierarchy, the target foreground frame sequence and the background frame sequence are respectively rendered, the target video is obtained, the target effect of displaying foreground video elements is presented, the visual effect of video content is improved, and thus the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the technical field of graphics rendering and computing processing, and in particular to a video generation method, a video playback method, a computing device, and a computer-readable storage medium. Background Art

[0002] With the development of computer technology, applications have invested tremendous energy and resources in user interface design in order to improve user experience.

[0003] At present, displaying some high-quality content on the application, such as text, pictures, videos, etc., can not only attract users' attention, but also effectively alleviate the anxiety of users waiting for data loading time, and improve user experience. How to further improve the visual effect of video content displayed on the target application is an issue that requires continuous exploration and innovation. Summary of the invention

[0004] In view of this, an embodiment of this specification provides a video generation method. One or more embodiments of this specification also relate to a video playback method, a video generation device, a video playback device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.

[0005] According to a first aspect of an embodiment of this specification, a video generation method is provided, which is applied to a cloud service end of a target application, including:

[0006] Acquire video material, wherein the video material includes an initial foreground frame sequence and a background frame sequence;

[0007] Performing color rendering channel division on the initial foreground frame sequence to determine a first color rendering channel and a second color rendering channel, wherein the first color rendering channel is a multi-color channel and the second color channel is a single color channel;

[0008] Based on the first color rendering channel and the second color rendering channel, color information of the initial foreground frame sequence is fused to obtain a target foreground frame sequence including a transparency rendering channel;

[0009] According to the rendering level, the target foreground frame sequence and the background frame sequence are rendered respectively to obtain the target video.

[0010] According to a second aspect of an embodiment of this specification, a video playback method is provided, which is applied to a client of a target application, including:

[0011] In response to a start operation on a target application or a trigger operation on a target page in the target application, a target video is played on the target page of the target application, wherein the target video is obtained by rendering a target foreground frame sequence and a background frame sequence respectively according to a rendering level, the target foreground frame sequence includes a transparency rendering channel, the transparency rendering channel is obtained by fusing color information of an initial foreground frame sequence based on a first color rendering channel and a second color rendering channel, the first color rendering channel and the second color rendering channel are determined by dividing the initial foreground frame sequence into color rendering channels, the first color rendering channel is a multi-color channel, and the second color channel is a single color channel.

[0012] According to a third aspect of an embodiment of this specification, a video generation device is provided, which is applied to a cloud service end of a target application, including:

[0013] An acquisition module is configured to acquire video material, wherein the video material includes an initial foreground frame sequence and a background frame sequence;

[0014] A division module is configured to divide the initial foreground frame sequence into color rendering channels to determine a first color rendering channel and a second color rendering channel, wherein the first color rendering channel is a multi-color channel and the second color channel is a single color channel;

[0015] A fusion module is configured to perform fusion processing on the color information of the initial foreground frame sequence based on the first color rendering channel and the second color rendering channel to obtain a target foreground frame sequence including a transparency rendering channel;

[0016] The rendering module is configured to render the target foreground frame sequence and the background frame sequence respectively according to the rendering level to obtain the target video.

[0017] According to a fourth aspect of the embodiments of this specification, a video playback device is provided, which is applied to a client of a target application, including:

[0018] A playback module is configured to play a target video on a target page of a target application in response to a startup operation on a target application or a trigger operation on a target page in a target application, wherein the target video is obtained by rendering a target foreground frame sequence and a background frame sequence respectively according to a rendering level, the target foreground frame sequence includes a transparency rendering channel, the transparency rendering channel is obtained by fusing color information of an initial foreground frame sequence based on a first color rendering channel and a second color rendering channel, the first color rendering channel and the second color rendering channel are determined by dividing the initial foreground frame sequence into color rendering channels, the first color rendering channel is a multi-color channel, and the second color channel is a single color channel.

[0019] According to a fifth aspect of an embodiment of this specification, a computing device is provided, including:

[0020] Memory and processor;

[0021] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above method are implemented.

[0022] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and the steps of the above method are implemented when the computer program / instruction is executed by a processor.

[0023] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0024] In one embodiment of the present specification, a video generation method is provided, which is applied to a cloud server of a target application, including: obtaining video material, wherein the video material includes an initial foreground frame sequence and a background frame sequence; dividing the initial foreground frame sequence into color rendering channels to determine a first color rendering channel and a second color rendering channel, wherein the first color rendering channel is a multi-color channel and the second color channel is a single color channel; based on the first color rendering channel and the second color rendering channel, fusing the color information of the initial foreground frame sequence to obtain a target foreground frame sequence including a transparency rendering channel; rendering the target foreground frame sequence and the background frame sequence respectively according to the rendering level to obtain a target video.

[0025] By dividing the initial foreground frame sequence into color rendering channels, determining the first color rendering channel of multiple color channels and the second color rendering channel of a single color channel, and based on the first color rendering channel and the second color rendering channel, performing fusion processing on the color information of the initial foreground frame sequence, a target foreground frame sequence including a transparency rendering channel is obtained, which not only adds richer visual content, but also increases the sense of hierarchy of the video content, so that the foreground frame sequence can be naturally presented without affecting the background video frame sequence, thereby improving the realism and delicacy of the picture. According to the rendering level, the target foreground frame sequence and the background frame sequence are rendered, ensuring a good degree of integration between the contents of each layer, presenting a visual effect that at least part of the video elements touch, exceed or cover the visible area of ​​the target video, or at least part of the video elements of the target video touch, exceed or cover other parts of the video elements of the target video, thereby improving the visual effect of the video content displayed on the target application, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1is a flow chart of a video generation method provided by an embodiment of this specification;

[0027] Figure 2 is a schematic diagram of a target effect in a video generation method provided by an embodiment of this specification;

[0028] Figure 3 It is a flowchart of a video generation method provided by an embodiment of this specification;

[0029] Figure 4 is a flow chart of a video playback method provided by an embodiment of this specification;

[0030] Figure 5 is a flow chart of a method for generating an advertisement video provided by an embodiment of this specification;

[0031] Figure 6 It is a schematic diagram of the system architecture of a target application in a method for generating an advertisement video provided in one embodiment of this specification;

[0032] Figure 7 This is a playback effect diagram of an advertisement video generation method provided by an embodiment of this specification;

[0033] Figure 8 is a structural schematic diagram of a video generating device provided by an embodiment of this specification;

[0034] Fig. 9 It is a structural schematic diagram of a video playback device provided by an embodiment of this specification;

[0035] Fig.10 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0036] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0037] The terms used in one or more embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present invention. The singular forms of "a", "said" and "the" used in one or more embodiments of the present invention are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present invention refers to and includes any or all possible combinations of one or more associated listed items.

[0038] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present invention, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present invention, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0039] In addition, it should be noted that the data involved in one or more embodiments of the present invention are information and data authorized by the user or fully authorized by all parties, and the statistics, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0040] First, the terms involved in one or more embodiments of this specification are explained.

[0041] Cloud rendering: refers to the technology of using cloud computing resources to perform graphics rendering and computing processing. In cloud rendering, graphics processing and rendering tasks are not completed on the user's local device, but through the cloud server, through the cloud server or the remote server of the cloud service provider. Users can run high-demand graphics applications or games on low-performance devices through cloud server rendering services, transmit user input to the cloud server through the network, and then transmit the rendering results back to the user's device for display after processing by the server.

[0042] Opening screen: refers to the full-screen page that is displayed first when the user launches the application (App). This page usually appears during the launch process of the application to display information about a specific brand, product or service. The design of the opening screen is usually very attractive to attract the user's attention.

[0043] Out-of-frame effect: A video effect characterized by the foreground video element appearing above other video elements, partially covering other video elements, presenting a prominent display effect, often attracting the user's attention in a striking way. The out-of-frame effect makes the video more visually impactful and less disruptive to the user experience. This type of video design is usually more creative and can attract the user's attention.

[0044] Render Pass: refers to a rendering operation in computer graphics, usually used to process part of a scene. For example, in video production, one rendering pass may be used to calculate lighting effects, and another rendering pass may be used to process reflection effects. Each rendering pass is used to achieve different goals (such as color rendering pass, depth rendering pass, transparency rendering pass, etc.), and can be executed in a certain order to achieve the final visual effect.

[0045] Render Chain: refers to the process of combining a series of rendering passes in a specific order. These rendering passes will be executed in sequence, and the output of each rendering pass may be used as the input of the next rendering pass. The rendering chain is designed to achieve complex effects while optimizing performance, such as rendering shadows first, then ambient occlusion, and finally superimposing some post-processing effects. It helps organize complex rendering tasks and enables developers to better manage different rendering stages.

[0046] Render Layer: In the video rendering process, the rendering layer refers to the technology of decomposing the video content into multiple independent parts or layers for separate rendering. Each layer can contain certain specific video elements in the video content, such as foreground layer, background layer, text layer, image layer, etc. This can provide greater flexibility in post-compositing, allowing each layer to be adjusted separately without affecting other parts. In addition, this is also an optimization method that allows different layers to be rendered with different quality and detail levels as needed.

[0047] RGB channel: A commonly used color rendering channel that represents various colors by combining different intensities of the three primary colors red, green, and blue.

[0048] CMYK channel: A color rendering channel commonly used in the printing industry, which generates images by mixing four colors: cyan, magenta, yellow, and black.

[0049] Alpha channel: A special rendering channel used to store transparency information for each pixel in an image or video frame. It is usually used with RGB (red, green, blue) color channels to achieve transparent effects in images or videos. Each pixel value in the alpha channel represents the opacity of the pixel, and the value range is usually between 0 and 255. Among them, 0 represents complete transparency, 255 represents complete opacity, and the values ​​in between represent different degrees of translucency. The alpha channel allows certain parts of an image or video to appear transparent or translucent, allowing for more natural fusion when composited with other image or video layers.

[0050] Depth channel: A special rendering channel used to store the depth information of each pixel. It is usually used in 3D rendering to help determine the front and back relationship of each object in the scene. In 3D rendering, the Depth channel stores the depth value of each pixel (usually the distance relative to the camera). Through these depth values, the rendering system can correctly determine which objects should be displayed in front and which should be displayed in the back, thereby achieving the correct occlusion effect.

[0051] Coverage channel: A special rendering channel used to store coverage information for each pixel. It is mainly used to solve the situation where the pixel is partially covered, especially in polygonal rendering or multi-layer rendering. In some cases, a pixel may be partially covered by multiple geometric shapes. The Coverage channel stores the degree to which each pixel is covered, thus helping the rendering system to correctly handle these partial coverage situations.

[0052] In this specification, a video generation method is provided. This specification also relates to an advertising video generation method, a video generation device, an advertising video generation device, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.

[0053] See also Figure 1 , Figure 1 A flowchart of a video generation method provided by an embodiment of the present specification is shown. The method is applied to a cloud service end of a target application and includes the following specific steps:

[0054] Step 102: Acquire video material, wherein the video material includes an initial foreground frame sequence and a background frame sequence.

[0055] The embodiments of this specification are applied to a cloud server with a video generation function for a target application. The target application is an application started and used by a user, which can be a mobile application or a desktop application, such as a social media application, a content sharing application, a game application, etc. The cloud server of the target application is an application or service running on a server, which provides functions such as data processing, business logic processing, and resource management for the client of the target application (such as a mobile application, a web application, etc.). The cloud server is an important part of the application architecture. It processes requests from the client and returns corresponding responses. The cloud server is usually responsible for receiving data sent by the client, executing the corresponding business logic, and then returning the processing results. It may also be responsible for tasks such as database operations, security verification, and load balancing.

[0056] Video material is the original video material used to make and render the target video. Video material includes the initial foreground frame sequence and background frame sequence. Video material can also include: jump animation and sound effect material, etc. For example, you are designing a splash page for a content sharing application. You need to make and render a target video with the purpose of showing a travel content when the user starts the application, so as to attract the user's attention and provide a pleasant visual experience. The video material provided includes the initial foreground frame sequence showing tourists playing on the beach, and the background frame sequence of the sunset behind them.

[0057] The initial foreground frame sequence is a video frame sequence composed of multiple initial foreground video frames, and the initial foreground frame sequence is indirectly used to produce the video foreground of the rendered target video. For example, a 5s initial foreground frame sequence showing tourists playing on the beach includes 100 initial foreground video frames.

[0058] The initial foreground video frame is a video frame at a time point in the initial foreground frame sequence. For example, at a certain time point, a child is running towards the sea. The picture including the blue sky, the sea, the beach and the child constitutes an initial foreground video frame.

[0059] The background video frame sequence is a video frame sequence composed of multiple background video frames, which is directly used to make the video background of the rendered target video. For example, a 5s initial foreground frame sequence showing the sunset scene behind includes 100 background video frames.

[0060] The background video frame is a video frame at a time point in the background frame sequence. For example, at a certain time point, the sun behind is flush with the sea level, and this picture constitutes a background video frame.

[0061] It should be noted that the initial foreground frame sequence and the background frame sequence may be extracted from the same video material, or may be shot or produced separately, which is not limited here.

[0062] For example, you are designing a splash page for a content sharing app, and you need to create and render a target video that is intended to display a piece of food content when the user starts the app. Get the video material and element content uploaded by the video producer. The video material includes a 3s initial foreground frame sequence and a background frame sequence. The initial foreground frame sequence displays a rotating effect of a food dish, and the background frame sequence displays an effect of a dining table.

[0063] Video material is obtained, wherein the video material includes an initial foreground frame sequence and a background frame sequence, providing material support for video generation.

[0064] Step 104: dividing the initial foreground frame sequence into color rendering channels to determine a first color rendering channel and a second color rendering channel, wherein the first color rendering channel is a multi-color channel and the second color channel is a single color channel.

[0065] The first color rendering channel is a multi-color channel, which is a color rendering channel containing multiple color information. It is generally expressed in a matrix form, each element represents a pixel, and the element value represents the color value of the pixel, including but not limited to: RGB channel and CMYK channel. The first color rendering channel is used to retain the color information of the video frame, so that the elements in the video, such as people and objects, have real color expression. Through the first color rendering channel, a more vivid and natural picture effect can be achieved.

[0066] The second color rendering channel is a single color channel, which is a color rendering channel containing single color information. It is generally expressed in a matrix form, where each element represents a pixel point, and the element value represents the color value of the pixel point, including but not limited to: RGB channel and CMYK channel. The second color rendering channel is used to retain the grayscale information (contour information) of the video frame without containing color information, and serves as the basis for transparency control to achieve different levels of transparency effects.

[0067] An optional method of dividing the initial foreground frame sequence into color rendering channels to determine the first color rendering channel and the second color rendering channel is as follows: dividing the initial foreground frame sequence into color rendering channels based on color information of the initial foreground frame sequence to determine the first color rendering channel and the second color rendering channel.

[0068] Exemplarily, based on the color information of the initial foreground frame sequence, the initial foreground frame sequence is divided into the contents of two left and right color rendering channels, the two rendering channels are respectively the first color rendering channel and the second color rendering channel, the RGB values ​​of the first color rendering channel are color values, and the color information of the video frame is retained, and the RGB values ​​of the second color rendering channel are all grayscale values ​​(0 or 255), and the grayscale information of the video frame is retained: the food is white and the curtain is black.

[0069] The initial foreground frame sequence is divided into color rendering channels to determine a first color rendering channel and a second color rendering channel, wherein the first color rendering channel is a multi-color channel and the second color channel is a single color channel, thereby providing color rendering channel support for subsequently obtaining a target foreground frame sequence including a transparency rendering channel.

[0070] Step 106: Based on the first color rendering channel and the second color rendering channel, the color information of the initial foreground frame sequence is fused to obtain a target foreground frame sequence including a transparency rendering channel.

[0071] Generally, video decoding requires the creation of a video decoder, which decodes the video into video frames. However, foreground video is a special type of video, and a simple video decoder cannot meet the need to convert foreground video into textures with transparency rendering channels. In order to solve this problem, it is necessary to build a decoder and renderer for the foreground video to ensure that the foreground video is divided into the first color rendering channel and the second color rendering channel at the same time after video decoding, and the color information of the initial foreground frame sequence is fused, so as to obtain a target foreground frame sequence including transparency rendering channels frame by frame.

[0072] The transparency rendering channel is a rendering channel that represents the transparency of pixels in a video frame. It is generally expressed in a matrix form, where each element represents a pixel point, and the element value represents the transparency of the pixel point, including but not limited to: Alpha channel, Depth channel, and Coverage channel.

[0073] The target foreground frame sequence is a video frame sequence composed of multiple target foreground video frames with transparency rendering channels generated after the color information of the initial foreground frame sequence is fused. Any target foreground video frame in the target foreground frame sequence includes a transparency rendering channel. The target foreground frame sequence is directly used to produce a video foreground that renders the target video. For example, a 5s target foreground frame sequence showing only tourists playing on the beach includes 100 target foreground video frames.

[0074] The target video frame is a video frame at a time point in the target foreground frame sequence. For example, at a certain time point, a child is running towards the sea, and a picture containing only the beach and the child constitutes a target foreground video frame.

[0075] Based on the first color rendering channel and the second color rendering channel, the color information of the initial foreground frame sequence is fused to obtain a target foreground frame sequence including a transparency rendering channel. An optional method is: superimposing the first color rendering channel and the second color rendering channel, fusing the color information of the initial foreground frame sequence, and obtaining a target foreground frame sequence including a transparency rendering channel.

[0076] For example, take the RGB channels as the first color rendering channel and the second color rendering channel, and take the Alpha channel as the transparency rendering channel as an example to illustrate how to implement the superposition of the first color rendering channel and the second color rendering channel:

[0077] The first color rendering pass of an initial foreground video frame is:

[0078]

[0079] Each element group represents a pixel, and the element value of the element group represents the red intensity, green intensity, and blue intensity of the pixel. The value range of each element value is between 0 and 255, which is a multi-color channel.

[0080] The second color rendering pass for an initial foreground video frame is:

[0081]

[0082] Each element group represents a pixel, and the element value of the element group represents the red intensity, green intensity, and blue intensity of the pixel. The element value of the entire element group is all 0 or all 255, which is a single color channel.

[0083] The first color rendering channel and the second color rendering channel are superimposed, and the color information of the initial foreground frame sequence is fused to obtain the transparency rendering channel:

[0084]

[0085] The element group in the rendering channel of the target foreground frame sequence includes the fused color information (the first 3 bits of the element value) and transparency (the last bit of the element value).

[0086] Among them, the transparency rendering channel is:

[0087]

[0088] The value of the transparency rendering channel (Alpha channel) can be determined based on the grayscale information of the second color rendering channel. Normally, if the value of the second color rendering channel is all 255, the corresponding transparency is 0 (completely opaque), and if the value is all 0, the corresponding transparency is 255 (completely transparent). The following formula can be used to calculate transparency: Transparency = 255-second color rendering channel.

[0089] Exemplarily, the first color rendering channel and the second color rendering channel of each foreground video frame in an initial foreground frame sequence showing a rotating effect of a food are superimposed, and the color information of the initial foreground frame sequence is fused to obtain a 3s target foreground frame sequence including a transparency rendering channel and showing only the rotating effect of the food.

[0090] Based on the first color rendering channel and the second color rendering channel, the color information of the initial foreground frame sequence is fused to obtain a target foreground frame sequence including a transparency rendering channel. This not only adds richer visual content, but also increases the sense of hierarchy of the video content, so that the foreground frame sequence can be naturally presented without affecting the background video frame sequence, thereby improving the realism and delicacy of the picture.

[0091] Step 108: Render the target foreground frame sequence and the background frame sequence respectively according to the rendering level to obtain the target video.

[0092] Rendering layers refer to the technology of decomposing video content into multiple independent layers for separate rendering. Each layer can contain certain specific video elements in the video content. The rendering layers include the top layer, the middle layer and the bottom layer, where there is at least one middle layer. The top layer is the topmost layer in the rendering layer, and the top layer will cover the video elements displayed in the middle layer and the bottom layer. The bottom layer is the bottommost layer in the rendering layer, and the bottom layer will be covered by the video elements displayed in the top layer and the middle layer.

[0093] The target video is a video produced by rendering. It is the result of integrating various video materials and element contents. Since the target video is obtained by rendering the target foreground frame sequence and background frame sequence including the transparency rendering channel according to the rendering level, the target video presents the target effect. For example, the target video is a video with tourists playing on the beach in the foreground and the sunset scenery behind in the background, and also presents the travel blogger's avatar and the travel content text "Beautiful coastal city XX, love it" published by the travel blogger.

[0094] The target effect is that at least some video elements of the target video (such as foreground video elements) touch, exceed or cover the visible area of ​​the target video, or at least some video elements of the target video touch, exceed or cover other video elements of the target video.

[0095] For example, Figure 2 A schematic diagram showing a target effect in a video generation method provided by an embodiment of this specification is shown:

[0096] Taking the note sharing platform as an example, on the note search page of the note sharing platform, by entering the keyword "bag" in the input box, the search for related notes is completed, and the target page of the search results page is displayed. At the top of the search results page are displayed: the input box and related search controls, the channel (all, users and products), the brand logo image, the brand name, the brand slogan and the page jump control of "Explore Brand". The target video is played in the visible area of ​​the search results page. The target video includes multiple target video frames. Two target video frames: the first target video frame and the second target video frame are used as examples for explanation. In the target video, the bag is the foreground video element, the playback area of ​​the target video is the visible area, and the product slogan text element is the other part of the video element. In the first target video frame, the bag is in the front view, does not touch, exceed or cover the visible area of ​​the target video, and does not exceed or cover other parts of the video elements of the target video. In the second target video frame, the bag is rotated and enlarged, touching the visible area of ​​the target video and covering other video elements of the target video, thus presenting the target effect of "out-of-frame effect". At the bottom of the search results page, the related notes obtained by the search are displayed: Note 1: Small and exquisite: Women's chain bag trend; Note 2: Fall must-have: Fashionable women's handbag recommendation; Note 3: Business and fashion coexist: Women's briefcase selection; Note 4 Travel companion: Large-capacity women's backpack recommendation.

[0097] According to the rendering level, the target foreground frame sequence and the background frame sequence are rendered separately to obtain the target video. An optional method is: according to the rendering level, a rendering template is constructed, and the target foreground frame sequence and the background frame sequence in the rendering template are rendered separately to obtain the target video. Another optional method is: according to the rendering level, a rendering template is constructed, and the rendering chain is called to render the target foreground frame sequence and the background frame sequence in the rendering template separately to obtain the target video. Another optional method is: according to the rendering level, a rendering template is constructed, and the rendering chain is called to render the target foreground frame sequence and the background frame sequence in the rendering template separately to obtain the target video. There is no limitation here.

[0098] In the rendering process, each frame is processed according to the rendering level and the time point, and a target video that fully presents the target effect is output.

[0099] For example, a rendering template is constructed according to the rendering level: a 3s target foreground frame sequence including a transparency rendering channel and only showing the rotating effect of the food is located at the top layer, a logo image of the food blogger, a description text of the food name, a dynamic display of the current time, and an element content of a fixed interactive control of "browse now" are located in the middle layer, and a 3s background frame sequence showing the effect of the dining table is located at the bottom layer. The rendering chain is called to render the target foreground frame sequence, element content, and background frame sequence in the rendering template frame by frame to obtain a 3s target video showing a section of food content.

[0100] In the embodiment of the present specification, by dividing the initial foreground frame sequence into color rendering channels, determining the first color rendering channel of the multi-color channel and the second color rendering channel of the single color channel, based on the first color rendering channel and the second color rendering channel, the color information of the initial foreground frame sequence is fused and processed to obtain a target foreground frame sequence including a transparency rendering channel, which not only adds richer visual content, but also increases the sense of hierarchy of the video content, so that the foreground frame sequence can be naturally presented without affecting the background video frame sequence, thereby improving the realism and delicacy of the picture. According to the rendering level, the target foreground frame sequence and the background frame sequence are rendered, ensuring a good degree of integration between the contents of each layer, presenting a visual effect that at least part of the video elements touch, exceed or cover the visible area of ​​the target video, or at least part of the video elements of the target video touch, exceed or cover other parts of the video elements of the target video, thereby improving the visual effect of the video content displayed on the target application, thereby improving the user experience.

[0101] In an optional embodiment of the present specification, step 104 includes the following specific steps:

[0102] Based on the color information of the initial foreground frame sequence, the initial foreground frame sequence is divided into multiple color rendering channels to determine a first color rendering channel, and based on the grayscale information of the initial foreground frame sequence, the initial foreground frame sequence is divided into single color rendering channels to determine a second color rendering channel.

[0103] The color information of the initial foreground frame sequence is the color pixel data of each frame in the initial foreground frame sequence, which defines the color of each pixel in the video frame, usually expressed as the intensity value of basic colors such as red, green, and blue, and sometimes includes other color space representations, such as CMYK. In video processing, color information can be used to enhance image quality, adjust hue, contrast, etc., and can also be used to divide color rendering channels to facilitate subsequent processing steps, such as adding special effects such as transparency. For example, the initial foreground frame sequence shows a scene of tourists playing on the beach. In this sequence, each video frame is composed of millions of pixels, and each pixel has its own RGB value. For example, in a picture showing a child running on the beach, the pixels of the child's skin may have higher red and green values ​​and lower blue values, while the pixels of the sky may have higher blue values ​​and lower red and green values. These RGB values ​​are combined to form the color information of the entire picture.

[0104] The grayscale information of the initial foreground frame sequence is the grayscale pixel data of each frame in the initial foreground frame sequence, which defines the brightness level of each pixel in the video frame without involving color information. Grayscale information is usually represented by a numerical value, which ranges from 0 (black) to 255 (white). In video processing, grayscale information is used to represent the brightness distribution of video frames, which helps to analyze the structural characteristics of images without considering color, such as edge detection, shape recognition, etc. For example, the skin of a child with bright colors may become a close to gray tone in the grayscale image, while the bright sky will appear brighter. Areas with high grayscale values ​​(such as white sand) will appear as brighter parts in the grayscale image, while areas with low grayscale values ​​(such as dark clothes) will appear as darker parts, which are used to determine which parts should be transparent and which parts should remain opaque, and are used to subsequently determine the foreground video elements with transparency effects.

[0105] Exemplarily, a foreground video frame in the initial foreground frame sequence is:

[0106]

[0107] Based on the color information of the initial foreground frame sequence, the initial foreground frame sequence is divided into multiple color rendering channels to determine the first color rendering channel:

[0108]

[0109] Based on the grayscale information of the initial foreground frame sequence, the initial foreground frame sequence is divided into single color rendering channels to determine the second color rendering channel:

[0110] Convert the RGB value of each pixel to grayscale value. The grayscale conversion formula is: grayscale value = 0.299 × red intensity + 0.587 × green intensity + 0.114 × blue intensity.

[0111]

[0112] Grayscale values ​​can be normalized to 0 or 255 (i.e. black and white images) to represent fully transparent or fully opaque:

[0113]

[0114] In the embodiments of the present specification, the efficiency of video processing is improved by separating the color information from the grayscale information, and more refined control is performed on the color information in the video, thereby improving the overall visual effect of the video. By processing the grayscale information, the contrast and clarity of the image can be optimized, and the quality of the picture can be further enhanced. Based on the independent processing of color information and grayscale information, complex visual effects can be easily achieved, and support for the color rendering channel is provided for the subsequent acquisition of the target foreground frame sequence including the transparency rendering channel.

[0115] In an optional embodiment of the present specification, step 106 includes the following specific steps:

[0116] Based on the first color rendering channel and the second color rendering channel, the color information and the grayscale information of the initial foreground frame sequence are fused to obtain a target foreground frame sequence including a transparency rendering channel.

[0117] Based on the first color rendering channel and the second color rendering channel, the color information and grayscale information of the initial foreground frame sequence are fused to obtain a target foreground frame sequence including a transparency rendering channel. An optional method is: superimposing the first color rendering channel and the second color rendering channel, fusing the color information and grayscale information of the initial foreground frame sequence, and obtaining a target foreground frame sequence including a transparency rendering channel.

[0118] Exemplarily, the first color rendering channel of a certain initial foreground video frame is:

[0119]

[0120] The color information is the element value of the element group, representing that the red intensity, green intensity, and blue intensity of the pixel point have a value range between 0 and 255, showing a color tone.

[0121] The second color rendering pass for an initial foreground video frame is:

[0122]

[0123] The grayscale information is the element value of the element group, indicating that the red intensity, green intensity, and blue intensity of the pixel are all 0 or all 255, presenting a grayscale tone.

[0124] The first color rendering channel and the second color rendering channel are superimposed, and the color information and grayscale information of the initial foreground frame sequence are fused to obtain the target foreground frame sequence including the transparency rendering channel:

[0125]

[0126] In the embodiments of the present specification, based on the first color rendering channel and the second color rendering channel, the color information and grayscale information of the initial foreground frame sequence are fused to obtain a target foreground frame sequence including a transparency rendering channel. This not only retains the color richness of the original foreground frame, but also effectively controls the transparency of each pixel through the grayscale information, so that the foreground frame sequence can be naturally presented without affecting the background video frame sequence, thereby improving the realism and delicacy of the picture, significantly improving the quality and efficiency of video synthesis, making the synthesized video picture more realistic and delicate, and enhancing the visual experience.

[0127] In an optional embodiment of the present specification, based on the first color rendering channel and the second color rendering channel, the color information and the grayscale information of the initial foreground frame sequence are fused to obtain a target foreground frame sequence including a transparency rendering channel, including the following specific steps:

[0128] Perform pixel-by-pixel fusion on the first color rendering channel and the second color rendering channel to obtain a fusion weight matrix;

[0129] Based on the fusion weight matrix, the color information and grayscale information of each pixel in the initial foreground frame sequence are weighted to obtain the fused color information;

[0130] According to the fused color information, the transparency value of each pixel is calculated to determine the transparency rendering channel;

[0131] Based on the fused color information and transparency rendering channel, a target foreground frame sequence is generated.

[0132] The fusion weight matrix assigns a weight value to each pixel in the process of fusing color information (first color rendering channel) and grayscale information (second color rendering channel). The fusion weight matrix is ​​used to control the color and transparency effects in the final output image. In video processing, the fusion weight matrix achieves precise control of the transition between the foreground video frame and the background video frame, ensuring that the foreground elements can be smoothly integrated into the video while maintaining the color and details of the foreground elements. By adjusting the weight values ​​in the fusion weight matrix, different visual effects can be achieved, such as making the foreground more prominent or more integrated into the background. For example, there is a foreground video frame in which the first color rendering channel (RGB) and the second color rendering channel (grayscale) have been determined. For a certain pixel, its RGB value is (255, 100, 50) and the grayscale value is 255 (indicating complete opacity). If the weight of the pixel in the set fusion weight matrix is ​​0.8, then in the fusion process, the final color information of the pixel will rely more on its original color information, while the transparency remains at a high level, almost opaque.

[0133] The fused color information is the color attribute of each pixel after the fusion of the first color rendering channel and the second color rendering channel. This includes the combination of color information and transparency information, forming a matrix containing four channels (R, G, B, A), where A represents the Alpha channel, i.e. transparency. In video synthesis, the fused color information ensures a smooth transition between the foreground video frame and the background video frame, so that the foreground elements can be smoothly integrated into the video. For example, for the same pixel, its original RGB value is (255, 100, 50) and the grayscale value is 255. After the fusion process, if the calculated transparency value is 255 (completely opaque), then the fused color information of the pixel is (255, 100, 50, 255). This means that the pixel will be displayed in its original color in the final output video frame and will be completely opaque.

[0134] The transparency value of a pixel is the channel value of the transparency rendering channel for each pixel in the video frame, which is used to indicate the transparency of the pixel. The transparency value usually ranges from 0 to 255, where 0 means completely transparent and 255 means completely opaque. The transparency value allows foreground elements to partially or completely show through the background while maintaining their own color. The transparency value is used in the video to accurately control the presentation of complex visual effects such as fade-in and fade-out, shadow casting, etc. for each pixel. For example, for the pixel in the above example, if the calculated transparency value is 128, it means that the pixel will be semi-transparent in the final output video frame. If the color of the background video frame at the same position is (100, 150, 200), then in the final composite video frame, the actual color of the pixel will be a mixture of the foreground and background colors, depending on the transparency value.

[0135] Exemplarily, the first color rendering pass is:

[0136]

[0137] The second color rendering pass is:

[0138]

[0139] The first color rendering channel and the second color rendering channel are fused pixel by pixel to obtain the fusion weight matrix:

[0140] Normalize the grayscale values ​​to between 0 and 1:

[0141]

[0142] Based on the fusion weight matrix, the color information and grayscale information of each pixel in the initial foreground frame sequence are weighted to obtain the fused color information:

[0143]

[0144] According to the fused color information, the transparency value of each pixel is calculated to determine the transparency rendering channel:

[0145]

[0146] Based on the fused color information and transparency rendering channel, the target foreground frame sequence is generated:

[0147]

[0148] In the embodiment of this specification, the first color rendering channel and the second color rendering channel are fused pixel by pixel to generate a fusion weight matrix, and the color information and grayscale information are weighted based on the matrix to finally obtain a target foreground frame sequence including a transparency rendering channel. This process not only retains the rich colors of the foreground elements, but also achieves a natural fusion of the foreground and background by precisely controlling the transparency, significantly improving the realism and delicacy of the video synthesis and enhancing the user's visual experience.

[0149] In an optional embodiment of the present specification, before step 108, the following specific steps are also included:

[0150] Get element content;

[0151] Correspondingly, step 108 includes the following specific steps:

[0152] According to the rendering levels from the top layer to the bottom layer, the target foreground frame sequence, the element content and the background frame sequence are rendered respectively to obtain the target video.

[0153] Element content refers to non-video materials used to render the target video, including but not limited to images, text, variable elements, and fixed elements. Images are used to supplement the visual information in the video, such as logos and decorative icons, and text is used to provide necessary text descriptions, such as description text (title description text and content description text) and copyright text, and variable elements are used to dynamically adjust content according to actual conditions, such as countdown and weather information, and fixed elements are the parts of the video that remain unchanged, such as "jump" interactive controls and cards.

[0154] It should be noted that the element content can be extracted from video materials or produced independently, which is not limited here.

[0155] According to the rendering levels from top to bottom, the target foreground frame sequence, element content and background frame sequence are rendered respectively to obtain the target video. An optional way is: according to the rendering levels from top to bottom, a rendering template is constructed, and the target foreground frame sequence, element content and background frame sequence in the rendering template are rendered respectively to obtain the target video. Another optional way is: calling the rendering chain, and rendering the target foreground frame sequence, element content and background frame sequence respectively to obtain the target video. Another optional way is: according to the rendering levels from top to bottom, a rendering template is constructed, and the rendering chain is called to render the target foreground frame sequence, element content and background frame sequence in the rendering template respectively to obtain the target video. There is no limitation here.

[0156] Among them, during the rendering process, each frame is processed according to the rendering level and the time point, and a complete target video with an out-of-frame effect is output.

[0157] Exemplarily, a rendering template is constructed according to the rendering levels from the top layer, the middle layer and the bottom layer: a 3s target foreground frame sequence including a transparency rendering channel and only showing the rotating effect of the food is located at the top layer, a logo image of a food blogger, a description text of the food name, a dynamic display of the current time, and an element content of a fixed interactive control of "browse now" are located in the middle layer, and a 3s background frame sequence showing the effect of a dining table is located at the bottom layer. The rendering chain is called to render the target foreground frame sequence, element content and background frame sequence in the rendering template frame by frame, and obtain a 3s target video showing a section of food content.

[0158] In the embodiments of the present specification, by rendering the target foreground frame sequence, element content and background frame sequence respectively according to the rendering hierarchy from top to bottom, not only the reasonable superposition and fusion of the contents of each layer are ensured, but also the layering and visual effects of the video are enhanced, and the foreground video elements can be naturally displayed on the background. At the same time, the information richness and interactivity of the video are enhanced through dynamic and static supplementation of the element content. The layered rendering technology simplifies the complexity of video synthesis and improves processing efficiency.

[0159] In an optional embodiment of the present specification, after obtaining the element content, the following specific steps are also included:

[0160] Determine whether the element content conforms to the preset content format;

[0161] If not, preprocess the element content.

[0162] The preset content format is a format requirement specified in advance for the element content. The preset content format is usually to ensure that the element content can be correctly and beautifully integrated into the video. The preset content format may include image clarity, image size, image shape, text length, special effects format, etc. to ensure the consistency and visual effect of the element content in the video. For example, the image must be round or square and the size must be 100x100 pixels. For another example, the card must be a rounded rectangle and the size must be 600x300 pixels. For another example, the text shall not exceed 20 characters and the text must be bold and 12 font size.

[0163] Preprocessing is the process of formatting or adjusting the element content before it is rendered in the video to ensure that it conforms to the preset content format. Preprocessing usually includes operations such as cropping, scaling, text truncation, and format conversion to ensure that the element content can be displayed correctly in the video.

[0164] Exemplarily, the element content includes: a logo image of a food blogger, a descriptive text of a food name, a dynamic display of the current time, and a fixed interactive control of "browse now". For the logo image of the food blogger, the image must be circular or square and have a size of 100x100 pixels. If the logo image is not circular or square, it needs to be cropped to be circular or square. If the size of the logo image is not 100x100 pixels, it needs to be scaled to 100x100 pixels. For the descriptive text of the food name, the text length shall not exceed 20 characters, the text font must be bold, and the text size is 12 points. If the text length exceeds 20 characters, it needs to be truncated to not exceed 20 characters. If the text font is not bold, it needs to be converted to bold. If the text size is not 12 points, it needs to be adjusted to 12 points. For the dynamic display of the current time, the time format must be XXs. If the current time is not in the format of XXs, adjust it to that format. For the fixed interactive control of "Browse Now", the control must be a rounded rectangle with a size of 600x300 pixels. If the control is not a rounded rectangle, it needs to be cropped to a rounded rectangle, and if the size of the control is not 600x300 pixels, it needs to be scaled to 600x300 pixels.

[0165] In the embodiments of the present specification, by determining whether the element content conforms to a preset content format and preprocessing the element content if it does not conform, the consistency and aesthetics of the element content are ensured, thereby improving the visual effect and user experience of the video content.

[0166] In an optional embodiment of the present specification, the element content includes a logo image;

[0167] Determining whether the element content conforms to the preset content format includes the following specific steps:

[0168] Determine whether the logo image is a preset shape;

[0169] If not, preprocess the element content, including the following specific steps:

[0170] If not, the logo image is cut into a preset shape to obtain a logo image of the preset shape.

[0171] A logo is an iconic image that represents a user, brand, product, or service, and is often used to identify and distinguish different entities or brands. Logo icons are usually highly recognizable so that users can quickly recognize and connect with them.

[0172] Preset shapes are specific geometric shapes set for images to ensure that they meet design specifications or visual consistency requirements. Preset shapes can be circles, squares, ovals, triangles, etc. In design, using preset shapes can make elements look more unified and professional. For example, when designing a splash page, the preset shape may be specified as a circle, which means that all logo icons should be cut into circles.

[0173] Preset shape cropping is the process of cropping an image according to the requirements of a preset shape so that the image conforms to a specific geometric shape. Preset shape cropping usually involves removing parts of the image that do not conform to the preset shape to ensure that the final image can be perfectly integrated into the design. For example, if the preset shape is a circle and the logo icon is originally a rectangle, then the rectangular image needs to be cropped into a circle. This process may involve using the crop tool in the image editing software, selecting the circular selection and cropping away the excess parts.

[0174] Exemplarily, it is determined whether the logo image of the food blogger is in a preset circular shape. If not, a cropping tool is used to perform circular cropping on the logo image to obtain a circular logo image.

[0175] In the embodiments of the present specification, a logo image of a preset shape is obtained by determining whether the logo image conforms to a preset shape and, if it does not conform, cutting the logo image into the preset shape, thereby ensuring the consistency and aesthetics of the shape of the logo image element content and improving the visual effects and user experience of the video content.

[0176] In an optional embodiment of the present specification, if no, after the logo image is cut into a preset shape to obtain a logo image of a preset shape, the following specific steps are also included:

[0177] Anti-alias the edges of a logo image of a preset shape.

[0178] Since the cutting is completed according to the preset shape, jagged defects may appear. Therefore, edge anti-aliasing processing is required after cutting to make the edges of the logo image smoother and improve the overall quality of the image.

[0179] Edge anti-aliasing is the process of smoothing the edge pixels of an image to reduce or eliminate the jagged appearance of the edge pixels, thereby making the image edge smoother. Edge anti-aliasing usually involves using an algorithm to blend the colors of edge pixels to gradually transition to the background color or other adjacent colors, thereby reducing the visual sense of jaggedness, such as Gaussian blur.

[0180] Exemplarily, edge anti-aliasing is performed on a circular logo image: the colors of edge pixels are mixed to make edge transition more natural; a Gaussian blur effect is used to soften edge pixels and reduce jaggedness; and the transparency of edge pixels is adjusted to make the edge smoother.

[0181] In the embodiments of the present specification, by performing edge anti-aliasing processing on the cropped logo image, the edges of the logo image are made smoother, further ensuring the visual consistency and aesthetics of the logo image element content in the opening screen page, and further improving the visual effects and user experience of the video content.

[0182] In an optional embodiment of the present specification, the element content includes description text;

[0183] Determining whether the element content conforms to the preset content format includes the following specific steps:

[0184] Determine whether the text length of the description text meets a preset length threshold;

[0185] If not, preprocess the element content, including the following specific steps:

[0186] If not, the description text is truncated to obtain a truncated description text.

[0187] Description text is text content that describes the target video content. It includes but is not limited to: title description text and content description text, which is used to convey the main information or additional information of the video or image. Description text is usually used to help users understand the content of the video or image, provide additional information or guide users to take certain actions. For example, on the opening page of a content sharing application, the description text is a description of travel content, such as "Beautiful coastal city XX, love it".

[0188] The text length of the description text is the number of characters in the description text. The text length can help determine whether the description text is too long and needs to be truncated to fit the preset content format. For example, if the description text "Beautiful coastal city XX, I love it" has 14 characters, the text length is 14.

[0189] The preset length threshold is a character number threshold preset for the length of the description text to ensure that the description text is not too long when displayed. The preset length threshold is usually a maximum character limit set according to design requirements to ensure that the text does not exceed the predetermined area when displayed. For example, if the preset length threshold is set to 20 characters, any description text exceeding 20 characters needs to be truncated.

[0190] Truncation is the operation of truncating the description text that meets the preset length threshold. Usually, an indicator such as "..." or "show details" is added to prompt the user that the text has been truncated. Truncation is not limited to simply deleting extra characters, but also adds an indicator at the end of the text to inform the user that the text has been truncated, so that the user knows that there is more content that has not been displayed. This approach not only maintains the integrity of the description text, but also complies with the preset length threshold. For example, the description text is: "Beautiful coastal city XX, love love". The preset length threshold is 10 characters. The truncated description text can be: "Beautiful coastal city XX, love...", where "..." indicates that the text has been truncated. Alternatively, the truncated description text can be: "Beautiful coastal city XX, love... (show details)", where "show details" is a link or button that users can click to see the complete description text.

[0191] Truncated description text is a description text that has been truncated. Usually, when the length of the description text meets the preset length threshold, it deletes part of the content and adds an indicator such as "..." or "show details" at the end to prompt the user that the text has been truncated. The purpose of truncating the description text is to ensure that the text does not exceed the predetermined area when displayed. At the same time, by adding an indicator to inform the user that the text has been truncated, it can prompt the user to take further actions, such as viewing the full text.

[0192] Exemplarily, determine whether the text length (14 characters) of the descriptive text of the food name "Spicy crab legs, delicious, welcome to try" meets the preset length threshold (10 characters). If not, truncate the description text to obtain the truncated description text "Spicy crab legs, delicious...".

[0193] In the embodiments of the present specification, by determining whether the description text meets a preset length threshold and truncating the description text if it does not meet the threshold, a truncated description text is obtained, thereby ensuring the consistency and aesthetics of the description text element in text length and improving the visual effects and user experience of the video content.

[0194] In an optional embodiment of the present specification, according to the rendering levels from the top layer to the bottom layer, the target foreground frame sequence, the element content and the background frame sequence are rendered respectively to obtain the target video, including the following specific steps:

[0195] Generate an initialization rendering template, wherein the initialization rendering template includes a top layer, a middle layer, and a bottom layer;

[0196] Arrange the target foreground frame sequence, element content and background frame sequence to the top layer, middle layer and bottom layer of the initialization rendering template respectively to obtain the rendering template;

[0197] The top layer, middle layer and bottom layer of the rendering template are rendered to obtain the target video.

[0198] The initial rendering template is an initial video structure created to organize and manage different video elements during the video rendering process. The initial rendering template defines the size of the video element and / or element content, the relative position in the target video, and the special effects of the element content, such as the special effects of the text element content. The initial rendering template usually contains the top layer, middle layer, and bottom layer required for video rendering.

[0199] A rendering template is a template that is based on the initial rendering template and has specific video materials and element contents arranged therein. It defines the specific layout and hierarchical relationship of the video content in the target video. The rendering template places the specific video frame sequence and element contents in the corresponding hierarchy. Through the rendering template, precise alignment and fusion between different elements can be achieved.

[0200] Optionally, generating an initialization rendering template includes the following specific steps: defining a template structure of the initialization rendering template, creating multiple rendering levels (layers) of the top layer, middle layer and bottom layer for the template structure, and defining the size of the video elements and / or element contents, the relative position in the target video and the special effects of the element contents, for example, using a scripting language (such as Python combined with OpenCV or PIL library) or a programming language (such as C++ combined with OpenGL or DirectX) to define a template structure, defining multiple rendering levels in the code, and defining the size of the video elements and / or element contents, the relative position in the target video and the special effects of the element contents, etc.

[0201] Optionally, rendering the top layer, the middle layer, and the bottom layer of the rendering template to obtain the target video includes the following specific steps:

[0202] Call the rendering chain to render the top layer, middle layer, and bottom layer of the rendering template to obtain the target video.

[0203] Optionally, after rendering the top layer, the middle layer, and the bottom layer of the rendering template, at least one of the following specific steps is further included:

[0204] Fine-tune video elements; adjust rendering levels.

[0205] Exemplarily, a template structure is defined using a scripting language (such as Python combined with OpenCV or PIL library) or a programming language (such as C++ combined with OpenGL or DirectX), and three rendering levels are defined in the code: top layer, middle layer and bottom layer, and the size of the video element and / or element content, the relative position in the target video and the special effects of the element content are defined. On the basis of initializing the rendering template, the video elements of the target foreground frame sequence, element content and background frame sequence are specifically arranged: top layer: a 3-second target foreground frame sequence with a transparency rendering channel is arranged (showing the rotating effect of a dish of food). Middle layer: a logo image of a food blogger (circular or square, 100x100 pixels), a description text of the food name (such as "spicy crab legs, delicious and tasty...", no more than 20 characters, bold, size 12) are arranged, the current time is dynamically displayed (in the format of XXs), and a fixed interactive control of "browse now" (rounded rectangle, 600x300 pixels). Bottom layer: a 3-second background frame sequence showing the dining table effect is arranged. The rendering chain is called to render the top, middle, and bottom layers of the rendering template to obtain a 3-second target video showing a piece of food content.

[0206] In the embodiments of the present specification, multi-rendering level rendering from the top layer, middle layer and bottom layer is realized by means of rendering templates, ensuring that the video content of the target video is clearly layered, efficiently arranged and naturally integrated, presenting an out-of-frame effect. When the target application is started, the opening screen video with the out-of-frame effect is displayed on the opening screen page, thereby improving the visual effect of the content displayed on the opening screen page, thereby improving the user experience.

[0207] In an optional embodiment of the present specification, before rendering the target foreground frame sequence, element content and background frame sequence respectively according to the rendering levels from the top layer to the bottom layer to obtain the target video, the following specific steps are also included:

[0208] Construct the rendering chain of the initial foreground frame sequence, background frame sequence and element content;

[0209] Correspondingly, according to the rendering levels from the top layer to the bottom layer, the target foreground frame sequence, the element content and the background frame sequence are rendered respectively to obtain the target video, including the following specific steps:

[0210] According to the rendering level, each rendering chain is called to render the target foreground frame sequence, element content and background frame sequence respectively to obtain the target video.

[0211] A rendering chain is a series of rendering operations or instruction sets executed in sequence to render the corresponding video materials or element contents to ensure that they can be correctly presented in the target video. A rendering chain can include multiple stages, each of which is responsible for processing different aspects of the video, such as position adjustment, size adjustment, loading special effects, and setting up picture-in-picture. The rendering chain is used to optimize the video rendering process by breaking down complex rendering tasks into a series of simple steps to improve rendering efficiency and video quality. The rendering chain is constructed separately for the foreground frame sequence, background frame sequence, and element content. The rendering chain of each element can contain specific rendering steps to ensure that the video element can be correctly combined with other video elements.

[0212] For example, the rendering chain of the initial foreground frame sequence: Load frame sequence: Load the initial foreground frame sequence from storage. Apply special effects: Apply special effects to the target foreground frame sequence, such as blur, sharpen, etc. Adjust size and position: Adjust the size and position of the target foreground frame sequence as needed to meet the display requirements of the top layer.

[0213] For another example, the rendering chain of the background frame sequence: Load frame sequence: Load the background frame sequence from storage. Apply special effects: Apply special effects to the background frame sequence, such as blurring the background, adding a halo effect, etc. Adjust size and position: Adjust the size and position of the background frame sequence as needed to meet the underlying display requirements.

[0214] For example, the rendering chain of element content: Load element content: load element content such as logo images, description text, dynamic display, etc. Adjust size and position: adjust the size and position of each element as needed to meet the display requirements of the middle layer. Apply special effects: apply special effects to element content, such as adding shadows, highlights, etc.

[0215] Exemplarily, a rendering chain of an initial foreground frame sequence, a background frame sequence, and element content is constructed, and each rendering chain is called to render the target foreground frame sequence, element content, and background frame sequence respectively according to the rendering hierarchy from the top layer to the bottom layer, so as to obtain a 3s target video showing a piece of food content.

[0216] In the embodiments of this specification, a rendering chain is used to optimize the video rendering process, and a complex rendering task is decomposed into a series of simple steps to be executed, thereby improving rendering efficiency and video quality.

[0217] In an optional embodiment of the present specification, before obtaining the element content, the following specific steps are also included:

[0218] receiving a material package uploaded by a first user, wherein the material package includes video material;

[0219] Getting the element content includes the following specific steps:

[0220] Extract element content from video footage.

[0221] The material package is a set of files containing video materials. The material package is usually prepared by the first user and uploaded to the cloud server of the target application to complete the production and rendering.

[0222] One option for extracting element content from video material is to use computer vision technology to automatically detect and separate static image elements in the video, such as using visual neural network to extract images. Another option is to extract text information from video frames through optical character recognition (OCR) technology, such as the product description text "Brilliant Choice, Eternal Love".

[0223] Exemplarily, an advertising material package uploaded by an advertiser is received, a visual neural network is used to extract a merchant logo or a product image from the video material, and an optical character recognition technology is used to extract a description text from the video frame.

[0224] In the embodiments of the present specification, the advertising element content is automatically extracted from the video material, which provides high-quality material support for subsequent video production and rendering, and improves the efficiency of video production and rendering.

[0225] Figure 3 A schematic diagram of a video generation method provided by an embodiment of the present specification is shown. Figure 3 As shown:

[0226] An initial foreground frame sequence, a background frame sequence, a logo image, a jump image, a title description text, and a content description text are obtained as input.

[0227] In the material preprocessing stage:

[0228] Determine whether the logo image is a preset shape;

[0229] If yes, calculate the text length of the title description text and the content description text;

[0230] If not, the logo image is cropped into a preset shape to obtain a logo image of the preset shape, edge anti-aliasing processing is performed on the logo image of the preset shape, and the text lengths of the title description text and the content description text are calculated;

[0231] Determine whether the text length of the title description text and the content description text exceeds a preset length threshold;

[0232] If not, construct the rendering chain and rendering hierarchy of the initial foreground frame sequence, background frame sequence, logo image, jump image, title description text and content description text;

[0233] If so, the description text is truncated to obtain the truncated description text, and a rendering chain and rendering hierarchy of an initial foreground frame sequence, a background frame sequence, a logo image, a jump image, a title description text, and a content description text are constructed.

[0234] During the preloading phase:

[0235] Loading an initial foreground frame sequence, a background frame sequence, a logo image, a jump image, a title description text, and a content description text;

[0236] Adjust the size of the video element and / or its content, and its relative position in the target video;

[0237] Records the text effects of the title description text and content description text.

[0238] During the rendering phase:

[0239] Dividing a first color rendering channel and a second color rendering channel of an initial foreground frame sequence, superimposing the first color rendering channel and the second color rendering channel, and obtaining a target foreground frame sequence including a transparency rendering channel;

[0240] According to the rendering hierarchy from the top layer to the bottom layer, each rendering chain is called to render the target foreground frame sequence, element content (logo image, jump image, title description text and content description text) and background frame sequence respectively to obtain the target video;

[0241] The target video is sent to a client of a second user of the target application.

[0242] See also Figure 4 , Figure 4 A flowchart of a video playback method provided by an embodiment of the present specification is shown, which is applied to a client of a target application and includes the following specific steps:

[0243] Step 402: In response to a start operation on a target application or a trigger operation on a target page in the target application, a target video is played on a target page of the target application, wherein the target video is obtained by rendering a target foreground frame sequence and a background frame sequence respectively according to a rendering level, the target foreground frame sequence includes a transparency rendering channel, the transparency rendering channel is obtained by fusing color information of an initial foreground frame sequence based on a first color rendering channel and a second color rendering channel, the first color rendering channel and the second color rendering channel are determined by dividing the initial foreground frame sequence into color rendering channels, the first color rendering channel is a multi-color channel, and the second color channel is a single color channel.

[0244] The target application is an application launched by the user, which can be a mobile application or a desktop application, such as a social media application, a content sharing application, a game application, etc. In the target application, the target page is the page displayed when the target application is launched or the trigger operation of the target page in the target application. The target page can be a page that displays the playback window of the target video, including but not limited to: the opening page and the search result page. For example, the target application is an application for sharing travel content, and users can view and share travel content in this application.

[0245] The launch operation is the user's behavior that triggers the launch of the target application, including clicking the application icon, entering the launch command, scheduled launch, waking up the application from the background, etc. The launch operation is the first link in the user's interaction with the target application, and is also the key trigger point for the opening screen display. For example, a user clicks the application icon of an application for sharing travel content on the mobile phone desktop to launch the application.

[0246] The opening page of the target application is the full-screen page that is displayed first when the user launches the target application. This page usually appears during the startup process of the application to display information about a specific brand, product, or service. The design of the opening page is usually very attractive to attract the user's attention and provide a visually pleasing experience. The opening page can also alleviate the user's waiting anxiety caused by data loading time. For example, in a travel video application, the opening page may display a high-quality travel video, including the foreground of tourists playing on the beach, the background of the sunset behind, and the travel blogger's avatar and the published travel content text "Beautiful coastal city XX, love it".

[0247] Exemplarily, in response to a user's start-up operation on a content-sharing application, the 3-second target video showing a piece of food content is played on the opening page of the application.

[0248] The technical solution of the embodiment of this specification and the above-mentioned video generation method belongs to the same concept. The details not described in detail in step 402 can be found in the detailed description of the above-mentioned video generation method, and will not be repeated here.

[0249] In the embodiment of the present specification, by superimposing the first color rendering channel and the second color rendering channel in the initial foreground frame sequence, a target foreground frame sequence with a transparency rendering channel is generated, which not only adds richer visual content, but also increases the sense of hierarchy of the video content, so that the foreground frame sequence can be naturally presented without affecting the background video frame sequence and the element content, thereby improving the realism and delicacy of the picture. The target foreground frame sequence, element content and background frame sequence are rendered in sequence from the top layer to the bottom layer, ensuring a good degree of integration between the contents of each layer. In the startup operation of the target application or the triggering operation of the target page in the target application, the visual effect of at least part of the video elements touching, exceeding or covering the visible area of ​​the target video, or at least part of the video elements of the target video touching, exceeding or covering other parts of the video elements of the target video is presented, thereby improving the visual effect of the video content displayed on the target application, thereby improving the user experience.

[0250] At present, many advertisements on the splash page are mainly concentrated in the regular full-screen splash page, showing some high-quality content, such as text, pictures, videos, etc., which can not only attract the user's attention, but also effectively alleviate the user's anxiety when waiting for the data loading time from the splash page to the home page, and improve the user experience. How to adopt novel and innovative advertising forms can bring people a stronger visual impact and improve the visual effect and user experience of the advertising content displayed on the splash page is an issue that requires continuous exploration and innovation.

[0251] The following combination Figure 5 , taking the application of the video generation method provided in this specification in an advertising video as an example, Figure 5 A flowchart of a video generation method provided by an embodiment of the present specification is shown. The method is applied to a video production cloud platform, and the video production cloud platform is located at the cloud service end of the target application, and includes the following specific steps:

[0252] Step 502: Acquire the advertising video material and advertising element content uploaded by the advertising publisher, wherein the advertising video material includes an initial foreground frame sequence and a background frame sequence, the initial foreground frame sequence includes a first color rendering channel and a second color rendering channel, the first color rendering channel is a multi-color channel, and the second color channel is a single color channel.

[0253] The video production cloud platform is a video editing and production system based on cloud computing technology, which allows users to access powerful video editing tools and services through the Internet. Such platforms usually have functions such as video editing, special effects addition, and rendering processing, which can facilitate the creation and management of video content. The video production cloud platform provides professional video editing tools. Users do not need to install complex software, but can access these tools through the cloud network. In addition, the video production cloud platform also provides a large amount of storage space and computing resources, making the production of large-scale video projects more efficient.

[0254] The advertising video material is the original video material used to produce and render the target advertising video. The video material includes an initial foreground frame sequence and a background frame sequence. The video material may also include: jump animation and sound effect material, etc.

[0255] Advertisement element content refers to non-video materials used to produce and render the target advertisement video, including but not limited to: images, texts, variable elements and fixed elements. Among them, images are used to supplement the visual information in the video.

[0256] For example, a jewelry company's advertising video is placed on the opening page of a content sharing application, and the advertising video is required to show an out-of-frame effect. The advertising video material uploaded by the jewelry company includes a 3-second initial foreground frame sequence showing the rotation of the ring, and a 3-second background frame sequence showing the ripples on the water surface. The initial foreground frame sequence includes a first color rendering channel and a second color rendering channel, where the first color rendering channel retains the metallic luster and gem color of the ring, and the second color rendering channel is used to retain the ring outline information so that the transparency rendering channel can be superimposed later. The advertising elements provided by the jewelry company include: the merchant's logo image and the product description text "Brilliant Choice, Eternal Love".

[0257] Step 504: Based on the first color rendering channel and the second color rendering channel, the color information of the initial foreground frame sequence is fused to obtain a target foreground frame sequence including a transparency rendering channel.

[0258] Exemplarily, the first color rendering channel and the second color rendering channel of the initial foreground frame sequence are superimposed, and the color information of the initial foreground frame sequence is fused to obtain a target foreground frame sequence including a transparency rendering channel, which only displays the metallic sheen and gem color of the rendered ring itself, without displaying other video content.

[0259] Step 506: Render the target foreground frame sequence, element content and background frame sequence respectively according to the rendering levels from the top layer to the bottom layer to obtain the target advertisement video showing the target effect.

[0260] The target advertising video is a video produced by rendering, which is the result of integrating various advertising video materials and advertising element contents. Since the target advertising video is rendered by respectively rendering the target foreground frame sequence, advertising element content and background frame sequence including the transparency rendering channel from the top layer to the bottom layer, the target foreground frame sequence will present the target effect, that is, it will present the visual effect that at least part of the video elements touch, exceed or cover the visible area of ​​the target video, or at least part of the video elements of the target video touch, exceed or cover other part of the video elements of the target video.

[0261] Exemplarily, a rendering template is constructed according to the rendering levels from top to bottom: a 3s target foreground frame sequence showing the ring's rotation is located at the top layer, the merchant's logo image and the card containing the product description text "Brilliant Choice, Eternal Love" are located in the middle layer, and a 3s background frame sequence showing the water's surface fluctuations is located at the bottom layer. The rendering chain is called to render the target foreground frame sequence, advertising element content, and background frame sequence in the rendering template frame by frame to obtain a 3s target video showing the ring advertisement. In this way, the ring's rotation effect, logo and description text, and the water's surface fluctuation effect are integrated together, presenting a visual effect of the ring covering the card containing the logo and description text, that is, an out-of-frame effect.

[0262] The target foreground frame sequence, advertising element content and background frame sequence are rendered in sequence from the top layer to the bottom layer, ensuring a good degree of integration between the contents of each layer, presenting an out-of-frame effect, and laying the foundation for the subsequent playback of the target advertising video.

[0263] Step 508: Send the target advertisement video to the client of the user of the target application, so that the target advertisement video is played on the opening screen page of the target application in response to the user's start operation on the target application.

[0264] The client is a device or application instance used by the user to interact with the target application. This client can be an application on a mobile device (such as an app on a smartphone or tablet), software on a desktop computer, a web application in a web browser, etc. The client is the main interface for users to interact with the target application. It is responsible for displaying the content of the application, accepting user input, and communicating with the server of the target application to obtain data and services. The design of the first client usually takes into account the user experience to ensure that users can easily and conveniently use the various functions of the application.

[0265] For example, the target advertisement video is sent to the client of the user of the target application, so that on the client, in response to the user's operation of starting the content sharing application, the 3-second target advertisement video showing the ring rotating on the water surface is played on the opening screen page of the application. When the user opens the application, the first thing the user sees is the picture of the ring rotating gracefully on the clear water surface, accompanied by the merchant's logo and the card containing the product description text "Brilliant Choice, Eternal Love", and a "skip" interactive control rendered above, allowing the user to choose whether to continue watching the target advertisement video.

[0266] In the embodiment of the present specification, by dividing the initial foreground frame sequence into color rendering channels, determining the first color rendering channel of the multi-color channel and the second color rendering channel of the single color channel, the color information of the initial foreground frame sequence is fused based on the first color rendering channel and the second color rendering channel to obtain a target foreground frame sequence including a transparency rendering channel, which not only adds richer visual content, but also increases the sense of hierarchy of the advertising video content, so that the foreground frame sequence can be naturally presented without affecting the background video frame sequence, thereby improving the realism and delicacy of the picture. According to the rendering level, the target foreground frame sequence and the background frame sequence are rendered, ensuring a good degree of integration between the contents of each layer, presenting the target effect of the foreground video element appearing, and improving the visual effect of the advertising video content displayed on the target application, thereby improving the user experience.

[0267] Figure 6 A schematic diagram of the system architecture of a target application in a method for generating an advertisement video provided in an embodiment of the present specification is shown. Figure 6 As shown:

[0268] The advertisement production platform of the target application receives the advertisement element content, which is the initial foreground frame sequence, the background frame sequence and the description text, sent by the second client of the advertisement delivery party.

[0269] The video production cloud platform of the target application extracts the jump image and the logo image from the initial foreground frame sequence and the background frame sequence.

[0270] By applying the above steps 504 and 506, the rendering of the target foreground frame sequence, the advertisement element content (logo image and description text) and the background frame sequence is completed according to the rendering levels from the top layer to the bottom layer, and the target advertisement video is obtained.

[0271] The target advertisement text is sent to the first client of the user of the target application through the advertisement delivery end, so that the target advertisement video responds to the user's start operation of the target application and plays on the opening screen page of the target application.

[0272] Figure 7A playback effect diagram of an advertisement video generation method provided by an embodiment of this specification is shown. Figure 7 As shown:

[0273] The initial foreground frame sequence is a video frame sequence of the ring rotating, including multiple initial foreground video frames: the first initial foreground video frame and the second initial foreground video frame, the ring is presented forward in the first initial foreground video frame, and the ring is presented sideways in the second initial foreground video frame. Wherein, any initial foreground video frame includes a first color rendering channel and a second color rendering channel, wherein the first color rendering channel is a multi-color channel, representing color information, and the second color rendering channel is a multi-color channel, representing grayscale information.

[0274] The advertising elements include cards, logo images, description text "Brilliant choice, eternal love" and interactive controls for "Skip".

[0275] The background frame sequence is a video frame sequence of water surface fluctuations, including multiple background video frames: the first background video frame and the second background video frame.

[0276] By applying the above step 504, a target foreground frame sequence including a transparency rendering channel is obtained, and the target foreground frame sequence includes multiple target foreground video frames: a first target foreground video frame and a second target foreground video frame. The ring is presented forward in the first target foreground video frame, and the ring is presented sideways in the second target foreground video frame. Compared with the corresponding initial foreground video frame, the target foreground video frame only displays the video content of the ring rotating, and does not display other video content.

[0277] Applying the above step 506, the target foreground frame sequence, the advertising element content and the background frame sequence are rendered respectively according to the rendering levels from the top layer to the bottom layer to obtain the target advertising video presenting the target effect: from the time when the ring is presented on the front of the first target video frame to the time when the ring is presented on the side of the second target video frame, the bottom of the ring will appear and partially cover the card, presenting an out-of-frame effect.

[0278] Corresponding to the above method embodiment, this specification also provides a video generation device embodiment, Figure 8 FIG. 2 shows a schematic diagram of the structure of a video generation device provided by an embodiment of the present specification. Figure 8 As shown, the device is applied to the cloud service end of the target application, including:

[0279] The acquisition module 802 is configured to acquire video material, wherein the video material includes an initial foreground frame sequence and a background frame sequence;

[0280] The division module 804 is configured to divide the initial foreground frame sequence into color rendering channels, and determine a first color rendering channel and a second color rendering channel, wherein the first color rendering channel is a multi-color channel, and the second color channel is a single color channel;

[0281] A fusion module 806 is configured to perform fusion processing on the color information of the initial foreground frame sequence based on the first color rendering channel and the second color rendering channel to obtain a target foreground frame sequence including a transparency rendering channel;

[0282] The rendering module 808 is configured to render the target foreground frame sequence and the background frame sequence respectively according to the rendering level to obtain the target video.

[0283] Optionally, the partitioning module 804 is further configured to:

[0284] Based on the color information of the initial foreground frame sequence, the initial foreground frame sequence is divided into multiple color rendering channels to determine a first color rendering channel, and based on the grayscale information of the initial foreground frame sequence, the initial foreground frame sequence is divided into single color rendering channels to determine a second color rendering channel.

[0285] Optionally, the fusion module 806 is further configured to:

[0286] Based on the first color rendering channel and the second color rendering channel, the color information and the grayscale information of the initial foreground frame sequence are fused to obtain a target foreground frame sequence including a transparency rendering channel.

[0287] Optionally, the fusion module 806 is further configured to:

[0288] The first color rendering channel and the second color rendering channel are fused pixel by pixel to obtain a fusion weight matrix; based on the fusion weight matrix, the color information and grayscale information of each pixel in the initial foreground frame sequence are weighted to obtain fused color information; according to the fused color information, the transparency value of each pixel is calculated to determine the transparency rendering channel; based on the fused color information and the transparency rendering channel, the target foreground frame sequence is generated.

[0289] Optionally, the device further comprises:

[0290] An element content acquisition module is configured to acquire element content;

[0291] Correspondingly, the rendering module 808 is further configured to:

[0292] According to the rendering levels from the top layer to the bottom layer, the target foreground frame sequence, the element content and the background frame sequence are rendered respectively to obtain the target video.

[0293] Optionally, the rendering module 808 is further configured to:

[0294] Generate an initialization rendering template, wherein the initialization rendering template includes a top layer, a middle layer, and a bottom layer; arrange the target foreground frame sequence, element content, and background frame sequence to the top layer, the middle layer, and the bottom layer of the initialization rendering template respectively to obtain a rendering template; render the top layer, the middle layer, and the bottom layer of the rendering template to obtain a target video.

[0295] Optionally, the device further comprises:

[0296] A construction module configured to construct a rendering chain of an initial foreground frame sequence, element content, and a background frame sequence;

[0297] Correspondingly, the rendering module 808 is further configured to:

[0298] According to the rendering level from the top layer to the bottom layer, each rendering chain is called to render the target foreground frame sequence, element content and background frame sequence respectively to obtain the target video.

[0299] Optionally, the device further comprises:

[0300] A receiving module is configured to receive a material package, wherein the material package includes video material;

[0301] Correspondingly, the element content acquisition module is further configured as follows:

[0302] Extract element content from video footage.

[0303] In the embodiment of the present specification, by dividing the initial foreground frame sequence into color rendering channels, determining the first color rendering channel of the multi-color channel and the second color rendering channel of the single color channel, based on the first color rendering channel and the second color rendering channel, the color information of the initial foreground frame sequence is fused and processed to obtain a target foreground frame sequence including a transparency rendering channel, which not only adds richer visual content, but also increases the sense of hierarchy of the video content, so that the foreground frame sequence can be naturally presented without affecting the background video frame sequence, thereby improving the realism and delicacy of the picture. According to the rendering level, the target foreground frame sequence and the background frame sequence are rendered, ensuring a good degree of integration between the contents of each layer, presenting a visual effect that at least part of the video elements touch, exceed or cover the visible area of ​​the target video, or at least part of the video elements of the target video touch, exceed or cover other parts of the video elements of the target video, thereby improving the visual effect of the video content displayed on the target application, thereby improving the user experience.

[0304] The above is a schematic scheme of a video generation device of this embodiment. It should be noted that the technical scheme of the video generation device and the technical scheme of the above video generation method belong to the same concept, and the details not described in detail in the technical scheme of the video generation device can be referred to the description of the technical scheme of the above video generation method.

[0305] Corresponding to the above method embodiment, this specification also provides a video playback device embodiment, Fig. 9 FIG. 1 is a schematic diagram showing the structure of a video playback device provided by an embodiment of the present specification. Fig. 9 As shown, the device is on the client side of the target application and includes:

[0306] The playback module 902 is configured to play the target video on the target page of the target application in response to a startup operation on the target application or a trigger operation on the target page in the target application, wherein the target video is obtained by rendering the target foreground frame sequence and the background frame sequence respectively according to the rendering level, the target foreground frame sequence includes a transparency rendering channel, the transparency rendering channel is obtained by fusing the color information of the initial foreground frame sequence based on the first color rendering channel and the second color rendering channel, the first color rendering channel and the second color rendering channel are determined by dividing the initial foreground frame sequence into color rendering channels, the first color rendering channel is a multi-color channel, and the second color channel is a single color channel.

[0307] In the embodiment of the present specification, by superimposing the first color rendering channel and the second color rendering channel in the initial foreground frame sequence, a target foreground frame sequence with a transparency rendering channel is generated, which not only adds richer visual content, but also increases the sense of hierarchy of the video content, so that the foreground frame sequence can be naturally presented without affecting the background video frame sequence and the element content, thereby improving the realism and delicacy of the picture. The target foreground frame sequence, element content and background frame sequence are rendered in sequence from the top layer to the bottom layer, ensuring a good degree of integration between the contents of each layer. In the startup operation of the target application or the triggering operation of the target page in the target application, the visual effect of at least part of the video elements touching, exceeding or covering the visible area of ​​the target video, or at least part of the video elements of the target video touching, exceeding or covering other parts of the video elements of the target video is presented, thereby improving the visual effect of the video content displayed on the target application, thereby improving the user experience.

[0308] The above is a schematic scheme of a video playback device of this embodiment. It should be noted that the technical scheme of the video playback device and the technical scheme of the above video playback method belong to the same concept, and the details not described in detail in the technical scheme of the video playback device can be referred to the description of the technical scheme of the above video playback method.

[0309] Fig.10 The block diagram of a computing device provided by one embodiment of the present specification is shown. The components of the computing device 1000 include but are not limited to a memory 1010 and a processor 1020. The processor 1020 is connected to the memory 1010 via a bus 1030, and the database 1050 is used to store data.

[0310] The computing device 1000 also includes an access device 1040, which enables the computing device 1000 to communicate via one or more networks 1060. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1040 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, and a Near Field Communication (NFC).

[0311] In one embodiment of the present specification, the above components of the computing device 1000 and Fig.10 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.10 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0312] The computing device 1000 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1000 may also be a mobile or stationary server.

[0313] The processor 1020 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-mentioned video generation method or video playback method.

[0314] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned video generation method and video playback method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned video generation method or video playback method.

[0315] An embodiment of the present specification further provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned video generation method or video playback method when executed by a processor.

[0316] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the video generation method and the video playback method described above are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the video generation method or the video playback method described above.

[0317] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned video generation method or video playback method when executed by a processor.

[0318] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the video generation method and the video playback method described above are of the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the video generation method or the video playback method described above.

[0319] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0320] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the contents contained in the computer readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer readable media do not include electric carrier signals and telecommunication signals.

[0321] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0322] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0323] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to specific implementation methods. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can understand and use this specification well. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A video generation method, characterized in that: The cloud service end applied to the target application includes: Acquire video material, wherein the video material includes an initial foreground frame sequence and a background frame sequence; Performing color rendering channel division on the initial foreground frame sequence to determine a first color rendering channel and a second color rendering channel, wherein the first color rendering channel is a multi-color channel and the second color channel is a single color channel; Based on the first color rendering channel and the second color rendering channel, color information of the initial foreground frame sequence is fused to obtain a target foreground frame sequence including a transparency rendering channel; According to the rendering level, the target foreground frame sequence and the background frame sequence are rendered respectively to obtain a target video.

2. The method according to claim 1, characterized in that The dividing the initial foreground frame sequence into color rendering channels to determine a first color rendering channel and a second color rendering channel comprises: Based on the color information of the initial foreground frame sequence, the initial foreground frame sequence is divided into multiple color rendering channels to determine a first color rendering channel, and based on the grayscale information of the initial foreground frame sequence, the initial foreground frame sequence is divided into single color rendering channels to determine a second color rendering channel.

3. The method according to claim 2, characterized in that The step of fusing the color information of the initial foreground frame sequence based on the first color rendering channel and the second color rendering channel to obtain a target foreground frame sequence including a transparency rendering channel includes: Based on the first color rendering channel and the second color rendering channel, the color information and the grayscale information of the initial foreground frame sequence are fused to obtain a target foreground frame sequence including a transparency rendering channel.

4. The method according to claim 3, characterized in that The step of fusing the color information and grayscale information of the initial foreground frame sequence based on the first color rendering channel and the second color rendering channel to obtain a target foreground frame sequence including a transparency rendering channel includes: Performing pixel-by-pixel fusion on the first color rendering channel and the second color rendering channel to obtain a fusion weight matrix; Based on the fusion weight matrix, weighted processing is performed on the color information and grayscale information of each pixel point of the initial foreground frame sequence to obtain fused color information; Calculate the transparency value of each pixel according to the fused color information and determine the transparency rendering channel; A target foreground frame sequence is generated based on the fused color information and the transparency rendering channel.

5. The method according to any one of claims 1 to 4, characterized in that: Before rendering the target foreground frame sequence and the background frame sequence according to the rendering level to obtain the target video, the method further includes: Get element content; The step of rendering the target foreground frame sequence and the background frame sequence respectively according to the rendering level to obtain the target video includes: According to the rendering levels from the top layer to the bottom layer, the target foreground frame sequence, the element content and the background frame sequence are rendered respectively to obtain the target video.

6. The method according to claim 5, characterized in that The step of rendering the target foreground frame sequence and the background frame sequence respectively according to the rendering level to obtain the target video includes: Generate an initialization rendering template, wherein the initialization rendering template includes a top layer, a middle layer, and a bottom layer; Arranging the target foreground frame sequence, the element content and the background frame sequence to the top layer, the middle layer and the bottom layer of the initialization rendering template respectively to obtain a rendering template; The top layer, the middle layer and the bottom layer of the rendering template are rendered to obtain a target video.

7. The method according to claim 5, characterized in that Before rendering the target foreground frame sequence, the element content and the background frame sequence according to the rendering levels from the top layer to the bottom layer to obtain the target video, the method further includes: Constructing a rendering chain of the initial foreground frame sequence, the element content and the background frame sequence; The step of rendering the target foreground frame sequence, the element content, and the background frame sequence respectively according to the rendering levels from the top layer to the bottom layer to obtain the target video comprises: According to the rendering levels from the top layer to the bottom layer, each rendering chain is called to render the target foreground frame sequence, the element content and the background frame sequence respectively to obtain the target video.

8. The method according to claim 5, characterized in that Before obtaining the element content, the method further includes: Receiving a material package, wherein the material package includes video material; The obtaining of element content includes: Element content is extracted from the video material.

9. A video playback method, characterized in that: Clients for target applications include: In response to a start operation on the target application or a trigger operation on a target page in the target application, a target video is played on the target page of the target application, wherein the target video is obtained by rendering a target foreground frame sequence and a background frame sequence respectively according to a rendering level, the target foreground frame sequence includes a transparency rendering channel, the transparency rendering channel is obtained by fusing color information of an initial foreground frame sequence based on the first color rendering channel and the second color rendering channel, the first color rendering channel and the second color rendering channel are determined by dividing the initial foreground frame sequence into color rendering channels, the first color rendering channel is a multi-color channel, and the second color channel is a single color channel.

10. A computing device comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 9 are implemented.

11. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 9.

12. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 9.

Citation Information

Cited By

  • Broadcast-level data visualization content generation method based on cloud rendering

    CN121462824A