Story generation method and device, electronic equipment and storage medium

By obtaining the user's basic information and writing requirements, generating a story outline and supplementing details, the problems of low efficiency and uneven quality of traditional manual creation methods are solved, and intelligent and automated story generation is realized to ensure the logical, rational and detailed story text generated.

CN119761503AActive Publication Date: 2025-04-04YOUKU CULTURE TECH (BEIJING) CO LTD

Patent Information

Application Number
CN202411814168.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-04
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

Traditional artificial creation methods have problems of low efficiency and varying quality in story writing, which is difficult to meet people's growing reading needs.

Method used

By obtaining the user's basic information, including background information and writing requirements, determining auxiliary information, generating story outlines, supplementing story details, and evaluating multiple story texts, the target story text is finally determined.

Benefits of technology

It realizes intelligent and automated generation of story texts that meet users' creative needs, ensuring their logic, rationality and detail.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119761503A_ABST
    Figure CN119761503A_ABST
Patent Text Reader

Abstract

The invention relates to a story generation method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining the basic information of a to-be-generated story, and the background information comprises figure information and story preconditions; according to the basic information, auxiliary information is determined, and the auxiliary information comprises information influencing story development before and after the story; according to the basic information and the auxiliary information, generating at least one story infarction; supplementing story details for each story infarction in the at least one story infarction according to the auxiliary information to obtain a plurality of story texts corresponding to the at least one story infarction; evaluating each story text in the plurality of story texts to obtain an evaluation result of each story text, the evaluation result representing the quality degree of the story text; and determining a target story text according to the evaluation result of each story text in the plurality of story texts. In this way, the target story text which meets the creation requirements of the user, is detailed and is rich in logicality and rationality is intelligently and automatically generated.
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, and in particular to a story generation method and device, an electronic device, and a storage medium. Background Art

[0002] In today's information age, with the popularization of the Internet and the development of big data technology, people's demand for text information is growing. Story writing has a wide range of applications in various fields, such as novel writing and script writing. However, traditional manual creation methods often have problems such as low efficiency and low quality, which makes it difficult to meet people's growing reading needs. Summary of the invention

[0003] In view of this, the present disclosure proposes a story generation method and device, an electronic device and a storage medium, which can intelligently and automatically generate a target story text that is detailed, logical and reasonable and meets the user's creative needs.

[0004] According to one aspect of the present disclosure, a story generation method is provided, comprising: obtaining basic information of a story to be generated, the basic information comprising background information and writing requirements, the background information comprising character information and story antecedents; determining auxiliary information based on the basic information, the auxiliary information comprising information affecting the development of the story after the story antecedents; generating at least one story outline based on the basic information and the auxiliary information, the story outline being used to indicate an outline of the story plot developed after the story antecedents; supplementing story details for each story outline in the at least one story outline based on the auxiliary information, to obtain a plurality of story texts corresponding to the at least one story outline, wherein each story outline corresponds to at least one story text, and different story texts corresponding to each story outline have different story details; evaluating each story text in the plurality of story texts, to obtain an evaluation result for each story text, the evaluation result representing the quality of the story text; determining a target story text based on the evaluation result for each story text in the plurality of story texts.

[0005] In one possible implementation, the writing requirements are used to indicate the direction of the story to be generated; the auxiliary information includes at least one of character emotion information, character relationship information, story writing purpose and plot ending point, the character emotion information is used to indicate the emotional state and changes between characters, the character relationship information is used to indicate the relationship between characters, the story writing purpose is used to indicate the type of story to be generated, and the plot ending point is used to indicate the end node of the story development.

[0006] In a possible implementation, determining the auxiliary information based on the basic information includes: using a first language model to determine whether the writing requirement is reasonable; and extracting the auxiliary information from the basic information using a second language model when the first language model determines that the writing requirement is reasonable.

[0007] In a possible implementation, generating at least one story outline based on the basic information and the auxiliary information includes: looping through the following processing based on the basic information and the auxiliary information until the generated i-th target deduction plot reaches the plot ending point: using the third largest language model to generate a plurality of i-th deduction plots developed after the i-1-th target deduction plot based on the basic information, the auxiliary information and the i-1-th target deduction plot; wherein, i≥1, the 0th target deduction plot is the story background; using the fourth largest language model to filter out abnormal plots from the plurality of i-th deduction plots based on the auxiliary information to obtain at least one i-th target deduction plot; for any i-th target deduction plot that reaches the plot ending point, determining the deduction plots from the 1st target deduction plot to the i-th target deduction plot as the story outline; at least one i-th target deduction plot that reaches the plot ending point corresponds to at least one story outline.

[0008] In a possible implementation, the method of supplementing each of the at least one story outline with story details based on the auxiliary information to obtain a plurality of story texts corresponding to the at least one story outline includes: for any story outline, using the fifth language model to supplement the story outline with at least one story detail based on the auxiliary information to obtain at least one story text corresponding to the story outline; wherein the story details include at least one of the following: character's actions, expressions, dialogues, psychological states, purposes of behaviors, story background, locations, and environments.

[0009] In a possible implementation, the evaluating of each story text among the multiple story texts to obtain an evaluation result of each story text includes: for any story text, using the sixth language model to evaluate at least one story characteristic of the story text at least once according to the basic information and the auxiliary information, to obtain at least one evaluation score for each of the at least one story characteristic of the story text; taking an average of the at least one evaluation scores of each story characteristic as a characteristic evaluation result of each story characteristic, the evaluation result of the story text including the characteristic evaluation result of at least one story characteristic of the story text.

[0010] In one possible implementation, the story characteristics include at least one of the following: the degree to which the story is relevant to the title, the degree of completeness of the story, the degree of logical rigor, the degree of novelty of the plot, the degree of excitement of the plot, the degree of characterization, the degree of display of character relationships, the degree of display of character emotional changes, the degree of fictionality of character information, and the degree of dialogue description.

[0011] In a possible implementation, determining a target story text based on an evaluation result of each story text among the multiple story texts includes: determining a comprehensive evaluation result of each story text based on a characteristic evaluation result of at least one story characteristic of each story text among the multiple story texts; and determining a target story text based on the comprehensive evaluation result of each story text among the multiple story texts.

[0012] In a possible implementation, determining a target story text based on a comprehensive evaluation result of each story text among the multiple story texts includes: selecting a story text with the highest comprehensive evaluation result from the multiple story texts based on the comprehensive evaluation result of each story text among the multiple story texts; when the degree of fiction in the story characteristics corresponding to the selected story text indicates that there is fictional character information in the selected story text, removing the fictional character information existing in the selected story text based on the character information in the basic information to obtain a target story text; wherein the fictional character information is character information different from the character information in the basic information.

