Scenario and video content matching method and device, electronic equipment and storage medium

By extracting dialogue data from video content and using a large language model and sliding window algorithm to accurately match scripts with video content, the problem of time-consuming and labor-intensive traditional methods is solved, and standardized script evaluation is achieved.

CN120873622APending Publication Date: 2025-10-31BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510848109.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-10-31

Smart Images

  • Figure CN120873622A_ABST
    Figure CN120873622A_ABST
Patent Text Reader

Abstract

The invention relates to a script and video content matching method and device, electronic equipment and a storage medium, and the method comprises the steps: firstly carrying out the preliminary matching of a target sub-script and dialogue data, and obtaining first dialogue data matched with a first sub-script which is successfully preliminarily matched; the target matching range of the second sub-script is determined according to the boundary of the dialogue index corresponding to the first sub-script of the adjacent session of the second sub-script which fails in preliminary matching, so that the matching success rate of the second sub-script can be greatly improved due to the fact that the matching range of the second sub-script is reduced; and finally, according to the corresponding relationship between the first sub-script and the first dialogue data and the corresponding relationship between the second sub-script and the second dialogue data, a final matching result of the script and the video content is determined, accurate matching of the script and the video content is realized, and data support is provided for analysis and evaluation of the script.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of multimedia intelligent processing technology, and in particular to a method, apparatus, electronic device, and storage medium for matching scripts and video content. Background Technology

[0002] With the rapid development of online video platforms, the quality assessment and analysis of massive online video resources, such as TV dramas, has become particularly important. In the production and broadcasting of TV dramas, the script, as the core basis for creation, directly impacts the final presentation. However, the traditional method of relying on the subjective judgment of professionals to evaluate scripts is not only time-consuming and labor-intensive but also lacks a standardized and quantifiable evaluation system. Therefore, there is currently a lack of a mapping mechanism that accurately matches scripts with video content, making it impossible to provide data support for script evaluation. Summary of the Invention

[0003] This application provides a method, apparatus, electronic device, and storage medium for matching scripts with video content, in order to solve the technical problem of how to accurately match scripts with video content.

[0004] Firstly, this application provides a method for matching scripts with video content, the method comprising:

[0005] Dialogue data is extracted from video content shot based on a shooting script; wherein the shooting script includes multiple target sub-scripts divided by scene.

[0006] The target sub-script is initially matched with the dialogue data to filter out the first dialogue data that matches the first sub-script; wherein, the first sub-script includes the scenes that were initially matched in the target sub-script;

[0007] Based on the boundaries of the dialogue index corresponding to the first sub-script in scenes adjacent to the second sub-script, determine the target matching range for each second sub-script, and filter the second dialogue data that matches the second sub-script within the target matching range until all second sub-scripts are successfully matched; wherein, the second sub-script includes at least the scenes in the target sub-script that initially failed to match;

[0008] The final matching result between the script and the video content is determined based on the correspondence between the first sub-script and the first dialogue data, and the correspondence between the second sub-script and the second dialogue data.

[0009] Optionally, determining the final matching result between the script and the video content based on the correspondence between the first sub-script and the first dialogue data, and the correspondence between the second sub-script and the second dialogue data, includes:

[0010] Based on the correspondence between the first sub-script and the first dialogue data, and the correspondence between the second sub-script and the second dialogue data, determine the gap index and overlap index between every two adjacent scenes; wherein, the gap index is not included in the correspondence, and the overlap index appears at least twice in the correspondence;

[0011] Based on the dialogue content corresponding to the gap index and the dialogue content corresponding to the overlap index, the first sub-script and the second sub-script are supplemented and matched to obtain the correspondence between the third sub-script and the third dialogue data.

[0012] Obtain the episode videos of the video content;

[0013] The dialogue content at the beginning and end of the episode video is matched, and the correspondence between the third sub-script and the third dialogue data is updated to obtain the final matching result between the script and the video content.

[0014] Optionally, the target sub-script is initially matched with the dialogue data to filter out the first dialogue data that matches the first sub-script, including:

[0015] The dialogue data is divided according to a preset duration to obtain a time-series-based dialogue set; wherein, the dialogue data includes at least a dialogue index, dialogue content, and timestamp information;

[0016] The dialogue content of the target window length is extracted from the dialogue set and then subjected to sliding window matching in the target sub-script to obtain multiple matching data corresponding to the target sub-script; wherein, the matching data is the matching data between the dialogue content of the target window length and the script fragment, the matching data carries a dialogue index, and the target window length includes at least one dialogue index;

[0017] The matching data is merged according to the dialogue index. If all script fragments of the target sub-script are successfully matched, the first dialogue data matched by the first sub-script is determined based on the merged matching data. The first dialogue data carries the timestamp information of the start and end of the dialogue.

[0018] Optionally, dialogue content of the target window length extracted from the dialogue set is sequentially subjected to sliding window matching in the target sub-script to obtain multiple matching data corresponding to the target sub-script, including:

[0019] Obtain the matching order of the target sub-scripts;

[0020] Extract dialogue content of the target window length from the dialogue set, and perform sliding window matching in the target sub-script according to the matching order;

[0021] If no script segment matching the dialogue content is found in N consecutive target sub-scripts, the matching order is readjusted, and sliding window matching is performed in the target sub-scripts according to the adjusted matching order to obtain multiple matching data corresponding to the target sub-scripts.

[0022] Optionally, the matching data is merged according to the dialogue index, including:

[0023] Find the first and second matching data that overlap in the dialogue index;

[0024] If the first start index of the first matching data is less than the second start index of the second matching data, and the first end index of the first matching data is less than the second end index of the second matching data, then the first matching data and the second matching data are merged to obtain merged matching data; wherein, the start index of the merged matching data is the first start index, and the end index of the merged matching data is the second end index;

[0025] Repeat the steps of finding overlapping first and second matching data in the whitespace index, and merging the first and second matching data to obtain merged matching data, until there is no overlapping first and second matching data in the whitespace index.

[0026] Optionally, based on the boundaries of the dialogue index corresponding to the first sub-script in scenes adjacent to the second sub-script, a target matching range for each second sub-script is determined, and second dialogue data matching the second sub-script is filtered within the target matching range until all second sub-scripts are successfully matched, including:

[0027] From the first sub-script, determine two adjacent sub-scripts whose scenes are adjacent to the second sub-script;

[0028] The target matching range of the second sub-script is determined based on the boundaries of the dialogue indexes corresponding to the two adjacent sub-scripts;

[0029] Within the target matching range, the second dialogue data corresponding to the second sub-script is matched iteratively by maximizing similarity until all second sub-scripts are successfully matched.

