Similar script analysis method and device, electronic equipment and storage medium
By calculating the comprehensive score of the script's text semantic similarity and narrative pattern feature set, the shortcomings of traditional methods in identifying plagiarism in deeply rewritten scripts are solved, and accurate detection of structural similarity of scripts is achieved.
Patent Information
- Application Number
- CN202510776918.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-10-17
AI Technical Summary
Traditional text similarity calculation methods have difficulty identifying plagiarism in scripts that have been deeply rewritten, especially in cases of synonym replacement, plot reorganization, character name changes, etc., and cannot effectively identify structural similarities in the core of the story.
After calculating the text semantic similarity of the script, the narrative pattern feature set is extracted, and a deep similarity analysis is performed using a predefined narrative pattern knowledge base and a large language model. A comprehensive score is performed combining semantic similarity and structural similarity to identify the structural similarity of the script.
It achieves accurate detection of scripts with different degrees of rewriting, which not only retains the efficiency of traditional text comparison, but also makes up for the lack of recognition of structural plagiarism and improves the accuracy of script similarity analysis.
Smart Images

Figure CN120805915A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of script analysis, and in particular to a similar script analysis method and device, an electronic device and a storage medium. BACKGROUND
[0002] With the continuous expansion of the content production scale of the film and television industry, the problem of creative similarity and structural plagiarism in the script creation process is increasingly prominent. Major content platforms need to handle hundreds of thousands of script submissions every year, and traditional manual auditing methods cannot effectively identify deeply rewritten script plagiarism behavior. Especially in the Internet Protocol Address (IP) incubation, script procurement and other links, it is urgent to establish a technical means that can quantitatively evaluate the similarity of the narrative structure of the script to avoid legal risks and protect the innovation of the content.
[0003] The current mainstream script duplication detection technology is mainly based on text similarity calculation methods, including: string comparison algorithm based on keyword matching, document vectorization method based on Term Frequency-Inverse Document Frequency (TF-IDF) features, and semantic similarity calculation using pre-trained language models such as Bidirectional Encoder Representations from Transformers (BERT). These methods can effectively detect direct copying or simple rewriting plagiarism behavior by comparing the surface lexical distribution or semantic embedding vectors of the script text.
[0004] However, when the plagiarist uses synonym replacement, scenario reorganization, character name change and other deep rewriting methods, traditional text similarity calculation methods are difficult to identify the structural similarity of the story kernel. For example, two scripts are completely consistent in the "hero's journey" narrative framework and character prototype, but may lead to similarity misjudgment due to surface text differences. SUMMARY
[0005] The purpose of the embodiments of the present application is to provide a similar script analysis method, device, electronic device and storage medium to solve the problem that traditional text similarity calculation methods are difficult to identify the structural similarity of the story kernel. The specific technical solutions are as follows:
[0006] In a first aspect, the present application provides a similar script analysis method, comprising:
[0007] obtaining first text data of a first script and second text data of a second script;
[0008] calculate a text semantic similarity of the first text data and the second text data to obtain a semantic similarity score;
[0009] extract a first narrative mode feature set of the first text data and a second narrative mode feature set of the second text data respectively in a case where the semantic similarity score is in a first preset range, the first narrative mode feature set and the second narrative mode feature set containing narrative mode labels identified from a predefined narrative mode knowledge base;
[0010] calculate a narrative mode similarity between the first narrative mode feature set and the second narrative mode feature set to obtain a structure similarity score;
[0011] determine a comprehensive similarity score based on the semantic similarity score and the structure similarity score, and output a script comparison result according to the comprehensive similarity score.
[0012] In one possible implementation, the determining of the comprehensive similarity score based on the semantic similarity score and the structure similarity score comprises:
[0013] construct input data in a case where the structure similarity score exceeds a first threshold value, or the semantic similarity score is in a second preset range and the structure similarity score exceeds a second threshold value, the input data including: first description information extracted from the first text data, second description information extracted from the second text data; a comparison result of the first narrative mode feature set and the second narrative mode feature set; the second preset range being in the first preset range, and the second threshold value being lower than the first threshold value;
[0014] input the input data into a large language model, and perform deep similarity analysis on the input data by the large language model to obtain a deep similarity score;
[0015] perform weighted summation calculation on the semantic similarity score, the structure similarity score and the deep similarity score to obtain the comprehensive similarity score.
[0016] In one possible implementation, the method further comprises:
[0017] perform type identification on the first text data and the second text data to obtain a script type;
[0018] adjust weights of the semantic similarity score, the structure similarity score and the deep similarity score according to the script type.
[0019] In one possible implementation, the method further comprises:
[0020] computing a difference value of the semantic similarity score minus the structural similarity score;
[0021] in a case where the difference value exceeds a preset difference threshold and the difference value is greater than zero, increasing a weight of the semantic similarity score;
[0022] in a case where the difference value exceeds a preset difference threshold and the difference value is less than zero, increasing weights of the structural similarity score and the depth similarity score.
[0023] In one possible implementation, the method further includes:
[0024] in a case where the structural similarity score does not exceed a first threshold and the semantic similarity score is not within a second preset range or the structural similarity score does not exceed a second threshold, performing a weighted sum calculation on the semantic similarity score and the structural similarity score to obtain the comprehensive similarity score.
[0025] In one possible implementation, the method further includes:
[0026] detecting a matching condition of core narrative features in the first set of narrative mode features and the second set of narrative mode features;
[0027] in a case where there is a core feature matching combination that meets a preset intensity condition, correcting the comprehensive similarity score to obtain a corrected comprehensive similarity score, wherein the corrected comprehensive similarity score is greater than the original comprehensive similarity score.
[0028] In one possible implementation, the respective extraction of the first set of narrative mode features of the first text data and the second set of narrative mode features of the second text data includes:
[0029] inputting a preset narrative mode recognition prompt template and the first text data into a large language model to identify, by the large language model, a narrative mode label contained in the first text data from the narrative mode knowledge base, to obtain a first label set;
[0030] converting, based on a pre-trained semantic encoder, the first label set into a first narrative mode feature vector;
[0031] storing the first label set and the first narrative mode feature vector in association, to constitute the first set of narrative mode features;
[0032] and,
[0033] input the preset narration mode recognition prompt template and the second text data into a large language model to identify, by the large language model, a narration mode label contained in the second text data from the narration mode knowledge base, to obtain a second label set;
[0034] convert, based on a pre-trained semantic encoder, the second label set into a second narration mode feature vector;
[0035] store the second label set and the second narration mode feature vector in association, to constitute the second narration mode feature set.
[0036] In a second aspect, the present application provides a similar script analysis device, comprising:
[0037] an acquisition module configured to acquire first text data of a first script and second text data of a second script;
[0038] a first calculation module configured to calculate a text semantic similarity of the first text data and the second text data, to obtain a semantic similarity score;
[0039] an extraction module configured to, in a case where the semantic similarity score is within a first preset range, extract a first narration mode feature set of the first text data and a second narration mode feature set of the second text data respectively, the first narration mode feature set and the second narration mode feature set containing narration mode labels identified from a predefined narration mode knowledge base;
[0040] a second calculation module configured to calculate a narration mode similarity between the first narration mode feature set and the second narration mode feature set, to obtain a structural similarity score;
[0041] a determination module configured to determine a comprehensive similarity score based on the semantic similarity score and the structural similarity score, and output a script comparison result according to the comprehensive similarity score.
[0042] In one possible implementation, the determination module is specifically configured to:
[0043] in a case where the structural similarity score exceeds a first threshold value, or the semantic similarity score is within a second preset range and the structural similarity score exceeds a second threshold value, construct input data, the input data including: first description information extracted from the first text data, second description information extracted from the second text data; a comparison result of the first narration mode feature set and the second narration mode feature set; the second preset range being within the first preset range, and the second threshold value being lower than the first threshold value;
[0044] inputting the input data into a large language model, and performing deep similarity analysis on the input data by the large language model to obtain a deep similarity score;
[0045] performing weighted summation calculation on the semantic similarity score, the structural similarity score and the deep similarity score to obtain the comprehensive similarity score.
[0046] In one possible implementation, the determining module is further configured to:
[0047] performing type identification on the first text data and the second text data to obtain a script type;
[0048] adjusting weights of the semantic similarity score, the structural similarity score and the deep similarity score according to the script type.
[0049] In one possible implementation, the determining module is further configured to:
[0050] calculating a difference value of the semantic similarity score minus the structural similarity score;
[0051] in a case where the difference value exceeds a preset difference threshold and the difference value is greater than zero, increasing the weight of the semantic similarity score;
[0052] in a case where the difference value exceeds the preset difference threshold and the difference value is less than zero, increasing the weights of the structural similarity score and the deep similarity score.
[0053] In one possible implementation, the determining module is further configured to:
[0054] in a case where the structural similarity score does not exceed a first threshold and the semantic similarity score is not within a second preset range or the structural similarity score does not exceed a second threshold, performing weighted summation calculation on the semantic similarity score and the structural similarity score to obtain the comprehensive similarity score.
[0055] In one possible implementation, the apparatus further includes a correcting module configured to:
[0056] detecting a matching condition of core narrative features in the first set of narrative mode features and the second set of narrative mode features;
[0057] in a case where there is a core feature matching combination satisfying a preset intensity condition, correcting the comprehensive similarity score to obtain a corrected comprehensive similarity score, wherein the corrected comprehensive similarity score is greater than the original comprehensive similarity score.
[0058] In one possible implementation, the extracting module is specifically configured to:
[0059] inputting the preset narrative mode recognition prompt template and the first text data into a large language model to identify, by the large language model, a narrative mode label contained in the first text data from the narrative mode knowledge base, to obtain a first label set;
[0060] converting, based on a pre-trained semantic encoder, the first label set into a first narrative mode feature vector;
[0061] storing the first label set and the first narrative mode feature vector in association, to constitute a first narrative mode feature set;
[0062] and,
[0063] inputting the preset narrative mode recognition prompt template and the second text data into a large language model to identify, by the large language model, a narrative mode label contained in the second text data from the narrative mode knowledge base, to obtain a second label set;
[0064] converting, based on a pre-trained semantic encoder, the second label set into a second narrative mode feature vector;
[0065] storing the second label set and the second narrative mode feature vector in association, to constitute a second narrative mode feature set.
[0066] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
[0067] The memory is configured to store a computer program.
[0068] The processor is configured to execute the program stored on the memory, to implement the method steps of any one of the first aspect.
[0069] In a fourth aspect, a computer readable storage medium is provided, 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 steps of any one of the first aspect.
[0070] In a fifth aspect, a computer program product containing instructions is provided, which, when executed on a computer, causes the computer to execute the similar script analysis method of any one of the above aspects.
[0071] The embodiments of the present application have the following beneficial effects:
[0072] The embodiment of the present application provides a similar script analysis method and device, electronic equipment and a storage medium. In the embodiment of the present application, firstly, obviously irrelevant scripts are filtered out through text semantic similarity calculation, and the subsequent analysis range is reduced, which inherits the advantage of the traditional method in surface text comparison. When the semantic similarity is in a first preset range (indicating that there is a certain similarity but further verification is needed), further comparison is realized through a narrative mode feature set. The use of the pre-defined narrative mode knowledge base ensures the capture of the deep structure of the story. Even if the surface text is rewritten, the matching of the narrative mode label can still reveal the structural similarity. Finally, the comparison result is obtained by comprehensively scoring the semantic and structural scores. The method not only retains the efficiency of the traditional text comparison, but also makes up for the insufficient recognition of structural plagiarism, and realizes accurate detection of scripts with different rewriting degrees.
[0073] Of course, implementing any product or method of the present application does not necessarily require all the advantages described above. BRIEF DESCRIPTION OF DRAWINGS
[0074] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate an embodiment consistent with the present application and, together with the description, serve to explain the principles of the application.
[0075] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.
[0076] One or more embodiments are exemplarily illustrated by pictures in the drawings corresponding thereto, and these exemplary illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, unless otherwise specified. The drawings in the drawings do not constitute a proportional limit.
[0077] Figure 1 A flowchart of a similar script analysis method provided by the embodiment of the present application;
[0078] Figure 2 A flowchart of another similar script analysis method provided by the embodiment of the present application;
[0079] Figure 3 A structural schematic diagram of a similar script analysis device provided by the embodiment of the present application;
[0080] Figure 4 A structural schematic diagram of an electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION
[0081] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0082] The disclosure below provides many different embodiments or examples for implementing different configurations of the present invention. To simplify the disclosure of the present invention, the components and configurations of specific examples are described below. Of course, these are merely examples and are not intended to limit the present invention. In addition, the present invention may repeat reference numerals and / or letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or configurations discussed.
[0083] Figure 1 A flow chart of a similar script analysis method provided in an embodiment of the present application. This method can be applied to one or more electronic devices such as smart phones, laptops, desktop computers, portable computers, servers, etc. In addition, the execution subject of this method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned electronic devices. For example, a single electronic device can execute this method, or multiple electronic devices can cooperate with each other to execute this method. When the above-mentioned execution subject is software, this method can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0084] like Figure 1 As shown, the method specifically includes:
[0085] S101 : Acquire first text data of a first script and second text data of a second script.
[0086] First Script / Second Script: refers to two independent scripts that need to be compared for similarity, where the first script is usually used as the query sample and the second script is used as the compared sample.
[0087] Text data: Contains the complete text content of the script and its structured elements (such as scene descriptions, character dialogues, stage directions, etc.). The script format can be a text file (.txt), Word document (.docx), PDF file or other standard script formats (such as .fdx).
[0088] In the embodiments of the present application, the original data of the first script and the second script are obtained through a data port or file analysis, and multiple formats (.fdx / .pdf / .docx, etc.) are automatically recognized and converted into a unified text format. Then, text normalization processing is performed, including: cleaning irrelevant characters: removing layout marks, special symbols and other non-narrative content in the script; format unification: standardizing full-width / half-width characters, English case, etc.; structure segmentation: automatically blocking according to script elements such as scenes (Scene), dialogues (Dialogue), actions (Action), etc.; and encoding conversion: converting to UTF-8 encoding format. Thus, the input data quality for subsequent semantic analysis and feature extraction is ensured, and analysis deviation caused by format differences or noise data is effectively avoided.
[0089] S102, calculate the text semantic similarity of the first text data and the second text data, to obtain a semantic similarity score.
[0090] Text semantic similarity: used to measure the similarity of two texts at the semantic level, reflecting the closeness of their expression meanings, rather than simple literal matching.
[0091] Semantic similarity score: a result of quantifying text semantic similarity through numerical representation (such as a scale between 0 and 1), and the higher the score, the more similar the semantics.
[0092] In the embodiments of the present application, the calculation of the text semantic similarity of the first text data and the second text data is realized through the following steps:
[0093] I. Input processing: first, the text data of the two scripts is subjected to multi-level input processing. Specifically, it includes: inputting the complete original text of the first script and the second script into a pre-trained language model (such as a BERT (Bidirectional Encoder Representations from Transformers, pre-trained language model) fine-tuned with film and television script data, RoBERTa (Robustly optimized BERT approach)); at the same time, the core narrative elements of the two scripts are extracted through structured analysis, including "one-sentence story" (i.e. Logline, which summarizes the core conflict of the whole script with a single sentence), "outline abstract" (Synopsis, which describes the development of the plot in chapters), and "main character story line" (description of the growth trajectory of the character), etc. These key parts will be sent as independent input into the model for special processing to highlight the core content features of the script.
[0094] II. Feature Extraction: In the feature extraction stage, the system adopts deep neural networks for multi-level semantic encoding. For complete script texts, a 768-dimensional global document vector is generated through the model's [CLS] marker; for each key part (such as Logline, Synopsis, etc.), an independent feature vector is generated, forming a feature matrix with dimensions n x 768 (n is the number of key parts). In particular, for time-series features such as character storylines, an additional bidirectional LSTM (Long Short-Term Memory) layer is used to capture the dynamic characteristics of character development. All vector outputs are normalized through L2Normalization to ensure the stability of subsequent similarity calculations.
[0095] III. Similarity Calculation and Result Fusion: The similarity calculation adopts a hierarchical fusion strategy: First, calculate the cosine similarity of the full-text document vector as the basic score S1, the corresponding formula is: Score_Text = cosine_similarity(Vec_Text_A, Vec_Text_B) = (Vec_Text_A · Vec_Text_B) / (||Vec_Text_A|| ||Vec_Text_B||); Then perform dynamic time warping (DTW) matching on the key part feature matrix to obtain the structural similarity S2; Finally, generate a comprehensive score S = αS1 + (1-α)S2 through the weighting formula (α is adjusted adaptively according to the length of the script, 0.6-0.8 for long scripts and 0.4-0.6 for short scripts). This fusion method not only considers the coherence of the full-text semantics, but also highlights the matching degree of key narrative elements, making the scoring results not only recognize the overall rewriting, but also capture the plagiarism characteristics of core plots.
[0096] S103, in the case where the semantic similarity score is in a first preset range, respectively extracting a first narrative mode feature set of the first text data and a second narrative mode feature set of the second text data, the first narrative mode feature set and the second narrative mode feature set containing narrative mode labels identified from a pre-defined narrative mode knowledge base.
[0097] First preset range: refers to a pre-set semantic similarity threshold interval (such as 0.3-0.7), used to determine whether to start deep narrative analysis, which is determined based on the statistical distribution of structural plagiarism cases in historical data.
[0098] Narrative mode feature set: contains a collection of standardized narrative elements extracted from the script, each feature is composed of a "label-text evidence" pair (such as "Hero's Journey: Protagonist Rejects the Call").
[0099] Predefined narrative pattern knowledge base: a structured database of narrative patterns (such as TV Tropes), containing standardized tag systems such as plot templates (e.g. "rescue mission") and character archetypes (e.g. "mentor character"). In application, TV Tropes data preparation is required in advance, and the Trope data in TV Tropes is parsed and structuredly stored, a record is created for each Trope containing its name, definition, and key feature description, so as to ensure the input data quality of subsequent semantic analysis and feature extraction, effectively avoiding analysis deviation caused by format difference or noise data.
[0100] In the embodiments of the present application, when the semantic similarity is < lower limit (0.3): it indicates that the two scripts have significant differences in text expression and basic semantic level, and the possibility of plagiarism can be directly excluded, avoiding unnecessary computational overhead; when the semantic similarity is > upper limit (0.7): it has formed a significant text similarity, and further manual checking may be required, but additional structure analysis is not required to determine that the two scripts are similar scripts; in the middle interval (0.3-0.7): there are dual possibilities of "similar semantics but different texts" or "different semantics but similar structures", and further narrative pattern analysis is started to improve the accuracy of script comparison.
[0101] Specifically, extracting the first narrative pattern feature set of the first text data and the second narrative pattern feature set of the second text data can include the following steps: inputting a preset narrative pattern recognition prompt template and the first text data into a large language model to identify narrative pattern tags contained in the first text data from the narrative pattern knowledge base by the large language model, to obtain a first tag set; converting the first tag set into a first narrative pattern feature vector based on a pre-trained semantic encoder; storing the first tag set and the first narrative pattern feature vector in association, to constitute the first narrative pattern feature set; and inputting a preset narrative pattern recognition prompt template and the second text data into a large language model to identify narrative pattern tags contained in the second text data from the narrative pattern knowledge base by the large language model, to obtain a second tag set; converting the second tag set into a second narrative pattern feature vector based on a pre-trained semantic encoder; storing the second tag set and the second narrative pattern feature vector in association, to constitute the second narrative pattern feature set.
[0102] Narrative pattern recognition prompt template: a pre-designed structured instruction template used to guide a large language model (such as GPT-4, Claude, etc.) to identify narrative elements from text in a specific format, for example: "Please analyze the following script outline, identify the key narrative patterns, character archetypes, and plot devices contained therein, and list the corresponding TV Tropes tags and their manifestations in the text.
[0103] Semantic encoder: refers to a pre-trained deep neural network model (such as Sentence-BERT) that can convert text labels into high-dimensional vectors with semantic representation capabilities.
[0104] In this scheme, first, the standardized prompt template and the script text (key part of the script text (such as outline, character line) or each block text obtained by processing the entire script into blocks) are jointly input into the large language model. Using the context understanding ability of the model, the matching Trope label (narrative pattern label) is identified from the pre-built narrative pattern knowledge base (such as TV Tropes database containing 2000+ labels), and the first / second label set containing the label name, confidence and text evidence is generated. Then, for each identified Trope label (such as "Heroic Sacrifice"), the standard definition text of the Trope label is extracted from the pre-defined narrative pattern knowledge base, the semantic encoder (such as Sentence-BERT model) is used to encode the definition text to generate a 768-dimensional semantic vector, and the corresponding pre-computed vector is retrieved from the knowledge base index according to the identified label set. The Tropes features of a script can be represented as a vector set {Vec_Trope_i}, or a single script Trope structure vector Vec_Tropes_Profile_A is formed through some aggregation method (such as average pooling, weighted average). Finally, the label set and the feature vector are stored in a structured feature set with a bidirectional index relationship.
[0105] This scheme uses a preset prompt template to guide the large language model to accurately identify the narrative pattern labels in the script, significantly improving the recognition accuracy of complex narrative structures. Through the semantic encoder, discrete labels are converted into computable vector representations, constructing a feature space that balances semantic representation and numerical comparability, so that similar narrative structures with different expressions can be quantitatively compared. The association storage mechanism of label set and feature vector not only retains the interpretable text evidence chain, but also supports efficient vector operation.
[0106] S104, calculating the narrative pattern similarity between the first narrative pattern feature set and the second narrative pattern feature set to obtain a structure similarity score.
[0107] Narrative pattern similarity: an index used to quantify the similarity of two scripts in terms of narrative elements such as plot structure and character relationships. Its calculation is based on pre-defined narrative pattern feature comparison, rather than traditional text comparison.
[0108] Structure similarity score: a standardized numerical value (0-1 range) obtained by converting the narrative pattern similarity through mathematical methods, reflecting the matching degree of the deep structure of the script.
[0109] In the embodiments of the present application, when the input is a list of Trope tags, the system performs the following calculation process: first, count the intersection and union of the two script tag sets (intersection (A∩B): tags common to both scripts; union (A∪B): all non-repeating tags of the two scripts), and then apply the improved weighted Jaccard algorithm to calculate the similarity, i.e., the structural similarity score = the sum of the weights of the common tags in the intersection / the sum of the weights of all tags in the union. This algorithm takes into account the preset weight values of different Trope tags, giving higher weights to core tags that appear together, while imposing a penalty coefficient on unique tags that only appear in a single script. In the specific calculation, the system obtains the weight parameters of each tag from the pre-defined narrative pattern knowledge base, ensuring that the matching of important narrative elements has a greater impact on the final score.
[0110] When the input is a Trope feature vector, the system uses the cosine similarity calculation method. First, perform dot product operation on the feature vectors of the two scripts, then calculate the length of each vector respectively, and finally get the similarity score by the ratio of the dot product value to the length product. To improve accuracy, the system will detect the difference in vector length and automatically perform length normalization when the difference exceeds the threshold. At the same time, the result is corrected for confidence by combining the label coverage data to avoid bias caused by the absence of some features. Assuming that the aggregate vector of script A is Vec_Tropes_Profile_A and the aggregate vector of script B is Vec_Tropes_Profile_B, the cosine similarity between them is Score_Tropes_Cosine =
[0111] cosine_similarity(Vec_Tropes_Profile_A,Vec_Tropes_Profile_B), which gives the structural similarity score.
[0112] S105, determine a comprehensive similarity score based on the semantic similarity score and the structural similarity score, and output a script comparison result according to the comprehensive similarity score.
[0113] Comprehensive similarity score: the final quantitative indicator obtained by fusing the text semantic and narrative structure two-dimensional similarity, with a value range of [0, 1], and the higher the value, the greater the script similarity.
[0114] Script comparison result, including comprehensive score, risk level (such as high / medium / low similarity) analyzed according to the comprehensive score, and structured output of detailed analysis basis, used to assist in determining plagiarism or creative similarity.
[0115] In the embodiments of the present application, the comprehensive similarity score is generated by fusing the semantic similarity score and the narrative structure similarity score, and the risk level is automatically divided according to the numerical range of the comprehensive similarity score (for example, 0-0.3 is low risk, 0.3-0.7 is medium risk, and 0.7-1 is high risk). The system outputs a structured duplicate detection report, which includes the following core contents: score data at all levels: semantic similarity score, Tropes structure similarity score, and deep similarity score (if any); feature comparison results: common Tropes list, unique Tropes list, and specific embodiment location in the text; analysis conclusion: key difference points generated by the large language model (such as "the two scripts differ in the handling of the third act turning point"); and disposal suggestion: determination result based on risk level (such as "high risk: suggest starting manual review").
[0116] In addition, in another embodiment of the present application, the method can further include the following steps: detecting the matching of core narrative features in the first set of narrative mode features and the second set of narrative mode features; and correcting the comprehensive similarity score to obtain a corrected comprehensive similarity score in the case that there is a core feature matching combination that meets a preset intensity condition, wherein the corrected comprehensive similarity score is greater than the original comprehensive similarity score.
[0117] Core narrative feature: a feature label marked as a key plot element in the narrative mode knowledge base, with a higher weight coefficient than ordinary labels.
[0118] Preset intensity condition: a condition for determining whether to correct the score, such as minimum number of matches (e.g., at least 3 core labels matched), combination weight threshold (e.g., total weight exceeds 2.5), etc., and the specific value is obtained through historical plagiarism case training.
[0119] In this embodiment, when it is detected that there is a specific core label combination in the two scripts, the system performs the following correction process (taking the combination weight threshold as an example): combination weight calculation: for the matched core labels, the preset weight values are accumulated, and the correlation strength between the labels is considered (such as the co-occurrence coefficient of "hero's journey" and "mentor character"); score correction: if the combination weight exceeds the preset threshold, the comprehensive similarity score is proportionally increased, and the increase is proportional to the combination weight, but does not exceed the upper limit of the score (1.0); result tracing: record the specific label combination that leads to the score correction, and support quick positioning of key similar points during manual review.
[0120] This scheme significantly improves the system's detection ability for key plot plagiarism by using the core narrative feature matching mechanism, and can accurately identify plagiarism behaviors that only copy the core narrative framework but modify the details. At the same time, it effectively avoids false positives caused by similarities in minor labels.
[0121] In the embodiments of the present application, first, obviously irrelevant scripts are filtered out through text semantic similarity calculation to narrow the scope of subsequent analysis, which inherits the advantage of traditional methods in surface text comparison. When the semantic similarity is in a first preset range (indicating that there is a certain similarity but further verification is needed), further comparison is realized through the narrative mode feature set. The use of the pre-defined narrative mode knowledge base ensures the capture of the deep structure of the story, and even if the surface text is rewritten, the matching of the narrative mode label can still reveal structural similarity. Finally, the comparison result is obtained by integrating the semantic and structural scores, which not only retains the efficiency of traditional text comparison, but also makes up for the insufficient recognition of structural plagiarism, and realizes accurate detection of scripts with different rewriting degrees.
[0122] The technical solution can be widely applied to multiple links of the film and television creation industry chain: in the script creation stage, it can assist screenwriters in real-time detecting the similarity of newly created content and existing works to avoid unintentional infringement; in the copyright review link, it can provide an automatic duplicate checking tool for platform parties to quickly screen potential plagiarism in a large number of submitted scripts; in the IP development stage, it can help producers accurately search for high-quality scripts with similar narrative structures to improve topic selection efficiency; at the same time, the technology can also be used in the field of film and television teaching to help students understand the rules of type creation by analyzing the similarity of narrative modes of classic scripts.
[0123] Reference Figure 2 The embodiment flowchart of another similar script analysis method provided by the embodiments of the present application is shown. The flowchart Figure 2 is based on the above Figure 1 described how to determine the comprehensive similarity score based on the semantic similarity score and the structural similarity score. As Figure 2 shown, the flowchart can include the following steps:
[0124] S201, in the case where the structural similarity score exceeds a first threshold value, or the semantic similarity score is in a second preset range and the structural similarity score exceeds a second threshold value, input data is constructed, the input data including: first description information extracted from the first text data, second description information extracted from the second text data; comparison results of the first narrative mode feature set and the second narrative mode feature set; the second preset range is within the first preset range, and the second threshold value is lower than the first threshold value.
[0125] First threshold value: a threshold value for determining significant similarity of narrative structure, usually set to a high confidence interval of 0.7-0.8.
[0126] Second preset range: refers to the verification interval of semantic similarity, which is within the first preset range (such as 0.4-0.6), and needs to be further judged in combination with structural analysis in this range.
[0127] Second threshold: a looser structural similarity threshold, lower than the first threshold (e.g. 0.5), for detecting potential structural correlation.
[0128] First description information: key content summary extracted from the first text data (Script A), including: Logline: a one-sentence summary of the core conflict of the script; Core plot excerpts: text snippets of 3-5 key scenes; Character relationship map: description of the interaction relationships of the main characters.
[0129] Second description information: similar information extracted from the second text data (Script B), consistent with the structure of the first description information, for symmetric comparison.
[0130] Comparison results: differential analysis of the narrative pattern feature sets of the two scripts, including: Common label list: Trope labels common to both scripts and their weights; Difference label list: labels that only exist in a single script (e.g. "mentor character" unique to Script A, "villain monologue" unique to Script B); Optionally, semantic similarity score and narrative pattern similarity can also be included.
[0131]
[0132] In the embodiments of the present application, when any of the following conditions is met, deep analysis is triggered: Strong structural similarity: the structure score directly exceeds the first threshold (e.g. 0.75), indicating a high degree of similarity in the narrative framework; Case to be verified: the semantic score is in the medium range (e.g. 0.4-0.6) and the structure score exceeds the second threshold (e.g. 0.5), suggesting that there may be partial plagiarism. After triggering deep analysis, the input data is constructed to include the first description information, the second description information, and the comparison results.
[0133]
[0134] S202, input the input data into a large language model, and perform deep similarity analysis on the input data by the large language model according to the input data, to obtain a deep similarity score.
[0135]
[0136] Deep similarity analysis: multi-dimensional comparison based on input data, including evaluation of abstract features such as plot development, character relationship evolution, and theme expression consistency.
[0137]
[0138] The input data structured by step S201 is input into a large language model, and specific analysis instructions (e.g. "Compare the following two script summaries and the narrative patterns (Tropes) identified. Script A: [Summary A], Tropes: [List A]. Script B: [Summary B], Tropes: [List B]"). The input data is structured and input into a large language model, and the deep similarity score is obtained by the large language model according to the input data.
[0139] B], Tropes: [List B]. Please analyze their similarities and differences in narrative structure, core conflict, character arc, and thematic ideas, paying special attention to whether the common tropes [common list] are used in a similar way. Please give an overall similarity score between 0 and 1 and explain the reason), and require the model to output the following analysis results: Plot logic similarity: evaluate whether the development sequence and turning point of key plot points are consistent; Character relationship matching: analyze the similarity of the interaction patterns and growth trajectories of the main characters; Thematic consistency: determine the degree of overlap between the two scripts in the expression of the core themes. Finally, the model will combine the above dimensions to generate a deep similarity score in the range of 0-1, and attach key analysis basis (such as "both scripts use 'sacrifice-redemption'
[0140] themes, but character motivations vary significantly").
[0141] S203: Score the semantic similarity, the structural similarity and the depth
[0142] The similarity scores are weighted and summed to obtain the comprehensive similarity score.
[0143] In the embodiment of the present application, the similarity scores from different levels: Score_Text (semantic similarity score), Score_Tropes (structural similarity score), Score_LLM (deep weighted fusion: calculate the final similarity score Final_Score (comprehensive similarity score), the corresponding formula is as follows: Final_Score = w_text*Score_Text+w_tropes*Score_Tropes+w_llm*Score_LLM; where w_text, w_tropes, w_llm are weight coefficients, w_text+w_tropes+w_llm=1.
[0144] In another embodiment of the present application, the method may further include the following steps: when the structural similarity score does not exceed a first threshold, and when the semantic similarity score is not within a second preset range or when the structural similarity score does not exceed a second threshold, performing a weighted sum calculation on the semantic similarity score and the structural similarity score to obtain the comprehensive similarity score.
[0145] In this embodiment, when the following conditions are met simultaneously: 1. The structural similarity score does not reach the first threshold value (e.g., ≤0.75), indicating that the two scripts are significantly different in the overall narrative framework and do not meet the standard of high similarity; 2. The semantic similarity score does not enter the second preset range (e.g., <0.4 or >0.6), indicating that the two scripts are significantly different in the overall narrative framework and do not meet the standard of high similarity, or the structural score does not reach the second threshold value (e.g., ≤0.5), indicating that even if the semantic score is in the verification range, the narrative structure still has no significant relevance; the system will skip the deep analysis and directly perform weighted summation on the semantic and structural scores (default weight 0.4:0.6) to generate a comprehensive score, that is, w_llm=0 if the LLM layer is not triggered. This logic ensures that scripts that are obviously dissimilar are quickly output, avoiding unnecessary computational overhead.
[0146] In another embodiment of the present application, the method can further include the steps of: performing type identification on the first text data and the second text data to obtain a script type; and adjusting the weights of the semantic similarity score, the structural similarity score, and the deep similarity score according to the script type.
[0147] Script type identification: refers to automatically determining the genre attribute of a script through a classification model (such as a TextCNN based on an attention mechanism), including but not limited to suspense, love, science fiction, etc.
[0148] Weight adjustment: dynamically allocating the contribution proportion of semantic, structural, and deep scores in the comprehensive score according to the characteristics of the script type.
[0149] In this embodiment, the script type can be input through metadata, or a pre-trained classification model is used to analyze the script text features (such as dialogue style, scene setting) to output a type probability distribution; then, weight rules are configured according to the type characteristics, for example, for suspense / science fiction scripts that highly depend on plot structure, the weight of the structural score can be appropriately increased; for drama scripts that pay more attention to writing and dialogue, the weights of the semantic score and the deep score can be higher. For mixed type scripts, a weight interpolation algorithm can be used to ensure smooth transition.
[0150] Through this scheme, the scoring system can be more in line with the creation rules of different genres, improving the accuracy of script comparison.
[0151] In another embodiment of the present application, the method can further include the steps of: calculating the difference between the semantic similarity score and the structural similarity score; in the case that the difference exceeds a preset difference threshold and the difference is greater than zero, increasing the weight of the semantic similarity score; in the case that the difference exceeds the preset difference threshold and the difference is less than zero, increasing the weights of the structural similarity score and the deep similarity score.
[0152] preset difference threshold: a critical value (e.g. 0.3) set according to historical data analysis, used to determine whether the score difference is statistically significant.
[0153] In this embodiment, when the semantic score is significantly higher than the structural score (difference > threshold and > 0): determine as "textual similarity but structural innovation" (e.g. type film routine dialogue), increase the semantic score weight by 10-20%, and reduce the structural score influence; when the structural score is significantly higher than the semantic score (difference > threshold and < 0): determine as "text rewriting but structure copying" (e.g. plot reorganization plagiarism), increase the structural score weight by 15-25%, and simultaneously increase the depth score weight. The adjusted weight range is strictly controlled between 0.1-0.8, avoiding extreme bias.
[0154] Through this scheme, two special plagiarism forms can be effectively identified: "dialogue templating" scripts (difference > 0) are strengthened for text comparison; "plot plagiarism" scripts (difference < 0) are strengthened for structure analysis. Compared with the fixed weight method, the determination accuracy in complex cases can be improved through this scheme.
[0155] Based on the same technical concept, the embodiments of the present application also provide a similar script analysis device, as shown in Figure 3 The device comprises:
[0156] The acquisition module 31 is configured to acquire first text data of a first script and second text data of a second script.
[0157] The first calculation module 32 is configured to calculate a text semantic similarity of the first text data and the second text data, to obtain a semantic similarity score.
[0158] The extraction module 33 is configured to extract a first narrative mode feature set of the first text data and a second narrative mode feature set of the second text data respectively in a case where the semantic similarity score is in a first preset range, wherein the first narrative mode feature set and the second narrative mode feature set contain narrative mode labels identified from a pre-defined narrative mode knowledge base.
[0159] The second calculation module 34 is configured to calculate a narrative mode similarity between the first narrative mode feature set and the second narrative mode feature set, to obtain a structural similarity score.
[0160] The determination module 35 is configured to determine a comprehensive similarity score based on the semantic similarity score and the structural similarity score, and output a script comparison result according to the comprehensive similarity score.
[0161] In one possible implementation, the determination module is specifically configured to:
[0162] in a case where the structural similarity score exceeds a first threshold value, or the semantic similarity score is within a second preset range and the structural similarity score exceeds a second threshold value, constructing input data, the input data comprising: first description information extracted from the first text data, second description information extracted from the second text data; a comparison result of the first narrative mode feature set and the second narrative mode feature set; the second preset range being within the first preset range, and the second threshold value being lower than the first threshold value;
[0163] inputting the input data into a large language model, and performing, by the large language model, deep similarity analysis on the input data to obtain a deep similarity score;
[0164] performing weighted summation calculation on the semantic similarity score, the structural similarity score, and the deep similarity score to obtain the comprehensive similarity score.
[0165] In one possible implementation, the determining module is further configured to:
[0166] performing type identification on the first text data and the second text data to obtain a script type;
[0167] adjusting weights of the semantic similarity score, the structural similarity score, and the deep similarity score according to the script type.
[0168] In one possible implementation, the determining module is further configured to:
[0169] calculating a difference between the semantic similarity score and the structural similarity score;
[0170] in a case where the difference exceeds a preset difference threshold value and the difference is greater than zero, increasing the weight of the semantic similarity score;
[0171] in a case where the difference exceeds the preset difference threshold value and the difference is less than zero, increasing the weights of the structural similarity score and the deep similarity score.
[0172] In one possible implementation, the determining module is further configured to:
[0173] in a case where the structural similarity score does not exceed the first threshold value and the semantic similarity score is not within the second preset range or the structural similarity score does not exceed the second threshold value, performing weighted summation calculation on the semantic similarity score and the structural similarity score to obtain the comprehensive similarity score.
[0174] In one possible implementation, the apparatus further includes a correction module configured to:
[0175] detecting whether a core narrative feature in the first set of narrative mode features matches a core narrative feature in the second set of narrative mode features;
[0176] correcting the comprehensive similarity score to obtain a corrected comprehensive similarity score in a case where there is a combination of core feature matches that meet a preset intensity condition, wherein the corrected comprehensive similarity score is greater than the original comprehensive similarity score.
[0177] In one possible implementation, the extraction module is specifically configured to:
[0178] inputting a preset narrative mode recognition prompt template and the first text data into a large language model to identify, by the large language model, a narrative mode label contained in the first text data from the narrative mode knowledge base, to obtain a first label set;
[0179] converting the first label set into a first narrative mode feature vector based on a pre-trained semantic encoder;
[0180] storing the first label set and the first narrative mode feature vector in association, to constitute the first set of narrative mode features;
[0181] and,
[0182] inputting a preset narrative mode recognition prompt template and the second text data into a large language model to identify, by the large language model, a narrative mode label contained in the second text data from the narrative mode knowledge base, to obtain a second label set;
[0183] converting the second label set into a second narrative mode feature vector based on a pre-trained semantic encoder;
[0184] storing the second label set and the second narrative mode feature vector in association, to constitute the second set of narrative mode features.
[0185] In the embodiments of the present application, first, obviously irrelevant scripts are filtered out through text semantic similarity calculation, narrowing the scope of subsequent analysis, which inherits the advantages of traditional methods in surface text comparison. When the semantic similarity is in a first preset range (indicating that there is a certain similarity but further verification is needed), further comparison is realized through the narrative mode feature set. The use of the pre-defined narrative mode knowledge base ensures the capture of the deep structure of the story, even if the surface text is rewritten, the matching of the narrative mode label can still reveal the structural similarity. Finally, the comparison result is obtained through the comprehensive semantic and structural score, which not only retains the efficiency of traditional text comparison, but also makes up for the insufficient recognition of structural plagiarism, and realizes the accurate detection of scripts with different rewriting degrees.
[0186] Based on the same technical concept, the embodiments of the present application also provide an electronic device, such as Figure 4 As shown, the electronic device comprises a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112 and the memory 113 complete mutual communication through the communication bus 114,
[0187] The memory 113 is used for storing a computer program.
[0188] The processor 111 is used for implementing the following steps when executing the program stored in the memory 113:
[0189] Obtaining first text data of a first script and second text data of a second script;
[0190] Calculating a text semantic similarity of the first text data and the second text data to obtain a semantic similarity score;
[0191] In the case that the semantic similarity score is in a first preset range, respectively extracting a first narrative mode feature set of the first text data and a second narrative mode feature set of the second text data, wherein the first narrative mode feature set and the second narrative mode feature set contain narrative mode labels identified from a predefined narrative mode knowledge base;
[0192] Calculating a narrative mode similarity between the first narrative mode feature set and the second narrative mode feature set to obtain a structural similarity score;
[0193] Determining a comprehensive similarity score based on the semantic similarity score and the structural similarity score, and outputting a script comparison result according to the comprehensive similarity score.
[0194] The communication bus mentioned above 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 the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0195] The communication interface is used for communication between the above-mentioned electronic device and other devices.
[0196] The memory can include a random access memory (RAM) and can also include a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.
[0197] The processor described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0198] In another embodiment provided in the present application, a computer readable storage medium is also provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps of any of the similar script analysis methods described above.
[0199] In another embodiment provided in the present application, a computer program product containing instructions is also provided, and when the computer program product is run on a computer, the computer is caused to execute any of the similar script analysis methods in the above embodiments.
[0200] The device embodiments described above are only schematic, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0201] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus a general hardware platform, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in terms of related art, can be embodied in the form of a software product, and the computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0202] It is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises", "comprising", "includes", "including" and "has" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order
[0203] The above description is merely that of certain embodiments of the present application and is not intended to limit the application to the specific embodiments. Various modifications to these embodiments can be apparent to those with skill in the art from the description and drawings herein, with the generic principles described herein being applicable to other embodiments and applications. Therefore, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A similar script analysis method, characterized in that: The method comprises: Obtaining first text data of a first script and second text data of a second script; Calculating text semantic similarity between the first text data and the second text data to obtain a semantic similarity score; When the semantic similarity score is within a first preset range, extracting a first narrative mode feature set of the first text data and a second narrative mode feature set of the second text data, respectively, wherein the first narrative mode feature set and the second narrative mode feature set include narrative mode tags identified from a predefined narrative mode knowledge base; calculating the narrative pattern similarity between the first narrative pattern feature set and the second narrative pattern feature set to obtain a structural similarity score; A comprehensive similarity score is determined based on the semantic similarity score and the structural similarity score, and a script comparison result is output according to the comprehensive similarity score.
2. The method according to claim 1, characterized in that Determining a comprehensive similarity score based on the semantic similarity score and the structural similarity score includes: When the structural similarity score exceeds a first threshold, or when the semantic similarity score is within a second preset range and the structural similarity score exceeds the second threshold, constructing input data, the input data including: first description information extracted from the first text data, second description information extracted from the second text data; a comparison result between the first narrative mode feature set and the second narrative mode feature set; the second preset range is within the first preset range, and the second threshold is lower than the first threshold; Inputting the input data into a large language model, and having the large language model perform a deep similarity analysis based on the input data to obtain a deep similarity score; A weighted sum calculation is performed on the semantic similarity score, the structural similarity score, and the depth similarity score to obtain the comprehensive similarity score.
3. The method according to claim 2, characterized in that The method further comprises: Performing type recognition on the first text data and the second text data to obtain a script type; The weights of the semantic similarity score, the structural similarity score, and the depth similarity score are adjusted according to the script type.
4. The method according to claim 2, characterized in that The method further comprises: Calculating a difference between the semantic similarity score and the structural similarity score; When the difference exceeds a preset difference threshold and the difference is greater than zero, increasing the weight of the semantic similarity score; When the difference exceeds a preset difference threshold and is less than zero, the weights of the structural similarity score and the depth similarity score are increased.
5. The method according to claim 2, characterized in that The method further comprises: When the structural similarity score does not exceed the first threshold, and the semantic similarity score is not within a second preset range or the structural similarity score does not exceed the second threshold, a weighted sum calculation is performed on the semantic similarity score and the structural similarity score to obtain the comprehensive similarity score.
6. The method according to claim 1, characterized in that The method further comprises: detecting a match between the first narrative mode feature set and the core narrative features in the second narrative mode feature set; In the case that there is a core feature matching combination that meets the preset strength condition, the comprehensive similarity score is corrected to obtain a corrected comprehensive similarity score, wherein the corrected comprehensive similarity score is greater than the original comprehensive similarity score.
7. The method according to claim 1, characterized in that The extracting of the first narrative mode feature set of the first text data and the second narrative mode feature set of the second text data respectively includes: Inputting a preset narrative mode recognition prompt template and the first text data into a large language model, so that the large language model identifies narrative mode tags contained in the first text data from the narrative mode knowledge base to obtain a first tag set; Based on a pre-trained semantic encoder, convert the first label set into a first narrative mode feature vector; Associating and storing the first tag set with the first narrative mode feature vector to form the first narrative mode feature set; as well as, Inputting a preset narrative mode recognition prompt template and the second text data into a large language model, so that the large language model identifies narrative mode tags contained in the second text data from the narrative mode knowledge base to obtain a second tag set; Based on a pre-trained semantic encoder, converting the second label set into a second narrative mode feature vector; The second tag set is associated with the second narrative mode feature vector and stored to form the second narrative mode feature set.
8. A similar script analysis device, characterized in that: The device comprises: An acquisition module, configured to acquire first text data of a first script and second text data of a second script; A first calculation module is used to calculate the text semantic similarity between the first text data and the second text data to obtain a semantic similarity score; an extraction module configured to extract, when the semantic similarity score is within a first preset range, a first narrative mode feature set of the first text data and a second narrative mode feature set of the second text data, respectively, wherein the first narrative mode feature set and the second narrative mode feature set include narrative mode tags identified from a predefined narrative mode knowledge base; a second calculation module, configured to calculate the narrative pattern similarity between the first narrative pattern feature set and the second narrative pattern feature set to obtain a structural similarity score; A determination module is used to determine a comprehensive similarity score based on the semantic similarity score and the structural similarity score, and output a script comparison result according to the comprehensive similarity score.
9. 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 via the communication bus; Memory for storing computer programs; The processor is used to implement the similar script analysis method described in any one of claims 1 to 7 when executing the program stored in the memory.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the similar script analysis method described in any one of claims 1 to 7.