A script asset extraction and index generation method, device, equipment and medium

By analyzing scripts episode by episode and extracting them in batches using a large-scale model, combined with directed relationship graph aggregation, the script assets of short film and television dramas are automatically extracted. This solves the problems of low efficiency and fragmentation in existing technologies and achieves efficient and unified script asset index generation.

CN122133673APending Publication Date: 2026-06-02GUANGZHOU XINGHUO DEEP INTELLIGENCE TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU XINGHUO DEEP INTELLIGENCE TECHNOLOGY CO LTD
Filing Date
2026-04-20
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies are inefficient when extracting assets from multi-episode short film and television scripts, struggle to handle different names and aliases for the same entity, and lack automated processes and unified data models, resulting in fragmentation and repetitive work.

Method used

By splitting the script file into independent texts for each episode, extracting structured asset data in parallel using a large language model, updating the aliases and canonical names of the same entity using a directed relational graph, and generating a unified index record.

Benefits of technology

It enables the automatic and efficient extraction of script assets from multi-episode short film and television scripts, avoiding fragmented and duplicate statistics of the same entity appearing under different names in different episodes or batches, forming a unified and searchable index, and improving the efficiency of extraction and index generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122133673A_ABST
    Figure CN122133673A_ABST
Patent Text Reader

Abstract

This application relates to the field of natural language processing technology and provides a method, apparatus, device, and medium for script asset extraction and index generation. The method includes: splitting the script file into independent texts for each episode, and grouping the independent texts of multiple episodes into several batches of text; in parallel calling a preset large language model to extract structured asset data from each batch of text; if an alias of an asset entity appears as an independent name in a preset directed relation graph, then the preset directed relation graph is updated with the alias of the asset entity as a child node and the standard name of the asset entity as the parent node; based on the updated preset directed relation graph, index records are generated for different names of the same asset entity. This application can automatically and efficiently extract script assets from multi-episode short drama scripts, and can avoid fragmentation and duplicate statistics caused by the same entity appearing with different names in different episodes or batches, forming a unified and searchable asset index.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of natural language processing technology, and in particular to a script asset extraction and index generation method, a script asset extraction and index generation device, a corresponding electronic device, and a corresponding computer-readable storage medium. Background Technology

[0002] Most short film and television dramas (such as vertical screen short dramas, micro-dramas, etc.) are continuous scripts of dozens to hundreds of episodes. During the production preparation stage, the script assets of short film and television dramas can usually be sorted out from the full script, including scene locations, props, characters, etc.

[0003] Among the technologies related to script asset extraction, one approach typically relies on manual reading, extraction, and merging. This method is not only time-consuming and prone to omissions or duplications, resulting in low efficiency, but also struggles to systematically identify and merge instances where the same entity appears under different names in the script. Furthermore, manual lists are often unstructured text, making it difficult to search and statistically analyze by episode number, genre, or alias. Additionally, it involves repetitive work across different projects and lacks reusable automated processes and unified data models. Another approach is to extract entities from text using keywords or rules. However, this method struggles to handle synonyms, alias chains, and hierarchical relationships (such as main landmarks and sub-regions) within the script, and it cannot automatically establish equivalence relationships and merge the same entity across batches or episodes. Therefore, the aforementioned technologies are not suitable for extracting assets from multi-episode short film and television scripts. Summary of the Invention

[0004] This application provides a method, apparatus, device, and medium for script asset extraction and index generation, which can automatically and efficiently extract script assets from multi-episode short film and television scripts, and can overcome the fragmentation caused by the same entity appearing in different episodes or batches under different names (including aliases), forming a unified and searchable script asset index.

[0005] In one aspect, this application provides a method for script asset extraction and index generation, the method comprising: Obtain the script file, split the script file into independent texts for each episode, and group the independent texts of multiple episodes into several batches of texts; The system invokes a pre-defined large language model in parallel to extract asset structured data from each batch of text; the asset structured data includes the names of each asset entity, and the names include aliases and canonical names; If an alias of an asset entity appears as an independent name in the preset directed relationship graph, then the alias of the asset entity is used as the child node and the standard name of the asset entity is used as the parent node, and the preset directed relationship graph is updated. Based on the updated preset directed relationship graph, index records are generated for different names of the same asset entity.

