Video generation method and apparatus, and device, storage medium and program product

By splitting and processing text and generating consistent videos, the problem of poor consistency of characters and scenes in video production in the prior art is solved, and high-quality video generation is achieved, avoiding copyright and effect differences.

WO2024240188A1PCT designated stage expired Publication Date: 2024-11-28BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Application Number
PCT/CN2024/094718
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-23
Filing Date
2024-05-22
Publication Date
2024-11-28

AI Technical Summary

Technical Problem

Existing video production methods are difficult to achieve complete consistency and coherence of characters and scenes in novel scenes, and there are copyright issues and differences in effect for commonly used search materials.

Method used

By splitting the text to be processed, character features, scene features and text features are obtained, target pictures and audio clips are generated, and target videos are generated by combining these elements to ensure that the video is highly consistent with the novel scene.

Benefits of technology

It improves the consistency and consistency of video generation, avoids the waste of time for users to find materials, and solves copyright issues, and the generated videos are highly matched with the novel scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024094718_28112024_PF_FP_ABST
    Figure CN2024094718_28112024_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to a video generation method and apparatus, and a device, a storage medium and a program product. The method comprises: performing splitting processing on text to be processed, so as to obtain at least one text segment; acquiring a character feature, a scene feature and a text feature on the basis of the text segment, and generating a target picture corresponding to the text segment; on the basis of the character feature and the text feature, which correspond to the text segment, generating a target audio segment corresponding to the text segment; and on the basis of the target picture and the target audio segment, generating a target video corresponding to the text to be processed.
Need to check novelty before this filing date? Find Prior Art

Description

Video generation method, device, equipment, storage medium and program product

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on May 23, 2023, with application number 202310587425.6 and invention name “Video Generation Method, Device, Equipment, Storage Medium and Program Product”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present disclosure relates to the field of computer processing technology, and in particular to a video generation method, apparatus, device, storage medium, and program product. Background Art

[0004] With the continuous development of Internet technology, many application programs have been developed, among which more and more users like to read stories through electronic devices (such as mobile phones, PADs, etc.), and especially like to read novels with various storylines.

[0005] To enhance the user's visual experience while reading a novel, a video is created based on a scene from the novel. During the video production process, video footage is typically found through search. However, the resulting video footage often doesn't fully match the characters and scenes in the novel, resulting in significant discrepancies in the video quality and poor coherence.

[0006] Summary of the Invention

[0007] In order to solve the above technical problems, the embodiments of the present disclosure provide a video generation method, apparatus, device, storage medium and program product to improve the coherence and consistency of the automatic film-forming of novels.

[0008] In a first aspect, an embodiment of the present disclosure provides a video generation method, comprising:

[0009] Split the text to be processed to obtain at least one text segment;

[0010] Acquire character features, scene features, and text features based on the text segment, and generate a target image corresponding to the text segment;

[0011] generating a target audio segment corresponding to the text segment based on the character features and text features corresponding to the text segment;

[0012] A target video corresponding to the text to be processed is generated based on the target image and the target audio segment.

[0013] In a second aspect, an embodiment of the present disclosure provides a video generation device, including:

[0014] A text splitting module is used to split the text to be processed to obtain at least one text segment;

[0015] A target image generation module is used to obtain character features, scene features and text features based on the text segment and generate a target image corresponding to the text segment;

[0016] A target audio segment generating module, configured to generate a target audio segment corresponding to the text segment based on the character features and text features corresponding to the text segment;

[0017] A target video generation module is used to generate a target video corresponding to the text to be processed based on the target image and the target audio segment.

[0018] In a third aspect, an embodiment of the present disclosure provides an electronic device, the electronic device comprising:

[0019] one or more processors;

[0020] a storage device for storing one or more programs;

[0021] When the one or more programs are executed by the one or more processors, the one or more processors implement the video generation method as described in any one of the first aspects above.

[0022] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the video generation method as described in any one of the above-mentioned first aspects.

[0023] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, implements the video generation method as described in any one of the first aspects above.

[0024] The embodiments of the present disclosure provide a video generation method, apparatus, device, storage medium and program product, the method comprising: splitting a text to be processed to obtain at least one text segment; acquiring character features, scene features and text features based on the text segment to generate a target image corresponding to the text segment; generating a target audio segment corresponding to the text segment based on the character features and text features corresponding to the text segment; and generating a target video corresponding to the text to be processed based on the target image and the target audio segment. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0026] FIG1 is a flow chart of a video generation method according to an embodiment of the present disclosure;

