Video generation method and device, equipment and medium

By generating video scripts and acquiring visual materials and audio, the problem of boring user interactive content generated videos in the existing technology is solved, the video quality and user experience are improved, and higher character interactivity and content richness are achieved.

CN118714397APending Publication Date: 2024-09-27BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410704445.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Existing video content generated based on user interactive content is usually boring, with single content and lack of role interactivity, resulting in poor user experience.

Method used

By determining the user interaction content and explicit user interaction relationships between multiple users, a large language model is used to generate a video script, obtain visual materials and audio corresponding to the lines, and finally generate a substantial and rich target video.

Benefits of technology

It improves the quality and user experience of video content, makes characters more interactive, makes video content richer, and meets diverse user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118714397A
    Figure CN118714397A
Patent Text Reader

Abstract

The invention provides a video generation method and device, equipment and a medium, and relates to the technical field of artificial intelligence, in particular to the technical fields of natural language processing, computer vision, deep learning and the like. The method comprises the following steps: determining a plurality of user interaction contents among a plurality of users, wherein the plurality of user interaction contents respectively have a corresponding user interaction relationship; on the basis of the multiple user interaction contents and the user interaction relations corresponding to the multiple user interaction contents, a video script is generated through a large language model, the video script comprises multiple roles and multiple lines corresponding to the multiple users, and the lines comprise at least one line of each role; the plurality of lines have corresponding role interaction relationships; based on the video script, obtaining visual materials and audios respectively corresponding to the plurality of lines; and generating a target video based on the visual materials and the audios corresponding to the lines respectively.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to technical fields such as natural language processing, computer vision and deep learning, and specifically to a method for generating a video, an apparatus for generating a video, an electronic device, a computer-readable storage medium and a computer program product. Background Art

[0002] Artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, training of neural network models, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include natural language processing technology, computer vision technology, speech recognition technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0003] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention

[0004] The present disclosure provides a method for generating a video, an apparatus for generating a video, an electronic device, a computer-readable storage medium, and a computer program product.

[0005] According to one aspect of the present disclosure, a method for generating a video based on user interaction content is provided, including: determining multiple user interaction contents between multiple users, each of the multiple user interaction contents having a corresponding user interaction relationship; generating a video script using a large language model based on the multiple user interaction contents and the user interaction relationships corresponding to each of the multiple user interaction contents, the video script including multiple characters and multiple lines corresponding to the multiple users, the multiple lines including at least one line for each of the multiple characters, and each of the multiple lines having a corresponding character interaction relationship; based on the video script, obtaining visual materials and audio corresponding to the multiple lines respectively; and generating a target video based on the visual materials and audio corresponding to the multiple lines respectively.

[0006] According to another aspect of the present disclosure, a device for generating a video based on user interaction content is provided, including: a determination unit, configured to determine multiple user interaction contents between multiple users, each of the multiple user interaction contents having a corresponding user interaction relationship; a first generation unit, configured to generate a video script using a large language model based on the multiple user interaction contents and the user interaction relationships corresponding to the multiple user interaction contents, the video script including multiple characters and multiple lines corresponding to the multiple users, the multiple lines including at least one line for each of the multiple characters, and the multiple lines each having a corresponding character interaction relationship; an acquisition unit, configured to acquire visual materials and audio corresponding to the multiple lines respectively based on the video script; and a second generation unit, configured to generate a target video based on the visual materials and audio corresponding to the multiple lines respectively.

