Artificial intelligence-based drama script auxiliary generation method and device
Through artificial intelligence-assisted generation of drama scripts, using interactive devices and preset models, the problem of low creation efficiency of traditional drama scripts is solved, and scripts that meet user needs and drama characteristics are generated, which improves creative efficiency.
Patent Information
- Application Number
- CN202510125270.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-27
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-01-27
AI Technical Summary
Traditional drama script creation relies on the playwright’s personal talent and experience, resulting in long-term and inefficient creation, and may encounter problems such as exhausted inspiration and unclear thinking.
Through the artificial intelligence-based drama script assisted generation method, the creation requirement text is obtained using interactive devices, multiple theme summary is determined, and the target theme summary is selected with the user, the first drama script is generated, and the preset auxiliary generation model is used for polishing, and the target drama script is finally modified according to the user's review and annotation.
The creation efficiency of drama scripts has been improved. The generated scripts meet the user's creative needs and drama characteristics, and the text description is more accurate to meet the user's creative intentions.
Smart Images

Figure CN119558326B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an artificial intelligence-based auxiliary generation method and device for drama scripts. Background Art
[0002] Drama is a comprehensive stage art form that integrates diverse elements such as literature, performance, music, dance, and fine arts. Actors present storylines, shape characters, and convey emotions through their on-stage performances. Drama forms vary across regions. For example, Gan Opera, an ancient Jiangxi opera, boasts a profound historical and cultural heritage and unique artistic charm.
[0003] Traditional drama scriptwriting relies heavily on the playwright's talent and experience, and the creative process is often time-consuming. Writers spend considerable time conceiving, planning, and writing their plays, and can often encounter issues like lack of inspiration and unclear thinking, which can slow progress.
[0004] Therefore, the problem of how to improve the efficiency of drama script creation needs to be solved urgently. Summary of the Invention
[0005] In order to solve the above-mentioned problems existing in the prior art, the embodiments of the present application provide a method and device for auxiliary generation of drama scripts based on artificial intelligence. The method can determine multiple topic summaries based on the user's creative requirements text, and determine a target topic summaries from the multiple topic summaries through interaction with the user. Based on the target topic summaries, a first drama script is generated, and the first drama script is polished using a preset auxiliary generation model to obtain a second drama script. Finally, based on the user's review and annotation records of the second drama script, the second drama script is modified to obtain the target drama script. In this way, a corresponding drama script can be generated according to the user's creative requirements, thereby improving the efficiency of drama script creation.
[0006] In a first aspect, an embodiment of the present application provides an artificial intelligence-based method for assisting the generation of a dramatic script, which is applied to an assisting device for generating a dramatic script in an assisting system for generating a dramatic script, wherein the assisting system also includes an interactive device. The method includes:
[0007] Obtaining the user's creation requirement text from the interactive device;
[0008] Determine multiple topic summaries based on the creative requirement text; each topic summaries is used to represent a creative intention;
[0009] Determining first interaction information based on the multiple topic abstracts, and displaying the first interaction information to the user through the interactive device; the first interaction information is used to inquire about the user's creative intentions for the multiple topic abstracts;
[0010] obtaining, from the interactive device, first response information of the user to the first interactive information, and determining a target topic abstract from the plurality of topic abstracts based on the first response information;
[0011] generating a first drama script according to the target theme summary;
[0012] Polishing the first drama script using a preset auxiliary generation model to obtain a second drama script;
[0013] Determining second interaction information based on the second drama script, and displaying the second interaction information to the user through the interactive device; the second interaction information is used to prompt the user to review and annotate the second drama script;
[0014] obtaining, from the interactive device, second response information of the user in response to the second interactive information; the second response information including a review and annotation record of the user in response to the second drama script;
[0015] The second drama script is modified according to the second response information to obtain a target drama script.
[0016] In a second aspect, an embodiment of the present application provides a device for assisting the generation of a dramatic script. The device is located in a system for assisting the generation of a dramatic script. The system also includes an interactive device. The device includes:
[0017] An acquisition unit, configured to acquire a user's creation requirement text from the interactive device;
[0018] A processing unit is used to determine a plurality of topic summaries based on the creative requirement text; each topic summaries is used to represent a creative intention;
[0019] Determining first interaction information based on the multiple topic abstracts, and displaying the first interaction information to the user through the interactive device; the first interaction information is used to inquire about the user's creative intentions for the multiple topic abstracts;
[0020] The acquiring unit is configured to acquire, from the interactive device, first response information of the user to the first interactive information, and determine a target topic abstract from the plurality of topic abstracts based on the first response information;
[0021] The processing unit is configured to generate a first drama script based on the target theme summary;
[0022] Polishing the first drama script using a preset auxiliary generation model to obtain a second drama script;
[0023] Determining second interaction information based on the second drama script, and displaying the second interaction information to the user through the interactive device; the second interaction information is used to prompt the user to review and annotate the second drama script;
[0024] The acquiring unit is configured to acquire, from the interactive device, second response information of the user in response to the second interactive information; the second response information includes a review and annotation record of the user in response to the second drama script;
[0025] The processing unit is used to modify the second drama script according to the second response information to obtain a target drama script.
[0026] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs the method described in the first aspect.
[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method as described in the first aspect.
[0028] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is executed by a processor to implement the method described in the first aspect.
[0029] The implementation of the embodiments of the present application has the following beneficial effects:
[0030] In an embodiment of the present application, a drama script auxiliary generation device first obtains a user's creative requirement text from an interactive device. Then, based on the creative requirement text, it determines multiple topic summaries. Based on the multiple topic summaries, it determines first interaction information and displays the first interaction information to the user via the interactive device. Next, it obtains the user's first response information to the first interaction information from the interactive device. Based on the first response information, it determines a target topic summaries from the multiple topic summaries, thereby generating a first drama script based on the target topic summaries. Furthermore, it polishes the first drama script using a preset auxiliary generation model to obtain a second drama script. Based on the second drama script, it determines second interaction information and displays the second interaction information to the user via the interactive device. Finally, it obtains the user's second response information to the second interaction information from the interactive device. Based on the second response information, it modifies the second drama script to obtain the target drama script. In this way, it is possible to provide the user with multiple topic summaries based on the user's creative requirements, generate a first drama script corresponding to the target topic summaries based on the user's creative intent, and polish the first drama script to obtain a second drama script so that the text description in the second drama script is more accurate and consistent with the characteristics of the drama. Furthermore, the second drama script can be modified through the user's review and annotation records of the second drama script to obtain the target drama script, so as to create a drama script that meets the user's creative intentions and conforms to the characteristics of the drama, thereby improving the efficiency of drama script creation. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0032] Figure 1 A schematic diagram of an application scenario of an artificial intelligence-based drama script auxiliary generation method provided in an embodiment of the present application;
[0033] Figure 2 A flowchart of an artificial intelligence-based drama script assisted generation method provided in an embodiment of the present application;
[0034] Figure 3 A schematic diagram of a target chapter script provided in an embodiment of the present application;
[0035] Figure 4 A block diagram of the functional units of a drama script auxiliary generation device provided in an embodiment of the present application;
[0036] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0038] The terms "first," "second," "third," and "fourth," etc., in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, rather than to describe a specific order. In addition, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0039] References herein to "embodiments" mean that a particular feature, result, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0040] First, see Figure 1 , Figure 1 This is a schematic diagram of an application scenario of a method for assisting the generation of drama scripts based on artificial intelligence provided in an embodiment of the present application. Figure 1 The application scenario shown includes a drama script auxiliary generation system, which includes an interactive device and a drama script auxiliary generation apparatus.
[0041] Among them, the interactive device can be an electronic device that is installed with computer software, configured with a visual display interface, and is user-operable, including: smartphones, computers, tablet devices, etc. The interactive device can also include smart wearable devices, such as electronic watches, head-mounted displays (HMDs), smart headphones, etc. This application is not limited to this. In an embodiment of the present application, the interactive device is installed with computer software for assisting in the generation of drama scripts, and can display the operation interface of the computer software. The user can enter the creative requirements text on the operation interface of the computer software, and the interactive device can send the user's creative requirements text to the drama script assistance generation device. In addition, the computer software of the interactive device can call the artificial intelligence model from the drama script assistance generation device and interact with the user, so that the artificial intelligence model can create a drama script that is consistent with the user's creative intentions based on the user's creative requirements and interaction with the user.
[0042] Among them, the auxiliary device for generating a dramatic script can be a processor for data communication and efficient data processing, including: a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), etc. The auxiliary device for generating a dramatic script can also be an electronic device that integrates the above-mentioned processors, including: a computer, an intelligent communication device, etc. The auxiliary device for generating a dramatic script can also be a server with data transmission and reception, data caching and high-performance data processing, including: a rack server, a cloud server, a virtual private server (VPS), an application server, etc. This application is not limited to this. In an embodiment of the present application, the auxiliary device for generating a dramatic script can communicate with an interactive device to interact with the user through a built-in artificial intelligence model, thereby generating a dramatic script that meets the user's creative intentions.
[0043] It should be noted that the drama scripts in the embodiments of the present application are mainly described by taking Gan opera scripts as an example. Traditional Gan opera scripts are usually created based on the personal experience of playwrights or screenwriters, which takes a long time to create, resulting in low efficiency in the creation of Gan opera scripts.
[0044] To this end, the present application provides an artificial intelligence-based drama script auxiliary generation method for the above scenario. The drama script auxiliary generation device obtains the user's creative demand text from the interactive device;
[0045] The drama script auxiliary generation device determines multiple topic summaries based on the creation requirement text;
[0046] The drama script auxiliary generation device determines first interactive information based on the multiple topic summaries and displays the first interactive information to the user through the interactive device;
[0047] The drama script auxiliary generation device obtains first response information of the user to the first interaction information from the interactive device, and determines a target topic abstract from multiple topic abstracts based on the first response information;
[0048] The drama script auxiliary generation device generates a first drama script according to the target theme summary;
[0049] The drama script auxiliary generation device polishes the first drama script by using a preset auxiliary generation model to obtain a second drama script;
[0050] The drama script auxiliary generation device determines second interactive information based on the second drama script, and displays the second interactive information to the user through the interactive device;
[0051] The drama script auxiliary generation device obtains second response information of the user to the second interaction information from the interactive device;
[0052] The drama script auxiliary generation device modifies the second drama script according to the second response information to obtain the target drama script.
[0053] As can be seen, when applied to the above scenario, the drama script auxiliary generation device can provide the user with multiple topic summaries based on the user's creative needs, and through interaction with the user, determine a target topic summaries from the multiple topic summaries to generate a first drama script based on the target topic summaries, thereby generating a drama script that meets the user's creative needs and creative intentions. Then, the first drama script is polished using a preset auxiliary generation model to obtain a second drama script with dramatic characteristics and more accurate descriptions. Finally, based on the user's review and annotation records of the second drama script, the second drama script can be modified to obtain the target drama script, thereby helping the user create a drama script that meets the user's creative needs and has dramatic characteristics, thereby improving the efficiency of drama script creation.
[0054] This application will be explained using the Gan Opera script as an example. Figure 2 , Figure 2 This is a flow chart of an artificial intelligence-based method for assisting the generation of a play script, provided in an embodiment of the present application. This method is applied to a play script assisting generation device in a play script assisting generation system, which also includes an interactive device. This method includes, but is not limited to, the following steps:
[0055] S201: Obtain the user's creation requirement text from the interactive device.
[0056] In the embodiment of the present application, the creation requirement text is a text that describes the user's creation requirements. The user can input the creation requirement text on the interactive device, where the input method can include text input or voice input. For example, when the interactive device receives a voice message "Create a script about the life of ancient artists in the birthplace of Gan Opera", it can perform voice recognition on the voice message, convert the voice message into text format, and obtain the creation requirement text. The drama script auxiliary generation device can obtain the creation requirement text from the interactive device.
[0057] S202: Determine multiple topic summaries based on the creation requirement text.
[0058] In the embodiment of the present application, each theme abstract is used to represent a creative intent. The drama script auxiliary generation device can extract key information corresponding to the user's creative requirements from the creative requirement text, and then generate multiple theme abstracts based on the key information. The multiple theme abstracts can be selected by the user to determine the user's creative intent.
[0059] For example, based on the creation requirement text, multiple topic summaries are determined, which may include:
[0060] Performing first semantic recognition on the creation requirement text to obtain first semantic information;
[0061] Extract key information from the creative requirement text based on the first semantic information;
[0062] Acquire multiple background element sets corresponding to the background from the Gan Opera knowledge base;
[0063] Determine the main characters based on their characteristics;
[0064] Determine the plot structure corresponding to the genre;
[0065] A theme summary is generated according to the plot structure, the main characters, and each background element set in the multiple background element sets to obtain multiple theme summaries.
[0066] In this embodiment of the present application, key information may include genre, background, and character traits. Each background element set may include time, place, and cultural customs. Genre may be any of the following: comedy, tragedy, romance, etc. Character traits are descriptions of the main character, including their appearance, personality, occupation, etc., for example, "a considerate teacher with long hair."
[0067] Specifically, the drama script auxiliary generation device first performs a first semantic recognition on the creative requirement text to obtain first semantic information. This first semantic recognition can be performed on the creative requirement text using a pre-trained natural language processing (NLP) model. The NLP model can be a deep learning model based on the Transformer architecture, such as a Generative Pretrained Transformer (GPT). The first semantic information can be a feature vector corresponding to the creative requirement text, where the direction and eigenvalue of the feature vector are used to indicate the semantics of the creative requirement text.
[0068] The drama script generation aid then annotates each sentence in the creative requirement text based on the first semantic information corresponding to the creative requirement text, obtaining annotation information for each sentence. This annotation information is used to represent the semantics of each sentence. Based on this annotation information, key information such as genre, setting, and character traits can be extracted from the creative requirement text.
[0069] Furthermore, the script-generating device retrieves multiple background element sets corresponding to the backgrounds from the Gan Opera knowledge base. The Gan Opera knowledge base is a pre-built database based on historical data, storing data such as background element sets corresponding to different backgrounds, Gan Opera vocabulary, Gan Opera culture, traditional Gan Opera repertoires, and character stories. The script-generating device can search the Gan Opera knowledge base for background element sets based on the background corresponding to the required text.
[0070] Furthermore, the drama script auxiliary generation device determines the main characters based on their character characteristics. Character characteristics can include descriptions of multiple main characters, and therefore, there can be multiple main characters determined based on the character characteristics. Based on the character characteristics, the drama script auxiliary generation device generates descriptions of the main characters' names, ages, occupations, personalities, and other aspects. It then determines the plot structure corresponding to the genre. It is understood that each genre has a pre-defined plot structure. For example, the plot structure of a romance genre may include the encounter of the male and female protagonists, their mutual affection, misunderstandings or setbacks, and finally a marriage or a regretful ending.
[0071] Finally, the drama script auxiliary generation device can generate a theme summary based on the plot structure, main characters, and each background element set in multiple background element sets, thereby obtaining multiple theme summaries. Specifically, the drama script auxiliary generation device can generate multiple theme summaries by calling GPT. It should be noted that each theme summary corresponds to a creative intent. By determining multiple theme summaries, the drama script auxiliary generation device can provide users with multiple creative ideas and, through interaction with the user, determine the user's actual creative intent, so as to create a drama script that meets the user's creative intent and improve the efficiency of Gan Opera script creation.
[0072] It can be seen that by performing the first semantic recognition on the creative demand text, the first semantic information can be obtained, and then the key information such as genre, background and character characteristics can be extracted from the creative demand text through the first semantic information. The drama script auxiliary generation device can obtain multiple background element sets corresponding to the background from the Gan Opera knowledge base, and determine the main characters according to the character characteristics, and then determine the plot structure corresponding to the genre. Finally, a theme summary is generated based on the plot structure, the main characters, and each background element set in the multiple background element sets to obtain multiple theme summaries, thereby providing users with multiple theme summaries based on their creative needs, enriching the creative ideas of the script, and generating a Gan Opera script that is consistent with the user's creative intentions, thereby improving the creation efficiency of the Gan Opera script.
[0073] S203: Determine first interaction information according to the multiple topic summaries, and display the first interaction information to the user through the interactive device.
[0074] In an embodiment of the present application, the first interaction information is used to inquire about the user's creative intent with respect to multiple theme summaries. Specifically, after determining multiple theme summaries, the drama script auxiliary generation device generates first interaction information corresponding to the multiple theme summaries and sends the first interaction information to the interactive device, which then displays the multiple theme summaries in sequence and inquires about the user's creative intent with respect to the multiple theme summaries.
[0075] S204: Obtaining first response information of the user to the first interaction information from the interactive device, and determining a target topic abstract from the plurality of topic abstracts according to the first response information.
[0076] In an embodiment of the present application, a user selects a topic abstract from multiple topic abstracts displayed on an interactive device as a target topic abstract. After the user selects the target topic abstract, the interactive device generates a first response message, which includes the target topic abstract. The drama script auxiliary generation device can obtain the first response message from the interactive device and determine the target topic abstract based on the first response message.
[0077] S205: Generate a first drama script based on the target theme summary.
[0078] In an embodiment of the present application, the drama script auxiliary generation device can split the drama script into multiple chapters according to the target theme summary, and generate a chapter script corresponding to each chapter. Finally, multiple chapter scripts corresponding to multiple chapters are merged to obtain the first drama script.
[0079] Exemplarily, generating a first drama script according to the target theme summary may include:
[0080] Performing second semantic recognition on the target topic summary to obtain second semantic information;
[0081] Determine the plot development process based on the second semantic information;
[0082] Determine multiple chapters based on the plot development process;
[0083] Determine the scene and character information corresponding to each chapter in multiple chapters;
[0084] Generate corresponding chapter scripts according to the scene and character information corresponding to each chapter in the multiple chapters, and obtain multiple chapter scripts;
[0085] Based on multiple chapter scripts, determine the first drama script.
[0086] In this embodiment of the present application, the plot development process includes: opening, development, climax, and ending. The character information includes all characters in the chapter corresponding to the character information and the character settings corresponding to each character. The character settings corresponding to each character are used to describe the character's appearance, expression, personality, behavior, etc.
[0087] Specifically, the drama script auxiliary generation device first performs a second semantic recognition on the target topic summary. For example, it can use GPT or the Bidirectional Encoder Representations from Transformers (BERT) model to perform the second semantic recognition on the target topic summary to obtain second semantic information. The second semantic information may include the feature vector corresponding to each sentence in the target topic summary. The direction and feature value of the feature vector corresponding to each sentence are used to indicate the semantics corresponding to the sentence.
[0088] The script-generating auxiliary device then breaks the target theme summary into multiple flows based on the plot structure corresponding to the target theme summary. Based on the second semantic information, it adjusts the content within these flows to obtain the plot development flow. For example, if the plot structure corresponding to the target theme summary is divided into four paragraphs, the script-generating auxiliary device first categorizes the four paragraphs into four flows: opening, development, climax, and ending. Then, based on the second semantic information, it categorizes sentences in the four paragraphs that do not match the flow corresponding to that paragraph into the corresponding flow, thereby obtaining the plot development flow.
[0089] Furthermore, the drama script auxiliary generation device determines multiple storylines based on the plot development process, each of which includes a plot name, story scene, plot characters, and story summary corresponding to the storyline. It should be noted that any of the processes of opening, development, climax, and ending may include at least one storyline. The drama script auxiliary generation device determines multiple chapters based on the multiple storylines, with each chapter corresponding to a storyline. Then, the drama script auxiliary generation device determines the scene and character information corresponding to each of the multiple chapters based on the storylines corresponding to each of the multiple chapters.
[0090] Furthermore, the drama script auxiliary generation device generates a corresponding chapter script based on the scene and character information corresponding to each chapter in the multiple chapters, thereby obtaining multiple chapter scripts. Exemplarily, generating a corresponding chapter script based on the scene and character information corresponding to each chapter in the multiple chapters, thereby obtaining multiple chapter scripts, may include:
[0091] Get the target scene and target role information corresponding to the target chapter;
[0092] Generate a dialogue text corresponding to at least one character setting to obtain at least one segment of dialogue text;
[0093] Performing third semantic recognition on at least one segment of dialogue text to obtain at least one third semantic information;
[0094] Determining, based on the at least one third semantic information, the coherence between each line in the at least one segment of the dialogue text and any line in the at least one segment of the dialogue text, and determining, based on the coherence, the order of each line in the at least one segment of the dialogue text;
[0095] Arranging all lines in the at least one segment of the dialogue text according to the order of each line in the at least one segment of the dialogue text to obtain a target dialogue text;
[0096] Determining a character performance corresponding to each line in the target dialogue text based on the at least one character setting and the at least one third semantic information;
[0097] Determine the chapter background corresponding to the target chapter, and based on the chapter background, determine the narration corresponding to the target chapter;
[0098] The target chapter script is determined based on the target scene, narration, at least one character, the target dialogue text, and the character performance corresponding to each line in the target dialogue text; the target chapter script is the chapter script corresponding to the target chapter in multiple chapter scripts.
[0099] In an embodiment of the present application, the target character information includes at least one character and at least one character setting, and the at least one character corresponds one-to-one to the at least one character setting. The target chapter is any one of the multiple chapters. Each segment of dialogue text includes all lines of the character corresponding to the character setting in the target chapter. At least one segment of dialogue text corresponds one-to-one to at least one third semantic information. The character performance includes all actions, all intonations, and all expressions of the character corresponding to the character performance when performing the lines corresponding to the character performance.
[0100] Specifically, the drama script auxiliary generation device first obtains a target chapter from multiple chapters and obtains target scene and target character information corresponding to the target chapter. Based on at least one character in the target character information, the GPT is called to generate at least one dialogue text corresponding to the at least one character setting, with each character corresponding to a dialogue text. Furthermore, the GPT is called to perform third semantic recognition on the at least one dialogue text to obtain at least one third semantic information. Each third semantic information includes semantic information corresponding to each line in the dialogue text corresponding to the third semantic information.
[0101] Furthermore, the auxiliary drama script generation device determines the coherence between each line in at least one paragraph of dialogue text and any line in the at least one paragraph of dialogue text based on at least one third semantic information. For example, the at least one third semantic information may include a feature vector corresponding to each line in at least one paragraph of dialogue text, and the direction and feature value of the feature vector corresponding to each line are used to indicate the semantics corresponding to each line. The auxiliary drama script generation device can determine the coherence between any two lines in at least one paragraph of dialogue text by determining the root mean square of the feature value corresponding to each line and the feature value corresponding to any line. The smaller the root mean square of the feature value corresponding to any two lines, the stronger the coherence between the two lines. Therefore, the auxiliary drama script generation device can determine the line with the strongest coherence with each line, that is, the line adjacent to each line, based on the root mean square of the feature value corresponding to each line and the feature value corresponding to any line. Then, based on the direction of the feature vector corresponding to each line and the direction of the feature vector corresponding to the line with the strongest coherence, the order of each line relative to adjacent lines is determined, thereby obtaining the order of each line in at least one segment of dialogue text. The mapping relationship between the feature vector direction and the order can be pre-set based on actual test results.
[0102] The script-generating device then rearranges all lines in the at least one dialogue text based on the order of each line in the at least one dialogue text to obtain a target dialogue text. Next, based on the character settings of each character in the target chapter and the semantic information corresponding to each line, the script-generating device determines all actions, intonations, and expressions of each character in the target chapter when performing the corresponding lines, that is, determines the character performance corresponding to each line in the target dialogue text.
[0103] Furthermore, the drama script auxiliary generation device will determine the chapter background corresponding to the target chapter based on the story plot corresponding to the target chapter, and determine the narration corresponding to the target chapter based on the chapter background, and the narration includes a description of the chapter background of the target chapter and the target scene.
[0104] Finally, the target chapter script is determined based on the target scene, narration, at least one character, target dialogue text, and the character performance corresponding to each line in the target dialogue text. The generated target chapter script is as follows: Figure 3 As shown, the name of the target chapter is generated at the top of the target chapter script, and the first part of the main body of the chapter script is a description of the target scene. The second part of the main body of the chapter script is the narration corresponding to the target chapter. The third part of the main body of the chapter script includes at least one character, the target line text, and the character performance corresponding to each line in the target line text. Figure 3As shown, the target dialogue text includes multiple lines, such as the first line t1, the second line t2, the third line t3, and so on. The first character a first performs "the first line t1" using the first action d1, the first intonation y1, and the first demeanor s1. Then, the second character b performs "the second line t2" using the second action d2, the second intonation y2, and the second demeanor s2. Next, the second character b performs "the third line t3, the fourth line t4, and the fifth line t5" using the third action d3, the third intonation y3, and the third demeanor s3. Then, the first character a and the second character b simultaneously perform "the sixth line t6.": the first character a performs the fourth action d4, the fourth intonation y4, and the fourth demeanor s4, while the second character b performs the fifth action d5, the fifth intonation y5, and the fifth demeanor s5. Finally, the third character c performs the sixth action d6 and the sixth demeanor s6.
[0105] In this way, according to the above-mentioned processing method of generating a target chapter script corresponding to a target chapter, a chapter script corresponding to any one of a plurality of chapters can be generated to obtain a plurality of chapter scripts.
[0106] Thus, by generating a dialogue text corresponding to at least one role setting in the target chapter, at least one dialogue text can be obtained. By using at least one third semantic information corresponding to at least one dialogue text, the coherence of any two lines in at least one dialogue text can be determined to determine the order corresponding to any two lines. Then, based on at least one role setting and at least one third semantic information corresponding to the target chapter, the character performance corresponding to each line in the target dialogue text can be determined. Next, the chapter background corresponding to the target chapter is determined, and based on the chapter background, the narration corresponding to the target chapter is determined. Finally, based on the target scene, narration, at least one role, the target dialogue text, and the character performance corresponding to each line in the target dialogue text, the target chapter script is determined, thereby determining the chapter scripts corresponding to multiple chapters in turn. In this way, users can be helped to create multiple chapter scripts corresponding to multiple chapters, thereby improving the efficiency of creating Gan Opera scripts.
[0107] Finally, the drama script auxiliary generation device will splice the multiple chapter scripts according to the plot development process to obtain a first drama script. When splicing the multiple chapter scripts, the drama script auxiliary generation device determines the corresponding chapter introduction of each chapter script. Based on the corresponding chapter introduction of each chapter script, it determines the previous chapter synopsis corresponding to the next chapter of the chapter, and inserts the previous chapter synopsis corresponding to the chapter into the narration of each chapter script. In this way, the multiple chapter scripts can be connected in series to obtain the first drama script.
[0108] S206: Polishing the first drama script through a preset auxiliary generation model to obtain a second drama script.
[0109] In an embodiment of the present application, the preset auxiliary generation model may include: a grammatical correction module, a semantic coherence module, a prosody adjustment module, and a check optimization module. The grammatical correction module, the semantic coherence module, the prosody adjustment module, and the check optimization module are all deep learning models based on the Transformer architecture. For example, the grammatical correction module, the semantic coherence module, the prosody adjustment module, and the check optimization module can be four generative pre-trained transformers obtained by pre-training based on different data sets, and the data sets for training each module can be pre-collected according to the actual functions of each module.
[0110] It is understandable that since the first drama script is generated directly based on the target theme summary, the description in the first drama script may not be consistent with the corresponding description of Gan Opera. Therefore, the drama script auxiliary generation device needs to polish the first drama script through a preset auxiliary generation model to obtain a second drama script with Gan Opera characteristics and more accurate description.
[0111] Exemplarily, polishing the first drama script by using a preset auxiliary generation model to obtain a second drama script may include:
[0112] Preprocessing the first drama script to obtain a first processed text;
[0113] Correcting grammatical errors in the first processed text by a grammatical error correction module to obtain a second processed text;
[0114] Segmenting the second processed text using a semantic coherence module to obtain a plurality of segmented words, performing a fourth semantic recognition on each of the plurality of segmented words to obtain a plurality of fourth semantic information, performing context understanding on each of the plurality of segmented words based on the plurality of fourth semantic information to obtain a plurality of context information; determining fuzzy words in the plurality of segmented words based on the plurality of context information to obtain at least one fuzzy word, and selecting at least one word from a Gan opera knowledge base to replace the at least one fuzzy word to obtain a third processed text;
[0115] The third processed text is adjusted by a rhythm adjustment module to obtain a second drama script.
[0116] In the embodiment of the present application, multiple word segments correspond to multiple pieces of context information in a one-to-one manner, and at least one word corresponds to at least one misused word in a one-to-one manner.
[0117] Specifically, the drama script auxiliary generation device first pre-processes the first drama script, including: converting the first drama script into a text format that can be input into a preset auxiliary generation model, removing unrecognizable format codes, hyperlinks, special characters and other interference information, and obtaining a first processed text.
[0118] The drama script auxiliary generation device then corrects grammatical errors in the first processed text by invoking a grammatical correction module of a preset auxiliary generation model. The grammatical correction module can detect grammatical errors in the first processed text based on preset grammatical rules. Grammatical errors include: incorrect subject-predicate structure, misused parts of speech, incorrect punctuation, etc. By correcting the grammatical errors in the first processed text through the grammatical correction module, a second processed text can be generated.
[0119] Furthermore, the drama script auxiliary generation device can input the second processed text into the semantic coherence module, and the semantic coherence module first performs word segmentation on the second processed text and removes the function words after the word segmentation to obtain multiple word segmentations. Then, the fourth semantic recognition is performed on the multiple word segmentations to obtain multiple fourth semantic information, one semantic information corresponding to each word segmentation, wherein the fourth semantic recognition is similar to the semantic recognition in the above embodiment and will not be repeated here. Then, the semantic coherence module will perform context understanding on each word segmentation in the multiple word segmentations to obtain multiple context information, and the context information corresponding to each word segmentation is used to indicate the correlation between the word segmentation and the context semantics. According to the multiple context information, the misused words in the multiple word segmentations can be determined to obtain at least one misused word, wherein the misused word is a word whose semantic correlation with the context semantics is less than the preset correlation. The semantic coherence module will search for at least one word whose correlation with the context semantics is greater than or equal to the preset correlation from the Gan Opera knowledge base based on the context information corresponding to each word segmentation in the at least one misused word, and replace the at least one misused word, so as to obtain the third processed text.
[0120] Finally, the drama script auxiliary generation device inputs the third processed text into the rhythm adjustment module to adjust the text rhythm in the third processed text to obtain a second drama script that conforms to the rhythm of Gan Opera.
[0121] It can be seen that in the embodiment of the present application, the first processed text is obtained by pre-processing the first drama script, and then the first processed text is input into the grammar correction module of the preset auxiliary generation model for grammar correction to obtain the second processed text. Then, the second processed text is input into the semantic coherence module, and the semantic coherence module can determine the misused words in the second processed text based on the fourth semantic information and context information of each word segment in the second processed text, and replace the misused words to obtain the third processed text. Finally, the rhythm adjustment module can be used to adjust the rhythm of the third processed text to obtain the second drama script. Thus, the word expression in the generated second drama script is more accurate and conforms to the rhythm of Gan Opera, which can help users to create Gan Opera scripts more efficiently and improve creative efficiency.
[0122] Exemplarily, adjusting the third processed text by the rhythm adjustment module to obtain the second drama script may include:
[0123] determining, by the prosody adjustment module, content words in the third processed text that appear more than a preset number of times, to obtain a plurality of content words;
[0124] Selecting multiple professional words from the Gan Opera knowledge base to replace multiple content words to obtain a fourth processed text;
[0125] Sentence-segmenting the fourth processed text to obtain a plurality of sentences;
[0126] Performing intonation marking on multiple sentences to obtain multiple intonation marking information;
[0127] Determining similarity between each intonation marking information and adjacent intonation marking information in the plurality of intonation marking information, and determining non-rhyming sentences in the plurality of sentences based on the similarity between each intonation marking information and the adjacent intonation marking information, to obtain at least one non-rhyming sentence;
[0128] According to the multiple intonation tagging information, synonym conversion is performed on at least one non-rhyming sentence in the fourth processed text to obtain a second drama script.
[0129] In the embodiment of the present application, multiple professional words correspond one-to-one with multiple content words, and multiple sentences correspond one-to-one with multiple intonation annotation information.
[0130] Specifically, after the drama script auxiliary generation device inputs the third processed text into the prosody adjustment module, the prosody adjustment module first identifies all content words in the third processed text. Content words are words with actual meanings, including nouns, verbs, adjectives, etc. The prosody adjustment module then determines the number of occurrences of each content word in the third processed text and selects content words with a number of occurrences greater than a preset number, thereby obtaining a plurality of content words.
[0131] Then, the prosody adjustment module searches the Gan opera knowledge base for multiple professional terms that match the multiple content words, where the professional terms are synonymous with the content words and are consistent with the expression of Gan opera. The prosody adjustment module replaces the multiple content words in the third processed text with the multiple professional terms to obtain a fourth processed text.
[0132] Furthermore, the prosody adjustment module segments the fourth processed text into sentences to obtain multiple sentences, and performs intonation tagging on each of the multiple sentences to obtain multiple intonation tagging information. Each intonation tagging information includes intonation tagging information for all characters in the sentence corresponding to the intonation tagging information. The prosody adjustment module can determine the similarity between the intonation tagging information corresponding to any two adjacent sentences in the multiple sentences. For example, when the intonation tagging information of a sentence is "2124," it indicates that the tones corresponding to the four characters in the sentence are: 2, 1, 2, and 4, respectively. If the intonation tagging information of the sentence adjacent to the sentence is "4124," the similarity between the intonation tagging information of the two sentences can be 4 / [(4-2)+(1-1)+(2-2)+(4-4)]. If the similarity between the intonation tagging information of the target sentence and the two adjacent sentences is less than a preset similarity, the target sentence is determined to be a non-rhyming sentence, thereby obtaining at least one non-rhyming sentence. The target sentence is any one of the multiple sentences.
[0133] Finally, the prosody adjustment module can perform synonym conversion on each non-rhyming sentence based on the intonation tag information of the sentences adjacent to each non-rhyming sentence, so that the similarity between the intonation tag information of each non-rhyming sentence and the intonation tag information of the adjacent sentences is greater than or equal to a preset similarity. In this way, the prosody adjustment module can obtain a second drama script by performing synonym conversion on at least one non-rhyming sentence in the fourth processed text.
[0134] It can be seen that in the embodiment of the present application, the prosody adjustment module can be used to replace the content words in the third processed text that appear more than a preset number of times with professional words related to Gan Opera, thereby obtaining a fourth processed text, so that the fourth processed text conforms to the expression of Gan Opera vocabulary. In addition, each sentence in the fourth processed text can be annotated with intonation, and non-rhyming sentences in the fourth processed text can be determined based on the intonation annotation information of each sentence. Finally, by performing synonym conversion on the non-rhyming sentences in the fourth processed text, the obtained second drama script can be made to conform to the rhythm of Gan Opera, thereby improving the performance effect of Gan Opera, thereby helping users create drama scripts that conform to the characteristics of Gan Opera and improving creative efficiency.
[0135] S207: Determine second interaction information according to the second drama script, and display the second interaction information to the user through the interactive device.
[0136] In this embodiment of the present application, the second interaction information is used to prompt the user to review and annotate the second drama script. After determining the second drama script, the drama script auxiliary generation device can generate second interaction information corresponding to the second drama script, display the second drama script to the user through the interactive device, and prompt the user to review and annotate the generated second drama script.
[0137] S208: Obtain second response information of the user to the second interaction information from the interaction device.
[0138] In this embodiment of the present application, the second response information includes a record of the user's review and comments on the second drama script. The user can review and comment on the second drama script by operating on the interactive device, annotating issues and suggesting revisions to the second drama script. After the user completes the comments, the interactive device generates the second response information. The drama script auxiliary generation device can obtain the second response information from the interactive device.
[0139] S209: Modify the second drama script according to the second response information to obtain the target drama script.
[0140] In an embodiment of the present application, the drama script auxiliary generation device can determine the user's modification intention by performing semantic recognition on the review annotation record, and modify the second drama script according to the user's modification intention to obtain a target drama script that meets the user's modification intention.
[0141] Exemplarily, modifying the second drama script according to the second response information to obtain the target drama script may include:
[0142] Determine the content to be revised in the second drama script based on the review and annotation records;
[0143] Perform the fifth semantic recognition on the review annotation record to obtain the modification intention;
[0144] Modify the content to be modified according to the modification intention to obtain a third drama script;
[0145] The third drama script is fully checked through the checking and optimization module to obtain the checking results; based on the checking results, the third drama script is optimized to obtain the target drama script.
[0146] In an embodiment of the present application, the review annotation record may include: modification type, modification direction, location to be modified, etc.
[0147] Specifically, the script-generating device first extracts the content to be modified from the second script based on the location of the modification in the user's review and annotation records. The content to be modified may include words or sentences to be modified. The script-generating device then uses GPT to perform fifth semantic recognition on the review and annotation records to determine the user's modification intention.
[0148] The script-generating device can then modify the content to be modified based on the intended modification. For example, if the user's modification intent is to "change the first word in the script to the second word," the script-generating device can search for all occurrences of the first word in the second script and replace them with the second word. By modifying the content to be modified, a third script can be generated.
[0149] Finally, the script-assisted generation device can input the third script into the checking and optimization module of the pre-set auxiliary generation model. The checking and optimization module will perform a full text check on the modified third script, including grammar, phrase expression, punctuation, and other checks. This check of the third script can produce a check result, which can include at least one of the following: error-free, grammatically incorrect sentences, incorrectly expressed phrases, and incorrect punctuation. Finally, based on the check result, the checking and optimization module can optimize the third script, correcting grammatically incorrect sentences, incorrectly expressed phrases, and incorrect punctuation, to produce a target script.
[0150] Therefore, according to the user's review and annotation records, the content to be modified in the generated drama script can be modified to obtain a drama script that meets the user's needs, thereby improving the quality of script generation and improving the efficiency of Gan Opera script creation.
[0151] In summary, in an embodiment of the present application, a drama script auxiliary generation device first obtains a user's creative demand text from an interactive device, then determines multiple topic summaries based on the creative demand text. Based on the multiple topic summaries, a first interaction message is determined, and the first interaction message is displayed to the user via the interactive device. Next, the user's first response information to the first interaction message is obtained from the interactive device, and based on the first response information, a target topic summary is determined from the multiple topic summaries, thereby generating a first drama script based on the target topic summary. Furthermore, the first drama script is polished using a preset auxiliary generation model to obtain a second drama script, and second interaction information is determined based on the second drama script, and the second interaction information is displayed to the user via the interactive device. Finally, the user's second response information to the second interaction information is obtained from the interactive device, and based on the second response information, the second drama script is modified to obtain the target drama script. In this way, multiple topic summaries can be provided to the user based on the user's creative demand, and a first drama script corresponding to the target topic summary is generated based on the user's creative intention. The first drama script is then polished to obtain a second drama script, so that the text description in the second drama script is more accurate and conforms to the characteristics of Gan Opera. Moreover, the second drama script can be modified through the user's review and annotation records of the second drama script to obtain the target drama script, so as to create a drama script that meets the user's creative intentions and conforms to the characteristics of Gan Opera, thereby improving the creation efficiency of Gan Opera scripts.
[0152] See Figure 4 , Figure 4 This is a block diagram of the functional units of a device for assisting the generation of a dramatic script, provided in an embodiment of the present application. Device 400 is located within a system for assisting the generation of dramatic scripts, which also includes an interactive device. Device 400 includes an acquisition unit 401 and a processing unit 402.
[0153] The acquisition unit 401 is used to acquire the user's creation requirement text from the interactive device;
[0154] The processing unit 402 is used to determine a plurality of theme summaries based on the creative requirement text; each theme summaries is used to represent a creative intention;
[0155] Determining first interaction information based on the multiple topic summaries and displaying the first interaction information to the user through the interactive device; the first interaction information is used to inquire about the user's creative intentions with respect to the multiple topic summaries;
[0156] An acquiring unit 401 is configured to acquire first response information of a user to first interaction information from an interactive device, and determine a target topic summary from a plurality of topic summaries based on the first response information;
[0157] Processing unit 402, for generating a first drama script according to the target theme summary;
[0158] Polishing the first drama script by using a preset auxiliary generation model to obtain a second drama script;
[0159] Determining second interactive information based on the second drama script, and displaying the second interactive information to the user through the interactive device; the second interactive information is used to prompt the user to review and annotate the second drama script;
[0160] The acquisition unit 401 is configured to acquire, from the interactive device, second response information of the user in response to the second interaction information; the second response information includes a record of the user's review and annotation of the second drama script;
[0161] The processing unit 402 is configured to modify the second drama script according to the second response information to obtain a target drama script.
[0162] In a possible embodiment, in determining multiple topic summaries based on the creative requirement text, the processing unit 402 is specifically configured to:
[0163] Performing first semantic recognition on the creation requirement text to obtain first semantic information;
[0164] Extract key information from the creative requirement text based on the first semantic information; key information includes: genre, background and character characteristics;
[0165] Obtain multiple background element sets corresponding to the background from the Gan Opera knowledge base; each background element set includes: time, place, and cultural customs;
[0166] Determine the main characters based on their characteristics;
[0167] Determine the plot structure corresponding to the genre;
[0168] A theme summary is generated according to the plot structure, the main characters, and each background element set in the multiple background element sets to obtain multiple theme summaries.
[0169] In a possible embodiment, in generating the first drama script according to the target theme summary, the processing unit 402 is specifically configured to:
[0170] Performing second semantic recognition on the target topic summary to obtain second semantic information;
[0171] Determine the plot development process based on the second semantic information; the plot development process includes: opening, development, climax and ending;
[0172] Determine multiple chapters based on the plot development process;
[0173] Determine the scene and character information corresponding to each chapter in multiple chapters;
[0174] Generate corresponding chapter scripts according to the scene and character information corresponding to each chapter in the multiple chapters, and obtain multiple chapter scripts;
[0175] Based on multiple chapter scripts, determine the first drama script.
[0176] In a possible embodiment, in generating corresponding chapter scripts according to the scene and character information corresponding to each of the multiple chapters to obtain the multiple chapter scripts, the processing unit 402 is specifically configured to:
[0177] Obtain target scene and target character information corresponding to a target chapter; the target character information includes at least one character and at least one character setting, and the at least one character corresponds to the at least one character setting in a one-to-one manner; the target chapter is any one of the multiple chapters;
[0178] Generate a dialogue text corresponding to at least one character setting to obtain at least one segment of dialogue text; each segment of dialogue text includes all the dialogues of the character corresponding to the character setting in the target chapter;
[0179] Performing third semantic recognition on at least one segment of dialogue text to obtain at least one third semantic information; at least one segment of dialogue text corresponds to at least one third semantic information; each third semantic information includes semantic information corresponding to each line in the dialogue text corresponding to the third semantic information;
[0180] Determining, based on the at least one third semantic information, the coherence between each line in the at least one segment of the dialogue text and any line in the at least one segment of the dialogue text, and determining, based on the coherence, the order of each line in the at least one segment of the dialogue text;
[0181] Arranging all lines in the at least one segment of the dialogue text according to the order of each line in the at least one segment of the dialogue text to obtain a target dialogue text;
[0182] Determining, based on at least one character setting and at least one third semantic information, a character performance corresponding to each line in the target dialogue text; the character performance including all actions, all intonations, and all expressions of the character corresponding to the character performance when performing the line corresponding to the character performance;
[0183] Determine the chapter background corresponding to the target chapter, and based on the chapter background, determine the narration corresponding to the target chapter;
[0184] The target chapter script is determined based on the target scene, narration, at least one character, the target dialogue text, and the character performance corresponding to each line in the target dialogue text; the target chapter script is the chapter script corresponding to the target chapter in multiple chapter scripts.
[0185] In one possible embodiment, the preset auxiliary generation model includes: a grammatical error correction module, a semantic coherence module, and a rhythm adjustment module; in polishing the first drama script using the preset auxiliary generation model to obtain the second drama script, the processing unit 402 is specifically configured to:
[0186] Preprocessing the first drama script to obtain a first processed text;
[0187] Correcting grammatical errors in the first processed text by a grammatical error correction module to obtain a second processed text;
[0188] Segmenting the second processed text using a semantic coherence module to obtain a plurality of segmented words, performing a fourth semantic recognition on each of the plurality of segmented words to obtain a plurality of fourth semantic information, performing context understanding on each of the plurality of segmented words based on the plurality of fourth semantic information to obtain a plurality of context information; the plurality of segmented words are in one-to-one correspondence with the plurality of context information, determining misused words in the plurality of segmented words based on the plurality of context information to obtain at least one misused word, selecting at least one word from a Gan opera knowledge base to replace the at least one misused word, and obtaining a third processed text; the at least one word is in one-to-one correspondence with the at least one misused word;
[0189] The third processed text is adjusted by a rhythm adjustment module to obtain a second drama script.
[0190] In a possible embodiment, in terms of adjusting the third processed text by the rhythm adjustment module to obtain the second drama script, the processing unit 402 is specifically configured to:
[0191] determining, by the prosody adjustment module, content words in the third processed text that appear more than a preset number of times, to obtain a plurality of content words;
[0192] Selecting multiple professional words from the Gan Opera knowledge base to replace the multiple content words to obtain a fourth processed text; the multiple professional words correspond to the multiple content words in a one-to-one manner;
[0193] Sentence-segmenting the fourth processed text to obtain a plurality of sentences;
[0194] Performing intonation tagging on the plurality of sentences to obtain a plurality of intonation tagging information; the plurality of sentences are in one-to-one correspondence with the plurality of intonation tagging information;
[0195] Determining similarity between each intonation marking information and adjacent intonation marking information in the plurality of intonation marking information, and determining non-rhyming sentences in the plurality of sentences based on the similarity between each intonation marking information and the adjacent intonation marking information, to obtain at least one non-rhyming sentence;
[0196] According to the multiple intonation tagging information, synonym conversion is performed on at least one non-rhyming sentence in the fourth processed text to obtain a second drama script.
[0197] In a possible embodiment, the preset auxiliary generation model further includes a checking and optimization module; in terms of modifying the second drama script according to the second response information to obtain a target drama script, the processing unit 402 is specifically configured to:
[0198] Determining the content to be modified in the second drama script based on the review and annotation record;
[0199] Performing fifth semantic recognition on the review annotation record to obtain modification intention;
[0200] Modify the content to be modified according to the modification intention to obtain a third drama script;
[0201] The third drama script is fully checked by the checking and optimizing module to obtain a checking result; and the third drama script is optimized according to the checking result to obtain the target drama script.
[0202] See Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, electronic device 500 includes a transceiver 501, a processor 502, and a memory 503. These are connected via a bus 504. Memory 503 is used to store computer programs and data, and can transmit data stored in memory 503 to processor 502. Electronic device 500 may include device 400 for assisting in the generation of a dramatic script.
[0203] The processor 502 is configured to read the computer program in the memory 503 and perform the following operations:
[0204] Obtain the user's creative demand text from the interactive device;
[0205] Determine multiple topic summaries based on the creative requirements text;
[0206] determining first interaction information based on the multiple topic summaries, and displaying the first interaction information to the user through the interactive device;
[0207] obtaining, from the interactive device, first response information of the user to the first interaction information, and determining a target topic summary from a plurality of topic summaries based on the first response information;
[0208] Generate the first drama script based on the target theme summary;
[0209] Polishing the first drama script by using a preset auxiliary generation model to obtain a second drama script;
[0210] determining second interactive information according to the second drama script, and presenting the second interactive information to the user through the interactive device;
[0211] obtaining, from the interactive device, second response information of the user in response to the second interaction information;
[0212] According to the second response information, the second drama script is modified to obtain the target drama script.
[0213] The above mainly introduces the solution of the embodiment of the present application from the perspective of the execution process of the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0214] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement part or all of the steps of any one of the methods described in the above method embodiments.
[0215] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the methods described in the above method embodiments.
[0216] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required for this application.
[0217] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0218] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0219] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0220] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of software program modules.
[0221] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk, or optical disk, etc., various media that can store program code.
[0222] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable memory, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0223] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for assisting the generation of drama scripts based on artificial intelligence, characterized in that: A drama script auxiliary generation device is used in a drama script auxiliary generation system, wherein the drama script auxiliary generation system also includes an interactive device; and the method includes: Obtaining the user's creation requirement text from the interactive device; Determine multiple topic summaries based on the creative requirement text; each topic summaries is used to represent a creative intention; Determining first interaction information based on the multiple topic abstracts, and displaying the first interaction information to the user through the interactive device; the first interaction information is used to inquire about the user's creative intentions for the multiple topic abstracts; obtaining, from the interactive device, first response information of the user to the first interactive information, and determining a target topic abstract from the plurality of topic abstracts based on the first response information; generating a first drama script according to the target theme summary; Polishing the first drama script using a preset auxiliary generation model to obtain a second drama script; the preset auxiliary generation model includes: a grammatical error correction module, a semantic coherence module, and a rhythm adjustment module; the grammatical error correction module, the semantic coherence module, and the rhythm adjustment module are all deep learning models based on the Transformer architecture; Determining second interaction information based on the second drama script, and displaying the second interaction information to the user through the interactive device; the second interaction information is used to prompt the user to review and annotate the second drama script; obtaining, from the interactive device, second response information of the user in response to the second interactive information; the second response information including a review and annotation record of the user in response to the second drama script; modifying the second drama script according to the second response information to obtain a target drama script; The polishing of the first drama script by using a preset auxiliary generation model to obtain a second drama script includes: Preprocessing the first drama script to obtain a first processed text; Correcting grammatical errors in the first processed text by the grammatical error correction module to obtain a second processed text; The second processed text is segmented by the semantic coherence module to obtain a plurality of segmented words, a fourth semantic recognition is performed on each of the plurality of segmented words to obtain a plurality of fourth semantic information, and a context understanding is performed on each of the plurality of segmented words based on the plurality of fourth semantic information to obtain a plurality of context information; the plurality of segmented words correspond one-to-one to the plurality of context information, misused words in the plurality of segmented words are determined based on the plurality of context information to obtain at least one misused word, and at least one word is selected from a Gan opera knowledge base to replace the at least one misused word to obtain a third processed text; the at least one word corresponds one-to-one to the at least one misused word; The rhythm adjustment module determines the content words that appear more than a preset number of times in the third processed text, and obtains a plurality of content words; selects a plurality of professional words from the Gan opera knowledge base to replace the plurality of content words, and obtains a fourth processed text; the plurality of professional words correspond one-to-one with the plurality of content words, wherein the professional words are words that are synonymous with the corresponding content words and conform to the expression of Gan opera words; the fourth processed text is divided into sentences to obtain a plurality of sentences; the plurality of sentences are annotated with intonation to obtain a plurality of intonation annotation information; the plurality of sentences correspond one-to-one with the plurality of intonation annotation information; each intonation annotation information includes the intonation annotation information of all characters in the sentence corresponding to the intonation annotation information; confirm The method further comprises determining a similarity between each intonation marking information and an adjacent intonation marking information in the plurality of intonation marking information, and determining a non-rhyming sentence in the plurality of sentences based on the similarity between each intonation marking information and the adjacent intonation marking information to obtain at least one non-rhyming sentence, specifically: if the similarity between the intonation marking information corresponding to the target sentence and the intonation marking information between its two adjacent sentences is less than a preset similarity, determining that the target sentence is a sentence in the at least one non-rhyming sentence; the target sentence is any one of the plurality of sentences; and performing synonym conversion on the at least one non-rhyming sentence in the fourth processed text based on the plurality of intonation marking information to obtain the second drama script.
2. The method according to claim 1, characterized in that Determining multiple topic summaries based on the creation requirement text includes: Performing a first semantic recognition on the creation requirement text to obtain first semantic information; Extracting key information from the creation requirement text based on the first semantic information; the key information includes: genre, background, and character characteristics; Acquire multiple background element sets corresponding to the background from the Gan Opera knowledge base; each background element set includes: time, place, and cultural customs; Based on the character traits, determine the main characters; Determine the plot structure corresponding to the genre; A theme summary is generated according to the plot structure, the main characters, and each background element set in the multiple background element sets to obtain multiple theme summaries.
3. The method according to claim 1 or 2, characterized in that Generating a first drama script according to the target theme summary includes: Performing second semantic recognition on the target topic abstract to obtain second semantic information; Determining a plot development process based on the second semantic information; the plot development process includes: opening, development, climax and ending; Determine multiple chapters based on the plot development process; Determining scene and character information corresponding to each of the multiple chapters; Generate a corresponding chapter script according to the scene and character information corresponding to each chapter in the multiple chapters to obtain multiple chapter scripts; The first drama script is determined based on the multiple chapter scripts.
4. The method according to claim 3, characterized in that The step of generating a corresponding chapter script according to the scene and character information corresponding to each chapter in the multiple chapters to obtain multiple chapter scripts includes: Obtaining target scene and target character information corresponding to a target chapter; the target character information includes at least one character and at least one character setting, the at least one character corresponding to the at least one character setting; the target chapter is any one of the multiple chapters; Generate a dialogue text corresponding to the at least one character setting to obtain at least one segment of dialogue text; each segment of dialogue text includes all the dialogues of the character corresponding to the character setting in the target chapter; Performing third semantic recognition on the at least one segment of dialogue text to obtain at least one third semantic information; the at least one segment of dialogue text corresponds to the at least one third semantic information; each third semantic information includes semantic information corresponding to each line in the dialogue text corresponding to the third semantic information; Determining, based on the at least one third semantic information, the coherence between each line in the at least one segment of dialogue text and any line in the at least one segment of dialogue text, and determining, based on the coherence, the order of each line in the at least one segment of dialogue text; Arranging all the lines in the at least one paragraph of dialogue text according to the order of each line in the at least one paragraph of dialogue text to obtain a target dialogue text; Determining, based on the at least one character setting and the at least one third semantic information, a character performance corresponding to each line in the target dialogue text; the character performance including all actions, all intonations, and all expressions of the character corresponding to the character performance when performing the line corresponding to the character performance; Determining a chapter background corresponding to the target chapter, and determining a narration corresponding to the target chapter based on the chapter background; A target chapter script is determined based on the target scene, the narration, the at least one character, the target dialogue text, and the character performance corresponding to each line in the target dialogue text; the target chapter script is a chapter script corresponding to the target chapter among the multiple chapter scripts.
5. The method according to claim 1, wherein The preset auxiliary generation model further includes a checking and optimization module; and the step of modifying the second drama script according to the second response information to obtain a target drama script includes: Determining the content to be modified in the second drama script based on the review and annotation record; Performing fifth semantic recognition on the review annotation record to obtain modification intention; Modify the content to be modified according to the modification intention to obtain a third drama script; The third drama script is fully checked by the checking and optimizing module to obtain a checking result; and the third drama script is optimized according to the checking result to obtain the target drama script.
6. A drama script auxiliary generation device, characterized in that: The device is located in a drama script auxiliary generation system, which also includes an interactive device; the device includes: An acquisition unit, configured to acquire a user's creation requirement text from the interactive device; A processing unit is used to determine a plurality of topic summaries based on the creative requirement text; each topic summaries is used to represent a creative intention; Determining first interaction information based on the multiple topic abstracts, and displaying the first interaction information to the user through the interactive device; the first interaction information is used to inquire about the user's creative intentions for the multiple topic abstracts; The acquiring unit is configured to acquire, from the interactive device, first response information of the user to the first interactive information, and determine a target topic abstract from the plurality of topic abstracts based on the first response information; The processing unit is configured to generate a first drama script based on the target theme summary; Polishing the first drama script using a preset auxiliary generation model to obtain a second drama script; the preset auxiliary generation model includes: a grammatical error correction module, a semantic coherence module, and a rhythm adjustment module; the grammatical error correction module, the semantic coherence module, and the rhythm adjustment module are all deep learning models based on the Transformer architecture; Determining second interaction information based on the second drama script, and displaying the second interaction information to the user through the interactive device; the second interaction information is used to prompt the user to review and annotate the second drama script; The acquiring unit is configured to acquire, from the interactive device, second response information of the user in response to the second interactive information; the second response information includes a review and annotation record of the user in response to the second drama script; The processing unit is configured to modify the second drama script according to the second response information to obtain a target drama script; The polishing of the first drama script by using a preset auxiliary generation model to obtain a second drama script includes: Preprocessing the first drama script to obtain a first processed text; Correcting grammatical errors in the first processed text by the grammatical error correction module to obtain a second processed text; The second processed text is segmented by the semantic coherence module to obtain a plurality of segmented words, a fourth semantic recognition is performed on each of the plurality of segmented words to obtain a plurality of fourth semantic information, and a context understanding is performed on each of the plurality of segmented words based on the plurality of fourth semantic information to obtain a plurality of context information; the plurality of segmented words correspond one-to-one to the plurality of context information, misused words in the plurality of segmented words are determined based on the plurality of context information to obtain at least one misused word, and at least one word is selected from a Gan opera knowledge base to replace the at least one misused word to obtain a third processed text; the at least one word corresponds one-to-one to the at least one misused word; The rhythm adjustment module determines the content words that appear more than a preset number of times in the third processed text, and obtains a plurality of content words; selects a plurality of professional words from the Gan opera knowledge base to replace the plurality of content words, and obtains a fourth processed text; the plurality of professional words correspond one-to-one with the plurality of content words, wherein the professional words are words that are synonymous with the corresponding content words and conform to the expression of Gan opera words; the fourth processed text is divided into sentences to obtain a plurality of sentences; the plurality of sentences are annotated with intonation to obtain a plurality of intonation annotation information; the plurality of sentences correspond one-to-one with the plurality of intonation annotation information; each intonation annotation information includes the intonation annotation information of all characters in the sentence corresponding to the intonation annotation information; confirm The method further comprises determining a similarity between each intonation marking information and an adjacent intonation marking information in the plurality of intonation marking information, and determining a non-rhyming sentence in the plurality of sentences based on the similarity between each intonation marking information and the adjacent intonation marking information to obtain at least one non-rhyming sentence, specifically: if the similarity between the intonation marking information corresponding to the target sentence and the intonation marking information between its two adjacent sentences is less than a preset similarity, determining that the target sentence is a sentence in the at least one non-rhyming sentence; the target sentence is any one of the plurality of sentences; and performing synonym conversion on the at least one non-rhyming sentence in the fourth processed text based on the plurality of intonation marking information to obtain the second drama script.
7. An electronic device, characterized in that: include: A processor and a memory, the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Language model role playing-based long script automatic generation method
CN118394926A