Scenario generation method, electronic device, storage medium and computer program product

By segmenting the script notes of variety shows into blocks and grouping them based on similarity, and using a large language model to generate post-production scripts, the omission problem caused by the large amount of input data of the large model is solved, and more accurate script generation is achieved.

CN121809416APending Publication Date: 2026-04-07BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing technologies face problems when using large language models to generate post-production scripts for variety shows. The large amount of input data leads to the omission of details and poor accuracy. In particular, when inputting the overall script recording data or summarizing it after dividing it into blocks, it is easy to lose events that are dynamically developing on the timeline.

Method used

The script recordings are sorted by time and divided into multiple data blocks. Events for each data block are generated using a large model, and associated script recordings are identified. Events are grouped according to similarity, and similarity matching is performed using a vector database to generate the overall events for each event group, ultimately constructing the post-production script.

Benefits of technology

By segmenting and grouping based on similarity, the amount of data processed by the large model each time is reduced, the accuracy of event summarization is improved, the accuracy and completeness of the later script are ensured, and information omissions are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809416A_ABST
    Figure CN121809416A_ABST
Patent Text Reader

Abstract

The invention provides a script generation method, electronic equipment, a storage medium and a computer program product, and belongs to the technical field of post-processing. The method comprises the following steps: dividing a plurality of field record records of a current program sorted according to time into a plurality of data blocks, generating at least one event for each data block through a large model, and determining an associated field record of each event; dividing all events into a plurality of event groups according to the similarity of the events of the plurality of data blocks; generating an overall event corresponding to each event group through a large model according to the events in each event group and the associated field record of each event in the event group; and constructing a later script corresponding to the current program according to the overall events corresponding to all the event groups. The invention aims to generate a more accurate later script.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of post-processing, in particular, to a script generation method, an electronic device, a storage medium and a computer program product. BACKGROUND

[0002] Making a variety of programs is a complex process, and post-production is required after the program is recorded. However, the personnel responsible for post-production usually do not directly participate in the recording of the program, so after the program is recorded, a post-production script needs to be generated according to the recording data of the program, which can help post-production personnel understand the main or key events that occurred during the recording of the program, so as to grasp the direction and idea of post-editing and processing.

[0003] With the rapid development of large language models, it has become a common way to generate a post-production script according to the recording data through the powerful natural language understanding and processing capabilities of a large language model. However, due to the large amount of data in the recording data, directly inputting the recording data into the large language model and letting the large language model output the post-production script can easily miss the detailed information in the recording data, and the accuracy of the post-production script generated by the large model is poor. SUMMARY

[0004] Embodiments of the present application provide a script generation method, an electronic device, a storage medium and a computer program product, which aims to generate a more accurate post-production script.

[0005] In a first aspect, embodiments of the present application provide a script generation method, which comprises: dividing a plurality of recording records of a current program sorted by time into a plurality of data blocks, generating at least one event for each data block by a large model, and determining the associated recording records of each event; dividing all events into a plurality of event groups according to the similarity of the events of the plurality of data blocks; generating an overall event corresponding to each event group by a large model according to the events in each event group and the associated recording records of each event in the event group; constructing a post-production script corresponding to the current program according to the overall events corresponding to all event groups.

[0006] In a second aspect, embodiments of the present application provide an electronic device, comprising at least one processor and a memory, the memory storing a computer program executable on the processor, wherein the processor executes the script generation method of the first aspect of the embodiments when executing the computer program.

[0007] In a third aspect, an embodiment of the present application provides a non-volatile readable storage medium, the non-volatile readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the script generation method in the first aspect.

[0008] In a fourth aspect, an embodiment of the present application provides a computer program product, comprising computer programs / instructions, which, when executed by a processor, implement the script generation method in the first aspect.

[0009] Advantages: When generating the post-production script of the current program, the plurality of time-ordered script records are divided into a plurality of data blocks, at least one event is generated for each data block by the large model, and the associated script records of each event are determined. Compared with the way of letting the large model summarize based on complete script data, the way of dividing into a plurality of data blocks can reduce the data amount of the large model each time, so that the event summary result of the large model for each data block is more accurate.

[0010] Then, according to the similarity of the events of the plurality of data blocks, similar events are classified into an event group, and the large model generates an overall event corresponding to each event group according to all events in each event group and the associated script records of each event. Similar events in the same event group can reflect the dynamic development process of an actual event or relationship. When the large model generates the overall event of each event group, the associated script records of each event in an event group are input into the large model, so that the large model fully understands all the associated script records of similar events, can avoid information missing between similar events, and makes the large model summarize more accurate overall events corresponding to each event group, thereby improving the accuracy of the post-production script of the current program. BRIEF DESCRIPTION OF DRAWINGS

[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0012] Figure 1 is a step flow chart of the script generation method according to an embodiment of the present application; Figure 2 is an execution schematic diagram of the script generation method according to an embodiment of the present application; Figure 3 is a functional module diagram of the script generation device according to an embodiment of the present application; Figure 4 is a schematic diagram of an electronic device according to an embodiment of the present application; Figure 5 is a schematic diagram of a non-volatile readable storage medium according to an embodiment of the present application; Figure 6 is a schematic diagram of a computer program product according to an embodiment of the present application. DETAILED DESCRIPTION