[0030] Optionally, based on the dialogue content corresponding to the gap index and the dialogue content corresponding to the overlap index, supplementary matching is performed on the first sub-script and the second sub-script to obtain the correspondence between the third sub-script and the third dialogue data, including:

[0031] When the number of gap indices exceeds a first preset threshold, a prompt message is constructed based on the dialogue content corresponding to the gap index.

[0032] Based on the prompt message and the preset analysis model, the gap index is supplemented and matched to the first sub-script or the second sub-script adjacent to the gap index;

[0033] Determine the two adjacent sessions corresponding to the overlap index;

[0034] Delete the overlap index and the corresponding dialogue content from the later sub-script of two adjacent scenes;

[0035] The first sub-script and the second sub-script, after processing the gap index and the overlap index, are taken as the third sub-script, and the third dialogue data corresponding to the third sub-script is determined to obtain the correspondence between the third sub-script and the third dialogue data.

[0036] Optionally, the dialogue content at the beginning and end of the episode video is matched, and the correspondence between the third sub-script and the third dialogue data is updated to obtain the final matching result between the script and the video content, including:

[0037] Determine the end time and start time of the episode dialogue in the episode video;

[0038] The script start time and script end time of the third sub-script corresponding to the episode video are determined based on the correspondence between the third sub-script and the third dialogue data.

[0039] If the difference between the start time of the script and the start time of the episode dialogue is greater than the second preset duration, then the episode video is supplemented and matched according to the sub-script corresponding to the previous episode video.

[0040] If the difference between the end time of the episode dialogue and the end time of the script is greater than the second preset duration, then the episode video is supplemented and matched according to the sub-script corresponding to the next episode video;

[0041] The correspondence between the third sub-script and the third dialogue data is updated based on the results of the supplementary matching to obtain the final matching result between the script and the video content.

[0042] Optionally, the method further includes:

[0043] Obtain the satisfaction level of segmented playback of video content;

[0044] Based on the segmented playback satisfaction and the final matching result, the segmented evaluation result of the script is determined.

[0045] Secondly, this application provides a script and video content matching device, the device comprising:

[0046] The dialogue data extraction module is used to extract dialogue data from video content shot based on a shooting script; wherein, the shooting script includes multiple target sub-scripts divided by scene;

[0047] The first matching module is used to perform a preliminary match between the target sub-script and the dialogue data, and filter out the first dialogue data that matches the first sub-script; wherein, the first sub-script includes the scenes that were initially matched in the target sub-script;

[0048] The second matching module is used to determine the target matching range for each second sub-script based on the boundary of the dialogue index corresponding to the first sub-script in the scenes adjacent to the second sub-script, and to filter the second dialogue data that matches the second sub-script within the target matching range until all second sub-scripts are successfully matched; wherein, the second sub-script includes at least the scenes in the target sub-script that initially failed to match;

[0049] The determining module is used to determine the final matching result between the script and the video content based on the correspondence between the first sub-script and the first dialogue data and the correspondence between the second sub-script and the second dialogue data.

[0050] 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;

[0051] Memory, used to store computer programs;

[0052] When a processor executes a program stored in memory, it implements the script and video content matching method described in any embodiment of the first aspect.

[0053] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the script and video content matching method as described in any embodiment of the first aspect.

[0054] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application extracts dialogue data from video content shot based on a shooting script; wherein the shooting script includes multiple target sub-scripts divided by scene; the target sub-scripts are initially matched with the dialogue data to filter out first dialogue data that matches the first sub-script; wherein the first sub-script includes scenes that were initially matched successfully in the target sub-scripts; based on the boundary of the dialogue index corresponding to the first sub-script in scenes adjacent to the second sub-script, the target matching range of each second sub-script is determined, and second dialogue data that matches the second sub-script is filtered within the target matching range until all second sub-scripts are successfully matched; wherein the second sub-script includes at least scenes that were initially matched but failed in the target sub-scripts; the final matching result between the script and the video content is determined based on the correspondence between the first sub-script and the first dialogue data and the correspondence between the second sub-script and the second dialogue data. This method first performs a preliminary match between the target sub-script and the dialogue data to obtain the first dialogue data of the first sub-script that has a preliminary match. Then, it determines the target matching range of the second sub-script according to the boundary of the dialogue index of the first sub-script in the adjacent scenes of the second sub-script that failed the preliminary match. Since the matching range of the second sub-script is narrowed, the matching success rate of the second sub-script can be greatly improved. Finally, the final matching result between the script and the video content is determined based on the correspondence between the first sub-script and the first dialogue data and the correspondence between the second sub-script and the second dialogue data. This achieves accurate matching between the script and the video content and provides data support for the analysis and evaluation of the script. Attached Figure Description

[0055] 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.

[0056] 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.

[0057] 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.

[0058] Figure 1 A system architecture diagram of a script and video content matching method provided in one embodiment of this application;

[0059] Figure 2 A flowchart illustrating a script and video content matching method provided in one embodiment of this application;

[0060] Figure 3 A flowchart illustrating a script and video content matching method provided in another embodiment of this application;

[0061] Figure 4 A schematic diagram of the structure of a script and video content matching device provided in one embodiment of this application;

[0062] Figure 5 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation

[0063] 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.

[0064] 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.

[0065] With the rapid development of online video platforms, the quality assessment and analysis of massive online video resources, such as TV dramas, has become particularly important. In the production and broadcasting of TV dramas, the script, as the core basis for creation, directly impacts the final presentation. However, the traditional method of relying on the subjective judgment of professionals to evaluate scripts is not only time-consuming and labor-intensive but also lacks a standardized and quantifiable evaluation system. Therefore, there is currently a lack of a mapping mechanism that accurately matches scripts with video content, making it impossible to provide data support for script evaluation.

[0066] To address the technical challenge of accurately matching scripts with video content in existing technologies, this application provides a method, apparatus, electronic device, and storage medium for matching scripts with video content. This enables precise matching of scripts and video content, providing data support for script analysis and evaluation. The main focus of this application is establishing a precise correspondence between the written form of a television drama script and the actual broadcast video content. This is analogous to creating a page number and time mapping for a book and a movie, allowing us to easily find "where the content described on page 10 of the book appears in the movie." Once this correspondence is established, we can further analyze audience reactions to different parts of the script, thereby evaluating the script's quality.

[0067] Traditional methods struggle to accurately match scripts with video content, primarily due to the following reasons:

[0068] First, actors often don't recite the script verbatim; they may improvise or adjust their expressions. Second, the scene divisions in the script don't directly correspond to the actual video playback time. Finally, manual matching is a huge workload and prone to errors.