[0027] FIG2 is a schematic diagram of a target image in an embodiment of the present disclosure;

[0028] FIG3 is a schematic structural diagram of a video generating device according to an embodiment of the present disclosure;

[0029] FIG4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0031] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0032] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0033] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0034] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0035] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0036] Before further describing the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are explained. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations.

[0037] In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed can be in real time or with a set delay. Unless otherwise specified, there is no restriction on the order of execution of the multiple operations executed.

[0038] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0039] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0040] As an optional but non-limiting implementation method, in response to receiving the user's active request, the method of sending a prompt message to the user can be, for example, a pop-up window, and the prompt message can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device. It is understandable that the above notification and the process of obtaining user authorization are only illustrative and do not constitute a limitation on the implementation method of the present disclosure. Other methods that meet relevant laws and regulations can also be applied to the implementation method of the present disclosure.

[0041] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.

[0042] With the continuous development of Internet technology, many application programs have been developed, among which more and more users like to read stories through electronic devices (such as mobile phones, PADs, etc.), and especially like to read novels with various storylines.

[0043] To enhance the user's visual experience while reading a novel, a video is created based on a scene from the novel. Currently, there are two common methods for creating these videos. One method involves manually drawing images, recording audio, adding background music, and editing the video to create a video corresponding to the novel's story scene. The other method involves searching for video footage offline or online, then editing the video to create a video corresponding to the novel's story scene.

[0044] The first video production method mentioned above wastes a lot of manpower and resources. The second method involves searching for video material that may have copyright issues. Furthermore, even if the video material is stylized, it still cannot achieve the consistency of the characters and scenes in the novel. The effects of each frame vary greatly, and the coherence is poor.

[0045] In order to solve at least one of the above-mentioned technical problems, an embodiment of the present disclosure provides a video generation method, which includes: splitting the text to be processed to obtain at least one text segment; obtaining character features, scene features and text features based on the text segment, and generating a target picture corresponding to the text segment; generating a target audio segment corresponding to the text segment based on the character features and text features corresponding to the text segment; and generating a target video corresponding to the text to be processed based on the target picture and the target audio segment.

[0046] In the disclosed embodiments, character features, scene features, and text features are used to generate a target image corresponding to a text segment. A target audio segment is generated based on the character and text features corresponding to the text segment. Finally, a target video is generated based on the target image and audio segment. This eliminates the need for users to waste time searching for source material. Furthermore, the video generated from the text segment is typically highly consistent with the characters and scenes in the novel, improving the coherence and consistency of the novel's automated filming.

[0047] The video generation method provided in the embodiments of the present disclosure is described in detail below with reference to the embodiments and drawings.

[0048] Figure 1 is a flowchart of a video generation method in an embodiment of the present disclosure. This embodiment is applicable to the situation of producing videos based on novel scenes. The method can be executed by a video generation device, and the video generation device can be implemented in software and / or hardware. The video generation method can be executed by an electronic device.

[0049] As shown in FIG1 , the video generation method provided by the embodiment of the present disclosure mainly includes steps S101 - S104 .

[0050] S101: Split the text to be processed to obtain at least one text segment.

[0051] In the embodiment of the present disclosure, the text to be processed may refer to a story text including descriptive content such as characters, scenes, and storylines. Furthermore, the text to be processed may be a novel, a story in a magazine, or a part of a novel.

[0052] In the embodiment of the present disclosure, the text segment may be one sentence or multiple sentences in the text to be processed.

[0053] In one embodiment of the present disclosure, the text to be processed is split according to the sentence structure and the preset word count unit of the text to be processed to obtain at least one text segment. Specifically, the text to be processed is divided into sentences according to the sentence structure to obtain multiple sentences. The number of words in each sentence is determined in sequence, and whether the number of words in the Nth sentence is within a preset word range. If so, the Nth sentence is treated as a text segment. If the number of words in the Nth sentence is less than the minimum value in the preset word range, the number of words in the N+1th sentence is read, and whether the sum of the number of words in the Nth and N+1th sentences is within the preset word range. If so, the Nth and N+1th sentences are treated as a text segment. If the sum of the number of words in the Nth and N+1th sentences is less than the minimum value in the preset word range, the number of words in the N+2th sentence is read, and whether the sum of the number of words in the Nth, N+1th, and N+2th sentences is within the preset word range is determined. The above method is used to determine the number of words in multiple sentences until the number of words in the multiple sentences is within the preset word range. The multiple sentences read are treated as text segments. Then, the sentence after the last sentence in the multiple sentences is treated as the new Nth sentence to determine whether it can be used as a new text segment.