[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above method.

[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above method.

[0009] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the above method when executed by a processor.

[0010] According to one or more embodiments of the present disclosure, the present disclosure determines multiple user interaction contents between multiple users, and generates a video script by using the multiple user interaction contents and explicit user interaction relationships, and then obtains visual materials and audio corresponding to multiple lines based on the video script, and finally generates a target video based on the user interaction contents, so that the generated video content is substantial, the form is rich, the interactivity between characters is stronger, and it has higher quality, thereby improving the user experience.

[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0013] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure;

[0014] Figure 2 A flowchart of a method for generating a video based on user interactive content according to an exemplary embodiment of the present disclosure is shown;

[0015] Figure 3 A flow chart of determining multiple user interaction contents between multiple users according to an exemplary embodiment of the present disclosure is shown;

[0016] Figure 4 A flowchart of acquiring visual materials and audios respectively corresponding to a plurality of lines based on a video script according to an exemplary embodiment of the present disclosure is shown;

[0017] Figure 5 A flowchart of a method for generating a video based on user interactive content according to an exemplary embodiment of the present disclosure is shown;

[0018] Figure 6 A structural block diagram showing an apparatus for generating a video based on user interactive content according to an exemplary embodiment of the present disclosure; and

[0019] Figure 7 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0020] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0021] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.

[0022] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.

[0023] In the related art, the videos generated based on user interactive content are boring and monotonous.

[0024] To solve the above problems, by determining multiple user interaction contents between multiple users, and using the multiple user interaction contents and explicit user interaction relationships to generate a video script, and then obtaining visual materials and audios corresponding to multiple lines based on the video script, finally generating a target video based on the user interaction content, the generated video content is substantial, the form is rich, the interactivity between characters is stronger, and the quality is higher, thereby improving the user experience.

[0025] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0026] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.

[0027] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable execution of the methods of the present disclosure.

[0028] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.

[0029] exist Figure 1In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.

[0030] The user can use client devices 101, 102, 103, 104, 105 and / or 106 to perform human-computer interaction. The client device can provide an interface that enables the user of the client device to interact with the client device. The client device can also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.

[0031] Client devices 101, 102, 103, 104, 105 and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.

[0032] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0033] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0034] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0035] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and / or 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and / or 106.

[0036] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.

[0037] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.

[0038] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.

[0039] Figure 1 The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.

[0040] According to one aspect of the present disclosure, a method for generating a video based on user interactive content is provided. Figure 2 As shown, the method includes: step S201, determining multiple user interaction contents between multiple users, each of the multiple user interaction contents has a corresponding user interaction relationship; step S202, based on the multiple user interaction contents and the user interaction relationships corresponding to the multiple user interaction contents, using a large language model to generate a video script, the video script includes multiple roles and multiple lines corresponding to the multiple users, the multiple lines include at least one line of each of the multiple roles, and the multiple lines each have a corresponding role interaction relationship; step S203, based on the video script, obtaining visual materials and audio corresponding to the multiple lines respectively; and step S204, generating a target video based on the visual materials and audio corresponding to the multiple lines respectively.

[0041] Therefore, by determining multiple user interaction contents between multiple users, and using multiple user interaction contents and explicit user interaction relationships to generate a video script, and then obtaining visual materials and audio corresponding to multiple lines based on the video script, and finally generating a target video based on the user interaction content, the generated video content is substantial, the form is rich, the interactivity between characters is stronger, and the quality is higher, thereby improving the user experience.

[0042] According to some embodiments, the user interactive content includes at least one of text content, image content and video content. For some platforms with images, texts and / or videos as the main body, their video ecology is not perfect. Although there may be video content, most of them are transferred. There is a lack of native videos that meet the characteristics of the platform, which is not conducive to the wide dissemination of high-quality content on the platform. Although some platforms have a small amount of artificial intelligence generated content (Artificial Intelligence Generated Content), the form is single (such as simply editing AI pictures into animated pictures), which is difficult to meet the diverse needs of users. Therefore, by using the method proposed in the present disclosure, with the help of the text understanding and text generation capabilities of the large language model, the user interactive content (including text content, image content and / or video content) generated by users on the platform can be converted into videos with rich content, rich forms and strong character interactivity, thereby improving the user experience.

[0043] Large-scale language models (LLMs) are artificial intelligence systems trained on large datasets, designed to understand, generate, translate, answer questions, and perform other tasks related to natural language or specific forms of text. By using large-scale language models, it is possible to better understand the input of multiple texts and the location information of multiple texts, thereby generating more accurate document layout detection results.