[0013] According to another aspect of the present disclosure, a story generation device is provided, comprising: an acquisition module, for acquiring basic information of a story to be generated, wherein the basic information comprises background information and writing requirements, wherein the background information comprises character information and a story context; a determination module, for determining auxiliary information according to the basic information, wherein the auxiliary information comprises information affecting the development of a story after the story context; a generation module, for generating at least one story outline according to the basic information and the auxiliary information, wherein the story outline is used to indicate an outline of a story plot developed after the story context; a supplementation module, for supplementing story details for each story outline in the at least one story outline according to the auxiliary information, and obtaining a plurality of story texts corresponding to the at least one story outline, wherein each story outline corresponds to at least one story text, and different story texts corresponding to each story outline have different story details; an evaluation module, for evaluating each story text in the plurality of story texts, and obtaining an evaluation result of each story text, wherein the evaluation result represents the quality of the story text; and a target determination module, for determining a target story text according to the evaluation result of each story text in the plurality of story texts.

[0014] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.

[0015] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.

[0016] According to another aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.

[0017] According to various aspects of the present disclosure, by generating auxiliary information based on basic information, generating a story outline based on the basic information and the auxiliary information, then supplementing the story outline with story details, and then evaluating the quality of the story text after the details are supplemented, and then determining the target story text based on the evaluation results of the quality, it is possible to intelligently and automatically generate a target story text that meets the user's creative needs and is relatively detailed, logical, and reasonable.

[0018] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.

[0020] Figure 1 A flowchart of a story generating method according to an embodiment of the present disclosure is shown.

[0021] Figure 2 A schematic diagram showing a story generation link according to an embodiment of the present disclosure is shown.

[0022] Figure 3 A block diagram of a story generating device according to an embodiment of the present disclosure is shown.

[0023] Figure 4 A block diagram of an electronic device 1900 according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0024] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0025] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0026] The term "and / or" herein is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent any one or more elements selected from the set consisting of A, B, and C. In the description of the present disclosure, "plurality" means two or more, unless otherwise clearly and specifically defined.

[0027] It should be understood that the terms "first", "second", etc. in the claims, specifications and drawings of the present disclosure are used to distinguish different objects rather than to describe a specific order. The terms "include" and "comprise" used in the specifications and claims of the present disclosure indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0028] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0029] The story generation method of the disclosed embodiment can be deployed on various terminal devices through software or hardware modification. The terminal device involved in the disclosed embodiment can refer to a device with a wireless connection function and / or a wired connection function. The wireless connection function refers to the ability to connect to other devices through wireless connection methods such as wifi and Bluetooth. The terminal device involved in the disclosed embodiment can also communicate with other devices through a wired connection function. The terminal device involved in the disclosed embodiment can be a touch screen, a non-touch screen, or a screenless device. The touch screen can control the terminal device by clicking and sliding on the display screen with a finger or a stylus. The non-touch screen device can be connected to an input device such as a mouse, a keyboard, a touch panel, and the terminal device is controlled by the input device. For example, the device without a screen can be a Bluetooth speaker without a screen. For example, the terminal device of the present application can include but is not limited to user equipment (UE), mobile devices, user terminals, terminals, handheld devices, tablet computers, laptops, PDAs, computing devices, etc.

[0030] The story generation method of the disclosed embodiment can also be deployed on a server, which can be located in the cloud or locally, and can be a physical device or a virtual device, such as a virtual machine, a container, etc., with a wireless communication function, wherein the wireless communication function can be set in the chip (system) or other parts or components of the server. It can refer to a device with a wireless connection function, and the wireless connection function refers to the ability to connect to other servers or terminal devices through wireless connection methods such as Wi-Fi and Bluetooth. The server involved in the disclosed embodiment can also have the function of communicating through a wired connection. For example, the server of the disclosed embodiment can be located in the cloud, communicate with the terminal device, receive the basic information of the story to be generated sent by the terminal device, and use the story generation method deployed on the server to generate the target story text based on the basic information, and return it to the terminal device to generate the target story text for the user in the terminal device.

[0031] Figure 1 A flowchart of a story generation method according to an embodiment of the present disclosure is shown. The method can be executed by an electronic device such as the above-mentioned terminal device or server, such as Figure 1 As shown, the method includes: step S11 to step S16.

[0032] In step S11, basic information of the story to be generated is obtained, wherein the basic information includes background information and writing requirements, and the background information includes character information and story context.

[0033] Among them, the writing requirements are used to indicate the direction of the story to be generated, which can be understood as the user's design requirements for the story to be generated, for example, it can include one or more of the characters to be included in the story to be generated, the relationship between the characters, the emotions of the characters, the key plots to be included in the story, the ending of the story, the nature of the story (such as tragedy or comedy), etc. The character information can include the identity characteristics of the character (such as name, gender, age, occupation, etc.), personality characteristics, relationship with other characters, etc., which are used to describe the character image. The story background can be understood as the background information of the story to be generated, or the above information.

[0034] It should be understood that the above-mentioned background information and writing requirements are exemplary basic information provided by the embodiment of the present disclosure. In fact, users can set the specific content of the background information and writing requirements according to their actual needs for story creation, and the embodiment of the present disclosure does not limit this.

[0035] In step S12, auxiliary information is determined based on the basic information, and the auxiliary information includes information that affects the development of the story after the story background.

[0036] Among them, auxiliary information can be information generated or extracted based on basic information, which can affect the development of the story after the story, or play a decisive / constraining role. For example, auxiliary information can include at least one of character emotional information, character relationship information, story writing purpose, and plot ending point; wherein, character emotional information is used to indicate the emotional state and changes between characters (that is, emotional trend), and emotional state and change information can be extracted from writing requirements. For example, if the writing requirements are: write a plot that makes the emotions of the two people drop sharply. Then this situation has a clear emotional trend, and by identifying the emotional changes between characters, the subsequent plot generation can be more accurate. Among them, character relationship information is used to indicate the relationship between characters, and character relationship information can be extracted from character information. Character relationships can allow subsequent plot writing to recognize what kind of relationship there is between characters, so that the subsequent steps can clearly know the relationship between characters and avoid the situation of disordered character relationships in the story. Among them, the plot ending point is used to indicate the end node of the development of the story, or in other words, to indicate the key position or result that the story development finally reaches; the plot ending point can be extracted from the writing requirements. For example, if the writing requirements are: write a plot that makes character B particularly angry and go back to his parents' home, then "character B goes back to his parents' home" can be the plot ending point of the story to be generated.

[0037] Among them, the purpose of story writing is used to indicate the type of story to be generated. The purpose of story writing can be extracted from the writing requirements. The significance of extracting the purpose of story writing is to accurately explore the user's creative needs and to explore the specific type of story creation purpose. Among them, the purpose of story writing (that is, the type of story to be generated) can include: information explanation type (representing that the generated story text is mainly to explain information), plot advancement type (representing that the generated story text is mainly to advance the plot), value change type (representing that the generated story text is mainly to reflect the changes in various aspects of the characters), dramatic conflict type (representing that the generated story text is mainly to reflect dramatic conflicts). For example, the writing requirements are: write a wonderful fighting scene; then the purpose of story writing is the plot advancement type, and the generated story can be developed around the perspective of plot advancement.