[0006] On the other hand, this application provides a script asset extraction and index generation apparatus, the apparatus comprising: The text splitting module is used to obtain the script file, split the script file into independent text for each episode, and group the independent text for multiple episodes into several batches of text; The asset data extraction module is used to call a preset large language model in parallel to extract asset structured data from each batch of text; the asset structured data includes the names of each asset entity, and the names include aliases and standard names; The directed graph update module is used to update the preset directed graph when an alias of an asset entity appears as an independent name in the preset directed graph, with the alias of the asset entity as the child node and the standard name of the asset entity as the parent node. The index generation module is used to generate index records for different names of the same asset entity based on the updated preset directed relationship graph.

[0007] In another aspect, this application also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements any of the script asset extraction and index generation methods described above.

[0008] In another aspect, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the script asset extraction and index generation methods described above.

[0009] In another aspect, this application also provides a computer program product containing instructions that, when run on a computer, cause the computer to execute the script asset extraction and index generation methods described in the above aspects.

[0010] The script asset extraction and index generation method, apparatus, device, and medium provided in this application split the script file into independent texts for each episode, group the independent texts of multiple episodes into several batches of text, and then call a preset large language model in parallel to extract structured asset data from each batch of text. The structured asset data may include the names of each asset entity. If an alias of an asset entity appears as an independent name in the preset directed relationship graph, the preset directed relationship graph can be updated with the alias of the asset entity as a child node and the standard name of the asset entity as the parent node. Finally, based on the updated preset directed relationship graph, index records can be generated for different names of the same asset entity. Through script episode-by-episode parsing, batch concurrent large model extraction, and directed relationship graph aggregation, script assets can be automatically and efficiently extracted from multi-episode short film and television scripts. Different names of the same entity can be merged into a single index record without manual annotation, avoiding fragmentation and duplicate statistics caused by the same entity appearing with different names in different episodes or batches. This forms a unified and searchable script asset index, thereby automating script asset extraction and index generation and improving the efficiency of script asset extraction and index generation. Attached Figure Description

[0011] Figure 1 This is a flowchart illustrating the steps of a script asset extraction and index generation method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the overall process of script asset extraction and index generation provided in the embodiments of this application; Figure 3 This is a schematic diagram of the merging process of the directed relationship graph provided in the embodiments of this application; Figure 4 This is a schematic diagram of the main landmark-sub-region structure of the scene location provided in the embodiments of this application; Figure 5 This is a structural block diagram of a script asset extraction and index generation device provided in an embodiment of this application; Figure 6 This is a structural block diagram of an electronic device provided in an embodiment of this application; Figure 7 This is a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation

[0012] 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, and 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.

[0013] This application's embodiments utilize script episode-by-episode parsing, batch concurrent large-model extraction, and directed relationship graph aggregation to automatically and efficiently extract script assets such as scenes, props, and characters from long scripts. Specifically, efficiency is improved by reasonably dividing long scripts into episodes and batches and utilizing large language models for concurrent extraction. Furthermore, by automatically identifying the same entity based on name-alias relationships and performing incremental merging across batches using a graph structure without manual annotation, different names of the same entity can be merged into a single index record without manual annotation. This avoids fragmentation and duplicate statistics caused by the same entity appearing with different names (including aliases) in different episodes or batches, forming a unified and searchable script asset index. Finally, differentiated data models and merging strategies are designed for different types of assets such as scenes, props, and characters, supporting multi-dimensional indexing and output by episode number, alias, and type. Specifically, the scene adopts a two-level system of main landmark and sub-region and alias equivalent merging. Props and characters adopt a unified graph base class and configurable merging rules to facilitate the expansion of new asset types. The output supports readable text and structured data formats, which facilitates retrieval and statistics by episode number, alias, type and other dimensions. It directly supports production needs such as location selection, prop list and character list, shortens the asset organization time in the production preparation stage and improves data consistency and reusability.