[0044] According to some embodiments, the user interaction relationship represents the reply relationship between the publisher of the corresponding user interaction content and other users. By using the reply relationship between the publisher of the user interaction content and other users as the user interaction relationship, the character interactivity of the generated video can be enhanced, the video quality can be improved, and the user experience can be improved.

[0045] When a certain interactive topic is popular, there will be a large number of users and a large amount of interactive content (for example, comments or posts), and the amount of information far exceeds the carrying capacity of short videos. Therefore, how to select users (i.e. actors) and interactive content (i.e. character lines) to make the generated video as exciting as possible is the key to determining the success of the video. The goal of this problem is to maximize the amount of information generated in the script, while ensuring that the length of the final generated video meets the given requirements, and the selected users and interactive content also meet the given conditions. This problem can be modeled as follows:

[0046]

[0047] Specifically, we need to select a user set U and a comment set C so that the amount of post information they contain is as large as possible, where f is the information measurement function; the first constraint condition indicates that the length of the generated script converted into a video must be less than a given value T, where I is a 0-1 indicator function indicating whether the current user / comment is selected, and f ttsis a function proportional to the length of the text, considering the time it takes to convert texts of different lengths into corresponding speech. The second constraint condition indicates that the number of users participating in the final performance must be within the set range (too few actors will make the exchange of opinions less exciting, and too many actors will make it too chaotic). If there is no specific requirement, set N1=1, N2=N MAX_1 The third constraint states that for each user u i , the amount of interaction must meet the given conditions (if there is too little interaction content for a single character, the user will not be impressed by the character, and if there is too much interaction content, it will become a one-man show for the character). If there is no specific requirement, N3=1, N4=N MAX_2 That's it.

[0048] The essence of Formula 1 is how to select users and their comments under limited conditions to maximize the amount of information they constitute. It is difficult to solve this problem in practice, so the present disclosure provides a convenient way to solve this problem.

[0049] According to some embodiments, Figure 3 As shown, step S201, determining multiple user interaction contents between multiple users may include: step S301, determining multiple candidate users and at least one interaction content of each of the multiple candidate users; step S302, sorting the multiple candidate users in reverse order according to the number of interaction contents, and taking each of the multiple candidate users as the current first candidate user in turn to perform the following first operation: step S303, in response to determining that the number of at least one interaction content of the current first candidate user meets the first preset requirement, determining a set of interactive users having an interactive relationship with the current first candidate user; step S304, sorting at least one candidate user in the interactive user set in reverse order according to the number of interaction contents with the current first candidate user, and taking each of the at least one candidate user as the current second candidate user in turn to perform the following second operation: step S305, in response to determining that the number of at least one interaction content of the current first candidate user meets the first preset requirement, adding both the current first candidate user and the current second candidate user to the user set, and adding the interaction content between the current first candidate user and the current second candidate user to the user interaction content set; and step S306, determining multiple user interaction contents between the multiple users based on the user set and the user interaction content set.

[0050] It is understandable that the first operation in step S303 may include, for example, steps S303 to S305, and the second operation in step S304 may include, for example, step S305. Thus, through the above method, the amount of information generated in the script can be maximized to improve the user experience.

[0051] In some embodiments, the first preset requirement may be, for example, the third constraint condition above, that is, the number of at least one interactive content is between N3 and N4. In an exemplary embodiment, N3=1, N4=N MAX_2 That's it, N MAX_2 Can be set according to needs.

[0052] According to some embodiments, step S201, determining multiple user interaction contents between multiple users, further includes: after performing the second operation on each candidate user, in response to the current set of user interaction contents satisfying a second preset requirement, skipping performing the second operation on the remaining candidate users among the multiple candidate users.

[0053] Therefore, through the above method, it is possible to avoid the content of the script or video being too long, which would affect the overall viewing experience and quality of the video.

[0054] In some embodiments, the second preset requirement may be, for example, the first constraint condition mentioned above, that is, the total number of words in the user interaction content set or the length of a video based on the user interaction content set is less than a preset value.

