Scenario processing method and device, electronic equipment and storage medium

By dividing and calculating the plot nodes in the script, the problem of how to quantify the quality of the script is solved, and the close correlation of the plot of the drama in the script is achieved, which improves the quality of the script.

CN119886111APending Publication Date: 2025-04-25SHANGHAI IQIYI NEW MEDIA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411973767.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

How to quantitatively evaluate the quality of the script, especially how to evaluate whether the plot in the script is closely related, leading to the problem of degradation of the script quality.

Method used

By obtaining the description information of the plot nodes for each episode in the script, multiple plot nodes are divided into target plot chains, and the plot correlation of the series is calculated as a quantitative indicator of the quality of the series.

Benefits of technology

A quantitative evaluation of the quality of the drama in the script is achieved, which can reflect whether the plot of the drama is closely related, thereby improving the quality of the script.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886111A_ABST
    Figure CN119886111A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a script processing method and device, electronic equipment and a storage medium. The script processing method comprises the steps that for each episode in a script, description information of each plot contained in the episode is acquired; based on the description information of each plot, dividing the plurality of plots into a plurality of target plot chains, each target plot chain including at least one plot; and based on the description information of the plot points contained in each target plot chain, calculating the plot correlation degree of the episodes, and taking the plot correlation degree of the episodes as a quantitative index of the episode quality. According to the embodiment of the invention, quantitative evaluation of the episode quality in the script can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a script processing method, device, electronic device and storage medium. Background Art

[0002] A script is a textual blueprint for audiovisual works of art, such as dramas, movies, TV series, and radio dramas. It describes in detail the plot, dialogues, scenes, character actions, and other elements of the work. Scripts are not only an important tool in the creative process, but also an important document for communicating the creator's intentions and guiding the actors' performances. Through scripts, creators can transform their creativity and stories into visual works.

[0003] Usually, the plots in high-quality scripts are closely linked and interconnected. If the plot is messy and too scattered, the quality of the script will decline. Therefore, how to quantitatively evaluate the quality of the script is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a script processing method, device, electronic device and storage medium to achieve quantitative evaluation of the quality of the script. The specific technical solution is as follows:

[0005] In a first aspect of the present invention, a script processing method is provided, comprising:

[0006] For each episode in the script, obtain description information of each plot point contained in the episode;

[0007] Based on the description information of each of the plot points, the plurality of plot points are divided into a plurality of target plot chains, each of the target plot chains containing at least one of the plot points;

[0008] Based on the description information of the plot points included in each of the target plot chains, the plot relevance of the series is calculated, and the plot relevance of the series is used as a quantitative indicator of the quality of the series.

[0009] Optionally, based on the description information of each of the plot points, the plurality of plot nodes are divided into a plurality of target plot chains, including: based on the description information of each of the plot points, the plurality of plot nodes are divided into a plurality of initial plot chains, each of the initial plot chains containing at least one of the plot nodes; based on the description information of the plot points contained in each of the initial plot chains, the plurality of initial plot chains are merged to obtain a target plot chain.

[0010] Optionally, the description information of the plot point includes summary information of the plot point and identification information of the plot point; based on the description information of each plot point, the plurality of plot points are divided into a plurality of initial plot chains, including: inputting the summary information of each plot point, the identification information of each plot point and the first prompt information into a first large language model, obtaining the identification information of each initial plot chain output by the first large language model and the identification information of the plot points contained in each initial plot chain; the first prompt information is used to guide the first large language model to divide the plurality of plot points into a plurality of initial plot chains.

[0011] Optionally, the description information of the plot point includes summary information of the plot point; based on the description information of the plot point contained in each of the initial plot chains, multiple initial plot chains are merged to obtain a target plot chain, including: inputting identification information of each of the initial plot chains, summary information of the plot points contained in each of the initial plot chains, and second prompt information into a second largest language model to obtain identification information of each target plot chain output by the second largest language model and identification information of the initial plot chain contained in each of the target plot chains; the second prompt information is used to guide the second largest language model to merge multiple initial plot chains.

[0012] Optionally, the plot relevance of the series is calculated based on the description information of the plot points contained in each of the target plot chains, including: for each target plot chain, based on the description information of the plot points contained in the target plot chain, calculating the amount of associated content of the target plot chain, the amount of associated content of the target plot chain indicating how much content in the target plot chain is associated; calculating the theoretical maximum amount of associated content of the series based on the description information of the plot points contained in the series; and taking the ratio of the sum of the amounts of associated content of multiple target plot chains to the theoretical maximum amount of associated content as the plot relevance of the series.

[0013] Optionally, the description information of the plot point includes the number of words in the content information of the plot point; based on the description information of the plot point contained in the target plot chain, the amount of associated content of the target plot chain is calculated, including: calculating the sum of the number of words in the content information of every two plot nodes contained in the target plot chain as a first sum; and adding up the first sums to obtain the amount of associated content of the target plot chain.