[0038] Among them, the information explanation category can specifically include two subcategories, namely the event explanation subcategory and the character explanation subcategory. The event explanation subcategory is used to indicate that the story to be generated is presented in the form of character dialogue, narration, scene description, etc., so that readers can understand the background, time, place and cause of the story, and prepare for understanding the subsequent plot; the character explanation subcategory is used to indicate that the story to be generated is presented in the form of descriptions of the character's words and deeds, appearance characteristics, background stories, etc., so that readers can recognize and understand the character's personality, identity and experience in the text, and lay the foundation for the subsequent plot development.

[0039] Among them, the plot advancement category can specifically include two subcategories, namely the event node subcategory and the suspense setting subcategory. The event node subcategory is used to indicate that the story to be generated is to prompt this plot or event to reach a result through a series of behaviors of the characters, forming a node in the story sequence, so that readers can understand the latest development and direction of the event; the suspense setting subcategory is used to indicate that the story to be generated is to set unsolved mysteries, foreshadowing, and create suspense, so as to make readers have questions and expectations about the development of the plot, attract readers' continued attention and interest, and make them have questions and expectations about the subsequent development of the plot.

[0040] Among them, the value change category can specifically include five subcategories, namely, the character image reinforcement subcategory, the character image change subcategory, the character cognition change subcategory, the character relationship change subcategory, and the emotional relationship change subcategory; the character image reinforcement subcategory is used to indicate that the story to be generated is to reveal the deeper character personality, values, beliefs or spirit, making the character image more three-dimensional and full; the character image change subcategory is used to indicate that the story to be generated is to show the character's emotional change or personality change, so as to increase the character's complexity and depth, making the character image more three-dimensional and full; the character cognition change subcategory is used to indicate that the story to be generated is to reveal the character's inner monologue, self-reflection, and other aspects of the story. The subcategory of changes in character relationships is used to indicate that the story to be generated is to show the establishment, development, rupture or turning point of character relationships, thereby increasing dramatic conflicts, such as from friends to enemies, from cooperative relationships to competitive relationships, from husband and wife to strangers, etc. The subcategory of changes in emotional relationships is used to indicate that the story to be generated is to show the emotional changes between characters, including emotional relationships of different dimensions such as family affection, friendship, and love, so as to enrich the character image and promote the development of the plot, such as from trust to distrust, from love to disgust, from forbearance to catharsis.

[0041] Among them, the dramatic conflict category can specifically include three subcategories, namely, the conflict occurrence subcategory, the conflict outbreak subcategory and the conflict resolution subcategory. The conflict occurrence subcategory is used to indicate that the story to be generated is to create dramatic conflicts through contradictions, differences of opinion, conflicts of interest, etc. between characters, so as to enhance the drama and watchability of the story and arouse the readers' resonance and thinking; the conflict outbreak subcategory is used to indicate that the story to be generated is to push the conflict to a climax through fierce quarrels, physical conflicts, emotional outbursts, etc. among the characters, arouse the readers' emotional resonance and promote the development of the plot; the conflict resolution subcategory is used to indicate that the story to be generated is to resolve contradictions through communication and reconciliation between characters, action strategies, external intervention, inner struggles, etc., to end the conflict, push the plot forward and reach the climax or ending of the story.

[0042] In recent years, natural language processing (NLP) technology has made significant progress, especially large natural language models based on deep learning (such as GPT model, BERT model, etc.) have shown strong capabilities in natural language generation and natural language understanding. These models are able to understand and generate text through training with a large amount of text data. Therefore, in one possible implementation, the above-mentioned auxiliary information can be extracted from the basic information using a large natural language model (i.e., a large language model, Large Language Model) known in the art, which is not limited in the embodiments of the present disclosure.

[0043] In practical applications, considering that the writing requirements set by the user may be unreasonable, for example, the writing requirements do not conform to the story development logic, the requirements are relatively extreme, etc. Therefore, in a possible implementation, the above-mentioned determining of the auxiliary information based on the basic information may include:

[0044] The first language model is used to determine whether the writing requirements are reasonable; if the first language model determines that the writing requirements are reasonable, the second language model is used to extract auxiliary information from the basic information. The reasonable writing requirements can be understood as the story direction indicated by the writing requirements is reasonable, or conforms to the normal story development logic.

[0045] It should be understood that the first large language model and the second large language model can adopt large language models of the type known in the art (such as general large language models such as qwen 2.0), and those skilled in the art can adopt model training methods known in the art, and use data sets to fine-tune the pre-trained general large language model to obtain the first large language model and the second large language model that can complete different tasks. As long as the trained large language model can achieve the functions it needs to achieve, the embodiments of the present disclosure are not limited to this. For example, a supervised fine-tuning training (Supervised Fine-Tuning, SFT) method can be used. Supervised fine-tuning training is a machine learning training technology that uses a labeled data set of a specific task on a pre-trained general large language model (LLM) to perform further supervised fine-tuning training, so that the trained large language model can adapt to a specific task and improve its performance on the task. For example, the training process for the first large language model may include: constructing a data set including various sample writing requirements and sample labels (reasonable or unreasonable), and then based on the data set, inputting writing requirement samples and related instructions (such as "Please judge whether the input writing requirements are reasonable") into a pre-trained general large language model to obtain a judgment result of whether the writing requirements output by the general large language model are reasonable, and combining the sample labels of the sample writing requirements (reasonable or unreasonable) to calculate the loss, and adjusting the parameters of the general large language model based on the loss to obtain the above-mentioned first large language model. The training process for the second largest language model may include: constructing a data set including sample basic information and corresponding sample auxiliary information extracted from original story texts with storylines such as scripts and novels, and then based on the data set, inputting the sample basic information and related instructions (such as "please extract at least one auxiliary information including character emotional information, character relationship information, story writing purpose and plot ending point from the input basic information") into a pre-trained general large language model to obtain predicted auxiliary information output by the general large language model, and then calculating the loss based on the difference between the sample auxiliary information and the predicted auxiliary information, and using the loss to adjust the parameters of the general large language model to obtain the above-mentioned second largest language model.

[0046] Those skilled in the art should understand that the step of using the first language model to determine whether the writing requirement is reasonable can also be omitted, that is, the second language model can be directly used to extract auxiliary information from the basic information.

[0047] In step S13, at least one story outline is generated according to the basic information and the auxiliary information, wherein the story outline is used to indicate the outline of the plot developed after the story premise.

[0048] It can be understood that generating an outline of the story that develops after the story's antecedents is equivalent to continuing the story's antecedents, that is, the continuation of the plot is mainly for generating an outline of the story that develops after the story's antecedents, and further, the outline of the story that develops after the story's antecedents can be used to subsequently generate a detailed story text.

[0049] In practical applications, the large language model can be used to deduce the plot based on the basic information and the auxiliary information, and a more natural story outline can be generated through deduction. Considering that plot deduction can be understood as the continuation of subsequent plots based on the current plot, for example, after the husband and wife enter the restaurant, multiple plots may be deduced, and the plot deduced by the model may contain deliberate events (such as the sudden appearance of a certain character), low-probability events (such as the sudden fall of a meteorite), and other abnormal plots. Therefore, after using the large language model to deduce dozens of deduced plots, the logic of plot screening can be used to screen out abnormal plots in the deduced plots.