[0013] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0014] The process of making a variety show program usually includes a recording stage and a post-production stage. Since the personnel responsible for post-production usually do not directly participate in the recording of the program, in order to facilitate the post-production personnel to grasp the main events occurring in the recording process of the program, help the post-production personnel to understand the main or key events occurring during the recording of the program, and thus grasp the direction and idea of post-editing and processing, recording is usually performed during the recording of the program to obtain the script data of the recording process of the program.

[0015] However, the script data generally records the behavior of the characters in the program according to the development of time, and the data volume of the script data is large. Therefore, after the recording of the program is completed, the post-production script needs to be generated according to the script data of the recording process of the program. The post-production script refers to the relevant information of the program summarized and collected after the original script data is summarized. For example, the post-production script can include the summary, main events, core highlights and character relationships of the program.

[0016] Based on the post-production script, the post-production personnel can quickly grasp and understand the main or key events occurring during the recording of the program, the relationships between different characters, and thus grasp the direction and idea of post-editing and processing.

[0017] At present, it has become a common way to generate a post-production script from script data based on the powerful natural language understanding and processing capabilities of a large language model. The common ways to generate a post-production script based on LLM (Large Language Mode, large language model or large model) include the following: 1. Using the overall script log data as input to the large model instructs it to generate the required output according to the format of the post-production script. However, since script log data usually has a large amount of data, when the entire script log data is input into the large language model and the large language model outputs the post-production script, the large model is prone to failure due to the large number of tokens during processing. Furthermore, the large amount of input data makes it very easy for the large model to miss the details in the script log data, resulting in poor quality of the post-production script generated by the large model. There is a problem of easily missing information in the script log data.

[0018] 2. Divide the overall script recording data into blocks as input to the large model, and use the summation results of the large model on multiple blocks as the final script. However, in this method, because of the block processing, the large model is prone to losing some events that are dynamically developing on the timeline, and there is also a problem of information omission, resulting in poor accuracy of the final script.

[0019] To provide a more accurate post-production script, this application provides a script generation method.

[0020] Reference Figure 1 The diagram illustrates a flowchart of a script generation method according to an embodiment of this application. The method may specifically include the following steps: S101: Divide the current program’s multiple scene log records sorted by time into multiple data blocks, generate at least one event for each data block through a large model, and determine the associated scene log records for each event.

[0021] During the recording of the program, there will be dedicated script supervisors who will record the behavior of each person at different times or in different scenes, and obtain the script supervisor data for the current program. The script supervisor data includes multiple script supervisor records.

[0022] A script record includes time, characters, and actions. The actions of the characters in the script record can include their movements or speech. The time in the script record can use a predefined time format, such as 2 PM. You can choose any time format such as 2:00 PM, 2:00 PM, etc. The choice can be made according to the actual application requirements. This application embodiment does not impose any restrictions.

[0023] For example, multiple field log records can be shown as follows: 1451 Person A reads the check-in rules; 1452 Character A knocks on the door and asks if anyone is home; Character B opens the door. 1452 Character A enters and hangs his clothes between Character B and Character C; 1453 Character A asked everyone how long it had been since they arrived, and Character C said they had just arrived; ... wherein 1451 represents the time of 14:51.

[0024] In the actual implementation process, different personnel have different recording styles, and personnel can be instructed to record according to a preset scene record recording format, unify the format of the scene record, improve the efficiency when generating the later script, and also can preprocess the scene record after obtaining any scene record, the preprocessing process includes unifying the time format of each scene record.

[0025] In a possible implementation, S101: dividing the plurality of scene record records of the current program sorted by time into a plurality of data blocks, generating at least one event for each data block by a large model, and determining the associated scene record of each event, can include the following steps: A1: According to the time in each scene record, sort all scene records in chronological order.

[0026] Because the scene record data is recorded in real time during the production of the program, the plurality of scene records in the scene record data are usually sorted in chronological order, but there may be special cases, such as a scene record staff supplementing a scene record at a historical time, etc. There may be a misalignment of the time line of the scene record data sorting.

[0027] Therefore, in the preprocessing process of the scene record, all scene data can be sorted according to the time in the scene record, and a unique record ID can be assigned to the scene record sorted in chronological order.

[0028] After obtaining the scene record data of the current program and preprocessing, such as preprocessing including unifying the time format and sorting by time, all scene records can be stored, for example, all scene records can be stored in a normal database and a vector database at the same time. The storage and retrieval methods provided by the normal database and the vector database are different, so that the staff can query the scene data later.

[0029] Specifically, the normal database stores the text of any data and provides text search, for example, when the query keyword is "dance", the normal database will retrieve all data containing the two words "dance".

[0030] The data stored in the vector database has a corresponding vector representation, and by comparing the distance between the vector representations of the data, a fuzzy search can be provided, for example, when the query keyword is "dance", in the vector database, not only all data containing the two words "dance" will be retrieved, but also related search results will be retrieved, such as "dance", "street dance", "Latin" and other related search results.

[0031] A2: dividing the multiple scene note records sorted in time sequence into multiple data blocks.

[0032] In order to reduce the impact of the block division on the context continuity of the scene note records in a data block, an overlapping block division method can be used when dividing the multiple data blocks.

[0033] Specifically, according to the number of scene note records in a preset unit data block, the multiple scene note records of the current program sorted in time are divided into multiple data blocks, and at least one same scene note record is included in two adjacent data blocks.

[0034] That is, when dividing the multiple data blocks, a partial overlapping area is reserved between two adjacent data blocks, such as one or more scene note records arranged at the rear in the previous data block being the same as one or more scene note records arranged at the front in the subsequent data block.

