Scenario consistency verification method and device, electronic equipment and storage medium
By breaking down the script into structured units, extracting narrative elements, and building a knowledge base, the problem of inconsistencies in plot during scriptwriting using large language models is solved, achieving automated script consistency verification and improving script quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING QIYI CENTURY SCI & TECH CO LTD
- Filing Date
- 2026-01-15
- Publication Date
- 2026-05-12
AI Technical Summary
Large language models have problems in scriptwriting, such as inconsistencies in plot settings and disjointed character behavior logic, which affect script quality. Existing technologies cannot automatically perform consistency checks.
The script is broken down into structured units, narrative elements are extracted, structured plot summaries are generated, and a script event knowledge base is built. This allows for the retrieval of target scenes related to the content to be verified and the performance of consistency checks.
It automatically verifies whether the script content conforms to the setting, avoiding inconsistencies in the plot and the logical inconsistencies in the characters' behavior, thus improving the quality of the script.
Smart Images

Figure CN122019709A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a script consistency verification method, apparatus, electronic device and storage medium. Background Technology
[0002] With the continuous development of computer technology, the application of Large Language Models (LLM) is becoming increasingly widespread. For example, in the film and television or animation fields, LLM can be used for script creation or automatic evaluation of script quality, thereby assisting in creation, review, or topic selection decisions. However, LLM suffers from forgetting and illusion problems in long text comprehension and memory, which may lead to incorrect memory of characters, events, or prop states, resulting in inconsistencies in plot settings and incoherent character behavior, thus affecting script quality. Summary of the Invention
[0003] This application provides a script consistency verification method, apparatus, electronic device, and storage medium to solve the technical problem of how to automatically perform consistency verification on the content to be verified.
[0004] Firstly, this application provides a script consistency verification method, the method comprising: Break the script down into structured units; Extract narrative elements from the structured units; A structured plot summary is generated based on the narrative elements, and a script event knowledge base is constructed based on the structured plot summary; Retrieve the target scenes related to the content to be verified from the script event knowledge base; Perform a consistency check between the descriptive information in the content to be verified and the target narrative elements in the target scene.
[0005] Optionally, the script can be broken down into structured units, including: The script is broken down into multiple scenes based on the formatted tags carried by the script; Each session is configured with unique identifier and description information, and the sessions with configured identifier and description information are used as the structured units.
[0006] Optionally, the narrative elements in the structured unit are extracted, including: Obtain a unified prompt template; wherein, the unified prompt template is used to indicate the extraction of narrative elements, and the narrative elements include at least one of the following: character elements, key prop elements, plot clue elements, and spatiotemporal relationship elements; Based on the large language model, narrative elements are extracted from the structured units according to the unified prompt template, and the narrative elements are represented in a standardized manner.
[0007] Optionally, a structured plot summary is generated based on the narrative elements, and a script event knowledge base is constructed based on the structured plot summary, including: For each structured unit, the structured unit and the narrative element are input into a large language model, and a structured plot summary corresponding to the structured unit is generated according to a preset summary template. An embedding vector is generated based on the structured plot summary; A vector index structure is established based on all the aforementioned embedded vectors; The script event knowledge base is constructed based on the vector index structure.
[0008] Optionally, the target scene related to the content to be verified is retrieved from the script event knowledge base, including: Retrieve the content to be verified; The content to be verified is parsed to obtain the extracted content; wherein, the extracted content includes the narrative elements contained in the content to be verified and the narrative states corresponding to the narrative elements; The extracted content is used to generate a query request according to a preset query template; Retrieve the target embedding vector corresponding to the query request from the script event knowledge base; The field corresponding to the target embedding vector is taken as the target field.
[0009] Optionally, the consistency verification of the descriptive information in the content to be verified with the target narrative elements in the target scene includes: Perform a consistency check between the narrative state of the narrative element corresponding to the content to be verified and the target narrative state of the target narrative element of the target session. Generate consistency verification results.
[0010] Optionally, after performing a consistency check between the descriptive information in the content to be verified and the target narrative elements in the target scene, the method further includes: The consistency verification results are annotated to identify points of inconsistency. A visual report is generated based on the information about the points of conflict.
[0011] Secondly, this application provides a script consistency verification device, the device comprising: The structured processing module is used to break down the script into structured units; An element extraction module is used to extract narrative elements from the structured units; The knowledge base construction module is used to generate a structured plot summary based on the narrative elements, and to construct a script event knowledge base based on the structured plot summary; The associated retrieval module is used to retrieve target scenes related to the content to be verified from the script event knowledge base; The consistency detection module is used to perform consistency verification between the description information in the content to be verified and the target narrative elements in the target scene.
[0012] Thirdly, this application provides 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 through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the script consistency verification method described in any embodiment of the first aspect.
[0013] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the script consistency verification method as described in any embodiment of the first aspect.
[0014] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application decomposes the script into structured units; extracts narrative elements from the structured units; generates structured plot summaries based on the narrative elements, and constructs a script event knowledge base based on the structured plot summaries; retrieves target scenes related to the content to be verified from the script event knowledge base; and performs consistency verification between the descriptive information in the content to be verified and the target narrative elements in the target scenes. This method can decompose an existing script into structured units, extract narrative elements from the structured units, and then generate structured plot summaries based on the narrative elements. Based on the structured plot summaries, a script event knowledge base is constructed. When it is necessary to verify the content to be verified, target scenes related to the content to be verified are retrieved from the script event knowledge base, and consistency verification is performed between the descriptive information in the content to be verified and the target narrative elements in the target scenes. This can automatically verify whether the content to be verified conforms to the script settings, avoiding problems such as inconsistent plot settings and incoherent character behavior logic, thereby improving script quality. Attached Figure Description
[0015] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0018] Figure 1 A system architecture diagram of a script consistency verification method provided in one embodiment of this application; Figure 2 A flowchart illustrating a script consistency verification method provided in one embodiment of this application; Figure 3 A schematic diagram of the structure of a script consistency verification device provided in one embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0021] To understand this application, two specific application scenarios will be used as examples.
[0022] Scenario 1: Artificial Intelligence (AI) Animation Script Evaluation and Automatic Comment Generation In animation content production, large language models are used to automatically evaluate script quality and generate "comment reports" on aspects such as plot, character development, and pacing, which are used to assist in reviewing films and making topic selection decisions. However, the comments generated by these models share a common problem: sometimes they "misread the script" or "talk to themselves"—that is, the plot descriptions and character evaluations in the comments are not entirely consistent with the original script text, and some plot settings may even be fabricated out of thin air. Such inconsistencies directly affect the business side's trust in AI comments. The business side finds it difficult to quickly determine whether a particular AI comment is truly based on the original text and can only rely on manual sampling, which is extremely inefficient and highly subjective.
[0023] Scene 2: Scriptwriting and World-Building Maintenance for Long-Running Anime Series For long-running anime series (such as multi-season series or series exceeding 100 episodes), the scripts are lengthy, the time span is long, and the characters and settings are extremely complex, often involving vast world-building and multiple character development paths. During the long creative process and collaboration among multiple writers, inconsistencies in the established settings can easily arise, for example: 1) The character is initially set to be afraid of something, but later undergoes a drastic "personality change" without any explanation; 2) A key item was previously stated to be damaged or lost, but later it suddenly reappeared and was used normally; 3) The timeline and geographical settings in the worldview are contradictory.
[0024] Moreover, issues such as inconsistencies in the initial settings and incoherent character behavior are difficult to expose early on, and are often only pointed out by the audience after the final product is completed or even after it has been broadcast, making corrections extremely costly.
[0025] To at least address the technical problem of how to automatically perform consistency checks on content to be checked in the prior art, this application provides a script consistency check method, apparatus, electronic device, and storage medium, which can automatically check whether the content to be checked conforms to the script settings, avoid problems such as inconsistencies in plot settings and incoherent character behavior logic, thereby improving script quality.
[0026] The first embodiment of this application provides a script consistency verification method, which can be applied to, for example... Figure 1 The system architecture shown includes at least a terminal 101 and a server 102, which establish a communication connection.
[0027] This method can be applied to terminal 101 or server 102 in the system architecture. Terminal 101 can be a desktop computer, tablet computer, laptop computer, supercomputer or other devices, and server 102 can be a local server, a cloud server or a server cluster.
[0028] Next, based on this system architecture, the script consistency verification method will be described in detail, such as... Figure 2 The script consistency verification method includes: Step 201: Decompose the script into structured units.
[0029] A script can be a complete script, such as the script for all episodes of a long-running anime, or it can be a partial script, such as a specific episode or scene. A script can be broken down into structured units, such as multiple scenes.
[0030] In one embodiment, decomposing the script into structured units includes: decomposing the script into multiple scenes based on formatted tags carried by the script; configuring unique identifier information and description information for each scene, and using the scenes configured with identifier information and description information as structured units.
[0031] In this embodiment, the formatted marker can be, for example, a marker for episode X, scene Y in the script, or a marker for interior / exterior scene + location + time. The formatted markers carried by the script can initially decompose the script into multiple scenes. Each scene can be configured with a unique ID and corresponding descriptive information, which can be textual information describing the plot of that scene. Each scene configured with identifier and descriptive information is treated as a structured unit.
[0032] Step 202: Extract narrative elements from the structured units.
[0033] For each scene, the narrative elements can be extracted using a large language model.
[0034] In one embodiment, extracting narrative elements from a structured unit includes: obtaining a unified prompt template; wherein the unified prompt template is used to indicate the extraction of narrative elements, and the narrative elements include at least one of character elements, key prop elements, plot clue elements, and spatiotemporal relationship elements; extracting narrative elements from the structured unit according to the unified prompt template based on a large language model, and standardizing the representation of the narrative elements.
[0035] In this embodiment, narrative elements include character elements, key prop elements, plot clue elements, and time-space relationship elements as examples. This does not represent a limitation on the types of narrative elements. In fact, narrative elements may include one or more of these, or may include other forms of elements.
[0036] For example, character elements may include: a list of characters (including aliases and identity tags), the current status of characters (e.g., alive / dead, healthy / seriously injured, emotional state, stance / alliance, relationship changes, etc.), and explicit relationship changes between characters (e.g., "becoming lovers", "breaking up", "becoming an apprentice", etc.).
[0037] Key item elements may include: important item names (such as "Divine Sword XX", "X Chip", "Ancient Necklace"), item status (intact, damaged, lost, sealed, unlocked, etc.), item holder and location.
[0038] Plot clues can include key events that occur in this episode (such as "the first revelation of clues to the real culprit" or "a character awakening new abilities"), foreshadowing, and suspense that guide the subsequent plot development.
[0039] Spatiotemporal relationship elements may include: the world / location in which the scene is located (such as a city, spatial dimension, special worldview region), and a specific or relative point in time (such as "three days before the great battle" or "the day after the ending of the previous episode").
[0040] For each scene, the large language model is used to extract four types of narrative elements under a unified prompt template: character elements, key prop elements, plot clue elements, and spatiotemporal relationship elements. The narrative elements can be standardized and aligned.
[0041] For example, a character ID table can be created to point different code names such as "Detective Li / Little Li / Officer Li" to the same character; an item ID table can be created to merge and mark items with different descriptions but pointing to the same entity, so as to avoid confusion when the large language model analyzes characters and items due to different code names.
[0042] After extracting the narrative elements from the structured units, the program can output the scene ID, episode number, position, four types of narrative elements, and their standardized representations for each scene.
[0043] Step 203: Generate a structured plot summary based on the narrative elements, and build a script event knowledge base based on the structured plot summary.
[0044] For each scene, a concise but complete structured plot summary can be generated. The structured plot summary can use a uniform format and fields to facilitate subsequent retrieval. The uniform format and fields can clearly indicate in the summary: main characters, key events, status of important props, key spatiotemporal information, etc. Then, a script event knowledge base is built based on the structured scene summary.
[0045] In one embodiment, generating a structured plot summary based on narrative elements and constructing a script event knowledge base based on the structured plot summary includes: for each structured unit, inputting the structured unit and narrative elements into a large language model, generating a structured plot summary corresponding to the structured unit according to a preset summary template; generating an embedding vector based on the structured plot summary; establishing a vector index structure based on all embedding vectors; and constructing a script event knowledge base based on the vector index structure.
[0046] In this embodiment, for each structured unit, the original scene text and extracted narrative elements of the structured unit can be input into a large language model. A structured plot summary corresponding to the structured unit is generated according to a preset summary template, for example, "S58 – In the apartment, Li Tan uses a rusty copper key to open the safe in the study and discovers the codebook left by the villain for the first time." Furthermore, when generating the summary, speculative information not present in the original text should be avoided. Typical fields in the structured plot summary may include: scene ID / episode number / script name, summary text, a list of character elements and their standardized IDs, a list of prop elements and their standardized IDs, spatiotemporal tags, plot clue elements, etc.
[0047] Embedded vectors are generated based on structured plot summaries, and a vector index structure is built based on all embedded vectors. A script event knowledge base is then constructed based on this vector index structure. For example, embedded vectors are generated for each scene for semantic similarity retrieval, and a vector index structure is built to improve retrieval efficiency on a large-scale script database. Additionally, inverted indexes can be built for key fields such as character and prop IDs to enhance the accuracy and coverage of recall in Retrieval Augmentation (RAG).
[0048] Step 204: Retrieve the target scene related to the content to be verified from the script event knowledge base.
[0049] The content to be verified can be comments automatically generated by the large language model that needs to be verified, or it can be a series created or assisted in the creation by the large language model. The target scenes can be selected from the script event knowledge base if at least one scene with a relevance greater than a preset threshold to the content to be verified. Alternatively, scenes related to the content to be verified can be retrieved from the script event knowledge base, sorted by relevance, and the top-ranked scenes can be selected as the target scenes.
[0050] In one embodiment, retrieving a target scene related to the content to be verified from the script event knowledge base includes: obtaining the content to be verified; parsing the content to be verified to obtain extracted content; wherein, the extracted content includes the narrative elements contained in the content to be verified and the narrative states corresponding to the narrative elements; generating a query request from the extracted content according to a preset query template; retrieving a target embedding vector corresponding to the query request from the script event knowledge base; and using the scene corresponding to the target embedding vector as the target scene.
[0051] In this embodiment, taking the verification scenario of anime script reviews as an example, one or more AI review texts can be obtained. The plot statements involved in the reviews (such as "In episode 5, the male lead has sacrificed himself") are analyzed to extract elements such as characters, events, props, and time involved in the plot statements, as well as the corresponding narrative states (such as "deceased"). Then, the extracted content is transformed into a query summary using a large language model according to a preset query template, which serves as the query request Query generated by retrieval enhancement. Taking the consistency detection scenario of anime script creation as an example, one or more new scenes created can be obtained. The narrative elements contained in these new scenes and the narrative states corresponding to the narrative elements are extracted, and a query request Query is generated according to a preset query template. Next, based on the query request, the target embedding vector corresponding to the query request can be retrieved in the script event knowledge base. The scene corresponding to the target embedding vector is taken as the target scene. For example, the summaries of several historical scenes with the most similar semantics can be retrieved in the vector index. In the symbol index, a batch of "logically related" scenes can be recalled based on the character ID, prop ID, world view setting tags, etc. involved. The above candidate sets are merged and sorted, and obviously irrelevant scenes are filtered out, and the top-K historical scenes to be compared are retained as target scenes.
[0052] Step 205: Perform a consistency check between the descriptive information in the content to be checked and the target narrative elements in the target scene.
[0053] This method can decompose an existing script into structured units, extract narrative elements from the structured units, and then generate a structured plot summary based on the narrative elements. Based on the structured plot summary, a script event knowledge base is constructed. When it is necessary to verify the content to be verified, the target scenes related to the content to be verified are retrieved from the script event knowledge base. The consistency of the descriptive information in the content to be verified with the target narrative elements in the target scenes is verified. This method can automatically verify whether the content to be verified conforms to the script setting, avoiding problems such as inconsistencies in the plot settings and incoherent character behavior logic, thereby improving the quality of the script.
[0054] In one embodiment, the consistency verification between the descriptive information in the content to be verified and the target narrative element in the target session includes: verifying the consistency between the narrative state corresponding to the narrative element of the content to be verified and the target narrative state of the target narrative element in the target session; and generating a consistency verification result.
[0055] In this embodiment, when performing consistency verification between the descriptive information in the content to be verified and the target narrative elements in the target scene, a large language model can be invoked for logical comparison. For example, this can be done from the following aspects: (1) Consistency of character status: For example, if the target scene in the history clearly states that "character B dies in scene 10", but the current description says "character B is talking to other characters in scene 30", then the character status is inconsistent; (2) Consistency between item status and ownership: If the historical target battle states "Sword C is broken," while the current description states "The protagonist is using Sword C in battle again," it indicates that the item status is inconsistent. (3) Consistency between plot cause and effect and timeline: The historical target episode mentions that "unlocking the seal requires three days of preparation," while the current description states that "the unlocking was completed on the same day," indicating that the cause and effect of the plot are inconsistent with the timeline. (4) Consistency between worldview and rules: For example, if "a certain power can only be used by royalty in the world setting," but the current description assigns this power to a commoner character, it indicates that the world setting and rules are inconsistent.
[0056] Consistency verification results can be generated based on all logical comparison results.
[0057] In one embodiment, after performing consistency verification between the descriptive information in the content to be verified and the target narrative elements in the target scene, the method further includes: annotating the consistency verification results to determine the contradiction information; and generating a visualization report based on the contradiction information.
[0058] In this embodiment, the consistency verification results can be annotated to identify the contradictions. A visualization report can be generated based on the contradiction information. For example, the visualization report can display all the contradiction information in a list format. Each contradiction information can include the issue ID, issue type, the scene (or comment) ID involved, the name of the character / prop / setting involved, historical evidence fragments and current description fragments, explanatory notes on the generation of the large model, and suggested handling methods (such as "Please confirm the character's life or death setting", "Please unify the description of prop colors and materials", etc.).
[0059] Specifically, content that may not conform to the original text can be highlighted so that reviewers can quickly locate the corresponding scene in the original script and make a secondary judgment. In the creation tool interface, consistency checks can be performed in real time when writing new scenes, and prompts such as "setting conflict" can pop up in real time during the writing process. Of course, consistency checks can also be performed after completing an episode, a season, or the entire series, without any restrictions.
[0060] In the embodiments described above, the script is decomposed into scene-level structured units, and core narrative elements such as "character status, key props, plot clues, and spatiotemporal relationships" are extracted from each unit. A script event knowledge base is constructed based on this structured information. Then, RAG technology is used to locate historical scenes related to the current narrative logic, and a large language model is used for logical comparison. This not only detects simple text duplication or similarity issues but also automatically captures deeper contradictions such as "character life and death, prop status, spatiotemporal logic, and worldview rules," transforming the originally difficult-to-systematize "narrative consistency check" into an automated and repeatable process. When applied to AI-powered animation script reviews, the review text can be used as a consistency detection object (i.e., the content to be checked). The output of the large model is then compared again with the script event knowledge base to identify factual inconsistencies between the "review" and the original text. This significantly improves the credibility and interpretability of AI reviews, providing the business side with "evidence-based" review results. It reduces the cost of manual review, making AI reviews more suitable for stable implementation in large-scale projects. By automatically verifying the narrative consistency between AI reviews and the original text, the risk of "AI fabricating details" is significantly reduced. When applied to the creation of long-form animation, it can ensure setting consistency. Embedding the same consistency analysis technology into the creation stage allows for real-time or batch comparison of newly written scenes with historical scenes' global settings. This is particularly suitable for the setting maintenance of "long-running animations with complex worldviews," greatly reducing the risk of "inconsistencies in settings" being discovered only after the final product is completed. It helps screenwriters focus on the creative idea itself, rather than a large amount of mechanical memorization and searching, improving creative efficiency and quality. During the project initiation and script review stages, automated testing reduces a significant amount of manual inspection time. In the creation of long-form animations and TV series, it exposes setting problems in advance, avoiding costly rework such as later revisions, dubbing, and re-rendering.
[0061] Based on the same technical concept, the second embodiment of this application provides a script consistency verification device, such as... Figure 3 The device includes: The structured processing module 301 is used to decompose the script into structured units; Element extraction module 302 is used to extract narrative elements from the structured unit; The knowledge base construction module 303 is used to generate a structured plot summary based on the narrative elements, and to construct a script event knowledge base based on the structured plot summary. The associated retrieval module 304 is used to retrieve target scenes related to the content to be verified from the script event knowledge base; The consistency detection module 305 is used to perform consistency verification between the description information in the content to be verified and the target narrative elements in the target scene.
[0062] This device can decompose existing scripts into structured units, extract narrative elements from these units, and then generate structured plot summaries based on these narrative elements. This allows for the construction of a script event knowledge base based on the structured plot summaries. When content needs to be verified, the device retrieves target scenes related to the content from the script event knowledge base, and performs consistency checks between the descriptive information in the content and the target narrative elements in the target scenes. This automatically verifies whether the content conforms to the script's settings, avoiding inconsistencies in plot settings and incoherent character behavior, thereby improving script quality.
[0063] like Figure 4 As shown in the figure, this application provides an electronic device, including 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 communicate with each other through the communication bus 114. Memory 113 is used to store computer programs; In one embodiment of this application, when the processor 111 executes the program stored in the memory 113, it implements the script consistency verification method provided in any of the foregoing method embodiments.
[0064] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0065] The communication interface is used for communication between the aforementioned terminal and other devices.
[0066] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0067] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0068] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the script consistency verification method as provided in any of the foregoing method embodiments.
[0069] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0070] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0071] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.
[0072] It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. In the description, suffixes such as "module," "part," or "unit" used to denote elements are used solely for illustrative purposes and have no specific meaning in themselves. Therefore, "module," "part," or "unit" may be used interchangeably.
[0073] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A script consistency verification method, characterized in that, The method includes: Break the script down into structured units; Extract narrative elements from the structured units; A structured plot summary is generated based on the narrative elements, and a script event knowledge base is constructed based on the structured plot summary; Retrieve the target scenes related to the content to be verified from the script event knowledge base; Perform a consistency check between the descriptive information in the content to be verified and the target narrative elements in the target scene.
2. The method according to claim 1, characterized in that, The script is broken down into structured units, including: The script is broken down into multiple scenes based on the formatted tags carried by the script; Each session is configured with unique identifier and description information, and the sessions with configured identifier and description information are used as the structured units.
3. The method according to claim 1, characterized in that, Extracting narrative elements from the structured unit includes: Obtain a unified prompt template; wherein, the unified prompt template is used to indicate the extraction of narrative elements, and the narrative elements include at least one of the following: character elements, key prop elements, plot clue elements, and spatiotemporal relationship elements; Based on the large language model, narrative elements are extracted from the structured units according to the unified prompt template, and the narrative elements are represented in a standardized manner.
4. The method according to claim 1, characterized in that, A structured plot summary is generated based on the narrative elements, and a script event knowledge base is constructed based on the structured plot summary, including: For each structured unit, the structured unit and the narrative element are input into a large language model, and a structured plot summary corresponding to the structured unit is generated according to a preset summary template. An embedding vector is generated based on the structured plot summary; A vector index structure is established based on all the aforementioned embedded vectors; The script event knowledge base is constructed based on the vector index structure.
5. The method according to claim 4, characterized in that, Retrieve target scenes related to the content to be verified from the script event knowledge base, including: Retrieve the content to be verified; The content to be verified is parsed to obtain the extracted content; wherein, the extracted content includes the narrative elements contained in the content to be verified and the narrative states corresponding to the narrative elements; The extracted content is used to generate a query request according to a preset query template; Retrieve the target embedding vector corresponding to the query request from the script event knowledge base; The field corresponding to the target embedding vector is taken as the target field.
6. The method according to claim 5, characterized in that, Perform consistency verification between the descriptive information in the content to be verified and the target narrative elements in the target session, including: Perform a consistency check between the narrative state of the narrative element corresponding to the content to be verified and the target narrative state of the target narrative element of the target session. Generate consistency verification results.
7. The method according to claim 1, characterized in that, After performing consistency verification between the descriptive information in the content to be verified and the target narrative elements in the target scene, the method further includes: The consistency verification results are annotated to identify points of inconsistency. A visual report is generated based on the information about the points of conflict.
8. A script consistency verification device, characterized in that, The device includes: The structured processing module is used to break down the script into structured units; An element extraction module is used to extract narrative elements from the structured units; The knowledge base construction module is used to generate a structured plot summary based on the narrative elements, and to construct a script event knowledge base based on the structured plot summary; The associated retrieval module is used to retrieve target scenes related to the content to be verified from the script event knowledge base; The consistency detection module is used to perform consistency verification between the description information in the content to be verified and the target narrative elements in the target scene.
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 through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the script consistency verification method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the script consistency verification method as described in any one of claims 1-7.