[0014] Optionally, based on the description information of each of the plot points, the theoretical maximum amount of associated content of the series is calculated, including: respectively calculating the sum of the number of words in the content information of every two plot points contained in the series as a second sum; and adding up the second sums to obtain the theoretical maximum amount of associated content of the series.

[0015] Optionally, the method further includes: calculating a weighted average of the plot relevance of the plurality of episodes in the script as the plot relevance of the script, and the plot relevance of the script serves as a quantitative indicator of the quality of the script.

[0016] In a second aspect of the present invention, a script processing device is provided, comprising:

[0017] An acquisition module, for acquiring, for each episode in the script, description information of each plot point contained in the episode;

[0018] A division module, for dividing the plurality of plot points into a plurality of target plot chains based on the description information of each plot point, each of the target plot chains containing at least one plot point;

[0019] A calculation module is used to calculate the plot relevance of the series based on the description information of the plot points contained in each of the target plot chains, and the plot relevance of the series is used as a quantitative indicator of the quality of the series.

[0020] Optionally, the division module includes: an initial division unit, used to divide the multiple plot points into multiple initial plot chains based on the description information of each plot point, each of the initial plot chains containing at least one plot node; and a merging unit, used to merge the multiple initial plot chains based on the description information of the plot points contained in each of the initial plot chains to obtain a target plot chain.

[0021] Optionally, the description information of the plot point includes summary information of the plot point and identification information of the plot point; the initial division unit is specifically used to input the summary information of each plot point, the identification information of each plot point and the first prompt information into a first large language model to obtain the identification information of each initial plot chain output by the first large language model and the identification information of the plot point contained in each initial plot chain; the first prompt information is used to guide the first large language model to divide the multiple plot points into multiple initial plot chains.

[0022] Optionally, the description information of the plot point includes summary information of the plot point; the merging unit is specifically used to input the identification information of each of the initial plot chains, the summary information of the plot points contained in each of the initial plot chains, and the second prompt information into the second largest language model to obtain the identification information of each target plot chain output by the second largest language model and the identification information of the initial plot chain contained in each of the target plot chains; the second prompt information is used to guide the second largest language model to merge multiple initial plot chains.

[0023] Optionally, the first calculation module includes: a first information calculation unit, used to calculate, for each target plot chain, the amount of associated content of the target plot chain based on the description information of the plot points contained in the target plot chain, the amount of associated content of the target plot chain indicating how much content in the target plot chain is associated; a second information calculation unit, used to calculate the theoretical maximum amount of associated content of the drama based on the description information of the plot points contained in the drama; and a third information calculation unit, used to use the ratio of the sum of the amounts of associated content of multiple target plot chains to the theoretical maximum amount of associated content as the plot association degree of the drama.

[0024] Optionally, the description information of the plot point includes the number of words in the content information of the plot point; the first information calculation unit is specifically used to calculate the sum of the number of words in the content information of every two plot nodes contained in the target plot chain, as a first sum; and add up the first sums to obtain the amount of associated content of the target plot chain.

[0025] Optionally, the second information calculation unit is specifically used to calculate the sum of the number of words in the content information of each two plot nodes contained in the drama as the second sum; and add up the second sums to obtain the theoretical maximum amount of associated content of the drama.

[0026] Optionally, the device also includes: a second calculation module, used to calculate the weighted average of the plot relevance of multiple episodes in the script as the plot relevance of the script, and the plot relevance of the script serves as a quantitative indicator of the quality of the script.

[0027] In another aspect of the implementation of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; the memory is used to store computer programs; and the processor is used to implement any of the above-mentioned script processing methods when executing the computer program stored in the memory.

[0028] In another aspect of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program runs on a computer, the computer implements any of the script processing methods described above.

[0029] In another aspect of the implementation of the present invention, a computer program product is provided, in which a computer program is stored. When the computer program is run on a computer, the computer is enabled to implement any of the script processing methods described above.

[0030] The script processing method, device, electronic device and storage medium provided by the embodiments of the present invention first obtain the description information of each plot point contained in each episode in the script, where a plot point describes a relatively independent small event, and then divide the multiple plot nodes into multiple target plot chains based on the description information of each plot point, where a target plot chain represents an independent plot. There is a correlation between the plots of the plot nodes in the same target plot chain, so based on the description information of the plot points contained in each target plot chain, the plot correlation of the episode can be calculated. The plot correlation of the episode can reflect whether the plots in the episode are closely related, so the plot correlation of the episode can be used as a quantitative indicator of the quality of the episode, thereby realizing the quantitative evaluation of the quality of the episode in the script. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0032] Figure 1 The present invention is a flowchart of a script processing method according to an embodiment of the present invention.