[0035] For example, the preset unit data block includes M scene note records, and the preset adjacent two data blocks include 3 same scene note records. The multiple scene note records sorted in time are divided into data block 1 including scene note record 1, …, scene note record M-2, scene note record M-1 and scene note record M, and data block 2 including scene note record M-2, scene note record M-1, scene note record M, scene note record M+1, …. A3: for each data block, generating a first event summary instruction of the data block according to the scene note records of the data block and the first event summary prompt, and sending the first event summary instruction to the large model.

[0036] Any prompt is a text prompt when interacting with a large model, which can guide the model to generate a specific output.

[0037] The first event summary prompt can be a pre-defined json format instruction script code for guiding the large model to summarize at least one event of the data block according to the scene note records corresponding to the data block, and determine the associated scene note records of each event.

[0038] Specifically, the scene note records of a data block are the input data that the large model needs to process, and the first event summary prompt is used to instruct the large model to generate a specific output according to the input, including the content of the output and the required format of the output, etc.

[0039] For example, the first event summary prompt can be: “Please summarize the main events in the given scene note records of this data block; require the output of the event list of this data block, and output the record ID of the relevant scene note record when summarizing each event; …” In actual implementation, the content of the first event summary prompt word can be pre-written according to the actual application requirements.

[0040] By combining or splicing the scene record of each data block with the preset first event summary prompt word, the first event summary instruction corresponding to the data block can be obtained, and the first event summary instruction is sent to the large model.

[0041] The current large model already has powerful natural language processing capabilities. After sending the input and the instruction word to the large model, the large model can process the input data according to the indication of the instruction word and output the output required by the instruction word.

[0042] Therefore, the large model will process the input, i.e., the scene record corresponding to a data block, according to the indication of the first event summary prompt word, summarize the event list of the data block, and determine the record ID of the associated scene record of each event.

[0043] The associated scene record of an event is all the scene records used by the large model to summarize the event. The event list of a data block includes all the events generated by the large model according to the indication of the first event summary prompt word.

[0044] The number of events in the event list of a data block can be set according to the actual application requirements. In actual implementation, the number of events can be limited by the first event summary prompt word. For example, the first event summary prompt word can include: “the number of events in the event list of each data block does not exceed X”.

[0045] The associated scene record of an event refers to the scene record used by the large model to summarize the event. For example, the scene records included in a data block A include scene records 1-N. The large model summarizes the events of the data block A to include event 1. After analysis, the large model considers that the scene records 1-2, the scene record 5, and the scene records 7-8 describe the event 1. When outputting the summarized event 1, the scene records 1-2, the scene record 5, and the scene records 7-8 are the associated scene records of the event 1.

[0046] In actual implementation, if the overlapping chunking method is used when the data block is divided, because part of the scene records of two adjacent data blocks are kept, there may be a case that the event lists of two data blocks output by the large model include the same event. The same event can be de-duplicated.

[0047] Dividing multiple field log records into blocks and having the large model summarize the events of each data block can reduce the amount of data input to the large model each time it summarizes. Compared to having the large model summarize based on complete field log data, dividing into multiple data blocks can reduce the amount of data for each summary by the large model, making the summary results of events for each data block more accurate.

[0048] S102: Based on the similarity of events in the multiple data blocks, divide all events into multiple event groups.

[0049] In actual implementation, the development of a real event or relationship in the program is dynamic. The time recorded by the script supervisor to reflect this real event or relationship is not necessarily continuous. For example, characters A and B may have an interaction of greeting each other at 2 o'clock, another interaction at 2:30 to show that the two have become acquainted, and an interaction at 3:30 to show that the relationship between characters A and B is developing more smoothly.

[0050] Therefore, by dividing the data into blocks to reduce the amount of data when the large model is summarized each time, a more accurate list of events can be obtained. This allows multiple events that represent the same actual event or relationship to be summarized separately. The embodiments of this application can further determine the similarity of all events, group all events, and the events in the same event group have higher similarity, indicating that these events are related. These events can reflect the dynamic development process of an actual event or relationship.

[0051] In one feasible implementation, S102: Based on the similarity of events in the multiple data blocks, all events are divided into multiple event groups, which may specifically include the following steps: B1: Store the events corresponding to each data block generated by the large model in a vector database, where each event in the vector database has a corresponding vector representation.

[0052] In actual implementation, when storing the events of each data block output by the large model and the associated field records of each event, they can be stored in a regular database and a vector database respectively, which facilitates recording and querying.

[0053] After storing the events corresponding to multiple data blocks and the associated field records corresponding to each event in a vector database, any event and any field record will have their own corresponding vector representation. Based on this vector representation, fuzzy search and similarity matching can be performed.

[0054] After storing events in text form in a vector database, the vector database can use the feature vectors of the text generated by word embedding techniques such as Word2Vec (a related model used to generate word vectors) as vector representations of the events. These vectors contain the semantic information in the text of the events, and the vector representations of events in text form can be used for tasks such as text classification and similarity matching.

[0055] Based on the vector representation of semantic information in text containing events, similarity matching can be performed on events with the same expressed semantic information, and events with similar semantic information can be grouped into an event group.

[0056] B2: Take any event as the current event, traverse each unmatched event in the vector database, calculate the similarity between the vector representation of the current event and the vector representation of each unmatched event, group the unmatched events with the current event that have a similarity greater than a similarity threshold into an event group, and update the unmatched event as a matched event.