[0014] Reference Figure 1 The diagram illustrates a flowchart of a script asset extraction and index generation method provided in an embodiment of this application, which may specifically include the following steps: Step S101: Obtain the script file, split the script file into independent texts for each episode, and group the independent texts of multiple episodes into several batches of texts.

[0015] In some embodiments of this application, for the input script file, such as Figure 2 As shown, set-based parsing and batch operations can be performed to support concurrent extraction of text from each batch.

[0016] Specifically, episode-by-episode parsing can be represented by splitting the script text into independent episode texts, facilitating subsequent batch processing of these episode texts. Optionally, it can identify specific segmented texts in the script file, such as title lines in the form of episode X, and split the script file into independent episode texts based on these specific segmented texts, thus obtaining the independent episode texts.

[0017] Batch processing can be represented by grouping multiple independent text sets into several batches, facilitating concurrent processing of each batch. Optionally, the independent text sets can be merged into a single batch every three sets, according to a preset fixed step size, resulting in several batches of text. Each batch of text can contain the corresponding set number, as well as concatenated text based on the corresponding set number, for subsequent concurrent extraction.

[0018] Step S102: In parallel, a preset large language model is invoked to extract asset structured data from each batch of text.

[0019] In some embodiments of this application, for each batch of text, multiple batches can simultaneously and concurrently invoke a preset large language model to automatically identify script assets from each batch of text and return structured asset data. Reasonable segmentation and batching of long scripts, combined with concurrent extraction using a large language model, can improve the efficiency of asset extraction.

[0020] Optionally, script assets can include three categories: scenes / locations, props / items, and characters. Scenes / locations can refer to filming locations, main landmarks and sub-areas, episode numbers, aliases, and plot descriptions; props / items can refer to the names, aliases, episode numbers, and narrative definitions of key / character / functional props; characters can refer to main / functional / extras characters, their aliases, and episode numbers.

[0021] Assuming each batch of text includes batch 1, batch 2, and batch 3, such as Figure 2 As shown, a preset large language model can be invoked in parallel to extract character assets for batch 1, batch 2, and batch 3, thereby achieving concurrent large model extraction.

[0022] It should be noted that the same preset large language model is used in different batches. The preset large language model used can be a pre-trained large language model that can be used to extract asset entities such as scene locations, props, items, and characters. This application embodiment does not limit the specific model training and specific model output process.

[0023] In some embodiments of this application, the script assets obtained by concurrent extraction can be used to generate asset structured data, that is, the extraction result can be represented as asset structured data.

[0024] Specifically, structured asset data can include the name, number of episodes in which the asset appears, and category of each asset entity. The name can include aliases, standard names, and contextual appellations. The standard name refers to the asset's most important and commonly used name; aliases refer to other names, nicknames, or pronouns; and contextual appellations refer to the actual way the asset is addressed in the text. The number of episodes in which the asset appears refers to the specific series or range of series in which the asset appears. The category can refer to tags that can be used to classify assets, specifically for grading the clarity of the asset's naming and the certainty of its identity.

[0025] Optionally, categories can include named, functional, and unknown. Named refers to an asset with a fixed, exclusive, and formal name, uniquely and clearly identifying it, such as Chu Feng (character), a certain inn (scene), or Qingfeng Sword (item). Functional refers to an asset without a specific name, referred to by its function, type, or purpose, and can generally refer to a category, such as Young Hero (character), Cave (scene), or Wine Cup (item). Unknown refers to an asset that is only vaguely mentioned, without a specific name or clear identification, and cannot be further categorized, such as Young Hero (character), a certain place (scene), or an object (item).

[0026] For example, taking character asset types as an example, "named specific" refers to a character with a formal, fixed real name, who is a clearly defined independent person; "functional specific" refers to a character without a fixed real name, referred to by a title / nickname / identity designation, with a clear function or role; "unknown specific" refers to a character that only appears as a generic term, without a fixed name or clear role role, and cannot be further categorized. Based on this category, it is possible to distinguish between characters with formal names, characters with only titles / nicknames, and characters whose information is insufficient to determine their role, thus achieving the classification of character identity attributes.

