Script generation method and related apparatus
By receiving user input through a server to generate script outlines and plot points, and automatically generating the script using character intentions, the problem of low script creation efficiency is solved, achieving automated script generation and saving manpower and resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN RENMA INTERACTIVE TECH CO LTD
- Filing Date
- 2023-08-29
- Publication Date
- 2026-05-05
AI Technical Summary
The scriptwriting process requires a large amount of human intervention, resulting in low efficiency and high costs, and existing technologies make it difficult to automate the generation process.
The system receives user input via a server, generates a story outline and plot points for the script, and automatically generates plot points and text content based on the characters' intentions, thus achieving automated script creation.
It improves scriptwriting efficiency, saves creation costs, and can automatically generate multiple plot nodes based on user input.
Smart Images

Figure CN117149971B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, specifically relating to a script generation method and related apparatus. Background Technology
[0002] With the development of technology, people are able to use various smart devices to help them complete their creative work. However, in each stage of scriptwriting, manual creation and arrangement are still required, which consumes a lot of human and material resources and has low efficiency. The process of creating a script is lengthy. Summary of the Invention
[0003] This application provides a script generation method and related apparatus, which can generate multiple plot nodes of a script based on user input, thereby automatically generating the script, which is beneficial to improving script creation efficiency and saving script creation costs.
[0004] In a first aspect, embodiments of this application provide a script generation method, applied to a server, wherein the server is communicatively connected to a terminal device; the method includes:
[0005] Receive first user input from the terminal device;
[0006] Based on the first user's input, generate a story outline for the target script;
[0007] Based on the story outline, generate the first plot node of the target script;
[0008] Based on the first plot node and the story outline, multiple character intentions are determined, wherein the character intentions are the intentions used to guide the first plot node toward a fixed plot development direction;
[0009] Based on the first character's intention and the first plot node, a second plot node of the target script is generated, wherein the first character's intention is any one of the plurality of character intentions;
[0010] Based on the first plot node, the second plot node, and the first character's intention, generate target text content associated with the first character's intention.
[0011] Secondly, embodiments of this application provide a script generation apparatus applied to a server, the server being communicatively connected to a terminal device; the script generation apparatus includes: an acquisition unit, a determination unit, and a control unit, wherein...
[0012] The receiving unit is used to receive first user input content from the terminal device;
[0013] The generation unit is used to generate a story outline for the target script based on the input content from the first user.
[0014] The generation unit is also used to generate the first plot node of the target script based on the story outline;
[0015] The determining unit is used to determine the intentions of multiple characters based on the first plot node and the story outline, wherein the character intentions are the intentions used to guide the first plot node toward a fixed plot development direction;
[0016] The generation unit is further configured to generate a second plot node of the target script based on the first character's intention and the first plot node, wherein the first character's intention is any one of the plurality of character intentions;
[0017] The generation unit is further configured to generate target text content associated with the first character's intention based on the first plot node, the second plot node, and the first character's intention.
[0018] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and one or more programs, the one or more programs being stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps in the first aspect of embodiments of this application.
[0019] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implement the steps in the first aspect of embodiments of this application.
[0020] Fifthly, embodiments of this application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform some or all of the steps described in the first aspect of embodiments of this application.
[0021] As can be seen from this embodiment, the server first receives first user input from the terminal device, then generates a story outline for the target script based on the first user input, followed by generating a first plot node for the target script based on the story outline. Further, based on the first plot node and the story outline, multiple character intentions are determined. These character intentions are used to guide the first plot node towards a fixed plot development direction. Next, based on the first character intention and the first plot node, a second plot node for the target script is generated. The first character intention can be any one of the multiple character intentions. Finally, based on the first plot node, the second plot node, and the first character intention, text content connecting the first and second plot nodes is generated. In this way, multiple plot nodes of the script can be generated based on user input, achieving automatic script generation, which is beneficial for improving script creation efficiency and saving script creation costs. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of the architecture of a script generation system provided in an embodiment of this application;
[0024] Figure 2 This is a flowchart illustrating a script generation method provided in an embodiment of this application;
[0025] Figure 3 This is a structural block diagram of an electronic device provided in an embodiment of this application;
[0026] Figure 4 This is a block diagram of the functional units of a script generation device 400 provided in an embodiment of this application. Detailed Implementation
[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0028] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0029] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0030] In the embodiments of this application, "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone; A and B exist simultaneously; B exists alone. Among them, A and B can be singular or plural.
[0031] In this embodiment, the symbol " / " can indicate that the preceding and following objects are in an "or" relationship. Alternatively, the symbol " / " can also represent a division sign, i.e., performing a division operation. For example, A / B can mean A divided by B.
[0032] In the embodiments of this application, "at least one item" or its similar expression refers to any combination of these items, including any combination of a single item or a plurality of items. "One or more" means one or more, while "multiple" means two or more. For example, "at least one item" of a, b, or c can represent the following seven cases: a, b, c; a and b; a and c; b and c; a, b, and c. Each of a, b, and c can be an element or a set containing one or more elements.
[0033] In the embodiments of this application, "equal to" can be used with "greater than" and is applicable to technical solutions used when "greater than" is used; it can also be used with "less than" and is applicable to technical solutions used when "less than" is used. When "equal to" is used with "greater than", it is not used with "less than"; when "equal to" is used with "less than", it is not used with "greater than".
[0034] To better understand the solutions of the embodiments of this application, the electronic devices, related concepts and background that may be involved in the embodiments of this application will be introduced below.
[0035] The electronic devices involved in the embodiments of this application may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices, or other processing devices connected to a wireless modem with wireless communication capabilities, as well as various forms of user equipment (UE), mobile station (MS), terminal device, etc. For ease of description, the devices mentioned above are collectively referred to as electronic devices. Electronic devices may also include intelligent photovoltaic controllers in solar-powered ship energy storage systems.
[0036] Please see Figure 1 , Figure 1 This is a schematic diagram of the architecture of a script generation system provided in an embodiment of this application. For example... Figure 1 As shown, the system includes a server 101 and a terminal device 102, and the server 101 and the terminal device 102 are communicatively connected.
[0037] The server 101 can receive the first user input content and the second user input content sent by the terminal device 102.
[0038] In one possible example, server 101 first receives first user input from terminal device 102. Then, based on the first user input, server 101 generates a story outline for the target script. Next, based on the story outline, server 101 generates the first plot node of the target script. Further, based on the first plot node and the story outline, server 101 determines multiple character intentions, which are intentions used to guide the first plot node towards a fixed plot development direction. Then, based on the first character intention and the first plot node, server 101 generates a second plot node for the target script. The first character intention can be any one of the multiple character intentions. Finally, based on the first plot node, the second plot node, and the first character intention, server 101 generates text content connecting the first and second plot nodes. In this way, server 101 can generate multiple plot nodes of the script based on user input, achieving automatic script generation, which improves script creation efficiency and saves script creation costs.
[0039] Please see Figure 2 , Figure 2 This is a flowchart illustrating a script generation method provided in an embodiment of this application, applied to a server, wherein the server is communicatively connected to a terminal device, and the method includes:
[0040] Step S201: Receive first user input content from the terminal device.
[0041] The first user input can be voice or text input by the user on the terminal device, including but not limited to character settings, story background settings, plot settings, story meaning settings, story type settings, story style settings, script name settings, etc. The server can also send preset templates of character settings, story background settings, plot settings, story meaning settings, story type settings, story style settings, script name settings, etc. for the user to choose from.
[0042] Step S202: Generate a story outline for the target script based on the first user input.
[0043] The story outline includes, but is not limited to, the script title, script theme, character introductions, story background, and story synopsis.
[0044] Step S203: Generate the first plot node of the target script based on the story outline.
[0045] The target script includes multiple plot nodes and the corresponding text content for each plot node. The first plot node is the opening plot node of the target script, and the content of the first plot node may include background information text and situational event text.
[0046] Step S204: Based on the first plot node and the story outline, determine multiple character intentions, whereby the character intentions are the intentions used to guide the first plot node toward a fixed plot development direction.
[0047] Here, "character intention" refers to the protagonist's intention. Different character intentions among multiple character intentions can guide the first plot node towards different or the same plot development direction. For example, the protagonist is Zhang San. Zhang San comes to Restaurant B in City A to investigate a case. He meets Li Si at Restaurant B, and they hit it off and work together to investigate the case, discovering clues in City C. At this point, the protagonist's intention, i.e., the character intention, can include two intentions: going to City C alone to continue the investigation or going to City C with Li Si to continue the investigation. Step S205: Based on the first character intention and the first plot node, generate the second plot node of the target script. The first character intention is any one of the multiple character intentions.
[0048] The second plot node is a lower-level plot node of the first plot node, and each character's intention corresponds to a lower-level plot node of the first plot node.
[0049] Step S206: Generate target text content associated with the first character's intention based on the first plot node, the second plot node, and the first character's intention.
[0050] The target text content refers to the response text content related to the first character's intention. For example, when the first plot node is "Zhang San comes to Restaurant B in City A to investigate a case, meets Li Si at Restaurant B, hits off immediately, and works together to investigate the case, discovering clues in City C," and the second plot node is "Zhang San and Li Si are attacked in City C, and after a fight, the two manage to escape," the target text content could be "Zhang San chooses to go to City C with Li Si to investigate the case." When the first plot node is "Zhang San comes to Restaurant B in City A to investigate a case, meets Li Si at Restaurant B, hits off immediately, and works together to investigate the case, discovering clues in City C," and the second plot node is "Zhang San comes to City C alone and is attacked, Li Si secretly follows Zhang San and helps Zhang San escape," the target text content could be "Zhang San chooses to go to City C alone to investigate the case."
[0051] Once the target script is generated, when it is used as an interactive work, the user's selected or input content can represent the aforementioned character's intention, enabling a jump from a higher-level plot node to a lower-level plot node. For example, if the first plot node is "Zhang San comes to Restaurant B in City A to investigate a case, meets Li Si at Restaurant B, hits off immediately, and works together to investigate the case, discovering clues in City C," and at the end of the first plot node, the user selects or inputs "chooses to go to City C with Li Si to investigate the case," then the user can jump from the first plot node to the second plot node "Zhang San and Li Si are attacked in City C, and after a fight, the two manage to escape." In addition, fallback and expansion intentions can be set. A fallback intention is the default intention to guide the user's input from the higher-level plot node to the lower-level plot node when the user's input is not one of the aforementioned character intentions. This fallback intention can be content unrelated to the plot or without practical significance. For example, if the first plot node is the higher-level plot node and the second plot node is the lower-level plot node, and the first plot node is "Zhang San comes to Restaurant B in City A to investigate a case, meets Li Si at Restaurant B, they hit it off and work together to investigate the case, discovering clues in City C," and at the end of the first plot node, the user inputs "go to City D for sightseeing," then the server, recognizing that the user's input is not one of the aforementioned character intentions, cannot determine which lower-level plot node to jump to from the first plot node, and therefore defaults to starting from the first... The plot node jumps to the second plot node. Expanded intent refers to the intent in the target script, in addition to the aforementioned character intents, to guide the development of the upper-level plot node towards the lower-level plot node. Considering the diversity of user input, the intent to jump from the upper-level plot node to the lower-level plot node should be expanded based on the original character intents. For example, the first plot point in the generated target script is "Zhang San asked me to go to dinner," and the second plot node is "I didn't go to dinner with Zhang San, I went hiking." The first plot point is the upper-level plot point, and the second plot point is the lower-level plot point. The first character intent when generating the target script includes: a. Li Si asked me to go hiking; b. I've already eaten; expandable intents include: c. I have no appetite; d. I'm not familiar with you; e. I've already made plans to go hiking with Li Si, etc.
[0052] As can be seen from this embodiment, the server first receives first user input from the terminal device, then generates a story outline for the target script based on the first user input, followed by generating a first plot node for the target script based on the story outline. Further, based on the first plot node and the story outline, multiple character intentions are determined. These character intentions are used to guide the first plot node towards a fixed plot development direction. Next, based on the first character intention and the first plot node, a second plot node for the target script is generated. The first character intention can be any one of the multiple character intentions. Finally, based on the first plot node, the second plot node, and the first character intention, text content connecting the first and second plot nodes is generated. In this way, multiple plot nodes of the script can be generated based on user input, achieving automatic script generation, which is beneficial for improving script creation efficiency and saving script creation costs.
[0053] In one possible example, regarding the step of generating a story outline for a target script based on the first user input, the above method may include the following steps: determining a story type, story theme, character information, story background, and plot information based on the first user input; selecting target parameters from a plurality of preset parameters based on the story type and the story theme; and generating the story outline for the target script based on the target parameters, the story background, the character information, and the plot information.
[0054] The server stores multiple preset parameters, which differ in the narrative style, narrative approach, script title setting style, and story background of the generated story outline. For example, the narrative style corresponding to a comedy story type is light and cheerful, and the script title can be a fun and festive name, such as "Cute Little Seven". The narrative style corresponding to a horror story type is oppressive and terrifying, and the script title can be a horror name, such as "Dead Corpse". The preset parameters can be set manually or by system default, and there are no restrictions here.
[0055] The story types include, but are not limited to, love stories, coming-of-age stories, suspense stories, horror stories, comedy stories, adventure stories, science fiction stories, war stories, fantasy stories, mystery stories, crime stories, tragedy stories, historical stories, fairy tales, social stories, mythology stories, and biographical stories; the story themes include, but are not limited to, family, friendship, love, friendship, religious beliefs, life beliefs, ideals and reality, setbacks and successes, perseverance and giving up, attitudes towards life, dignity and value, good and evil in human nature, courage, and honor; the character information includes, but is not limited to, character name, character gender, character personality, character appearance, character preferences, and character background.
[0056] In practice, the text content of the story outline is generated based on the target parameters and character information, story background, and plot information. The text content consists of five parts: script title, script theme, character introduction, story background, and story synopsis.
[0057] As can be seen in this example, the server can generate a story outline based on the first user's input, which is beneficial for subsequent generation of plot nodes in the target script and improves the efficiency of script generation.
[0058] In one possible example, where the first plot node includes first plot content and second plot content, the above method may include the following steps: generating the first plot content of the first plot node based on the story background; determining a target scenario event based on the story outline, the target scenario event being an event that introduces a character in the target script; and generating the second plot content of the first plot node based on the target scenario event.
[0059] The first plot content can be text introducing the story's background, while the second plot content can be text about situational events. Situational events are events that drive the story's development. For example, if the target script tells the story of Zhang San, Li Si, and Wang Wu's adventures in the martial arts world, the target situational event for the first plot node could be the event in which the three meet. For instance, the two brothers, Zhang San and Li Si, have a conflict with Wang Wu in a restaurant, but the three are unexpectedly drawn into a shocking case. Driven by their sense of justice, the three become friends after their initial conflict and team up to solve the case.
[0060] In practice, the first plot content and the second plot content of the first plot node are generated based on the story background and the target scenario events.
[0061] As can be seen in this example, the server can automatically generate the first plot node of the target script based on the story outline, which is beneficial to improving script creation efficiency and saving script creation costs.
[0062] In one possible example, when determining multiple character intentions based on the first plot node and the story outline, the above method may include the following steps: determining multiple story conflicts of the target script based on the story outline; filtering at least one target story conflict associated with the first plot node from the multiple story conflicts; and determining the multiple character intentions based on the at least one target story conflict and the first plot node.
[0063] Among them, story conflict is the obstacle that hinders a character from achieving their goal. For example, the character Zhang San in the story has always aimed to build a flying car, but he has three competitors who are also building flying cars. The story conflict is the conflict between these three competitors. Story conflict includes conflicts between people, the environment, and the self.
[0064] Among them, the target story conflict corresponds to one or more character intentions. For example, if the target story conflict is that Zhang San kills Li Si, Zhang San's character intentions to resolve the target story conflict could be to become an apprentice, purchase powerful equipment, or hire an assassin.
[0065] As can be seen in this example, the server can determine the intentions of multiple characters based on the first plot node and the story outline, which is beneficial for generating plot nodes of the target script, improving script creation efficiency, and saving script creation costs.
[0066] In one possible example, after generating the second plot node of the target script based on the first character's intention and the first plot node, the above method may include the following steps: scoring the reasonableness of using the second plot node as the third plot node to be generated based on the second character's intention, the first plot node, and the second plot node, to obtain a target score, wherein the second character's intention is any one of the plurality of character intentions other than the first character's intention; determining whether the target score is greater than a preset score threshold; if it is determined that the target score is greater than the preset score threshold, then using the second plot node as the third plot node; if it is determined that the target score is less than or equal to the preset score threshold, then generating the third plot node of the target script based on the second character's intention and the first plot node.
[0067] Among them, the third plot node is the next level plot node after the first plot node, the plot node developed based on the second character's intention based on the first plot node, and the plot node of the same level as the second plot node. Different plot nodes of the same level are plot nodes generated based on the same upper-level plot node according to the different character intentions.
[0068] The preset score threshold can be set manually or by system default, and is not limited here. In some embodiments, when the full score is 10 points, the preset score threshold can be 7 points. The reasonableness of using the second plot node as the third plot node to be generated can be scored by the language big data model GPT.
[0069] When generating new story nodes at the same level, if there are multiple historical story nodes at the same level that have already been generated, the reasonableness of each historical story node at the same level as a new story node at the same level can be scored to obtain multiple first scores. At least one first score that is greater than a preset score threshold is selected, and the at least one first score is sorted from highest to lowest to determine the historical story node with the highest score. The historical story node with the highest score is directly used as a new story node at the same level, saving the cost of generating new story node content at the same level.
[0070] For example, the first character's intention is to find Li Si first and then Wang Wu, while the second character's intention is to find Wang Wu first and then Li Si. However, the next level of plot nodes generated based on the first and second character's intentions can both involve finding Li Si and Wang Wu traveling together in City A. In this case, plot nodes with the same content at the next level are generated based on different character intentions.
[0071] As can be seen in this example, the server can assess the rationality of using the second plot node as the third plot node to be generated. When the target score is found to be greater than the preset score threshold, the second plot node can be directly used as the third plot node, which helps to reduce logical conflicts in the generated script and improve the efficiency and accuracy of script generation.
[0072] In one possible example, after determining whether the target score is greater than a preset score threshold, the above method may include the following steps: determining whether the third plot node is the end of the plot; if the third plot node is determined to be the end of the plot, then generating a fourth plot node of the target script based on the third character's intention and the first plot node, wherein the third character's intention is any one of the plurality of character intentions other than the first character's intention and the second character's intention; if the third plot node is determined not to be the end of the plot, then determining a target character's intention based on the third plot node and the story outline, wherein the target character's intention is the intention that guides the plot development direction of the third plot node; and generating a fifth plot node associated with the third plot node based on the target character's intention and the third plot node.
[0073] When generating a new plot node based on a character's intention, it is necessary to determine whether the new plot node is the end of the plot. If it is the end of the plot, the process goes back to the previous plot node and generates other plot nodes at the next level of the previous plot node. If the new plot node is not the end of the plot, the new character's intention for the new plot node is determined, and plot nodes at the next level of the new plot node are generated based on the new character's intention, until all plot nodes of the target script are generated, thus completing the generation of the entire target script.
[0074] Specifically, when it is determined that the target score is less than or equal to the preset score threshold, it means that the already generated second plot node cannot be directly used as the third plot node. In this case, a plot node of the same level with different content from the second plot node is generated, namely the third plot node. The second plot node, the third plot node and the fourth plot node are plot nodes of the same level, and the fifth plot node is the plot node of the next level of the third plot node.
[0075] Among them, a large language model is used to determine whether the third plot node is the end or conclusion of the plot.
[0076] As can be seen in this example, the server can determine whether the newly generated third plot node is the end of the plot, and decide whether to generate other plot nodes at the same level or generate plot nodes at the next level, which helps to improve the completeness of the created script.
[0077] In one possible example, after generating target text content associated with the first character's intent based on the first plot node, the second plot node, and the first character's intent, the above method may further include the following steps: receiving second user input content from the terminal device; determining plot keywords based on the second user input content; and adjusting the first plot node based on the plot keywords to obtain the adjusted first plot node.
[0078] Among them, plot keywords include, but are not limited to, character names, locations, times, and events.
[0079] The server can send the text content of the first and second plot nodes of the target script to the terminal device. After the user sees the generated text content of the first and second plot nodes, if the user feels that there are plot logic errors in the first and second plot nodes, or that the content needs to be added or deleted, the user can send second user input content, including modification suggestions, to the server through the terminal device.
[0080] For example, the first plot node provides content such as Zhang San and Li Si having vastly different backgrounds but meeting for no apparent reason. The user feels the need to add more plot to depict Zhang San and Li Si's meeting and sends a second user input via the terminal device. The second user input is that Zhang San and Li Si have a conflict in a restaurant, but their initial encounter leads to a deep friendship. The server extracts plot keywords including Zhang San, Li Si, restaurant, and conflict, and adjusts the content of the existing first plot node based on these keywords to obtain the aforementioned plot that the user wants to add.
[0081] As can be seen in this example, the server can adjust the generated plot nodes based on the second user's input, which helps to improve the accuracy and completeness of the generated script.
[0082] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, applied to a server, wherein the server is communicatively connected to a terminal device; as shown. Figure 3 As shown, the electronic device includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs are configured to be executed by the processor according to the following instructions:
[0083] Receive first user input from the terminal device;
[0084] Based on the first user's input, generate a story outline for the target script;
[0085] Based on the story outline, generate the first plot node of the target script;
[0086] Based on the first plot node and the story outline, multiple character intentions are determined, wherein the character intentions are the intentions used to guide the first plot node toward a fixed plot development direction;
[0087] Based on the first character's intention and the first plot node, a second plot node of the target script is generated, wherein the first character's intention is any one of the plurality of character intentions;
[0088] Based on the first plot node, the second plot node, and the first character's intention, generate target text content associated with the first character's intention.
[0089] As can be seen, in this embodiment, the electronic device first receives first user input from a terminal device, then generates a story outline for the target script based on the first user input, followed by generating a first plot node for the target script based on the story outline. Further, based on the first plot node and the story outline, multiple character intentions are determined. These character intentions are used to guide the first plot node towards a fixed plot development direction. Then, based on the first character intention and the first plot node, a second plot node for the target script is generated. The first character intention can be any one of the multiple character intentions. Finally, based on the first plot node, the second plot node, and the first character intention, text content connecting the first and second plot nodes is generated. In this way, multiple plot nodes of the script can be generated based on user input, achieving automatic script generation, which is beneficial for improving script creation efficiency and saving script creation costs.
[0090] In one possible example, regarding the generation of a story outline for the target script based on the first user input, the above-described procedure further includes instructions for performing the following steps:
[0091] Based on the first user input, determine the story type, story theme, character information, story background, and story plot information;
[0092] Based on the story type and the story theme, target parameters are selected from multiple preset parameters;
[0093] Based on the target parameters, the story background, the character information, and the plot information, a story outline for the target script is generated.
[0094] In one possible example, the first plot node includes first plot content and second plot content. Regarding generating the first plot node of the target script based on the story outline, the above procedure also includes instructions for performing the following steps:
[0095] Based on the aforementioned story background, generate the first story content for the first story node;
[0096] Based on the story outline, target scenario events are identified, which are events that introduce the characters in the target script;
[0097] Based on the target scenario event, the second plot content of the first plot node is generated.
[0098] In one possible example, regarding the determination of multiple character intentions based on the first plot node and the story outline, the above procedure includes instructions for performing the following steps:
[0099] Based on the story outline, identify multiple story conflicts in the target script;
[0100] Select at least one target story conflict that is associated with the first plot node from the plurality of story conflicts;
[0101] The intentions of the plurality of characters are determined based on the at least one target story conflict and the first plot node.
[0102] In one possible example, after generating a second plot node for the target script based on the first character's intention and the first plot node, the above procedure includes instructions for performing the following steps:
[0103] Based on the second character's intention, the first plot node, and the second plot node, the reasonableness of using the second plot node as the third plot node to be generated is scored to obtain a target score. The second character's intention is any one of the multiple character intentions other than the first character's intention.
[0104] Determine whether the target score is greater than a preset score threshold;
[0105] If it is determined that the target score is greater than the preset score threshold, then the second plot node is designated as the third plot node;
[0106] If it is determined that the target score is less than or equal to the preset score threshold, then the third plot node of the target script is generated based on the second character's intention and the first plot node.
[0107] In one possible example, after the third plot node of the generated target scenario is described, the above procedure includes instructions for performing the following steps:
[0108] Determine whether the third plot node is the end of the plot;
[0109] If the third plot node is determined to be the end of the plot, then the fourth plot node of the target script is generated based on the third character's intention and the first plot node. The third character's intention is any one of the multiple character intentions other than the first character's intention and the second character's intention.
[0110] If it is determined that the third plot node is not the end of the plot, then based on the third plot node and the story outline, the intention of the target character is determined, and the intention of the target character is the intention to guide the plot development direction of the third plot node.
[0111] Based on the target character's intent and the third plot node, a fifth plot node associated with the third plot node is generated.
[0112] In one possible example, after generating the target text content associated with the first character's intention based on the first plot node, the second plot node, and the first character's intention, the above procedure includes instructions for performing the following steps:
[0113] Receive second user input from the terminal device;
[0114] Based on the second user input, determine the plot keywords;
[0115] Based on the plot keywords, the first plot node is adjusted to obtain the adjusted first plot node.
[0116] The above mainly describes the solutions of the embodiments of this application from the perspective of the method execution process. It is understood that, in order to achieve the above functions, the electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments provided herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0117] This application embodiment can divide the electronic device into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0118] When dividing each function into modules according to its corresponding function. Figure 4 A functional unit block diagram of a script generation device 400 is given, such as... Figure 4 As shown, the script generation device 400 is applied to a server, which is communicatively connected to a terminal device; the script generation device 400 includes: a receiving unit 401, a generation unit 402, a determining unit 403, and an adjusting unit 404, wherein...
[0119] The receiving unit 401 is used to receive first user input content from the terminal device;
[0120] The generation unit 402 is used to generate a story outline of the target script based on the first user input.
[0121] The generation unit 402 is further configured to generate a first plot node of the target script based on the story outline;
[0122] The determining unit 403 is used to determine multiple character intentions based on the first plot node and the story outline, wherein the character intentions are intentions used to guide the first plot node toward a fixed plot development direction;
[0123] The generation unit 402 is further configured to generate a second plot node of the target script based on the first character's intention and the first plot node, wherein the first character's intention is any one of the plurality of character intentions;
[0124] The generation unit 402 is further configured to generate target text content associated with the first character's intention based on the first plot node, the second plot node, and the first character's intention.
[0125] As can be seen, the script generation apparatus described in this application first receives first user input from a terminal device, then generates a story outline for the target script based on the first user input, then generates a first plot node for the target script based on the story outline, further determines multiple character intentions based on the first plot node and the story outline, whereby character intentions are intentions used to guide the first plot node towards a fixed plot development direction, then generates a second plot node for the target script based on the first character intention and the first plot node, whereby the first character intention is any one of the multiple character intentions, and finally generates text content connecting the first plot node and the second plot node based on the first plot node, the second plot node, and the first character intention. In this way, multiple plot nodes of the script can be generated based on user input, achieving automatic script generation, which is beneficial for improving script creation efficiency and saving script creation costs.
[0126] In one possible example, regarding the generation of a story outline for the target script based on the first user input, the generation unit 402 is specifically configured to:
[0127] Based on the first user input, determine the story type, story theme, character information, story background, and story plot information;
[0128] Based on the story type and the story theme, target parameters are selected from multiple preset parameters;
[0129] Based on the target parameters, the story background, the character information, and the plot information, a story outline for the target script is generated.
[0130] In one possible example, the first plot node includes first plot content and second plot content. Regarding the generation of the first plot node of the target script based on the story outline, the generation unit 402 is specifically used for:
[0131] Based on the aforementioned story background, generate the first story content for the first story node;
[0132] Based on the story outline, target scenario events are identified, which are events that introduce the characters in the target script;
[0133] Based on the target scenario event, the second plot content of the first plot node is generated.
[0134] In one possible example, regarding the determination of multiple character intentions based on the first plot node and the story outline, the determining unit 403 is specifically used for:
[0135] Based on the story outline, identify multiple story conflicts in the target script;
[0136] Select at least one target story conflict that is associated with the first plot node from the plurality of story conflicts;
[0137] The intentions of the plurality of characters are determined based on the at least one target story conflict and the first plot node.
[0138] In one possible example, after generating a second plot node for the target script based on the first character's intention and the first plot node, the generation unit 402 is specifically used for:
[0139] Based on the second character's intention, the first plot node, and the second plot node, the reasonableness of using the second plot node as the third plot node to be generated is scored to obtain a target score. The second character's intention is any one of the multiple character intentions other than the first character's intention.
[0140] Determine whether the target score is greater than a preset score threshold;
[0141] If it is determined that the target score is greater than the preset score threshold, then the second plot node is designated as the third plot node;
[0142] If it is determined that the target score is less than or equal to the preset score threshold, then the third plot node of the target script is generated based on the second character's intention and the first plot node.
[0143] In one possible example, after the third plot node of the target script is generated, the generation unit 402 is specifically used for:
[0144] Determine whether the third plot node is the end of the plot;
[0145] If the third plot node is determined to be the end of the plot, then the fourth plot node of the target script is generated based on the third character's intention and the first plot node. The third character's intention is any one of the multiple character intentions other than the first character's intention and the second character's intention.
[0146] If it is determined that the third plot node is not the end of the plot, then based on the third plot node and the story outline, the intention of the target character is determined, and the intention of the target character is the intention to guide the plot development direction of the third plot node.
[0147] Based on the target character's intent and the third plot node, a fifth plot node associated with the third plot node is generated.
[0148] In one possible example, after generating the target text content associated with the first character's intention based on the first plot node, the second plot node, and the first character's intention, the adjustment unit 404 is specifically used for:
[0149] Receive second user input from the terminal device;
[0150] Based on the second user input, determine the plot keywords;
[0151] Based on the plot keywords, the first plot node is adjusted to obtain the adjusted first plot node.
[0152] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0153] The electronic device provided in this embodiment is used to execute the above-described script generation method, and therefore can achieve the same effect as the above-described implementation method.
[0154] When using integrated units, the electronic device may include a processing module, a storage module, and a communication module. The processing module can be used to control and manage the actions of the electronic device; for example, it can support the electronic device in executing the steps performed by the receiving unit 401, the generating unit 402, the determining unit 403, and the adjusting unit 404. The storage module can support the electronic device in executing stored program code and data. The communication module can support communication between the electronic device and other devices.
[0155] The processing module can be a processor or a controller. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, or other devices that interact with other electronic devices.
[0156] This application also provides a computer storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes an electronic device.
[0157] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer includes a control platform.
[0158] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0159] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0160] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0161] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0162] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0163] If the integrated units described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0164] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc.
[0165] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A script generation method, characterized in that, The method is applied to a server, which is communicatively connected to a terminal device; the method includes: Receive first user input from the terminal device; Based on the first user input, determine the story type, story theme, character information, story background, and story plot information; Based on the story type and the story theme, target parameters are selected from multiple preset parameters; Based on the target parameters, the story background, the character information, and the story plot information, a story outline for the target script is generated. Based on the aforementioned story background, generate the first story content for the first story node; Based on the story outline, target scenario events are identified, which are events that introduce the characters in the target script; Based on the target scenario event, generate the second plot content of the first plot node; Based on the story outline, identify multiple story conflicts in the target script; Select at least one target story conflict that is associated with the first plot node from the plurality of story conflicts; Based on the at least one target story conflict and the first plot node, multiple character intentions are determined, wherein the character intentions are intentions used to guide the first plot node toward a fixed plot development direction; Based on the first character's intention and the first plot node, a second plot node of the target script is generated, wherein the first character's intention is any one of the plurality of character intentions; Based on the first plot node, the second plot node, and the first character's intention, generate target text content associated with the first character's intention.
2. The method according to claim 1, characterized in that, After generating the second plot node of the target script based on the first character's intention and the first plot node, the method further includes: Based on the second character's intention, the first plot node, and the second plot node, the reasonableness of using the second plot node as the third plot node to be generated is scored to obtain a target score. The second character's intention is any one of the multiple character intentions other than the first character's intention. Determine whether the target score is greater than a preset score threshold; If it is determined that the target score is greater than the preset score threshold, then the second plot node is designated as the third plot node; If it is determined that the target score is less than or equal to the preset score threshold, then the third plot node of the target script is generated based on the second character's intention and the first plot node.
3. The method according to claim 2, characterized in that, After generating the third plot node of the target script, the method further includes: Determine whether the third plot node is the end of the plot; If the third plot node is determined to be the end of the plot, then the fourth plot node of the target script is generated based on the third character's intention and the first plot node. The third character's intention is any one of the multiple character intentions other than the first character's intention and the second character's intention. If it is determined that the third plot node is not the end of the plot, then based on the third plot node and the story outline, the intention of the target character is determined, and the intention of the target character is the intention to guide the plot development direction of the third plot node. Based on the target character's intent and the third plot node, a fifth plot node associated with the third plot node is generated.
4. The method according to claim 1, characterized in that, After generating target text content associated with the first character's intention based on the first plot node, the second plot node, and the first character's intention, the method further includes: Receive second user input from the terminal device; Based on the second user input, determine the plot keywords; Based on the plot keywords, the first plot node is adjusted to obtain the adjusted first plot node.
5. A script generation device, characterized in that, The application is to a server, which is communicatively connected to a terminal device; the script generation device includes: a receiving unit, a generating unit, and a determining unit, wherein, The receiving unit is used to receive first user input content from the terminal device; The generation unit is configured to determine the story type, story theme, character information, story background, and plot information based on the first user input; filter target parameters from multiple preset parameters based on the story type and the story theme; and generate a story outline for the target script based on the target parameters, the story background, the character information, and the plot information. The generation unit is further configured to generate first plot content for the first plot node based on the story background; determine a target scenario event based on the story outline, wherein the target scenario event is an event that introduces the character of the target script; and generate second plot content for the first plot node based on the target scenario event. The determining unit is configured to determine multiple story conflicts of the target script based on the story outline; select at least one target story conflict associated with the first plot node from the multiple story conflicts; and determine multiple character intentions based on the at least one target story conflict and the first plot node, wherein the character intentions are intentions used to guide the first plot node toward a fixed plot development direction. The generation unit is further configured to generate a second plot node of the target script based on the first character's intention and the first plot node, wherein the first character's intention is any one of the plurality of character intentions; The generation unit is further configured to generate target text content associated with the first character's intention based on the first plot node, the second plot node, and the first character's intention.
6. An electronic device, characterized in that, The device includes a processor, a memory, a communication interface, and one or more programs, said programs being stored in the memory and configured to be executed by the processor, said programs including instructions for performing the steps of the method as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, A computer program for storing electronic data interchange is provided, wherein the computer program causes a computer to perform the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Game work generation method and device, computer equipment and storage medium
CN113713394A
Intelligent plot generation method and device
CN116637375A