[0055] According to some embodiments, in response to determining that the user set meets the third preset requirement, a plurality of user interaction contents between the plurality of users are determined based on the user set and the user interaction content set.

[0056] Thus, the above method can ensure that there are enough characters in the script or video, while not too many characters.

[0057] In some embodiments, the third preset requirement may be, for example, the second constraint condition above, that is, the number of users is between N1 and N2. In an exemplary embodiment, N1=1, N2=N MAX_1 That's it, N MAX_1 Can be set according to needs.

[0058] In some embodiments, in step S202, a plurality of user interaction contents, user interaction relationships corresponding to the plurality of user interaction contents, and corresponding prompt texts may be input into a large language model to instruct the large language model to generate a video script including a plurality of roles corresponding to the plurality of users and a plurality of lines. The plurality of lines include at least one line of each of the plurality of roles, and the plurality of lines each have a corresponding role interaction relationship.

[0059] In an exemplary embodiment, the prompt text may be, for example:

[0060] “This is a discussion about the issue *** (post title). The author’s point of view is *** (post body). There are also some users’ views on the issue and the dialogue between them: *** (post content relationship network). Now you play the role of a screenwriter and rewrite the above content into a script, highlighting the clash of views between users. There should be conflicts, the main characters should be kept to 3-5, and the dialogue should be as faithful to the original text as possible.”

[0061] In some embodiments, the above-mentioned post content relationship network may be, for example, multiple user interaction contents between multiple users. The multiple user interaction contents may be converted into a structured data form, each piece of data including the user who posted the user interaction content (posting user), other users in the reply relationship of the user interaction content (replying users), and the main content of the user interaction content (the post itself).

[0062] According to some embodiments, Figure 4 As shown, step S203, based on the video script, obtaining visual materials and audio corresponding to multiple lines respectively may include: step S401, for each of multiple users, obtaining basic information of the user; step S402, based on the basic information of the user, using the text graph model to generate a basic virtual image of the user; and step S403, based on the basic virtual image of the user, generating visual materials corresponding to at least one line of the character corresponding to the user.

[0063] Therefore, by generating a basic virtual image of the user and generating visual materials corresponding to the lines based on the basic virtual image of the user, the content richness of the video can be improved and the user experience can be improved.

[0064] In some embodiments, the Wensheng graph model can use a stable diffusion model. The Wensheng graph model can be used to generate a basic virtual image of a user in the following manner. First, the basic information of the user, such as avatar, gender, age, favorite fields, etc., can be obtained according to the feature extractor; then, the basic information of the user and the corresponding prompt text for the Wensheng graph model generated by the large language model are used as the input of the Wensheng graph model to obtain the corresponding virtual image of the user. The image has the personalized characteristics of the user and is deeply involved in the video generation. When using the large language model to generate the corresponding prompt text for the Wensheng graph model, the following prompt text can be used:

[0065] "From now on, you play the role of a prompt engineer for an AI painting platform. I will give you text information, and you will output the corresponding prompt words in the form of word phrases, with no more than 50 words. The following is the input information: *** (user information, for example: user A, gender*, age*, favorite fields*, etc.)"

[0066] In some embodiments, the text graph model can receive text and images at the same time, thereby generating an output image related to both the input text and image. In these embodiments, the user avatar obtained by the feature extractor can be input into the text graph model together with the above-mentioned user basic information and the corresponding prompt text.

[0067] In some embodiments, in step S403, visual materials of the lines spoken by the user's character may be generated based on the user's basic avatar. For example, the user's basic avatar and at least one line of the user's character may be combined to obtain visual materials corresponding to each line, and the paragraphs corresponding to each line may be presented in the video.

[0068] In some embodiments, after obtaining the basic virtual image of the user, the basic virtual image may be further processed to obtain visual materials that are more suitable for each line.