[0054] The preset word count range can be set according to actual conditions, for example, it can be 20 to 30. In one embodiment of the present disclosure, the number of text segments is determined by the specific content of the text to be processed, which is not specifically limited in the embodiment of the present disclosure.

[0055] S102: Acquire character features, scene features, and text features based on the text segment, and generate a target image corresponding to the text segment.

[0056] In one embodiment of the present disclosure, steps S102 and S103 are performed for each text segment, and each text segment generates its corresponding target image and target audio segment.

[0057] In the embodiment of the present disclosure, the role feature refers to the descriptive information about the character in the text segment. A text segment may include one character or multiple characters, which is not specifically limited in the embodiment of the present disclosure.

[0058] In one embodiment of the present disclosure, the character characteristics may simply be a character name, or may include some basic descriptive information about the character, including the character's gender and age range. The age range may indicate whether the character is a child, young adult, middle-aged, or elderly, or may be a specific age numeric value. This embodiment of the present disclosure is not particularly limited.

[0059] Scene features refer to the textual information describing the scene in a text segment. These can include: season, location, specific objects in the scene, sounds, and so on. Scene features can be described as "a hot summer night at the Linxian Bridge," "a night of heavy rain," or "the shimmering surface of the lake." Scene descriptions can also include descriptions of characters' actions in the text segment, such as "attentively munching on a pancake."

[0060] Text features refer to the description of a character's emotions in a text segment, such as "laughing out loud," "crying silently," or "tears in the eyes." These features are used to indicate the facial expressions of the characters in the target image. For example, if the text feature is "laughing out loud," the facial expression of the character in the target image is processed as a wide-mouthed smile. If the text feature is "tears in the eyes," tears are added to the character's eyes in the target image.

[0061] In one embodiment of the present disclosure, character features, scene features, and text features are input into a pre-trained image generation model to obtain a target image corresponding to the text segment.

[0062] In one embodiment of the present disclosure, a target image corresponding to the text segment is generated based on the character features, scene features and text features included in the text segment, including: obtaining target image information corresponding to the character features, wherein the target image information includes a target image image and / or target image description information; and generating a target image corresponding to the text segment based on the target image information, scene features and text features.

[0063] In one embodiment of the present disclosure, the image information can be understood as information representing the external appearance of a character, including appearance, clothing, accessories, etc. The image information can be a picture or a textual description. For example, "a beautiful face wearing a torn white coat, a torn black skirt, long black hair, earrings, Chinese-style clothing, large eyes, and dark brown pupils."

[0064] In one embodiment of the present disclosure, when the target image information is a target image picture, the target image picture, scene features, and text features are input into a pre-trained first picture generation model to obtain a target picture corresponding to the text segment.

[0065] In one embodiment of the present disclosure, when the target image information is a target image description content, the target image description content, scene features and text features are input into a pre-trained second image generation model to obtain a target image corresponding to the text segment.

[0066] In one embodiment of the present disclosure, the text segment is: "It's a hot summer night. At the Linxian Bridge, Jian Huan is sitting on the edge, munching on a pancake earnestly." The corresponding character feature is "Jian Huan," the scene features are: "It's a hot summer night. At the Linxian Bridge," "Sitting on the edge," and "Mowin' on a pancake earnestly." The text feature is "earnest." The target image information corresponding to the character feature "Jian Huan" is: "A beautiful face, earrings, Chinese-style clothes, big eyes, dark brown pupils, and a girl wearing a white ragged coat, a black ragged skirt, and long black hair." Furthermore, the content input to the pre-trained second image generation model is: "At the Linxian Bridge, it's a hot summer night. At the Linxian Bridge, at the Linxian Bridge, a beautiful face, earrings, Chinese-style clothes, big eyes, dark brown pupils, and a girl sitting on the edge, munching on a pancake earnestly." The second image generation model outputs the corresponding target image, as shown in FIG2 .

[0067] Among them, the first image generation model is different from the second image generation model. The first image generation model is trained based on character image pictures, scene features and text features, and the second image generation model is trained based on character image description content, scene features and text features.