[0027] Optionally, the data structure of asset structured data can be represented as a key-value pair structure, with fixed fields, uniform format, and easy batch reading and storage. For example, the uniform structure of structured data can be as follows: Name: XXX; Alias: XXX; Number of episodes: XX; Contextual address: XXX; Category: Named / Functional / Unknown Taking character asset types as an example, such as Figure 3As shown, the extraction results for batch 3 text can be "Name: Chu Feng; Alias: Brother Feng; Episodes: 7, 8, 9; Contextual Title: Chu Feng; Category: Named", the extraction results for batch 2 text can be "Name: Brother Feng; Alias: Young Hero; Episodes: 4, 5, 6; Contextual Title: Brother Feng; Category: Functional", and the extraction results for batch 1 text can be "Name: Young Hero; Alias: None; Episodes: 1, 2, 3; Contextual Title: Young Hero; Category: Unknown", etc.

[0028] Step S103: If an alias of an asset entity appears as an independent name in the preset directed relation graph, then the alias of the asset entity is used as the child node and the standard name of the asset entity is used as the parent node, and the preset directed relation graph is updated.

[0029] In some embodiments of this application, the results of each batch are added to the graph structure in sequence, which enables entity aggregation based on the graph structure, avoids fragmentation and duplicate statistics caused by the same entity appearing with different names in different sets or batches, and achieves alias disambiguation.

[0030] Specifically, the asset structured data extracted in parallel from each batch of text can be passed to the subsequent aggregation steps in sequence (e.g., batch 1-batch 2-batch 3) to ensure that the order of alias relationships remains consistent in the subsequent process.

[0031] The graph structure is represented by a pre-defined directed graph, which can refer to a pre-constructed directed graph. In practical applications, the pre-defined directed graph can be continuously updated iteratively based on the extraction results of each batch of text, thereby realizing the aggregation and updating of asset entities in the pre-defined directed graph.

[0032] Optionally, if an alias of an asset entity appears as an independent name in the preset directed relationship graph, the alias of the asset entity can be used as the child node and the standard name of the asset entity as the parent node, and a parent-child directed edge can be established between the two, specifically a directed edge from the parent node to the child node; and the relevant data of the child node can also be merged upwards to the parent node to update the preset directed relationship graph.

[0033] In the pre-defined directed graph, each node name corresponds to a unique node, meaning that aliases do not have separate nodes.

[0034] Optionally, the determination of whether an alias of a certain asset entity appears as an independent name can be expressed as obtaining a list of aliases for each asset entity, and then traversing the alias list. When an alias of a certain asset entity appears as a node name in a preset relationship graph or appears in subsequent batch text, it is determined that the alias of the asset entity appears as an independent name.

[0035] In some embodiments of this application, multi-type asset differentiation modeling can be performed, that is, different cross-batch aggregation methods are used for different types of asset entities.

[0036] As an example, for both prop entities and character entities, a unified graph base class and configurable merging rules can be used to achieve graph aggregation and alias disambiguation.

[0037] Specifically, for item entities or character entities, if an alias of an item entity or character entity has appeared as an independent name in the preset directed relationship graph, then the alias of the item entity or character entity can be used as a child node, and the standard name of the item entity or character entity can be used as the parent node. A directed edge is established from the parent node to the child node, and the relevant data of the child node is merged upward to the parent node according to the preset metadata merging rules to update the preset directed relationship graph, thereby achieving cross-batch aggregation.

[0038] The related data for child nodes may include information such as the number of episodes in which the child node appears, its alias, and the metadata of the current entry. Metadata may include auxiliary data, such as contextual names and categories; however, this embodiment does not impose limitations on this.