[0069] According to some embodiments, step S403, generating visual materials corresponding to at least one line of the character corresponding to the user based on the basic virtual image of the user may include: for each of the at least one line of the character corresponding to the user, based on the line and the basic virtual image of the user, using a text graph model to generate a dialogue virtual image of the user for the line, so as to obtain visual materials corresponding to the line.

[0070] Therefore, through the above method, the visual material corresponding to each line can be closer to the line, and the visual content of the video can be further enriched to enhance the user experience.

[0071] In some embodiments, for each line of a character corresponding to a certain user, the line and the basic virtual image generated for the user in step S402 can be input into the text graph model to obtain the virtual image of the user corresponding to the line, that is, the dialogue virtual image.

[0072] According to some embodiments, Figure 5 As shown, the method for generating a video based on user interactive content may also include: step S503, rewriting each of the multiple lines in turn into a target line with the character style of the narrator of the line in the order in which the multiple lines occur, and replacing the line with the target line.

[0073] Understandably, Figure 5 The operations and effects of step S501, step S502, step S504 and step S505 can refer to the above description of step S201 to step S204, and will not be repeated here.

[0074] Therefore, through the above method, each line of the character can be made to carry the character style of the character, thereby enhancing the fun of the video and improving the user experience.

[0075] In some embodiments, a large language model may be used to implement rewriting each of the plurality of lines into a target line with the character style of the character speaking the line.

[0076] According to some embodiments, the target line may be obtained by rewriting the line based on other lines before the line using the character style model of the narrating character, and the character style model of the narrating character may be obtained by fine-tuning a large language model using the historical corpus of the narrating character.

[0077] Therefore, through the above method, each line of the character can be made to carry the character style of the character with higher quality, thereby enhancing the fun of the video and improving the user experience.

[0078] According to some embodiments, the other lines may include at least one line of other characters before the line indicated by the character interaction relationship of the line.

[0079] Thus, through the above method, the rewritten lines can respond to the previous lines of other characters with role interaction relationships, thereby improving the interactivity between the characters and further improving the user experience.

[0080] According to some embodiments, the target line is obtained by rewriting the line using the character style model of the narrating character based on the character style prompt text of the narrating character of the line and other lines before the line.

[0081] Therefore, through the above method, each line of a character can be made to carry the character style of the character at a relatively low cost, thereby enhancing the fun of the video and improving the user experience.

[0082] In some embodiments, in step S203, the audio generation model may be used to obtain the speech audio corresponding to each line. For different lines of the same user and character, the same timbre may be used to generate the speech audio.

[0083] In some embodiments, the user's location information can be obtained, and voice audio with a dialect can be generated based on the location information, thereby increasing the interest of the video and improving the user experience.

[0084] In some embodiments, in step S204, after obtaining the audio and visual material videos, they can be synthesized to obtain the final target video.

[0085] According to another aspect of the present disclosure, a device for generating a video based on user interactive content is provided. Figure 6 As shown, the device 600 includes: a determination unit 610, configured to determine multiple user interaction contents between multiple users, each of the multiple user interaction contents has a corresponding user interaction relationship; a first generation unit 620, configured to generate a video script using a large language model based on the multiple user interaction contents and the user interaction relationships corresponding to the multiple user interaction contents, the video script including multiple roles and multiple lines corresponding to the multiple users, the multiple lines including at least one line of each of the multiple roles, and the multiple lines each having a corresponding role interaction relationship; an acquisition unit 630, configured to acquire visual materials and audio corresponding to the multiple lines respectively based on the video script; and a second generation unit 640, configured to generate a target video based on the visual materials and audio corresponding to the multiple lines respectively.

[0086] Understandably, Figure 6 The operation and effect of unit 610-unit 640 in Figure 2 The description of steps S201 to S204 in the process will not be repeated here.

[0087] According to some embodiments, the user interactive content may include at least one of text content, image content, and video content.

[0088] According to some embodiments, the user interaction relationship may represent a reply relationship between a publishing user of the corresponding user interaction content and other users.