[0033] Figure 2 A schematic diagram of a script processing process according to an embodiment of the present invention.

[0034] Figure 3 The present invention is a flowchart of another script processing method in an embodiment of the present invention.

[0035] Figure 4 It is a structural block diagram of a script processing device in an embodiment of the present invention.

[0036] Figure 5 The figure is a structural block diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0038] First, the technical terms involved in the embodiments of the present invention are explained.

[0039] Script: The script is the textual basis of audiovisual works such as movies and TV series. It describes in detail the plot, character dialogues, scene settings, action instructions, etc.

[0040] Episode: An episode refers to a single unit in a TV series. In a TV series, each episode is an independent story, but also part of the entire series narrative. In the embodiment of the present invention, when the script is a TV series script, the script contains multiple episodes, and each episode refers to each episode in the TV series; when the script is a movie script, the script contains one episode, and the episode refers to the entire movie.

[0041] Scene: A scene is a division in the script structure, which divides the script into multiple parts, each of which has its own specific narrative task. Scenes help organize the flow and rhythm of the story and ensure the coherence and dynamic changes of the story. In the embodiment of the present invention, each episode can contain multiple scenes.

[0042] Storyline: A storyline refers to a main or secondary line that runs through a script, which describes the development of a character, the resolution of a conflict, etc. A storyline can be single or multiple, which together form a complex structure of the script. In an embodiment of the present invention, multiple storylines can be extracted from each episode.

[0043] Plot points: Plot points are key turning points in a script. They are important events that drive the story forward. Plot points usually mark major changes in the story, such as character decisions, unexpected events, intensified conflicts, etc. In the embodiment of the present invention, each plot point is composed of several scenes, and each plot point tells a relatively independent small event.

[0044] Plot chain: A plot chain refers to a series of interrelated events in a story, which are arranged in a logical order and work together to drive the story forward. In the embodiment of the present invention, each plot chain (specifically, a target plot chain) is composed of at least one plot point, and a plot chain can represent an independent plot plot.

[0045] The following is a detailed introduction to the script processing method in the embodiment of the present invention.

[0046] Figure 1 The present invention is a flowchart of a script processing method according to an embodiment of the present invention.

[0047] like Figure 1 As shown, the script processing method may include the following steps:

[0048] Step 101, for each episode in the script, obtain description information of each plot point contained in the episode.

[0049] In the embodiment of the present invention, each episode in the script is processed separately. For any episode in the script, the description information of each plot point contained in the episode can be obtained.

[0050] Exemplarily, the process of obtaining description information of each plot point contained in the series may include: obtaining description information of each scene and description information of each story line contained in the series; for each scene contained in the series, identifying identification information of the story line to which the scene belongs based on the description information of the scene and the description information of the story line; dividing multiple scenes into multiple initial plot nodes based on the description information of each scene and the identification information of the story line to which each scene belongs, each of the initial plot nodes contains at least one scene; based on the description information of the scene contained in each initial plot node and the identification information of the story line to which the scene contained in each initial plot node belongs, merging multiple initial plot nodes to obtain a target plot node, wherein the target plot node is the plot node contained in the series; for each plot node contained in the series, obtaining description information of the plot point.

[0051] The description information of a scene may include, but is not limited to: scene identification information, scene content information, scene role information, scene scene information, etc. Among them, the scene identification information can uniquely identify a scene, the scene identification information can be any applicable identification such as the scene number, and the scene identification information can represent the sequence of the scenes. The scene content information refers to the script content corresponding to the scene, etc. The scene role information refers to the various roles involved in the scene, such as human characters, etc. The scene scene information refers to the scene such as the location corresponding to the scene.

[0052] The description information of the story line may include but is not limited to: identification information of the story line, content information of the story line, etc. The identification information of the story line can uniquely identify a story line, and the identification information of the story line can be any applicable identification such as the number of the story line. The content information of the story line refers to the plot summary corresponding to the story line, etc.

[0053] Exemplarily, the process of identifying the identification information of the story line to which the scene belongs based on the description information of the scene and the description information of the story line may include: inputting the content information of the scene, the content information of each story line, the identification information of each story line and third prompt information into a third large language model (Large Language Model, LLM for short), to obtain the identification information of the story line to which the scene belongs output by the third large language model; the third prompt information is used to guide the third large language model to identify the identification information of the story line to which the scene belongs.

[0054] Exemplarily, the process of dividing the multiple scenes into multiple initial plot nodes based on the description information of each scene and the identification information of the story line to which each scene belongs may include: sorting the multiple scenes in chronological order based on the identification information of each scene, and taking two adjacent scenes as the first scene and the second scene; when the character information of the first scene and the character information of the second scene are at least partially overlapped, and the identification information of the story line to which the first scene belongs is the same as the identification information of the story line to which the second scene belongs, dividing the first scene and the second scene into the same initial plot node.

