CN-122019709-A - Script consistency verification method and device, electronic equipment and storage medium
Abstract
The application relates to a script consistency verification method, a device, electronic equipment and a storage medium, wherein the method can decompose the existing script into a structural unit, extract narrative elements in the structural unit, and then generate a structured plot abstract based on the narrative elements, thereby constructing a script event knowledge base based on the structured plot abstract, when the content to be verified needs to be verified, retrieving target scenes related to the content to be verified from the script event knowledge base, carrying out consistency verification on description information in the content to be verified and the target narrative elements in the target scenes, and can automatically verify whether the content to be verified accords with script setting, so as to avoid the problems of inconsistent setting before and after the script, incoherence character behavior logic and the like, thereby improving the script quality.
Inventors
- LIANG YANJUN
Assignees
- 北京奇艺世纪科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260115
Claims (10)
- 1. A scenario consistency check method, the method comprising: Decomposing the script into structural units; Extracting the narrative elements in the structuring element; Generating a structured plot summary based on the narrative elements, and constructing a scenario event knowledge base based on the structured plot summary; retrieving target scenes related to the content to be checked from the script event knowledge base; and carrying out consistency check on the description information in the content to be checked and the target narrative elements in the target session.
- 2. The method of claim 1, wherein decomposing the script into structured units comprises: decomposing the script into a plurality of shots based on formatting marks carried by the script; unique identification information and description information are configured for each session, and the session in which the identification information and the description information are configured is taken as the structuring unit.
- 3. The method of claim 1, wherein extracting the narrative elements in the structuring element comprises: The method comprises the steps of obtaining a unified prompt template, wherein the unified prompt template is used for indicating the extraction of narrative elements, and the narrative elements at least comprise one of character elements, key prop elements, plot clue elements and space-time relation elements; And extracting the narrative elements from the structural units according to the unified prompt template based on a large language model, and carrying out standardized representation on the narrative elements.
- 4. The method of claim 1, wherein generating a structured storyline based on the narrative elements and constructing a storyline event knowledge base based on the structured storyline comprises: Inputting the structuring unit and the narrative elements into a large language model for each structuring unit, and generating a structuring plot abstract corresponding to the structuring unit according to a preset abstract template; generating an embedded vector based on the structured plot summary; establishing a vector index structure based on all the embedded vectors; And constructing the script event knowledge base according to the vector index structure.
- 5. The method of claim 4, wherein retrieving the target session related to the content to be verified from the transcript event knowledge base comprises: acquiring content to be verified; analyzing the content to be checked to obtain extraction content, wherein the extraction content comprises narrative elements contained in the content to be checked and narrative states corresponding to the narrative elements; generating a query request according to the extracted content and a preset query template; retrieving a target embedded vector corresponding to the query request from the scenario event knowledge base; And taking the field corresponding to the target embedded vector as the target field.
- 6. The method of claim 5, wherein consistency checking the descriptive information in the content to be checked with the target narrative elements in the target session comprises: carrying out consistency check on the narrative states corresponding to the narrative elements corresponding to the content to be checked and the target narrative states of the target narrative elements of the target session; And generating a consistency check result.
- 7. The method of claim 1, wherein after consistency checking the descriptive information in the content to be checked with the target narrative elements in the target session, the method further comprises: Labeling the consistency check result, and determining contradictory point information; and generating a visual report according to the contradiction point information.
- 8. A scenario consistency check device, the device comprising: The structuring processing module is used for decomposing the script into structuring units; the element extraction module is used for extracting the narrative elements in the structuring unit; the knowledge base construction module is used for generating a structured plot abstract based on the narrative elements and constructing a script event knowledge base based on the structured plot abstract; the association retrieval module is used for retrieving target scenes related to the content to be checked from the scenario event knowledge base; And the consistency detection module is used for carrying out consistency verification on the description information in the content to be verified and the target narrative elements in the target session.
- 9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; a memory for storing a computer program; A processor for implementing the scenario consistency check method of any one of claims 1-7 when executing a program stored on a memory.
- 10. A computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements a scenario consistency check method according to any one of claims 1-7.
Description
Script consistency verification method and device, electronic equipment and storage medium Technical Field The present application relates to the field of computer technologies, and in particular, to a scenario consistency verification method, apparatus, electronic device, and storage medium. Background With the continuous development of computer technology, the application field of Large Language Models (LLM) is becoming wider and wider. For example, in the field of movie and television episodes or animation at present, a large language model can be applied to perform episode creation or automatically evaluate the quality of the episodes, so that creation, film review or topic selection decision can be assisted. However, the large language model has the problems of forgetting and illusion on long text understanding and memorizing, and can be used for memorizing the states of roles, events or props in an error way, so that the problems of different settings before and after a scenario, incoherence of behavior logic of the characters and the like are generated, and the quality of the scenario is influenced. Disclosure of Invention The application provides a script consistency verification method, a script consistency verification device, electronic equipment and a storage medium, which are used for solving the technical problem of how to automatically carry out consistency verification on content to be verified. In a first aspect, the present application provides a scenario consistency verification method, the method comprising: Decomposing the script into structural units; Extracting the narrative elements in the structuring element; Generating a structured plot summary based on the narrative elements, and constructing a scenario event knowledge base based on the structured plot summary; retrieving target scenes related to the content to be checked from the script event knowledge base; and carrying out consistency check on the description information in the content to be checked and the target narrative elements in the target session. Optionally, decomposing the script into structural units includes: decomposing the script into a plurality of shots based on formatting marks carried by the script; unique identification information and description information are configured for each session, and the session in which the identification information and the description information are configured is taken as the structuring unit. Optionally, extracting the narrative elements in the structuring element, comprises: The method comprises the steps of obtaining a unified prompt template, wherein the unified prompt template is used for indicating the extraction of narrative elements, and the narrative elements at least comprise one of character elements, key prop elements, plot clue elements and space-time relation elements; And extracting the narrative elements from the structural units according to the unified prompt template based on a large language model, and carrying out standardized representation on the narrative elements. Optionally, generating a structured scenario summary based on the narrative elements and building a scenario event knowledge base based on the structured scenario summary, comprising: Inputting the structuring unit and the narrative elements into a large language model for each structuring unit, and generating a structuring plot abstract corresponding to the structuring unit according to a preset abstract template; generating an embedded vector based on the structured plot summary; establishing a vector index structure based on all the embedded vectors; And constructing the script event knowledge base according to the vector index structure. Optionally, retrieving a target session related to the content to be checked from the scenario event knowledge base, including: acquiring content to be verified; analyzing the content to be checked to obtain extraction content, wherein the extraction content comprises narrative elements contained in the content to be checked and narrative states corresponding to the narrative elements; generating a query request according to the extracted content and a preset query template; retrieving a target embedded vector corresponding to the query request from the scenario event knowledge base; And taking the field corresponding to the target embedded vector as the target field. Optionally, performing consistency verification on the description information in the content to be verified and the target narrative element in the target session, including: carrying out consistency check on the narrative states corresponding to the narrative elements corresponding to the content to be checked and the target narrative states of the target narrative elements of the target session; And generating a consistency check result. Optionally, after performing consistency verification on the description information in the content to be verified and the target narrative element in th