[0069] The first embodiment of this application provides a method for matching scripts with video content, which can be applied to, for example... Figure 1 The system architecture shown includes at least a data acquisition module 101 and a data processing module 102, which establish a communication connection.

[0070] Next, based on this system architecture, the method for matching scripts with video content will be explained in detail, such as... Figure 2 The method for matching the script with video content includes:

[0071] Step 201: Extract dialogue data from video content shot based on a shooting script; wherein, the shooting script includes multiple target sub-scripts divided by scene.

[0072] The video content could be a television series based on a shooting script. The shooting script is the original script text of the television series. The shooting script is divided into multiple scenes according to the timeline or storyline of the story. Each scene's script can be called a target sub-script or simply a scene. The dialogue data extracted from the video content can contain JSON (JavaScript Object Notation) data of the dialogue information. The JSON data can include dialogue index, character name, dialogue content, and timestamp information.

[0073] Step 202: Perform preliminary matching between the target sub-script and the dialogue data, and filter out the first dialogue data that matches the first sub-script; wherein, the first sub-script includes the scenes that were initially matched in the target sub-script.

[0074] During the initial matching process, a Large Language Model (LLM) can be used to match the target sub-script with the dialogue data. For example, the content of the target sub-script can be input, and the LLM model can be used to find the first dialogue data that matches the target sub-script.

[0075] In one embodiment, preliminary matching of the target sub-script with dialogue data is performed to filter out the first dialogue data that matches the first sub-script. This includes: segmenting the dialogue data according to a preset duration to obtain a time-seriesd dialogue set; wherein the dialogue data includes at least a dialogue index, dialogue content, and timestamp information; extracting dialogue content of a target window length from the dialogue set and sequentially performing sliding window matching on the target sub-script to obtain multiple matching data corresponding to the target sub-script; wherein the matching data is the matching data between dialogue content of the target window length and script fragments, and the matching data carries a dialogue index, and the target window length includes at least one dialogue index; merging the matching data according to the dialogue index, and if all script fragments of the target sub-script are successfully matched, then determining the first dialogue data matching the first sub-script based on the merged matching data; wherein the first dialogue data carries timestamp information for the start and end of the dialogue.

[0076] In this embodiment, a time-grouping strategy can be used to group dialogue data according to a preset duration at fixed time intervals (e.g., 300 seconds) to obtain a time-series-based dialogue set. This grouping method enables the system to process large amounts of dialogue data more efficiently in subsequent matching processes. The initial matching algorithm can employ a sliding window matching algorithm, extracting a small segment of dialogue data for matching each time. For example, on the timeline, it can slide with a step size of step_size, extracting a subset of dialogue data of the target window length window_size for matching in the target sub-script, thereby obtaining multiple matching data corresponding to the target sub-script. The matching data is then merged according to the dialogue index. If all script fragments contained in the target sub-script are successfully matched, the merged matching data is based on the first dialogue data corresponding to the target sub-script. The target sub-script that has been initially matched can also be called the first sub-script. Since the dialogue data contains timestamps and dialogue indices, the first dialogue data carries the timestamp of the dialogue start, the timestamp of the dialogue end, and includes the number of dialogue indices and the dialogue content corresponding to each dialogue index. Of course, it also includes the character information of each dialogue content.

[0077] In this embodiment, during sliding window matching, within each window, the semantic understanding capability of the LLM model can be utilized to determine whether a scene from the script appears in the current dialogue data window. A specific prompt template can be constructed, filling in the scene content and the dialogue content of the current window, and then querying the LLM to determine if the scene appears in these dialogues. If so, it should indicate the specific start and end positions. The matching results are output in a standardized JSON format: {is_success: true / false, start_index: x, end_index: y}, thus obtaining the matching data.

[0078] In one embodiment, dialogue content of the target window length is extracted from the dialogue set and then subjected to sliding window matching in the target sub-script to obtain multiple matching data corresponding to the target sub-script. This includes: obtaining the matching order of the target sub-script; extracting dialogue content of the target window length from the dialogue set and performing sliding window matching in the target sub-script according to the matching order; if no script segment matching the dialogue content is found in N consecutive target sub-scripts, the matching order is readjusted, and sliding window matching is performed in the target sub-script according to the adjusted matching order to obtain multiple matching data corresponding to the target sub-script.

[0079] In this embodiment, the matching order of the target sub-scripts can be obtained first. To improve matching efficiency, an early termination strategy can be set. When performing sliding window matching according to the matching order, if n consecutive scenes (e.g., n=5) fail to match, it may be that the search position has deviated from the correct path, requiring adjustment of the matching order, i.e., adjusting the starting point of the next match. The adjustment formula can be as follows:

[0080]

[0081] `next_start_index` represents the starting point of the next match. If the calculated sum is ≥ 5, it indicates a clear mismatch in this interval, and the system jumps forward 4 scenes as the new starting point. It should be understood that when intervals are clearly mismatched, the system can set the number of scenes to jump forward or backward without restriction. In this embodiment, due to the design of a sliding window algorithm with an early termination strategy, potential matching positions can be efficiently located in massive amounts of dialogue data, significantly reducing computational complexity and enabling the system to complete the processing of large-scale episodes within a reasonable time.

[0082] In one embodiment, merging matching data according to the dialogue index includes: finding first and second matching data with overlapping dialogue indexes; if the first start index of the first matching data is less than the second start index of the second matching data, and the first end index of the first matching data is less than the second end index of the second matching data, then merging the first and second matching data to obtain merged matching data; wherein, the start index of the merged matching data is the first start index, and the end index of the merged matching data is the second end index; repeating the step of finding first and second matching data with overlapping dialogue indexes until merging the first and second matching data to obtain merged matching data, until there are no more first and second matching data with overlapping dialogue indexes.

[0083] In this embodiment, since the sliding window matching strategy may result in multiple matching results for the same event in different windows (the window slides step by step, and the same event may be detected in multiple consecutive windows), generating multiple candidate matching ranges, this embodiment designs a result merging and conflict resolution mechanism to determine which matching data should be merged.

[0084] The basic merge algorithm can work as follows:

[0085] For each new match result (i.e., match data), the system checks whether it is "close" to an existing match data or a merged group of multiple match data.

[0086] The criteria for judging "closeness" are:

[0087] The starting position of the new matching result should not differ from the earliest starting position of the existing merged group by more than 10 dialogue indices, and the ending position of the new matching result should not differ from the latest ending position of the existing merged group by more than 10 dialogue indices.

[0088] If the match is "close," the new match is added to an existing merge group. If the match is not "close" to any existing group, a new merge group is created.

