Video generation method, device, storage medium, and program product
By dividing the target text into fragments and reorganizing it into subtexts, and matching video materials to generate video clips, the problem of cumbersome and low efficiency in the existing technology is solved, and the automation and efficiency improvement of video generation is achieved.
Patent Information
- Application Number
- CN202410492808.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-04-23
AI Technical Summary
In the prior art, the video generation process is cumbersome and inefficient, and requires a lot of effort to match and edit text and materials.
By dividing the target text into multiple clips, perform sentiment analysis and reorganizing it into subtexts, match video materials, generate video clips and splicing them into target videos.
It realizes the automation of video generation, saves labor costs, improves video generation efficiency, and increases the video generated more attractive and increases the viewer's desire and satisfaction.
Smart Images

Figure CN118381971B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of video synthesis, and in particular to a video generation method, device, storage medium, and program product. Background Art
[0002] With the popularization of the Internet, video has become an important form of media communication in daily life. Currently, users usually write texts themselves, then search for pictures, music and other materials related to the texts, and finally edit the texts and materials into videos. This method of manually recording videos not only requires a lot of energy from users, but also the process of recording videos is cumbersome and inefficient. Summary of the invention
[0003] In view of this, the embodiments of the present disclosure provide a video generation method, device, storage medium, and program product, which can realize the automation of video generation, save labor costs, and improve the efficiency of video generation.
[0004] In a first aspect, the present disclosure provides a video generation method, which adopts the following technical solution:
[0005] Divide the target text into multiple segments;
[0006] Performing sentiment analysis on the plurality of segments to obtain sentiments of the plurality of segments;
[0007] Reorganize the emotionally unified segments according to preset rules to obtain multiple sub-texts;
[0008] matching video materials for the plurality of subtexts;
[0009] Combining each of the video materials and the subtexts matching the video materials to generate a plurality of video clips;
[0010] The multiple video clips are spliced into a target video.
[0011] Optionally, the step of reorganizing the segments with unified emotions according to a preset rule to obtain a plurality of sub-texts includes:
[0012] Traversing the plurality of segments in order of their positions in the target text;
[0013] If the emotion of the current segment being traversed is the same as the emotion of the next segment, the current segment and the next segment are integrated to form a new segment to continue traversing;
[0014] If the sentiment of the current segment being traversed is different from the sentiment of the next segment, the current segment is used as the current sub-text.
[0015] Optionally, matching the video materials for the plurality of sub-texts includes:
[0016] Traversing the first material in the private material library, and obtaining a first correlation between the first material and the subtext;
[0017] When the first relevance is not less than a first threshold, using the first material as the video material of the subtext;
[0018] When the first relevance is less than a first threshold, traversing second materials in the system material library to obtain a second relevance between the second material and the subtext;
[0019] When the second relevance is not less than a second threshold, the second material is used as the video material of the subtext.
[0020] Optionally, matching the video materials for the plurality of subtexts further comprises:
[0021] When the second relevance is less than a second threshold, intelligent AI is used to draw video material for the sub-text.
[0022] Optionally, the combining of the video materials and the subtexts matching the video materials to generate a plurality of video clips includes:
[0023] Extracting text content of the subtext, and integrating the text content and the video material matching the subtext into a text document according to a preset layout structure;
[0024] The text document is converted into the video clip.
[0025] Optionally, converting the text document into the video clip includes:
[0026] Converting the video material into video frames;
[0027] Converting the text content into subtitles of the video frame based on the graphic layout of the text document;
[0028] Performing speech synthesis conversion on the text content to obtain speech information;
[0029] The video frame, the subtitle and the voice information are synthesized into the video segment.
[0030] Optionally, performing speech synthesis conversion on the text content to obtain speech information includes:
[0031] Get the user's recorded sound;
[0032] Obtaining a timbre model based on the recorded sound training;
[0033] The text content is converted into speech synthesis using the timbre model to obtain speech information.
[0034] In a second aspect, the embodiment of the present disclosure further provides a video generation system, which adopts the following technical solution:
[0035] A target text segmentation module, used for segmenting the target text into multiple segments;
[0036] A sentiment analysis module, used to perform sentiment analysis on the plurality of segments to obtain the sentiments of the plurality of segments;
[0037] A segment reorganization module is used to reorganize the segments with unified emotions according to preset rules to obtain multiple sub-texts;
[0038] A video material matching module, used for matching video materials for the plurality of subtexts;
[0039] A video clip generation module, used for combining each of the video materials and the subtexts matching therewith to generate a plurality of video clips;
[0040] The video segment splicing module is used to splice multiple video segments into a target video.
[0041] In a third aspect, the embodiments of the present disclosure further provide a computer device, which adopts the following technical solution:
[0042] The computer device comprises:
[0043] at least one processor; and,
[0044] a memory communicatively connected to the at least one processor; wherein,
[0045] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any of the above-mentioned video generation methods.
[0046] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned video generation methods.
[0047] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.
[0048] The video generation method provided by the embodiment of the present disclosure divides the target text into multiple segments. Since each segment may involve different emotions, the segments are reorganized through sentiment analysis and preset rules to generate multiple sub-texts. This method can ensure that each sub-text has its own overall emotional consistency, which is convenient for matching sub-texts with video materials that are closer to the interests and emotional needs of the audience. The video materials can enrich the video content, making the final generated target video more attractive, increasing the audience's desire to watch and satisfaction, and the process of matching video materials for each sub-text can be carried out simultaneously, saving the overall time of video generation. After obtaining the matched video materials, video segments are generated and spliced based on the video materials to obtain the final target video, thereby realizing the automation of text-to-video conversion, saving labor costs, and improving the efficiency of video generation.
[0049] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0051] Figure 1 A schematic diagram of a flow chart of a video generation method provided by an embodiment of the present disclosure;
[0052] Figure 2 A schematic diagram of the process of fragment recombination provided in an embodiment of the present disclosure;
[0053] Figure 3 A schematic diagram of reorganizing the fragments into subtexts provided in an embodiment of the present disclosure;
[0054] Figure 4 A schematic diagram of a process for matching video materials provided in an embodiment of the present disclosure;
[0055] Figure 5 A schematic diagram of a text document provided for an embodiment of the present disclosure;
[0056] Figure 6 A principle block diagram of a video generation system provided by an embodiment of the present disclosure;
[0057] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0058] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0059] It should be clear that the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0060] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0061] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0062] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0063] Reference Figure 1 The present disclosure provides a video generation method, comprising the following steps:
[0064] S1: Divide the target text into multiple segments;
[0065] S2: Perform sentiment analysis on multiple clips to obtain the sentiment of multiple clips;
[0066] S3: Reorganize the emotionally unified segments according to preset rules to obtain multiple sub-texts;
[0067] S4: Matching video material for multiple subtexts;
[0068] S5: generating multiple video clips by combining each video material and the subtexts matching the video material;
[0069] S6: stitching multiple video clips into a target video.
[0070] The video generation method disclosed in the present invention first subdivides the target text into many segments, each of which may involve different emotions. Multiple sub-texts generated by reorganizing the segments through sentiment analysis and preset rules can ensure that each sub-text has its own overall emotional consistency, which not only ensures that the sub-text has logical coherence and emotional coherence in content, but also facilitates matching the sub-text with video materials that are closer to the interests and emotional needs of the audience. Based on the video material, video segments are generated and spliced to obtain the final target video, wherein the video material can enrich the video content, make the generated target video more attractive, and increase the audience's desire to watch and satisfaction.
[0071] In summary, dividing the target text into multiple segments and then reorganizing the segments into sub-texts through sentiment analysis can enhance the emotional expression effect of the generated target video, making it easier for the audience to understand and empathize, improving the viewing experience, and using a load balancing algorithm to match video materials for each sub-text at the same time, saving video generation time.
[0072] This method realizes the automation of text-to-video conversion, saves labor costs, and improves the efficiency of video generation. Users, that is, creators, can devote more energy to content planning and creation rather than tedious processing. Moreover, this method is suitable for text processing of different types and styles, meeting diverse needs.
[0073] In S1, users can upload text. After the system reads the text, it allows users to preview the text. Users can modify the content of the text to obtain the final target text. Users can also write articles directly in the system and convert the written articles into text.
[0074] The user can select whether the segment is a short sentence or a paragraph according to his own needs. If a short sentence is selected, the target text is divided by the first preset symbol. If a paragraph is selected, the target text is divided by the second preset symbol. The first preset symbol includes at least one of a period, an exclamation mark, and a question mark; the second preset symbol includes a line break, a paragraph separator (e.g. ), of course, you can also use indentation as a format to distinguish each paragraph, thereby dividing the target text.
[0075] In S2, the fragment is preprocessed to obtain multiple valid words, wherein the preprocessing includes at least one of word segmentation, stop word removal and lemmatization. Word segmentation is the process of cutting a continuous text string into meaningful words or symbol sequences; stop word removal is to delete words that appear frequently but usually have no actual meaning or have little information from the fragment to reduce the complexity of processing and noise interference; stop word removal can improve the efficiency and accuracy of fragment processing and analysis. Lemmatization is the process of restoring the various forms of words to their original forms, usually by converting words into roots or stems, which helps to merge words with the same meaning but different forms in the text into a unified form to reduce the interference of word variants on fragment analysis. For example, words with forms such as "running", "runs", and "ran" are restored to their roots "run". Lemmatization can be achieved by stemming or lemmatization, which are slightly different, but the purpose is to normalize words with different forms.
[0076] Construct a sentiment dictionary, match the valid words with the sentiment words in the sentiment dictionary, and if the match is successful, use the score of the successfully matched sentiment word as the sentiment score of the valid word; if the match fails, the sentiment score of the valid word is 0. The range of the sentiment score is [-1, 1], where -1 represents negative sentiment, 0 represents neutral sentiment, and 1 represents positive sentiment.
[0077] Get the average of the sentiment scores of all valid words in the segment, which is the comprehensive score of the segment. Determine whether the comprehensive score is greater than the first threshold; if it is greater than the first threshold, the sentiment of the segment is determined to be positive; if it is not greater than the first threshold, determine whether the comprehensive score is less than the second threshold; if it is less than the second threshold, the sentiment of the segment is determined to be negative; if it is not less than the second threshold, the sentiment of the segment is determined to be neutral. In the present disclosure, the first threshold is set to 0.5 and the second threshold is set to -0.5.
[0078] Reference Figure 2 The schematic diagram of the fragment reorganization process shown in S3 specifically includes the following steps to obtain multiple subtexts:
[0079] S21: traverse the multiple segments in the order of their positions in the target text, and record the segment being traversed as the current segment;
[0080] S22: Determine whether the emotion of the current segment is the same as the emotion of the next segment; if so, execute S23; if not, execute S24;
[0081] S23: Integrate the current segment with the next segment to form a new segment to continue traversal, and return to S21;
[0082] S24: Use the current segment as the current subtext.
[0083] Reference Figure 3 Schematic diagram of the reorganization of the displayed fragments into sub-texts. The consecutive fragments with the same sentiment are reorganized into sub-texts, and the fragments with different sentiments from the upper and lower fragments are treated as separate sub-texts.
[0084] Reference Figure 4 The flowchart of matching video materials is shown. In S4, matching video materials for multiple subtexts includes the following steps:
[0085] S41: traversing the first material in the private material library to obtain a first correlation between the first material and the subtext;
[0086] S42: Determine whether the first correlation is less than a first threshold; if not, execute S43; if yes, execute S44;
[0087] S43: using the first material as the video material of the subtext;
[0088] S44: traversing the second material in the system material library to obtain a second correlation between the second material and the subtext;
[0089] S45: Determine whether the second correlation is less than the second threshold; if not, execute S46; if yes, execute S47;
[0090] S46: using the second material as the video material of the subtext;
[0091] S47: Use smart AI to draw video footage for subtext.
[0092] In S41, each first material has a first label, and the first label includes at least one of a content label, an emotional label, and an attribute label, and each label includes at least one specific label. Among them, the content label reflects the content or theme of the first material, for example, "landscape", "character", "animal", etc. The emotional label of a first material only includes one of positive, neutral, and negative. The attribute label reflects the style, technology, or purpose of the material, for example, the artistic style of the first material includes "abstract", "realism", "impressionism", etc., the design style of the first material includes "simple", "retro", "modern", etc., the technology of the first material includes "HD", "4K", "slow motion", "filter", etc., and the purpose of the first material includes "advertising", "promotion", "product display", "classroom teaching", "online education", "training", etc.
[0093] Content keywords and attribute keywords of the sub-text are extracted, wherein the content keywords refer to words that reflect the content or theme of the sub-text, and the attribute keywords refer to words that reflect the style, technology or purpose of the sub-text.
[0094] Convert the xth content keyword of the subtext into the first vector L x , convert the yth content label of the first material into the second vector L y , use similarity measurement methods (such as cosine similarity, Euclidean distance or Pearson correlation coefficient, etc.) to calculate L x With L y The similarity between xy .
[0095] Convert the sentiment of the sub-text into the first vector L q , convert the emotional label of the first material into the second vector L p , using the similarity measurement method to calculate L q With L p The similarity between qp Among them, the sentiment of the sub-text is the sentiment of the fragments that constitute the sub-text.
[0096] Convert the i-th attribute keyword of the subtext into the first vector L i , convert the jth attribute label of the first material into the second vector L j , using the similarity measurement method to calculate L i With L j The similarity between ij .
[0097] The first correlation is D1, and the calculation formula of D1 is as follows:
[0098] D1=A*d xy +B*d qp +C*d ij ;
[0099] In the formula, A, B, and C are all preset weights.
[0100] In S43, there may be multiple first correlations that are not less than the first threshold value, and accordingly, there may also be multiple screened video materials. It is possible to choose to retain all video materials based on user needs, or to retain only video materials with the highest first correlation. It is also possible to choose to retain some video materials based on the number of words in the sub-text. For example, the more words in the sub-text, the more video materials are retained. It is also possible to calculate the third correlation between the video material and the segments that constitute the sub-text, and match a video material to each segment based on the third correlation.
[0101] In S44, each second material has a second label, and the second label includes at least one of a content label, an emotion label, and an attribute label, and each label includes at least one specific label. According to the second label and the content keyword, emotion and attribute keyword of the subtext, the second relevance is calculated as D2. The calculation principle of D2 is the same as the calculation principle of D1 in S41, and will not be repeated here.
[0102] In S46, there may be multiple second correlations that are not less than the second threshold value. Correspondingly, there may also be multiple screened video materials. The video materials can be selected and retained according to user needs. The specific method refers to the above explanation of S43 and will not be repeated here.
[0103] In S47, the subtext is input into the relevant software or tool of the intelligent AI, and the video material is directly drawn using the intelligent AI.
[0104] Through the above method, the user's private material library can be used preferentially to ensure that the final generated target video fits the user's preferences as much as possible. When the first materials in the private material library are not suitable, the system material library, that is, the public material library, is used. When the second materials in the system material library are also not suitable, intelligent AI is used to directly draw the video material, thereby ensuring the quality of the generated target video.
[0105] In S5, the user presets a layout structure, which includes upper text and lower picture or upper picture and lower text, wherein upper text and lower picture refers to the text content of the subtext being above the video material, and upper picture and lower text refers to the text content of the subtext being below the video material.
[0106] Extract the text content of the subtext, integrate the text content and the matching video material into a text document according to the preset layout structure, convert the video material into video frames, and convert the text content into subtitles of the video frame based on the text and image layout of the text document. If the layout structure is text above and image below, the subtitles are located above the corresponding video frame; if the layout structure is image above and text below, the subtitles are located below the corresponding video frame.
[0107] Reference Figure 5The schematic diagram of the displayed text document has a layout structure of text above and picture below. The text content includes content M and content N, and the video material includes picture 1 and picture 2. Content M and content N are both located above picture 1, and picture 2 is located below picture 1. If the user does not make any adjustments, the system will automatically convert picture 1 into video frame 1 and picture 2 into video frame 2, and divide the text content evenly into two parts, or divide the text content into two parts according to the adaptability to the two video frames, one into subtitles for video frame 1 and the other into subtitles for video frame 2. If the user makes any adjustments, the text and graphics layout of the text document will be rearranged according to the user's adjustments. For example, if the user drags content N between picture 1 and picture 2, the system will convert content M into subtitles for video frame 1 and content N into subtitles for video frame 2.
[0108] The text content is converted into speech synthesis to obtain speech information. The essence of this process is dubbing, which synthesizes video frames, subtitles and speech information into video clips.
[0109] Optionally, in the process of converting video materials into video frames, it is supported to perform operations such as cropping, zooming in, zooming out, improving resolution, improving image quality, and applying filters on the video materials. In the process of configuring subtitles, it is supported that users add titles to video frames, and it is also supported that the system automatically extracts titles from target text and adds them to video frames.
[0110] The present disclosure supports users to select multiple timbres to perform speech synthesis conversion on text content, including but not limited to gentle male voice, child voice, cute female voice, royal sister voice, and old man voice. It also supports users to use their own timbres to perform speech synthesis conversion on text content. Specifically, the user's recorded voice is obtained, a timbre model is obtained based on the recorded voice training, and the timbre model is used to perform speech synthesis conversion on the text content to obtain voice information. Among them, the timbre model can be a model based on a machine learning algorithm, such as a neural network model, or a model based on acoustic laws.
[0111] The present invention supports users to preview the target video. The preview interface includes the video and audio tracks and the position, size, rotation, scaling, path, animation effects and other information of the video materials. Users can adjust the target video according to this information, and can also make watermarks according to user needs and add the made watermarks to the target video. It also supports users to add background music to the target video according to their preferences.
[0112] In summary, the video generation method disclosed in the present invention supports the functions of automation and batch processing of multiple target texts. For example, the system can automatically collect second materials from various data sources through crawler technology, automatically match video materials for subtexts, and process multiple target texts at the same time, and batch generate multiple target videos. The method can also adjust and optimize video materials, text documents, subtitles, etc. according to the needs and preferences of users, complete the personalized production of target videos, and continuously optimize the model and the adjustment method of video materials according to the user's fine-tuning actions on the target video, so as to improve the quality of the next target video generation. This feedback loop enables the system to continuously optimize various parameters and provide video products that better meet user needs.
[0113] Reference Figure 6 The present disclosure provides a video generation system, comprising:
[0114] A target text segmentation module 101 is used to segment the target text into multiple segments;
[0115] The sentiment analysis module 102 is used to perform sentiment analysis on the multiple segments to obtain the sentiments of the multiple segments;
[0116] The segment reorganization module 103 is used to reorganize the segments with unified emotions according to preset rules to obtain multiple sub-texts;
[0117] A video material matching module 104, used to match video materials for multiple subtexts;
[0118] The video segment generation module 105 is used to generate multiple video segments by combining each video material and the subtext matching therewith;
[0119] The video segment splicing module 106 is used to splice multiple video segments into a target video.
[0120] The various variations and specific examples of the video generation method provided above are also applicable to the video generation system provided in the present disclosure. Through the above detailed description of the video generation method, those skilled in the art can clearly know the implementation method of the video generation system. For the sake of brevity of the specification, it will not be described in detail here.
[0121] The computer device according to the embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-temporary computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may, for example, include a read-only memory (ROM), a hard disk, a flash memory, etc.
[0122] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In one embodiment of the present disclosure, the processor is used to run the computer-readable instructions stored in the memory, so that the computer device performs all or part of the steps of the video generation method of each embodiment of the present disclosure.
[0123] Those skilled in the art should be able to understand that in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the protection scope of the present disclosure.
[0124] like Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure is shown, which is a schematic diagram of the structure of a computer device suitable for implementing the embodiment of the present disclosure. Figure 7 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0125] like Figure 7 As shown, the computer device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer device are also stored. The processor, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0126] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes, hard disks, etc.; and communication devices. The communication device can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 7 A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0127] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the video generation method of the embodiment of the present disclosure are executed.
[0128] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.
[0129] According to the computer-readable storage medium of the embodiment of the present disclosure, non-transitory computer-readable instructions are stored thereon. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the video generation method of each embodiment of the present disclosure are executed.
[0130] The above-mentioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or mobile hard disk), media with built-in rewritable non-volatile memory (e.g., memory card) and media with built-in ROM (e.g., ROM box).
[0131] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.
[0132] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0133] In the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0134] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.
[0135] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0136] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.
[0137] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0138] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A video generation method, characterized in that: include: Divide the target text into multiple segments; Performing sentiment analysis on the plurality of segments to obtain sentiments of the plurality of segments; Reorganize the emotionally unified segments according to preset rules to obtain multiple sub-texts; matching video materials for the plurality of subtexts; Combining the video material and the subtexts matching the video material to generate a plurality of video clips; splicing a plurality of the video clips into a target video; The performing sentiment analysis on the plurality of segments to obtain the sentiments of the plurality of segments includes: Preprocessing the fragment to obtain multiple valid words; Constructing a sentiment dictionary, matching the valid words with the sentiment words in the sentiment dictionary, if the match is successful, using the score of the successfully matched sentiment word as the sentiment score of the valid word; if the match fails, the sentiment score of the valid word is 0; Obtaining an average value of sentiment scores of all valid words in the segment, wherein the average value is a comprehensive score of the segment; Determining whether the comprehensive score is greater than a first threshold; If it is greater than the first threshold, the emotion of the clip is determined to be positive; If it is not greater than the first threshold, determine whether the comprehensive score is less than the second threshold; If it is less than the second threshold, the emotion of the clip is determined to be negative; If it is not less than the second threshold, the emotion of the clip is determined to be neutral; The step of reorganizing the segments with unified emotions according to preset rules to obtain multiple sub-texts includes: Traversing the plurality of segments in order of their positions in the target text; If the emotion of the current segment being traversed is the same as the emotion of the next segment, the current segment and the next segment are integrated to form a new segment to continue traversing; If the sentiment of the current segment being traversed is different from the sentiment of the next segment, the current segment is used as the current sub-text.
2. The video generation method according to claim 1, characterized in that: The matching of the video materials for the plurality of sub-texts comprises: Traversing the first material in the private material library, and obtaining a first correlation between the first material and the subtext; When the first relevance is not less than a first threshold, using the first material as the video material of the subtext; When the first relevance is less than a first threshold, traversing second materials in the system material library to obtain a second relevance between the second material and the subtext; When the second relevance is not less than a second threshold, the second material is used as the video material of the subtext.
3. The video generation method according to claim 2, characterized in that: The matching of the video materials for the plurality of subtexts further comprises: When the second relevance is less than a second threshold, intelligent AI is used to draw video material for the sub-text.
4. The video generation method according to claim 1, characterized in that: The step of combining the video materials and the subtexts matching the video materials to generate a plurality of video clips includes: Extracting text content of the subtext, and integrating the text content and the video material matching the subtext into a text document according to a preset layout structure; The text document is converted into the video clip.
5. The video generation method according to claim 4, characterized in that: The step of converting the text document into the video clip comprises: Converting the video material into video frames; Converting the text content into subtitles of the video frame based on the graphic layout of the text document; Performing speech synthesis conversion on the text content to obtain speech information; The video frame, the subtitle and the voice information are synthesized into the video segment.
6. The video generation method according to claim 5, characterized in that: The performing speech synthesis conversion on the text content to obtain speech information includes: Get the user's recorded sound; Obtaining a timbre model based on the recorded sound training; The text content is converted into speech synthesis using the timbre model to obtain speech information.
7. A computer device, characterized in that: The computer device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the video generation method described in any one of claims 1-6.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the video generation method described in any one of claims 1-6.
9. A computer program product comprising computer instructions, characterized in that When the computer instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Methods, apparatus, devices, and storage media for generating emotionally resonant audio.
CN114937447A
Text semantic recognition method and device, electronic terminal and storage medium
CN115481641A