[0068] In an embodiment of the present disclosure, a method for determining target image information is provided. Specifically, the method includes: obtaining, based on a character feature, a match in a preset character library to obtain at least one candidate character image and image description information that matches the character feature; displaying the candidate character image; and, in response to receiving a selection instruction for the candidate character image, using the selected candidate character image and the image description information corresponding to the candidate character image as target image information corresponding to the character feature.

[0069] In the embodiment of the present disclosure, a character library is pre-built, which includes image pictures and image description information, and each image picture corresponds to one image description information. It should be noted that the materials in the character library can be used when generating a video from any text to be processed.

[0070] Furthermore, the text to be processed is analyzed to obtain multiple character features included in the text to be processed. For each character feature, a match is performed based on the character feature in the image description information in the character library to obtain multiple image descriptions that match the character feature. The image images corresponding to the multiple image descriptions are displayed as candidate character images on the terminal interface. Furthermore, the user can view the multiple candidate character images corresponding to the character feature on the terminal interface. In response to the user's selection of the candidate character image, the candidate character image selected by the user is used as the target image information corresponding to the character feature. Furthermore, the image description information corresponding to the image image selected by the user is used as the target image description information corresponding to the character feature.

[0071] It should be noted that the target image information corresponding to each task role feature in the text to be processed is determined in the above manner. In the process of generating a target image based on a text segment, the target image information corresponding to the role feature is read based on the predetermined determination relationship and the role feature included in the text segment.

[0072] In one embodiment of the present disclosure, a target image corresponding to the text fragment is generated based on the character features, scene features and text features included in the text fragment, including: generating an initial image based on the target image information, scene features and text features; editing the elements in the initial image to obtain an edited image, and performing style transfer processing on the initial image and / or the edited image to obtain a target image.

[0073] In the embodiment of the present disclosure, after generating the target image corresponding to the text segment based on the target image information, scene features, and text features, step S104 can be directly executed. Alternatively, the image generated based on the character features, scene features, and text features included in the text segment can be further processed.

[0074] In the embodiment of the present disclosure, an initial image is generated based on the target image information, scene features and text features, which is similar to the method of generating the target image in the above embodiment. For details, please refer to the description in the above embodiment, and the embodiment of the present disclosure will no longer perform specific processing.

[0075] In the disclosed embodiment, the elements in the initial image include elements describing the background and elements describing the characters in the initial image. The elements in the initial image can be clothing, skin, hair, eyes, etc. of the characters, as well as buildings, trees, etc. in the background.

[0076] In one embodiment of the present disclosure, editing the elements in the initial image to obtain the edited image includes editing the hairstyle, hair color, eye color, clothing color, etc. of the element characters in the initial image. The editing may also include editing the shape, color, etc. of the house of the element characters in the initial image.

[0077] The style transfer refers to transferring the target style to the original image or the edited image. The target style can be anime style, oil painting style, etc. The target style can be set according to the actual situation of the user and is not specifically limited in the embodiments of the present disclosure.

[0078] S103: Generate a target audio segment corresponding to the text segment based on the character features and text features corresponding to the text segment.

[0079] In one embodiment of the present disclosure, each character feature corresponds to one or more audio parameters. Furthermore, each character feature corresponds to specific audio parameters under its specific text features. For example, character A's sadness corresponds to audio parameter 1, happiness corresponds to audio parameter 2, and normal corresponds to audio parameter 3. Furthermore, the narration content corresponds to its specific audio parameters.

[0080] In an embodiment of the present disclosure, the text content of a text segment, as well as its corresponding character features and text features, are input into an AI audio synthesis model to generate a target audio segment corresponding to the text segment.

[0081] In one embodiment of the present disclosure, generating a target audio segment corresponding to the text segment based on the character features and text features corresponding to the text segment includes: obtaining the dialogue content included in the text segment, the character features corresponding to the dialogue content, and the text features corresponding to the dialogue content; inputting the dialogue content and the text features into an audio synthesis model corresponding to the character features to obtain a dialogue audio segment corresponding to the dialogue content; and / or inputting the narration content included in the text segment into a narration audio synthesis model to obtain a narration audio segment corresponding to the narration content; and synthesizing the dialogue audio segment and the narration audio segment based on the positional relationship between the dialogue content and the narration content in the text segment to obtain a target audio segment.

[0082] In one embodiment of the present disclosure, the text content in the text segment is divided according to the characters, that is, the characters to which the text content belongs are determined, for example: the dialogue content corresponding to character A, the dialogue content corresponding to character 2, and the narration content.