[0089] For example: Suppose a scene already has one matching result, with a dialogue index range of 20-30. Now a new matching result is found, with a range of 25-35. Since |25-20|=5<10 and |35-30|=5<10, these two results are considered "close" and should be merged into one group. The merged dialogue index range will be 20-35.

[0090] However, sometimes multiple merged groups may appear with similar matching frequencies (for example, a scene may have multiple matches in two completely different locations). In such cases, the system cannot determine which match is correct based solely on frequency. Therefore, a Large Language Model (LLM) can be used for semantic analysis, allowing AI to determine which matching range is more reasonable based on the plot content, thereby resolving the conflict.

[0091] Finally, the system converts the matched dialogue indexes into specific timestamps and dialogue content. For each successfully matched first sub-script, its start time (start_time) and end time (end_time) can be calculated, and the complete dialogue text within the corresponding range can be extracted.

[0092] Step 203: Based on the boundary of the dialogue index corresponding to the first sub-script in the scene adjacent to the second sub-script, determine the target matching range for each second sub-script, and filter the second dialogue data that matches the second sub-script within the target matching range until all second sub-scripts are successfully matched; wherein, the second sub-script includes at least the scenes in the target sub-script that initially failed to match.

[0093] In this embodiment, the target matching range for each second sub-script can be determined based on the boundary of the dialogue index corresponding to the first sub-script in scenes adjacent to the second sub-script. Second dialogue data matching the second sub-script is then filtered within the target matching range. This narrows the matching range of the second sub-script, significantly improving the matching success rate. Specifically, after initial matching, the accuracy of the first sub-script's matching can be checked using a large model. First sub-scripts deemed inaccurate by the large model can be included in the second sub-script for re-matching. In other words, the second sub-script can include scenes from the target sub-script that initially failed to match, or scenes from the target sub-script that initially matched successfully but failed the check.

[0094] For example, a dedicated prompt template can be built to guide the LLM in understanding the task objective. The dialogue and scene content are filled into the prompt template, and the system is asked, "Does this dialogue match the scene description?" The LLM returns the result (0 for no match, 1 for match) and the reason for the judgment. For scenes that fail to match or have an unreasonable match, the system re-matches. Re-matching first determines the search boundaries by looking backward to obtain the last-end index of the previous scene's dialogue and looking forward to obtain the next-start index of the next scene's dialogue. This way, the system knows the search range for the current scene and then re-executes the matching within this newly defined range, thereby improving the matching efficiency of the second sub-script.

[0095] In one embodiment, the target matching range for each second sub-script is determined based on the boundary of the dialogue index corresponding to the first sub-script in scenes adjacent to the second sub-script, and second dialogue data matching the second sub-script is filtered within the target matching range until all second sub-scripts are successfully matched. This includes: determining two adjacent sub-scripts in scenes adjacent to the second sub-script from the first sub-script; determining the target matching range for the second sub-script based on the boundary of the dialogue index corresponding to the two adjacent sub-scripts; and iteratively matching the second dialogue data corresponding to the second sub-script within the target matching range using maximum similarity until all second sub-scripts are successfully matched.

[0096] In this embodiment, two adjacent sub-scripts with scenes adjacent to the second sub-script are determined from the first sub-script; the target matching range of the second sub-script is determined based on the boundaries of the dialogue indexes corresponding to the two adjacent sub-scripts; within the target matching range, the second dialogue data corresponding to the second sub-script is matched using maximum similarity iteration until all second sub-scripts are successfully matched. The maximum similarity iteration matching can be expressed mathematically as follows:

[0097] For each session S i , find (i start i end ), such that the maximum similarity is max Similarity(S) i ,T[i start :i end ]),satisfy:

[0098] last_end_index-δ≤i start ≤i end ≤next_start_index+δ

