A method, system and storage medium for efficient dynamic video rendering
By identifying and processing static and dynamic layers in video files, and using depth-first traversal algorithm and template generation technology, constant-time complexity rendering at request time is achieved, which solves the waste of resources and the problem of dynamic video changes in the existing technology. Latency problem, support video customization for multiple applications and viewers.
Patent Information
- Application Number
- CN202080008316.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-14
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-05-14
AI Technical Summary
The existing technology is difficult to achieve predictable rendering time when dynamically changing video design, and consumes large resources, resulting in user experience delays and resource waste.
By identifying the static and dynamic layers in the video file, a depth-first traversal algorithm is used to flatten the document object model, generate templates and perform pre-rendering. The dynamic layers are saved in the form of instruction data, and the static layers are saved as images, which are performed when compositing the video. Alpha blending, achieving O(1) time complexity rendering.
It realizes dynamically changing videos with constant time complexity on request, reduces computing resources and delays, supports video customization for multiple applications and viewers, and reduces resource consumption of video design and delivery systems.
Smart Images

Figure CN113966619B
Abstract
Description
Background Art
[0001] This document relates to a method for efficiently rendering videos with dynamic components. Summary of the invention
[0002] Generally, an innovative aspect of the subject matter described in this specification can be embodied in a method for efficiently rendering a video with a dynamic component. The method can include identifying a file for rendering a video including one or more static layers and one or more dynamic layers, detecting one or more static layers and one or more dynamic layers based on analyzing one or more fields of the file for rendering the video, wherein each dynamic layer includes an annotation indicating a variable component, rendering the one or more static layers of the file, receiving a request for a video including user information from a user device, determining a variable definition designated as an insertion into a dynamic layer based on the user information, rendering the one or more dynamic layers using the variable definition, and generating a composite video for playback from the rendered one or more static layers and the rendered one or more dynamic layers.
[0003] These and other embodiments can each optionally include one or more of the following features.
[0004] In some embodiments, the method includes flattening a document object model of a file for rendering a video using a depth-first traversal algorithm. The method may include generating a template indicating one or more static layers and one or more dynamic layers based on the rendered one or more static layers. Rendering one or more dynamic layers using variable definitions may include populating the template using the variable definitions.
[0005] In some implementations, the file includes one or more frames, and rendering one or more static layers of the file includes, for each of the one or more static layers, saving an image of each frame.
[0006] In some implementations, generating a composite video for playback from the rendered one or more static layers and the rendered one or more dynamic layers includes performing an alpha blending operation to combine the rendered one or more static layers and the rendered one or more dynamic layers.
[0007] In some implementations, at least one of the one or more dynamic layers includes at least one of an image, text, video, and color representing a logo.
[0008] Other embodiments of this aspect may include corresponding systems, apparatus, and computer programs configured to perform the actions of the method encoded on a computer storage device.
[0009] Specific embodiments of the subject matter described in this document may be implemented to achieve one or more of the following advantages. In some environments, there was previously no way to dynamically change a video design so that the design could be customized and rendered to be presented to a user at a predictable or constant time upon request so that the user experience was not altered. This shortcoming may be addressed by the techniques, devices, and systems discussed herein. The techniques described in this document enable a system to use fewer resources and perform fewer operations to generate customized videos relevant to a use case such as a specific application, user, product, or service.
[0010] Typically, video compositing program rendering times depend on the complexity of the video project being rendered. Existing solutions for video editing and compositing require completely re-rendering the entire video project in order to make changes to a portion of the video project. These solutions are often time and resource intensive and cannot be executed on request without causing noticeable delays before the requester receives the edited video.
[0011] The new system can support constant rendering time independent of graphics complexity. In other words, the system can dynamically change and render video in O(1) time regardless of graphics complexity. The system can, for example, save layer groups as image sequences or save static layers. When the system detects a layer that is indicated as a dynamic layer, the system can, for example, save instruction data indicating the structure of the layer and its position relative to other layers instead of an image. The saved instruction data is used to form the dynamic layer. The dynamic layer can be saved in position with the static layer. Because the static layer has been saved as an image, most of the computational work required for the final rendering is compositing, or combining the layers (both static and dynamic) into a single image in the correct z-depth order. The new system is optimized for performing compositing, so it is able to update dynamic elements of dynamic layers and perform the final rendering in a predictable or constant time, regardless of graphics complexity.
[0012] The system provides an efficient solution that allows customized videos to be delivered at runtime with minimal computation because it is able to reduce the complexity of the operations required when a request for a video is received. By saving static layers as images, the system performs much of the computationally intensive processing in advance of the request, thereby reducing the amount of computational resources required to alter and render the video at request time, thereby reducing latency for end users requesting the video.
[0013] The system allows video projects to be customized for specific applications, user preferences, geographic locations, etc. In addition to reducing the amount of resources required to customize and render videos for each request, the system also reduces the overall amount of resources consumed by allowing a single video project to be adapted and used for different applications and audiences.
[0014] Utilizing the method allows for customization of videos that better meet user requirements and expectations while saving resources and reducing the video design work that needs to be redone. Additionally, the improved update process provides efficiencies in the content personalization and delivery system by eliminating the need to re-render portions of the video that will not be dynamically changed or updated. The system provides a way for video designers, developers, and content providers to specifically produce image and video content after the design, editing, and post-processing stages, which require significant resource expenditures.
[0015] The details of one or more embodiments of the subject matter described in this specification are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the subject matter will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a block diagram of a sample environment for efficient, dynamic video editing and rendering.
[0017] Figure 2 Describes the data flow for efficient and dynamic video rendering process.
[0018] Figure 3 is a flowchart of an example process for efficient, dynamic video editing and rendering.
[0019] Figure 4 is a block diagram of an example computing system.
[0020] The same reference numbers and names in different drawings indicate the same elements. DETAILED DESCRIPTION
[0021] This document describes methods, systems, and devices that can increase video editing and rendering speed and allow a single video project to be used in multiple applications and cater to different audience preferences.
[0022] In some embodiments, the system allows the completed video project to be changed upon request and provided to the requesting user with little or no noticeable delay. The user may be, for example, a video creator who wishes to adapt a video project for a specific client or end user of the system for content distribution. The system may receive a video project file from a video composition program, for example, in the form of a composition item. The system may then flatten and process the file to identify layers; determine whether each layer is dynamic or static; and classify and label each layer based on the type of data contained within the layer. A dynamic layer may include, for example, variable components to be filled or changed before final rendering. After the layers have been classified, the layer data is wrapped in a class to be converted into an object containing all the source data required to render the layer. Consecutive static layers may be wrapped together because these static layers can be output together as pre-rendered images, saving storage space and export time. The object is then exported to a multi-layer template based on the data type, pre-rendering the static layer and including instruction data for the dynamic layer. In some embodiments, the system performs pre-rendering of the static layer once for each template. When a request for a video associated with a video project file is received, the system can populate the variable portions of the dynamic layers and perform a composition of the pre-rendered static layers and the populated dynamic layers to produce a final video to be presented in response to the request. In some implementations, the system can populate the variable portions of the dynamic layers and the composition of the pre-rendered static layers and the populated dynamic layers for one or more instantiations of the video, such as different versions of the video.
[0023] Figure 1 1 is a block diagram of an example environment 100 for efficient, dynamic video editing and rendering. The example environment 100 includes a network 102, such as a local area network (LAN), a wide area network (WAN), the Internet, or a combination thereof. The network 102 connects an electronic document server 104 ("e-Doc server"), a user device 106, and a digital component distribution system 110 (also referred to as DCDS 110). The example environment 100 may include many different electronic document servers 104 and user devices 106.
[0024] User devices 106 are electronic devices capable of requesting and receiving resources (e.g., electronic documents) over network 102. Example user devices 106 include personal computers, mobile communication devices, and other devices that can transmit and receive data over network 102. User devices 106 typically include user applications, such as a web browser, to facilitate transmitting and receiving data over network 102, although local applications executed by user devices 106 may also facilitate transmitting and receiving data over network 102.
[0025] One or more third parties 150 include content providers, product designers, product manufacturers, and other parties involved in the design, development, marketing, or distribution of videos, products, and / or services.
[0026] An electronic document is data that presents a collection of content at a user device 106. Examples of electronic documents include web pages, word processing documents, portable document format (PDF) documents, images, videos, search result pages, and feed sources. Local applications (e.g., "apps") such as applications installed on mobile, tablet, or desktop computing devices are also examples of electronic documents. An electronic document 105 ("electronic Doc") can be provided to a user device 106 by an electronic document server 104. For example, an electronic document server 104 can include a server that hosts a publisher's website. In this example, a user device 106 can initiate a request for a given publisher's web page, and the electronic document server 104 that hosts the given publisher's web page can respond to the request by transmitting a machine hypertext markup language (HTML) code that initiates the presentation of the given web page at the user device 106.
[0027] An electronic document may include a variety of content. For example, an electronic document 105 may include static content (e.g., text or other specified content) that is within the electronic document itself and / or does not change over time. An electronic document may also include dynamic content that may change over time or based on each request. For example, a publisher of a given electronic document may maintain a data source for populating a portion of an electronic document. In this example, a given electronic document may include a tag or script that causes a user device 106 to request content from a data source when a given electronic document is processed by the user device 106 (e.g., rendered or executed). The user device 106 integrates the content obtained from the data source into the presentation of a given electronic document to create a composite electronic document including the content obtained from the data source.
[0028] In some cases, a given electronic document may include a digital content tag or digital content script that references the DCDS 110. In these cases, when the given electronic document is processed by the user device 106, the digital content tag or digital content script is executed by the user device 106. The execution of the digital content tag or digital content script configures the user device 106 to generate a request 108 for digital content, wherein the request 108 is sent to the DCDS 110 via the network 102. For example, the digital content tag or digital content script may enable the user device 106 to generate a packetized data request including header and payload data. The request 108 may include data such as the name (or network location) of the server from which the digital content is being requested, the name (or network location) of the requesting device (e.g., the user device 106), and / or information that the DCDS 110 may use to select the digital content to be provided in response to the request. The request 108 is sent by the user device 106 to the server of the DCDS 110 via the network 102 (e.g., a telecommunications network).
[0029] The request 108 may include data specifying characteristics of the electronic document and the location where the digital content may be presented. For example, data specifying a reference (URL) to an electronic document (e.g., a web page) where the digital content will be presented, an available location (e.g., a digital content slot) where the electronic document may be presented, the size of the available location, the location of the available location within the presentation of the electronic document, and / or the type of media eligible for presentation in the location may be provided to the DCDS 110. Similarly, data specifying keywords ("document keywords") specified for selection of the electronic document or entities (e.g., people, places, or things) referenced by the electronic document may also be included in the request 108 (e.g., as payload data) and provided to the DCDS 110 to facilitate identification of digital content items eligible for presentation with the electronic document.
[0030] The request 108 may also include data related to other information, such as information that the user has provided, geographic information indicating the state or region from which the request is being submitted, or other information that provides context for the environment in which the digital content will be displayed (e.g., the type of device on which the digital content will be displayed, such as a mobile device or tablet device). The user-provided information may include demographic data of the user of the user device 106. For example, the demographic information may include characteristics such as age, gender, geographic location, education level, marital status, household income, occupation, hobbies, social media data, and whether the user owns a particular item.
[0031] For the situation that the system discussed here collects personal information about the user or can make use of personal information, the user can be provided with the opportunity to control whether the program or function collects personal information (for example, information about the user's social network, social actions or activities, profession, user preferences or user's current location), or control whether and / or how to receive content that may be more relevant to the user from the content server. In addition, some data can be anonymized in one or more ways before being stored or used, so that personally identifiable information is removed. For example, the user's identity can be anonymized so that personally identifiable information cannot be determined for the user, or the user's geographic location can be summarized as a place (such as a city, ZIP code (postal code) or state level) where location information is obtained, so that the user's specific location cannot be determined. Therefore, the user can control how to collect information about him or her and how to use the information by the content server.
[0032] Data specifying characteristics of the user device 106 may also be provided in the request 108, such as information identifying the model of the user device 106, the configuration of the user device 106, or the size (e.g., physical size or resolution) of an electronic display (e.g., a touch screen or a desktop monitor) presenting the electronic document. The request 108 may be sent, for example, over a packetized network, and the request 108 itself may be formatted as packetized data having a header and payload data. The header may specify a destination for the packet, and the payload data may include any of the information discussed above.
[0033] In response to receiving the request 108 and / or using the information included in the request 108, the DCDS 110 selects the digital content to be presented with the given electronic document. In some embodiments, the DCDS 110 is implemented in a distributed computing system (or environment), wherein the distributed computing system (or environment) includes, for example, a server and a collection of multiple computing devices that are interconnected and identify and distribute digital content in response to the request 108. The collection of multiple computing devices operates together to identify a collection of digital content that is eligible for presentation in an electronic document from a corpus of millions or more available digital content. Millions or more of the available digital content can be indexed, for example, in a digital component database 112. Each digital content index entry can reference the corresponding digital content and / or include distribution parameters (e.g., selection criteria) that determine the distribution of the corresponding digital content.
[0034] In some embodiments, the digital components from the digital component database 112 may include content provided by a third party 150. For example, the digital component database 112 may receive a photo of a public intersection from a third party 150 that uses machine learning and / or artificial intelligence to navigate public streets. In another example, the digital component database 112 may receive a specific question from a third party 150 that provides services to bicycle riders that the third party 150 wants a response from the user. Additionally, the DCDS 110 may present video content, including content from, for example, the video rendering processor 130 and video content provided by the video rendering processor 130 and stored in the digital component database 112.
[0035] Identifying eligible digital content can be split into multiple tasks, which are then distributed among computing devices within a collection of multiple computing devices. For example, different computing devices can each analyze different portions of digital component database 112 to identify various digital content with distribution parameters that match the information included in request 108.
[0036] DCDS 110 aggregates the results received from the set of multiple computing devices and uses information associated with the aggregated results to select one or more instances of digital content to be provided in response to request 108. In turn, DCDS 110 may generate and send, over network 102, reply data 114 (e.g., digital data representing the reply) that enables user device 106 to integrate the selected set of digital content into a given electronic document, such that the selected set of digital content and the content of the electronic document are presented together at a display of user device 106.
[0037] Video compositing program (VCP) 120 allows a user to create a video project file. A video project file represents a collection of data used to render a video. In some embodiments, a video project file is a composite item, wherein each of the composite items can be manipulated and provides information about objects within the collection of items. A composite item can be, for example, an item that includes several layers alpha-blended together with an alpha channel. For ease of explanation, VCP 120 is described as a video compositing program, but VCP 120 can also perform digital visual effects, motion graphics, and / or compositing processing. For example, VCP 120 can be a program used for post-production processing of a video.
[0038] The video rendering processor (VRP) 130 receives the video project file from the VCP 120 and processes the video project file to detect, mark, populate and render the video project file components. The VRP 130 includes a flattener 132, a classifier 134 and an exporter 136. The flattener 132 flattens the components of the received video project file, such as layers. The classifier 134 classifies and marks the layers of the received video project file. The exporter 136 determines how to process the marked layers to generate a template file, and how to process the template file and one or more modified or populated layers for final output.
[0039] For ease of explanation, the flattener 132, the classifier 134, and the exporter 136 are described in Figure 1 130. The VRP 130 may be implemented as a single system on a non-transitory computer-readable medium. In some embodiments, one or more of the flattener 132, the classifier 134, and the exporter 136 may be implemented as an integrated component of a single system. The VRP 130, its components the flattener 132, the classifier 134, the exporter 136, and their respective outputs are described in further detail below.
[0040] The template instantiation system 140 instantiates the template created by the VRP 130, which fills and / or changes the dynamic layers of the template. In some embodiments, the template instantiation system 140 can, for example, fill and / or change the dynamic layers of one or more versions of the video by instantiating one or more templates for each version of the video. In this particular embodiment, the template instantiation system 140 is shown as being separate from the VRP 130. The template instantiation system 140 can, for example, receive input indicating how a particular layer should be instantiated. The template instantiation system 140 can receive input from other components of the system 100, including the user device 106, the VCP 120, and the third party 150. In some embodiments, the template instantiation system 140 includes predetermined values to fill in specific layers of the template created by the VRP 130. The template instantiation system 140 can determine different values for filling in the template based on input from, for example, the user device 106, the VCP 120, and / or the third party 150.
[0041] In some implementations, the template instantiation system 140 may be integrated with the VRP 130 or a component of the VRP 130. For example, the template instantiation system 140 may be a module of the VRP 130 and may communicate with other components of the system 100.
[0042] The template instantiation system 140 provides the instantiated template to the VRP 130 for final rendering and output. For example, the template instantiation system 140 can instantiate each of the dynamic layers into an object populated with the variable components of the layer. These objects can then be stored in a collection to be passed to the VRP 130 for final rendering. In some embodiments, the template instantiation system 140 can provide the collection to the VRP 130 as a multi-layer rendering request.
[0043] The techniques described below enable the system to efficiently edit and render video regardless of complexity.
[0044] Figure 2 Shows Figure 1 1. The operation of data flow 200 is performed by various components of system 100. For example, the operation of data flow 200 can be performed by video rendering processor 130 in communication with DCDS 110, video composition program 120, template instantiation system 140, and user device 106.
[0045] The process begins at step A, where the VCP 120 provides a video project file 202 to the VRP 130. The video project file 202 is an object that represents a composition. For example, the video project file 202 can be a CompItem object with a collection of items. The video project file 202 can be manipulated, and information about the object and its collection of items can be obtained. In some embodiments, the items in the collection of video project files 202 can be accessed by a position index number in the collection. These items are objects, such as video layers that make up a video, which contain components such as images, text, audio, and / or objects.
[0046] The video project file 202 may be generated by a user of the VCP 120. For example, a video creator or designer may create the video project file 202. A user may indicate portions of a video that may be replaced or altered. In some implementations, a user may use built-in fields of the VCP 120, such as a comment field, to mark a particular layer as dynamic. For example, a user of the VCP 120 may use a comment field of a layer to set a variable "var" to true, thereby indicating that at least a portion of the layer may be replaced or altered. In some implementations, if a portion of the indicated layer is not replaced or altered, a user may indicate a default value to be used, such as an existing layer. In some implementations, a user may indicate a predetermined set of values to be used in place of a portion of the indicated layer based on factors such as user preferences, user demographics, location information, and other information received.
[0047] The process continues to step B, where the VRP 130 flattens the document object model (DOM) of the video project file 202. The DOM is a cross-platform and language-independent interface for representing documents in a logical tree structure, where each node is an object representing a portion of the document. Each branch of the tree ends with a node, and each node contains an object. In some embodiments, each of the layers in the video project file 202 is a pointer to another synthesis, which provides a point of hierarchy or depth. The flattener 132 of the VRP 130 can iterate across the objects in the DOM of the video project file 202. For example, the flattener 132 of the VRP 130 can perform a depth-first flattening of all layers within the DOM of the video project file 202. The depth-first flattening can be implemented by, for example, selecting the starting node of the DOM of the video project file 202 and pushing all its adjacent nodes into a stack; popping a node from the stack to select the next node to be visited, and pushing all adjacent nodes of the node into the stack; and repeating the process until the stack is empty. In some embodiments, the flattener 132 may iterate across each layer in z-depth order or in breadth-wise order. Horizontal flattening may be implemented, for example, using the opposite strategy as depth-first flattening by starting with the DOM root of the video project file 202 and exploring all neighboring nodes at the current depth before moving to nodes at the next depth level.
[0048] The process continues to step C, where VRP 130 classifies each of the layers of video project file 202 so that the appropriate export module can be identified for later use. In some embodiments, step C is performed simultaneously with step B, so that VRP 130 classifies the layers as they are flattened through a depth-first algorithm. For example, as flattener 132 explores each of the nodes, classifier 134 can detect a specific file format for each detected layer and mark the layer so that VRP 130 can select an appropriate export module for rendering the layer.
[0049] The classifier 134 can detect whether a layer is a dynamic layer - a layer with variable components or components that can be changed - or a static layer - a layer without variable components or components that can be changed. For example, a static layer can be an image, such as an image of the sun that remains in the background of a video. In some embodiments, a static layer can be a layer that does not change in the final render. For example, static layers in a video can include all layers that do not have variable components and can be rendered before the request time. In some embodiments, a dynamic layer can be, for example, a 2D or 3D image or video that needs to be placed or moved around a video scene. For example, a dynamic layer can be a business logic image element, such as a rating star (for a rating out of five stars) or a color layer, such as a green background.
[0050] In some implementations, the classifier 134 may identify whether a layer is a dynamic layer by determining whether a field of the layer has a specific value. The classifier 134 may determine, for example, whether a comment field of a layer contains a specific variable or text set. In one example, the classifier 134 may check whether the value of the statement Layer.comment.contains('var=true') for a specific layer is TRUE to determine whether the layer is dynamic.
[0051] In addition to determining whether a layer is dynamic or static, classifier 134 can also classify and label each layer based on the type of data contained within the layer. These labels can be used to determine the appropriate export module for rendering the layer. For example, classifier 134 can check whether the value of the statement Layer.constructor == AVLayer is TRUE to determine whether the layer is a video layer. A video layer can include, for example, audio or image data.
[0052] In another example, classifier 134 may check whether the value of the statement Layer.constructor==TextLayer is TRUE to determine whether the layer is a text layer. For example, if the layer is a dynamic text layer, the properties of the layer that may be changed include the text itself, placement, transparency, size, color, and font. The text layer may include, for example, 2D or 3D text.
[0053] In another example, the classifier 134 may check whether the value of the statement Layer.source.typeName == 'Composition' is TRUE to determine whether the layer is a level node of the DOM. For example, if the classifier 134 determines that the layer is a level node, the VRP 130 uses the node as a point in the DOM hierarchy and uses recursion to continue flattening the DOM of the video project file 202 until the entire tree has been traversed.
[0054] In another example, the classifier 134 may check whether the value of the statement Layer.comment DOES NOT contain('var=true') is TRUE to determine whether the layer is a static layer. Static layers do not change in the final rendering and therefore can be treated differently from dynamic layers. The processing of static and dynamic layers will be further explained in the following steps.
[0055] The process continues to step D, where the VRP 130 uses the flattened, classified layers of the video project file 202 to create a template. For example, the exporter 136 can create templates representing the dynamic and static layers of the video project file 202. After each layer is classified, the exporter 136 can wrap the layer in a queued class. For example, the exporter 136 can wrap the layer in a class that contains all the source materials required to render the layer. These items can be stored in a queue to be exported to the template. In some embodiments, after the layer is wrapped in a class and the items of the class are instantiated, no additional references to the video project file 202 are made. This format allows the VRP 130 to reduce the number of references and accesses to the video project file 202, thereby reducing the amount of computing resources required to render the video.
[0056] In some embodiments, more than one static layer may be wrapped into a single item of a class. For example, consecutive static layers in z-depth order or other appropriate ordering scheme may be exported together to a template as a pre-rendered image. For example, the exporter 136 may render three consecutive static layers in z-depth order as a single PNG. In some embodiments, the exporter 136 may identify a sequence of static layers to be exported as a single image. The exporter 136 may, for example, start the sequence when a static layer is detected and end the sequence when it detects a dynamic layer so that the sequence does not include the dynamic layer. By exporting multiple static layers at once, the exporter 136 reduces the amount of storage resources required to save the static layers and reduces the amount of time spent in the final rendering process.
[0057] In some implementations, other types will include only one layer. For example, only one dynamic layer may be wrapped into a single item of a class. The item of the class containing the dynamic layer may include information such as the variable parts of the layer and instructions about the structure of the item.
[0058] In some embodiments, the exporter 136 handles the storage of queued items, exports the items to an output format to create a template, and when the template is instantiated, the exporter 136 populates the template and saves the populated template to disk. For example, the exporter 136 can save the template itself as a protocol buffer object in JavaScript Object Notation (JSON) format. The protocol buffer object or message can use a relative path to reference the saved source material.
[0059] After the template is instantiated, the exporter 136 populates the template variables with the properties of the video project file 202. For example, the exporter 136 may populate the instantiated template with video parameters from the video project file 202. The exporter 136 uses a transformation library to populate the template with the parameters.
[0060] Transformations allow for time-varying adjustments of layers. One or more transformations may be applied to any given frame within a layer. For example, exporter 136 may apply transformations such as position, transparency, mask, blur, and texture transformations. For example, exporter 136 may use an image sequence to perform a mask transformation. In another example, exporter 136 may perform a transformation that calculates the position of an object. Exporter 136 may, for example, use a library that calculates the 2D projected image position of an object in each frame by placing and locking a type of empty element to the corner of each element and adding different types of empty elements to the corner of each empty element. For example, exporter 136 may place and lock an empty 3D element to the corner of each element and add a 2D empty to the corner of each 3D element. In some embodiments, exporter 136 may use an existing library from a program such as VCP 120.
[0061] A set of transformations for each frame provides all the required data for adjusting objects within that frame. The transformations are self-contained within a given frame, so that no keyframes are required, and no forward-looking and backward-looking extrapolations are required, which allows parallelization. The exporter 136 can, for example, perform all frame transformations in parallel to reduce processing time. The transformations share the start time, end time, and timestamp on each frame. The exporter 136 reduces the amount of storage resources required by using only one of these values, which allows the other two values to be used for error detection and error correction. For example, the exporter 136 can use a timestamp to apply a transparency transformation to a particular frame, and can use the start time to verify that there are no errors in the temporal properties of the transparency transformation.
[0062] The exporter 136 includes an export module for each type of layer. Based on the classification of the VRS, the exporter 136 can select and use a specific export module to generate appropriate output. The export module can operate similarly to the export module of the VCP 120, for example.
[0063] The exporter 136 includes export modules of the types such as a static layer export module, a media layer export module, and a text layer export module.
[0064] The static layer export module of the exporter 136 receives layers that have been classified as static and outputs protocol buffer messages designated as static layer messages. The static layer output module outputs protocol buffer messages from one or more static layers. For example, the static layer export module can receive six static layers and output protocol buffer messages representing the six static layers. The static layer output module can output all static layers of the video project file 202. In some embodiments, the static layers must be continuous. The static layer export module can export the static layers by, for example, disabling all layers of the video project file 202 that have been classified as types other than static layers, enabling all layers of the video project file 202 that have been classified as static layers, and calling the saved images of each frame. In some embodiments, the static layer export module of the exporter 136 pre-renders all static layers of the video project file 202 by calling the saved images of each frame, because these frames will not change in the final rendering, thereby reducing the amount of processing that needs to be performed in the final rendering to complete the video.
[0065] The media layer export module of the exporter 136 receives a layer that has been classified as a dynamic media layer and outputs a protocol buffer message designated as a dynamic media layer message. Dynamic media layers include images and videos. For example, the dynamic media layer export module can receive a layer including an image that is changeable and can be replaced, and export a protocol buffer message indicating a dynamic media layer. Dynamic media layers can include, for example, images such as logos and photos, videos such as video logos, product clips, messages from spokespersons, visual elements such as colors and textures, and text (such as slogans, slogans, or names).
[0066] When the template is instantiated, the media layer export module populates the template variables with the properties of the video project file 202. For example, the media layer export module may use a library from the VCP 120 to populate the side and position properties of the template variables for a particular dynamic media layer.
[0067] Flow continues to step E, where the DCDS 110 receives a request 108 for content from the user device 106. The request 108 is sent by the user device 106 to the DCDS 110 when the client device interacts with digital content. For example, if the user of the user device 106 clicks on a link to download a shopping application, the link may cause the user device 106 to send the request 108 to the DCDS 110. The request 108 may include interaction tracking data from the client device 106. For example, the request 108 may include tracking data such as an indication of the interaction, the digital content with which the user device 106 interacted, and an identifier that uniquely identifies the user device 106. In some implementations, the request 108 includes an indication of the provider of the digital content and the location of a destination server hosting the requested resource.
[0068] DCDS 110 processes the request and forwards the request for a specific video, including the customization information, to template instantiation system 140. For example, DCDS 110 may use the above description of Figure 1 The content selection process described above is used to select a particular video and determine personalized information for the template instantiation system 140. In some embodiments, the DCDS 110 determines the personalized information based on user information of a user of the user device 106. In some embodiments, the DCDS 110 determines the personalized information based on information from, for example, a third party 140 that provides content to the DCDS 110.
[0069] In some implementations, step E does not occur in data flow 200 , and VCP 120 , VRP 130 , or a user of user device 106 may provide a request for the altered video directly to template instantiation system 140 .
[0070] The flow continues to step F, where the template instantiation system 140 instantiates the template, which provides variable definitions or instructions on how to populate the variable portion of the template, and the exporter 136 populates the variables. In some embodiments, the variable definition includes data that defines a specific variable within the template. For example, the template instantiation system 140 instantiates the template with instructions on the population of the variable components of the dynamic layer, which generates a multi-layer request. The template instantiation system 140 then provides the multi-layer request to the exporter 136.
[0071] The exporter 136 receives the multi-layer request and uses the pre-rendered static layers in the form of static layer protocol buffer messages and the instructions provided by the template instantiation system 140 in the multi-layer request to perform the final rendering of the video. Because the static layers are pre-rendered when the template of the video project file 202 is generated, the final rendering operations performed at the time of the request only include the population of variables and the compositing of layers. For example, the exporter 136 can perform alpha blending of the images in the static layer protocol buffer message and the populated dynamic layers to produce the final rendering of the video project file 202. These operations are optimized in the VRP 130 so that the rendering time is O(1) when requesting videos of different levels of graphical complexity because the static layers are pre-rendered when the template is generated. Therefore, the system 100 and the process 200 performed by the system 100 provide a technical improvement over existing video modification and rendering solutions.
[0072] Flow continues to step G, where VRP 130 provides the rendered video to DCDS 110 for presentation to user device 106 along with or as reply 114. As described above, reply data 114 may indicate video content rendered by VRP 130 in addition to the requested electronic document. Reply data 114 is sent by DCDS 110 to user device 106 in response to DCDS 110 receiving request 108 and determining that the distribution parameters are satisfied based on the received distribution parameters and the user data indicated in request 108.
[0073] Figure 3 is a flow chart of an example process 300 for efficiently and dynamically changing and rendering a video. In some implementations, the process 300 can be performed by one or more systems. For example, the process 300 can be performed by Figure 1-Figure 2 The VRP 130, DCDS 110, user device 106 and / or third party 140 of the present invention may be implemented. In some embodiments, the process 300 may be implemented as instructions stored on a non-transitory computer-readable medium, and when the instructions are executed by one or more servers, the instructions may cause the one or more servers to perform the operations of the process 300.
[0074] Process 300 begins by identifying a file for rendering a video including one or more static layers and one or more dynamic layers (302). For example, VRP 130 may receive or identify a video project file 202 for rendering a video generated by VCP 120. Video project file 202 may include one or more static layers and one or more dynamic layers. In some embodiments, VCP 120 provides video project file 202 to VRP 130. In some embodiments, VRP 130 may retrieve video project file 202 from a storage device.
[0075] Process 300 continues by detecting one or more static layers and one or more dynamic layers based on analyzing one or more fields of a file used to render the video, wherein each dynamic layer includes annotations indicating variable components (304). For example, flattener 132 of VRP 130 may flatten the DOM of video project file 202. At the same time, classifier 134 of VRP 130 may analyze one or more fields of video project file 202 to detect, for example, an annotation field indicating whether a particular layer is static or dynamic or variable.
[0076] Process 300 continues by rendering one or more static layers of the file (306). For example, exporter 136 may wrap and export the layers into a protocol buffer message. Exporter 136 generates a template that includes variables for dynamic layers and pre-rendered static layers. For example, exporter 136 may pre-render each of the static layers by calling saved images of frames of the static layers and exporting those saved images. Rendering of one or more static layers of the file occurs before the request time, or before a request for a video including user information is received, so that the static layers are pre-rendered and the amount of rendering that must be completed at the time of the request is reduced.
[0077] Process 300 continues by receiving a request for a video including user information from a user device ( 308 ). For example, DCDS 110 may receive request 108 from a user of user device 106 and forward the request to template instantiation system 140 .
[0078] Process 300 continues by determining, based on the user information, variable definitions designated for insertion into the dynamic layer (310). For example, template instantiation system 140 may determine instructions for modifying or replacing variables of the dynamic layer based on the user information provided in the request forwarded by DCDS 110. Template instantiation system 140 may then instantiate the template generated by exporter 136.
[0079] Process 300 continues by rendering one or more dynamic layers using the variable definitions (312). For example, exporter 136 of VRP 130 may populate a template instantiated by template instantiation system 140 based on instructions provided by template instantiation system 140 for changing or replacing variables of a dynamic layer.
[0080] Process 300 ends with generating a composite video for playback from the rendered one or more static layers and the rendered one or more dynamic layers (314). For example, exporter 136 of VRP 130 can use the populated template to perform a final rendering of the video of video project file 202 to produce the video for playback. Because the template includes pre-rendering of the static layers, a relatively large portion of the final rendering process is alpha blending the layers together, and the additional processing time of populating the template does not constitute a significant portion of the final rendering process. Therefore, system 100 provides an efficient solution for changing and dynamically rendering videos of varying graphical complexity in constant time.
[0081] Figure 4 4 is a block diagram of an example computer system 400 that can be used to perform the above operations. System 400 includes a processor 410, a memory 420, a storage device 430, and an input / output device 440. Each of components 410, 420, 430, and 440 can be interconnected, for example, using a system bus 450. Processor 410 is capable of processing instructions for execution within system 400. In one embodiment, processor 410 is a single-threaded processor. In another embodiment, processor 410 is a multi-threaded processor. Processor 410 is capable of processing instructions stored on memory 420 or storage device 430.
[0082] The memory 420 stores information within the system 400. In one embodiment, the memory 420 is a computer-readable medium. In one embodiment, the memory 420 is a volatile memory unit. In another embodiment, the memory 420 is a non-volatile memory unit.
[0083] The storage device 430 can provide mass storage for the system 400. In one embodiment, the storage device 430 is a computer-readable medium. In various embodiments, the storage device 430 may include, for example, a hard disk device, an optical disk device, a storage device shared by multiple computing devices over a network (e.g., a cloud storage device), or some other mass storage device.
[0084] Input / output devices 440 provide input / output operations for system 400. In one embodiment, input / output devices 440 may include one or more network interface devices (e.g., Ethernet cards), serial communication devices (e.g., RS-232 ports), and / or wireless interface devices (e.g., 802.11 cards). In another embodiment, input / output devices may include drive devices configured to receive input data and transmit output data to other input / output devices (e.g., keyboards, printers, and display devices 460). However, other embodiments may also be used, such as mobile computing devices, mobile communication devices, set-top TV client devices, etc.
[0085] Although already Figure 4 An example processing system is described in the specification, but the subject matter and implementation of the functional operations described in this specification may be implemented in other types of digital electronic circuits, or in computer software, firmware or hardware including the structures disclosed in this specification and their structural equivalents, or in a combination of one or more of them.
[0086] An electronic document (which for brevity will be referred to simply as a document) does not necessarily correspond to a file. A document may be stored in a portion of a file holding other documents, in a single file dedicated to the document in question, or in multiple coordinated files.
[0087] The subject matter and the embodiments of the operation described in this specification can be implemented in digital electronic circuits or in computer software, firmware or hardware, including the structures disclosed in this specification and their equivalent structures, or implemented in one or more combinations thereof. The embodiments of the subject matter described in this specification can be implemented as one or more computer programs, that is, one or more modules of computer program instructions, which are encoded on a computer storage medium (or multiple computer storage media) to be executed by a data processing device or to control the operation of the data processing device. Alternatively or in addition, the program instructions can be encoded on an artificially generated propagation signal, such as a machine-generated electrical, optical or electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device to be executed by a data processing device. The computer storage medium can be or be included in a computer-readable storage device, a computer-readable storage substrate, a random or serial access memory array or device, or a combination of one or more of them. In addition, although the computer storage medium is not a propagation signal, the computer storage medium can be the source or destination of the computer program instructions encoded with an artificially generated propagation signal. The computer storage medium can also be one or more separate physical components or media (e.g., multiple CDs, disks or other storage devices) or included therein.
[0088] The operations described in this specification may be implemented as operations performed by a data processing apparatus on data stored on one or more computer-readable storage devices or received from other sources.
[0089] The term "data processing apparatus" encompasses all kinds of apparatus, devices and machines for processing data, including, for example, a programmable processor, a computer, a system on a chip, or a plurality or combination of the foregoing. The apparatus may include dedicated logic circuits, such as an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit). In addition to hardware, the apparatus may also include code that creates an execution environment for the computer program in question, for example, code that constitutes processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or a combination of one or more thereof. The apparatus and execution environment may implement a variety of different computing model infrastructures, such as network services, distributed computing, and grid computing architectures.
[0090] A computer program (also referred to as a program, software, software application, script, or code) may be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, object, or other unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program may be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or portions of code). A computer program may be deployed to execute on one computer or on multiple computers located at one site or distributed over multiple sites and interconnected by a data communications network.
[0091] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).
[0092] For example, processors suitable for executing computer programs include general-purpose microprocessors and special-purpose microprocessors. Typically, the processor will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor for performing actions according to instructions and one or more storage devices for storing instructions and data. Typically, a computer will also include or be operably coupled to receive data from one or more mass storage devices (e.g., magnetic, magneto-optical disks, or optical disks) for storing data or to transfer data to one or more mass storage devices or both. However, a computer does not have to have such devices. In addition, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device (e.g., a universal serial bus (USB) flash drive), to name a few. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and storage devices, including, for example, semiconductor storage devices, such as EPROM, EEPROM, and flash memory devices; disks, such as internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
[0093] To provide interaction with a user, embodiments of the subject matter described in this specification may be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user, as well as a keyboard and pointing device (e.g., a mouse or trackball, through which a user can provide input to the computer). Other kinds of devices may also be used to provide interaction with a user, for example, the feedback provided to the user may be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and input from the user may be received in any form, including sound, voice, or tactile input. In addition, a computer may interact with a user by sending documents to and receiving documents from a device used by the user, for example, by sending a web page to a web browser on a user's device in response to a request received from the web browser.
[0094] Embodiments of the subject matter described in this specification may be implemented in a computing system that includes a back-end component (e.g., as a data server) or includes a middleware component (e.g., an application server) or includes a front-end component (e.g., a client computer with a graphical user interface or a web browser through which a user can interact with an implementation of the subject matter described in this specification) or any combination of one or more such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LANs") and wide area networks ("WANs"), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks).
[0095] The computing system may include a client and a server. The client and the server are usually remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on respective computers and having a client-server relationship with each other. In some embodiments, the server sends data (e.g., an HTML page) to the user device (e.g., for the purpose of displaying data to a user interacting with the client device and receiving user input therefrom). Data generated at the client device (e.g., the result of user interaction) can be received from the client device on the server.
[0096] Although this specification includes many specific implementation details, these details should not be interpreted as limitations on any invention or the scope of the claimed protection, but should be interpreted as descriptions of features specific to a particular embodiment of a particular invention. Specific features described in this specification in the context of separate embodiments may also be implemented in combination in a single embodiment. On the contrary, the various features described in the context of a single embodiment may also be implemented in multiple embodiments or in any suitable sub-combination. In addition, although the features may be described above as working in a specific combination and even initially claimed as such, in some cases, one or more features in the claimed combination may be deleted from the combination, and the claimed combination may be used for a sub-combination or a variation of the sub-combination.
[0097] Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring that such operations be performed in the particular order shown or in a continuous order, or that all of the operations shown be performed to achieve the desired results. In certain circumstances, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0098] Thus, particular embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. For example, the actions recited in the claims can be performed in a different order and still achieve the desired results. Additionally, the processes depicted in the accompanying drawings do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing may be advantageous.
Claims
1. A computer-implemented method for efficient dynamic video rendering, comprising: identifying a file for rendering a video that includes one or more static layers and one or more dynamic layers, wherein the dynamic layers include variable components to be populated or changed prior to final rendering, and the static layers do not include variable components to be populated or changed prior to final rendering; detecting the one or more static layers and the one or more dynamic layers based on analyzing one or more fields of the file for rendering the video, wherein each dynamic layer includes an annotation in a annotation field of the file indicating that the layer is dynamic, and wherein the annotation is provided by a user in the annotation field to indicate that the dynamic layer is dynamic; Rendering one or more static layers of the file, wherein the rendering includes saving the static layers as images; For each dynamic layer, the instruction data indicating the structure of the dynamic layer is stored together with the static layer in a corresponding position; Based on the rendered instruction data of the one or more static layers and each dynamic layer, generate a template representing the one or more static layers and the one or more dynamic layers; After rendering the one or more static layers of the file, receiving a request for the video including user information from a user device; for each dynamic layer, determining an image or a modification of the image to replace the variable component based on the user information and a variable definition including instructions for replacing or modifying the variable component of the dynamic layer based on the user information; rendering the one or more dynamic layers and the determined image or changes to the image for each dynamic layer by instantiating the template using the variable definition; as well as Generating a composite video for playback from the rendered one or more static layers and the rendered one or more dynamic layers includes, for each frame of the video, compositing the rendered images of each layer of the frame.
2. The method of claim 1, further comprising flattening a document object model of a file used to render the video using a depth-first traversal algorithm. 3 . The method according to claim 2 , further comprising generating a template indicating the one or more static layers and the one or more dynamic layers based on the rendered one or more static layers.
4. The method according to claim 3, wherein: Rendering the one or more dynamic layers using the variable definitions includes populating the template using the variable definitions.
5. The method according to claim 1, wherein: The file includes one or more frames; and wherein rendering one or more static layers of the file includes, for each of the one or more static layers, saving an image of each frame.
6. The method according to claim 1, wherein: Generating a composite video for playback from the rendered one or more static layers and the rendered one or more dynamic layers includes performing an alpha blending operation to combine the rendered one or more static layers and the rendered one or more dynamic layers.
7. The method according to claim 1, wherein: At least one of the one or more dynamic layers includes at least one of an image, text, video, and color representing a logo.
8. A system for efficient dynamic video rendering, comprising: one or more processors; and One or more memory elements comprising instructions that, when executed, cause the one or more processors to perform operations comprising: identifying a file for rendering a video that includes one or more static layers and one or more dynamic layers, wherein the dynamic layers include variable components to be populated or changed prior to final rendering, and the static layers do not include variable components to be populated or changed prior to final rendering; detecting the one or more static layers and the one or more dynamic layers based on analyzing one or more fields of the file for rendering the video, wherein each dynamic layer includes an annotation in a annotation field of the file indicating that the layer is dynamic, and wherein the annotation is provided by a user in the annotation field to indicate that the dynamic layer is dynamic; Rendering one or more static layers of the file, wherein the rendering includes saving the static layers as images; For each dynamic layer, the instruction data indicating the structure of the dynamic layer is stored together with the static layer in a corresponding position; Based on the rendered instruction data of the one or more static layers and each dynamic layer, generate a template representing the one or more static layers and the one or more dynamic layers; After rendering the one or more static layers of the file, receiving a request for the video including user information from a user device; for each dynamic layer, determining an image or a modification of the image to replace the variable component based on the user information and a variable definition including instructions for replacing or modifying the variable component of the dynamic layer based on the user information; rendering the one or more dynamic layers and the determined image or changes to the image for each dynamic layer by instantiating the template using the variable definition; and Generating a composite video for playback from the rendered one or more static layers and the rendered one or more dynamic layers includes, for each frame of the video, compositing the rendered images of each layer of the frame.
9. The system of claim 8, the operations further comprising flattening a document object model of a file used to render the video using a depth-first traversal algorithm. 10 . The system of claim 9 , the operation further comprising generating a template indicating the one or more static layers and the one or more dynamic layers based on the rendered one or more static layers.
11. The system according to claim 10, wherein: Rendering the one or more dynamic layers using the variable definitions includes populating the template using the variable definitions.
12. The system according to claim 8, wherein: The file includes one or more frames; and wherein rendering one or more static layers of the file includes, for each of the one or more static layers, saving an image of each frame.
13. The system according to claim 8, wherein: Generating a composite video for playback from the rendered one or more static layers and the rendered one or more dynamic layers includes performing an alpha blending operation to combine the rendered one or more static layers and the rendered one or more dynamic layers.
14. The system according to claim 8, wherein: At least one of the one or more dynamic layers includes at least one of an image, text, video, and color representing a logo.
15. A non-transitory computer storage medium encoded with instructions that, when executed by a distributed computing system, cause the distributed computing system to perform operations comprising: identifying a file for rendering a video that includes one or more static layers and one or more dynamic layers, wherein the dynamic layers include variable components to be populated or changed prior to final rendering, and the static layers do not include variable components to be populated or changed prior to final rendering; detecting the one or more static layers and the one or more dynamic layers based on analyzing one or more fields of the file for rendering the video, wherein each dynamic layer includes an annotation in a annotation field of the file indicating that the layer is dynamic, and wherein the annotation is provided by a user in the annotation field to indicate that the dynamic layer is dynamic; Rendering one or more static layers of the file, wherein the rendering includes saving the static layers as images; For each dynamic layer, the instruction data indicating the structure of the dynamic layer is stored together with the static layer in a corresponding position; Based on the rendered instruction data of the one or more static layers and each dynamic layer, generate a template representing the one or more static layers and the one or more dynamic layers; After rendering the one or more static layers of the file, receiving a request for the video including user information from a user device; for each dynamic layer, determining an image or a modification of the image to replace the variable component based on the user information and a variable definition including instructions for replacing or modifying the variable component of the dynamic layer based on the user information; rendering the one or more dynamic layers and the determined image or changes to the image for each dynamic layer by instantiating the template using the variable definition; as well as Generating a composite video for playback from the rendered one or more static layers and the rendered one or more dynamic layers includes, for each frame of the video, compositing the rendered images of each layer of the frame.
16. The non-transitory computer storage medium of claim 15, the operations further comprising flattening a document object model of a file used to render the video using a depth-first traversal algorithm. 17 . The non-transitory computer storage medium of claim 16 , the operations further comprising generating a template indicating the one or more static layers and the one or more dynamic layers based on the rendered one or more static layers.
18. The non-transitory computer storage medium of claim 17, wherein: Rendering the one or more dynamic layers using the variable definitions includes populating the template using the variable definitions.
19. The non-transitory computer storage medium of claim 15, wherein: The file includes one or more frames; and wherein rendering one or more static layers of the file includes, for each of the one or more static layers, saving an image of each frame.
20. The non-transitory computer storage medium of claim 15, wherein: Generating a composite video for playback from the rendered one or more static layers and the rendered one or more dynamic layers includes performing an alpha blending operation to combine the rendered one or more static layers and the rendered one or more dynamic layers.
