Video generation method and apparatus, electronic device, and storage medium
By automatically processing the material types and content in the video script, and generating target videos that conform to the arranged order, the problem of complex human-computer interaction in existing technologies is solved, and efficient video generation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
- Filing Date
- 2023-05-31
- Publication Date
- 2026-07-14
Smart Images

Figure CN116647714B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of video processing technology, and in particular to a video generation method, apparatus, electronic device, and storage medium. Background Technology
[0002] Video is a high-quality medium for information dissemination on the internet. Many online news platforms, e-commerce platforms, and short video apps use video as their primary presentation format.
[0003] In related technologies, users can generate videos they want to publish through video generation platforms. For example, users input a video script on the platform, upload various materials needed to generate the video, and then perform editing operations such as cutting and splicing on the materials according to the video script to finally generate the video.
[0004] However, the above methods involve complex human-computer interaction operations, requiring users to spend a lot of time operating on the video generation platform, resulting in low efficiency of the entire video generation process. Summary of the Invention
[0005] This disclosure provides a video generation method, apparatus, electronic device, and storage medium, which can improve video generation efficiency. The technical solution of this disclosure is shown below.
[0006] According to a first aspect of the present disclosure, a video generation method is provided, applied to a server, the method comprising:
[0007] In response to a video script editing operation, a video script is obtained, which includes the material type, material content, and material arrangement order of the video to be generated;
[0008] In response to a video generation operation for the video script, the video script is parsed to obtain the material type, the material content, and the material arrangement order;
[0009] Based on the material type and the material content, at least one material corresponding to the video script is determined. Based on the material arrangement order, at least one material is processed to generate at least one target video. The material arrangement order in the target video conforms to the material arrangement order, and the material matches the material type and the material content.
[0010] In the above method, in response to a video script editing operation, a video script is obtained. Further, in response to a video generation operation for the video script, based on the parsing result of the video script, at least one piece of material corresponding to the video script is processed to generate at least one target video. The material corresponding to the video script matches the material type and content of the video script, and the arrangement order of the material in the generated target video conforms to the arrangement order of the material in the video script. This process automatically generates at least one matching target video for a video script, thereby simplifying the human-computer interaction involved in the video generation process and effectively improving video generation efficiency.
[0011] In some embodiments, based on the material type and the material content, at least one material corresponding to the video script is determined, and based on the material arrangement order, at least one of the materials is processed to generate at least one target video, including:
[0012] Based on the material type and the material content, multiple materials corresponding to the video script are determined;
[0013] According to the order in which the materials are arranged, multiple materials are spliced together to generate an intermediate video;
[0014] Based on the video content of the intermediate video, the video elements of the intermediate video are adjusted to generate the target video.
[0015] In some embodiments, splicing multiple media according to their arrangement order to generate an intermediate video includes:
[0016] The content that meets the filtering conditions in each of the materials is filtered, and the filtered materials are spliced together according to the order of the materials to generate the intermediate video.
[0017] By using the above method, content that meets the filtering criteria in each source material is filtered, which improves the accuracy of the intermediate video and makes the final target video more in line with the requirements of the video script.
[0018] In some embodiments, the target video is generated by adjusting the video elements of the intermediate video based on the video content of the intermediate video, including at least one of the following:
[0019] Based on the video content of the intermediate video, subtitles are added to the intermediate video to obtain the target video;
[0020] Based on the video content of the intermediate video, media resources matching the video content are added to the intermediate video to obtain the target video. The media resources include one or more of images, dynamic effects, audio, and prompt text.
[0021] The above methods allow for the addition of appropriate subtitles based on video content, satisfying personalized needs and enhancing the user experience. Furthermore, these methods also enable the automatic addition of matching media resources based on video content, satisfying personalized requirements, enriching the video presentation, and simplifying human-computer interaction, thereby improving the user experience.
[0022] In some embodiments, the method further includes:
[0023] Based on the display effect of the target video, the display parameters of the target video are adjusted to obtain the adjusted target video. The display effect of the adjusted target video meets the display conditions.
[0024] The above methods can effectively improve the display effect of the target video.
[0025] In some embodiments, the video script further includes at least one of the following:
[0026] The types of materials, content, and splicing methods of picture-in-picture elements;
[0027] Video script;
[0028] Text-to-speech;
[0029] Background music style.
[0030] The above methods enrich the content of the video script, thereby enhancing the presentation of the target video.
[0031] In some embodiments, at least one material corresponding to the video script is determined based on the material type and the material content, including at least one of the following:
[0032] Based on the material type and the material content, at least one first material corresponding to the video script is determined from the material library;
[0033] In response to the material upload operation for the video script, at least one second material corresponding to the video script is determined based on the material type and the material content.
[0034] By retrieving materials from a media library, the system automatically searches for matching materials based on the video script, thereby improving video generation efficiency. Furthermore, by responding to material upload requests, it can meet personalized needs for the materials required to generate the video, thus enhancing the user experience.
[0035] In some embodiments, when there are multiple target videos, each target video contains different target video elements.
[0036] In some embodiments, the target video element includes at least one of the following:
[0037] Subtitle style;
[0038] The style of media resources that match the video content of the target video;
[0039] Material transition styles;
[0040] Materials selected from the resource library.
[0041] This method allows for the simultaneous generation of multiple target videos, enabling users to select the one that best suits their needs and enhancing the user experience.
[0042] In some embodiments, the plurality of target videos includes a first target video and at least one second target video, and the method further includes:
[0043] Based on the different video elements contained in the first target video and the second target video, a prompt message corresponding to the second target video is generated. The prompt message is used to indicate the video elements in the second target video that are different from those in the first target video.
[0044] By generating prompts corresponding to the second target video, the terminal can display these prompts, allowing users to intuitively understand the differences between the different videos, thereby simplifying human-computer interaction and improving the user experience.
[0045] According to a second aspect provided in the embodiments of this disclosure, a video generation method is provided, applied to a terminal, the method comprising:
[0046] In response to a video script editing operation, a video script is obtained, which includes the material type, material content, and material arrangement order of the video to be generated;
[0047] In response to a video generation operation for the video script, at least one target video corresponding to the video script is obtained, wherein the target video is obtained by processing at least one material corresponding to the video script based on the material arrangement order, at least one material is determined based on the material type and the material content, the arrangement order of the materials in the target video conforms to the material arrangement order, and the material matches the material type and the material content;
[0048] Display at least one of the target videos.
[0049] In some embodiments, when there are multiple target videos, each target video contains different target video elements, and displaying at least one of the target videos includes:
[0050] Display a first target video, at least one second target video, and corresponding prompt information for the second target video. The prompt information is used to indicate video elements in the second target video that are different from those in the first target video.
[0051] By displaying prompts corresponding to the second target video, users can intuitively understand the differences between the different videos, thereby simplifying human-computer interaction and improving user experience.
[0052] According to a third aspect of the present disclosure, a video generation apparatus is provided, applied to a server, the apparatus comprising:
[0053] The acquisition unit is configured to perform a video script acquisition operation in response to the video script editing operation. The video script includes the material type, material content, and material arrangement order of the video to be generated.
[0054] The parsing unit is configured to perform a video generation operation in response to the video script, parse the video script, and obtain the material type, the material content, and the material arrangement order;
[0055] The generation unit is configured to perform actions based on the material type and the material content to determine at least one material corresponding to the video script, process the at least one material based on the material arrangement order, and generate at least one target video, wherein the material arrangement order in the target video conforms to the material arrangement order, and the material matches the material type and the material content.
[0056] In some embodiments, the generation unit includes:
[0057] The determining unit is configured to determine, based on the material type and the material content, multiple materials corresponding to the video script;
[0058] The first sub-generation unit is configured to splice multiple media according to the media arrangement order to generate an intermediate video;
[0059] The second sub-generation unit is configured to perform video content based on the intermediate video, adjust the video elements of the intermediate video, and generate the target video.
[0060] In some embodiments, the first sub-generation unit is configured to perform:
[0061] The content that meets the filtering conditions in each of the materials is filtered, and the filtered materials are spliced together according to the order of the materials to generate the intermediate video.
[0062] In some embodiments, the second sub-generation unit is configured to perform at least one of the following:
[0063] Based on the video content of the intermediate video, subtitles are added to the intermediate video to obtain the target video;
[0064] Based on the video content of the intermediate video, media resources matching the video content are added to the intermediate video to obtain the target video. The media resources include one or more of images, dynamic effects, audio, and prompt text.
[0065] In some embodiments, the apparatus further includes:
[0066] The adjustment unit is configured to perform a display effect based on the target video, adjust the display parameters of the target video, and obtain the adjusted target video, wherein the display effect of the adjusted target video meets the display conditions.
[0067] In some embodiments, the video script further includes at least one of the following:
[0068] The types of materials, content, and splicing methods of picture-in-picture elements;
[0069] Video script;
[0070] Text-to-speech;
[0071] Background music style.
[0072] In some embodiments, the determining unit is configured to perform at least one of the following:
[0073] Based on the material type and the material content, at least one first material corresponding to the video script is determined from the material library;
[0074] In response to the material upload operation for the video script, at least one second material corresponding to the video script is determined based on the material type and the material content.
[0075] In some embodiments, when there are multiple target videos, each target video contains different target video elements.
[0076] In some embodiments, the target video element includes at least one of the following:
[0077] Subtitle style;
[0078] The style of media resources that match the video content of the target video;
[0079] Material transition styles;
[0080] Materials selected from the resource library.
[0081] In some embodiments, the plurality of target videos includes a first target video and at least one second target video, and the generation unit is further configured to perform:
[0082] Based on the different video elements contained in the first target video and the second target video, a prompt message corresponding to the second target video is generated. The prompt message is used to indicate the video elements in the second target video that are different from those in the first target video.
[0083] According to a fourth aspect of the present disclosure, a video generation apparatus is provided, applied to a terminal, the apparatus comprising:
[0084] The first acquisition unit is configured to perform a video script acquisition operation in response to the video script editing operation. The video script includes the material type, material content, and material arrangement order of the video to be generated.
[0085] The second acquisition unit is configured to perform a video generation operation in response to the video script, and acquire at least one target video corresponding to the video script, wherein the target video is obtained by processing at least one material corresponding to the video script based on the material arrangement order, at least one material is determined based on the material type and the material content, the arrangement order of the materials in the target video conforms to the material arrangement order, and the material matches the material type and the material content;
[0086] The display unit is configured to display at least one of the target videos.
[0087] In some embodiments, when there are multiple target videos, and each target video contains different target video elements, the display unit is configured to perform:
[0088] Display a first target video, at least one second target video, and corresponding prompt information for the second target video. The prompt information is used to indicate video elements in the second target video that are different from those in the first target video.
[0089] According to a fifth aspect of the present disclosure, an electronic device is provided, the electronic device comprising:
[0090] One or more processors;
[0091] Memory used to store the executable program code of the processor;
[0092] The processor is configured to execute the program code to implement the video generation method described above.
[0093] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, the computer-readable storage medium comprising: when program code in the computer-readable storage medium is executed by a processor of an electronic device, enabling the electronic device to perform the video generation method described above.
[0094] According to a seventh aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the video generation method described above.
[0095] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0096] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0097] Figure 1 This is a schematic diagram of the implementation environment of a video generation method provided in this embodiment of the disclosure;
[0098] Figure 2 This is a flowchart of a video generation method provided in an embodiment of this disclosure;
[0099] Figure 3 This is a flowchart of another video generation method provided in this disclosure embodiment;
[0100] Figure 4 This is a flowchart of another video generation method provided in this disclosure embodiment;
[0101] Figure 5 This is a schematic diagram of a video script editing interface provided in an embodiment of this disclosure;
[0102] Figure 6 This is a schematic diagram illustrating a display of a target video provided in an embodiment of this disclosure;
[0103] Figure 7 This is a schematic diagram of a video generation method provided in an embodiment of this disclosure;
[0104] Figure 8 This is a block diagram of a video generation apparatus provided in an embodiment of this disclosure;
[0105] Figure 9This is a block diagram of a video generation apparatus provided in an embodiment of this disclosure;
[0106] Figure 10 This is a structural block diagram of a terminal provided in an embodiment of this disclosure;
[0107] Figure 11 This is a block diagram of a server provided in an embodiment of this disclosure. Detailed Implementation
[0108] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0109] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0110] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this disclosure are authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the video scripts involved in the embodiments of this disclosure were obtained with full authorization.
[0111] Figure 1 This is a schematic diagram illustrating the implementation environment of a video generation method provided in this embodiment. See also... Figure 1 The implementation environment of this video generation method includes a terminal 101 and a server 102. The terminal 101 and the server 102 are directly or indirectly connected via wired or wireless communication, and this embodiment of the present disclosure does not limit this connection.
[0112] Terminal 101 is at least one of the following devices: smartphone, smartwatch, desktop computer, laptop, virtual reality terminal, augmented reality terminal, wireless terminal, and laptop computer. Terminal 101 can refer to one of multiple terminals; this embodiment only uses terminal 101 as an example. Those skilled in the art will understand that the number of terminals can be more or less. Indicatively, terminal 101 can install and run an application program that provides video generation functionality, also known as a video generation platform. For example, a target user inputs a video script and uploads corresponding materials through the application interface displayed on terminal 101 to generate a video that conforms to the script. Indicatively, the application program may take the form of a web application, microprogram, or client, and this disclosure is not limited to these. A microprogram refers to a program that runs on top of other applications, such as an app store.
[0113] Server 102 can be an independent physical server, a server cluster consisting of multiple physical servers, or a distributed file system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The number of servers 102 can be more or less, and this disclosure does not limit this. Illustratively, server 102 is used to provide background services for applications running on terminal 101. For example, based on a video script input by the target object on terminal 101, it parses the video script and generates a corresponding video based on the parsing result. Of course, server 102 can also include other functional servers to provide more comprehensive and diversified services. Illustratively, taking a web application providing video generation functionality running on terminal 101 as an example, server 102 is used to provide background services for this web application. Illustratively, terminal 101 displays the application interface of the web application, and the target object performs various operations on the application interface, triggering interaction between terminal 101 and server 102 to process various operations. For example, server 102 may obtain a video script in response to a video script editing operation performed by a target object on the application interface, etc., but this disclosure is not limited thereto.
[0114] In some embodiments, during the video generation process, server 102 undertakes the main generation work and terminal 101 undertakes the secondary generation work; or, server 102 undertakes the secondary generation work and terminal 101 undertakes the main generation work; or, server 102 or terminal 101 can each undertake the generation work independently, and this disclosure does not limit this.
[0115] Based on the above implementation environment, the video generation method provided by the embodiments of this disclosure is described below.
[0116] Figure 2 This is a flowchart of a video generation method provided in an embodiment of this disclosure. Figure 2 As shown, the method is applied to a server and includes the following steps 201 to 203.
[0117] In step 201, the server responds to the video script editing operation by obtaining the video script, which includes the material type, material content, and material arrangement order of the video to be generated.
[0118] In this embodiment, a communication connection is established between the server and the terminal. The terminal runs an application that provides video generation functionality, and the server provides background services for this application. Indicatively, the terminal displays the application's interface, and the server, in response to a video script editing operation performed by the target object on the interface, obtains the video script. The video script is information that indicates the video content and structure of a video (of course, the video script can also indicate other information, and this disclosure is not limited thereto). It can also be understood as a design concept for the video to be generated. By creating a video script, the video content and structure of the video to be generated can be intuitively and clearly understood. Based on the video script, the necessary materials (such as images and videos) for the video to be generated can be determined, and these materials can be processed according to the video script to generate a target video that meets the requirements of the video script, thereby improving video generation efficiency.
[0119] The material type refers to the type of material required for the video to be generated, such as live-action footage, screen recording, public materials, intro, outro, etc. The material content refers to the content of the material required for the video to be generated, such as descriptive text for a scene, keywords, etc. The material arrangement order refers to the order in which the material required for the video to be generated is arranged in the video. For example, if the material required for the generated video includes material A (a video clip showcasing the appearance of an item), material B (a video clip introducing the function of an item), and material C (a video clip introducing a usage scenario of an item), the material arrangement order would be material B, material C, material A. In some embodiments, the material arrangement order is indicated by the shot number, which is not limited. Furthermore, this disclosure does not limit the number of materials required for the video to be generated; it can be one or multiple.
[0120] In step 202, the server responds to the video generation operation for the video script by parsing the video script to obtain the material type, material content, and material arrangement order.
[0121] In this embodiment of the disclosure, the server responds to the video generation operation performed by the target object on the application interface displayed on the terminal by parsing the obtained video script to obtain the material type, the material content, and the material arrangement order.
[0122] In step 203, the server determines at least one material corresponding to the video script based on the material type and the material content, processes the at least one material based on the material arrangement order, and generates at least one target video. The material arrangement order in the target video conforms to the material arrangement order, and the material matches the material type and the material content.
[0123] In this embodiment of the disclosure, for any material corresponding to the video script, the material matches the material type and content in the video script; that is, the material type and content of the material meet the requirements of the video script. After determining at least one material corresponding to the video script, at least one material is processed according to the material arrangement order to generate at least one target video, which is the video that meets the requirements of the video script.
[0124] In the video generation method provided in this embodiment, in response to a video script editing operation, a video script is obtained. Further, in response to a video generation operation for the video script, based on the parsing result of the video script, at least one material corresponding to the video script is processed to generate at least one target video. The material corresponding to the video script matches the material type and content of the video script, and the arrangement order of the materials in the generated target video conforms to the arrangement order of the materials in the video script. This process automatically generates at least one target video matching a video script, thereby simplifying the human-computer interaction involved in the video generation process and effectively improving video generation efficiency.
[0125] Figure 3 This is a flowchart of another video generation method provided in this disclosure embodiment. For example... Figure 3 As shown, the method is applied to a terminal and includes the following steps 301 to 303.
[0126] In step 301, the terminal responds to the video script editing operation by obtaining the video script, which includes the material type, material content, and material arrangement order of the video to be generated.
[0127] In this embodiment, a video generation application runs on the terminal. The terminal displays the application's interface and, in response to a video script editing operation performed by the target object on the application interface, obtains the video script. The specific meaning of the video script is explained in step 201 above and will not be repeated here.
[0128] In step 302, in response to the video generation operation for the video script, the terminal obtains at least one target video corresponding to the video script. The target video is obtained by processing at least one material corresponding to the video script based on the material arrangement order. At least one material is determined based on the material type and the material content. The arrangement order of the materials in the target video conforms to the material arrangement order, and the material matches the material type and the material content.
[0129] In this embodiment, the target video can be generated by the terminal (this process is the same as step 202 above, so it will not be described again), or it can be generated by the server and then sent to the terminal. This embodiment does not limit this. Taking the target video being generated by the server as an example, in this step, the server responds to the video generation operation performed by the target object on the application interface, parses the video script, generates at least one target video corresponding to the video script based on the parsing result, and sends at least one target video to the terminal.
[0130] In step 303, the terminal displays at least one target video.
[0131] In this embodiment of the disclosure, the terminal displays at least one target video on the application interface.
[0132] In the video generation method provided in this embodiment, in response to a video script editing operation, a video script is obtained. Further, in response to a video generation operation for the video script, based on the parsing result of the video script, at least one material corresponding to the video script is processed to generate at least one target video. The material corresponding to the video script matches the material type and content of the video script, and the arrangement order of the materials in the generated target video conforms to the arrangement order of the materials in the video script. This process automatically generates at least one target video matching a video script, thereby simplifying the human-computer interaction involved in the video generation process and effectively improving video generation efficiency.
[0133] The above Figure 2 and Figure 3 A brief flowchart of the video generation method provided in the embodiments of this disclosure is introduced. The following is based on... Figure 4 The above method will be described in detail in the illustrated embodiment.
[0134] Figure 4 This is a flowchart of another video generation method provided in this disclosure embodiment. For example... Figure 4 As shown, taking the video generation method implemented through the interaction between the terminal and the server as an example, the video generation method includes the following steps 401 to 408.
[0135] In step 401, the terminal responds to the video script editing operation by obtaining the video script, which includes the material type, material content, and material arrangement order of the video to be generated.
[0136] In this embodiment of the disclosure, the terminal runs an application that provides video generation functionality. The terminal displays the application's interface and, in response to a target object performing a video script editing operation on the application interface, obtains a video script. Indicatively, the application interface includes a first control for editing the video script. In response to a trigger operation on the first control, the terminal displays a video script editing interface. This video script editing interface includes multiple functional controls for providing editing functions for the video script, i.e., for implementing various video script editing operations, facilitating the target object to create video scripts through this video script editing interface.
[0137] In some embodiments, the video script may further include at least one of the following: the type, content, and splicing method of the picture-in-picture material; video dialogue; the original text-to-speech (TSS) text; background music style; script name; video aspect ratio, etc., and this disclosure is not limited thereto. The type and content of the picture-in-picture material are the same as those described above, and therefore will not be repeated. The splicing method of the picture-in-picture material refers to the splicing method between the picture-in-picture material and the main material, such as top-bottom split screen, left-right split screen, top-right corner, bottom-right corner, full coverage, etc., and this disclosure is not limited thereto.
[0138] The following is for reference. Figure 5 This section introduces the process by which the terminal obtains the video script in response to video script editing operations.
[0139] Figure 5 This is a schematic diagram of a video script editing interface provided in an embodiment of this disclosure. Figure 5 As shown in Figure (a), the video script editing interface includes multiple functional controls, such as a material type editing control 501, a material content editing control 502, a shot number editing control 503 (used to indicate the order of material arrangement, one shot number corresponds to one material, of course, one shot number can also correspond to multiple materials, this disclosure is not limited to this), a video dialogue editing control 504, a background music style editing control 505, and a picture-in-picture material editing control 506, etc., this disclosure is not limited to this.
[0140] Schematic, in response to a trigger operation on the shot number editing control 503, the terminal creates shot number 1, which is the first material 1 required to generate the video; continuing with shot number 1 as an example, in response to a trigger operation on the material type editing control 501 (such as selecting a material type), the terminal determines that the material type of material 1 is "live-action"; in response to a trigger operation on the material content editing control 502 (such as text input), the terminal determines that the material content of material 1 is "displaying the appearance of an object"; in response to a trigger operation on the video dialogue editing control 504 (such as text input), the terminal determines that the corresponding video dialogue for material 1 is "1. Let me introduce a XXX; 2. Next, I will introduce the functions of this XXX..."; in response to a trigger operation on the background music style editing control 505 (such as selecting a background music style), the terminal determines that the background music style of material 1 is "lyrical"; in response to a trigger operation on the picture-in-picture material editing control 506, the terminal displays the picture-in-picture material editing area, such as... Figure 5 As shown in Figure (b), the picture-in-picture material editing area includes multiple functional controls, such as material type editing control 5061, material content editing control 5062, and material splicing method editing control 5063, but this disclosure is not limited thereto.
[0141] Step 401 above provides a method for creating video scripts, enabling the terminal to obtain the video script and providing technical support for the subsequent automatic generation of target videos based on the video script.
[0142] In step 402, the terminal sends the video script to the server.
[0143] In some embodiments, the video script editing interface includes a second control for saving the video script. The terminal, in response to a trigger operation on the second control, sends the video script to the server. For example, the second control is a button labeled "Confirm Save," but this disclosure is not limited to this. That is, if the target object determines that the current video script is correct, clicking "Confirm Save" triggers the terminal to send the video script to the server, thereby saving communication resources between the terminal and the server. Of course, in other embodiments, the terminal, in response to any video script editing operation, sends the information of the video script corresponding to that operation to the server; that is, the terminal sends the target object's edits to the video script to the server in real time, and this disclosure is not limited to this.
[0144] In step 403, in response to the video generation operation for the video script, the terminal sends a video generation request for the video script to the server.
[0145] In this embodiment, the application interface includes a third control used to generate a video based on a video script. In response to a trigger operation on this third control, the terminal sends a video generation request for the video script to the server. For example, the third control may be a button labeled "Script to Video," but this disclosure is not limited to this. That is, when the target object determines that a video will be generated based on the current video script, clicking "Script to Video" triggers the terminal to send a video generation request for the video script to the server.
[0146] In step 404, the server parses the video script based on the received video generation request to obtain the material type, material content, and material arrangement order.
[0147] In this embodiment of the disclosure, the server parses the obtained video script based on the received video generation request to obtain the material type, the material content, and the material arrangement order. Of course, the server can also parse the video script if it has already obtained the video script through the aforementioned step 402; this embodiment of the disclosure does not limit this approach.
[0148] In step 405, the server determines at least one material corresponding to the video script based on the material type and material content, and the material matches the material type and material content.
[0149] In this embodiment of the disclosure, the materials corresponding to the video script can be determined from a material library or uploaded by the target object via a terminal, i.e., local materials, and are not limited thereto. The material library stores multiple materials used to generate the video and can be understood as a public material library. In some embodiments, this step includes at least one of the following methods:
[0150] Method 1: Based on the material type and content, at least one first material corresponding to the video script is determined from the material library. Illustratively, taking any material required for the video to be generated as an example, the server searches the material library based on the material type and content of that material to obtain a first material that matches both the material type and content. For example, based on the material type of that material, the server determines multiple target materials from the material library that match the material type. Then, it calls a first network model to determine the matching degree between the material content of the first material and the material content of each target material. Based on the matching degree, the first material is determined from the multiple target materials. It should be understood that the specific implementation of the first network model described above is not limited in this embodiment. For example, the first network model can be a neural network model based on an image description algorithm, etc. In this way, the server can automatically retrieve matching materials from the material library according to the video script, thereby improving video generation efficiency.
[0151] Method Two: In response to the material upload operation for the video script, at least one second material corresponding to the video script is determined based on the material type and content. The application interface provides a material upload function for the video script. In response to the material upload operation performed by the target object on the application interface, the server obtains the uploaded material and determines at least one second material corresponding to the video script based on the material type and content. That is, when the server obtains the uploaded material, it determines which materials the uploaded material corresponds to in the video script based on the material type and content, thus providing technical support for the subsequent automatic generation of the target video. In other words, the target object does not need to consider the upload order of the material; the server can automatically match the uploaded material with the materials indicated by the video script based on the material type and content, greatly improving video generation efficiency. Moreover, this method can meet the personalized needs of the materials required for the generated video, thereby improving the user experience.
[0152] In step 406, the server processes at least one material based on the material arrangement order to generate at least one target video, wherein the material arrangement order in the target video conforms to the material arrangement order.
[0153] In this embodiment of the disclosure, taking a video script with multiple corresponding materials as an example, the process of the server processing multiple materials to generate a target video includes the following steps A and B:
[0154] Step A: Combine multiple materials according to their order to generate an intermediate video.
[0155] In this process, the server sorts multiple media clips according to their arrangement order, ensuring that the sorted clips conform to the given order. The sorted clips are then spliced together to obtain an intermediate video. In some embodiments, where the video script includes dialogue, the server can splice multiple clips based on the dialogue and the clip arrangement order to generate an intermediate video; this disclosure is not limited to this. Furthermore, as described above regarding the video script, in some embodiments, the video script also includes the clip type, content, and splicing method of picture-in-picture (Picture-in-Picture) clips. That is, at least one clip corresponding to the video script also includes Picture-in-Picture clips. Accordingly, in this step, the server splices multiple clips according to the splicing method and arrangement order of the Picture-in-Picture clips to generate an intermediate video; this disclosure is not limited to this.
[0156] In some embodiments, the server filters content from each source material that meets filtering criteria, and then splices the filtered source materials together according to their order to generate an intermediate video. Illustratively, filtering criteria refer to source material footage that does not meet video generation requirements. The server can determine the content in each source material that meets the filtering criteria based on the video script. For example, the video script includes video dialogue, and a source material corresponding to the video script is a live-action video uploaded by the target object via a terminal. If the dialogue in the video script for this source material is "...Now let's introduce an XX item...", while the dialogue in the live-action video uploaded by the target object is "...Now let's introduce a YY item, no, it's XX item...", then the server can filter, i.e., edit, the content corresponding to the dialogue "YY item, no, it's..." in the live-action video, thereby obtaining a filtered live-action video that meets the video generation requirements. This process can also be understood as removing verbal slips from the source material. For example, if a certain material corresponding to a video script is video A retrieved by the server from the material library, and the content of this material indicated by the video script is "a video clip showing the appearance of item A", and video A includes both "a video clip showing the appearance of item A" and "a video clip showing the appearance of item B", then the server can filter, that is, edit, the content corresponding to "a video clip showing the appearance of item B" in video A to obtain the filtered video A, so that the filtered video A meets the requirements of the video script. This process can also be understood as removing redundant images from the material.
[0157] It should be noted that the examples above are merely illustrative and do not constitute a limitation of this disclosure. The specific content of the filtering conditions can be set according to actual needs, and this disclosure is not limited thereto. By filtering the content in each material that meets the filtering conditions in the above manner, the accuracy of the intermediate video can be improved, making the final generated video more in line with the requirements of the video script.
[0158] Step B: Based on the video content of the intermediate video, adjust the video elements of the intermediate video to generate the target video.
[0159] Here, video elements refer to elements related to video content, such as footage, subtitles, stickers, dynamic effects, prompt text, etc., and this disclosure is not limited to these. Illustratively, this step includes at least one of the following methods:
[0160] Method 1: Based on the video content of the intermediate video, add subtitles to the intermediate video to obtain the target video.
[0161] In some embodiments, the server identifies the audio content of an intermediate video based on its video content, and adds subtitles to the intermediate video according to the audio content to obtain the target video. In some embodiments, the video script includes video dialogue; the server adds subtitles to the intermediate video based on the video dialogue and the video content of the intermediate video to obtain the target video. In other embodiments, the server determines the attribute information of the intermediate video based on its video content, and adds subtitles to the intermediate video based on the subtitle style corresponding to the attribute information to obtain the target video. Illustratively, the attribute information indicates the scene attribute, character attribute, item attribute, etc., of the intermediate video. For example, if the attribute information of the intermediate video indicates that the scene attribute of the intermediate video is natural scenery, then the subtitle style added by the server to the intermediate video is related to natural scenery (e.g., the subtitles are surrounded by green leaves).
[0162] For example, if the attribute information of the intermediate video indicates that the item attribute of the intermediate video is a vehicle, then the subtitle style added by the server to the intermediate video will be related to the vehicle (such as small vehicle icons surrounding the subtitles). It should be understood that the above examples are merely illustrative and this disclosure is not limited thereto. Through the above method, appropriate subtitles can be added according to the video content, meeting personalized needs and improving the user experience.
[0163] Method 2: Based on the video content of the intermediate video, add media resources that match the video content to the intermediate video to obtain the target video.
[0164] The media resources include, but are not limited to, one or more of the following: images, dynamic effects, audio, and prompt text. For example, filters and transitions may also be included. Based on the video content of the intermediate video, the server determines the content information of the intermediate video and adds media resources matching the video content. For example, if the content information indicates a keyword in the intermediate video, the server can add media resources matching that keyword (e.g., if the keyword for a video is "red envelope," then red envelope stickers and sound effects are added to that video). Another example is if the content information indicates a person's facial expression in the intermediate video, then the server can add media resources matching that expression (e.g., if a person in a video has a happy expression, then smiley face stickers are added to that video). Yet another example is if the content information indicates that the intermediate video includes content introducing item A, then the server can add media resources matching item A (e.g., if item A is a vehicle, then background music related to the vehicle is added to the intermediate video, or prompt text related to the vehicle is added to the intermediate video).
[0165] It should be understood that the above examples are merely illustrative and this disclosure is not limited thereto. Through the above method, matching media resources can be automatically added based on the video content, satisfying personalized needs, enriching the video display effect, simplifying human-computer interaction, and thus improving the user experience.
[0166] Through steps A and B above, at least one source material corresponding to the video script was processed to generate the target video. Step A can be understood as a rough cut, and step B as a fine cut. That is, step A generates a complete video that conforms to the overall design concept of the video script; then, step B optimizes the intermediate video to generate the target video. This approach enriches the video's presentation and enhances the user experience while fulfilling the video script's requirements.
[0167] In other embodiments, the server adjusts the display parameters of the target video based on its display effect, resulting in an adjusted target video whose display effect meets display conditions. Illustratively, the server invokes a second network model to determine the display parameters of the target video and adjusts them to ensure the adjusted target video's display effect meets display conditions. These display conditions may include, for example, no overexposure or no jitter, and are not limited to these. It should be understood that the embodiments of this disclosure do not limit the specific implementation of the second network model. For example, the second network model may be a neural network model based on a color correction algorithm, or a neural network model based on a jitter reduction algorithm, etc. This approach effectively improves the display effect of the target video.
[0168] In other embodiments, the server determines whether the target video meets the video generation conditions based on its content. If it does, subsequent steps are executed; if not, a notification message is sent to the terminal indicating that the target video does not meet the video generation conditions, where the video generation conditions refer to the video content meeting quality requirements. For example, if the target video's content involves pornography or terrorism, then the target video does not meet the video generation conditions. It should be noted that the server can also determine whether an intermediate video meets the video generation conditions during the generation of the intermediate video; this disclosure is not limited to this.
[0169] Based on the above, the process of a server generating a target video has been described. In some embodiments, when there are multiple target videos, each target video contains different target video elements. These target video elements include at least one of the following: subtitle style; style of media resources matching the video content of the target video; transition style of media; and media determined from a media library. This process can also be understood as the server generating multiple target videos that conform to a video script based on at least one media corresponding to that script, except that the target video elements of these target videos differ. For example, the difference between target video A and target video B lies in their background music; target video A uses a ballad 'a', while target video B uses a ballad 'b'. In this way, multiple target videos can be generated simultaneously for users to choose from according to their needs, improving the user experience.
[0170] In some embodiments, the multiple target videos include a first target video and at least one second target video. The server can also generate a prompt message corresponding to the second target video based on the different video elements contained in the first and second target videos. This prompt message is used to indicate video elements in the second target video that are different from those in the first target video. The first target video can be understood as the main video, and the second target video can be understood as an associated video of the main video. The server generates the prompt message corresponding to the second target video based on the different video elements contained in both, so that it can be displayed on the terminal later. This allows users to intuitively understand the differences between the different videos, thereby simplifying human-computer interaction and improving user experience. For example, the difference between the first target video A and the second target video B is the background music. The background music of the first target video A is a ballad a, and the background music of the second target video B is a ballad b. Then the prompt message corresponding to the second target video B is "The background music of this video is different from that of the main video; the background music of this video is ballad b."
[0171] In step 407, the server sends at least one target video to the terminal.
[0172] In some embodiments, where the multiple target videos include a first target video and at least one second target video, the server also sends the prompt information corresponding to the second target video to the terminal so that the terminal can display the prompt information.
[0173] In step 408, the terminal displays at least one target video.
[0174] In this embodiment of the disclosure, the terminal displays at least one target video on the application interface.
[0175] In some embodiments, when the plurality of target videos includes a first target video and at least one second target video, the terminal displays the first target video, at least one second target video, and corresponding prompt information on the application interface. The prompt information is used to indicate video elements in the second target video that are different from the first target video.
[0176] In some embodiments, the application running on the terminal can also provide a video recommendation function. That is, the terminal displays at least one target video on the application interface, which also includes a fourth control for recommending the at least one target video. In response to a triggering operation on the fourth control, the terminal recommends the at least one target video to at least one first object. As described above, the server can generate multiple target videos containing different target video elements, thus providing technical support for personalized recommendations when recommending these target videos to first objects. For example, if the background music of the first target video A is a lyrical song a, and the background music of the second target video B is a lyrical song b, when recommending the first target video A and the second target video B to at least one first object, the first target video A can be recommended to the first object that prefers lyrical song a, and the second target video B can be recommended to the first object that prefers lyrical song b. This disclosure is not limited to this. It should be noted that this disclosure does not limit the recommendation strategy for target videos; the specific recommendation strategy can be set according to actual needs.
[0177] Indicatively, for reference Figure 6 , Figure 6 This is a schematic diagram illustrating a display of a target video provided in an embodiment of this disclosure. For example... Figure 6 As shown, the terminal displays a first target video (i.e., the main video), multiple second target videos (i.e., videos associated with the main video), and corresponding prompts for the second target videos on the application interface. The application interface includes a fourth control 601, labeled "Batch Recommendation." In response to triggering this fourth control 601, the terminal recommends the selected videos of the target objects to at least one first object.
[0178] It should be noted that the video generation method is described in steps 401 to 408 above using the interaction between the terminal and the server as an example. In some embodiments, the process of generating the target video shown in steps 404 to 406 above can also be executed by the terminal. This disclosure is not limited to this.
[0179] In summary, in the video generation method provided in this embodiment, in response to a video script editing operation, a video script is obtained. Further, in response to a video generation operation for the video script, based on the parsing result of the video script, at least one material corresponding to the video script is processed to generate at least one target video. The material corresponding to the video script matches the material type and content of the video script, and the arrangement order of the materials in the generated target video conforms to the arrangement order of the materials in the video script. This process automatically generates at least one target video matching a video script, thereby simplifying the human-computer interaction involved in the video generation process and effectively improving video generation efficiency.
[0180] After the above Figures 2 to 6 The illustrated embodiment introduces the video generation method provided by this disclosure. Indicatively, the above-described video generation method can be applied to various scenarios where videos are generated based on video scripts, providing the ability to obtain a finished video with a single click by inputting a video script and source materials, greatly improving video generation efficiency. For example, in film and television shooting scenarios, by inputting a video script on the application interface and uploading source materials using the above-described video generation method, automated generation of film and television videos can be achieved, greatly improving video generation efficiency. As another example, in the production scenario of product promotional videos, by inputting a video script on the application interface and uploading source materials (or retrieving them from the source material library without uploading), automated generation of product promotional videos can be achieved, greatly improving video generation efficiency, and so on. This disclosure is not limited to these examples.
[0181] The following is for reference. Figure 7 The above process will be illustrated with examples. Figure 7 This is a schematic diagram of a video generation method provided in an embodiment of this disclosure. Figure 7 As shown, the video generation method includes the following steps:
[0182] Step 1: The target user performs video script editing operations on the application interface to edit the video script, which is also known as video script filling. For example, this involves filling in the video script's shot number, video dialogue (or narration), material type, material content, TTS, music style, picture-in-picture material, etc. After filling it in, save it and proceed to the next step.
[0183] Step 2: The target user performs a media upload operation on the application interface to upload the media corresponding to the video script. For example, uploading local media from the terminal. Of course, it is also possible not to upload media and instead use media from the media library.
[0184] Step 3: The target user performs video generation operations on the application interface based on the video script to generate multiple target videos. This process includes a rough cut and a fine cut. Illustratively, the rough cut includes splicing and editing the corresponding materials according to the video script (such as sorting materials, removing redundant scenes, and removing verbal slips) to obtain an intermediate video. This process also includes processing picture-in-picture materials. The fine cut includes adjusting the video elements of the intermediate video based on its content to generate the target videos (such as adding subtitles, stickers, music, transitions, filters, and effects). Additionally, the display parameters of the target videos can be adjusted to ensure that the adjusted target videos meet the display requirements.
[0185] Step 4: Display multiple target videos containing different target video elements on the application interface. These target videos include a first target video and at least one second target video. Target users can select a target video based on their needs to recommend it to at least one first target user, thus optimizing the recommendation process.
[0186] The basic materials involved in the above video generation process, such as material libraries, local materials, music libraries, sticker libraries, and effects libraries, are referenced above. Figure 4 The embodiments shown are not described in detail here.
[0187] As can be seen, the above method enables the automatic generation of at least one target video that matches the video script, thereby simplifying the human-computer interaction involved in the video generation process and effectively improving the video generation efficiency.
[0188] Figure 8 This is a block diagram of a video generation apparatus provided in an embodiment of this disclosure. (Refer to...) Figure 8 The device is used in a server and includes an acquisition unit 801, a parsing unit 802, and a generation unit 803.
[0189] The acquisition unit 801 is configured to perform a video script acquisition operation in response to the video script editing operation. The video script includes the material type, material content, and material arrangement order of the video to be generated.
[0190] The parsing unit 802 is configured to perform a video generation operation in response to the video script, parse the video script, and obtain the material type, the material content, and the material arrangement order;
[0191] The generation unit 803 is configured to perform the following actions: based on the material type and the material content, determine at least one material corresponding to the video script; based on the arrangement order of the material, process at least one material to generate at least one target video, wherein the arrangement order of the material in the target video conforms to the material arrangement order, and the material matches the material type and the material content.
[0192] In some embodiments, the generation unit 803 includes:
[0193] The determination unit is configured to perform the determination of multiple media corresponding to the video script based on the media type and the media content;
[0194] The first sub-generation unit is configured to splice multiple clips according to their arrangement order to generate an intermediate video;
[0195] The second sub-generation unit is configured to perform video content based on the intermediate video, adjust the video elements of the intermediate video, and generate the target video.
[0196] In some embodiments, the first sub-generation unit is configured to perform:
[0197] Filter the content in each of the media that meets the filtering criteria, and then splice the filtered media together according to the order in which the media are arranged to generate the intermediate video.
[0198] In some embodiments, the second sub-generation unit is configured to perform at least one of the following:
[0199] Based on the video content of the intermediate video, subtitles are added to the intermediate video to obtain the target video;
[0200] Based on the video content of the intermediate video, media resources matching the video content are added to the intermediate video to obtain the target video. The media resources include one or more of the following: images, dynamic effects, audio, and prompt text.
[0201] In some embodiments, the device further includes:
[0202] The adjustment unit is configured to perform a display effect based on the target video, adjust the display parameters of the target video, and obtain the adjusted target video, wherein the display effect of the adjusted target video meets the display conditions.
[0203] In some embodiments, the video script further includes at least one of the following:
[0204] The types of materials, content, and splicing methods of picture-in-picture elements;
[0205] Video script;
[0206] Text-to-speech;
[0207] Background music style.
[0208] In some embodiments, the determining unit is configured to perform at least one of the following:
[0209] Based on the material type and the material content, determine at least one first material corresponding to the video script from the material library;
[0210] In response to the material upload operation for the video script, at least one second material corresponding to the video script is determined based on the material type and the material content.
[0211] In some embodiments, when there are multiple target videos, each target video contains different target video elements.
[0212] In some embodiments, the target video element includes at least one of the following:
[0213] Subtitle style;
[0214] The style of media resources that match the video content of the target video;
[0215] Material transition styles;
[0216] Materials selected from the resource library.
[0217] In some embodiments, the plurality of target videos includes a first target video and at least one second target video, and the generation unit 803 is further configured to perform:
[0218] Based on the different video elements contained in the first target video and the second target video, a prompt message corresponding to the second target video is generated. This prompt message is used to indicate the video elements in the second target video that are different from those in the first target video.
[0219] It should be noted that the video generation device provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the video generation device and the video generation method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0220] Figure 9 This is a block diagram of a video generation apparatus provided in an embodiment of this disclosure. (Refer to...) Figure 9The device is applied to a terminal and includes a first acquisition unit 901, a second acquisition unit 902, and a display unit 903.
[0221] The first acquisition unit 901 is configured to perform a video script acquisition operation in response to the video script editing operation. The video script includes the material type, material content, and material arrangement order of the video to be generated.
[0222] The second acquisition unit 902 is configured to perform a video generation operation in response to the video script, and acquire at least one target video corresponding to the video script, wherein the target video is obtained by processing at least one material corresponding to the video script based on the material arrangement order, at least one material is determined based on the material type and the material content, the material arrangement order in the target video conforms to the material arrangement order, and the material matches the material type and the material content;
[0223] Display unit 903 is configured to display at least one of the target videos.
[0224] In some embodiments, when there are multiple target videos, each target video contains different target video elements, and the display unit 903 is configured to perform:
[0225] Display a first target video, at least one second target video, and corresponding prompt information for the second target video. The prompt information is used to indicate video elements in the second target video that are different from the first target video.
[0226] It should be noted that the video generation device provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the video generation device and the video generation method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0227] In an exemplary embodiment, an electronic device is also provided, the electronic device including a processor and a memory for storing at least one computer program, the at least one segment of the computer program being loaded and executed by the processor to implement the video generation method of the present disclosure embodiments.
[0228] Taking electronic devices as terminals as an example, Figure 10 This is a structural block diagram of a terminal provided in an embodiment of this disclosure. For example... Figure 10As shown, the terminal 1000 can be: a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal 1000 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other names.
[0229] Typically, terminal 1000 includes a processor 1001 and a memory 1002.
[0230] Processor 1001 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1001 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1001 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1001 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0231] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1002 are used to store at least one program code, which is executed by the processor 1001 to implement the processes executed by the terminal in the video generation method provided in the embodiments of this disclosure.
[0232] In some embodiments, the terminal 1000 may also optionally include a peripheral device interface 1003 and at least one peripheral device. The processor 1001, memory 1002, and peripheral device interface 1003 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1003 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 1004, a display screen 1005, a camera assembly 1006, an audio circuit 1007, a positioning assembly 1008, and a power supply 1009.
[0233] Peripheral device interface 1003 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1001 and memory 1002. In some embodiments, processor 1001, memory 1002 and peripheral device interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1001, memory 1002 and peripheral device interface 1003 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0234] The radio frequency (RF) circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1004 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1004 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1004 can communicate with other terminals via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1004 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0235] Display screen 1005 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1005 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1001 for processing. In this case, display screen 1005 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1005, disposed on the front panel of terminal 1000; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal 1000 or in a folded design; in still other embodiments, display screen 1005 may be a flexible display screen, disposed on a curved or folded surface of terminal 1000. Furthermore, display screen 1005 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1005 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0236] The camera assembly 1006 is used to acquire images or videos. Optionally, the camera assembly 1006 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1006 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.
[0237] The audio circuit 1007 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1001 for processing, or input to the radio frequency circuit 1004 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 1000. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1007 may also include a headphone jack.
[0238] The positioning component 1008 is used to locate the current geographical location of the terminal 1000 in order to enable navigation or LBS (Location Based Service).
[0239] The power supply 1009 is used to power the various components in the terminal 1000. The power supply 1009 can be AC power, DC power, a disposable battery, or a rechargeable battery. When the power supply 1009 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0240] In some embodiments, the terminal 1000 further includes one or more sensors 1010. The one or more sensors 1010 include, but are not limited to: an accelerometer 1011, a gyroscope 1012, a pressure sensor 1013, a fingerprint sensor 1014, an optical sensor 1015, and a proximity sensor 1016.
[0241] Accelerometer 1011 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by terminal 1000. For example, accelerometer 1011 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1001 can control display screen 1005 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1011. Accelerometer 1011 can also be used for games or for acquiring user motion data.
[0242] The gyroscope sensor 1012 can detect the orientation and rotation angle of the terminal 1000. The gyroscope sensor 1012, in conjunction with the accelerometer sensor 1011, can collect 3D motion data from the user on the terminal 1000. Based on the data collected by the gyroscope sensor 1012, the processor 1001 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0243] The pressure sensor 1013 can be disposed on the side bezel of the terminal 1000 and / or on the lower layer of the display screen 1005. When the pressure sensor 1013 is disposed on the side bezel of the terminal 1000, it can detect the user's grip signal on the terminal 1000, and the processor 1001 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 1013. When the pressure sensor 1013 is disposed on the lower layer of the display screen 1005, the processor 1001 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 1005. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0244] The fingerprint sensor 1014 is used to collect a user's fingerprint. The processor 1001 identifies the user based on the fingerprint collected by the fingerprint sensor 1014, or vice versa. When the user's identity is identified as trusted, the processor 1001 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 1014 can be located on the front, back, or side of the terminal 1000. When the terminal 1000 has physical buttons or a manufacturer's logo, the fingerprint sensor 1014 can be integrated with the physical buttons or manufacturer's logo.
[0245] An optical sensor 1015 is used to collect ambient light intensity. In one embodiment, the processor 1001 can control the display brightness of the display screen 1005 based on the ambient light intensity collected by the optical sensor 1015. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1005 is increased; when the ambient light intensity is low, the display brightness of the display screen 1005 is decreased. In another embodiment, the processor 1001 can also dynamically adjust the shooting parameters of the camera assembly 1006 based on the ambient light intensity collected by the optical sensor 1015.
[0246] The proximity sensor 1016, also known as a distance sensor, is typically mounted on the front panel of the terminal 1000. The proximity sensor 1016 is used to detect the distance between the user and the front of the terminal 1000. In one embodiment, when the proximity sensor 1016 detects that the distance between the user and the front of the terminal 1000 is gradually decreasing, the processor 1001 controls the display screen 1005 to switch from a screen-on state to a screen-off state; when the proximity sensor 1016 detects that the distance between the user and the front of the terminal 1000 is gradually increasing, the processor 1001 controls the display screen 1005 to switch from a screen-off state to a screen-on state.
[0247] Those skilled in the art will understand that Figure 10 The structure shown does not constitute a limitation on terminal 1000 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0248] Taking electronic devices as servers as an example, Figure 11 This is a block diagram of a server provided in an embodiment of this disclosure. Indicatively, the server 1100 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 1101 and one or more memories 1102, wherein the one or more memories 1102 store at least one line of program code, which is loaded and executed by the one or more processors 1101 to implement the video generation method provided in the various method embodiments described above. Of course, the server 1100 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server 1100 may also include other components for implementing device functions, which will not be elaborated here.
[0249] In an exemplary embodiment, a computer-readable storage medium including program code is also provided, such as a memory 1102 including program code, which can be executed by the processor 1101 of the server 1100 to complete the video generation method described above. Optionally, the computer-readable storage medium may be read-only memory (ROM), random access memory (RAM), compact-disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0250] In an exemplary embodiment, a computer program product is also provided, including a computer program that, when executed by a processor, implements the video generation method described above.
[0251] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0252] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A video generation method, characterized in that, Applied to a server, the method includes: In response to a video script editing operation, a video script is obtained. The video script includes the material type, material content, and material arrangement order of the video to be generated. The video script is created based on the video script editing interface displayed on the terminal. The video script editing interface includes multiple functional controls. In response to a video generation operation for the video script, the video script is parsed to obtain the material type, the material content, and the material arrangement order; Based on the material type and the material content, multiple materials corresponding to the video script are determined; the multiple materials are spliced together according to the material arrangement order to generate an intermediate video; based on the video content of the intermediate video, the video elements of the intermediate video are adjusted to generate a target video, wherein the material arrangement order in the target video conforms to the material arrangement order, and the materials match the material type and the material content.
2. The video generation method according to claim 1, characterized in that, The step of splicing multiple materials according to their arrangement order to generate an intermediate video includes: The content that meets the filtering conditions in each of the materials is filtered, and the filtered materials are spliced together according to the order of the materials to generate the intermediate video.
3. The video generation method according to claim 1, characterized in that, The process of adjusting the video elements of the intermediate video based on its content to generate the target video includes at least one of the following: Based on the video content of the intermediate video, subtitles are added to the intermediate video to obtain the target video; Based on the video content of the intermediate video, media resources matching the video content are added to the intermediate video to obtain the target video. The media resources include one or more of images, dynamic effects, audio, and prompt text.
4. The video generation method according to claim 1, characterized in that, The method further includes: Based on the display effect of the target video, the display parameters of the target video are adjusted to obtain the adjusted target video. The display effect of the adjusted target video meets the display conditions.
5. The video generation method according to claim 1, characterized in that, The video script also includes at least one of the following: The types of materials, content, and splicing methods of picture-in-picture elements; Video script; Text-to-speech; Background music style.
6. The video generation method according to claim 1, characterized in that, The step of determining at least one material corresponding to the video script based on the material type and the material content includes at least one of the following: Based on the material type and the material content, at least one first material corresponding to the video script is determined from the material library; In response to the material upload operation for the video script, at least one second material corresponding to the video script is determined based on the material type and the material content.
7. The video generation method according to any one of claims 1 to 6, characterized in that, When there are multiple target videos, each target video contains different target video elements.
8. The video generation method according to claim 7, characterized in that, The target video element includes at least one of the following: Subtitle styles; The style of media resources that match the video content of the target video; Material transition styles; Materials selected from the resource library.
9. The video generation method according to claim 7, characterized in that, The plurality of target videos includes a first target video and at least one second target video, and the method further includes: Based on the different video elements contained in the first target video and the second target video, a prompt message corresponding to the second target video is generated. The prompt message is used to indicate the video elements in the second target video that are different from those in the first target video.
10. A video generation method, characterized in that, Applied to a terminal, the method includes: In response to the video script editing operation, a video script editing interface is displayed. This video script editing interface includes multiple functional controls to obtain the video script, which includes the material type, material content, and material arrangement order of the video to be generated. In response to a video generation operation for the video script, at least one target video corresponding to the video script is obtained, wherein the target video is obtained by adjusting the video elements of the intermediate video based on the video content of the intermediate video, the intermediate video is obtained by splicing multiple materials according to the material arrangement order, at least one material is determined based on the material type and the material content, the arrangement order of the materials in the target video conforms to the material arrangement order, and the material matches the material type and the material content; Display at least one of the target videos.
11. The video generation method according to claim 10, characterized in that, When there are multiple target videos, and each target video contains different target video elements, displaying at least one of the target videos includes: Display a first target video, at least one second target video, and corresponding prompts for the second target videos. The prompts are used to indicate video elements in the second target video that are different from those in the first target video.
12. A video generation apparatus, characterized in that, Applied to a server, the device includes: The acquisition unit is configured to perform a video script in response to a video script editing operation, and acquire a video script, wherein the video script includes the material type, material content and material arrangement order of the video to be generated, and the video script is created based on the video script editing interface displayed on the terminal, wherein the video script editing interface includes multiple functional controls; The parsing unit is configured to perform a video generation operation in response to the video script, parse the video script, and obtain the material type, the material content, and the material arrangement order; The generation unit is configured to perform the following actions: determine multiple materials corresponding to the video script based on the material type and the material content; splice the multiple materials according to the material arrangement order to generate an intermediate video; and adjust the video elements of the intermediate video based on the video content of the intermediate video to generate a target video, wherein the material arrangement order in the target video conforms to the material arrangement order, and the materials match the material type and the material content.
13. A video generation apparatus, characterized in that, Applied to a terminal, the device includes: The first acquisition unit is configured to perform a response to a video script editing operation, display a video script editing interface, which includes multiple functional controls, and acquire a video script, the video script including the material type, material content, and material arrangement order of the video to be generated; The second acquisition unit is configured to perform a video generation operation in response to the video script, and acquire at least one target video corresponding to the video script, wherein the target video is obtained by adjusting the video elements of the intermediate video based on the video content of the intermediate video, the intermediate video is obtained by splicing multiple materials according to the material arrangement order, at least one material is determined based on the material type and the material content, the arrangement order of the materials in the target video conforms to the material arrangement order, and the material matches the material type and the material content; The display unit is configured to display at least one of the target videos.
14. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory used to store the executable program code of the processor; The processor is configured to execute the program code to implement the video generation method as described in any one of claims 1 to 9, or the video generation method as described in any one of claims 10 to 11.
15. A computer-readable storage medium, characterized in that, When the program code in the computer-readable storage medium is executed by the processor of the electronic device, the electronic device is able to perform the video generation method as described in any one of claims 1 to 9, or the video generation method as described in any one of claims 10 to 11.