[0057] When grouping all events based on similarity, the first event can be taken as the current event, and events with high similarity to the current event can be found in the vector database and grouped as events.

[0058] Specifically, the similarity between the vector representation of the current event and the vector representations of each unmatched event is calculated. The similarity can be determined based on the distance between the vectors, such as by calculating the cosine distance. When the similarity is greater than a preset similarity threshold, the two events are determined to be similar events.

[0059] In actual implementation, the similarity calculation method and the similarity threshold can be selected according to the actual application requirements. This application embodiment does not impose any restrictions.

[0060] If an unmatched event is determined to be a similar event to the current event, that event will not be matched again; that is, an event will ultimately belong to only one event group.

[0061] B3: Update any unmatched event to the current event until there are no unmatched events in the vector database, thus obtaining the multiple event groups.

[0062] For example, suppose the events summarized from multiple data blocks include events 1-8, with event 1 as the initial current event. The similarity between event 1 and events 2-8 is calculated respectively. Among them, the similarity between event 1 and event 2 and the similarity between event 4 are greater than the similarity threshold. Then, events 1, 2 and 4 form an event group A.

[0063] Event 2, which has already been grouped, is no longer considered the current event. An event is selected from the remaining unmatched events as the current event. The remaining unmatched events include events 3 and events 5-8. Event 3 is selected as the current event. The similarity between event 3 and events 5-8 is calculated. Assuming that, based on the similarity, similar events to event 3 include events 6 and 7, then events 3, 6, and 7 form an event group B.

[0064] At this point, the remaining unmatched events include events 5 and 8. Event 5 is taken as the current event, and the similarity between event 5 and event 8 is calculated. If the similarity between event 5 and event 8 is greater than the similarity threshold, then event 5 and event 8 form event group C. If the similarity between event 5 and event 8 is less than or equal to the similarity threshold, then event 5 is event group C, and event 8 is event group D.

[0065] S103: Based on the events in each event group and the associated field records of each event in that event group, generate the overall event corresponding to each event group through the large model.

[0066] After dividing all events by similarity, similar events within the same event group can reflect the dynamic development process of an actual event or relationship. When the large model analyzes all events and their associated field records within an event group and summarizes them to obtain the overall event of the event group, the large model can analyze and understand the details between similar events, fully understand all the associated field records of similar events, sort out the timeline of event development, reduce the information gaps when the large model summarizes events, and obtain a more accurate overall event for each event group.

[0067] The overall event of an event group is obtained by the large model by summarizing all events and all associated field records of the event group. In other words, the overall event is an event obtained by the large model after understanding and summarizing the associated field records of each event in a group of events with similar semantic information.

[0068] Specifically, step S103: The process of generating the overall event corresponding to each event group through the large model based on the events in each event group and the associated field records of each event in that event group, including: For each event group, a second event summary instruction corresponding to the event group is generated and sent to the large model based on the events in the event group, the associated field records of each event in the event group, and the second event summary prompt. The large model responds to the second event summary instruction by generating the overall event corresponding to the event group based on the events in the event group and the associated field records of each event in the event group.

[0069] The second event summary prompt is a predefined JSON-formatted instruction script code used to guide the large model to summarize the overall event corresponding to an event group and all associated field records corresponding to the overall event based on the events in an event group and the associated field records of each event in the event group.

[0070] When using a large model to summarize the overall events of each event group, all events in each event group and the associated field records corresponding to each event are the inputs that the large model needs to process. The second event summary prompt is used to instruct the large model to generate specific outputs based on the inputs, including the content of the outputs and the required output format.

[0071] For example, the summary message for the second event could be: "Based on the events grouped in this event and the scene record, please summarize the overall events of this group; The requirement is that each event group contains only one overall event, and the output should summarize the record IDs of the field log records related to the overall event of this event group, with the field log records sorted by time; ..." In actual implementation, the content of the second event summary prompt can be written according to the actual application needs.

[0072] By combining or splicing all events in each event group, the associated field records corresponding to each event in that event group, and the preset second event summary prompt, the second event summary instruction corresponding to that event group can be obtained. The large model will process all events in the input, i.e., an event group, and the associated field records corresponding to each event, according to the instruction of the second event summary prompt, and summarize to obtain the overall event corresponding to this event group and all associated field records corresponding to the overall event.

[0073] S104: Construct the post-production script corresponding to the current program based on the overall events corresponding to all event groups.

[0074] After determining the overall events of each event group through the large model, all the overall events are combined into a target event list, which is then used as part of the later script.

[0075] The target event list includes all overall events and the associated field records for each overall event. The associated field records for an overall event are arranged in chronological order.

[0076] During post-production, the target event list can show the post-production staff the main events of the current program, and based on the related script notes sorted by time, the timeline of the event's development can also be known, which helps the post-production staff to establish a post-production editing strategy.

[0077] In one feasible implementation, after generating the overall event corresponding to each event group through the large model in step S103 based on the events in each event group and the associated field records of each event in the event group, the method further includes: generating a core highlight summary instruction based on the overall events corresponding to all event groups and the core highlight prompt words, and sending it to the large model. The large model responds to the core highlight summary instruction and outputs the core highlights of the current program.

[0078] When constructing the post-production script for the current program, the script can be constructed based on the overall events and the core highlights corresponding to all event groups. For example, all overall events and core highlights can be arranged in a preset layout order to obtain the post-production script for the current program.