[0039] For example, in the predefined directed graph, each name corresponds to a unique node, and aliases do not have separate nodes. Suppose an item or character entity is named A, and its alias list contains B. When B has already appeared as a node name in the predefined directed graph, a directed edge A→B (A is the parent, B is the child) can be created, indicating that A is the canonical name of B. Simultaneously, information such as the number of episodes B appears and its aliases can be merged upwards to the parent node A, and the metadata of the current entry can be merged into A.

[0040] Optionally, preset metadata merging rules are decoupled from asset types. These rules can include set union, category priority, and description merging by set range. The set union rule refers to taking the union of all occurrences of sets. The category priority rule refers to taking the name, alias, etc., of the higher-ranking category according to a pre-defined priority, where the pre-defined priority can be named > functional > unknown. This application does not impose any limitations on these rules.

[0041] like Figure 3As shown, the graph structure clustering performed on the extraction results of batch 3 text "Name: Chu Feng; Alias: Feng Ge; Episodes: 7, 8, 9; Contextual Title: Chu Feng; Category: Named", the extraction results of batch 2 text "Name: Feng Ge; Alias: Shao Xia; Episodes: 4, 5, 6; Contextual Title: Feng Ge; Category: Functional", and the extraction results of batch 1 text "Name: Shao Xia; Alias: None; Episodes: 1, 2, 3; Contextual Title: Shao Xia; Category: Unknown" can be represented by establishing directed edges "Chu Feng → Feng Ge → Shao Xia", indicating that Chu Feng is the standard name for Feng Ge and Shao Xia, and then outputting the final result based on the updated preset directed relationship graph.

[0042] As another example, for scene location entities, a two-level system of main landmark and sub-region can be used to merge aliases and achieve graph aggregation and alias disambiguation.

[0043] Specifically, for scene location entities, if a sub-region name appears as an alias for another scene in subsequent batches of text, the sub-region name can be used as a child node, and the main landmark corresponding to the sub-region name can be used as a parent node. A directed edge can be established from the parent node to the child node, and a mapping relationship containing the sub-region name and the main landmark can be established based on the directed edge. Related data with the same mapping relationship are merged upward to the parent node according to the preset metadata merging rules to update the preset directed relationship graph, thereby achieving cross-batch aggregation.

[0044] The scene location entity can use the main landmark-sub-region as the unique key, which can be used to maintain the mapping from aliases to scene keys and the parent-child relationship; the relevant data of the mapping relationship can include episode number, alias, description, etc.

[0045] For example, if a sub-region name appears as an alias for another scene location in subsequent batches of text, the idea of ​​building edges and merging upwards in a directed graph can be used to perform scene equivalence merging. Specifically, this involves merging episodes, aliases, descriptions, etc., that appear multiple times for the same key, and storing them using a tree structure of main landmark-sub-region.

[0046] like Figure 4 As shown, assuming the main landmark is the Imperial Palace, if locations such as the Imperial Study and the Back Garden appear as aliases for other scenes in subsequent batches of text, directed edges can be created for "Imperial Palace → Imperial Study" and "Imperial Palace → Back Garden," indicating that the mentioned Imperial Study is the Imperial Study of the Imperial Palace, and the mentioned Back Garden is the Back Garden of the Imperial Palace. It should be noted that sub-regions can be empty; when empty, it indicates that the main landmark itself is the scene.

[0047] In some embodiments of this application, directed cycle detection can be performed while establishing directed edges to prevent circular references.

[0048] Specifically, because the model uses a set-based approach, some ambiguous master-slave relationships cannot be 100% accurate. For example, assuming a master-slave relationship of Nuwa -> Nuwa Niangniang in episodes 1-3 of batch 1, episodes 4-6 of batch 2 might be extracted as Nuwa Niangniang -> Nuwa, which would form a cycle. To avoid this, directed cycle detection can be performed; if a cycle is found, the construction of that edge is skipped.

[0049] Step S104: Based on the updated preset directed relational graph, generate index records for different names of the same asset entity.

[0050] In this embodiment, cross-batch incremental aggregation of entities such as props and characters can be performed based on a directed relationship graph: parent-child edges are built with the name as the node, and when the alias was once the name, metadata is merged upwards, loop prevention is implemented, and only the root node is output.