[0055] Exemplarily, based on the description information of the scenes contained in each of the initial plot nodes and the identification information of the story lines to which the scenes contained in each of the initial plot nodes belong, the process of merging a plurality of the initial plot nodes to obtain a target plot node may include: based on the identification information of the scenes contained in each of the initial plot nodes, sorting the plurality of initial plot nodes in chronological order, taking two non-adjacent initial plot nodes as the first initial plot node and the second initial plot node; the number of scenes between the first initial plot node and the second initial plot node is less than a preset threshold, and the scene information of the last scene contained in the first initial plot node is consistent with the scene information of the first scene contained in the second initial plot node. The first initial plot node and the second initial plot node are the same, and the identification information of the story line to which the scenes contained in the first initial plot node belong is the same as the identification information of the story line to which the scenes contained in the second initial plot node belong, and the character information of the scenes contained in the first initial plot node and the character information of the scenes contained in the second initial plot node are at least partially overlapped, and the character information of the scenes contained in the first initial plot node and the character information of the scenes contained in the second initial plot node do not appear in the initial plot nodes between the first initial plot node and the second initial plot node, merge the first initial plot node and the second initial plot node; and use the merged initial plot node and the remaining unmerged initial plot nodes as the target plot nodes.

[0056] The target plot point is a plot point included in the episode. For each plot point included in the episode, description information of the plot point can be obtained. Exemplarily, the description information of the plot point can include but is not limited to: identification information of the plot point, summary information of the plot point, word count of content information of the plot point, etc.

[0057] After obtaining the plot point through the above process, the identification information of the plot point can be set. The identification information of the plot point can uniquely identify a plot point. The identification information of the plot point can be any applicable identification such as the number of the plot point. The content information of the plot point includes the content information of all scenes included in the plot point. The word count of the content information of the plot point is the total word count of the content information of all scenes included in the plot point.

[0058] For the summary information of the plot point, the summary information of the plot point can be extracted based on the description information of the scene contained in the plot point and the description information of the story line to which the scene contained in the plot point belongs. Exemplarily, the content information of the scene contained in the plot point, the content information of the story line to which the scene contained in the plot point belongs, and the fourth prompt information can be input into the fourth language model to obtain the summary information of the plot point output by the fourth language model; the fourth prompt information is used to guide the fourth language model to extract the summary information of the plot point.

[0059] Step 102: based on the description information of each of the plot points, divide the plurality of plot nodes into a plurality of target plot chains, each of the target plot chains including at least one of the plot nodes.

[0060] In an embodiment of the present invention, by comparing and analyzing the description information of each plot point contained in the drama, the plot nodes with related plots can be aggregated, thereby dividing the plot nodes into multiple target plot chains, each of which can include at least one plot node, and a target plot chain can represent an independent plot.

[0061] In an optional implementation, the process of dividing the plurality of plot points into a plurality of target plot chains based on the description information of each plot point may include: dividing the plurality of plot points into a plurality of initial plot chains based on the description information of each plot point, each initial plot chain containing at least one plot point; merging the plurality of initial plot chains based on the description information of the plot points contained in each initial plot chain to obtain a target plot chain. In this method, the plurality of plot points are first divided into initial plot chains, and then the associated initial plot chains are further merged to obtain a target plot chain, which can more deeply analyze the relevance of the plots and make the target plot chain more accurate.

[0062] For example, considering that the large language model has higher accuracy and efficiency, the large language model can be used to analyze the association between plot nodes, so as to divide the initial plot chain.

[0063] Therefore, the process of dividing the plurality of plot points into a plurality of initial plot chains based on the description information of each of the plot points may include: inputting the summary information of each of the plot points, the identification information of each of the plot points and the first prompt information into a first large language model, obtaining the identification information of each initial plot chain output by the first large language model and the identification information of the plot points contained in each of the initial plot chains; the first prompt information is used to guide the first large language model to divide the plurality of plot nodes into a plurality of initial plot chains.

[0064] The first prompt information is used to guide the first language model to divide the initial plot chain. The specific form of the first prompt information can be set according to actual needs, and this embodiment does not limit this. For example, the first prompt information can be "Please divide multiple plot points into multiple initial plot chains based on the input summary information of each plot point and the identification information of each plot point, and output the identification information of each initial plot chain and the identification information of the plot points contained in each initial plot chain" and the like.

[0065] The identification information of the initial plot chain can be automatically generated by the first language model after the initial plot chain is divided. The identification information of the initial plot chain can uniquely identify an initial plot chain. The identification information of the initial plot chain can be any applicable identification such as the number of the initial plot chain.

[0066] Similarly, considering that the large language model has higher accuracy and efficiency, the large language model can be used to analyze the associations between the initial plot chains, thereby merging the initial plot chains.