[0050] It is understandable that when users read novels, movies or TV series, if an important character suddenly appears, they will feel that the current plot is too deliberate, that is, there is an obviously deliberately arranged plot, which will make the plot ugly, illogical and unreasonable. Therefore, considering that there may be abnormal events in the deduced plot generated by the large language model, the plot screening operation can be used to screen out abnormal events, so as to facilitate the generation of a story outline that conforms to the logic of story development. Plot screening is essentially to select the results of the plot deduction in the previous step, and select the most logical deduction plots to naturally reach the plot landing point. Among them, plot deduction and plot screening can be iterated for multiple rounds. After each round of plot deduction ends with the end of plot screening, the next round of plot deduction begins until the deduced plot reaches the plot landing point, and then the plot deduction ends, so that a more natural story outline can be generated.

[0051] Therefore, in a possible implementation manner, generating at least one story outline according to the basic information and the auxiliary information may include:

[0052] According to the basic information and the auxiliary information, the following processing is performed cyclically until the generated i-th target deduction plot reaches the plot landing point:

[0053] Using the third language model, based on the basic information, the auxiliary information and the i-1th target deduction plot, a plurality of i-th deduction plots developed after the i-1th target deduction plot are generated; wherein, i≥1, the 0th target deduction plot is the story antecedent;

[0054] Using the fourth language model to filter out abnormal plots from a plurality of i-th paragraph deduction plots according to the auxiliary information, and obtaining at least one i-th paragraph target deduction plot;

[0055] For any i-th target deduction plot that reaches the plot ending point, the deduction plot from the 1st target deduction plot to the i-th target deduction plot is determined as the story outline; at least one i-th target deduction plot that reaches the plot ending point corresponds to at least one story outline.

[0056] For example, after obtaining the above-mentioned basic information and auxiliary information, the third language model can be used to generate multiple first-paragraph deduction plots developed from the story antecedents according to the basic information (including the story antecedents, i.e., the 0th paragraph target deduction plot) and the auxiliary information; then, the fourth language model is used to screen out abnormal plots from the multiple first-paragraph deduction plots according to the above-mentioned auxiliary information (i.e., screen out abnormal deduction plots), and obtain at least one first-paragraph target deduction plot; for any first-paragraph target deduction plot, if the first-paragraph target deduction plot does not reach the plot landing point, the third language model is continued to be used to generate multiple second-paragraph deduction plots developed after the first-paragraph target deduction plot according to the basic information, auxiliary information and the first-paragraph target deduction plot; then, the fourth language model is used to screen out abnormal plots from the multiple second-paragraph deduction plots according to the above-mentioned auxiliary information (i.e., screen out abnormal deduction plots), and obtain at least A second-stage target deduction plot; for any second-stage target deduction plot, if the second-stage target deduction plot has reached the plot drop point, the loop is terminated, and the deduction plot from the first-stage target deduction plot to the second-stage target deduction plot that has reached the plot drop point is determined as a story outline; if the second-stage target deduction plot has not reached the plot drop point, the third language model is continuously used to generate a variety of third-stage deduction plots developed after the second-stage target deduction plot, and then the fourth language model is used to filter out abnormal plots from the various third-stage deduction plots to obtain at least one third-stage target deduction plot, and so on, until the i-th stage target deduction plot reaches the plot drop point, and then the deduction plot from the first-stage target deduction plot to the i-th stage target deduction plot that has reached the plot drop point is determined as a story outline. It should be understood that at least one i-th stage target deduction plot that has reached the plot drop point can generate at least one story outline.

[0057] It should be understood that the third language model and the fourth language model can adopt large language models of types known in the art (such as the general large language models such as the above-mentioned qwen 2.0). Those skilled in the art can adopt model training methods known in the art, such as supervised fine-tuning training (Supervised Fine-Tuning, SFT) method, to use different data sets to fine-tune the pre-trained general large language model to obtain the third language model and the fourth language model that can complete different tasks. As long as the trained large language model can achieve the functions it needs to achieve, the embodiments of the present disclosure are not limited to this. For example, a general large language model of any structure suitable for story generation can be selected, and a data set including sample auxiliary information and sample basic information extracted from scripts, novels and other texts with storylines, as well as existing plots and real subsequent plots can be constructed. Based on the data set, sample auxiliary information and sample basic information, existing plots and related instructions (such as "Please deduce subsequent plots from the input existing plots based on the input auxiliary information and basic information") are input into the pre-trained general large language model to obtain the deduced subsequent plot output by the general large language model, and the loss is calculated based on the difference between the deduced subsequent plot output by the model and the real subsequent plot, and the parameters of the general large language model are adjusted based on the loss, so that the general large language model can learn texts with storylines such as scripts and novels, and obtain a third language model that can generate a subsequent plot based on basic information, auxiliary information and existing plots. A plot may include basic plot elements such as characters, time, place, scene, and events involved. An event can be any intermediate event experienced from the beginning to the end of the story. The training process for the fourth language model may include: constructing a data set including plot samples and corresponding labels (normal, abnormal), based on which the plot samples and related instructions (such as "Please determine whether the input plot is normal") may be input into a pre-trained general large language model to obtain the prediction result (normal, abnormal) output by the general large language model, and then calculating the loss based on the prediction result and the label corresponding to the plot sample, adjusting the parameters of the general large language model based on the loss, and obtaining the above-mentioned fourth language model. Among them, the abnormal plot may include unreasonable relationships between characters, unreasonable events, etc.

[0058] By generating the plots in segments and screening whether the multiple plots generated in each segment are normal, both the diversity and rationality of the generated story outlines can be ensured.

[0059] Those skilled in the art should understand that all deduced plots that reach the plot point may also be generated directly based on the basic information and the auxiliary information.

[0060] In step S14, story details are supplemented for each of the at least one story outline according to the auxiliary information to obtain multiple story texts corresponding to the at least one story outline, wherein each story outline corresponds to at least one story text, and different story texts corresponding to each story outline have different story details.

[0061] The story outline contains the basic elements of the story, which is a distillation and summary of the story, while the story details may include character dialogues, psychological activities, environmental descriptions and more details.

[0062] In a possible implementation, the above-mentioned supplementing story details for each of the at least one story outline according to the auxiliary information to obtain multiple story texts corresponding to the at least one story outline may include: for any story outline, using the fifth language model to supplement the story outline with at least one story detail according to the auxiliary information to obtain at least one story text corresponding to the story outline; wherein the story details include at least one of the following: character's actions, expressions, dialogues, psychological states, behavioral purposes, story background, locations, and environment.

[0063] Among them, the fifth language model mainly generates specific story details based on the auxiliary information and story outline of the previous text, which is used to supplement the story outline with specific plot information, that is, to supplement the characters' actions, expressions, dialogues, psychological states, behavioral purposes, story backgrounds, locations, environments, etc. In this way, the generated story text can be made richer and in line with human preferences for story description.