[0083] In one embodiment of the present disclosure, if the text segment only includes narration content, the text segment is input into a narration audio synthesis model to obtain a narration audio segment corresponding to the narration content, and the narration audio segment is used as the target audio segment corresponding to the text segment.

[0084] In one embodiment of the present disclosure, if the text segment only includes dialogue content, the character characteristics of the dialogue content and the corresponding text emotional characteristics are determined, and the dialogue content, the character characteristics, and the corresponding text emotional characteristics are input into the audio synthesis model to obtain the dialogue audio segment corresponding to the dialogue content, and the dialogue audio segment is used as the target audio segment corresponding to the text segment.

[0085] In one embodiment of the present disclosure, if the text segment includes dialogue content and narration content, the dialogue audio segment and the narration audio segment are synthesized based on the positional relationship between the dialogue content and the narration content in the text segment to obtain a target audio segment.

[0086] S104: Generate a target video corresponding to the text to be processed based on the target image and the target audio clip.

[0087] In an embodiment of the present disclosure, the target image and the at least one audio segment are synthesized according to the order of the text segments in the text to be processed to generate a target video corresponding to the text to be processed.

[0088] In one embodiment of the present disclosure, a target video corresponding to the text to be processed is generated based on a target image and a target audio clip, including: determining a video template and background audio corresponding to the text to be processed based on the text type corresponding to the text to be processed; and generating a target video corresponding to the text to be processed based on the target image, the target audio clip, the video template and the background audio.

[0089] In one embodiment of the present disclosure, the text type corresponding to the to-be-processed text may be a novel type, for example, a martial arts novel, a history novel, a mystery novel, a romance novel, a science fiction novel, and the like.

[0090] In one embodiment of the present disclosure, the correspondence between text types and video templates is preset, and then the corresponding video model is obtained according to the text type corresponding to the text to be processed.

[0091] In one embodiment of the present disclosure, a correspondence between text type and background audio is pre-set, and then the corresponding background audio is obtained based on the text type corresponding to the text to be processed. In one specific embodiment, if the text type is historical, the corresponding background music may be traditional Chinese music. If the text type is mystery, the corresponding background music may be suspense music. If the text type is romance, the corresponding background music may be love song background music.

[0092] In the embodiment of the present disclosure, the video template includes editing information of each video material, for example, the transition method between target pictures, and the time axis relationship between the target picture and the target audio clip.

[0093] In one embodiment of the present disclosure, at least one target picture, at least one target audio clip, and background audio are input into a video template to obtain a target video.

[0094] In one embodiment of the present disclosure, the method further includes: determining a time segment corresponding to the target picture in the target video; and adding subtitles based on the text segment to the target picture based on the time segment.

[0095] In one embodiment of the present disclosure, at least one target image, at least one target audio clip, background audio, and at least one text clip are input into a video template to generate a target video, wherein the timeline of the text clip is consistent with the corresponding target audio clip and the corresponding target image.

[0096] The disclosed embodiments provide a video generation method, apparatus, device, storage medium, and program product, the method comprising: splitting a text to be processed to obtain at least one text segment; acquiring character features, scene features, and text features based on the text segment to generate a target image corresponding to the text segment; generating a target audio segment corresponding to the text segment based on the character features and text features corresponding to the text segment; and generating a target video corresponding to the text to be processed based on the target image and the target audio segment. In the disclosed embodiments, a target image corresponding to the text segment is generated based on character features, scene features, and text features; a target audio segment corresponding to the text segment is generated based on the character features and text features corresponding to the text segment; and a target video is generated based on the target image and the target audio segment. This avoids the problem of users wasting time searching for materials, and the video generated from the text segment is usually highly consistent with the characters and scenes in the novel scene, thereby improving the coherence and consistency of the novel's automatic filming.

[0097] FIG3 is a flowchart of a video generation method in an embodiment of the present disclosure. This embodiment is applicable to the case of producing a video based on a novel scene. The method can be executed by a video generation device, which can be implemented in software and / or hardware.

[0098] As shown in FIG3 , the video generation device provided by the embodiment of the present disclosure mainly includes: a text segmentation module 31 , a target image generation module 32 , a target audio segment generation module 33 and a target video generation module 34 .

[0099] The text segmentation module 31 is used to segment the text to be processed to obtain at least one text segment;