[0067] Therefore, the process of merging multiple initial plot chains based on the description information of the plot points contained in each of the initial plot chains to obtain a target plot chain may include: inputting the identification information of each of the initial plot chains, the summary information of the plot points contained in each of the initial plot chains, and the second prompt information into the second largest language model to obtain the identification information of each target plot chain output by the second largest language model and the identification information of the initial plot chains contained in each of the target plot chains; the second prompt information is used to guide the second largest language model to merge multiple initial plot chains. Among them, a target plot chain may include one or more initial plot chains. After obtaining the initial plot chains contained in the target plot chain, the plot points contained in the target plot chain can be obtained.

[0068] The second prompt information is used to guide the second largest language model to merge the initial plot chains. The specific form of the second prompt information can be set according to actual needs, and this embodiment does not limit this. For example, the second prompt information can be "Please merge multiple initial plot chains based on the input identification information of each initial plot chain and the summary information of the plot points contained in each initial plot chain, and output the identification information of each target plot chain and the identification information of the initial plot chain contained in each target plot chain" and the like.

[0069] The identification information of the target plot chain can be automatically generated by the second language model after the target plot chain is obtained. The identification information of the target plot chain can uniquely identify a target plot chain. The identification information of the target plot chain can be any applicable identification such as the number of the target plot chain.

[0070] Exemplarily, the above-mentioned first language model, second language model, third language model, and fourth language model can adopt large language models of any applicable structure such as GPT (Generative Pre-trained Transformer), BERT (Bidirectional Encoder Representations from Transformers), etc., and this embodiment does not impose any limitation on this.

[0071] Step 103, based on the description information of the plot points included in each of the target plot chains, the plot relevance of the series is calculated, and the plot relevance of the series is used as a quantitative indicator of the quality of the series.

[0072] In an optional implementation, the process of calculating the plot relevance of the series based on the description information of the plot points contained in each of the target plot chains may include: for each target plot chain, calculating the amount of associated content of the target plot chain based on the description information of the plot points contained in the target plot chain, the amount of associated content of the target plot chain indicating how much content in the target plot chain is associated; calculating the theoretical maximum amount of associated content of the series based on the description information of the plot points contained in the series; and taking the ratio of the sum of the amounts of associated content of multiple target plot chains to the theoretical maximum amount of associated content as the plot relevance of the series.

[0073] The plot points included in the target plot chain are associated with each other, and the sum of the word counts of the content information of any two plot points can represent the associated content volume of the two plot points. Therefore, the associated content volume of the target plot chain can be calculated based on the associated content volume of every two plot points included in the target plot chain. Exemplarily, the process of calculating the associated content volume of the target plot chain based on the description information of the plot points included in the target plot chain can include: respectively calculating the sum of the word counts of the content information of every two plot points included in the target plot chain as a first sum; and accumulating the first sums to obtain the associated content volume of the target plot chain.

[0074] Assuming that the plot points included in the drama are all related to each other, the sum of the word counts of the content information of any two plot points can represent the amount of related content of the two plot points. Therefore, the theoretical maximum amount of related content of the drama can be calculated based on the amount of related content of every two plot points included in the drama. Exemplarily, the process of calculating the theoretical maximum amount of related content of the drama based on the description information of each of the plot points can include: calculating the sum of the word counts of the content information of every two plot points included in the drama as a second sum; and adding up the second sums to obtain the theoretical maximum amount of related content of the drama.

[0075] The ratio of the sum of the associated content of the multiple target plot chains in the series to the theoretical maximum associated content of the series is used as the plot relevance of the series. The plot relevance of the series is a quantitative indicator of the quality of the series, reflecting whether the plots in the series are closely related. Therefore, the greater the plot relevance of the series, the higher the quality of the series.

[0076] The plot nodes included in the target plot chain are related to each other in pairs. The sum of the word counts of the content information of every two plot nodes represents the amount of related content between the two plot points, indicating how much content is related in the two plot nodes. The amount of related content of every two plot points in the target plot chain is accumulated to obtain the amount of related content of the target plot chain, indicating how much content is related in the target plot chain. The sum of the amount of related content of multiple target plot chains in the series indicates how much content is actually related in the series. The theoretical maximum amount of related content of the series indicates how much content is theoretically related in the series. Therefore, the larger the ratio of the sum of the amount of related content of multiple target plot chains in the series to the theoretical maximum amount of related content of the series, the higher the proportion of related content in the series, and therefore the higher the plot relevance of the series, indicating that the quality of the series is higher.