[0051] In some embodiments of this application, the merged result based on the updated preset directed graph is represented as an index output. Specifically, the index records containing all data on the corresponding alias chain can be sorted and output by taking the root node or primary landmark in the updated preset directed graph as the unit, thereby merging different names of the same asset entity into one index record and realizing the aggregation of the same asset information.

[0052] The root node is a node without a parent node, representing a unique entity; only the root node is output, and its information has aggregated all data (name, alias, set number, type, etc.) on the entire alias chain, supporting multi-dimensional retrieval.

[0053] Optionally, a preset large language model can be invoked to perform global deduplication and merging of index records to obtain the final index output. Specifically, after output, the large language model can be invoked again for global deduplication and merging, or optionally, global deduplication and merging can be performed based on the large language model after graph aggregation to further eliminate residual duplication at batch boundaries and provide readable text and structured format index output.

[0054] For example, such as Figure 3 As shown, the final output can be represented as "Name: Chu Feng; Alias: Young Hero, Brother Feng; Episode: 1, 2, 3, 4, 5, 6, 7, 8, 9; Contextual Title: Young Hero, Brother Feng, Chu Feng; Category: Named".

[0055] In this embodiment, the script file is split into independent texts for each episode, and these independent texts are grouped into several batches. A pre-defined large language model is then invoked in parallel to extract structured asset data from each batch of texts. This structured asset data can include the names of various asset entities. If an alias of an asset entity appears as an independent name in the pre-defined directed relationship graph, the alias can be used as a child node, and the standard name of the asset entity as the parent node. The pre-defined directed relationship graph is then updated, and finally, based on the updated graph, index records are generated for different names of the same asset entity. By parsing the script episode by episode, extracting data in batches using a concurrent large model, and aggregating the directed relationship graph, assets such as scenes, props, and characters can be automatically and efficiently extracted from multi-episode short drama scripts. Furthermore, different names of the same entity can be grouped into a single index record without manual annotation. This avoids fragmentation and duplicate statistics caused by the same entity appearing with different names in different episodes or batches, forming a unified and searchable script asset index. This automates script asset extraction and index generation, and improves the efficiency of script asset extraction and index generation.

[0056] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.

[0057] Reference Figure 5 The diagram shows a structural block diagram of a script asset extraction and index generation device provided in an embodiment of this application, which may specifically include the following modules: The text splitting module 501 is used to obtain the script file, split the script file into independent text for each episode, and group the independent text of multiple episodes into several batches of text. The asset data extraction module 502 is used to call the preset large language model in parallel to extract asset structured data from each batch of text; the asset structured data includes the names of each asset entity, including aliases and standard names; The directed graph update module 503 is used to update the preset directed graph when an alias of an asset entity appears as an independent name in the preset directed graph, with the alias of the asset entity as the child node and the standard name of the asset entity as the parent node. The index generation module 504 is used to generate index records for different names of the same asset entity based on the updated preset directed relationship graph.

[0058] In some embodiments of this application, the text splitting module 501 may include the following sub-modules: The text splitting submodule is used to identify specific segmented text in the script file, and split the script file into independent texts by episode based on the specific segmented text, thus obtaining the independent text of each episode; The grouping submodule is used to merge multiple sets of independent text into the same batch according to a preset fixed step size, resulting in several batches of text; each batch of text contains concatenated text obtained by splicing according to the corresponding set number.

[0059] In some embodiments of this application, each node name in the preset directed graph corresponds to a unique node. The apparatus provided in the embodiments of this application may further include the following modules: The alias determination module is used to obtain a list of aliases for each asset entity; it iterates through the alias list, and when an alias of an asset entity appears as a node name in a preset relationship diagram or in a subsequent batch of text, it determines that the alias of the asset entity appears as an independent name.