[0099] Where δ represents the allowable overlap tolerance (e.g., it can be set to 5), indicating that a small amount of overlap with adjacent scenes is allowed. The system can employ an iterative optimization matching strategy: R i+1 =rematch(judge_match(R) i Through multiple rounds of judgment and rematching, the matching accuracy is continuously improved. Among them, R... i This represents the matching result in the i-th round. Each round improves upon the result of the previous round until a satisfactory matching quality is achieved or the maximum number of iterations is reached.

[0100] Let's use a concrete example to explain this rematching process:

[0101] Suppose there is a TV series script containing 10 scenes (numbered 1-10). After initial matching, scenes 2, 3, 5, 6, 8, and 10 successfully match the corresponding dialogue (here, dialogue is referred to as lines), while scenes 1, 4, 7, and 9 fail to match or the results are unreasonable. At this point, scenes 2, 3, 5, 6, 8, and 10 are the first sub-script, and scenes 1, 4, 7, and 9 are the second sub-script.

[0102] We now need to rematch session 4. The system will determine the search boundaries:

[0103] Find the most recent successfully matched scene: scene 3, whose end line index is 150 (last_end_index = 150);

[0104] Find the most recent successfully matched scene: scene 5, whose starting line index is 180 (next_start_index = 180).

[0105] You can set a tolerance for overlap of 5 lines (δ=5), in which case the search range is: line index 145 (150-5) to 185 (180+5).

[0106] Next, re-execute the matching within the range of 145-185:

[0107] The system searches for the best matching position so that the content of scene 4 has the greatest similarity to the lines [i_start:i_end]. It is assumed that the best match is between lines index 155 and 175.

[0108] This process can be represented as: finding i_start and i_end such that scene 4 has the maximum similarity to the dialogue [i_start:i_end], and satisfying 145≤i_start <i_end≤185。

[0109] For example, regarding iterative optimization strategies:

[0110] Round 1 (R1): Initial matching results: 6 matches were successfully matched, and 4 matches failed;

[0111] Round 2 (R2): Rematch the failed matches. Assume that matches 4 and 7 are successfully matched, while matches 1 and 9 are still unsuccessful.

[0112] Round 3 (R3): With more successful matches as reference points, the search range is more precise. In this round, match 1 was successful, while match 9 still failed.

[0113] Round 4 (R4): Last attempt, match number 9 was also successfully matched.

[0114] Since each round improves upon the results of the previous round, as the number of successfully matched matches increases, the system's search range for the remaining matches becomes more precise, increasing the probability of successful matching and making the matching results more accurate.

[0115] Step 204: Determine the final matching result between the script and the video content based on the correspondence between the first sub-script and the first dialogue data, and the correspondence between the second sub-script and the second dialogue data.

[0116] This method first performs a preliminary match between the target sub-script and the dialogue data to obtain the first dialogue data of the first sub-script that has a preliminary match. Then, it determines the target matching range of the second sub-script according to the boundary of the dialogue index of the first sub-script in the adjacent scenes of the second sub-script that failed the preliminary match. Since the matching range of the second sub-script is narrowed, the matching success rate of the second sub-script can be greatly improved. Finally, the final matching result between the script and the video content is determined based on the correspondence between the first sub-script and the first dialogue data and the correspondence between the second sub-script and the second dialogue data. This achieves accurate matching between the script and the video content and provides data support for the analysis and evaluation of the script.

[0117] In one embodiment, determining the final matching result between the script and the video content based on the correspondence between the first sub-script and the first dialogue data, and the correspondence between the second sub-script and the second dialogue data, includes: determining the gap index and overlap index between every two adjacent scenes based on the correspondence between the first sub-script and the first dialogue data, and the correspondence between the second sub-script and the second dialogue data; wherein the gap index is not included in the correspondence, and the overlap index appears at least twice in the correspondence; performing supplementary matching on the first and second sub-scripts based on the dialogue content corresponding to the gap index and the dialogue content corresponding to the overlap index to obtain the correspondence between the third sub-script and the third dialogue data; obtaining the episode videos of the video content; matching the dialogue content at the beginning and end of the episode videos, and updating the correspondence between the third sub-script and the third dialogue data to obtain the final matching result between the script and the video content.

[0118] In this embodiment, after obtaining the correspondence between the first sub-script and the first dialogue data, and the correspondence between the second sub-script and the second dialogue data, the boundary issues between sub-scripts can be further processed. The gaps and overlaps at the scene boundaries are processed, and the cross-set matching problem is handled. Specifically, based on the correspondence between the first sub-script and the first dialogue data, and the correspondence between the second sub-script and the second dialogue data, the gap index and overlap index between each two adjacent scenes are determined. Based on the dialogue content corresponding to the gap index and the dialogue content corresponding to the overlap index, the first sub-script and the second sub-script are supplemented and matched to obtain the correspondence between the third sub-script and the third dialogue data. The episode videos of the video content are obtained. The dialogue content at the beginning and end of the episode videos is matched, and the correspondence between the third sub-script and the third dialogue data is updated to obtain the final matching result between the script and the video content.

[0119] Next, we will explain in detail the handling of gaps and overlaps at the boundaries of the scenes, as well as the cross-set matching process.

[0120] In one embodiment, based on the dialogue content corresponding to the gap index and the dialogue content corresponding to the overlap index, the first sub-script and the second sub-script are supplemented and matched to obtain the correspondence between the third sub-script and the third dialogue data. This includes: when the number of gap indices is greater than a first preset threshold, constructing a prompt message based on the dialogue content corresponding to the gap index; supplementing and matching the gap index to the first or second sub-script adjacent to the gap index based on the prompt message and a preset analysis model; determining the two adjacent scenes corresponding to the overlap index; deleting the overlap index and the dialogue content corresponding to the overlap index from the later sub-scripts in the two adjacent scenes; taking the first and second sub-scripts after processing the gap index and the overlap index as the third sub-script, and determining the third dialogue data currently corresponding to the third sub-script to obtain the correspondence between the third sub-script and the third dialogue data.

[0121] In this embodiment, all scenes (i.e., sub-scripts) are first traversed to check for large gaps or overlaps in dialogue between adjacent scenes. If the gap exceeds a first preset threshold (e.g., 3), it indicates a large unmatched or overlapping area, requiring readjustment. The system extracts all dialogue from the start index of the current scene to the end index of the next scene, constructs prompt information, and calls the LLM model for analysis. The prompt information could be: "There are two scenes and their dialogue; please help me determine the exact boundaries of each scene." The LLM analyzes the correspondence between scene content and dialogue content and returns a new matching range.

[0122] The system parses the returned JSON result, obtains the new matching range, and updates the range information of the dialogue content for the scene (start index, end index, start time, end time, etc.). At the same time, it reconstructs the text content of the scene, including character names and dialogue content.

[0123] After handling the gap issue, the system iterates through all scenes again to specifically address any potential dialogue overlap.

[0124] When overlap is detected (the end index of the current session is greater than the start index of the next session), the system's overlap handling strategy can be to assign the overlapping portion to the previous session, and the next session will begin after the overlap ends. This ensures that each line belongs to only one session, avoiding content duplication.

[0125] Let's use a concrete example to explain the boundary handling process when there are gaps and overlaps:

[0126] Suppose there are two adjacent sessions: session A and session B. After the initial matching and rematching in the first two stages, session A is matched with dialogue indices of 100-130, and session B is matched with dialogue indices of 140-170.

[0127] Example of gap handling:

[0128] In this example, there is a gap of 9 lines between the end index (130) of scene A and the start index (140) of scene B (140). Since the gap is greater than 3, it is considered a large gap that needs to be addressed.

[0129] Processing steps:

[0130] The system extracts all dialogue content from session A to session B, meaning the index range for the dialogue content is 100-170.

[0131] Build a prompt message for the LLM:

[0132] Session A Description: [Content description of Session A]

[0133] Session B Description: [Content description of Session B]

[0134] Dialogue content: [All dialogue content from dialogue index 100-170, including character names and dialogue]

[0135] Please analyze the exact boundaries of the dialogue content for these two scenes and return the corresponding dialogue content index range for each scene.

[0136] For example, LLM returns the following after analysis:

[0137] {

[0138] "Session A": {"start_index": 100, "end_index": 135},

[0139] "Session B": {"start_index": 136, "end_index": 170}

[0140] }

[0141] The system updates the end index of session A to 135 and the start index of session B to 136, and recalculates the time range and text content of sessions A and B. In this embodiment, the LLM determines that among the 9 lines in the gap, the first 6 (indexes 131-135) should belong to session A, and the last 3 (indexes 136-139) should belong to session B, thus eliminating the gap.

[0142] Example of overlap processing:

[0143] Suppose another scenario: Session C matches dialogue indices 200-230, and Session D matches dialogue indices 225-250. There are 5 overlapping indices here (230-225+1=6).

[0144] Processing steps:

[0145] The system detected that the end index (230) of session C is greater than the start index (225) of session D, confirming that there is an overlap. The overlap processing strategy is applied: the overlapping part is assigned to the previous session.

[0146] Keep the range of session C unchanged (200-230), adjust the starting index of session D to 231 (i.e., the ending index of C + 1), and the new range of session D becomes 231-250. Recalculate the time range and text content of session D.

[0147] In this example, the lines that were originally indexed 225-230 were matched in two sessions at the same time. Now they belong only to session C, while session D starts from index 231, thus avoiding content duplication.

[0148] In one embodiment, the dialogue content at the beginning and end of the episode video is matched, and the correspondence between the third sub-script and the third dialogue data is updated to obtain the final matching result between the script and the video content. This includes: determining the end time and start time of the episode dialogue in the episode video; determining the start time and end time of the script of the third sub-script corresponding to the episode video based on the correspondence between the third sub-script and the third dialogue data; if the difference between the script start time and the episode dialogue start time is greater than a second preset duration, then the episode video is supplemented with matching based on the sub-script corresponding to the previous episode video; if the difference between the episode dialogue end time and the script end time is greater than a second preset duration, then the episode video is supplemented with matching based on the sub-script corresponding to the next episode video; and updating the correspondence between the third sub-script and the third dialogue data based on the result of the supplementary matching to obtain the final matching result between the script and the video content.

[0149] In this embodiment, there may be inconsistencies between the broadcast of a TV series and the writing of the script. For example, the end of one episode may contain the beginning of the next episode's script, or the beginning of one episode may contain the end of the previous episode's script. The system compares the time range of the dialogue in the episode's video with the time range of the matched script to determine whether it is necessary to search for scripts from adjacent episodes to supplement the match. If a significant time difference is found, the system will automatically determine whether the script of the previous or subsequent episode is needed and perform supplementary matching.

[0150] Specifically, the process involves determining the end and start times of the episode's dialogue in the episode video; determining the start and end times of the script for the third sub-script corresponding to the episode video based on the correspondence between the third sub-script and the third dialogue data; if the difference between the script start time and the episode's dialogue start time is greater than a second preset duration, then supplementing the episode video with the sub-script corresponding to the previous episode video; if the difference between the episode's dialogue end time and the script end time is greater than a second preset duration, then supplementing the episode video with the sub-script corresponding to the next episode video; and updating the correspondence between the third sub-script and the third dialogue data based on the supplementary matching results to obtain the final matching result between the script and the video content.

[0151] In this embodiment, the problem of time misalignment between TV drama dialogue and script is solved, such as the mismatch between script content and actual broadcast content at episode boundaries.

[0152] The system first determines the actual time range of the TV series dialogue: it searches for the last line with a character name from the end to the beginning and records its end time as tv_last_time; it searches for the first line with a character name from the beginning to the beginning and records its start time as tv_start_time. These two time points represent the start and end times of the valid dialogue in the episode video, respectively.

[0153] The system then determines the valid time range for script matching using a sliding window method. Specifically, a window with an index of size 3 slides across all scenes. When at least two scenes within the window match successfully, the start time of the first successful match and the end time of the last successful match are recorded. For example, the system ultimately obtains the earliest start time (match_start_time) and the latest end time (match_end_time) of all successfully matched scenes.

[0154] Next, the system compares the time range of the TV series dialogue with the time range of the matching script to determine whether the script of the previous or next episode is needed:

[0155] If match_start_time - tv_start_time > 60 seconds, you need to look for scripts earlier.

[0156] If tv_last_time - match_end_time > 60 seconds, you need to look for scripts further down the line.

[0157] If the time difference is small (less than 60 seconds), no additional script content is needed.

[0158] When the system determines that additional script is needed (e.g., content from the previous episode), it loads the corresponding script data and re-runs the processing flow of the first three stages to obtain the matching results for the additional script. Then, based on the direction of the time deviation (previous episode or subsequent episode), it intelligently merges the two matching results to ensure the coherence and completeness of the final result.

[0159] For example:

[0160] The system first determines the actual dialogue content time range of the current episode (e.g., 00:00:15-00:44:50), and then determines the time range covered by the successfully matched scripts (e.g., 00:01:20-00:43:20). By comparing these two time ranges, it can be found that 65 seconds of dialogue in the opening credits and 90 seconds of dialogue in the closing credits do not match any scripts. Because the difference exceeds 60 seconds, the system loads the script from the previous episode to match the unmatched portion of the opening credits, and loads the script from the next episode to match the unmatched portion of the closing credits. Finally, the three matching results are merged to form a complete matching list.

[0161] After the entire processing is completed, the system outputs the final matching results, including the identifier ID, dialogue content, matching status, index range, time range, and complete dialogue text for each scene. These results will be used for subsequent script quality assessment and analysis.

[0162] In this embodiment, the system is designed with a progressive refinement philosophy, with each step building upon the previous one to further improve matching accuracy. The system combines the efficiency of traditional algorithms with the semantic understanding capabilities of artificial intelligence, enabling it to handle the diversity and complexity of textual expressions. Ultimately, the system outputs the video segment and dialogue content corresponding to each scene of the script, providing a reliable data foundation for subsequent script quality evaluation.

[0163] The embodiments of this application not only consider the surface form of the text, but also the semantic content, contextual relationships and temporal coherence, so that the matching results are both accurate and reasonable, and can truly reflect the correspondence between the script and the video content.

[0164] In one embodiment, the method further includes: obtaining segmented playback satisfaction of video content; and determining segmented evaluation results of the script based on segmented playback satisfaction and the final matching result.

[0165] In this embodiment, after obtaining the final matching result between the script and the video content, the segmented playback satisfaction of the video content can be obtained after the TV series is played. For example, by analyzing the segmented playback satisfaction of each series through the bullet screen content, bullet screen density, or completion rate and interaction rate at different time periods during playback, the segmented playback satisfaction of each series can be analyzed. Based on the segmented playback satisfaction and the final matching result, the segmented evaluation result of the corresponding script can be determined, thereby achieving an objective and quantifiable quality evaluation of the script.

[0166] In the embodiments described above, the semantic understanding matching mechanism based on a large language model overcomes the limitations of traditional keyword or rule-based matching methods. Leveraging the powerful semantic understanding capabilities of LLM, it can accurately identify scenarios with similar content but different expressions, effectively solving the problem of discrepancies between actor dialogue and script text, and significantly improving matching accuracy. An adaptive sliding window search algorithm is proposed, and a sliding window algorithm with an early termination strategy is designed. This algorithm can efficiently locate potential matching positions in massive amounts of dialogue data, significantly reducing computational complexity and enabling the system to process large-scale episodes within a reasonable timeframe. A context-aware iterative optimization strategy is designed. By considering the matching situation of adjacent scenes, the system constructs globally consistent matching results and continuously corrects errors using a multi-round iterative optimization mechanism, improving overall matching quality and solving the errors that may result from isolated matching in traditional methods. Cross-episode intelligent matching and merging technology is adopted to solve the mismatch between the script and the actual broadcast at episode boundaries. Time deviation analysis automatically determines the direction of scripts that need to be supplemented and intelligently merges multiple matching results, ensuring the consistency and completeness of the matching.

[0167] And it can achieve the following effects:

[0168] 1. Content Quality Assessment: By accurately matching the script with the actual broadcast effect, the quality of different parts of the script can be assessed based on user viewing data (such as completion rate, interaction rate, and bullet screen density), providing data support for content creation.

[0169] 2. Intelligent editing and recommendation: Based on the matching results, the system can accurately locate the climax and trough of the series and automatically generate exciting clips or trailers to improve the accuracy of content recommendations.

[0170] 3. Content Tagging and Retrieval: Based on the matching results, metadata such as scene descriptions and emotional tags in the script can be mapped onto the video timeline, enhancing content retrieval capabilities and improving the user search experience.

[0171] 4. Enhanced interactive features: Script-based interactive features can be developed, such as plot prediction and character relationship graphs, to increase user engagement.

[0172] 5. Scriptwriting Assistance: By analyzing the relationship between the script characteristics of successful TV series and audience reactions, data-driven creative references are provided to creators. These applications will significantly enhance content analysis capabilities and user experience, giving video streaming platform companies a competitive edge.

[0173] In one specific embodiment, the script and video content matching method is as follows: Figure 3 ,include:

[0174] Step S1: Initially identify the corresponding relationships.

[0175] The system first divides the dialogue in the video into several groups based on time. Then, it uses a "sliding window" technique to search for parts within these dialogue groups that might match scenes from the script. This is analogous to holding a page from the script and sliding it bit by bit along the video's timeline, looking for similar content. To determine content similarity, the system not only compares the surface form of the text but also utilizes artificial intelligence (Large Language Model, LLM) to understand the semantic content of the text. Even if the expressions differ, as long as the meaning is similar, a match can be identified. This stage produces preliminary matching results, telling us roughly which time period in the video each scene in the script corresponds to.

[0176] Step S2: Check and improve the matching quality.

[0177] After the initial matching, the system checks the quality of each match. It again uses artificial intelligence to determine the accuracy of the match, much like having an expert review our work. For matches that fail to match or are not accurate enough, the system will rematch, but this time using known accurate matches as reference points to narrow down the search. For example, if we know that matches 3 and 5 have matched accurately, then match 4 should be somewhere between the two. In this way, the system can gradually improve the overall accuracy of the matching.

[0178] Step S3: Solve the field boundary problem.

[0179] In actual matching, two types of problems may arise between adjacent scenes: one is a "gap," where a line of dialogue is not matched between two scenes; the other is "overlap," where the same line of dialogue is matched in both scenes. The system detects these problems and readjusts the scene boundaries through intelligent analysis. For gaps, the system analyzes which scene the unmatched line should belong to; for overlaps, the system decides how to reasonably divide the overlapping part to ensure that each line of dialogue belongs to only one scene.

[0180] Step S4: Handle cross-set matching issues.

[0181] There are sometimes discrepancies between the broadcast of a TV series and the writing of the script. For example, the end of one episode might contain the beginning of the next episode's script, or the beginning of one episode might contain the end of the previous episode's script. The system compares the time range of the video dialogue with the time range of the matched scripts to determine whether it is necessary to search for scripts from adjacent episodes to supplement the match. If a significant time difference is found, the system will automatically determine whether the script of the previous or subsequent episode is needed and perform supplementary matching.

[0182] In this embodiment, through progressive refinement, each stage further improves the matching accuracy based on the previous stage. This combines the efficiency of traditional algorithms with the semantic understanding capabilities of artificial intelligence, enabling the handling of diverse and complex textual expressions. Ultimately, the system outputs the video time segment and dialogue content corresponding to each scene of the script, providing a reliable data foundation for subsequent script quality evaluation.

[0183] Based on the same technical concept, the second embodiment of this application provides a script and video content matching device, such as... Figure 4 The device includes:

[0184] The dialogue data extraction module 401 is used to extract dialogue data from video content shot based on a shooting script; wherein, the shooting script includes multiple target sub-scripts divided by scene.

[0185] The first matching module 402 is used to perform a preliminary matching between the target sub-script and the dialogue data, and to filter out the first dialogue data that matches the first sub-script; wherein, the first sub-script includes the scenes that were initially matched in the target sub-script;

[0186] The second matching module 403 is used to determine the target matching range of each second sub-script based on the boundary of the dialogue index corresponding to the first sub-script in the scenes adjacent to the second sub-script, and to filter the second dialogue data that matches the second sub-script within the target matching range until all second sub-scripts are successfully matched; wherein, the second sub-script includes at least the scenes in the target sub-script that initially failed to match;

[0187] The determining module 404 is used to determine the final matching result between the script and the video content based on the correspondence between the first sub-script and the first dialogue data and the correspondence between the second sub-script and the second dialogue data.

[0188] The device first performs a preliminary match between the target sub-script and the dialogue data to obtain the first dialogue data of the first sub-script that is initially matched successfully. Then, it determines the target matching range of the second sub-script according to the boundary of the dialogue index corresponding to the first sub-script in the adjacent scenes of the second sub-script that failed to match initially. By narrowing the matching range of the second sub-script, the matching success rate of the second sub-script can be greatly improved. Finally, the final matching result between the script and the video content is determined based on the correspondence between the first sub-script and the first dialogue data and the correspondence between the second sub-script and the second dialogue data. This achieves accurate matching between the script and the video content and provides data support for the analysis and evaluation of the script.

[0189] like Figure 5 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.

[0190] Memory 113 is used to store computer programs;

[0191] In one embodiment of this application, the processor 111, when executing the program stored in the memory 113, implements the script and video content matching method provided in any of the foregoing method embodiments.

[0192] 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.

[0193] The communication interface is used for communication between the aforementioned terminal and other devices.

[0194] 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.

[0195] 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.

[0196] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the script and video content matching method provided in any of the foregoing method embodiments.

[0197] 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.

[0198] 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.

[0199] 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.

[0200] 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.

[0201] 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 method for matching scripts with video content, characterized in that, The method includes: Dialogue data is extracted from video content shot based on a shooting script; wherein the shooting script includes multiple target sub-scripts divided by scene. The target sub-script is initially matched with the dialogue data to filter out the first dialogue data that matches the first sub-script; wherein, the first sub-script includes the scenes that were initially matched in the target sub-script; Based on the boundaries of the dialogue index corresponding to the first sub-script in scenes adjacent to the second sub-script, determine the target matching range for each second sub-script, and filter the second dialogue data that matches the second sub-script within the target matching range until all second sub-scripts are successfully matched; wherein, the second sub-script includes at least the scenes in the target sub-script that initially failed to match; The final matching result between the script and the video content is determined based on the correspondence between the first sub-script and the first dialogue data, and the correspondence between the second sub-script and the second dialogue data.

2. The method according to claim 1, characterized in that, The final matching result between the script and the video content is determined based on the correspondence between the first sub-script and the first dialogue data, and the correspondence between the second sub-script and the second dialogue data, including: Based on the correspondence between the first sub-script and the first dialogue data, and the correspondence between the second sub-script and the second dialogue data, determine the gap index and overlap index between every two adjacent scenes; wherein, the gap index is not included in the correspondence, and the overlap index appears at least twice in the correspondence; Based on the dialogue content corresponding to the gap index and the dialogue content corresponding to the overlap index, the first sub-script and the second sub-script are supplemented and matched to obtain the correspondence between the third sub-script and the third dialogue data. Obtain the episode videos of the video content; The dialogue content at the beginning and end of the episode video is matched, and the correspondence between the third sub-script and the third dialogue data is updated to obtain the final matching result between the script and the video content.

3. The method according to claim 1, characterized in that, The target sub-script is initially matched with the dialogue data to filter out the first dialogue data that matches the first sub-script, including: The dialogue data is divided according to a preset duration to obtain a time-series-based dialogue set; wherein, the dialogue data includes at least a dialogue index, dialogue content, and timestamp information; The dialogue content of the target window length is extracted from the dialogue set and then subjected to sliding window matching in the target sub-script to obtain multiple matching data corresponding to the target sub-script; wherein, the matching data is the matching data between the dialogue content of the target window length and the script fragment, the matching data carries a dialogue index, and the target window length includes at least one dialogue index; The matching data is merged according to the dialogue index. If all script fragments of the target sub-script are successfully matched, the first dialogue data matched by the first sub-script is determined based on the merged matching data. The first dialogue data carries the timestamp information of the start and end of the dialogue.

4. The method according to claim 3, characterized in that, The dialogue content of the target window length is extracted from the dialogue set and then sequentially matched using a sliding window method in the target sub-script to obtain multiple matching data corresponding to the target sub-script, including: Obtain the matching order of the target sub-scripts; Extract dialogue content of the target window length from the dialogue set, and perform sliding window matching in the target sub-script according to the matching order; If no script segment matching the dialogue content is found in N consecutive target sub-scripts, the matching order is readjusted, and sliding window matching is performed in the target sub-scripts according to the adjusted matching order to obtain multiple matching data corresponding to the target sub-scripts.

5. The method according to claim 3, characterized in that, The matching data is merged according to the dialogue index, including: Find the first and second matching data that overlap in the dialogue index; If the first start index of the first matching data is less than the second start index of the second matching data, and the first end index of the first matching data is less than the second end index of the second matching data, then the first matching data and the second matching data are merged to obtain merged matching data; wherein, the start index of the merged matching data is the first start index, and the end index of the merged matching data is the second end index; Repeat the steps of finding overlapping first and second matching data in the whitespace index, and merging the first and second matching data to obtain merged matching data, until there is no overlapping first and second matching data in the whitespace index.

6. The method according to claim 1, characterized in that, Based on the boundaries of the dialogue index corresponding to the first sub-script in scenes adjacent to the second sub-script, determine the target matching range for each second sub-script, and filter the second dialogue data that matches the second sub-script within the target matching range until all second sub-scripts are successfully matched, including: From the first sub-script, determine two adjacent sub-scripts whose scenes are adjacent to the second sub-script; The target matching range of the second sub-script is determined based on the boundaries of the dialogue indexes corresponding to the two adjacent sub-scripts; Within the target matching range, the second dialogue data corresponding to the second sub-script is matched iteratively by maximizing similarity until all second sub-scripts are successfully matched.

7. The method according to claim 2, characterized in that, Based on the dialogue content corresponding to the gap index and the dialogue content corresponding to the overlap index, supplementary matching is performed on the first sub-script and the second sub-script to obtain the correspondence between the third sub-script and the third dialogue data, including: When the number of gap indices exceeds a first preset threshold, a prompt message is constructed based on the dialogue content corresponding to the gap index. Based on the prompt message and the preset analysis model, the gap index is supplemented and matched to the first sub-script or the second sub-script adjacent to the gap index; Determine the two adjacent sessions corresponding to the overlap index; Delete the overlap index and the corresponding dialogue content from the later sub-script of two adjacent scenes; The first sub-script and the second sub-script, after processing the gap index and the overlap index, are taken as the third sub-script, and the third dialogue data corresponding to the third sub-script is determined to obtain the correspondence between the third sub-script and the third dialogue data.

8. The method according to claim 2, characterized in that, The dialogue content at the beginning and end of the episode videos is matched, and the correspondence between the third sub-script and the third dialogue data is updated to obtain the final matching result between the script and the video content, including: Determine the end time and start time of the episode dialogue in the episode video; The script start time and script end time of the third sub-script corresponding to the episode video are determined based on the correspondence between the third sub-script and the third dialogue data. If the difference between the start time of the script and the start time of the episode dialogue is greater than the second preset duration, then the episode video is supplemented and matched according to the sub-script corresponding to the previous episode video. If the difference between the end time of the episode dialogue and the end time of the script is greater than the second preset duration, then the episode video is supplemented and matched according to the sub-script corresponding to the next episode video; The correspondence between the third sub-script and the third dialogue data is updated based on the results of the supplementary matching to obtain the final matching result between the script and the video content.

9. The method according to claim 1, characterized in that, The method further includes: Obtain the satisfaction level of segmented playback of video content; Based on the segmented playback satisfaction and the final matching result, the segmented evaluation result of the script is determined.

10. A script-video content matching device, characterized in that, The device includes: The dialogue data extraction module is used to extract dialogue data from video content shot based on a shooting script; wherein, the shooting script includes multiple target sub-scripts divided by scene; The first matching module is used to perform a preliminary match between the target sub-script and the dialogue data, and filter out the first dialogue data that matches the first sub-script; wherein, the first sub-script includes the scenes that were initially matched in the target sub-script; The second matching module is used to determine the target matching range for each second sub-script based on the boundary of the dialogue index corresponding to the first sub-script in the scenes adjacent to the second sub-script, and to filter the second dialogue data that matches the second sub-script within the target matching range until all second sub-scripts are successfully matched; wherein, the second sub-script includes at least the scenes in the target sub-script that initially failed to match; The determining module is used to determine the final matching result between the script and the video content based on the correspondence between the first sub-script and the first dialogue data and the correspondence between the second sub-script and the second dialogue data.

11. 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 and video content matching method according to any one of claims 1-9.

12. 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 and video content matching method as described in any one of claims 1-9.