[0077] In an embodiment of the present invention, first, for each episode in a script, description information of each plot point contained in the episode is obtained, where a plot point describes a relatively independent small event, and then based on the description information of each plot point, multiple plot points are divided into multiple target plot chains, where a target plot chain represents an independent plot. There is a correlation between the plot points in the same target plot chain, so based on the description information of the plot points contained in each target plot chain, the plot correlation of the episode can be calculated. The plot correlation of the episode can reflect whether the plots in the episode are closely related, so the plot correlation of the episode can be used as a quantitative indicator of the quality of the episode, thereby achieving a quantitative evaluation of the quality of the episode in the script.

[0078] Figure 2 FIG. 1 is a schematic diagram of a script processing process according to an embodiment of the present invention. Figure 2 As shown, in the script processing process, first, according to the description information of each scene contained in the drama, the multiple scenes contained in the drama are divided into multiple plot points, and the identification information of each plot point, the summary information of the plot point, and the word count of the content information of the plot point are obtained; then, according to the identification information of each plot point contained in the drama, the summary information of the plot point, and the word count of the content information of the plot point, the multiple plot points contained in the drama are divided into multiple initial plot chains, and the identification information of each initial plot chain and the identification information of the plot points contained in each initial plot chain are obtained; then, according to the identification information of each initial plot chain contained in the drama and the summary information of the plot points contained in each initial plot chain, the multiple initial plot chains contained in the drama are merged to obtain the identification information of each target plot chain and the identification information of the plot points contained in each target plot chain; finally, the plot relevance is calculated according to the target plot chain. For the specific processing process, the relevant description of the above embodiment can be referred to, and this embodiment will not be discussed in detail here.

[0079] Figure 3 The present invention is a flowchart of another script processing method in an embodiment of the present invention.

[0080] like Figure 3 As shown, the script processing method may include the following steps:

[0081] Step 301, for each episode in the script, obtain description information of each plot point contained in the episode.

[0082] Step 302: based on the description information of each of the plot points, divide the plurality of plot nodes into a plurality of target plot chains, each of the target plot chains including at least one of the plot nodes.

[0083] Step 303, based on the description information of the plot points included in each of the target plot chains, the plot relevance of the series is calculated, and the plot relevance of the series is used as a quantitative indicator of the quality of the series.

[0084] Step 304, calculating a weighted average of the plot relevance of the plurality of episodes in the script as the plot relevance of the script, and the plot relevance of the script is used as a quantitative indicator of the quality of the script.

[0085] In the embodiment of the present invention, after calculating the plot relevance of each episode, the weighted average of the plot relevance of multiple episodes in the script can be further calculated, and the weighted average is used as the plot relevance of the script. The plot relevance of the script can reflect whether the overall plot in the script is closely related, so the plot relevance of the script can be used as a quantitative indicator of the quality of the script, thereby realizing a quantitative evaluation of the quality of the episodes in the script. The greater the plot relevance of the script, the higher the quality of the script.

[0086] The weight of each episode can be set according to actual needs. The weights of different episodes can be the same or different.

[0087] Figure 4 It is a structural block diagram of a script processing device in an embodiment of the present invention.

[0088] like Figure 4 As shown, the script processing device may include the following modules:

[0089] The acquisition module 401 is used to acquire, for each episode in the script, description information of each plot point contained in the episode;

[0090] A division module 402, for dividing the plurality of plot points into a plurality of target plot chains based on the description information of each plot point, each target plot chain including at least one plot point;

[0091] The calculation module 403 is used to calculate the plot relevance of the series based on the description information of the plot points included in each of the target plot chains, and the plot relevance of the series is used as a quantitative indicator of the quality of the series.

[0092] Optionally, the division module 402 includes: an initial division unit, which is used to divide the multiple plot points into multiple initial plot chains based on the description information of each plot point, each of which contains at least one plot node; and a merging unit, which is used to merge the multiple initial plot chains based on the description information of the plot points contained in each of the initial plot chains to obtain a target plot chain.

[0093] Optionally, the description information of the plot point includes summary information of the plot point and identification information of the plot point; the initial division unit is specifically used to input the summary information of each plot point, the identification information of each plot point and the first prompt information into a first large language model to obtain the identification information of each initial plot chain output by the first large language model and the identification information of the plot point contained in each initial plot chain; the first prompt information is used to guide the first large language model to divide the multiple plot points into multiple initial plot chains.

[0094] Optionally, the description information of the plot point includes summary information of the plot point; the merging unit is specifically used to input the identification information of each of the initial plot chains, the summary information of the plot points contained in each of the initial plot chains, and the second prompt information into the second largest language model to obtain the identification information of each target plot chain output by the second largest language model and the identification information of the initial plot chain contained in each of the target plot chains; the second prompt information is used to guide the second largest language model to merge multiple initial plot chains.

