WO2024198989A1 - Video generation method and apparatus - Google Patents
Video generation method and apparatus Download PDFInfo
- Publication number
- WO2024198989A1 WO2024198989A1 PCT/CN2024/082201 CN2024082201W WO2024198989A1 WO 2024198989 A1 WO2024198989 A1 WO 2024198989A1 CN 2024082201 W CN2024082201 W CN 2024082201W WO 2024198989 A1 WO2024198989 A1 WO 2024198989A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- animation
- sub
- video
- video generation
- target
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 87
- 230000004044 response Effects 0.000 claims abstract description 10
- 239000000463 material Substances 0.000 claims description 28
- 239000013077 target material Substances 0.000 claims description 26
- 230000015654 memory Effects 0.000 claims description 19
- 230000000694 effects Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 8
- 238000004064 recycling Methods 0.000 claims description 6
- 238000012545 processing Methods 0.000 abstract description 7
- 230000008569 process Effects 0.000 description 12
- 238000004891 communication Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 230000001052 transient effect Effects 0.000 description 8
- 238000001514 detection method Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000009877 rendering Methods 0.000 description 4
- 238000012216 screening Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- VYZAMTAEIAYCRO-UHFFFAOYSA-N Chromium Chemical compound [Cr] VYZAMTAEIAYCRO-UHFFFAOYSA-N 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000001953 sensory effect Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 108010001267 Protein Subunits Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000019771 cognition Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000010422 painting Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/235—Processing of additional data, e.g. scrambling of additional data or processing content descriptors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/435—Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/8146—Monomedia components thereof involving graphical data, e.g. 3D object, 2D graphics
- H04N21/8153—Monomedia components thereof involving graphical data, e.g. 3D object, 2D graphics comprising still images, e.g. texture, background image
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/816—Monomedia components thereof involving special video data, e.g 3D video
Definitions
- the present disclosure relates to the field of computer technology, specifically to the field of video processing technology, and more particularly to a video generation method and device.
- Embodiments of the present disclosure provide a video generation method, apparatus, device, and storage medium.
- an embodiment of the present disclosure provides a video generation method, the method comprising: in response to obtaining a video generation request, obtaining video element information based on the video generation request; obtaining a target animation based on a new animation description file and the animation template file; based on the target animation, performing a screenshot operation to obtain an ordered image sequence; and generating a target video based on the ordered image sequence.
- an embodiment of the present disclosure provides a video generation device, the device comprising: an acquisition module, configured to respond to a video generation request and obtain video element information based on the video generation request; a replacement module, configured to replace the video element information based on the new animation description; file and the animation template file to obtain the target animation; the screenshot module is configured to perform a screenshot operation based on the target animation to obtain an ordered image sequence; the generation module is configured to generate a target video based on the ordered image sequence.
- an embodiment of the present disclosure provides an electronic device, which includes one or more processors; a storage device on which one or more computer programs are stored, and when the one or more computer programs are executed by the one or more processors, the one or more processors implement a video generation method as in any embodiment of the first aspect.
- an embodiment of the present disclosure provides a non-transitory computer-readable medium having computer instructions stored thereon, which, when executed by a computer, implements a video generation method as in any embodiment of the first aspect.
- FIG1 is an exemplary system architecture diagram in which the present disclosure may be applied
- FIG2 is a flow chart of an embodiment of a video generation method according to the present disclosure.
- FIG3 is a schematic diagram of an application scenario of the video generation method according to the present disclosure.
- FIG4 is a flow chart of another embodiment of a video generation method according to the present disclosure.
- FIG5 is a schematic diagram of an embodiment of a video generating apparatus according to the present disclosure.
- FIG6 is a schematic diagram of one embodiment of a video generation system according to the present disclosure.
- FIG. 7 is a schematic diagram of the structure of a computer system suitable for implementing a server of an embodiment of the present disclosure.
- FIG. 1 shows an exemplary system architecture 100 to which an embodiment of the video generation method of the present disclosure may be applied.
- system architecture 100 may include terminal devices 101, 102, 103, network 104 and server 105.
- Network 104 is used to provide a medium for communication links between terminal devices 101, 102, 103 and server 105.
- Network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
- the terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages, etc.
- Various communication client applications such as video playback applications, communication applications, etc., may be installed on the terminal devices 101, 102, 103.
- Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with display screens, including but not limited to mobile phones and laptops. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software or software modules (for example, to provide video generation services), or as a single software or software module. No specific limitation is made here.
- Server 105 can be a server that provides various services, for example, in response to obtaining a video generation request, obtaining video element information based on the video generation request; obtaining a target animation based on a new animation description file and the animation template file; performing a screenshot operation based on the target animation to obtain an ordered image sequence; and generating a target video based on the ordered image sequence.
- the server 105 can be hardware or software.
- the server 105 can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server.
- the server is software, it can be implemented as multiple software or software modules (for example, for providing video generation services), or it can be implemented as a single software or software module. No specific limitation is made here.
- the video generation method provided in the embodiment of the present disclosure can be executed by the server 105, can be executed by the terminal devices 101, 102, 103, or can be executed by the server 105 and the terminal devices 101, 102, 103 in cooperation with each other.
- the various parts (such as various units, sub-units, modules, sub-modules) included in the device can be all set in the server 105, or all set in the terminal devices 101, 102, 103, or respectively set in the server 105 and the terminal devices 101, 102, 103.
- terminal devices, networks and servers in Figure 1 is only illustrative. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
- FIG2 shows a process 200 of an embodiment of a video generation method that can be applied to the present disclosure.
- the video generation method includes the following steps:
- Step 201 in response to obtaining a video generation request, obtaining video element information based on the video generation request.
- the execution entity (such as the server 105 or the terminal devices 101, 102, 103 shown in FIG1) can obtain the video generation request in a wired or wireless manner, and obtain the video element information based on the video generation request.
- the video element information may include: an animation template file, an animation description file, and a target material.
- the video generation request may directly include information such as the animation template file, animation description file, target material, etc., or it may only include information such as the animation template file storage path, animation description file storage path, target material storage path, etc.
- the execution entity may obtain the animation template file, animation description file and target material according to the animation template file storage path, animation description file storage path and target material storage path respectively.
- the animation template file is a JSON file used to describe the animation and is stored in the animation template database.
- the animation is produced by animators using the animation software AE (Adobe After Effects), and combined with the Bodymovin plug-in, the animation produced on AE is exported as a JSON file, which supports rendering and playback on Web/Android/IOS, etc.
- This JSON file is called an animation template file, which includes basic animation information such as picture collection, layer collection, view width and height, start and end keyframes, frame rate, etc.
- the animation description file uses a script to extract the relevant animation information that the backend video generation depends on from the animation template file.
- Each animation template file has a corresponding animation description file.
- the animation description file includes the animation duration and animation material information.
- the animation material information is divided into two categories: picture materials and text materials, which are distinguished by the type field. Including the image URL, local file name, width, height, layer subscript, etc.
- the text material includes the text content, minimum and maximum text length, layer subscript, etc.
- the video element information may also include information such as the width, height, frame rate, and duration of the target video.
- the above-mentioned wireless connection methods may include but are not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
- video element information is obtained, including: obtaining the animation template file, the animation description file and the target material according to the animation template file storage path, the animation description file storage path and the target material storage path.
- the video generation request may include the animation template file storage path, the animation description file storage path, and the target material storage path.
- the execution entity may obtain the animation template file, the animation description file, and the target material based on the animation template file storage path, the animation description file storage path, and the target material storage path.
- This implementation method reduces the amount of data transmission, improves information transmission efficiency, and further improves video generation efficiency by obtaining animation template files, animation description files, and target materials according to the image template file storage path, animation description file storage path, and target material storage path.
- Step 202 Get the target animation based on the new animation description file and the animation template file.
- the execution entity can replace the material in the animation description file according to the target material to obtain a new animation description file, read the contents of the animation template file and the new animation description file, and fill the read contents into the HTML page of the Lottie code to obtain the target animation.
- Step 203 Based on the target animation, a screenshot operation is performed to obtain an ordered sequence of pictures.
- the execution subject can perform a screenshot operation on the target animation, that is, render, play and screenshot the target animation to obtain an ordered sequence of pictures.
- the execution subject can first create a Chrome browser and open an HTML page in a non-interface manner through Puppeteer, jump to a specified frame through the Lottie animation library, and then use Puppeteer to take a screenshot of the specified frame and save it to a storage medium cluster.
- the method further includes: managing the browser using a resource pool, specifically including at least one of the following: initializing the browser before obtaining a video generation request; and recycling the used browser after the browser is used.
- the screenshot operation includes creating a browser for taking screenshots, such as using Puppeteer to create a Chrome browser, if a browser needs to be created after each request, a high creation process overhead will be generated.
- the execution entity can use a resource pool to uniformly manage browser resources.
- the execution subject can initialize some browsers from the resource pool before the video generation request arrives, and can directly obtain the browser from the resource pool after each video generation request arrives.
- the resource pool is responsible for recycling the used browser resources.
- This implementation method realizes unified management of browser resources by initializing the browser before obtaining a video generation request and recycling the used browser after the browser is used, avoiding repeated operations of creating a browser for each request and effectively reducing resource consumption.
- Step 204 Generate a target video based on the ordered picture sequence.
- the execution subject can directly encode the ordered picture sequence through a video encoding tool to generate a target video, or it can encode the ordered picture sequence and a video generation command through a video encoding tool to generate a target video. This disclosure does not limit this.
- the video generation command can be included in the above-mentioned video generation request, and the video generation command can include at least one of the following: specifying the image sequence path, truncating or repeating the music according to the duration specified in the animation template, and superimposing barrage and special effects.
- generating a target video based on an ordered picture sequence includes: generating a target video based on an ordered picture sequence and a video generation command.
- the video element information also includes: a video generation command, which includes at least one of the following: specifying a picture sequence path, truncating or repeating the music according to the duration specified in the animation template, and superimposing barrage and special effects.
- a video generation command which includes at least one of the following: specifying a picture sequence path, truncating or repeating the music according to the duration specified in the animation template, and superimposing barrage and special effects.
- the execution subject can encode the ordered picture sequence and the video generation command through the video encoding tool to generate the target video, and then convert the video file into And the video MD5 verification file is synchronized to the storage medium cluster.
- This implementation method generates a target video based on an ordered image sequence and a video generation command, thereby effectively improving the effectiveness of the generated target video.
- FIG. 3 is a schematic diagram of an application scenario of the video generation method according to this embodiment.
- the execution entity 301 can monitor the video generation request 302 in real time or periodically in a wired or wireless manner, and in response to obtaining the video generation request 302, obtain video element information based on the video generation request, wherein the video element information includes: an animation template file 303, an animation description file 304 and a target material 305; based on a new animation description file 306 and the animation template file 303, obtain a target animation 307, wherein the new animation description file is obtained by replacing the material in the animation description file with the target material; based on the target animation 307, perform a screenshot operation 308 to obtain an ordered image sequence 309; based on the ordered image sequence 309, generate a target video 310.
- the video element information includes: an animation template file 303, an animation description file 304 and a target material 305; based on a new animation description file 306 and the animation template file 303, obtain a target animation 307, wherein the new animation description file is obtained by replacing the material in the animation description file with the target material; based
- the video generation method disclosed in the present invention obtains video element information based on the video generation request in response to obtaining a video generation request; obtains a target animation based on a new animation description file and an animation template file; performs a screenshot operation based on the target animation to obtain an ordered image sequence; and generates a target video based on the ordered image sequence, that is, fully utilizing the extensibility and reusability of animation templates, enriching video styles, and reducing development costs, effectively overcoming the problems of limited video diversity and high development costs in template-based video generation systems in related technologies.
- Fig. 4 shows a process 400 of yet another embodiment of the video generation method shown in Fig. 2.
- the process 400 of the video generation method may include the following steps:
- Step 401 in response to obtaining a video generation request, obtaining video element information based on the video generation request.
- step 401 can refer to the description of step 201 and will not be repeated here.
- Step 402 based on the new animation description file and animation template file, obtain the target animation painting.
- step 402 can refer to the description of step 202 and will not be repeated here.
- Step 403 Divide the target animation into a preset number of sub-segments.
- rendering, playback and screenshot are operations that consume a large amount of CPU and memory resources, for a single video generation request on a single machine, in order to utilize multi-core performance and improve CPU utilization, rendering, playback and screenshot are split into multiple different processes and performed simultaneously.
- the execution entity may divide the target animation into a preset number of sub-segments, wherein the preset number may be set according to actual needs, for example, 5, 7, etc., and the present disclosure does not limit this.
- Step 404 running a preset number of sub-processes in parallel to perform screenshot operations on a preset number of sub-segments to obtain a preset number of sub-picture sequences.
- the execution entity may run a preset number of sub-processes in parallel to perform screenshot operations on a preset number of sub-segments to obtain a preset number of sub-picture sequences.
- the number of sub-processes running in parallel is the same as the number of sub-segments, for example, the preset number is 6.
- Each sub-process performs a screenshot operation on a sub-segment to obtain a sub-image sequence.
- the sub-segments corresponding to each sub-process are different, that is, each animation is screenshoted in parallel by multiple sub-processes, and each sub-process is responsible for capturing a part of the animation.
- the captured image ranges between sub-processes do not overlap.
- Step 405 Generate an ordered picture sequence based on a preset number of sub-picture sequences.
- the execution subject may sort the sub-picture sequence according to the range of the interception operation executed by each sub-process and the position of the image frame to obtain an ordered picture sequence.
- the index-th subprocess performs an interception operation on the corresponding segment, and the duration range of the subsequence is: (i+index*m index )*msTimeStep,0 ⁇ i ⁇ m index (1)
- m index is the number of pictures that the index-th child process needs to capture:
- Step 406 Generate a target video based on the ordered picture sequence.
- step 406 can refer to the description of step 204 and will not be repeated here.
- the process 400 of the video generation method in this embodiment embodies dividing the target animation into a preset number of sub-segments, running a preset number of sub-processes in parallel to perform screenshot operations on a preset number of sub-segments, obtaining a preset number of sub-picture sequences, generating an ordered picture sequence based on the preset number of sub-picture sequences, and generating a target video based on the ordered picture sequence.
- This method creates multiple sub-processes for rendering, playback and screenshots in parallel to speed up the picture capture speed, thereby effectively speeding up the video generation speed.
- the present disclosure provides an embodiment of a video generating device, which corresponds to the method embodiment shown in FIG. 2 , and can be specifically applied to various electronic devices.
- the video generating device 500 of this embodiment includes: an acquiring module 501 , a replacing module 502 , a screenshot module 503 and a generating module 504 .
- the acquisition module 501 may be configured to acquire video element information based on the video generation request in response to acquiring the video generation request.
- the replacement module 502 may be configured to obtain a target animation based on a new animation description file and the animation template file.
- the screenshot module 503 may be configured to perform a screenshot operation based on the target animation to obtain an ordered sequence of images.
- the generating module 504 may be configured to generate a target video based on the ordered picture sequence.
- the screenshot module is further configured to: divide the target animation into a preset number of sub-segments; run a preset number of sub-processes in parallel to perform screenshot operations on a preset number of sub-segments to obtain a preset number of sub-image sequences; and generate an ordered image sequence based on the preset number of sub-image sequences.
- the acquisition module is further configured to acquire the animation template file, the animation description file and the target material according to the animation template file storage path, the animation description file storage path and the target material storage path.
- the generation module is further configured to: generate a target video based on an ordered picture sequence and a video generation command.
- the video generation command includes at least one of the following: specifying a picture sequence path, truncating or repeating the music according to the duration specified in the animation template, and superimposing barrage and special effects.
- the screenshot operation includes creating a browser to take the screenshot.
- the device further includes a management module, which is configured to manage the browser using a resource pool, specifically including at least one of the following: initializing the browser before obtaining a video generation request; and recycling the used browser after the browser is used.
- a management module configured to manage the browser using a resource pool, specifically including at least one of the following: initializing the browser before obtaining a video generation request; and recycling the used browser after the browser is used.
- the present disclosure provides an embodiment of a video generation system.
- the system includes a request server 601 and a video generation sub-server 602 .
- the request server 601 may be a server that provides various services, for example, generates multiple video generation requests based on user input information, and sends the multiple video generation requests to one or more video generation sub-servers in a video generation sub-server cluster.
- the video generation sub-server 602 is used to execute the video generation method described in any of the above embodiments.
- multiple video generation requests are generated, and the multiple video generation requests are sent to one or more video generation sub-servers in the video generation sub-server cluster, which may specifically include the following four steps:
- Step 6011 video production request preprocessing.
- the request server first receives the video generation information selected by the advertiser through the front-end display page, such as the item ID, template ID, and ad slot ID, and then parses the request and determines whether the request is a valid request and whether it contains necessary information such as the item ID, template ID, and ad slot ID. If not, the request is considered to be an invalid request, and a failure message is returned, and the video generation progress is set to an invalid progress. If it is a valid request, go to step 6012.
- Step 6012 material acquisition.
- the related materials that video production relies on include text materials, picture materials, music materials, template materials, etc. If the advertiser uploads local materials on his own, go to step 6014. Otherwise, go to step 6013 by obtaining materials from local files or remote material databases.
- text materials can be obtained by accessing the text information database, which stores the mined or processed text information of items, including product descriptions, brand names, and other information.
- Picture materials can be obtained by accessing the item basic database, which stores the basic attribute information of the main picture information of the item, the item details page, and the carousel picture, as well as image detection result information, such as face detection, text detection, etc., for use in video generation.
- Step 6013 material screening.
- the material screening stage is mainly responsible for screening out a set of qualified material candidates from multiple pictures and multiple texts.
- the pictures are first filtered according to rules such as image face detection, text detection, and picture similarity to obtain a candidate set of pictures that meet the rules.
- rules such as image face detection, text detection, and picture similarity to obtain a candidate set of pictures that meet the rules.
- multiple pictures are randomly selected from the candidate set.
- the texts are screened in a random manner. According to the number of texts supported by the animation template, multiple texts are randomly selected from the text candidate set.
- Step 6014 material processing.
- the image material is usually processed, and the image file is scaled according to the width and height of the template to generate an image file that meets the specifications.
- Step 6015 Distributed video generation: Generate one or more video generation requests based on the processed material and animation template information, and send the multiple video generation requests to one or more video generation sub-servers in the video generation sub-server cluster in a polling manner.
- the diversity of generated videos is improved while effectively overcoming the problem of template-based video in related technologies.
- the video generation stage in the video generation system is tightly coupled with functions such as material acquisition, screening, and processing, and can only be upgraded or performance optimized as a whole, which is not conducive to system maintenance.
- the request server is further used to obtain the target video generated by the video generation sub-server and store the target video.
- the requesting server can obtain the target video generated by the video generation sub-server, upload the target video to the remote file storage system, and store the basic information of the target video, such as URL, width, height, template ID, etc., to the video creative library.
- the target video generation progress will be updated in real time over time and written into the progress database. After the target video storage is completed, the target video generation progress is 100%, and the video production request for the item has been processed.
- request servers 601 and video generation sub-servers 602 in Fig. 6 are only for illustration purposes. Any number of request servers and video generation sub-servers may be provided as required.
- the present disclosure also provides an electronic device and a readable storage medium.
- FIG. 7 it is a block diagram of an electronic device according to a video generating method according to an embodiment of the present disclosure.
- the 700 is a block diagram of an electronic device according to a video generation method of an embodiment of the present disclosure.
- the electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.
- the electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices.
- the components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and/or required herein.
- the electronic device includes: one or more processors 701, a memory 702, and interfaces for connecting various components, including a high-speed interface and a low-speed interface.
- the components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed.
- the processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input/output device (such as a display device coupled to the interface).
- an external input/output device such as a display device coupled to the interface.
- multiple processors and/or multiple buses can be used together with multiple memories and multiple memories.
- multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
- a processor 701 is taken as an example in Figure 7.
- the memory 702 is a non-transient computer-readable storage medium provided by the present disclosure.
- the memory stores instructions executable by at least one processor to enable the at least one processor to perform the video generation method provided by the present disclosure.
- the non-transient computer-readable storage medium of the present disclosure stores computer instructions, which are used to enable a computer to perform the video generation method provided by the present disclosure.
- the memory 702 as a non-transient computer-readable storage medium, can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions/modules corresponding to the video generation method in the embodiment of the present disclosure (for example, the acquisition module 501, the replacement module 502, the screenshot module 503 and the generation module 504 shown in FIG. 5).
- the processor 701 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 702, that is, the video generation method in the above method embodiment is implemented.
- the memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of the video-generating electronic device, etc.
- the memory 702 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device.
- the memory 702 may optionally include a memory remotely arranged relative to the processor 701, and these remote memories may be connected to the video-generating electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
- the electronic device of the video generation method may further include: an input device 703 and an output device 704.
- the processor 701, the memory 702, the input device 703 and the output device 704 may be connected via a bus or other means, and FIG7 takes the connection via a bus as an example.
- the input device 703 can receive input digital or character information, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a track ball, a joystick, and other input devices.
- the output device 704 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor).
- the display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.
- Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various implementations may include: being implemented in one or more computer programs that can be executed and/or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
- the systems and techniques described herein can 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; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer.
- a display device e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
- a keyboard and pointing device e.g., a mouse or trackball
- Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual sensory feedback, auditory feedback, or tactile feedback); and can receive input from the user in any form (including acoustic input, voice input, or tactile input).
- the systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such 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 communications network). Examples of communications networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
- a computer system may include clients and servers.
- Clients and servers are generally remote from each other and usually interact through a communication network.
- the relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
- the generated video styles are effectively enriched and the development costs are reduced.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Graphics (AREA)
- Processing Or Creating Images (AREA)
Abstract
Description
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本专利申请要求于2023年3月24日提交的、申请号为202310298310.5、发明名称为“视频生成方法和装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本申请中。This patent application claims priority to the Chinese patent application filed on March 24, 2023, with application number 202310298310.5 and invention name “Video Generation Method and Device”, the full text of which is incorporated by reference into this application.
本公开涉及计算机技术领域,具体涉及视频处理技术领域,尤其涉及一种视频生成方法和装置。The present disclosure relates to the field of computer technology, specifically to the field of video processing technology, and more particularly to a video generation method and device.
在电商领域,文案、图片和视频等多种形式的广告创意通过将产品特性和卖点等关键信息形象直观的呈现给用户,可以有效地提高用户对产品的关注度,提升整体营销效果。其中,视频创意融合视频、音频、图片和文本等内容于一体,表现力更生动,是促进用户对产品认知、偏好和购买意愿最有效的方法,因此,需要提供便捷高效的视频创意生成方案,助力广告主产品推广和营销。In the field of e-commerce, advertising creativity in various forms such as copywriting, pictures and videos can effectively increase users' attention to products and improve the overall marketing effect by visually presenting key information such as product features and selling points to users. Among them, video creativity integrates video, audio, pictures and text, and is more vivid in expression. It is the most effective way to promote users' cognition, preference and purchase intention of products. Therefore, it is necessary to provide a convenient and efficient video creative generation solution to help advertisers promote and market their products.
发明内容Summary of the invention
本公开实施例提供了一种视频生成方法、装置、设备以及存储介质。Embodiments of the present disclosure provide a video generation method, apparatus, device, and storage medium.
根据第一方面,本公开实施例提供了一种视频生成方法,该方法包括:响应于获取到视频生成请求,基于视频生成请求,获取视频元素信息;基于新的动画描述文件和所述动画模板文件,得到目标动画;基于目标动画,执行截图操作,得到有序图片序列;基于有序图片序列,生成目标视频。According to the first aspect, an embodiment of the present disclosure provides a video generation method, the method comprising: in response to obtaining a video generation request, obtaining video element information based on the video generation request; obtaining a target animation based on a new animation description file and the animation template file; based on the target animation, performing a screenshot operation to obtain an ordered image sequence; and generating a target video based on the ordered image sequence.
根据第二方面,本公开实施例提供了一种视频生成装置,该装置包括:获取模块,被配置成响应于获取到视频生成请求,基于视频生成请求,获取视频元素信息;替换模块,被配置成基于新的动画描述 文件和所述动画模板文件,得到目标动画;截图模块,被配置成基于目标动画,执行截图操作,得到有序图片序列;生成模块,被配置成基于有序图片序列,生成目标视频。According to a second aspect, an embodiment of the present disclosure provides a video generation device, the device comprising: an acquisition module, configured to respond to a video generation request and obtain video element information based on the video generation request; a replacement module, configured to replace the video element information based on the new animation description; file and the animation template file to obtain the target animation; the screenshot module is configured to perform a screenshot operation based on the target animation to obtain an ordered image sequence; the generation module is configured to generate a target video based on the ordered image sequence.
根据第三方面,本公开实施例提供了一种电子设备,该电子设备包括一个或多个处理器;存储装置,其上存储有一个或多个计算机程序,当一个或多个计算机程序被该一个或多个处理器执行,使得一个或多个处理器实现如第一方面的任一实施例的视频生成方法。According to the third aspect, an embodiment of the present disclosure provides an electronic device, which includes one or more processors; a storage device on which one or more computer programs are stored, and when the one or more computer programs are executed by the one or more processors, the one or more processors implement a video generation method as in any embodiment of the first aspect.
根据第四方面,本公开实施例提供了一种非瞬时计算机可读介质,其上存储有计算机指令,该计算机指令被计算机执行时实现如第一方面的任一实施例的视频生成方法。According to a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable medium having computer instructions stored thereon, which, when executed by a computer, implements a video generation method as in any embodiment of the first aspect.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其他特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description.
图1是本公开可以应用于其中的示例性系统架构图;FIG1 is an exemplary system architecture diagram in which the present disclosure may be applied;
图2是根据本公开的视频生成方法的一个实施例的流程图;FIG2 is a flow chart of an embodiment of a video generation method according to the present disclosure;
图3是根据本公开的视频生成方法的一个应用场景的示意图;FIG3 is a schematic diagram of an application scenario of the video generation method according to the present disclosure;
图4是根据本公开的视频生成方法的又一个实施例的流程图;FIG4 is a flow chart of another embodiment of a video generation method according to the present disclosure;
图5是根据本公开的视频生成装置的一个实施例的示意图;FIG5 is a schematic diagram of an embodiment of a video generating apparatus according to the present disclosure;
图6是根据本公开的视频生成系统的一个实施例的示意图;FIG6 is a schematic diagram of one embodiment of a video generation system according to the present disclosure;
图7是适于用来实现本公开实施例的服务器的计算机系统的结构示意图。FIG. 7 is a schematic diagram of the structure of a computer system suitable for implementing a server of an embodiment of the present disclosure.
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。 The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开。It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
图1示出了可以应用本公开的视频生成方法的实施例的示例性系统架构100。FIG. 1 shows an exemplary system architecture 100 to which an embodiment of the video generation method of the present disclosure may be applied.
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in Fig. 1, system architecture 100 may include terminal devices 101, 102, 103, network 104 and server 105. Network 104 is used to provide a medium for communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如,视频播放类应用、通讯类应用等。The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications, such as video playback applications, communication applications, etc., may be installed on the terminal devices 101, 102, 103.
终端设备101、102、103可以是硬件,也可以是软件。当终端设备101、102、103为硬件时,可以是具有显示屏的各种电子设备,包括但不限于手机和笔记本电脑。当终端设备101、102、103为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供视频生成服务),也可以实现成单个软件或软件模块。在此不做具体限定。Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with display screens, including but not limited to mobile phones and laptops. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software or software modules (for example, to provide video generation services), or as a single software or software module. No specific limitation is made here.
服务器105可以是提供各种服务的服务器,例如,响应于获取到视频生成请求,基于视频生成请求,获取视频元素信息;基于新的动画描述文件和所述动画模板文件,得到目标动画;基于目标动画,执行截图操作,得到有序图片序列;基于有序图片序列,生成目标视频。Server 105 can be a server that provides various services, for example, in response to obtaining a video generation request, obtaining video element information based on the video generation request; obtaining a target animation based on a new animation description file and the animation template file; performing a screenshot operation based on the target animation to obtain an ordered image sequence; and generating a target video based on the ordered image sequence.
需要说明的是,服务器105可以是硬件,也可以是软件。当服务器105为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器。当服务器为软件时,可以实现成多个软件或软件模块(例如用来提供视频生成服务),也可以实现成单个软件或软件模块。在此不做具体限定。It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, for providing video generation services), or it can be implemented as a single software or software module. No specific limitation is made here.
需要指出的是,本公开的实施例所提供的视频生成方法可以由服务器105执行,也可以由终端设备101、102、103执行,还可以由服务器105和终端设备101、102、103彼此配合执行。相应地,视频生 成装置包括的各个部分(例如各个单元、子单元、模块、子模块)可以全部设置于服务器105中,也可以全部设置于终端设备101、102、103中,还可以分别设置于服务器105和终端设备101、102、103中。It should be noted that the video generation method provided in the embodiment of the present disclosure can be executed by the server 105, can be executed by the terminal devices 101, 102, 103, or can be executed by the server 105 and the terminal devices 101, 102, 103 in cooperation with each other. The various parts (such as various units, sub-units, modules, sub-modules) included in the device can be all set in the server 105, or all set in the terminal devices 101, 102, 103, or respectively set in the server 105 and the terminal devices 101, 102, 103.
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the number of terminal devices, networks and servers in Figure 1 is only illustrative. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
图2示出了可以应用于本公开的视频生成方法的实施例的流程200。在本实施例中,视频生成方法包括以下步骤:FIG2 shows a process 200 of an embodiment of a video generation method that can be applied to the present disclosure. In this embodiment, the video generation method includes the following steps:
步骤201,响应于获取到视频生成请求,基于视频生成请求,获取视频元素信息。Step 201: in response to obtaining a video generation request, obtaining video element information based on the video generation request.
在本实施例中,执行主体(如图1中所示的服务器105或终端设备101、102、103)可以采用有线或无线的方式获取视频生成请求,并基于该视频生成请求,获取视频元素信息。In this embodiment, the execution entity (such as the server 105 or the terminal devices 101, 102, 103 shown in FIG1) can obtain the video generation request in a wired or wireless manner, and obtain the video element information based on the video generation request.
其中,视频元素信息可以包括:动画模板文件、动画描述文件、和目标素材。The video element information may include: an animation template file, an animation description file, and a target material.
这里,视频生成请求中可直接包括动画模板文件、动画描述文件、目标素材等信息,也可以仅包括动画模板文件存储路径、动画描述文件存储路径、目标素材存储路径等信息,执行主体在获取到视频生成请求后,可分别根据动画模板文件存储路径、动画描述文件存储路径、目标素材存储路径获取动画模板文件、动画描述文件和目标素材。Here, the video generation request may directly include information such as the animation template file, animation description file, target material, etc., or it may only include information such as the animation template file storage path, animation description file storage path, target material storage path, etc. After obtaining the video generation request, the execution entity may obtain the animation template file, animation description file and target material according to the animation template file storage path, animation description file storage path and target material storage path respectively.
其中,动画模板文件是用于描述动画的JSON文件,存储在动画模板数据库中。动画是由动画制作人员利用动画制作软件AE(Adobe After Effects)进行制作,并结合Bodymovin插件,把在AE上制作的动画导出为JSON文件,支持在Web/Android/IOS等进行渲染播放。该JSON文件称作动画模板文件,包括图片集合、图层集合、视图的宽度和高度、起始和结束关键帧、帧率等动画基础信息。Among them, the animation template file is a JSON file used to describe the animation and is stored in the animation template database. The animation is produced by animators using the animation software AE (Adobe After Effects), and combined with the Bodymovin plug-in, the animation produced on AE is exported as a JSON file, which supports rendering and playback on Web/Android/IOS, etc. This JSON file is called an animation template file, which includes basic animation information such as picture collection, layer collection, view width and height, start and end keyframes, frame rate, etc.
动画描述文件是通过脚本从动画模板文件中提取出后端视频生成依赖的相关动画信息。每一个动画模板文件都有相对应的动画描述文件。动画描述文件包括动画时长和动画素材信息,其中动画素材信息分为两类:图片素材和文案素材,通过类型字段进行区分。图片素材 包括图片的URL,本地文件名称,宽度、高度、图层下标等信息。文案素材包括文案内容、最小和最大文案长度和图层下标等信息。The animation description file uses a script to extract the relevant animation information that the backend video generation depends on from the animation template file. Each animation template file has a corresponding animation description file. The animation description file includes the animation duration and animation material information. The animation material information is divided into two categories: picture materials and text materials, which are distinguished by the type field. Including the image URL, local file name, width, height, layer subscript, etc. The text material includes the text content, minimum and maximum text length, layer subscript, etc.
需要指出的是,视频元素信息还可以包括目标视频宽度、高度、帧率、时长等信息。It should be noted that the video element information may also include information such as the width, height, frame rate, and duration of the target video.
其中,上述无线连接方式可以包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接、以及其他现在已知或将来开发的无线连接方式。Among them, the above-mentioned wireless connection methods may include but are not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
在一些可选的方式中,基于视频生成请求,获取视频元素信息,包括:根据动画模板文件存储路径、动画描述文件存储路径、目标素材存储路径,获取动画模板文件、动画描述文件和目标素材。In some optional methods, based on the video generation request, video element information is obtained, including: obtaining the animation template file, the animation description file and the target material according to the animation template file storage path, the animation description file storage path and the target material storage path.
在本实现方式中,视频生成请求可以包括动画模板文件存储路径、动画描述文件存储路径、目标素材存储路径,执行主体可根据画模板文件存储路径、动画描述文件存储路径、目标素材存储路径,获取动画模板文件、动画描述文件和目标素材。In this implementation, the video generation request may include the animation template file storage path, the animation description file storage path, and the target material storage path. The execution entity may obtain the animation template file, the animation description file, and the target material based on the animation template file storage path, the animation description file storage path, and the target material storage path.
该实现方式通过根据画模板文件存储路径、动画描述文件存储路径、目标素材存储路径,获取动画模板文件、动画描述文件和目标素材,降低了数据传输的数据量,提升了信息传输效率,进而提升了视频生成效率。This implementation method reduces the amount of data transmission, improves information transmission efficiency, and further improves video generation efficiency by obtaining animation template files, animation description files, and target materials according to the image template file storage path, animation description file storage path, and target material storage path.
步骤202,基于新的动画描述文件和动画模板文件,得到目标动画。Step 202: Get the target animation based on the new animation description file and the animation template file.
在本实施例中,执行主体可根据目标素材对动画描述文件中的素材进行替换,得到新的动画描述文件,读取动画模板文件和新的动画描述文件的内容,并将读取的内容填充到Lottie代码的HTML页面,得到目标动画。In this embodiment, the execution entity can replace the material in the animation description file according to the target material to obtain a new animation description file, read the contents of the animation template file and the new animation description file, and fill the read contents into the HTML page of the Lottie code to obtain the target animation.
步骤203,基于目标动画,执行截图操作,得到有序图片序列。Step 203: Based on the target animation, a screenshot operation is performed to obtain an ordered sequence of pictures.
在本实施例中,执行主体可对目标动画执行截图操作,即对目标动画进行渲染、播放并截图,得到有序图片序列。In this embodiment, the execution subject can perform a screenshot operation on the target animation, that is, render, play and screenshot the target animation to obtain an ordered sequence of pictures.
具体地,执行主体可首先通过Puppeteer以无界面方式创建Chrome浏览器并打开HTML页面,并通过Lottie动画库跳转到指定帧,然后利用Puppeteer对指定帧进行截图,并保存到存储介质集群。 Specifically, the execution subject can first create a Chrome browser and open an HTML page in a non-interface manner through Puppeteer, jump to a specified frame through the Lottie animation library, and then use Puppeteer to take a screenshot of the specified frame and save it to a storage medium cluster.
在一些可选的方式中,该方法还包括:采用资源池对浏览器进行管理,具体包括以下至少一项:在获取视频生成请求前初始化浏览器;在浏览器使用完成后,对使用完的浏览器进行回收。In some optional embodiments, the method further includes: managing the browser using a resource pool, specifically including at least one of the following: initializing the browser before obtaining a video generation request; and recycling the used browser after the browser is used.
在本实施例中,由于截图操作包括创建浏览器以进行截图,如利用Puppeteer创建Chrome浏览器,如果每个请求到来之后都需要创建浏览器,会产生较高的创建进程开销,为了减少重复创建浏览器产生的进程开销,降低资源消耗,执行主体可采用资源池统一管理浏览器资源。In this embodiment, since the screenshot operation includes creating a browser for taking screenshots, such as using Puppeteer to create a Chrome browser, if a browser needs to be created after each request, a high creation process overhead will be generated. In order to reduce the process overhead generated by repeated browser creation and reduce resource consumption, the execution entity can use a resource pool to uniformly manage browser resources.
具体地,执行主体可在视频生成请求到来前由资源池初始化部分浏览器,每次视频生成请求到来后可以直接从资源池中获取浏览器,使用完后由资源池负责将使用完的浏览器资源回收。Specifically, the execution subject can initialize some browsers from the resource pool before the video generation request arrives, and can directly obtain the browser from the resource pool after each video generation request arrives. After use, the resource pool is responsible for recycling the used browser resources.
该实现方式通过在获取视频生成请求前初始化浏览器,以及在浏览器使用完成后,对使用完的浏览器进行回收,实现了对浏览器资源的统一管理,避免了针对每次请求创建浏览器的重复操作,有效降低了资源消耗。This implementation method realizes unified management of browser resources by initializing the browser before obtaining a video generation request and recycling the used browser after the browser is used, avoiding repeated operations of creating a browser for each request and effectively reducing resource consumption.
步骤204,基于有序图片序列,生成目标视频。Step 204: Generate a target video based on the ordered picture sequence.
在本实施例中,执行主体可直接根据有序图片序列,通过视频编码工具进行编码后生成目标视频,也可以根据有序图片序列和视频生成命令,通过视频编码工具进行编码后生成目标视频,本公开对此不作限定。In this embodiment, the execution subject can directly encode the ordered picture sequence through a video encoding tool to generate a target video, or it can encode the ordered picture sequence and a video generation command through a video encoding tool to generate a target video. This disclosure does not limit this.
其中,视频生成命令可以包含在上述视频生成请求中,视频生成命令可以包括以下至少一项:指定图片序列路径、根据动画模板中限定的时长对音乐进行截断或重复播放、叠加弹幕和特效。Among them, the video generation command can be included in the above-mentioned video generation request, and the video generation command can include at least one of the following: specifying the image sequence path, truncating or repeating the music according to the duration specified in the animation template, and superimposing barrage and special effects.
在一些可选的方式中,基于有序图片序列,生成目标视频,包括:基于有序图片序列和视频生成命令,生成目标视频。In some optional methods, generating a target video based on an ordered picture sequence includes: generating a target video based on an ordered picture sequence and a video generation command.
在本实现方式中,视频元素信息还包括:视频生成命令,视频生成命令包括以下至少一项:指定图片序列路径、根据动画模板中限定的时长对音乐进行截断或重复播放、叠加弹幕和特效。In this implementation, the video element information also includes: a video generation command, which includes at least one of the following: specifying a picture sequence path, truncating or repeating the music according to the duration specified in the animation template, and superimposing barrage and special effects.
执行主体在获得有序图片序列后,可根据有序图片序列和视频生成命令,通过视频编码工具进行编码后生成目标视频,并将视频文件 和视频MD5校验文件同步到存储介质集群中。After obtaining the ordered picture sequence, the execution subject can encode the ordered picture sequence and the video generation command through the video encoding tool to generate the target video, and then convert the video file into And the video MD5 verification file is synchronized to the storage medium cluster.
该实现方式通过基于有序图片序列和视频生成命令,生成目标视频,有效提升了生成的目标视频的有效性。This implementation method generates a target video based on an ordered image sequence and a video generation command, thereby effectively improving the effectiveness of the generated target video.
继续参见图3,图3是根据本实施例的视频生成方法的应用场景的一个示意图。Continuing to refer to FIG. 3 , FIG. 3 is a schematic diagram of an application scenario of the video generation method according to this embodiment.
在图3的应用场景中,执行主体301可采用有线或无线的方式实时或定期监测视频生成请求302,响应于获取到视频生成请求302,基于视频生成请求,获取视频元素信息,其中,视频元素信息包括:动画模板文件303、动画描述文件304和目标素材305;基于新的动画描述文件306和动画模板文件303,得到目标动画307,其中,新的动画描述文件通过将目标素材替换动画描述文件中的素材得到;基于目标动画307,执行截图操作308,得到有序图片序列309;基于有序图片序列309,生成目标视频310。In the application scenario of Figure 3, the execution entity 301 can monitor the video generation request 302 in real time or periodically in a wired or wireless manner, and in response to obtaining the video generation request 302, obtain video element information based on the video generation request, wherein the video element information includes: an animation template file 303, an animation description file 304 and a target material 305; based on a new animation description file 306 and the animation template file 303, obtain a target animation 307, wherein the new animation description file is obtained by replacing the material in the animation description file with the target material; based on the target animation 307, perform a screenshot operation 308 to obtain an ordered image sequence 309; based on the ordered image sequence 309, generate a target video 310.
本公开的视频生成方法,通过响应于获取到视频生成请求,基于视频生成请求,获取视频元素信息;基于新的动画描述文件和动画模板文件,得到目标动画;基于目标动画,执行截图操作,得到有序图片序列;基于有序图片序列,生成目标视频,即充分利用动画模板的易扩展性和可重用性,丰富视频样式,降低开发成本,有效克服了相关技术中基于模板的视频生成系统视频多样性受限,开发成本高的问题。The video generation method disclosed in the present invention obtains video element information based on the video generation request in response to obtaining a video generation request; obtains a target animation based on a new animation description file and an animation template file; performs a screenshot operation based on the target animation to obtain an ordered image sequence; and generates a target video based on the ordered image sequence, that is, fully utilizing the extensibility and reusability of animation templates, enriching video styles, and reducing development costs, effectively overcoming the problems of limited video diversity and high development costs in template-based video generation systems in related technologies.
进一步参考图4,其示出了图2所示的视频生成方法的又一个实施例的流程400。在本实施例中,视频生成方法的流程400,可包括以下步骤:Further reference is made to Fig. 4, which shows a process 400 of yet another embodiment of the video generation method shown in Fig. 2. In this embodiment, the process 400 of the video generation method may include the following steps:
步骤401,响应于获取到视频生成请求,基于视频生成请求,获取视频元素信息。Step 401: in response to obtaining a video generation request, obtaining video element information based on the video generation request.
在本实施例中,步骤401的实现细节和技术效果,可以参考对步骤201的描述,在此不再赘述。In this embodiment, the implementation details and technical effects of step 401 can refer to the description of step 201 and will not be repeated here.
步骤402,基于新的动画描述文件和动画模板文件,得到目标动 画。Step 402, based on the new animation description file and animation template file, obtain the target animation painting.
在本实施例中,步骤402的实现细节和技术效果,可以参考对步骤202的描述,在此不再赘述。In this embodiment, the implementation details and technical effects of step 402 can refer to the description of step 202 and will not be repeated here.
步骤403,将目标动画划分为预设数量个子片段。Step 403: Divide the target animation into a preset number of sub-segments.
在本实施例中,由于渲染、播放和截图是大量消耗CPU和内存资源的操作,针对单台机器上的单个视频生成请求,为了利用多核性能,提高CPU利用率,渲染、播放和截图会拆分到多个不同的进程同时进行。In this embodiment, since rendering, playback and screenshot are operations that consume a large amount of CPU and memory resources, for a single video generation request on a single machine, in order to utilize multi-core performance and improve CPU utilization, rendering, playback and screenshot are split into multiple different processes and performed simultaneously.
为此,执行主体可将目标动画划分为预设数量个子片段,其中,预设数量可根据实际需求设定,例如,5个、7个等,本公开对此不作限定。To this end, the execution entity may divide the target animation into a preset number of sub-segments, wherein the preset number may be set according to actual needs, for example, 5, 7, etc., and the present disclosure does not limit this.
步骤404,并行运行预设数量个子进程对预设数量个子片段执行截图操作,得到预设数量个子图片序列。Step 404 , running a preset number of sub-processes in parallel to perform screenshot operations on a preset number of sub-segments to obtain a preset number of sub-picture sequences.
在本实施例中,执行主体可并行运行预设数量个子进程对预设数量个子片段执行截图操作,得到预设数量个子图片序列。In this embodiment, the execution entity may run a preset number of sub-processes in parallel to perform screenshot operations on a preset number of sub-segments to obtain a preset number of sub-picture sequences.
其中,并行运行的子进程的数量与子片段的数量相同,如,预设数量均为6,每一子进程对一个子片段执行截图操作得到一个子图片序列,各子进程对应的子片段各不相同,即每个动画由多个子进程并行进行截图,每个子进程负责截取动画的一部分图片,子进程之间的截取图片范围是互不交叉的。Among them, the number of sub-processes running in parallel is the same as the number of sub-segments, for example, the preset number is 6. Each sub-process performs a screenshot operation on a sub-segment to obtain a sub-image sequence. The sub-segments corresponding to each sub-process are different, that is, each animation is screenshoted in parallel by multiple sub-processes, and each sub-process is responsible for capturing a part of the animation. The captured image ranges between sub-processes do not overlap.
步骤405,基于预设数量个子图片序列,生成有序图片序列。Step 405: Generate an ordered picture sequence based on a preset number of sub-picture sequences.
在本实施例中,执行主体可根据各子进程执行截取操作的范围和图像帧的位置,将子图片序列进行排序,得到有序图片序列。In this embodiment, the execution subject may sort the sub-picture sequence according to the range of the interception operation executed by each sub-process and the position of the image frame to obtain an ordered picture sequence.
具体地,每个子进程执行截取操作的范围可以通过以下公式计算得到:Specifically, the scope of the interception operation performed by each child process can be calculated by the following formula:
设置子进程数为n,帧率为fps(帧/s),动画总时长为total_duration(s),i为动画中位于当前子进程对应的子片段之前的图片数,则第index个子进程对相应片段执行截取操作,得到子序列的时长范围为:
(i+index*mindex)*msTimeStep,0≤i<mindex (1)
Set the number of subprocesses to n, the frame rate to fps (frames/s), the total duration of the animation to total_duration(s), and i to be the number of pictures before the sub-segment corresponding to the current subprocess in the animation. Then the index-th subprocess performs an interception operation on the corresponding segment, and the duration range of the subsequence is:
(i+index*m index )*msTimeStep,0≤i<m index (1)
其中,mindex为第index个子进程需要截取图片数:
Among them, m index is the number of pictures that the index-th child process needs to capture:
msTimeStep为毫秒步长:
msTimeStep= 1000/fps (3)msTimeStep is the millisecond step size:
msTimeStep= 1000/fps (3)
k为总帧数:
k=fps*total_duration (4)k is the total number of frames:
k=fps*total_duration (4)
步骤406,基于有序图片序列,生成目标视频。Step 406: Generate a target video based on the ordered picture sequence.
在本实施例中,步骤406的实现细节和技术效果,可以参考对步骤204的描述,在此不再赘述。In this embodiment, the implementation details and technical effects of step 406 can refer to the description of step 204 and will not be repeated here.
从图4中可以看出,与图2对应的实施例相比,本实施例中的视频生成方法的流程400体现了将目标动画划分为预设数量个子片段,并行运行预设数量个子进程对预设数量个子片段执行截图操作,得到预设数量个子图片序列,基于预设数量个子图片序列,生成有序图片序列,基于有序图片序列,生成目标视频,该方式通过创建多个子进程并行进行渲染、播放和截图以加快图片截取速度,从而有效加快了视频生成速度。As can be seen from Figure 4, compared with the embodiment corresponding to Figure 2, the process 400 of the video generation method in this embodiment embodies dividing the target animation into a preset number of sub-segments, running a preset number of sub-processes in parallel to perform screenshot operations on a preset number of sub-segments, obtaining a preset number of sub-picture sequences, generating an ordered picture sequence based on the preset number of sub-picture sequences, and generating a target video based on the ordered picture sequence. This method creates multiple sub-processes for rendering, playback and screenshots in parallel to speed up the picture capture speed, thereby effectively speeding up the video generation speed.
进一步参考图5,作为对上述各图所示方法的实现,本公开提供了一种视频生成装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。Further referring to FIG. 5 , as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a video generating device, which corresponds to the method embodiment shown in FIG. 2 , and can be specifically applied to various electronic devices.
如图5所示,本实施例的视频生成装置500包括:获取模块501、替换模块502、截图模块503和生成模块504。As shown in FIG. 5 , the video generating device 500 of this embodiment includes: an acquiring module 501 , a replacing module 502 , a screenshot module 503 and a generating module 504 .
其中,获取模块501,可被配置成响应于获取到视频生成请求,基于视频生成请求,获取视频元素信息。The acquisition module 501 may be configured to acquire video element information based on the video generation request in response to acquiring the video generation request.
替换模块502,可被配置成基于新的动画描述文件和所述动画模板文件,得到目标动画。The replacement module 502 may be configured to obtain a target animation based on a new animation description file and the animation template file.
截图模块503,可被配置成基于目标动画,执行截图操作,得到有序图片序列。The screenshot module 503 may be configured to perform a screenshot operation based on the target animation to obtain an ordered sequence of images.
生成模块504,可被配置成基于有序图片序列,生成目标视频。 The generating module 504 may be configured to generate a target video based on the ordered picture sequence.
在本实施例的一些可选的方式中,截图模块进一步被配置成:将目标动画划分为预设数量个子片段;并行运行预设数量个子进程对预设数量个子片段执行截图操作,得到预设数量个子图片序列;基于预设数量个子图片序列,生成有序图片序列。In some optional modes of this embodiment, the screenshot module is further configured to: divide the target animation into a preset number of sub-segments; run a preset number of sub-processes in parallel to perform screenshot operations on a preset number of sub-segments to obtain a preset number of sub-image sequences; and generate an ordered image sequence based on the preset number of sub-image sequences.
在本实施例的一些可选的方式中,获取模块进一步被配置成:根据动画模板文件存储路径、动画描述文件存储路径和目标素材存储路径,获取动画模板文件、动画描述文件和目标素材。In some optional aspects of this embodiment, the acquisition module is further configured to acquire the animation template file, the animation description file and the target material according to the animation template file storage path, the animation description file storage path and the target material storage path.
在本实施例的一些可选的方式中,生成模块进一步被配置成:基于有序图片序列和视频生成命令,生成目标视频。In some optional aspects of this embodiment, the generation module is further configured to: generate a target video based on an ordered picture sequence and a video generation command.
在本实施例的一些可选的方式中,视频生成命令包括以下至少一项:指定图片序列路径、根据动画模板中限定的时长对音乐进行截断或重复播放、叠加弹幕和特效。In some optional modes of this embodiment, the video generation command includes at least one of the following: specifying a picture sequence path, truncating or repeating the music according to the duration specified in the animation template, and superimposing barrage and special effects.
在本实施例的一些可选的方式中,截图操作包括创建浏览器以进行截图。In some optional aspects of this embodiment, the screenshot operation includes creating a browser to take the screenshot.
在本实施例的一些可选的方式中,该装置还包括管理模块,管理模块被配置成采用资源池对所述浏览器进行管理,具体包括以下至少一项:在获取视频生成请求前初始化浏览器;在浏览器使用完成后,对使用完的浏览器进行回收。In some optional aspects of this embodiment, the device further includes a management module, which is configured to manage the browser using a resource pool, specifically including at least one of the following: initializing the browser before obtaining a video generation request; and recycling the used browser after the browser is used.
进一步参考图6,本公开提供了一种视频生成系统的一个实施例。With further reference to FIG. 6 , the present disclosure provides an embodiment of a video generation system.
在本实施例中,该系统包括请求服务器601,视频生成子服务器602。In this embodiment, the system includes a request server 601 and a video generation sub-server 602 .
请求服务器601可以是提供各种服务的服务器,例如,基于用户输入信息,生成多个视频生成请求,并将多个视频生成请求发送至视频生成子服务器集群中的一个或多个视频生成子服务器。The request server 601 may be a server that provides various services, for example, generates multiple video generation requests based on user input information, and sends the multiple video generation requests to one or more video generation sub-servers in a video generation sub-server cluster.
视频生成子服务器602,用于执行如上任意一实施例所描述的视频生成方法。The video generation sub-server 602 is used to execute the video generation method described in any of the above embodiments.
其中,基于用户输入信息,生成多个视频生成请求,并将多个视频生成请求发送至视频生成子服务器集群中的一个或多个视频生成子服务器,具体可包括以下4个步骤: Wherein, based on the user input information, multiple video generation requests are generated, and the multiple video generation requests are sent to one or more video generation sub-servers in the video generation sub-server cluster, which may specifically include the following four steps:
步骤6011,视频制作请求预处理。请求服务器首先接收广告主通过前端展示页面选择的视频生成信息,如物品ID、模板ID、广告位ID,然后解析该请求并判断该请求是否为有效请求,是否包含物品ID、模板ID和广告位ID等必要信息。如果不包含则认为该请求是无效请求,返回失败信息,视频生成进度置为无效进度。如果是有效请求,进入步骤6012。Step 6011, video production request preprocessing. The request server first receives the video generation information selected by the advertiser through the front-end display page, such as the item ID, template ID, and ad slot ID, and then parses the request and determines whether the request is a valid request and whether it contains necessary information such as the item ID, template ID, and ad slot ID. If not, the request is considered to be an invalid request, and a failure message is returned, and the video generation progress is set to an invalid progress. If it is a valid request, go to step 6012.
步骤6012,素材获取。视频制作依赖的相关素材有文案素材、图片素材、音乐素材、模板素材等。如果广告主自主上传本地素材,进入步骤6014。否则,通过从本地文件或远端素材数据库获取素材,进入步骤6013。例如,文案素材可以通过访问文案信息数据库获取,文案信息数据库中存储了经过挖掘或处理后的物品文案信息,包括产品描述、品牌名等信息。图片素材可以通过访问物品基础数据库获取,物品基础数据库中存储了物品的主图信息、物品详情页和轮播图等图片的基本属性信息和图像检测结果信息,如人脸检测、文字检测等,供视频生成使用。Step 6012, material acquisition. The related materials that video production relies on include text materials, picture materials, music materials, template materials, etc. If the advertiser uploads local materials on his own, go to step 6014. Otherwise, go to step 6013 by obtaining materials from local files or remote material databases. For example, text materials can be obtained by accessing the text information database, which stores the mined or processed text information of items, including product descriptions, brand names, and other information. Picture materials can be obtained by accessing the item basic database, which stores the basic attribute information of the main picture information of the item, the item details page, and the carousel picture, as well as image detection result information, such as face detection, text detection, etc., for use in video generation.
步骤6013,素材筛选。素材筛选阶段主要负责从多张图片和多条文案中筛选出符合条件的素材候选集合。在获取图片的基本属性和图像检测结果等信息后,首先根据图像人脸检测、文字检测和图片相似性等规则,对图片进行过滤,得到符合规则的图片候选集。结合动画模板支持的图片个数,从候选集中随机选择出多张图片。文案则采用随机方式进行筛选。根据动画模板支持的文案个数,从文案候选集中随机选择出多个文案。Step 6013, material screening. The material screening stage is mainly responsible for screening out a set of qualified material candidates from multiple pictures and multiple texts. After obtaining information such as the basic attributes of the picture and the image detection results, the pictures are first filtered according to rules such as image face detection, text detection, and picture similarity to obtain a candidate set of pictures that meet the rules. Combined with the number of pictures supported by the animation template, multiple pictures are randomly selected from the candidate set. The texts are screened in a random manner. According to the number of texts supported by the animation template, multiple texts are randomly selected from the text candidate set.
步骤6014,素材处理。素材处理阶段通常会对图片素材进行处理,根据模板的宽度和高度对图片文件进行缩放处理,生成规格符合的图片文件。Step 6014, material processing. In the material processing stage, the image material is usually processed, and the image file is scaled according to the width and height of the template to generate an image file that meets the specifications.
步骤6015,分布式视频生成。根据处理好的素材及动画模板信息,生成一个或多个视频生成请求,并采用轮询的方式将多个视频生成请求发送至视频生成子服务器集群中的一个或多个视频生成子服务器。Step 6015: Distributed video generation: Generate one or more video generation requests based on the processed material and animation template information, and send the multiple video generation requests to one or more video generation sub-servers in the video generation sub-server cluster in a polling manner.
通过提供包括请求服务器和视频生成子服务器的视频生成系统,在提升生成视频多样性的同时,有效克服了相关技术中基于模板的视 频生成系统中视频生成阶段和素材获取、筛选、处理等功能紧密耦合,只能整体进行升级或性能优化,不利于系统维护的问题。By providing a video generation system including a request server and a video generation sub-server, the diversity of generated videos is improved while effectively overcoming the problem of template-based video in related technologies. The video generation stage in the video generation system is tightly coupled with functions such as material acquisition, screening, and processing, and can only be upgraded or performance optimized as a whole, which is not conducive to system maintenance.
在一些可以选的方式中,请求服务器进一步用于获取视频生成子服务器生成的目标视频,并对目标视频进行存储。In some optional methods, the request server is further used to obtain the target video generated by the video generation sub-server and store the target video.
在本实现方式中,请求服务器可获取视频生成子服务器生成的目标视频,将目标视频上传至远端文件存储系统,并将目标视频的基本信息,如URL、宽度、高度、模板ID等存储至视频创意库。In this implementation, the requesting server can obtain the target video generated by the video generation sub-server, upload the target video to the remote file storage system, and store the basic information of the target video, such as URL, width, height, template ID, etc., to the video creative library.
进一步地,在目标视频生成过程中,目标视频生成进度会随时间实时更新,并写入进度数据库,在完成目标视频存储后,目标视频生成进度为100%,该物品的视频制作请求已处理完毕。Furthermore, during the target video generation process, the target video generation progress will be updated in real time over time and written into the progress database. After the target video storage is completed, the target video generation progress is 100%, and the video production request for the item has been processed.
应该理解,图6中的请求服务器601、视频生成子服务器602的数目仅仅是示意性的。根据实现需要,可以具有任意数目的请求服务器和视频生成子服务器。It should be understood that the number of request servers 601 and video generation sub-servers 602 in Fig. 6 is only for illustration purposes. Any number of request servers and video generation sub-servers may be provided as required.
本公开的技术方案中,所涉及的用户个人信息的获取,存储和应用等,均符合相关法律法规的规定,且不违背公序良俗。In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
根据本公开的实施例,本公开还提供了一种电子设备和一种可读存储介质。According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
如图7所示,是根据本公开实施例的视频生成方法的电子设备的框图。As shown in FIG. 7 , it is a block diagram of an electronic device according to a video generating method according to an embodiment of the present disclosure.
700是根据本公开实施例的视频生成方法的电子设备的框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。700 is a block diagram of an electronic device according to a video generation method of an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and/or required herein.
如图7所示,该电子设备包括:一个或多个处理器701、存储器702,以及用于连接各部件的接口,包括高速接口和低速接口。各个部 件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图7中以一个处理器701为例。As shown in FIG7 , the electronic device includes: one or more processors 701, a memory 702, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. The components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input/output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and/or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). A processor 701 is taken as an example in Figure 7.
存储器702即为本公开所提供的非瞬时计算机可读存储介质。其中,所述存储器存储有可由至少一个处理器执行的指令,以使所述至少一个处理器执行本公开所提供的视频生成方法。本公开的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本公开所提供的视频生成方法。The memory 702 is a non-transient computer-readable storage medium provided by the present disclosure. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the video generation method provided by the present disclosure. The non-transient computer-readable storage medium of the present disclosure stores computer instructions, which are used to enable a computer to perform the video generation method provided by the present disclosure.
存储器702作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本公开实施例中的视频生成方法对应的程序指令/模块(例如,附图5所示的获取模块501、替换模块502、截图模块503和生成模块504)。处理器701通过运行存储在存储器702中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中的视频生成方法。The memory 702, as a non-transient computer-readable storage medium, can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions/modules corresponding to the video generation method in the embodiment of the present disclosure (for example, the acquisition module 501, the replacement module 502, the screenshot module 503 and the generation module 504 shown in FIG. 5). The processor 701 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 702, that is, the video generation method in the above method embodiment is implemented.
存储器702可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储视频生成的电子设备的使用所创建的数据等。此外,存储器702可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施例中,存储器702可选包括相对于处理器701远程设置的存储器,这些远程存储器可以通过网络连接至视频生成的电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of the video-generating electronic device, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 702 may optionally include a memory remotely arranged relative to the processor 701, and these remote memories may be connected to the video-generating electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
视频生成方法的电子设备还可以包括:输入装置703和输出装置 704。处理器701、存储器702、输入装置703和输出装置704可以通过总线或者其他方式连接,图7中以通过总线连接为例。The electronic device of the video generation method may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703 and the output device 704 may be connected via a bus or other means, and FIG7 takes the connection via a bus as an example.
输入装置703可接收输入的数字或字符信息,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等输入装置。输出装置704可以包括显示设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。该显示设备可以包括但不限于,液晶显示器(LCD)、发光二极管(LED)显示器和等离子体显示器。在一些实施方式中,显示设备可以是触摸屏。The input device 703 can receive input digital or character information, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a track ball, a joystick, and other input devices. The output device 704 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.
此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、专用ASIC(专用集成电路)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various implementations may include: being implemented in one or more computer programs that can be executed and/or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
这些计算程序(也称作程序、软件、软件应用、或者代码)包括可编程处理器的机器指令,并且可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。如本文使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和/或数据提供给可编程处理器的任何信号。These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and/or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and/or data to a programmable processor.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视 觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein can 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; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual sensory feedback, auditory feedback, or tactile feedback); and can receive input from the user in any form (including acoustic input, voice input, or tactile input).
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such 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 communications network). Examples of communications networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
根据本公开实施例的技术方案,有效丰富了生成的视频样式,降低了开发成本。According to the technical solution of the embodiment of the present disclosure, the generated video styles are effectively enriched and the development costs are reduced.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发申请中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in this disclosure can be achieved, and this document is not limited here.
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。 The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims (14)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310298310.5 | 2023-03-24 | ||
CN202310298310.5A CN116248919A (en) | 2023-03-24 | 2023-03-24 | Video generation method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024198989A1 true WO2024198989A1 (en) | 2024-10-03 |
Family
ID=86633265
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2024/082201 WO2024198989A1 (en) | 2023-03-24 | 2024-03-18 | Video generation method and apparatus |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116248919A (en) |
WO (1) | WO2024198989A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116248919A (en) * | 2023-03-24 | 2023-06-09 | 北京沃东天骏信息技术有限公司 | Video generation method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109769141A (en) * | 2019-01-31 | 2019-05-17 | 北京字节跳动网络技术有限公司 | A kind of video generation method, device, electronic equipment and storage medium |
CN110708596A (en) * | 2019-09-29 | 2020-01-17 | 北京达佳互联信息技术有限公司 | Method and device for generating video, electronic equipment and readable storage medium |
CN112637675A (en) * | 2020-12-16 | 2021-04-09 | 深圳市欢太科技有限公司 | Video generation method and device, electronic equipment and storage medium |
WO2022033131A1 (en) * | 2020-08-11 | 2022-02-17 | 深圳市前海手绘科技文化有限公司 | Animation rendering method based on json data format |
WO2022088783A1 (en) * | 2020-10-28 | 2022-05-05 | 北京达佳互联信息技术有限公司 | Video production method and apparatus |
CN116248919A (en) * | 2023-03-24 | 2023-06-09 | 北京沃东天骏信息技术有限公司 | Video generation method and device |
-
2023
- 2023-03-24 CN CN202310298310.5A patent/CN116248919A/en active Pending
-
2024
- 2024-03-18 WO PCT/CN2024/082201 patent/WO2024198989A1/en unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109769141A (en) * | 2019-01-31 | 2019-05-17 | 北京字节跳动网络技术有限公司 | A kind of video generation method, device, electronic equipment and storage medium |
CN110708596A (en) * | 2019-09-29 | 2020-01-17 | 北京达佳互联信息技术有限公司 | Method and device for generating video, electronic equipment and readable storage medium |
WO2022033131A1 (en) * | 2020-08-11 | 2022-02-17 | 深圳市前海手绘科技文化有限公司 | Animation rendering method based on json data format |
WO2022088783A1 (en) * | 2020-10-28 | 2022-05-05 | 北京达佳互联信息技术有限公司 | Video production method and apparatus |
CN112637675A (en) * | 2020-12-16 | 2021-04-09 | 深圳市欢太科技有限公司 | Video generation method and device, electronic equipment and storage medium |
CN116248919A (en) * | 2023-03-24 | 2023-06-09 | 北京沃东天骏信息技术有限公司 | Video generation method and device |
Also Published As
Publication number | Publication date |
---|---|
CN116248919A (en) | 2023-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7240505B2 (en) | Voice packet recommendation method, device, electronic device and program | |
CN103077239B (en) | Based on the iFrame embedded Web 3D system that cloud is played up | |
WO2021169459A1 (en) | Short video generation method and platform, electronic device, and storage medium | |
WO2016015432A1 (en) | Page construction method, apparatus, system and device, and nonvolatile computer storage medium | |
CN110458918A (en) | Method and device for outputting information | |
JP7263660B2 (en) | Video processing method, device, electronic device and storage medium | |
WO2017049792A1 (en) | Application software recommendation method and device | |
CN109426603B (en) | Method and device for analyzing application program blockage | |
CN109154943A (en) | Conversion based on server of the automatic broadcasting content to click play content | |
CN110110101B (en) | Multimedia content recommendation method, device, terminal, server and readable medium | |
US20240292052A1 (en) | Page display method and apparatus, electronic device and storage medium | |
CN115357755B (en) | Video generation method, video display method and device | |
CN111651966A (en) | Method, device and electronic device for generating data report file | |
CN116471451A (en) | Video processing method, device, electronic device, and computer-readable storage medium | |
CN116578226A (en) | Image processing method, device, device, storage medium and program product | |
WO2024198989A1 (en) | Video generation method and apparatus | |
CN114817814A (en) | Display method and device for pop-up window | |
CN110647374A (en) | Interaction method and device for holographic display window and electronic equipment | |
CN111327941B (en) | Offline video playing method, device, equipment and medium | |
CN113641853A (en) | Dynamic cover generation method, device, electronic device, medium and program product | |
JP2025521195A (en) | Text material acquisition method, device, equipment, medium, and program product | |
CN110866014A (en) | Standard index data access and display method | |
CN113542802B (en) | Video transition method and device | |
WO2018205390A1 (en) | Control layout display control method, system, and apparatus, and computer readable storage medium | |
CN104658020A (en) | A New Media Production Management System |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24777778 Country of ref document: EP Kind code of ref document: A1 |