[0060] In some embodiments of this application, the asset entity includes the item entity and the character entity; the directed relationship graph update module 503 may include the following sub-modules: The first directed graph update submodule is used to update the preset directed graph if an alias of an item or character entity has appeared as an independent name in the preset directed graph. The alias of the item or character entity is used as the child node and the standard name of the item or character entity is used as the parent node. A directed edge is established from the parent node to the child node, and the relevant data of the child node is merged upward to the parent node according to the preset metadata merging rules to update the preset directed graph.

[0061] In some embodiments of this application, the asset entity includes the scene location entity; the directed relationship graph update module 503 may include the following sub-modules: The second directed graph update submodule is used to address scene location entities. If a sub-region name appears as an alias for another scene in subsequent batches of text, then the sub-region name is used as the child node, and the main landmark corresponding to the sub-region name is used as the parent node. A directed edge is established from the parent node to the child node, and a mapping relationship containing the sub-region name and the main landmark is established based on the directed edge. Related data with the same mapping relationship are merged upwards to the parent node according to the preset metadata merging rules to update the preset directed graph.

[0062] In some embodiments of this application, the index generation module 504 may include the following sub-modules: The index record output submodule is used to sort and output index records containing all data on the corresponding alias chain in the root node or primary landmark of the updated preset directed relation graph; where the root node includes the parent node and all nodes that do not have a parent node.

[0063] In some embodiments of this application, the apparatus provided in this application may further include the following modules: The index output module is used to call a preset large language model to perform global deduplication and merging of index records to obtain the final index output.

[0064] In this embodiment, the script file is split into independent texts for each episode, and these independent texts are grouped into several batches. A pre-defined large language model is then invoked in parallel to extract structured asset data from each batch of texts. This structured asset data can include the names of various asset entities. If an alias of an asset entity appears as an independent name in the pre-defined directed relationship graph, the alias can be used as a child node, and the standard name of the asset entity as the parent node. The pre-defined directed relationship graph is then updated, and finally, based on the updated graph, index records are generated for different names of the same asset entity. By parsing the script episode by episode, extracting data in batches using a concurrent large model, and aggregating the directed relationship graph, assets such as scenes, props, and characters can be automatically and efficiently extracted from multi-episode short drama scripts. Furthermore, different names of the same entity can be grouped into a single index record without manual annotation. This avoids fragmentation and duplicate statistics caused by the same entity appearing with different names in different episodes or batches, forming a unified and searchable script asset index. This automates script asset extraction and index generation, and improves the efficiency of script asset extraction and index generation.

[0065] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0066] This application also provides an electronic device, see embodiments thereof. Figure 6 The provided electronic device 600 includes a memory 610, a processor 620, and a computer program 611 stored in the memory 610 and capable of running on the processor 620. When the computer program 611 is executed by the processor, it implements the various processes of the above-described script asset extraction and index generation method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0067] This application also provides a computer-readable storage medium, see embodiments thereof. Figure 7The computer-readable storage medium 700 provides a computer program 611 stored on it. When the computer program 611 is executed by the processor, it implements the various processes of the above-described script asset extraction and index generation method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0068] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0069] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to these processes, methods, products, or devices. The division of modules in the embodiments of this application is merely a logical division; in actual applications, there may be other division methods. For example, multiple modules may be combined into or integrated into another system, or some features may be ignored or not performed. Additionally, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interface, and the indirect coupling or communication connection between modules may be electrical or other similar forms, none of which are limited in the embodiments of this application. Furthermore, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed among multiple circuit modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of this application.

[0070] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0071] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0072] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or modules through some interfaces, and may be electrical, mechanical, or other forms.

[0073] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0074] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0075] In the above embodiments, the implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, in the form of a computer program product.

[0076] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0077] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0078] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes; these computer program instructions may also be loaded onto a computer or other programmable data processing terminal equipment to cause a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0079] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0080] Finally, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0081] The technical solutions provided in the embodiments of this application have been described in detail above. Specific examples have been used in the embodiments of this application to illustrate the principles and implementation methods of the embodiments of this application. The description of the above embodiments is only for the purpose of helping to understand the methods and core ideas of the embodiments of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the embodiments of this application. Therefore, the content of this specification should not be construed as a limitation on the embodiments of this application.