[0095] Optionally, the first calculation module 403 includes: a first information calculation unit, used to calculate, for each target plot chain, the amount of associated content of the target plot chain based on the description information of the plot points contained in the target plot chain, the amount of associated content of the target plot chain indicating how much content in the target plot chain is associated; a second information calculation unit, used to calculate the theoretical maximum amount of associated content of the drama based on the description information of the plot points contained in the drama; and a third information calculation unit, used to use the ratio of the sum of the amounts of associated content of multiple target plot chains to the theoretical maximum amount of associated content as the plot association degree of the drama.

[0096] Optionally, the description information of the plot point includes the number of words in the content information of the plot point; the first information calculation unit is specifically used to calculate the sum of the number of words in the content information of every two plot nodes contained in the target plot chain, as a first sum; and add up the first sums to obtain the amount of associated content of the target plot chain.

[0097] Optionally, the second information calculation unit is specifically used to calculate the sum of the number of words in the content information of each two plot nodes contained in the drama as the second sum; and add up the second sums to obtain the theoretical maximum amount of associated content of the drama.

[0098] Optionally, the device also includes: a second calculation module, used to calculate the weighted average of the plot relevance of multiple episodes in the script as the plot relevance of the script, and the plot relevance of the script serves as a quantitative indicator of the quality of the script.

[0099] In an embodiment of the present invention, first, for each episode in a script, description information of each plot point contained in the episode is obtained, where a plot point describes a relatively independent small event, and then based on the description information of each plot point, multiple plot points are divided into multiple target plot chains, where a target plot chain represents an independent plot. There is a correlation between the plot points in the same target plot chain, so based on the description information of the plot points contained in each target plot chain, the plot correlation of the episode can be calculated. The plot correlation of the episode can reflect whether the plots in the episode are closely related, so the plot correlation of the episode can be used as a quantitative indicator of the quality of the episode, thereby achieving a quantitative evaluation of the quality of the episode in the script.

[0100] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501 , a communication interface 502 , a memory 503 and a communication bus 504 , wherein the processor 501 , the communication interface 502 , and the memory 503 communicate with each other via the communication bus 504 .

[0101] Memory 503, used for storing computer programs;

[0102] The processor 501 is used to execute the program stored in the memory 503, and implements the following steps:

[0103] For each episode in the script, obtain description information of each plot point contained in the episode;

[0104] Based on the description information of each of the plot points, the plurality of plot points are divided into a plurality of target plot chains, each of the target plot chains containing at least one of the plot points;

[0105] Based on the description information of the plot points included in each of the target plot chains, the plot relevance of the series is calculated, and the plot relevance of the series is used as a quantitative indicator of the quality of the series.

[0106] Optionally, based on the description information of each of the plot points, the plurality of plot nodes are divided into a plurality of target plot chains, including: based on the description information of each of the plot points, the plurality of plot nodes are divided into a plurality of initial plot chains, each of the initial plot chains containing at least one of the plot nodes; based on the description information of the plot points contained in each of the initial plot chains, the plurality of initial plot chains are merged to obtain a target plot chain.

[0107] Optionally, the description information of the plot point includes summary information of the plot point and identification information of the plot point; based on the description information of each plot point, the plurality of plot points are divided into a plurality of initial plot chains, including: inputting the summary information of each plot point, the identification information of each plot point and the first prompt information into a first large language model, obtaining the identification information of each initial plot chain output by the first large language model and the identification information of the plot points contained in each initial plot chain; the first prompt information is used to guide the first large language model to divide the plurality of plot points into a plurality of initial plot chains.

[0108] Optionally, the description information of the plot point includes summary information of the plot point; based on the description information of the plot point contained in each of the initial plot chains, multiple initial plot chains are merged to obtain a target plot chain, including: inputting identification information of each of the initial plot chains, summary information of the plot points contained in each of the initial plot chains, and second prompt information into a second largest language model to obtain identification information of each target plot chain output by the second largest language model and identification information of the initial plot chain contained in each of the target plot chains; the second prompt information is used to guide the second largest language model to merge multiple initial plot chains.

[0109] Optionally, the plot relevance of the series is calculated based on the description information of the plot points contained in each of the target plot chains, including: for each target plot chain, based on the description information of the plot points contained in the target plot chain, calculating the amount of associated content of the target plot chain, the amount of associated content of the target plot chain indicating how much content in the target plot chain is associated; calculating the theoretical maximum amount of associated content of the series based on the description information of the plot points contained in the series; and taking the ratio of the sum of the amounts of associated content of multiple target plot chains to the theoretical maximum amount of associated content as the plot relevance of the series.

[0110] Optionally, the description information of the plot point includes the number of words in the content information of the plot point; based on the description information of the plot point contained in the target plot chain, the amount of associated content of the target plot chain is calculated, including: calculating the sum of the number of words in the content information of every two plot nodes contained in the target plot chain as a first sum; and adding up the first sums to obtain the amount of associated content of the target plot chain.