[0089] According to some embodiments, the determination unit may include: a first determination subunit, configured to determine a plurality of candidate users and at least one interactive content of each of the plurality of candidate users; a first sorting unit, configured to sort the plurality of candidate users in reverse order according to the number of interactive contents, and sequentially use each of the plurality of candidate users as the current first candidate user to perform the following first operation; a second determination subunit, configured to determine a set of interactive users having an interactive relationship with the current first candidate user in response to determining that the number of at least one interactive content of the current first candidate user meets a first preset requirement; a second sorting unit, configured to sort at least one candidate user in the set of interactive users in reverse order according to the number of interactive contents with the current first candidate user, and sequentially use each of the at least one candidate user as the current second candidate user to perform the following second operation; a third determination subunit, configured to add both the current first candidate user and the current second candidate user to the user set in response to determining that the number of at least one interactive content of the current first candidate user meets the first preset requirement, and add the interactive content between the current first candidate user and the current second candidate user to the user interactive content set; and a fourth determination subunit, configured to determine a plurality of user interactive contents between the plurality of users based on the user set and the user interactive content set.

[0090] According to some embodiments, the determination unit may further include: a skipping unit, configured to, after performing the second operation on each candidate user, skip performing the second operation on the remaining candidate users among the multiple candidate users in response to the current set of user interaction content satisfying a second preset requirement.

[0091] According to some embodiments, in response to determining that the user set meets the third preset requirement, a plurality of user interaction contents between the plurality of users may be determined based on the user set and the user interaction content set.

[0092] According to some embodiments, the acquisition unit may include: a first acquisition sub-unit, configured to acquire basic information of each user among a plurality of users; a first generation sub-unit, configured to generate a basic virtual image of the user using a text graph model based on the basic information of the user; and a second generation sub-unit, configured to generate visual materials corresponding to at least one line of a character corresponding to the user based on the basic virtual image of the user.

[0093] According to some embodiments, the second generating sub-unit may be configured to generate, for each of at least one line of the character corresponding to the user, a dialogue virtual image of the user for the line based on the line and the basic virtual image of the user using a text graph model to obtain visual material corresponding to the line.

[0094] According to some embodiments, the method may further include: a replacement unit configured to rewrite each of the multiple lines in turn into a target line with the character style of the narrator of the line in the order of occurrence of the multiple lines, and replace the line with the target line.

[0095] According to some embodiments, the target line may be obtained by rewriting the line based on other lines before the line using the character style model of the narrating character, and the character style model of the narrating character may be obtained by fine-tuning a large language model using the historical corpus of the narrating character.

[0096] According to some embodiments, the other lines may include at least one line of other characters before the line indicated by the character interaction relationship of the line.

[0097] According to some embodiments, the target line may be obtained by rewriting the line using a character style model of the narrating character based on a character style prompt text of the narrating character of the line and other lines before the line.

[0098] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0099] According to an embodiment of the present disclosure, an electronic device, a readable storage medium and a computer program product are also provided.

[0100] refer to Figure 7 , a block diagram of an electronic device 700 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0101] like Figure 7As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0102] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, an output unit 707, a storage unit 708, and a communication unit 709. The input unit 706 can be any type of device that can input information to the electronic device 700. The input unit 706 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 707 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 708 can include but is not limited to a disk, an optical disk. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0103] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods, processes, and / or processes described above. For example, in some embodiments, these methods, processes, and / or processes may be implemented as computer software programs, which are tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the methods, processes, and / or processes described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform these methods, processes, and / or processes in any other appropriate manner (e.g., by means of firmware).

[0104] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0105] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0106] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 may 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.

[0107] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0108] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by 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), the Internet, and a blockchain network.

[0109] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0110] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0111] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the authorized claims and their equivalents.