Claims

1. A method for script asset extraction and index generation, characterized in that, The method includes: Obtain the script file, split the script file into independent texts for each episode, and group the independent texts of multiple episodes into several batches of texts; The system invokes a pre-defined large language model in parallel to extract asset structured data from each batch of text; the asset structured data includes the names of each asset entity, and the names include aliases and canonical names; If an alias of an asset entity appears as an independent name in the preset directed relationship graph, then the alias of the asset entity is used as the child node and the standard name of the asset entity is used as the parent node, and the preset directed relationship graph is updated. Based on the updated preset directed relationship graph, index records are generated for different names of the same asset entity.

2. The method according to claim 1, characterized in that, The process of splitting the script file into independent texts for each episode, and grouping these independent texts into several batches of text, includes: Identify specific segmented text in the script file, and based on the specific segmented text, split the script file into independent texts in units of episodes to obtain independent texts for each episode; Multiple independent texts are merged into a single batch according to a preset fixed step size, resulting in several batches of text; each batch of text contains spliced ​​text obtained by splicing according to the corresponding episode number.

3. The method according to claim 1, characterized in that, In the preset directed graph, each node name corresponds to a unique node, and the method further includes: Get a list of aliases for each asset entity; Traverse the alias list, and when an alias of an asset entity has appeared as a node name in the preset relationship diagram or in subsequent batch text, determine that the alias of the asset entity appears as an independent name.

4. The method according to claim 3, characterized in that, The asset entities include item entities and character entities; if an asset entity has an alias appearing as an independent name in the preset directed relationship graph, then the preset directed relationship graph is updated with the alias as the child node and the standard name of the asset entity as the parent node, including: For the item entity or the character entity, if an alias of the item entity or the character entity has appeared as an independent name in the preset directed relationship graph, then the alias of the item entity or the character entity is used as the child node, and the standard name of the item entity or the character entity is used as the parent node. A directed edge is established from the parent node to the child node, and the relevant data of the child node is merged upward to the parent node according to the preset metadata merging rules to update the preset directed relationship graph.

5. The method according to claim 3 or 4, characterized in that, The asset entity includes scene location entities; the step of updating the preset directed relationship graph by using the alias of an asset entity as a child node and the standard name of the asset entity as the parent node if an alias of a certain asset entity appears as an independent name in the preset directed relationship graph further includes: For the scene location entity, if a sub-region name appears as an alias for another scene in a subsequent batch of text, then the sub-region name is taken as the child node, the main landmark corresponding to the sub-region name is taken as the parent node, a directed edge is established from the parent node to the child node, and a mapping relationship containing the sub-region name and the main landmark is established based on the directed edge. Related data with the same mapping relationship are merged upward to the parent node according to the preset metadata merging rules, so as to update the preset directed relationship graph.

6. The method according to claim 1, characterized in that, The process of generating index records for different names of the same asset entity based on the updated preset directed relation graph includes: Sort and output index records containing all data on the corresponding alias chain based on the root node or primary landmark in the updated preset directed graph; wherein, the root node includes the parent node and all nodes that do not have a parent node.

7. The method according to claim 1 or 6, characterized in that, The method further includes: The preset large language model is invoked to perform global deduplication and merging of the index records, resulting in the final index output.

8. A script asset extraction and index generation device, characterized in that, The device includes: The text splitting module is used to obtain the script file, split the script file into independent text for each episode, and group the independent text for multiple episodes into several batches of text; The asset data extraction module is used to call a preset large language model in parallel to extract asset structured data from each batch of text; the asset structured data includes the names of each asset entity, and the names include aliases and standard names; The directed graph update module is used to update the preset directed graph when an alias of an asset entity appears as an independent name in the preset directed graph, with the alias of the asset entity as the child node and the standard name of the asset entity as the parent node. The index generation module is used to generate index records for different names of the same asset entity based on the updated preset directed relationship graph.

9. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the script asset extraction and indexing generation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the script asset extraction and index generation method as described in any one of claims 1 to 7.