[0064] Among them, the fifth language model can adopt a large language model known in the art, and those skilled in the art can adopt a model training method known in the art to train the fifth language model, as long as the trained fifth language model can achieve the functions it needs to achieve, and the embodiments of the present disclosure are not limited to this. For example, a supervised fine-tuning (SFT) method can be used. Supervised fine-tuning training is a machine learning training technology that uses a labeled data set of a specific task to perform further supervised fine-tuning training on a pre-trained large language model (LLM), so that the trained LLM can adapt to a specific task and improve its performance on the task. For example, a data set can be constructed including sample auxiliary information and sample story outlines extracted from original story texts such as scripts and novels with rich story details. Based on the data set, the sample auxiliary information and sample story outline extracted from the original story text and related instructions (such as "Please add at least one story detail such as the character's actions, expressions, dialogues, psychological states, behavioral purposes, story background, locations, and environments to the input story outline based on the input auxiliary information") are input into a pre-trained general large language model to obtain the predicted story text output by the general large language model. Then, the loss can be calculated using the difference between the predicted story text output by the model and the original story text, and the parameters of the general large language model can be adjusted based on the loss to obtain the fifth language model mentioned above.

[0065] In step S15, each story text among the multiple story texts is evaluated to obtain an evaluation result of each story text, wherein the evaluation result represents the quality of the story text.

[0066] In practical applications, a large language model can be used to evaluate the quality of each story text among multiple story texts, that is, the large language model can be directly used to evaluate the quality of each story, so as to subsequently select a better target story text based on the quality.

[0067] The quality can be characterized based on the story characteristics of the story text, and the story characteristics can include at least one of the following: the degree of story relevance, the degree of story completeness, the degree of logical rigor, the degree of novelty of the plot, the degree of exciting plot, the degree of characterization, the degree of display of character relationships, the degree of display of character emotional changes, the degree of fictionalization of character information, and the degree of dialogue description. The higher the degree of story relevance, the higher the degree of story completeness, the higher the degree of logical rigor, the higher the degree of novelty of the plot, the higher the degree of exciting plot, the higher the degree of characterization, the higher the degree of display of character relationships, the higher the degree of display of character emotional changes, the lower the degree of fictionalization of character information, and the lower the degree of dialogue description, the better the story text is, and vice versa.

[0068] Among them, the degree of story relevance can indicate the relevance of the story text relative to the purpose and requirements of story writing, or whether the specific plot in the story text is developed around the purpose and requirements of story writing on the basis of the story background. Specifically, it can indicate whether the main characters, character settings, story background and main plot line in the story text are consistent, whether there are irrelevant plots that are tampered with or expanded, whether the beginning of the story is tampered with, whether a plot that deviates from the requirements of story writing is generated, and whether an ending not mentioned in the writing requirements is continued. The higher the degree of story relevance, the more the specific plot of the story text is developed around the purpose and requirements of story writing on the basis of the story background. On the contrary, the lower the degree of story relevance, the less the specific plot of the story text is developed around the purpose and requirements of story writing on the basis of the story background.

[0069] Among them, the degree of story completeness can represent the completeness of the story text. Specifically, it can represent whether the story text contains the three basic information of the story's cause, process, and result; or whether it also contains the five dramatic elements of the story's main characters, the characters' goals in the story, the conflicts and obstacles encountered, the characters' behaviors in resolving conflicts, and the results. The more complete the story is, the more it contains the above three complete basic information and / or five dramatic elements. The less complete the story is, the more it contains incomplete three basic information and / or five dramatic elements. That is, the story text may be missing some basic information and / or some dramatic elements.

[0070] Among them, the degree of logical rigor can characterize the logic of each plot point in the story text. Specifically, it can characterize whether the story text is logically correct, coherent, naturally connected, and has no repeated content, as well as whether there are time and space confusion problems (i.e., the content of the story plot does not conform to the historical background to which it belongs), character status errors (i.e., the character behavior does not conform to the character information and story background specified in the basic information, making the character image look unclear), unclear character relationship problems (i.e., the character behavior does not match the character relationship, for example: Character A and Character B, who were originally friends, behave as if they do not know each other in the story text), and plot logic confusion problems (i.e., the plot in the story text cannot correctly connect with the previous text, and the designed plot is different from the normal cognition of the audience and cannot withstand scrutiny). The higher the degree of logical rigor, the more logically correct, coherent, naturally connected, without repeated content, and without the above-mentioned logical problems in the story text, while the lower the degree of logical rigor, the more logical errors, incoherence, unnatural connection, repeated content, and the above-mentioned logical problems appear in the story text.

[0071] Among them, the novelty of the plot can represent the content innovation of the story text. It should be understood that the higher the novelty of the plot, the more interesting, novel, and unexpected character creation techniques, conflict design, and character problem-solving methods the story text contains, which means that the story text is unconventional, innovative, and imaginative, and can help users open up their creative ideas and inspire users. On the other hand, the lower the novelty of the plot, the more old-fashioned and common story plots appear in the story text, which means that the generated story text is cliché, uninnovative, unattractive, and unimaginative.

[0072] Among them, the degree of plot excitement can represent the excitement of the content of the story text. The more exciting the plot is, the more ups and downs, twists and turns, and unexpected the plot will be, and it will meet the compact and efficient rhythm expectations required by the plot; the less exciting the plot is, the more bland the plot will be, unattractive, chaotic, boring, and useless, and it will not play a role in expressing the purpose of story writing.

[0073] Among them, the degree of characterization can represent the degree of shaping of the core characters in the story text, or in other words, it can represent whether the story text can show the character image through specific events in the story plot and enhance the audience's understanding of the character. The higher the degree of characterization, the richer and more complete the character image setting in the story text, the more three-dimensional and rich the character is, and the fuller the character image is. The lower the degree of characterization, the thinner, more boring, and less rich the character image setting in the story text.

[0074] Among them, the degree of display of character relationships can represent the degree of display of character relationships in the story text. Among them, common character relationships include: family and kinship, friendship and colleagues, love and partners, hostility and competition, social connections, etc.; the higher the degree of display of character relationships, the clearer the relationship between characters can be seen in the story text. The lower the degree of display of character relationships, the more vague the relationship between characters in the story text is.

[0075] Among them, the degree of display of character emotional changes can represent the degree of display of emotional changes in character relationships in the story text (such as emotional progression, extension, or confrontation, etc.). The higher the degree of display of character emotional changes, the stronger, more extreme, more unexpected, and more reversal the emotional changes shown in the story text, and the more the corresponding emotional change process conforms to the plot and character relationships. The lower the degree of display of character emotional changes, the more bland the emotional changes shown in the story text, the smaller the emotional intensity, or no reversal.