[0079] Based on the summary of all the overall events, the core highlights of the current program are summarized and incorporated into the post-production script. This allows the post-production staff to quickly grasp the key points of the current program and determine the editing focus.

[0080] The key highlights prompts are predefined JSON-formatted instruction script codes used to guide the large model to summarize the overall events corresponding to all events and obtain the key highlights of the current program.

[0081] For example, key selling points could be: "Based on the above overall events, please summarize the key points;" The output should contain no more than M key takeaways. ..." In actual implementation, key points and prompts can be written according to the needs of the actual application.

[0082] By combining or splicing the overall events and key points prompts corresponding to all event groups, a key point summary instruction is obtained and sent to the large model. The large model will summarize no more than M key points based on the key point prompts in the key point summary instruction and the overall events corresponding to all event groups.

[0083] Furthermore, to improve the accuracy of generating core highlights in the large model, the input that the large model needs to process can include not only the overall event, but also the associated field records corresponding to each overall event. This allows the large model's aggregation process to be based on the original field records, which can further reduce the information loss in the large model and make the aggregated core highlights more accurate.

[0084] In one feasible implementation, in addition to determining the list of target events for the post-production script by dividing the data into blocks, a summary of the current program for constructing the post-production script can also be generated by determining a summary of each data block.

[0085] Specifically, after dividing the multiple recordings of the current program sorted by time into multiple data blocks in step S101, the method further includes the following steps: C1: For each data block, generate a first summary summary instruction for the data block based on the field record and the first summary summary prompt word of the data block, and send it to the large model.

[0086] The first summary summary prompt is used to guide the large model to summarize the initial summary corresponding to each data block based on the field records of each data block.

[0087] The large model is used to respond to the first summary summary instruction and output the initial summary of the data block according to the indication of the first summary summary prompt.

[0088] C2: Based on the initial and second summary summary prompts for all data blocks, generate a second summary summary instruction and send it to the large model.

[0089] The second summary summary prompt is used to guide the large model to summarize the current program based on the initial summaries of all data blocks.

[0090] The large model is used to respond to the second summary summary instruction and output a summary of the current program according to the instructions of the second summary summary prompt.

[0091] In actual implementation, the content of the first summary summary prompt and the second summary summary prompt can be written according to the needs of the actual application. This application embodiment does not impose any restrictions.

[0092] Compared to having a large model summarize program data based on complete script recording data, having the large model summarize each data block based on script recording data not only reduces the amount of input data for each summary, but also allows the large model to fully understand a data block with a smaller amount of script recording data, resulting in a more accurate initial summary for each data block. Then, by summarizing all the initial summaries using the large model, an even more accurate summary can be obtained.

[0093] When constructing the post-production script for the current program, the script can be constructed based on the overall events, key highlights, and a summary of the current program corresponding to all event groups. For example, all overall events, key highlights, and summaries can be arranged in a preset layout order to obtain the post-production script for the current program.

[0094] In one feasible implementation, considering that the relationships between different characters are different, the post-production editing direction will be determined based on the different relationships between characters during the post-production process. For example, the dramatic development of character relationships may be enhanced, and on-screen text with character relationship characteristics may be added. Therefore, when generating the post-production script, a character relationship map of all characters in the current program can also be generated. Specifically, the method also includes the following steps: D1: For any two target characters in the current program, obtain all script recordings containing the two target characters from the plurality of script recordings.

[0095] The current program may include multiple target individuals. All individuals in the program can be used as target individuals, and the relationships between each pair of individuals can be determined. Alternatively, depending on the needs of the actual application, key individuals in the program can be manually selected as target individuals, and the relationships between each pair of key individuals can be determined.

[0096] After identifying the two target individuals, a text search can be performed in a general database that stores all script supervisor records to obtain script supervisor records that simultaneously contain both individuals.

[0097] If it is necessary to determine the relationship between character A and character B, search the general database for all scene log records that include both character A and character B, and use these scene log records as input data to analyze the relationship type between the two.

[0098] In actual implementation, a period of scene logs may all be used to describe the interaction between character A and character B. In addition to scene logs that include both character A and character B, other scene logs that individually include either character A or character B, or other characters' evaluations of the relationship between the two, can also be used to assist the large model in judging the relationship between the two. Therefore, the N scene logs above and below that simultaneously include character A and character B can also be used as input data for the large model to judge the relationship type between the two. The value of N can be set according to the actual application requirements, and this application embodiment does not impose any restrictions.

[0099] D2: Based on all the scene records and relationship analysis prompts of the two target characters, generate a relationship type analysis instruction and send it to the large model.

[0100] The relationship analysis prompts are predefined JSON-formatted instruction script codes used to instruct the large model to determine the relationship type between the two target individuals based on all their scene records.

[0101] When using a large model to summarize the relationship types of two characters, all the scene records of the two target characters are the input that the large model needs to process. Relationship analysis prompts are used to instruct the large model to generate specific outputs based on the inputs, including the content of the outputs and the required output format. For example, you can preset all the relationship types in the relationship analysis prompts, so that the large model can determine the relationship type of the two characters from all the relationship types.

