Video generation method, device, electronic device, storage medium and product
Through the large language model, the automatic generation of video copy and intelligent matching technology, and the automatic matching and fusion of materials is solved, the problems of cumbersome generation of traditional videos and the single expression are achieved, the efficiency and diversity of video generation are achieved, and the audience experience is improved.
Patent Information
- Application Number
- CN202411253652.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-09-09
Smart Images

Figure CN118803173B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video editing technology, and in particular to video generation methods, devices, electronic devices, storage media and products. Background Art
[0002] Traditional video generation not only requires creators to write texts, shoot and collect materials, but also requires complex image processing, such as cutting out and background fusion, inserting personal materials, adjusting volume and adding subtitles. This series of operations is time-consuming and laborious. Even for experienced creators, it often takes several hours or even one or two days to complete a video generation work, which greatly reduces the efficiency of creation. In addition, traditional video generation is also relatively simple in production style. The videos produced often either use an empty shot style throughout the process and lack substantive content; or they rely entirely on the oral broadcast of real people or digital people. The visual effects and information transmission methods are relatively monotonous, which makes it difficult to fully mobilize the audience's interest in watching. Therefore, this type of video not only gives the audience a relatively boring experience, but also has obvious limitations in information carrying capacity, and it is difficult to meet the needs of rich and diverse content in the modern multimedia environment.
[0003] In summary, how to simplify the operational process of video generation and improve video expressiveness has become a technical problem that needs to be urgently solved in this field. Summary of the invention
[0004] The main purpose of this application is to provide a video generation method, device, electronic device, storage medium and product, aiming to simplify the operation process of video generation and improve the video expressiveness.
[0005] To achieve the above purpose, the present application proposes a video generation method, which includes:
[0006] Input the initial text into the large language model to obtain the target text;
[0007] Matching target materials based on the selected storyboard type and the target copy;
[0008] Voice content is generated according to the target text, and the voice content is merged with the target material to obtain a target storyboard video.
[0009] In one embodiment, the step of matching the target material based on the selected storyboard type and the target text includes:
[0010] When the selected storyboard type is the blank shot type, an initial target material matching the target copy is searched from a preset material library through a material matching algorithm;
[0011] The initial target material is obfuscated by a video picture obfuscation algorithm to obtain the target material.
[0012] In one embodiment, the step of searching for an initial target material matching the target copy from a preset material library using a material matching algorithm includes:
[0013] Using the material matching algorithm, each material in the preset material library is vectorized to obtain each material vector;
[0014] Performing a vectorization operation on the target text to obtain a text vector;
[0015] The similarity values between the text vector and each of the material vectors are calculated in sequence, and the material with the highest similarity value is determined as the initial target material matching the target text.
[0016] In one embodiment, the step of matching the target material based on the selected storyboard type and the target text further includes:
[0017] When the selected storyboard type is the digital human broadcast type, an initial target material is generated according to the preset digital human image setting, wherein the initial target material includes an initial digital human model and a digital human background picture;
[0018] The state of the initial digital human model is adjusted according to the text content of the target copy, and the digital human background image is rendered to obtain the target material matching the target copy.
[0019] In one embodiment, after the step of generating voice content according to the target text and fusing the voice with the target material to obtain a storyboard video, the method further includes:
[0020] After generating each storyboard video including the target storyboard video, connecting each storyboard video through a video transition special effect algorithm to obtain an initial target video;
[0021] Subtitles and video soundtracks are added to the initial target video according to the voice content of each of the storyboard videos to obtain a target video.
[0022] In one embodiment, before the step of connecting the storyboard videos by using a video transition special effect algorithm to obtain an initial target video, the step further includes:
[0023] Determining the video specifications of each of the storyboard videos, wherein the video specifications include resolution, frame rate, encoding format, color tone and size;
[0024] Adjusting the parameters of each of the storyboard videos so that the video specifications of each of the storyboard videos are consistent, thereby obtaining each adjusted storyboard video;
[0025] The step of connecting the storyboard videos by using a video transition special effect algorithm to obtain an initial target video includes:
[0026] The adjusted storyboard videos are connected through a video transition special effects algorithm to obtain the initial target video.
[0027] In addition, to achieve the above-mentioned purpose, the present application also proposes a video generation device, the device comprising:
[0028] The copy generation module is used to input the initial copy into the large language model to obtain the target copy;
[0029] A material matching module, used for matching target materials based on the selected storyboard type and the target copy;
[0030] The video generation module is used to generate voice content according to the target text, and fuse the voice content with the target material to obtain a target storyboard video.
[0031] In addition, to achieve the above objectives, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the video generation method as described above.
[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the video generation method as described above are implemented.
[0033] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the video generation method as described above are implemented.
[0034] The present application proposes a video generation method. The present application first uses large language model technology to automatically convert the initial copy input by the user into a more attractive and logical target copy. Subsequently, the material resources are automatically matched based on the storyboard type selected by the video creator and the generated target copy. After obtaining the target copy and target material, voice content corresponding to the target copy and target material is automatically generated, and the voice content is merged with the target material to generate a target storyboard video.
[0035] In summary, this application realizes the automatic generation of video copy by introducing a large language model, realizes the automatic matching of copy and material through intelligent matching technology, and the matching material can be adjusted according to the storyboard type selected by the video creator. At the same time, the fusion process of voice content and target material is automated. In this way, by intelligently matching diverse materials with automatically generated voice content, the video production cycle is shortened, the video content is made richer and more diverse, the monotony of the content is effectively avoided, the overall viewing experience is enhanced, and the operational process of video generation is simplified and the effect of improving the expressiveness of the video is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0038] Figure 1 A schematic diagram of a flow chart provided for the first embodiment of the video generation method of the present application;
[0039] Figure 2 A schematic diagram of a video generation process provided in Example 2 of the video generation method of the present application;
[0040] Figure 3 Another video generation process diagram provided for the second embodiment of the video generation method of the present application;
[0041] Figure 4 This is a schematic diagram of the module structure of the device according to the embodiment of the present application;
[0042] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the video generation method in the embodiment of the present application.
[0043] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0045] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0046] The main solution of the embodiment of the present application is: input the initial copy into the large language model to obtain the target copy; match the target material based on the selected storyboard type and the target copy; generate voice content according to the target copy, merge the voice content and the target material to obtain the target storyboard video.
[0047] Traditional video generation not only requires creators to write texts, shoot and collect materials, but also requires complex image processing, such as cutting out and background fusion, inserting personal materials, adjusting volume and adding subtitles. This series of operations is time-consuming and laborious. Even for experienced creators, it often takes several hours or even one or two days to complete a video generation work, which greatly reduces the efficiency of creation. In addition, traditional video generation is also relatively simple in production style. The videos produced often either use an empty shot style throughout the process and lack substantive content; or they rely entirely on the oral broadcast of real people or digital people. The visual effects and information transmission methods are relatively monotonous, and it is difficult to fully mobilize the audience's interest in watching. Therefore, this type of video not only gives the audience a relatively boring experience, but also has obvious limitations in information carrying capacity, and it is difficult to meet the needs of rich and diverse content in the modern multimedia environment.
[0048] The embodiment of the present application provides a solution, which realizes the automatic generation of video copy by introducing a large language model, realizes the automatic matching of copy and material through intelligent matching technology, and the matched material can be adjusted according to the storyboard type selected by the video creator. At the same time, the fusion process of voice content and target material is automated. In this way, by intelligently matching diverse materials with automatically generated voice content, the video production cycle is shortened, the video content is made richer and more diverse, the monotony of the content is effectively avoided, the overall viewing experience is enhanced, and the operational process of video generation is simplified and the effect of improving the expressiveness of the video is achieved.
[0049] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes the video generation terminal as an example to illustrate this embodiment and the following embodiments.
[0050] Based on this, the embodiment of the present application provides a video generation method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the video generation method of the present application.
[0051] In this embodiment, the video generation method includes steps S10 to S30:
[0052] Step S10, inputting the initial text into the large language model to obtain the target text;
[0053] The initial copy of the preliminary concept entered by the user is input into a pre-trained large language model. The model has the ability to understand and generate language, and can quickly analyze the context, theme and emotional tendency of the initial copy, and then create a target copy with clear logic, precise expression and appeal. This process not only reduces the burden of writing copy for users, but also ensures the high quality of the copy content.
[0054] In the process of using a large language model to generate target text, parameters such as temperature or top-p (a sampling method for controlling the diversity of text generation in a large language model) can be used to control the generation of multiple different target texts for an initial text for video creators to choose from. Specifically, the temperature value of the large language model generally ranges from 0 to 1. The larger the temperature, the more diverse the generated text. In this embodiment, it is preferably around 0.8. Top-p is also a strategy for controlling the diversity of the output of the large language model. The larger the value, the more diverse it is. In this embodiment, it is preferably 0.7-0.8.
[0055] Step S20, matching the target material based on the selected storyboard type and the target copy;
[0056] According to the storyboard type selected by the user (such as empty shot or digital voice broadcast) and the generated target copy, it automatically searches and matches in the preset material library, accurately screening out the target material that best matches the content, style and emotion of the copy, including but not limited to pictures, video clips, animation effects, digital human images, etc., thereby improving the efficiency and accuracy of material selection.
[0057] It should be noted that the preset material library includes a picture material library and a digital human material library. The picture material library includes various public pictures, video clips, animation effects that can be searched online, and personal materials uploaded by video creators. The digital human material library includes various digital human images that can be searched online, as well as personalized digital human images custom created by video creators, and the material library can be continuously updated.
[0058] Step S30, generating voice content according to the target text, and fusing the voice content with the target material to obtain a target storyboard video.
[0059] After obtaining the target text and target material, we further use speech synthesis technology to convert the target text into natural and fluent voice content. Then, we use video editing technology to accurately synchronize and integrate the voice content with the target material to generate a target storyboard video that is both in line with the intention of the target text and full of visual impact.
[0060] In addition, in the process of integrating voice content and target material, in order to ensure that the voice content and target material can be fully synchronized, event-driven architecture, distributed scheduling system and message queue technology are adopted to ensure the synchronization of voice content and target material.
[0061] The specific steps to ensure that the voice content is synchronized with the target material are as follows:
[0062] ① After confirming that the voice content has been generated, an event is triggered through the event-driven architecture to indicate that the voice content is ready.
[0063] ② Through the distributed scheduling system, the task of integrating voice content with target materials is decomposed into multiple subtasks (such as material preparation, playback timing, etc.) and the execution order is arranged.
[0064] ③Through message queue technology, status information and control instructions are transmitted between task execution nodes to achieve asynchronous communication and load balancing.
[0065] ④ According to the playback progress of the voice content, control the playback or display of the target material through the timestamp or progress mark in the message queue to ensure that the two are synchronized.
[0066] Specifically, when the voice content generation of the target copy is completed, this event is used as a trigger. The event-driven architecture receives this event and converts it into a processable message or task. Then, the distributed scheduling system receives this task and decomposes it into multiple subtasks, including but not limited to: preparing target materials, starting a timer for voice content playback, configuring video synthesis parameters, etc. The distributed scheduling system uses its powerful workflow management and scheduling capabilities to arrange these subtasks in a predetermined logical order and dependency relationship, and assign them to different computing resources or nodes for processing.
[0067] In the process of task decomposition and distribution, in order to achieve asynchronous communication and load balancing between nodes or system components, message queue technology is introduced. When a node completes its task (such as successfully loading the target material or the voice content is ready to play), it will send the corresponding status information or the task information to be executed next to the message queue. Other nodes subscribe to these message queues. Once a new message arrives, they will take the message out of the queue and perform the corresponding operation. In this way, seamless connection and efficient synchronization between tasks are ensured.
[0068] Finally, after the timer for the voice content playback starts, the system starts to monitor its progress and synchronously controls the playback or display of the target material. With the help of the timestamp or progress mark in the message queue, it is possible to accurately know which part of the voice content is played, and adjust the playback position or animation effect of the target material accordingly to ensure complete synchronization between the two.
[0069] In this way, the voice content and the target material can be efficiently and synchronously integrated to generate high-quality video works.
[0070] In summary, the embodiment of the present application realizes the automatic generation of video text by introducing a large language model, realizes the automatic matching of text and materials through intelligent matching technology, and the matched materials can be adjusted according to the storyboard type selected by the video creator. At the same time, the fusion process of voice content and target material is automated. In this way, by intelligently matching diverse materials with automatically generated voice content, the video production cycle is shortened, the video content is made richer and more diverse, the monotony of the content is effectively avoided, the overall viewing experience is enhanced, and the operational process of video generation is simplified and the effect of improving the expressiveness of the video is achieved.
[0071] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction and will not be repeated later.
[0072] In this embodiment, the above step S20 may include steps S201-S202:
[0073] Step S201, when the selected storyboard type is the blank shot type, searching for an initial target material matching the target copy from a preset material library through a material matching algorithm;
[0074] When the user selects an empty shot type as the storyboard type, the material matching algorithm is first started. Based on the content, emotional tendency and theme of the target copy, the algorithm conducts in-depth search and intelligent matching in the preset material library. The material library contains various types of video clips or static images such as natural scenery, urban landscapes, abstract patterns, etc., which can provide rich visual elements for the empty shot scene. The algorithm can be based on keyword matching, emotional analysis, style recognition, etc., to quickly screen out the initial target material that best matches the target copy.
[0075] In addition, in order to further improve the accuracy and efficiency of material matching, deep learning technology can be introduced to preprocess and extract features of the materials in the material library. Then, by establishing a mapping relationship between material features and copy content, a more intelligent matching strategy can be implemented. At the same time, user feedback can be used to continuously optimize the algorithm model so that it can better adapt to the needs and preferences of different users.
[0076] Step S202, performing obfuscation processing on the initial target material by using a video picture obfuscation algorithm to obtain the target material.
[0077] After obtaining the initial target material, the initial target material is obfuscated using a video screen obfuscation algorithm. The obfuscation process includes but is not limited to color adjustment, filter application, screen overlay, dynamic deformation and other techniques, depending on the emotional atmosphere expressed by the target copy and the requirements of the overall video style.
[0078] In video image obfuscation processing, deep learning generative models (such as GANs) can be introduced to process the initial target material through the deep learning generative model combined with the target text to achieve more complex and realistic visual effects.
[0079] In order to avoid repeated images in the generated video, the video image confusion algorithm can randomly decide whether to flip the image for each frame of the material, or randomly enlarge the image by a certain ratio, and then randomly take an offset value on the X-axis and Y-axis, or make some adjustments to the image attributes such as brightness, contrast, saturation, color temperature, etc.
[0080] In this way, target materials that meet the requirements of the target copy and are full of creativity and personality can be generated for the empty shot type, which can effectively convey the emotions and information contained in the target copy and enhance the viewing experience of the overall video work.
[0081] In a feasible embodiment, step S201 may include steps S2011 to S2013:
[0082] Step S2011, using the material matching algorithm to vectorize each material in the preset material library to obtain each material vector;
[0083] Using vector embedding technology, each material in the preset material library is vectorized to convert the image / video content in the material library into a vector representation in a high-dimensional space. Each vector contains the key feature information of the material, such as color, texture, shape, and potential semantic content.
[0084] Step S2012, performing a vectorization operation on the target text to obtain a text vector;
[0085] The same vectorization operation is performed on the target copy to convert the text content of the target copy into a vector form to capture the vocabulary, grammar, semantics, and sentiment information in the copy. Through appropriate preprocessing (such as word segmentation, stop word removal, stemming, etc.) and model selection (such as Transformer-based models), it can be ensured that the copy vector can accurately reflect its intrinsic meaning and intention.
[0086] In addition, in order to better adapt to copywriting in different fields and styles, you can train or select pre-trained vector models for specific fields, such as customized vector representation models for the real estate field, which can further enhance the expressiveness of copywriting vectors.
[0087] Step S2013, calculating the similarity values between the text vector and each of the material vectors in turn, and determining the material with the highest similarity value as the initial target material matching the target text.
[0088] By calculating the similarity value between the copy vector and each material vector (such as cosine similarity, Euclidean distance, etc.), the matching degree between the copy and the material is quantitatively evaluated, and the material with the highest similarity value is determined as the initial target material that best matches the target copy.
[0089] In this way, the initial target material that best matches the target copy can be efficiently and accurately screened out from the massive material library, which not only improves the efficiency and quality of video production, but also makes the video content more targeted.
[0090] In a feasible embodiment, step S20 may further include steps S203-S204:
[0091] Step S203, when the selected storyboard type is a digital human broadcast type, generating initial target materials according to the preset digital human image settings, wherein the initial target materials include an initial digital human model and a digital human background picture;
[0092] When the storyboard type selected by the user is the digital human broadcast type, the initial target material is quickly generated according to the preset digital human image setting, wherein the preset digital human image setting is the digital human image pre-selected by the video creator, and the generated initial target material includes the selected digital human image (i.e., as the initial digital human model) and the digital human background picture. The generation of the initial target material includes the generation of the digital human's facial features, hairstyle, clothing and other images, as well as the creation of a digital human background picture coordinated therewith. The background picture can contain static or dynamic scene elements to create a visual environment that matches the atmosphere of the copy.
[0093] Step S204, adjusting the state of the initial digital human model according to the text content of the target copy, and rendering the digital human background image to obtain the target material matching the target copy.
[0094] According to the text content of the target copy, the state of the initial digital human model is adjusted, such as adjusting the digital human's expression, posture, and movement, etc., to better convey the emotions and intentions in the copy. At the same time, the digital human background picture is rendered, such as adding light and shadow effects, adjusting color saturation, etc., to enhance the visual impact and emotional resonance of the picture. After this series of refined processing, the target material that matches the target copy is finally obtained.
[0095] In this way, digital voice broadcast materials that meet specific requirements can be generated efficiently and accurately. These materials not only have a high degree of personalized customization capabilities to meet the needs of different scenes and styles, but can also visually attract the audience's attention and enhance the effectiveness of information communication.
[0096] In a feasible embodiment, after step S30, steps S40 to S50 may also be included:
[0097] Step S40, after generating each storyboard video including the target storyboard video, connecting each storyboard video through a video transition special effect algorithm to obtain an initial target video;
[0098] After generating various storyboard videos including the target storyboard video, they are connected through a video transition special effects algorithm. The algorithm will automatically select the most appropriate transition effect to connect the storyboard videos based on the emotional changes in the video content, the speed of the rhythm, and the needs of scene conversion. Transition effects such as fade in and out, dissolve, and slide not only achieve a smooth transition of the video content, but also add visual dynamics and artistic sense.
[0099] Step S50, adding subtitles and video soundtracks to the initial target video according to the voice content of each of the storyboard videos to obtain a target video.
[0100] According to the voice content in each storyboard video, corresponding subtitles are automatically generated to ensure the accuracy and completeness of information conveyed. At the same time, according to the overall emotional tone of the video, scene atmosphere and other factors, appropriate video music is automatically added to make the entire video work fuller and more vivid.
[0101] In a feasible embodiment, before step S40, steps S60 to S70 may also be included:
[0102] Step S60, determining the video specifications of each of the storyboard videos, wherein the video specifications include resolution, frame rate, encoding format, color tone and size;
[0103] Before merging storyboard videos, first identify and determine the specific video specifications of each storyboard video, including but not limited to core parameters such as resolution, frame rate, encoding format, color tone and size, to avoid compatibility issues or image quality degradation caused by different specifications.
[0104] Step S70, adjusting the parameters of each of the storyboard videos to make the video specifications of each of the storyboard videos consistent, thereby obtaining each of the storyboard videos after adjustment;
[0105] Adjust the parameters of each storyboard video to make their video specifications completely consistent. This process not only improves the smoothness of video editing, but also ensures that the final video work reaches the best state in terms of picture continuity, color consistency and playback stability, bringing a seamless visual experience to the audience.
[0106] Based on this, step S40 may include step S401:
[0107] Step S401, connecting the adjusted storyboard videos through a video transition special effect algorithm to obtain an initial target video.
[0108] After completing the parameter adjustment of each storyboard video, the adjusted storyboard videos are connected through the video transition special effects algorithm. The algorithm will automatically select the most appropriate transition effect to connect the storyboard videos according to the emotional changes, rhythm speed and scene conversion requirements of the video content. Transition effects such as fade in and out, dissolve, slide, etc. not only achieve a smooth transition of the video content, but also add visual dynamics and artistic sense.
[0109] Exemplarily, to facilitate understanding of the video generation method in the above embodiment, taking the real estate field as an example, assuming that the video creator is a real estate consultant, the video creator clearly defines the theme of the video (such as property introduction, home buying guide, regional advantage display, etc.), target audience, style positioning and expected effect, and plans the overall structure and content outline of the video according to needs, such as determining the ratio of empty shots and digital population broadcasts, content key points and sequence, and converting the planned content into initial copy, including the commentary of the digital population broadcast and the descriptive text of the empty shots.
[0110] like Figure 2As shown. The terminal inputs the initial copy into the large language model, uses its natural language processing capabilities to optimize the copy expression, and obtains the target copy. Then, when the empty shot type is selected, the initial target material matching the target copy is searched in the material library, such as the appearance of the building, the surrounding environment, the internal facilities, etc., and the initial target material is subjected to necessary obfuscation processing (such as adjusting the color, brightness, contrast, etc.) through the video screen obfuscation algorithm to obtain the final target material; at the same time, when the digital human broadcast type is selected, the initial target material is generated according to the preset digital human image setting, including the initial digital human model and the digital human background picture, and the initial digital human model is adjusted according to the text content of the target copy (such as expression, action), and the digital human background picture is rendered to match the copy content and emotional atmosphere to obtain the target material. Then, the target copy is converted into voice content using text-to-speech technology, and the voice content is integrated with the corresponding empty shot and the target material broadcast by the digital human to ensure the synchronization of voice and picture, and generate the target storyboard video.
[0111] The terminal determines the video specifications of all storyboard videos, adjusts the parameters of each storyboard video to ensure that they have consistent specifications, and then uses the video transition special effects algorithm to alternately connect the adjusted empty shot storyboard videos and the digital population broadcast storyboard videos to form a coherent narrative flow, and adds appropriate transition effects between storyboards, such as fade in and fade out, dissolve, etc., to enhance visual coherence and viewing experience. Finally, subtitles and video soundtracks are added to the video, and the final video file is output for video creators to use or share with potential customers.
[0112] like Figure 3 As shown, the terminal can create multiple storyboards according to the preset text (ie, the initial text) input by the video creator. The types of these storyboards can be digital voice broadcast type or empty shot type, and the storyboard type is freely defined by the video creator.
[0113] If it is a storyboard of a digital human voice, you need to preset the text first, and then use the large language model to rewrite the preset text. Here, the large language model is used to generate diversity, so that each rewritten text will be different. The diversity generated by the large language model can be controlled by parameters such as temperature or top-p. After the text is generated, TTS technology is used to generate voice, and then the voice is used to drive the digital human model to generate the digital human voice video.
[0114] If it is an empty shot type storyboard, it is also necessary to preset the copy and rewrite it using a large language model to generate TTS (TextToSpeech) voice. The next step is to use a random or specific material matching algorithm to match the preset material for each sentence of the copy. At the same time, use a video screen confusion algorithm, such as zooming in, rotating, adding stickers, adding filters, etc. to confuse the screen and generate an empty shot video.
[0115] After generating each storyboard video, an automatic video transition special effects algorithm is used to connect the storyboard videos to obtain a complete video, and then subtitles are added and video music is added to turn it into a complete video.
[0116] In this process, different video storyboards are generated mainly through the secondary creation of a large language model and a picture confusion algorithm, thereby achieving unlimited and non-repetitive video generation.
[0117] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the video generation method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0118] The present application also provides a video generation device, such as Figure 4 As shown, the device comprises:
[0119] The copywriting generation module 10 is used to input the initial copywriting into the large language model to obtain the target copywriting;
[0120] A material matching module 20, used for matching a target material based on a selected storyboard type and the target copy;
[0121] The video generation module 30 is used to generate voice content according to the target text, and merge the voice content with the target material to obtain a target storyboard video.
[0122] Optionally, the material matching module 20 is further used for:
[0123] When the selected storyboard type is the blank shot type, an initial target material matching the target copy is searched from a preset material library through a material matching algorithm;
[0124] The initial target material is obfuscated by a video picture obfuscation algorithm to obtain the target material.
[0125] Optionally, the material matching module 20 is further used for:
[0126] Using the material matching algorithm, each material in the preset material library is vectorized to obtain each material vector;
[0127] Performing a vectorization operation on the target text to obtain a text vector;
[0128] The similarity values between the text vector and each of the material vectors are calculated in sequence, and the material with the highest similarity value is determined as the initial target material matching the target text.
[0129] Optionally, the material matching module 20 is further used for:
[0130] When the selected storyboard type is the digital human broadcast type, an initial target material is generated according to the preset digital human image setting, wherein the initial target material includes an initial digital human model and a digital human background picture;
[0131] The state of the initial digital human model is adjusted according to the text content of the target copy, and the digital human background image is rendered to obtain the target material matching the target copy.
[0132] Optionally, the video generating device further includes a video connection module (not shown), and the video connection module is used to:
[0133] After generating each storyboard video including the target storyboard video, connecting each storyboard video through a video transition special effect algorithm to obtain an initial target video;
[0134] Subtitles and video soundtracks are added to the initial target video according to the voice content of each of the storyboard videos to obtain a target video.
[0135] Optionally, the video connection module is further used for:
[0136] Determining the video specifications of each of the storyboard videos, wherein the video specifications include resolution, frame rate, encoding format, color tone and size;
[0137] Adjusting the parameters of each of the storyboard videos so that the video specifications of each of the storyboard videos are consistent, thereby obtaining each adjusted storyboard video;
[0138] The adjusted storyboard videos are connected through a video transition special effects algorithm to obtain the initial target video.
[0139] The video generation device provided in the embodiment of the present application adopts the video generation method in the above embodiment, which can simplify the operation process of video generation and improve the video expression. Compared with the prior art, the beneficial effects of the video generation device provided in the embodiment of the present application are the same as the beneficial effects of the video generation method provided in the above embodiment, and other technical features in the video generation device are the same as the features disclosed in the video generation method in the above embodiment, which will not be repeated here.
[0140] An embodiment of the present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the video generation method in the above-mentioned embodiment 1.
[0141] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include a mobile terminal and a fixed terminal of the MCU. Figure 5 The microcontroller shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0142] like Figure 5 As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0143] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0144] The electronic device provided in the embodiment of the present application adopts the video generation method in the above embodiment, which can simplify the operation process of video generation and improve the video expression. Compared with the prior art, the beneficial effects of the electronic device provided in the embodiment of the present application are the same as the beneficial effects of the video generation method provided in the above embodiment, and other technical features in the electronic device are the same as the features disclosed in the video generation method in the previous embodiment, which will not be repeated here.
[0145] It should be understood that the various parts disclosed in the embodiments of the present application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0146] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0147] An embodiment of the present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, wherein the computer-readable program instructions are used to execute the video generation method in the above-mentioned embodiment.
[0148] The computer-readable storage medium provided in the embodiment of the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0149] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0150] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device: inputs the initial text into a large language model to obtain a target text; matches the target material based on the selected storyboard type and the target text; generates voice content according to the target text, merges the voice content and the target material, and obtains a target storyboard video.
[0151] The computer program code for performing the operation of the embodiment of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0152] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0153] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0154] The readable storage medium provided in the embodiment of the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned video generation method, which can simplify the operation process of video generation and improve the video expression. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the embodiment of the present application are the same as the beneficial effects of the video generation method provided in the above-mentioned embodiment, and will not be described in detail here.
[0155] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned video generation method when executed by a processor.
[0156] The computer program product provided by the present application can solve the technical problem of video generation. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the video generation method provided by the above embodiment, which will not be repeated here.
[0157] The above are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A video generation method, characterized in that: The method comprises: Input the initial text entered by the user into the large language model to obtain the target text; Matching target materials based on the selected storyboard type and the target copy; Generate voice content according to the target copy, and fuse the voice content with the target material to obtain a target storyboard video; The step of fusing the voice content with the target material to obtain a target storyboard video comprises: After confirming that the voice content is generated, an event is triggered through the event-driven architecture to indicate that the voice content is ready; Through the distributed scheduling system, the task of integrating voice content with target materials is decomposed into multiple subtasks and the execution order is arranged; Allocate each of the subtasks to each task execution node for processing, and transmit status information and control instructions between the task execution nodes through message queue technology, wherein the status information is status information of the completed task; According to the playback progress of the voice content, the playback or display of the target material is synchronously controlled through the timestamp or progress mark in the message queue; The step of matching the target material based on the selected storyboard type and the target text includes: When the selected storyboard type is the blank shot type, an initial target material matching the target copy is searched from a preset material library through a material matching algorithm; Obfuscating the initial target material by using a video image obfuscation algorithm to obtain a target material; The step of matching the target material based on the selected storyboard type and the target text also includes: When the selected storyboard type is the digital human broadcast type, an initial target material is generated according to the preset digital human image setting, wherein the initial target material includes an initial digital human model and a digital human background picture; Adjusting the state of the initial digital human model according to the text content of the target copy, and rendering the background image of the digital human to obtain the target material matching the target copy; After the step of generating voice content according to the target text, fusing the voice and the target material to obtain a storyboard video, the method further includes: After generating each storyboard video including the target storyboard video, connecting each storyboard video through a video transition special effect algorithm to obtain an initial target video; Subtitles and video soundtracks are added to the initial target video according to the voice content of each of the storyboard videos to obtain a target video.
2. The video generation method according to claim 1, characterized in that: The step of searching for the initial target material matching the target copy from a preset material library by using a material matching algorithm includes: Using the material matching algorithm, each material in the preset material library is vectorized to obtain each material vector; Performing a vectorization operation on the target text to obtain a text vector; The similarity values between the text vector and each of the material vectors are calculated in sequence, and the material with the highest similarity value is determined as the initial target material matching the target text.
3. The video generation method according to claim 1, characterized in that: Before the step of connecting the storyboard videos by using a video transition special effect algorithm to obtain an initial target video, the method further includes: Determining the video specifications of each of the storyboard videos, wherein the video specifications include resolution, frame rate, encoding format, color tone and size; Adjusting the parameters of each of the storyboard videos so that the video specifications of each of the storyboard videos are consistent, thereby obtaining each adjusted storyboard video; The step of connecting the storyboard videos by using a video transition special effect algorithm to obtain an initial target video includes: The adjusted storyboard videos are connected through a video transition special effects algorithm to obtain the initial target video.
4. A video generating device, characterized in that: The device comprises: The copy generation module is used to input the initial copy entered by the user into the large language model to obtain the target copy; A material matching module, used for matching target materials based on the selected storyboard type and the target copy; A video generation module, used to generate voice content according to the target text, and fuse the voice content with the target material to obtain a target storyboard video; The video generation module is further used for: After confirming that the voice content is generated, an event is triggered through the event-driven architecture to indicate that the voice content is ready; Through the distributed scheduling system, the task of integrating voice content with target materials is decomposed into multiple subtasks and the execution order is arranged; Allocate each of the subtasks to each task execution node for processing, and transmit status information and control instructions between the task execution nodes through message queue technology, wherein the status information is status information of the completed task; According to the playback progress of the voice content, the playback or display of the target material is synchronously controlled through the timestamp or progress mark in the message queue; The material matching module is further used for: When the selected storyboard type is the blank shot type, an initial target material matching the target copy is searched from a preset material library through a material matching algorithm; Obfuscating the initial target material by using a video image obfuscation algorithm to obtain a target material; The material matching module is further used for: When the selected storyboard type is the digital human broadcast type, an initial target material is generated according to the preset digital human image setting, wherein the initial target material includes an initial digital human model and a digital human background picture; Adjusting the state of the initial digital human model according to the text content of the target copy, and rendering the background image of the digital human to obtain the target material matching the target copy; The device also includes a video connection module, which is used to: After generating each storyboard video including the target storyboard video, connecting each storyboard video through a video transition special effect algorithm to obtain an initial target video; Subtitles and video soundtracks are added to the initial target video according to the voice content of each of the storyboard videos to obtain a target video.
5. An electronic device, characterized in that: The electronic device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the video generation method according to any one of claims 1 to 3.
6. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the video generation method according to any one of claims 1 to 3 are implemented.
7. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the video generation method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Video generation method and device, equipment and storage medium
CN114242070A
Propaganda video generation method and device, and storage medium
CN117241087A