[0076] Among them, the fictional degree of character information can characterize the content of virtual character information in the story text. Fictional character information includes, for example, fictional character experiences, fictional occupations, fictional character relationships, fictional hobbies, preferences, and other information that is obviously not mentioned in the character information in the basic information, that is, fictional character information is character information that is different from the character information in the basic information. The higher the fictional degree of character information, the more fictional character information is contained in the story text that is not mentioned in the character information in the basic information, and the lower the fictional degree of character information, the less fictional character information is contained in the story text.

[0077] Among them, the degree of dialogue description can characterize the content of dialogue in the story text. It should be understood that the more dialogues there are in the story text, the less descriptions of the character's psychology, actions, and motivations. The story text with a lower degree of dialogue description contains fewer dialogues, which is similar to the writing of narration, and can more clearly explain the character's motivation, psychology, actions, etc., and focus on describing the sense of picture. The more dialogues there are in the story text with a higher degree of dialogue description, the more the plot is promoted through dialogue, while ignoring the description of character motivation, actions, psychology, etc.

[0078] Based on the above-mentioned various story characteristics, in a possible implementation manner, the above-mentioned evaluation of each story text in the multiple story texts to obtain the evaluation result of each story text may include:

[0079] For any story text, using the sixth language model to evaluate at least one story characteristic of the story text at least once according to the basic information and the auxiliary information, and obtaining at least one evaluation score for each of the at least one story characteristic of the story text;

[0080] An average value of at least one evaluation score of each story characteristic is used as a characteristic evaluation result of each story characteristic, and the evaluation result of the story text includes a characteristic evaluation result of at least one story characteristic of the story text.

[0081] In practical applications, the sixth language model can be used to score each story text according to the above basic information and auxiliary information according to the degree of story adherence to the topic, the degree of story completeness, the degree of logical rigor, the degree of plot novelty, the degree of plot excitement, the degree of characterization, the degree of display of character relationships, the degree of display of character emotional changes, the degree of fictionalization of character information, and the degree of dialogue description, so as to obtain the evaluation scores of the above-mentioned story characteristics, for example, the scoring can be performed in the range of 0-10 points; among which, the higher the degree of story adherence to the topic, the higher the score of the degree of story adherence; the higher the degree of story completeness, the higher the score of the degree of story completeness; the higher the degree of logical rigor, the higher the score of logical rigor; the higher the degree of plot novelty, the higher the score of plot novelty; the higher the degree of plot excitement, the higher the score of plot excitement; the higher the degree of characterization, the higher the score of characterization; the higher the degree of display of character relationships, the higher the score of the degree of display of character relationships; the higher the degree of display of character emotional changes, the higher the score of the degree of display of character emotional changes; the lower the degree of fictionalization of character information, the higher the score of the degree of fictionalization of character information; the lower the degree of dialogue description, the higher the score of dialogue description.

[0082] In order to improve the accuracy of the evaluation score, the sixth language model can be used to evaluate at least one story feature of the same story text multiple times to obtain multiple evaluation scores for each of the at least one story feature of the story text. Then, the average of the multiple evaluation scores of each story feature can be used as the feature evaluation result of each story feature. Based on the feature evaluation result of at least one story feature of the story text, the target story text with the best various story features can be screened out from multiple story texts. Among them, the sixth language model can also be obtained by fine-tuning the general large language model using the data set. For example, a data set can be constructed to include sample story texts and corresponding story feature labels. Based on the data set, the sample story text and related instructions are input into the pre-trained general large language model (such as "extract at least one story feature from the input story text, including the degree of story relevance, story completeness, logical rigor, plot novelty, plot excitement, character shaping, degree of display of character relationships, degree of display of character emotional changes, degree of fictionality of character information, and degree of dialogue description") to obtain the predicted story features output by the general large language model, and then calculate the loss between the predicted story features and the story feature labels, and use the loss to adjust the parameters of the general large language model to obtain the above-mentioned sixth language model.

[0083] In step S16, a target story text is determined according to the evaluation result of each story text in the plurality of story texts.

[0084] As described above, the evaluation result of the story text can characterize the quality of the story text, and thus, optionally, the best story text can be directly selected from multiple story texts as the target story text. Considering that fictional character information may also appear in the story text generated by the large language model, the fictional character information in the selected story text can also be removed based on the character information in the basic information to obtain a target story text that meets the user's expectations.

[0085] As described above, the evaluation result of the story text may include a characteristic evaluation result of at least one story characteristic of the story text. Thus, determining the target story text according to the evaluation result of each story text in the plurality of story texts may include:

[0086] According to the characteristic evaluation result of at least one story characteristic of each story text in the multiple story texts, a comprehensive evaluation result of each story text is determined; according to the comprehensive evaluation result of each story text in the multiple story texts, a target story text is determined.

[0087] Among them, the characteristic evaluation results of at least one story characteristic of each story text can be summed, or weighted summed, or averaged, or weighted averaged, etc., to obtain a comprehensive evaluation result of each story text, and the embodiments of the present disclosure are not limited to this. It should be understood that when weighted processing is adopted, the user can customize the weight of each story characteristic according to actual needs (such as the importance of each story characteristic), so as to use the weight of each story characteristic to perform weighted processing on the story characteristics to obtain a comprehensive evaluation result of the story text, and the embodiments of the present disclosure are not limited to this.

[0088] Optionally, the above-mentioned determining the target story text according to the comprehensive evaluation result of each story text in the multiple story texts may include, for example, directly selecting the story text with the highest comprehensive evaluation result from the multiple story texts as the target story text.

[0089] Considering that the story text generated by the large language model may contain information about fictional characters, in a possible implementation, determining the target story text according to the comprehensive evaluation result of each story text in the multiple story texts may include:

[0090] According to the comprehensive evaluation result of each story text among multiple story texts, the story text with the highest comprehensive evaluation result is selected from the multiple story texts; when the degree of fiction in the story characteristics corresponding to the selected story text represents the existence of fictional character information in the selected story text, the fictional character information existing in the selected story text is removed according to the character information in the basic information to obtain the target story text.

[0091] In practical applications, the seventh language model can be used to remove the fictional character information in the selected story text according to the character information in the basic information. Of course, other information proofreading technologies known in the art can also be used to remove the fictional character information in the selected story text, and the disclosed embodiment does not limit this. In this way, the fictional character information that does not match the character information specified in the basic information can be removed, such as removing the fictional character experience and professional character relationship, so that the generated target story text meets the character information designed by the user. Among them, the seventh language model can also be obtained by fine-tuning the general large language model using the data set. For example, a data set can be constructed including sample basic information of the original story text and sample story text with fictional character information added to the original story text. Based on the data set, the sample basic information and sample story text and related instructions (such as "Please remove the fictional character information from the input story text based on the input basic information") are input into the pre-trained general large language model to obtain the predicted story text from which the fictional character information has been removed, and then the loss can be calculated using the difference between the predicted story text output by the model and the original story text, and the parameters of the general large language model can be adjusted based on the loss to obtain the above-mentioned seventh language model.