[0102] For example, relational analysis suggestions could be: "Based on the input script notes, analyze the relationship between any two characters;" Requirements: The relation type can be selected from the following relation type categories, and the reasons should be given; [Relationships including kinship, spousal relationship, romantic relationship, and colleague relationship, etc.] ..." In practice, the content of relationship analysis prompts can be written according to the needs of the actual application. It can also instruct the large model to subdivide the given relationship types into more granular relationship types. For example, when a kinship relationship is confirmed, it can be further subdivided into: father-son or father-daughter relationship, mother-son or mother-daughter relationship, sibling relationship, etc.

[0103] Relationship analysis prompts can also indicate to the large model the reasons for the output, making it easier for staff to judge whether the relationship type is reasonable based on the reasons.

[0104] D3: Based on the relationship type of any two target characters determined by the large model, obtain the character relationship line in the post-production script corresponding to the current program.

[0105] After determining the relationship type between any two target characters in the current program, a character relationship graph of all characters in the current program can be generated. In the character relationship graph, nodes represent characters, and the edge attributes of two nodes represent the relationship type between the two characters. All characters are associated through the relationship type to generate a character relationship graph that reflects the relationships between characters, making it easier to intuitively understand the character relationship network.

[0106] The script generation method provided in this application embodiment can be based on RAG (Retrieval-augmented Generation) technology, which uses a large model to assist in generating more accurate post-production scripts.

[0107] RAG combines language modeling and information retrieval techniques. When a large model needs to generate text or answer questions, it first retrieves relevant information from a large document collection and then uses this retrieved information to guide text generation, thereby improving the quality and accuracy of predictions. In this embodiment, in order to obtain the post-production script of a program through a large model, the input data of the large model is determined based on RAG technology, and the large model is gradually guided to generate various parts for constructing the post-production script. The specific process is as follows.

[0108] Reference Figure 2 The diagram illustrates the execution of the script generation method provided in this application embodiment. In one feasible implementation, the method may include the following steps: First, the script recording data for the current program is obtained, sorted according to time sequence, and all script recording data is stored in a general database and a vector database as the first layer of data for enhanced retrieval.

[0109] All scene notes are stored in both a regular database and a vector database, primarily for later retrieval and for generating character relationships between two individuals in the current program.

[0110] First, the relationship between any two characters is determined based on the data enhanced by the first-level retrieval.

[0111] Specifically, for any two target characters in the current program, all script recordings containing the two target characters are retrieved from the general database. Based on all script recordings of the two target characters and relationship analysis prompts, a relationship type analysis instruction is generated and sent to the large model. The large model summarizes the relationship types of any two target characters and further determines the character relationship graph of the current program.

[0112] Then, the data for the first layer of retrieval enhancement is divided into blocks, that is, the field record data in chronological order is divided into multiple data blocks. Based on the field record records of multiple data blocks, the initial summary, event list and associated field record records of each event are generated through the large model.

[0113] For example, a first summary summary instruction can be generated and sent to the large model based on the field record of each data block and the first summary summary prompt. The large model can then summarize the data to obtain the initial summary for each data block. Similarly, a first event summary instruction can be generated and sent to the large model based on the field record of each data block and the first event summary prompt. The large model can then summarize the event list for each data block and determine the associated field record of each event.

[0114] In addition to individually instructing the large model to generate initial summaries and event lists for each data block, in actual implementation, the large model can also be instructed to simultaneously output the initial summaries, event lists, and associated event records for each data block based on the field records of each data block.

[0115] This involves constructing a data block analysis indicator, which includes the content of the first summary summary indicator and the first event summary indicator. The data block analysis indicator is used to guide the large model to output the initial summary, event list, and associated field records of each data block based on the field records of each data block, and also indicates the output format.

[0116] The initial summary, event list, and associated field records of each data block output by the large model are stored in a general database and a vector database as data for second-layer retrieval enhancement, which facilitates later retrieval and is also used to generate the target event list, summary, and core highlights in the later script.

[0117] Then, based on the data enhanced by the second layer of retrieval, the summary, target event list, and key highlights in the later stages of the script are determined.

[0118] Specifically, based on the initial and second summary summary prompts of all data blocks, a second summary summary instruction is generated and sent to the large model, and the summary of the current program is obtained through the large model summary.

[0119] Then, based on the similarity of the events, all events are divided into multiple event groups. Based on the events in each event group and the associated field records of each event, a second event summary instruction is generated and sent to the large model. The large model summarizes the overall events and associated field records corresponding to each event group to obtain the target event list.

[0120] Based on the overall events and key highlights keywords corresponding to all event groups, a key highlights summary instruction is generated and sent to the large model. The key highlights of the current program are then summarized by the large model.

[0121] Finally, the summary, list of target events, key highlights, and character relationship diagram can be arranged according to the preset layout template to obtain the post-production script of the current program.

[0122] The method provided in this application has the following advantages compared to related technologies: 1. Compared to using the entire script recording data as input to a large model to generate the later script, dividing the script recordings into blocks allows the large model to summarize the script recordings of a data block to obtain the initial summary, events, and related script recordings of that data block. This reduces the amount of data processed by the large model each time, and the large model can fully understand the script recordings of each data block, making the event summary results of each data block more accurate.

[0123] 2. Compared to using the overall script recording data in blocks as input to a large model, and directly using the summary results of events from multiple blocks as the final script, this approach can lead to information gaps between different blocks. The large model is prone to missing some events that dynamically develop along the timeline, resulting in information omissions. Our method further groups events based on similarity for each data block, grouping events with similar semantics together. Semantically similar events in an event group indicate a connection between these events. These similar events can reflect the dynamic development process of an actual event or relationship. Therefore, the large model again summarizes all events in an event group and all associated script recordings of these similar events into a whole event. The associated script recordings are the original script recordings, so the large model can fully understand all associated script recordings of similar events, making up for the information loss caused by block division, obtaining a more accurate overall event, and thus a more accurate final script.