[0100] A target image generation module 32 is configured to obtain character features, scene features, and text features based on the text segment, and generate a target image corresponding to the text segment;

[0101] A target audio segment generating module 33 is configured to generate a target audio segment corresponding to the text segment based on the character features and text features corresponding to the text segment;

[0102] The target video generation module 34 is configured to generate a target video corresponding to the text to be processed based on the target image and the target audio segment.

[0103] In one embodiment of the present disclosure, the target video generation module 34 includes: an audio and template determination unit, which is used to determine the video template and background audio corresponding to the text to be processed based on the text type corresponding to the text to be processed; and a target video generation unit, which is used to generate the target video corresponding to the text to be processed based on the target picture, the target audio clip, the video template and the background audio.

[0104] In one embodiment of the present disclosure, the target video generation module 34 also includes: a time segment reading unit for determining the time segment corresponding to the target image in the target video; and a subtitle adding unit for adding subtitles formed based on the text segment to the target image based on the time segment.

[0105] In one embodiment of the present disclosure, the target image generation module 32 includes: a target image information acquisition unit, used to obtain target image information corresponding to the character characteristics, wherein the character characteristics include: character name and / or character basic information, and the target image information includes a target image picture and / or target image description information; a target image generation unit, used to generate a target image corresponding to the text segment based on the target image information, the scene characteristics and the text characteristics.

[0106] In one embodiment of the present disclosure, the device also includes: a candidate character image determination unit, which is used to match in a preset character library based on the character characteristics to obtain at least one candidate character image and its image description information that matches the character characteristics; a candidate character image module, which is used to display the candidate character image; and a target image information determination module, which is used to respond to receiving a selection instruction for the candidate character image and use the selected candidate character image and the image description information corresponding to the candidate character image as the target image information corresponding to the character characteristics.

[0107] In one embodiment of the present disclosure, a target image generation module includes: an initial image generation unit, used to generate an initial image based on the target image information, scene features and text features; an initial image editing unit, used to edit elements in the initial image to obtain an edited image; and a style transfer unit, used to perform style transfer processing on the initial image and / or the edited image to obtain a target image.

[0108] In one embodiment of the present disclosure, the target audio segment generation module 33 includes: a dialogue content division unit for obtaining the dialogue content included in the text segment, the character features corresponding to the dialogue content, and the text features corresponding to the dialogue content; a dialogue audio segment generation unit for inputting the dialogue content and the text features into an audio synthesis model corresponding to the character features to obtain a dialogue audio segment corresponding to the dialogue content; a narration voice segment generation unit for inputting the narration content included in the text segment into a narration audio synthesis model to obtain a narration audio segment corresponding to the narration content; and a target audio segment generation unit for synthesizing the dialogue audio segment and the narration audio segment based on the positional relationship between the dialogue content and the narration content in the text segment to obtain a target audio segment.

[0109] In one embodiment of the present disclosure, the text splitting module 31 is specifically configured to split the text to be processed according to the sentence structure and the preset word count range of the text to be processed to obtain at least one text segment.

[0110] The video generation device provided in the embodiment of the present disclosure can execute the steps executed in the video generation method provided in the embodiment of the method of the present disclosure, and the execution steps and beneficial effects are not repeated here.

[0111] FIG4 is a schematic diagram of the structure of an electronic device in an embodiment of the present disclosure. Specific reference is made below to FIG4 , which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing an embodiment of the present disclosure. The electronic device 400 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable terminal devices, and the like, as well as fixed terminals such as digital TVs, desktop computers, smart home devices, and the like. The electronic device shown in FIG4 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.

[0112] As shown in FIG4 , the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes to implement the video generation method of the embodiment described in the present disclosure according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. Various programs and data required for the operation of the terminal device 400 are also stored in the RAM 403. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0113] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the terminal device 400 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 4 illustrates the terminal device 400 with various devices, it should be understood that not all of the illustrated devices are required to be implemented or present. More or fewer devices may alternatively be implemented or present.

[0114] 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 program code for executing the method shown in the flowchart, thereby implementing the video generation method described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0115] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0116] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.

[0117] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0118] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the terminal device, the terminal device: splits the text to be processed to obtain at least one text segment; obtains character features, scene features and text features based on the text segment, and generates a target picture corresponding to the text segment; generates a target audio segment corresponding to the text segment based on the character features and text features corresponding to the text segment; and generates a target video corresponding to the text to be processed based on the target picture and the target audio segment.

