Drama script auxiliary generation method and device based on artificial intelligence
Through the artificial intelligence-based drama script assisted generation method, the problem of low creation efficiency of traditional drama scripts is solved, and the rapid generation of scripts that meet the characteristics of the drama is achieved, improving the creative efficiency and quality.
Patent Information
- Application Number
- CN202510125270.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-27
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2045-01-27
AI Technical Summary
Traditional drama script creation is inefficient, and playwrights are prone to encounter problems of exhaustion of inspiration and unclear ideas during the process of conception, planning and writing, resulting in slow creation progress.
Using an artificial intelligence-based drama script-assisted generation method, multiple theme summary is determined by obtaining the user's creative requirements text, and interacting with the user to determine the target theme summary. Then, the first drama script is generated, and the preset auxiliary generation model is polished, and the script is finally modified based on the user's review and annotation records.
It improves the creation efficiency of drama scripts, and can generate scripts that meet the characteristics of dramas according to users' creative needs, improving the quality and creation speed of scripts.
Smart Images

Figure CN119558326A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method and device for assisting the generation of drama scripts based on artificial intelligence. Background Art
[0002] Drama is a comprehensive stage art form that integrates literature, performance, music, dance, fine arts and other elements. It uses actors' performances on stage to present storylines, shape characters, and convey thoughts and emotions. There are also differences in drama forms in different regions. For example, Gan Opera, as an ancient drama in Jiangxi, has a profound historical and cultural heritage and unique artistic charm.
[0003] Traditional drama script creation mainly relies on the playwright's personal talent and experience, and the creation process is often time-consuming. The playwright needs to spend a lot of time on conception, planning and writing, and may encounter problems such as lack of inspiration and unclear ideas during the creation process, resulting in 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 embodiment of the present application provides a method and device for auxiliary generation of drama scripts based on artificial intelligence, which can determine multiple topic summaries based on the user's creative demand text, and determine a target topic summary from multiple topic summaries through interaction with the user. According to the target topic summary, a first drama script is generated, and the first drama script is polished by a preset auxiliary generation model to obtain a second drama script. Finally, according to 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 needs, thereby improving the efficiency of drama script creation.
[0006] In a first aspect, an embodiment of the present application provides a method for assisting the generation of a drama script based on artificial intelligence, which is applied to an assisting generation device of a drama script in an assisting generation system of a drama script, wherein the assisting generation system of the drama script also includes an interactive device; the method includes: Acquire the user's creation requirement text from the interactive device; Determine a plurality of topic summaries according to the creation requirement text; each topic summaries is used to represent a creation intention; Determine first interaction information according to the multiple subject abstracts, and display the first interaction information to the user through the interaction device; the first interaction information is used to inquire the user about the creative intention of the multiple subject abstracts; Acquire, from the interactive device, first response information of the user to the first interactive information, and determine a target topic summary from the multiple topic summaries according to the first response information; Generating a first drama script according to the target theme summary; Polishing the first drama script by using a preset auxiliary generation model to obtain a second drama script; Determine second interactive information according to the second drama script, and display 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; Acquire, from the interactive device, second response information of the user to the second interactive information; the second response information includes a review and annotation record of the user to the second drama script; The second drama script is modified according to the second response information to obtain a target drama script.
[0007] In a second aspect, an embodiment of the present application provides a drama script auxiliary generation device, the device is located in a drama script auxiliary generation system, the drama script auxiliary generation system also includes an interactive device; the device includes: An acquisition unit, used for acquiring a user's creation requirement text from the interactive device; A processing unit, used to determine a plurality of topic summaries according to the creation requirement text; each topic summaries is used to represent a creation intention; Determine first interaction information according to the multiple subject abstracts, and display the first interaction information to the user through the interaction device; the first interaction information is used to inquire the user about the creative intention of the multiple subject 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 summary from the multiple topic summaries according to the first response information; The processing unit is used to generate a first drama script according to the target theme summary; Polishing the first drama script by using a preset auxiliary generation model to obtain a second drama script; Determine second interactive information according to the second drama script, and display 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; The acquisition unit is used to acquire, from the interactive device, second response information of the user to the second interactive information; the second response information includes a review and annotation record of the user to the second drama script; The processing unit is used to modify the second drama script according to the second response information to obtain a target drama script.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory, so that the electronic device performs the method described in the first aspect.
[0009] 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 described in the first aspect.
[0010] 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.
[0011] Implementing the embodiments of the present application has the following beneficial effects: In an embodiment of the present application, the drama script auxiliary generation device first obtains the user's creative demand text from the interactive device, and then determines multiple topic summaries based on the creative demand text. According to the multiple topic summaries, the first interactive information is determined, and the first interactive information is displayed to the user through the interactive device. Next, the user's first response information to the first interactive information is obtained from the interactive device, and the target topic summary is determined from the multiple topic summaries based on the first response information, so as to generate the first drama script according to the target topic summary. Further, the first drama script is polished by the preset auxiliary generation model to obtain the second drama script, and the second interactive information is determined according to the second drama script, and the second interactive information is displayed to the user through the interactive device. Finally, the user's second response information to the second interactive information is obtained from the interactive device, and the second drama script is modified according to the second response information to obtain the target drama script. In this way, multiple topic summaries can be provided to the user according to the user's creative needs, and the first drama script corresponding to the target topic summary can be generated according to the user's creative intention, and the first drama script is polished to obtain the second drama script, so that the text description in the second drama script is more accurate and in line with the characteristics of the drama. Furthermore, the second drama script can be modified through the user's review and annotation records on the second drama script to obtain the target drama script, so as to create a drama script that meets the user's creative intent and conforms to the characteristics of the drama, thereby improving the efficiency of drama script creation. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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 paying any creative work.
[0013] Figure 1 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 2 A flowchart of a method for assisting the generation of drama scripts based on artificial intelligence provided in an embodiment of the present application; Figure 3 A schematic diagram of a target chapter script provided for an embodiment of the present application; Figure 4 A block diagram of the functional units of a drama script auxiliary generation device provided in an embodiment of the present application; Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0015] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0016] Reference to "embodiments" herein means that a particular feature, result, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0017] First, see Figure 1 , Figure 1 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.
[0018] Among them, the interactive device can be an electronic device installed with computer software, configured with a visual display interface, and user-operable, including: smart phones, computers, tablet devices, etc. The interactive device can also include smart wearable devices, such as electronic watches, head mounted displays (Head Mounted Display, HMD), 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 auxiliary generation of drama scripts, and the operation interface of the computer software can be displayed. The user can enter the creation requirement text on the operation interface of the computer software, and the interactive device can send the user's creation requirement text to the drama script auxiliary generation device. In addition, the computer software of the interactive device can call the artificial intelligence model from the drama script auxiliary 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 intention according to the user's creative needs and interaction with the user.
[0019] Among them, the drama script auxiliary generation device 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), and the like. The drama script auxiliary generation device can also be an electronic device integrating the above-mentioned processor, including: a computer, an intelligent communication device, and the like. The drama script auxiliary generation device can also be a server with data reception and transmission, data caching and high-performance data processing, including: a rack server, a cloud server, a virtual private server (VPS), an application server, and the like. This application is not limited to this. In an embodiment of the present application, the drama script auxiliary generation device can communicate with an interactive device to interact with a user through a built-in artificial intelligence model, thereby generating a drama script that meets the user's creative intent.
[0020] It should be noted that the drama script in the embodiment of the present application is mainly described by taking the Gan opera script 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.
[0021] To this end, the present application provides a method for assisting the generation of drama scripts based on artificial intelligence and applied to the above-mentioned scenarios. The device for assisting the generation of drama scripts obtains the user's creation requirement text from the interactive device; The drama script auxiliary generation device determines multiple topic summaries based on the creation requirement text; The drama script auxiliary generation device determines the first interactive information according to the multiple topic summaries, and displays the first interactive information to the user through the interactive device; The drama script auxiliary generation device obtains the user's first response information to the first interaction information from the interactive device, and determines a target theme summary from a plurality of theme summaries according to the first response information; The drama script auxiliary generation device generates a first drama script according to the target theme summary; The drama script auxiliary generation device polishes the first drama script through a preset auxiliary generation model to obtain a second drama script; The drama script auxiliary generation device determines the second interactive information according to the second drama script, and displays the second interactive information to the user through the interactive device; The drama script auxiliary generation device obtains second response information of the user to the second interaction information from the interactive device; The drama script auxiliary generation device modifies the second drama script according to the second response information to obtain the target drama script.
[0022] It can be seen that, applied to the above scenario, the drama script auxiliary generation device can provide users with multiple topic summaries according to the user's creative needs, and determine the target topic summary from the multiple topic summaries through interaction with the user, so as to generate a first drama script according to the target topic summary, thereby generating a drama script that meets the user's creative needs and creative intentions. Then, the first drama script is polished by the preset auxiliary generation model, and a second drama script with dramatic characteristics and more accurate description can be obtained. Finally, through 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, so as to help users create a drama script that meets the user's creative needs and has dramatic characteristics, thereby improving the efficiency of drama script creation.
[0023] This application will take the drama script as an example of Gan opera script. Figure 2 , Figure 2A flowchart of a method for assisting the generation of a play script based on artificial intelligence is provided in an embodiment of the present application. The method is applied to an assisting generation device for a play script in an assisting generation system for a play script, and the assisting generation system for a play script also includes an interactive device. The method includes but is not limited to the following steps: S201: Obtain the user's creation requirement text from the interactive device.
[0024] In the embodiment of the present application, the creation requirement text is a text describing the user's creation requirements, and the user can input the creation requirement text on the interactive device, wherein the input method may 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, convert the voice 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.
[0025] S202: Determine multiple topic summaries based on the creation requirement text.
[0026] In the embodiment of the present application, each topic abstract is used to represent a creative intention. The drama script auxiliary generation device can extract key information corresponding to the user's creative needs from the creative demand text, and then generate multiple topic abstracts based on the key information, and the multiple topic abstracts can be selected by the user to determine the user's creative intention.
[0027] Exemplarily, based on the creation requirement text, multiple topic summaries are determined, which may include: Performing first semantic recognition on the creation requirement text to obtain first semantic information; Extract key information from the creation requirement text according to the first semantic information; Acquire multiple background element sets corresponding to the background from the Gan opera knowledge base; Determine the main characters based on their characteristics; Determine the plot structure that corresponds 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.
[0028] In the embodiment of the present application, the key information may include: genre, background and character features. Each background element set may include: time, place, cultural customs. Among them, the genre may be any of the following: comedy, tragedy, romance, etc. The character features are the image description of the main character, including the description of the main character's appearance, personality, occupation, etc., for example, "a considerate teacher with long hair".
[0029] Specifically, the drama script auxiliary generation device will first perform a first semantic recognition on the creation requirement text to obtain the first semantic information, wherein the first semantic recognition can be performed on the creation requirement text through a pre-trained natural language processing model (Natural Language Processing, NLP), and the natural language processing model can be a deep learning model based on the Transformer architecture, for example, a generative pretrained transformer (Generative Pretrained Transformer, GPT). The first semantic information can be a feature vector corresponding to the creation requirement text, and the direction and feature value of the feature vector are used to indicate the semantics of the creation requirement text.
[0030] Then, the drama script auxiliary generation device annotates each sentence in the creation requirement text according to the first semantic information corresponding to the creation requirement text, and obtains the annotation information of each sentence, and the annotation information is used to represent the semantics of each sentence. According to the annotation information of each sentence, key information such as genre, background and character characteristics can be extracted from the creation requirement text.
[0031] Furthermore, the drama script auxiliary generation device obtains multiple background element sets corresponding to the background from the Gan opera knowledge base. The Gan opera knowledge base is a database pre-built based on historical data, storing background element sets corresponding to different backgrounds, Gan opera professional terms, Gan opera culture, traditional Gan opera repertoires, character stories and other data. The drama script auxiliary generation device can search for background element sets in the Gan opera knowledge base according to the background corresponding to the creation requirement text.
[0032] Furthermore, the drama script auxiliary generation device will determine the main characters according to the character characteristics. Among them, the character characteristics may include descriptions of multiple main characters, and therefore, there may be multiple main characters determined according to the character characteristics. The drama script auxiliary generation device will generate descriptions of the main characters in terms of name, age, occupation, personality, etc. according to the character characteristics. Then, the plot structure corresponding to the genre is determined. It is understandable that each genre has a pre-set plot structure. For example, the plot structure of the love genre may include the encounter of the male and female protagonists, mutual affection, misunderstandings or twists and turns, and finally getting married or ending with regret.
[0033] Finally, the drama script auxiliary generation device can generate a theme summary based on the plot structure, the main characters, and each background element set in the multiple background element sets to obtain multiple theme summaries. Among them, 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 intention. The drama script auxiliary generation device can provide users with multiple creative ideas by determining multiple theme summaries, and determine the user's actual creative intention through interaction with the user, so as to create a drama script that meets the user's creative intention and improve the creation efficiency of Gan opera scripts.
[0034] It can be seen that by performing the first semantic recognition on the creation 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 creation 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 according to the plot structure, the main characters, and each background element set in the multiple background element sets, and multiple theme summaries are obtained, thereby providing users with multiple theme summaries according to the user's creative needs, enriching the creative ideas of the script, so as to generate a Gan opera script that is consistent with the user's creative intentions and improve the creation efficiency of the Gan opera script.
[0035] S203: Determine first interaction information according to the multiple topic summaries, and display the first interaction information to the user through an interactive device.
[0036] In the embodiment of the present application, the first interaction information is used to inquire about the user's creative intentions for the multiple subject summaries. Specifically, after determining the multiple subject summaries, the drama script auxiliary generation device generates the first interaction information corresponding to the multiple subject summaries, and sends the first interaction information to the interactive device, so as to display the multiple subject summaries in sequence on the interactive device, and inquire about the user's creative intentions for the multiple subject summaries.
[0037] S204: Acquire first response information of the user to the first interaction information from the interactive device, and determine a target topic summary from the plurality of topic summaries according to the first response information.
[0038] In the 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 information from the interactive device, and thus determine the target topic abstract based on the first response information.
[0039] S205: Generate a first drama script according to the target theme summary.
[0040] 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 a first drama script.
[0041] Exemplarily, generating a first drama script according to the target theme summary may include: Performing second semantic recognition on the target topic summary to obtain second semantic information; According to the second semantic information, determine the plot development process; Determine multiple chapters based on the plot development process; Determine the scene and character information corresponding to each of the multiple chapters; Generate a corresponding chapter script according to the scene and role information corresponding to each chapter in the multiple chapters to obtain multiple chapter scripts; Based on multiple chapter scripts, determine the first drama script.
[0042] In the embodiment of the present application, the plot development process includes: opening, development, climax and ending. The character information includes all the 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 appearance, expression, personality, behavior and other information of the character.
[0043] Specifically, the drama script auxiliary generation device first performs a second semantic recognition on the target topic summary, for example, GPT or a Transformer-based bidirectional encoder representation model (Bidirectional Encoder Representations from Transformers, BERT) can be used to perform a second semantic recognition on the target topic summary to obtain second semantic information. The second semantic information may include a feature vector corresponding to each sentence in the target topic summary, and the direction and feature value of the feature vector corresponding to each sentence are used to indicate the semantics corresponding to the sentence.
[0044] Then, the drama script auxiliary generation device will split the target theme summary into multiple processes according to the plot structure corresponding to the target theme summary, and adjust the contents in the multiple processes according to the second semantic information to obtain the plot development process. For example, the plot structure corresponding to the target theme summary is divided into four paragraphs. The drama script auxiliary generation device first classifies the four paragraphs into four processes: opening, development, climax, and ending. Then, according to the second semantic information, the sentences in the four paragraphs that do not match the process corresponding to the paragraph are classified into the corresponding process, thereby obtaining the plot development process.
[0045] Furthermore, the drama script auxiliary generation device determines multiple story plots according to the plot development process, and each story plot includes the plot name, story scene, plot character and story introduction corresponding to the story plot. It should be noted that any one of the processes of opening, development, climax and ending can include at least one story plot. The drama script auxiliary generation device determines multiple chapters according to the multiple story plots, and each chapter corresponds to a story plot. Then, the drama script auxiliary generation device determines the scene and character information corresponding to each of the multiple chapters according to the story plot corresponding to each of the multiple chapters.
[0046] Further, the drama script auxiliary generation device generates a corresponding chapter script according to the scene and role information corresponding to each chapter in the multiple chapters, and obtains multiple chapter scripts. Exemplarily, generating a corresponding chapter script according to the scene and role information corresponding to each chapter in the multiple chapters, and obtaining multiple chapter scripts may include: Get the target scene and target role information corresponding to the target chapter; Generate a dialogue text corresponding to at least one character setting to obtain at least one segment of dialogue text; Performing third semantic recognition on at least one section of dialogue text to obtain at least one third semantic information; Determine 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 according to at least one third semantic information, and determine the corresponding order of each line in the at least one paragraph of dialogue text according to the coherence; Arranging all the lines in at least one paragraph of the dialogue text according to the corresponding order of each line in at least one paragraph of the dialogue text to obtain a target dialogue text; Determining a role performance corresponding to each line in the target line text according to at least one role setting and at least one third semantic information; Determine the chapter background corresponding to the target chapter, and determine the narration corresponding to the target chapter based on the chapter background; A target chapter script is determined based on a target scene, narration, at least one character, a 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 multiple chapter scripts.
[0047] 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 to the at least one character setting in a one-to-one manner. The target chapter is any one of the multiple chapters. Each paragraph of dialogue text includes all the lines of the character corresponding to a character setting in the target chapter. At least one paragraph of dialogue text corresponds to at least one third semantic information in a one-to-one manner. 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.
[0048] Specifically, the drama script auxiliary generation device first obtains the target chapter from multiple chapters, and obtains the target scene and target role information corresponding to the target chapter. According to at least one role in the target role information, GPT is called to generate at least one paragraph of dialogue text corresponding to at least one role setting, and each role corresponds to a paragraph of dialogue text. In addition, GPT is called to perform third semantic recognition on at least one paragraph of 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.
[0049] Further, the drama script auxiliary generation device determines the coherence between each line in at least one paragraph of the dialogue text and any line in the at least one paragraph of the dialogue text according to at least one third semantic information. For example, at least one third semantic information may include a feature vector corresponding to each line in at least one paragraph of the 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 drama script auxiliary generation device can determine the coherence between any two lines in at least one paragraph of the dialogue text by determining the root mean square of the feature value corresponding to each line and the feature value corresponding to any line. Among them, the smaller the root mean square of the feature values corresponding to any two lines, the stronger the coherence between the two lines. Therefore, the drama script auxiliary generation device can determine the lines with the strongest coherence with each line, that is, the lines adjacent to each line, according to the root mean square of the feature value corresponding to each line and the feature value corresponding to any line. Then, according to 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 to each line, the order between each line and the adjacent lines is determined to obtain the order corresponding to each line in at least one paragraph of the line text. The mapping relationship between the direction of the feature vector and the order can be preset according to the actual test results.
[0050] Then, the drama script auxiliary generation device rearranges all the lines in at least one paragraph of the dialogue text according to the corresponding order of each line in at least one paragraph of the dialogue text to obtain the target dialogue text. Next, the drama script auxiliary generation device determines all the actions, all the intonations and all the expressions of each character in the target chapter when performing the lines corresponding to the character according to the role setting of each character in the target chapter and the semantic information corresponding to each line, that is, determines the role performance corresponding to each line in the target dialogue text.
[0051] 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.
[0052] Finally, 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 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 role, the target dialogue text, and the role performance corresponding to each line in the target dialogue text. Figure 3 As 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." through the first action d1, the first intonation y1 and the first demeanor s1, and then performs "the second line t2." through 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. The fifth line t5." through the third action d3, the third intonation y3 and the third demeanor s3. Then, the first character a and the second character b perform "the sixth line t6." at the same time, the first character a performs through the fourth action d4, the fourth intonation y4 and the fourth demeanor s4, and the second character b performs through 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.
[0053] In this way, according to the above-mentioned processing method for 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.
[0054] 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, and by 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, according to at least one role setting and at least one third semantic information corresponding to the target chapter, the role 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 according to the chapter background, the narration corresponding to the target chapter is determined. Finally, according to the target scene, narration, at least one role, the target dialogue text, and the role 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 creation efficiency of Gan opera scripts.
[0055] Finally, the drama script auxiliary generation device will splice multiple chapter scripts according to the plot development process to obtain a first drama script. When splicing multiple chapter scripts, the drama script auxiliary generation device determines the chapter introduction corresponding to each chapter script, determines the previous story summary of the next chapter corresponding to the chapter according to the chapter introduction corresponding to each chapter script, and inserts the previous story summary corresponding to the chapter in the narration of each chapter script. In this way, multiple chapter scripts can be connected in series to obtain the first drama script.
[0056] S206: Polishing the first drama script by using a preset auxiliary generation model to obtain a second drama script.
[0057] In an embodiment of the present application, the preset auxiliary generation model may include: a grammatical correction module, a semantic coherence module, a rhythm adjustment module, and a check optimization module. The grammatical correction module, the semantic coherence module, the rhythm 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 rhythm 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 set for training each module can be pre-collected according to the actual function of each module.
[0058] 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.
[0059] Exemplarily, polishing the first drama script by using a preset auxiliary generation model to obtain a second drama script may include: Preprocessing the first drama script to obtain a first processed text; Correcting grammatical errors in the first processed text by a grammatical error correction module to obtain a second processed text; The second processed text is segmented by a 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 according to the plurality of fourth semantic information to obtain a plurality of context information; based on the plurality of context information, an ambiguous word in the plurality of segmented words is determined to obtain at least one ambiguous word, and at least one word is selected from a Gan opera knowledge base to replace the at least one ambiguous word to obtain a third processed text; The third processed text is adjusted through a rhythm adjustment module to obtain a second drama script.
[0060] In the embodiment of the present application, multiple word segments correspond to multiple 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.
[0061] 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.
[0062] Then, the drama script auxiliary generation device corrects the grammatical errors in the first processed text by calling the grammatical error correction module of the preset auxiliary generation model, wherein the grammatical error correction module can detect grammatical errors in the first processed text according to preset grammatical rules, and the grammatical errors include: subject-predicate structure errors, misuse of part of speech, punctuation errors, etc. The grammatical errors in the first processed text are corrected by the grammatical error correction module to obtain a second processed text.
[0063] Further, the drama script auxiliary generation device can input the second processed text into the semantic coherence module, and the semantic coherence module first performs segmentation on the second processed text, and removes the function words after the segmentation to obtain multiple segmentations. Then, the fourth semantic recognition is performed on the multiple segmentations to obtain multiple fourth semantic information, one semantic information corresponding to each 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 segmentation in the multiple segmentations to obtain multiple context information, and the context information corresponding to each segmentation is used to indicate the relevance between the segmentation and the context semantics. According to the multiple context information, the misused words in the multiple segmentations can be determined to obtain at least one misused word, wherein the misused word is a word whose relevance to the context semantics is less than the preset relevance. The semantic coherence module will find at least one word whose relevance to the context semantics is greater than or equal to the preset relevance from the Gan opera knowledge base according to the context information corresponding to each misused word in the at least one misused word, and replace the at least one misused word, so that the third processed text can be obtained.
[0064] 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.
[0065] 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, so as 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 according to 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 third processed text can be rhythmically adjusted by the rhythm adjustment module 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 creation efficiency.
[0066] Exemplarily, adjusting the third processed text by the rhythm adjustment module to obtain the second drama script may include: Determining, by the rhythm adjustment module, a content word whose occurrence times in the third processed text is greater than a preset number of times, and obtaining a plurality of content words; Selecting multiple professional words from the Gan opera knowledge base to replace multiple content words to obtain a fourth processed text; Sentence the fourth processed text to obtain a plurality of sentences; Performing intonation marking on multiple sentences to obtain multiple intonation marking information; Determine the similarity between each intonation marking information and adjacent intonation marking information in the plurality of intonation marking information, and determine non-rhyming sentences in the plurality of sentences according to the similarity between each intonation marking information and adjacent intonation marking information, to obtain at least one non-rhyming sentence; According to the multiple intonation marking information, at least one non-rhyming sentence in the fourth processed text is synonymously converted to obtain a second drama script.
[0067] In the embodiment of the present application, a plurality of professional words correspond one-to-one to a plurality of content words, and a plurality of sentences correspond one-to-one to a plurality of intonation marking information.
[0068] Specifically, after the drama script auxiliary generation device inputs the third processed text into the rhythm adjustment module, the rhythm adjustment module first determines all content words in the third processed text, where the content words are words with actual meanings, including nouns, verbs, adjectives, etc. Then, the rhythm adjustment module determines the number of occurrences of each content word in the third processed text, and selects content words whose number of occurrences is greater than a preset number, thereby obtaining a plurality of content words.
[0069] Then, the rhythm adjustment module searches for multiple professional words matching the multiple content words from the Gan opera knowledge base, wherein the professional words are words that are synonymous with the content words and conform to the expression of Gan opera words. The rhythm adjustment module replaces the multiple content words in the third processed text with the multiple professional words to obtain a fourth processed text.
[0070] Further, the prosody adjustment module divides the fourth processed text into sentences to obtain multiple sentences, and performs intonation marking on each of the multiple sentences to obtain multiple intonation marking information, each of which includes intonation marking information of all characters in the sentence corresponding to the intonation marking information. The prosody adjustment module can determine the similarity between the intonation marking information corresponding to any two adjacent sentences in the multiple sentences. For example, when the intonation marking information of a sentence is "2124", it means that the intonations corresponding to the four characters of the sentence are: 2 tone, 1 tone, 2 tone and 4 tone respectively. When the intonation marking information of the sentence adjacent to the sentence is "4124", the similarity of the intonation marking information of the two sentences can be 4 / [(4-2)+(1-1)+(2-2)+(4-4)]. If the similarity between the intonation marking information of the target sentence and the two adjacent sentences is less than the 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.
[0071] Finally, the prosody adjustment module can perform synonymous conversion on each non-rhyming sentence according to the intonation marking information of the sentences adjacent to each non-rhyming sentence, so that the similarity between the intonation marking information of each non-rhyming sentence and the intonation marking information of the adjacent sentences is greater than or equal to the preset similarity. In this way, the prosody adjustment module can obtain the second drama script by performing synonymous conversion on at least one non-rhyming sentence in the fourth processed text.
[0072] It can be seen that in the embodiment of the present application, the third processed text can be replaced with a professional word related to Gan opera by the rhythm adjustment module to obtain a fourth processed text, so that the fourth processed text conforms to the expression of Gan opera words. In addition, each sentence in the fourth processed text can be marked with intonation, and the non-rhyming sentences in the fourth processed text can be determined according to the intonation marking 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, and the performance effect of Gan opera can be improved, thereby helping users to create drama scripts that conform to the characteristics of Gan opera and improve creation efficiency.
[0073] S207: Determine second interaction information according to the second drama script, and display the second interaction information to the user through the interactive device.
[0074] In the embodiment of the present application, the second interactive 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 interactive information corresponding to the second drama script, so as to 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.
[0075] S208: Acquire second response information of the user to the second interaction information from the interaction device.
[0076] In the embodiment of the present application, the second response information includes the user's review and annotation record for the second drama script. The user can review and annotate the second drama script by operating on the interactive device to annotate the problems and modification suggestions in the second drama script. After the user's annotation is completed, the interactive device will generate the second response information. The drama script auxiliary generation device can obtain the second response information from the interactive device.
[0077] S209: According to the second response information, the second drama script is modified to obtain a target drama script.
[0078] 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 records, 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.
[0079] Exemplarily, modifying the second drama script according to the second response information to obtain the target drama script may include: According to the review and annotation records, determine the content to be modified in the second drama script; Perform the fifth semantic recognition on the audit annotation record to obtain the 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 through the checking and optimization module to obtain the checking result; based on the checking result, the third drama script is optimized to obtain the target drama script.
[0080] In an embodiment of the present application, the review annotation record may include: modification type, modification direction, position to be modified, and so on.
[0081] Specifically, the drama script auxiliary generation device first extracts the content to be modified from the second drama script according to the position to be modified in the user's review and annotation record, and the content to be modified may include: words to be modified or sentences to be modified. The drama script auxiliary generation device calls GPT to perform the fifth semantic recognition on the review and annotation record to obtain the user's modification intention.
[0082] Then, the drama script auxiliary generation device can modify the content to be modified according to the modification intention. For example, if the user's modification intention is to "change the first word in the script to the second word", the drama script auxiliary generation device can find all the first words in the second drama script and replace the first words with the second words. In this way, by modifying the content to be modified, a third drama script can be obtained.
[0083] Finally, the drama script auxiliary generation device can input the third drama script into the inspection and optimization module of the preset auxiliary generation model. The inspection and optimization module will perform a full text inspection on the modified third drama script, including: grammar inspection, phrase expression inspection, punctuation inspection, etc. By inspecting the third drama script, an inspection result can be obtained, and the inspection result may include at least one of the following: error-free, grammatically incorrect sentences, incorrectly expressed phrases, and incorrect punctuation. Finally, the inspection and optimization module can optimize the third drama script according to the inspection result, correct the grammatically incorrect sentences, incorrectly expressed phrases, and incorrect punctuation, and obtain the target drama script.
[0084] 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 creating Gan Opera scripts.
[0085] In summary, in the embodiment of the present application, the drama script auxiliary generation device first obtains the user's creative demand text from the interactive device, and then determines multiple topic summaries based on the creative demand text. According to the multiple topic summaries, the first interactive information is determined, and the first interactive information is displayed to the user through the interactive device. Next, the user's first response information to the first interactive information is obtained from the interactive device, and the target topic summary is determined from the multiple topic summaries according to the first response information, so as to generate the first drama script according to the target topic summary. Further, the first drama script is polished by the preset auxiliary generation model to obtain the second drama script, and the second interactive information is determined according to the second drama script, and the second interactive information is displayed to the user through the interactive device. Finally, the user's second response information to the second interactive information is obtained from the interactive device, and the second drama script is modified according to the second response information to obtain the target drama script. Thus, according to the user's creative needs, multiple topic summaries can be provided to the user, and according to the user's creative intention, the first drama script corresponding to the target topic summary is generated, and the first drama script is polished to obtain the second drama script, so that the text description in the second drama script is more accurate and in line with the characteristics of Gan Opera. Furthermore, the second drama script can be modified through the user's review and annotation records to obtain the target drama script, so as to create a drama script that meets the user's creative intent and conforms to the characteristics of Gan Opera, thereby improving the creation efficiency of Gan Opera scripts.
[0086] See also Figure 4 , Figure 4 The following is a block diagram of the functional units of a drama script auxiliary generation device provided in an embodiment of the present application. The drama script auxiliary generation device 400 is located in a drama script auxiliary generation system, and the drama script auxiliary generation system also includes an interactive device. The drama script auxiliary generation device 400 includes an acquisition unit 401 and a processing unit 402.
[0087] The acquisition unit 401 is used to acquire the user's creation requirement text from the interactive device; The processing unit 402 is used to determine a plurality of topic summaries according to the creation requirement text; each topic summary is used to represent a creation intention; Determine first interaction information according to the multiple subject summaries, and display the first interaction information to the user through the interactive device; the first interaction information is used to inquire about the user's creative intention for the multiple subject summaries; An acquisition 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 according to the first response information; The processing unit 402 is used to generate a first drama script according to the target theme summary; The first drama script is polished by using a preset auxiliary generation model to obtain a second drama script; Determine second interactive information according to the second drama script, and display 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; The acquisition unit 401 is used to acquire second response information of the user to the second interaction information from the interactive device; the second response information includes the review and annotation record of the user to the second drama script; The processing unit 402 is used to modify the second drama script according to the second response information to obtain a target drama script.
[0088] In a possible embodiment, in determining a plurality of topic summaries according to the creation requirement text, the processing unit 402 is specifically configured to: Performing first semantic recognition on the creation requirement text to obtain first semantic information; According to the first semantic information, key information is extracted from the creation requirement text; the key information includes: genre, background and character characteristics; 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; Determine the main characters based on their characteristics; Determine the plot structure that corresponds 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.
[0089] In a possible embodiment, in terms of generating a first drama script according to the target theme summary, the processing unit 402 is specifically configured to: Performing second semantic recognition on the target topic summary to obtain second semantic information; According to the second semantic information, determine the plot development process; the plot development process includes: opening, development, climax and ending; Determine multiple chapters based on the plot development process; Determine the scene and character information corresponding to each of the multiple chapters; Generate a corresponding chapter script according to the scene and role information corresponding to each chapter in the multiple chapters to obtain multiple chapter scripts; Based on multiple chapter scripts, determine the first drama script.
[0090] In a possible embodiment, in terms of generating corresponding chapter scripts according to the scene and role information corresponding to each chapter in the multiple chapters to obtain multiple chapter scripts, the processing unit 402 is specifically used to: Obtain target scene and target role information corresponding to a target chapter; the target role information includes at least one role and at least one role setting, and the at least one role corresponds to the at least one role setting in a one-to-one manner; the target chapter is any one of the multiple chapters; 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 a character corresponding to a character setting in a target chapter; Performing third semantic recognition on at least one section of dialogue text to obtain at least one third semantic information; at least one section 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; Determine 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 according to at least one third semantic information, and determine the corresponding order of each line in the at least one paragraph of dialogue text according to the coherence; Arranging all the lines in at least one paragraph of the dialogue text according to the corresponding order of each line in at least one paragraph of the dialogue text to obtain a target dialogue text; Determine, according to at least one role setting and at least one third semantic information, a role performance corresponding to each line in the target line text; the role performance includes all actions, all intonations, and all expressions of the role corresponding to the role performance when performing the line corresponding to the role performance; Determine the chapter background corresponding to the target chapter, and determine the narration corresponding to the target chapter based on the chapter background; A target chapter script is determined based on a target scene, narration, at least one character, a 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 multiple chapter scripts.
[0091] In a 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 by using the preset auxiliary generation model to obtain the second drama script, the processing unit 402 is specifically used to: Preprocessing the first drama script to obtain a first processed text; Correcting grammatical errors in the first processed text by a grammatical error correction module to obtain a second processed text; The second processed text is segmented by a 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 according to 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, a misused word in the plurality of segmented words is determined according to the plurality of context information to obtain at least one misused word, 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 third processed text is adjusted through a rhythm adjustment module to obtain a second drama script.
[0092] In a possible embodiment, in adjusting the third processed text by the rhythm adjustment module to obtain the second drama script, the processing unit 402 is specifically configured to: Determining, by the rhythm adjustment module, a content word whose occurrence times in the third processed text is greater than a preset number of times, and obtaining a plurality of content words; Selecting multiple professional words from the Gan opera knowledge base to replace multiple content words, to obtain a fourth processed text; the multiple professional words correspond to the multiple content words one by one; Sentence the fourth processed text to obtain a plurality of sentences; Performing intonation marking on the plurality of sentences to obtain a plurality of intonation marking information; the plurality of sentences correspond to the plurality of intonation marking information one by one; Determine the similarity between each intonation marking information and adjacent intonation marking information in the plurality of intonation marking information, and determine non-rhyming sentences in the plurality of sentences according to the similarity between each intonation marking information and adjacent intonation marking information, to obtain at least one non-rhyming sentence; According to the multiple intonation marking information, at least one non-rhyming sentence in the fourth processed text is synonymously converted to obtain a second drama script.
[0093] In a possible embodiment, the preset auxiliary generation model further includes a checking 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: Determining the content to be modified in the second drama script according to 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.
[0094] See also 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, the electronic device 500 includes a transceiver 501, a processor 502 and a memory 503. They are connected via a bus 504. The memory 503 is used to store computer programs and data, and can transmit the data stored in the memory 503 to the processor 502. The electronic device 500 may include a drama script auxiliary generation device 400.
[0095] The processor 502 is used to read the computer program in the memory 503 and perform the following operations: Obtain the user's creation demand text from the interactive device; Determine multiple topic summaries based on the creative requirements text; Determine first interaction information according to the multiple topic summaries, and display the first interaction information to the user through an interactive device; Acquire, from the interactive device, first response information of the user to the first interactive information, and determine, according to the first response information, a target topic summary from a plurality of topic summaries; Generate the first drama script based on the target theme summary; The first drama script is polished by using a preset auxiliary generation model to obtain a second drama script; Determining second interactive information according to the second drama script, and displaying the second interactive information to the user through the interactive device; Acquire second response information of the user to the second interaction information from the interaction device; According to the second response information, the second drama script is modified to obtain the target drama script.
[0096] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on 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. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments 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 the form of hardware or computer software driving hardware 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 the present application.
[0097] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. 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.
[0098] 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 recorded in the above method embodiments.
[0099] 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 the present application is not limited by the described order of actions, because according to the present 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 the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0100] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0101] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, 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 the device or unit can be electrical or other forms.
[0102] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0103] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software program module.
[0104] 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, including a number of instructions to enable 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, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0105] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable memory, and the memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0106] The embodiments of the present application are introduced in detail above. Specific examples are used in this article 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 general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method 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 applied to a drama script auxiliary generation system, wherein the drama script auxiliary generation system also includes an interactive device; the method includes: Acquire the user's creation requirement text from the interactive device; Determine a plurality of topic summaries according to the creation requirement text; each topic summaries is used to represent a creation intention; Determine first interaction information according to the multiple subject abstracts, and display the first interaction information to the user through the interaction device; the first interaction information is used to inquire the user about the creative intention of the multiple subject abstracts; Acquire, from the interactive device, first response information of the user to the first interactive information, and determine a target topic summary from the multiple topic summaries according to the first response information; Generating a first drama script according to the target theme summary; Polishing the first drama script by using a preset auxiliary generation model to obtain a second drama script; Determine second interactive information according to the second drama script, and display 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; Acquire, from the interactive device, second response information of the user to the second interactive information; the second response information includes a review and annotation record of the user to the second drama script; The second drama script is modified according to the second response information to obtain a target 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 according to 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: The step of 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; Determine the plot development process according to 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 role 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: Acquire 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; Generate a dialogue text corresponding to the at least one character setting to obtain at least one paragraph of dialogue text; each paragraph of dialogue text includes all the dialogues of a character corresponding to a 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 one by one; each third semantic information includes semantic information corresponding to each line in the dialogue text corresponding to the third semantic information; Determine 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 according to the at least one third semantic information, and determine the order corresponding to each line in the at least one segment of the dialogue text according to the coherence; Arranging all the lines in the at least one paragraph of dialogue text according to the order corresponding to each line in the at least one paragraph of dialogue text to obtain a target dialogue text; Determine, according to the at least one role setting and the at least one third semantic information, a role performance corresponding to each line in the target line text; the role performance includes all actions, all intonations, and all expressions of the role corresponding to the role performance when performing the line corresponding to the role 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 2, characterized in that: The preset auxiliary generation model includes: a grammatical error correction module, a semantic coherence module, and a rhythm adjustment module; polishing the first drama script by the 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 according to the plurality of fourth semantic information to obtain a plurality of context information; the plurality of segmented words correspond to the plurality of context information one-to-one, misused words in the plurality of segmented words are determined according to the plurality of context information to obtain at least one misused word, and at least one word is selected from the Gan opera knowledge base to replace the at least one misused word to obtain a third processed text; the at least one word corresponds to the at least one misused word one-to-one; The third processed text is adjusted by the rhythm adjustment module to obtain the second drama script.
6. The method according to claim 5, characterized in that The step of adjusting the third processed text by the rhythm adjustment module to obtain the second drama script includes: Determining, by the prosody adjustment module, a content word whose occurrence times in the third processed text is greater than a preset number of times, to obtain a plurality of content words; 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 one by one; Sentence the fourth processed text to obtain a plurality of sentences; Performing intonation marking on the plurality of sentences to obtain a plurality of intonation marking information; the plurality of sentences correspond to the plurality of intonation marking information one by one; Determine the similarity between each intonation marking information and adjacent intonation marking information in the plurality of intonation marking information, and determine non-rhyming sentences in the plurality of sentences according to the similarity between each intonation marking information and adjacent intonation marking information, to obtain at least one non-rhyming sentence; According to the multiple intonation marking information, the at least one non-rhyming sentence in the fourth processed text is subjected to synonym conversion to obtain the second drama script.
7. The method according to claim 6, characterized in that The preset auxiliary generation model also includes a checking optimization module; the second drama script is modified according to the second response information to obtain a target drama script, including: Determining the content to be modified in the second drama script according to 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.
8. A drama script auxiliary generation device, characterized in that: The device is located in a drama script auxiliary generation system, and the drama script auxiliary generation system also includes an interactive device; the device includes: An acquisition unit, used for acquiring a user's creation requirement text from the interactive device; A processing unit, used to determine a plurality of topic summaries according to the creation requirement text; each topic summaries is used to represent a creation intention; Determine first interaction information according to the multiple subject abstracts, and display the first interaction information to the user through the interaction device; the first interaction information is used to inquire the user about the creative intention of the multiple subject 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 summary from the multiple topic summaries according to the first response information; The processing unit is used to generate a first drama script according to the target theme summary; Polishing the first drama script by using a preset auxiliary generation model to obtain a second drama script; Determine second interactive information according to the second drama script, and display 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; The acquisition unit is used to acquire, from the interactive device, second response information of the user to the second interactive information; the second response information includes a review and annotation record of the user to the second drama script; The processing unit is used to modify the second drama script according to the second response information to obtain a target drama script.
9. An electronic device, characterized in that: include: 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 executes the method as described in any one of claims 1 to 7.
10. 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 7.
Citation Information
Patent Citations
Language model role playing-based long script automatic generation method
CN118394926A
Method and system for generating text script based on large language model
CN118761383A
Drama scene generation method and device
CN118762109A
Scenario product generation method and device and storage medium
CN118964416A
Video generation method, computing device, computer storage medium and computer program product
CN118972670A
Cited By
Intelligent script generation method, system and equipment based on large model
CN119990078A