[0111] Optionally, based on the description information of each of the plot points, the theoretical maximum amount of associated content of the series is calculated, including: respectively calculating the sum of the number of words in the content information of every two plot points contained in the series as a second sum; and adding up the second sums to obtain the theoretical maximum amount of associated content of the series.

[0112] Optionally, the method further includes: calculating a weighted average of the plot relevance of the plurality of episodes in the script as the plot relevance of the script, and the plot relevance of the script serves as a quantitative indicator of the quality of the script.

[0113] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0114] The communication interface is used for communication between the above terminal and other devices.

[0115] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0116] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0117] In another embodiment provided by the present invention, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is run on a computer, the computer implements the script processing method described in any of the above embodiments.

[0118] In another embodiment provided by the present invention, a computer program product is also provided, in which a computer program is stored. When the computer program is run on a computer, the computer implements the script processing method described in any of the above embodiments.

[0119] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0120] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0121] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0122] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A script processing method, characterized in that: include: For each episode in the script, obtain description information of each plot point contained in the episode; Based on the description information of each of the plot points, the plurality of plot points are divided into a plurality of target plot chains, each of the target plot chains containing at least one of the plot points; Based on the description information of the plot points included in each of the target plot chains, the plot relevance of the series is calculated, and the plot relevance of the series is used as a quantitative indicator of the quality of the series.

2. The method according to claim 1, characterized in that Based on the description information of each of the plot points, the plurality of plot points are divided into a plurality of target plot chains, including: Based on the description information of each of the plot points, the plurality of plot points are divided into a plurality of initial plot chains, each of the initial plot chains containing at least one of the plot points; Based on the description information of the plot points contained in each of the initial plot chains, a plurality of the initial plot chains are merged to obtain a target plot chain.

3. The method according to claim 2, characterized in that The description information of the plot point includes summary information of the plot point and identification information of the plot point; based on the description information of each plot point, the plurality of plot points are divided into a plurality of initial plot chains, including: The summary information of each of the plot points, the identification information of each of the plot points and the first prompt information are input into a first large language model to obtain the identification information of each initial plot chain output by the first large language model and the identification information of the plot points contained in each of the initial plot chains; the first prompt information is used to guide the first large language model to divide the plurality of plot points into a plurality of initial plot chains.

4. The method according to claim 2, characterized in that: The description information of the plot point includes summary information of the plot point; based on the description information of the plot point included in each of the initial plot chains, a plurality of the initial plot chains are merged to obtain a target plot chain, including: The identification information of each of the initial plot chains, the summary information of the plot points contained in each of the initial plot chains, and the second prompt information are input into the second largest language model to obtain the identification information of each target plot chain output by the second largest language model and the identification information of the initial plot chain contained in each of the target plot chains; the second prompt information is used to guide the second largest language model to merge multiple initial plot chains.

5. The method according to claim 1, characterized in that Calculating the plot relevance of the series based on the description information of the plot points included in each of the target plot chains includes: For each target plot chain, based on the description information of the plot points included in the target plot chain, the amount of associated content of the target plot chain is calculated, wherein the amount of associated content of the target plot chain indicates how much content in the target plot chain is associated; Calculating a theoretical maximum amount of associated content for the episode based on the description information of the plot points contained in the episode; The ratio of the sum of the associated content amounts of the plurality of target plot chains to the theoretical maximum associated content amount is taken as the plot association degree of the drama.

6. The method according to claim 5, characterized in that The description information of the plot point includes the word count of the content information of the plot point; Calculating the associated content amount of the target plot chain based on the description information of the plot points included in the target plot chain includes: Calculating the sum of the word counts of the content information of each two plot nodes included in the target plot chain as a first sum; The first sums are accumulated to obtain the associated content amount of the target plot chain.

7. The method according to claim 5, characterized in that Based on the description information of each of the plot points, the theoretical maximum amount of associated content of the episode is calculated, including: Calculating the sum of the word counts of the content information of each two plot points in the drama as a second sum; The second sums are added together to obtain the theoretical maximum amount of associated content of the series.

8. The method according to claim 1, characterized in that: The method further comprises: A weighted average of the plot relevance of the plurality of episodes in the script is calculated as the plot relevance of the script, and the plot relevance of the script is used as a quantitative indicator of the quality of the script.

9. A script processing device, characterized in that: include: An acquisition module, for acquiring, for each episode in the script, description information of each plot point contained in the episode; A division module, for dividing the plurality of plot points into a plurality of target plot chains based on the description information of each plot point, each of the target plot chains containing at least one plot point; The first calculation module is used to calculate the plot relevance of the series based on the description information of the plot points contained in each of the target plot chains, and the plot relevance of the series is used as a quantitative indicator of the quality of the series.

10. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method according to any one of claims 1 to 8 when executing a computer program stored in a memory.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 8.

12. A computer program product having a computer program stored thereon, characterized in that: When the computer program is executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 8.