[0112] Various elements in the embodiments or examples may be omitted or may be replaced by their equivalent elements. In addition, each step may be performed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many elements described herein may be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A method for generating videos based on user interactive content, include: Determining a plurality of user interaction contents between a plurality of users, each of the plurality of user interaction contents having a corresponding user interaction relationship; Based on the multiple user interaction contents and the user interaction relationships corresponding to the multiple user interaction contents, a video script is generated using a large language model, wherein the video script includes multiple characters and multiple lines corresponding to the multiple users, the multiple lines include at least one line of each of the multiple characters, and each of the multiple lines has a corresponding character interaction relationship; Based on the video script, obtaining visual materials and audio corresponding to the multiple lines respectively; as well as A target video is generated based on the visual materials and audios respectively corresponding to the plurality of lines.

2. The method according to claim 1, in, Based on the video script, obtaining visual materials and audios corresponding to the plurality of lines respectively includes: For each of the multiple users, obtain basic information of the user; Based on the basic information of the user, using the text graph model to generate a basic virtual image of the user; and Based on the basic virtual image of the user, visual materials corresponding to at least one line of the character corresponding to the user are generated.

3. The method according to claim 2, in, Generating visual materials corresponding to at least one line of a character corresponding to the user based on the basic virtual image of the user includes: For each of at least one line of the character corresponding to the user, based on the line and the basic virtual image of the user, the text graph model is used to generate a dialogue virtual image of the user for the line to obtain visual materials corresponding to the line.

4. The method according to any one of claims 1 to 3, further comprising: include: According to the occurrence order of the multiple lines, each of the multiple lines is rewritten into a target line with the character style of the narrator of the line, and the line is replaced with the target line.

5. The method according to claim 4, in, The target lines are obtained by rewriting the lines based on other lines before the lines using the character style model of the narrating character, and the character style model of the narrating character is obtained by fine-tuning a large language model using the historical corpus of the narrating character.

6. The method according to claim 5, in, The other lines include at least one line before the line of other characters indicated by the character interaction relationship of the line.

7. The method according to claim 4, in, The target lines are obtained by rewriting the lines based on the character style model of the narrating character and the character style prompt text of the narrating character of the lines and other lines before the lines.

8. The method according to any one of claims 1 to 3, in, Determining the content of multiple user interactions between multiple users includes: determining a plurality of candidate users and at least one interactive content of each of the plurality of candidate users; The plurality of candidate users are sorted in reverse order according to the number of interactive contents, and each of the plurality of candidate users is sequentially selected as a current first candidate user to perform the following first operation: In response to determining that the number of at least one interactive content of the current first candidate user meets the first preset requirement, determining a set of interactive users having an interactive relationship with the current first candidate user; At least one candidate user in the interactive user set is sorted in reverse order according to the number of interactive contents with the current first candidate user, and each candidate user in the at least one candidate user is sequentially used as the current second candidate user to perform the following second operation: In response to determining that the number of at least one interactive content of the current first candidate user meets the first preset requirement, adding both the current first candidate user and the current second candidate user to a user set, and adding the interactive content between the current first candidate user and the current second candidate user to a user interactive content set; and Based on the user set and the user interaction content set, the plurality of user interaction contents between the plurality of users are determined.

9. The method according to claim 8, in, Determining the content of multiple user interactions between multiple users also includes: After the second operation is performed on each candidate user, in response to the current user interaction content set satisfying a second preset requirement, the second operation is skipped for the remaining candidate users among the multiple candidate users.

10. The method according to claim 8, in, In response to determining that the user set meets a third preset requirement, the plurality of user interaction contents between the plurality of users are determined based on the user set and the user interaction content set.

11. The method according to any one of claims 1 to 3, in, The user interaction relationship represents the reply relationship between the publishing user of the corresponding user interaction content and other users.

12. The method according to any one of claims 1 to 3, in, The user interactive content includes at least one of text content, image content and video content.

13. A device for generating a video based on user interaction content, include: A determining unit configured to determine a plurality of user interaction contents between a plurality of users, wherein each of the plurality of user interaction contents has a corresponding user interaction relationship; A first generating unit is configured to generate a video script using a large language model based on the multiple user interaction contents and the user interaction relationships corresponding to the multiple user interaction contents, wherein the video script includes multiple characters and multiple lines corresponding to the multiple users, the multiple lines include at least one line of each of the multiple characters, and each of the multiple lines has a corresponding character interaction relationship; An acquisition unit, configured to acquire visual materials and audios respectively corresponding to the plurality of lines based on the video script; as well as The second generating unit is configured to generate a target video based on the visual materials and audios respectively corresponding to the plurality of lines.