[0119] Optionally, when the above one or more programs are executed by the terminal device, the terminal device may also execute other steps described in the above embodiment.

[0120] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0121] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0122] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.

[0123] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0124] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0125] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0126] In addition, although each operation is described in a specific order, this should not be required to require these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0127] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A video generation method, comprising: Split the text to be processed to obtain at least one text segment; Acquire character features, scene features, and text features based on the text segment, and generate a target image corresponding to the text segment; Based on the character features and text features corresponding to the text segment, generating a target audio segment corresponding to the text segment; A target video corresponding to the text to be processed is generated based on the target image and the target audio segment.

2. The method according to claim 1, wherein: The step of generating a target video corresponding to the text to be processed based on the target picture and the target audio segment includes: Based on the text type corresponding to the text to be processed, determine the video template and background audio corresponding to the text to be processed; A target video corresponding to the text to be processed is generated based on the target image, the target audio clip, the video template and the background audio.

3. The method according to claim 1 or 2, wherein: The method further comprises: Determine the time segment corresponding to the target picture in the target video; A subtitle formed based on the text segment is added to the target picture based on the time segment.

4. The method according to claim 1, wherein: The acquiring character features, scene features, and text features based on the text segment and generating a target image corresponding to the text segment includes: Acquire target image information corresponding to the character features, wherein the character features include: a character name and / or basic character information, and the target image information includes a target image picture and / or target image description information; A target image corresponding to the text segment is generated based on the target image information, the scene features and the text features.

5. The method according to claim 4, wherein: The step of obtaining target image information corresponding to the character feature includes: Based on the character features, matching is performed in a preset character library to obtain at least one character image to be selected that matches the character features and its image description information; Displaying the image of the role to be selected; In response to receiving a selection instruction for the character image to be selected, the selected character image to be selected and the image description information corresponding to the character image to be selected are used as target image information corresponding to the character characteristics.

6. The method according to claim 4, wherein: The generating a target image corresponding to the text segment based on the target image information, scene features and text features includes: Generate an initial image based on the target image information, scene features and text features; Editing elements in the initial image to obtain an edited image; Perform style transfer processing on the initial image and / or the edited image to obtain a target image.

7. The method according to claim 1, wherein: The step of generating a target audio segment corresponding to the text segment based on the character features and text features corresponding to the text segment includes: Acquire the dialogue content included in the text segment, the character features corresponding to the dialogue content, and the text features corresponding to the dialogue content; Inputting the dialogue content and the text features into the audio synthesis model corresponding to the character features to obtain a dialogue audio segment corresponding to the dialogue content; and / or, Inputting the narration content included in the text segment into a narration audio synthesis model to obtain a narration audio segment corresponding to the narration content; Based on the positional relationship between the dialogue content and the narration content in the text segment, the dialogue audio segment and the narration audio segment are synthesized to obtain a target audio segment.

8. The method according to claim 1, wherein: The text to be processed is split to obtain at least one text segment, including: The text to be processed is split according to the sentence structure and the preset word count range of the text to be processed to obtain at least one text segment.

9. A video generating device, comprising: A text segmentation module is used to segment the text to be processed to obtain at least one text segment; A target image generation module, used to obtain character features, scene features and text features based on the text segment, and generate a target image corresponding to the text segment; A target audio segment generating module, used for generating a target audio segment corresponding to the text segment based on the character features and text features corresponding to the text segment; A target video generation module is used to generate a target video corresponding to the text to be processed based on the target image and the target audio segment.

10. An electronic device, wherein: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the video generating method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, wherein: When the program is executed by a processor, the video generating method according to any one of claims 1 to 8 is implemented.

12. A computer program product, comprising a computer program or instructions, wherein the computer program or instructions, when executed by a processor, implements the video generation method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for generating video based on story text

    CN108470036A

  • Speech synthesis method and device, electronic equipment and readable storage medium

    CN112270920A

  • Video generation method and device, storage medium and electronic equipment

    CN112929746A

  • Video generation method and device, computer equipment and storage medium

    CN114390218A

  • Video generation method, video generation system, electronic equipment and storage medium

    CN114827752A

Cited By

  • Text-to-video full link generation method and system based on multi-modal large model

    CN120512591A

  • Video generation method and device based on electronic book and related product

    CN120529144A

  • Method, device and related product for generating video based on e-book

    CN120529144B