[0124] Reference Figure 3 The diagram illustrates a functional block diagram of a post-production script generation apparatus provided in an embodiment of this application. The apparatus includes: The first event generation module 100 is used to divide multiple scene record records of the current program into multiple data blocks according to time, generate at least one event for each data block through a large model, and determine the associated scene record records of each event. Grouping module 200 is used to divide all events into multiple event groups based on the similarity of events in the multiple data blocks; The second event generation module 300 is used to generate the overall event corresponding to each event group through the large model based on the events in each event group and the associated field records of each event in the event group. The script generation module 400 is used to construct the post-production script corresponding to the current program based on the overall events corresponding to all event groups.

[0125] Optionally, the first event generation module includes: The segmentation unit is used to divide the current program's multiple segment records, which are sorted by time, into multiple data blocks according to the number of segment records in a preset unit data block, and two adjacent data blocks contain at least one identical segment record.

[0126] Optionally, the first event generation module includes: The first event summary instruction generation unit is used to generate a first event summary instruction for each data block based on the field record of the data block and the first event summary prompt word, and send it to the large model; the large model responds to the first event summary instruction, generates at least one event for the data block based on the field record corresponding to the data block, and determines the associated field record of each event; The first event summary prompt is used to guide the large model to summarize at least one event of the data block based on the field record corresponding to the data block, and to determine the associated field record of each event; the associated field record of an event is all the field records used by the large model when summarizing the event.

[0127] Optionally, the grouping module is used for: The events corresponding to each data block generated by the large model are stored in a vector database, and any event in the vector database has a corresponding vector representation. Take any event as the current event, traverse all unmatched events in the vector database, calculate the similarity between the vector representation of the current event and the vector representation of each unmatched event, group the unmatched events with the current event that have a similarity greater than a similarity threshold into an event group, and update the unmatched event as a matched event. Update any unmatched event to the current event; The multiple event groups are obtained until no unmatched event exists in the vector database.

[0128] Optionally, the second event generation module includes: The second event summary instruction generation unit is used to generate a second event summary instruction corresponding to each event group based on the events in the event group, the associated field record of each event in the event group, and the second event summary prompt word, and send it to the large model. The large model responds to the second event summary instruction and generates the overall event corresponding to the event group based on the events in the event group and the associated field record of each event in the event group. The second event summary prompt is used to guide the large model to summarize the overall event corresponding to the event group and all associated field records corresponding to the overall event based on the events in the event group and the associated field records of each event in the event group; wherein, the overall event of an event group is obtained by the large model summarizing all events and all associated field records of the event group.

[0129] Optionally, the device further includes a key point generation module, used for: Based on the overall events and key highlights prompts corresponding to all event groups, a key highlights summary instruction is generated and sent to the large model. The large model responds to the key highlights summary instruction and outputs the key highlights of the current program. The core highlights prompts are used to guide the large model to summarize the core highlights of the current program based on the overall events corresponding to all event groups. The script generation module is used to: construct the post-production script corresponding to the current program based on the overall events corresponding to all event groups and the core highlights.

[0130] Optionally, the apparatus further includes a first summary aggregation module, used for: For each data block, a first summary summary instruction for the data block is generated based on the field record and the first summary summary prompt word of the data block and sent to the large model. The large model is used to respond to the first summary summary instruction and output the initial summary corresponding to the data block. The first summary summary prompt is used to guide the large model to summarize the initial summary corresponding to each data block based on the field records of each data block.

[0131] Optionally, the apparatus further includes a second summary aggregation module, used for: Based on the initial and second summary summary prompts of all data blocks, a second summary summary instruction is generated and sent to the large model. The large model is used to respond to the second summary summary instruction and output a summary of the current program. The second summary summary prompt is used to guide the large model to summarize the current program based on the initial summaries of all data blocks. The script generation module is used to: construct the post-production script corresponding to the current program based on the overall events corresponding to all event groups and the summary.

[0132] Optionally, the device further includes a relationship aggregation module, used for: For any two target individuals in the current program, obtain all script recordings containing the two target individuals from the plurality of script recordings; Based on all the scene logs and relationship analysis prompts of the two target characters, a relationship type analysis instruction is generated and sent to the large model. The relationship analysis prompts are used to instruct the large model to determine the relationship type of the two target characters based on all the scene logs of the two target characters. Based on the relationship type of any two target characters determined by the large model, a character relationship map of all characters in the current program is obtained; The script generation module is used to: construct the post-production script corresponding to the current program based on the overall events corresponding to all event groups and the character relationship graph.

[0133] Reference Figure 4 The diagram illustrates an electronic device according to an embodiment of this application, including: at least one processor and a memory, the memory storing a computer program executable on the processor, wherein the processor executes the computer program to perform the script generation method described in the embodiment.

[0134] Reference Figure 5 The diagram illustrates a non-volatile readable storage medium provided in an embodiment of this application. The non-volatile readable storage medium stores a computer program, wherein the computer program, when executed by a processor, performs the script generation method described in the embodiment.

[0135] Reference Figure 6 The diagram illustrates a computer program product provided in an embodiment of this application, including a computer program / instructions that, when executed by a processor, implement the script generation method described in the embodiment.

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