[0092] In practical applications, the story generation method of the disclosed embodiment can be integrated into an intelligent agent, and the various large language models used in the intelligent agent can be built using the Langgraph technology architecture (an underlying framework for building complex intelligent agents based on large language models (LLMs)); a long-term memory module can also be set in the intelligent agent to save the intermediate results generated in the above story generation process (such as the auxiliary information generated in the above step S12, the story outline generated in the above step S13, the story text generated in the above step S14, the evaluation result generated in the above step S15, etc.) for use in subsequent steps. Long-term memory can be applied to the large language model used in each step to supplement the context information and help the large language model generate corresponding results.

[0093] According to the story generation method of the embodiment of the present disclosure, auxiliary information is generated according to basic information, a story outline is generated according to the basic information and the auxiliary information, story details are added to the story outline, the quality of the story text after the details are added is evaluated, and then the target story text is determined based on the evaluation results of the quality. It is possible to intelligently and automatically generate a target story text that is more detailed, logical and reasonable and meets the user's creative needs.

[0094] Based on the story generation method provided by the above embodiment of the present disclosure, the present disclosure also provides Figure 2 A schematic diagram of a story generation link is shown, such as Figure 2 As shown, the process of the above-mentioned story generation method can be disassembled to obtain a story generation chain composed of an NLU module, a plot continuation module, an SFT module, a post-link module and a long-term memory module. The process of generating a target story text using the above-mentioned story generation chain includes: inputting basic information such as background information and writing requirements, judging whether the writing requirements are reasonable, if the writing requirements are unreasonable, inputting new writing requirements, if the writing requirements are reasonable, then the NLU module extracts auxiliary information such as character emotion information, character relationship information, story writing purpose and plot dropout from the background information and writing requirements, and saves the character emotion information, character relationship information, story writing purpose and plot dropout as long-term memory; then, in order to achieve the generation of creative In order to create a meaningful and exciting target story text, the plot continuation module can be used to list and deduce the possible plots, and multiple deduced plots can be generated in parallel within a limited plot, so as to select a better deduced plot. Specifically, the plot continuation module can perform plot deduction and plot screening cyclically based on basic information and auxiliary information to generate at least one story outline; the SFT module adds story details to the story outline based on the auxiliary information to obtain multiple story texts; then, the post-link module screens and modifies the stories of each story text, that is, evaluates the quality of each story text, and selects the story text with the best evaluation result from multiple story texts, and removes the information of fictional characters from the selected story text to obtain the target story text. Among them, the rationality of the story generation method can be reflected through the plot design module, the innovation of the story generation method can be achieved through the plot continuation module and the post-link module, and the logic of the story generation method can be reflected through the post-link module.

[0095] Figure 3 A block diagram of a story generating device according to an embodiment of the present disclosure is shown as follows: Figure 3 As shown, the device comprises:

[0096] An acquisition module 301 is used to acquire basic information of a story to be generated, wherein the basic information includes background information and writing requirements, and the background information includes character information and story context;

[0097] A determination module 302, wherein the module determines auxiliary information based on the basic information, wherein the auxiliary information includes information that affects the development of the story after the story context;

[0098] A generating module 303, configured to generate at least one story outline according to the basic information and the auxiliary information, wherein the story outline is used to indicate an outline of the plot developed after the story background;

[0099] A supplementing module 304 is used to supplement story details for each story outline of the at least one story outline according to the auxiliary information to obtain a plurality of story texts corresponding to the at least one story outline, wherein each story outline corresponds to at least one story text, and different story texts corresponding to each story outline have different story details;

[0100] An evaluation module 305 evaluates each of the multiple story texts to obtain an evaluation result of each story text, wherein the evaluation result represents the quality of the story text;

[0101] The target determination module 306 is used to determine a target story text according to the evaluation result of each story text in the multiple story texts.

[0102] In one possible implementation, the writing requirements are used to indicate the direction of the story to be generated; the auxiliary information includes at least one of character emotion information, character relationship information, story writing purpose and plot ending point, the character emotion information is used to indicate the emotional state and changes between characters, the character relationship information is used to indicate the relationship between characters, the story writing purpose is used to indicate the type of story to be generated, and the plot ending point is used to indicate the end node of the story development.

[0103] In a possible implementation, determining the auxiliary information based on the basic information includes: using a first language model to determine whether the writing requirement is reasonable; and extracting the auxiliary information from the basic information using a second language model when the first language model determines that the writing requirement is reasonable.

[0104] In a possible implementation, generating at least one story outline according to the basic information and the auxiliary information includes:

[0105] According to the basic information and the auxiliary information, the following processing is performed cyclically until the generated i-th target deduction plot reaches the plot landing point:

[0106] Using the third language model, based on the basic information, the auxiliary information and the i-1th target deduction plot, a plurality of i-th deduction plots developed after the i-1th target deduction plot are generated; wherein, i≥1, the 0th target deduction plot is the story background;

[0107] Using the fourth language model to filter out abnormal plots from the multiple i-th paragraph deduction plots according to the auxiliary information, and obtaining at least one i-th paragraph target deduction plot;

[0108] For any i-th target deduction plot that reaches the plot ending point, the deduction plot from the 1st target deduction plot to the i-th target deduction plot is determined as the story outline; at least one i-th target deduction plot that reaches the plot ending point corresponds to at least one story outline.

[0109] In a possible implementation, the method of supplementing each of the at least one story outline with story details based on the auxiliary information to obtain a plurality of story texts corresponding to the at least one story outline includes: for any story outline, using the fifth language model to supplement the story outline with at least one story detail based on the auxiliary information to obtain at least one story text corresponding to the story outline; wherein the story details include at least one of the following: character's actions, expressions, dialogues, psychological states, purposes of behaviors, story background, locations, and environments.

[0110] In a possible implementation, the evaluating of each story text among the multiple story texts to obtain an evaluation result of each story text includes: for any story text, using the sixth language model to evaluate at least one story characteristic of the story text at least once according to the basic information and the auxiliary information, to obtain at least one evaluation score for each of the at least one story characteristic of the story text; taking an average of the at least one evaluation scores of each story characteristic as a characteristic evaluation result of each story characteristic, the evaluation result of the story text including the characteristic evaluation result of at least one story characteristic of the story text.

[0111] In one possible implementation, the story characteristics include at least one of the following: the degree to which the story is relevant to the title, the degree of completeness of the story, the degree of logical rigor, the degree of novelty of the plot, the degree of excitement of the plot, the degree of characterization, the degree of display of character relationships, the degree of display of character emotional changes, the degree of fictionality of character information, and the degree of dialogue description.

[0112] In a possible implementation, determining a target story text based on an evaluation result of each story text among the multiple story texts includes: determining a comprehensive evaluation result of each story text based on a characteristic evaluation result of at least one story characteristic of each story text among the multiple story texts; and determining a target story text based on the comprehensive evaluation result of each story text among the multiple story texts.