14. The device according to claim 13, in, The acquisition unit comprises: A first acquisition subunit is configured to acquire basic information of each user among the multiple users; A first generating subunit is configured to generate a basic virtual image of the user based on the basic information of the user by using a text graph model; and The second generating subunit is configured to generate visual materials corresponding to at least one line of the character corresponding to the user based on the basic virtual image of the user.

15. The device according to claim 14, in, The second generating subunit is configured to generate, for each of at least one line of the character corresponding to the user, a dialogue virtual image of the user for the line based on the line and the basic virtual image of the user using the text graph model to obtain visual materials corresponding to the line.

16. The device according to any one of claims 13 to 15, further comprising: include: The replacement unit is configured to rewrite each of the multiple lines into a target line with a character style of the narrator of the line in the order in which the multiple lines occur, and replace the line with the target line.

17. The device according to claim 16, in, The target lines are obtained by rewriting the lines based on other lines before the lines using the character style model of the narrating character, and the character style model of the narrating character is obtained by fine-tuning a large language model using the historical corpus of the narrating character.

18. The device according to claim 17, in, The other lines include at least one line before the line of other characters indicated by the character interaction relationship of the line.

19. The device according to claim 16, in, The target lines are obtained by rewriting the lines based on the character style model of the narrating character and the character style prompt text of the narrating character of the lines and other lines before the lines.

20. The device according to any one of claims 13 to 15, in, The determining unit comprises: A first determining subunit is configured to determine a plurality of candidate users and at least one interactive content of each of the plurality of candidate users; A first sorting unit is configured to sort the multiple candidate users in reverse order according to the number of interactive contents, and sequentially use each of the multiple candidate users as a current first candidate user to perform the following first operation; A second determining subunit is configured to determine a set of interactive users having an interactive relationship with the current first candidate user in response to determining that the number of at least one interactive content of the current first candidate user meets a first preset requirement; A second sorting unit is configured to sort at least one candidate user in the interactive user set in reverse order according to the number of interactive contents with the current first candidate user, and sequentially use each candidate user in the at least one candidate user as a current second candidate user to perform the following second operation; A third determining subunit is configured to, in response to determining that the number of at least one interactive content of the current first candidate user meets a first preset requirement, add both the current first candidate user and the current second candidate user to a user set, and add the interactive content between the current first candidate user and the current second candidate user to a user interactive content set; and The fourth determining subunit is configured to determine the plurality of user interaction contents between the plurality of users based on the user set and the user interaction content set.

21. The device according to claim 20, in, The determining unit further includes: The skipping unit is configured to, after executing the second operation for each candidate user, skip executing the second operation for the remaining candidate users among the multiple candidate users in response to the current user interaction content set satisfying a second preset requirement.

22. The device according to claim 20, in, In response to determining that the user set meets a third preset requirement, the plurality of user interaction contents between the plurality of users are determined based on the user set and the user interaction content set.

23. The device according to any one of claims 13 to 15, in, The user interaction relationship represents the reply relationship between the publishing user of the corresponding user interaction content and other users.

24. The device according to any one of claims 13 to 15, in, The user interactive content includes at least one of text content, image content and video content.

25. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively coupled 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 to enable the at least one processor to perform the method according to any one of claims 1 to 12.

26. A non-transitory computer-readable storage medium storing computer instructions, It is characterized in that The computer instructions are used to cause the computer to execute the method according to any one of claims 1-12.

27. A computer program product comprising a computer program, in, When the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.

Citation Information

Cited By

  • Artificial intelligence (AI)-based customized storytelling video generation system

    US12664710B1

  • Method and apparatus for creating interactive multimedia content, and device and storage medium

    WO2025227336A1