[0137] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0138] 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, as well as 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.

[0139] 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 function specified in one or more boxes.

[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing 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.

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

[0142] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0143] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas 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 this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A script generation method, characterized in that, The method includes: The current program's multiple script recordings, sorted by time, are divided into multiple data blocks. At least one event is generated for each data block using a large model, and the associated script recordings for each event are determined. Based on the similarity of events in the multiple data blocks, all events are divided into multiple event groups; Based on the events in each event group and the associated field records of each event in that event group, the overall event corresponding to each event group is generated through the large model; Based on the overall events corresponding to all event groups, construct the post-production script corresponding to the current program.

2. The method according to claim 1, characterized in that, The current program's multiple script recordings, sorted by time, are divided into multiple data blocks, including: Based on the number of field notes in a preset unit data block, the multiple field notes of the current program, sorted by time, are divided into multiple data blocks, and two adjacent data blocks contain at least one identical field note.

3. The method according to claim 1, characterized in that, At least one event is generated for each data block using a large model, and the associated field records for each event are determined, including: For each data block, a first event summary instruction is generated for the data block based on the field record and the first event summary prompt, and sent to the large model; the large model responds to the first event summary instruction, generates at least one event for the data block based on the field record corresponding to the data block, and determines the associated field record of each event; The first event summary prompt is used to guide the large model to summarize at least one event of the data block based on the field record corresponding to the data block, and to determine the associated field record of each event; the associated field record of an event is all the field records used by the large model when summarizing the event.

4. The method according to any one of claims 1-3, characterized in that, Based on the similarity of events across the multiple data blocks, all events are divided into multiple event groups, including: The events corresponding to each data block generated by the large model are stored in a vector database, and any event in the vector database has a corresponding vector representation. Take any event as the current event, traverse all unmatched events in the vector database, calculate the similarity between the vector representation of the current event and the vector representation of each unmatched event, group the unmatched events with the current event that have a similarity greater than a similarity threshold into an event group, and update the unmatched event as a matched event. Update any unmatched event to the current event; The multiple event groups are obtained until no unmatched event exists in the vector database.

5. The method according to claim 1, characterized in that, Based on the events in each event group and the associated field records of each event in that event group, the overall event corresponding to each event group is generated through the large model, including: For each event group, a second event summary instruction corresponding to the event group is generated and sent to the large model based on the events in the event group, the associated field records of each event in the event group, and the second event summary prompt word. The large model responds to the second event summary instruction by generating the overall event corresponding to the event group based on the events in the event group and the associated field records of each event in the event group. The second event summary prompt is used to guide the large model to summarize the overall event corresponding to the event group and all the associated field records corresponding to the overall event based on the events in the event group and the associated field records of each event in the event group.

6. The method according to claim 1, characterized in that, The method further includes: Based on the overall events and key highlights prompts corresponding to all event groups, a key highlights summary instruction is generated and sent to the large model. The large model responds to the key highlights summary instruction and outputs the key highlights of the current program. The core highlights prompts are used to guide the large model to summarize the core highlights of the current program based on the overall events corresponding to all event groups. Based on the overall events corresponding to all event groups, construct the post-production script corresponding to the current program, including: Based on the overall events corresponding to all event groups and the core highlights, construct the post-production script corresponding to the current program.

7. The method according to claim 1, characterized in that, After dividing the current program's multiple script recordings sorted by time into multiple data blocks, the method further includes: For each data block, a first summary summary instruction for the data block is generated based on the field record and the first summary summary prompt word of the data block and sent to the large model. The large model is used to respond to the first summary summary instruction and output the initial summary corresponding to the data block. The first summary summary prompt is used to guide the large model to summarize the initial summary corresponding to each data block based on the field records of each data block.

8. The method according to claim 6, characterized in that, The method further includes: Based on the initial and second summary summary prompts of all data blocks, a second summary summary instruction is generated and sent to the large model. The large model is used to respond to the second summary summary instruction and output a summary of the current program. The second summary summary prompt is used to guide the large model to summarize the current program based on the initial summaries of all data blocks. Based on the overall events corresponding to all event groups, construct the post-production script corresponding to the current program, including: Based on the overall events corresponding to all event groups and the summary, construct the post-production script corresponding to the current program.

9. The method according to claim 1, characterized in that, The method further includes: For any two target individuals in the current program, obtain all script recordings containing the two target individuals from the plurality of script recordings; Based on all the scene logs and relationship analysis prompts of the two target characters, a relationship type analysis instruction is generated and sent to the large model. The relationship analysis prompts are used to instruct the large model to determine the relationship type of the two target characters based on all the scene logs of the two target characters. Based on the relationship type of any two target characters determined by the large model, a character relationship map of all characters in the current program is obtained; Based on the overall events corresponding to all event groups, construct the post-production script corresponding to the current program, including: Based on the overall events corresponding to all event groups and the character relationship graph, construct the post-production script corresponding to the current program.

10. An electronic device, characterized in that, include: At least one processor and a memory storing a computer program executable on the processor, wherein the processor executes the computer program to perform the script generation method according to any one of claims 1-9.

11. A non-volatile readable storage medium, characterized in that, The non-volatile readable storage medium stores a computer program, wherein the computer program, when executed by a processor, performs the script generation method according to any one of claims 1-9.

12. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the script generation method according to any one of claims 1-9.