[0113] In a possible implementation, determining a target story text based on a comprehensive evaluation result of each story text among the multiple story texts includes: selecting a story text with the highest comprehensive evaluation result from the multiple story texts based on the comprehensive evaluation result of each story text among the multiple story texts; when the degree of fiction in the story characteristics corresponding to the selected story text indicates that there is fictional character information in the selected story text, removing the fictional character information existing in the selected story text based on the character information in the basic information to obtain a target story text; wherein the fictional character information is character information different from the character information in the basic information.

[0114] According to the story generating device of the embodiment of the present disclosure, auxiliary information is generated according to basic information, a story outline is generated according to the basic information and the auxiliary information, story details are added to the story outline, and then the quality of the story text after the details are added is evaluated, and then the target story text is determined based on the evaluation results of the quality. It is possible to intelligently and automatically generate a target story text that is more detailed, logical and reasonable and meets the user's creative needs.

[0115] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation thereof can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0116] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.

[0117] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.

[0118] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.

[0119] Figure 4 1 is a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server or a terminal device. Figure 4, the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0120] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.

[0121] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.

[0122] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0123] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: 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), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0124] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0125] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0126] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0127] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0128] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0129] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0130] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A story generation method, characterized in that: include: Obtaining basic information of the story to be generated, wherein the basic information includes background information and writing requirements, and the background information includes character information and story context; Determining auxiliary information based on the basic information, wherein the auxiliary information includes information that affects the development of the story after the story; Generate at least one story outline according to the basic information and the auxiliary information, wherein the story outline is used to indicate the outline of the plot developed after the story background; Supplementing story details for each of the at least one story outline according to the auxiliary information to obtain a plurality of story texts corresponding to the at least one story outline, wherein each story outline corresponds to at least one story text, and different story texts corresponding to each story outline have different story details; Evaluate each story text among the plurality of story texts to obtain an evaluation result of each story text, wherein the evaluation result represents the quality of the story text; A target story text is determined according to the evaluation result of each story text in the plurality of story texts.

2. The method according to claim 1, characterized in that The writing requirements are used to indicate the story direction of the story to be generated; The auxiliary information includes at least one of character emotion information, character relationship information, story writing purpose, and plot ending point. The character emotion information is used to indicate the emotional states and changes between characters, the character relationship information is used to indicate the relationships between characters, the story writing purpose is used to indicate the type of story to be generated, and the plot ending point is used to indicate the end node of the story plot development.

3. The method according to claim 1 or 2, characterized in that: The determining of auxiliary information according to the basic information includes: Using the first language model to determine whether the writing requirements are reasonable; When the first language model determines that the writing requirement is reasonable, the second language model is used to extract the auxiliary information from the basic information.

4. The method according to claim 1 or 2, characterized in that: Generating at least one story outline according to the basic information and the auxiliary information includes: According to the basic information and the auxiliary information, the following processing is performed cyclically until the generated i-th target deduction plot reaches the plot landing point: Using the third language model, based on the basic information, the auxiliary information and the i-1th target deduction plot, a plurality of i-th deduction plots developed after the i-1th target deduction plot are generated; wherein, i≥1, the 0th target deduction plot is the story background; Using the fourth language model to filter out abnormal plots from the multiple i-th segment deduction plots according to the auxiliary information, and obtaining at least one i-th segment target deduction plot; For any i-th target deduction plot that reaches the plot ending point, the deduction plot from the 1st target deduction plot to the i-th target deduction plot is determined as the story outline; at least one i-th target deduction plot that reaches the plot ending point corresponds to at least one story outline.

5. The method according to claim 1 or 2, characterized in that: The step of supplementing story details for each of the at least one story outline according to the auxiliary information to obtain a plurality of story texts corresponding to the at least one story outline includes: For any story outline, using the fifth language model to supplement at least one story detail to the story outline according to the auxiliary information, so as to obtain at least one story text corresponding to the story outline; The story details include at least one of the following: character's actions, expressions, dialogues, psychological states, behavioral purposes, story background, locations, and environments.

6. The method according to claim 1, characterized in that The step of evaluating each story text among the plurality of story texts to obtain an evaluation result of each story text includes: For any story text, using the sixth language model to evaluate at least one story characteristic of the story text at least once according to the basic information and the auxiliary information, and obtaining at least one evaluation score for each of the at least one story characteristic of the story text; An average value of at least one evaluation score of each story characteristic is used as a characteristic evaluation result of each story characteristic, and the evaluation result of the story text includes a characteristic evaluation result of at least one story characteristic of the story text.

7. The method according to claim 6, characterized in that The story characteristics include at least one of the following: the degree to which the story is relevant to the topic, the degree of completeness of the story, the degree of logical rigor, the degree of novelty of the plot, the degree of excitement of the plot, the degree of characterization, the degree of display of character relationships, the degree of display of character emotional changes, the degree of fictionality of character information, and the degree of dialogue description.

8. The method according to claim 6 or 7, characterized in that: The step of determining a target story text according to the evaluation result of each story text among the plurality of story texts comprises: Determining a comprehensive evaluation result of each story text according to a characteristic evaluation result of at least one story characteristic of each story text in the plurality of story texts; A target story text is determined according to a comprehensive evaluation result of each story text in the multiple story texts.

9. The method according to claim 8, characterized in that The step of determining a target story text according to a comprehensive evaluation result of each story text in the plurality of story texts comprises: According to the comprehensive evaluation result of each story text in the multiple story texts, selecting a story text with the highest comprehensive evaluation result from the multiple story texts; When the degree of fiction in the story characteristics corresponding to the selected story text indicates that there is fictional character information in the selected story text, the fictional character information in the selected story text is removed according to the character information in the basic information to obtain the target story text; wherein the fictional character information is character information different from the character information in the basic information.

10. A story generating device, characterized in that: include: An acquisition module, used to acquire basic information of the story to be generated, wherein the basic information includes background information and writing requirements, and the background information includes character information and story context; A determination module, which determines auxiliary information based on the basic information, wherein the auxiliary information includes information that affects the development of the story after the story context; A generating module, configured to generate at least one story outline according to the basic information and the auxiliary information, wherein the story outline is used to indicate an outline of the plot developed after the story background; A supplementing module, configured to supplement story details for each of the at least one story outline according to the auxiliary information, so as to obtain a plurality of story texts corresponding to the at least one story outline, wherein each story outline corresponds to at least one story text, and different story texts corresponding to each story outline have different story details; An evaluation module evaluates each of the multiple story texts to obtain an evaluation result of each story text, wherein the evaluation result represents the quality of the story text; The target determination module is used to determine the target story text according to the evaluation result of each story text in the multiple story texts.

11. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the method described in any one of claims 1 to 9 when executing the instructions stored in the memory.

12. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Interaction story generation method and related device

    CN117171370A

  • Generation method and device of interactive multimedia content and computer readable storage medium

    CN117633259A

  • Long text generation method and device

    CN117743567A

  • Video and novel interactive display method and device, storage medium and electronic equipment

    CN118175372A

  • Language model Chinese spelling checking method and system based on retrieval enhancement generation

    CN118586384A

Cited By

  • Method and system for generating long stories with controllable narrative emotion

    CN121389989A