Script generation and model training method and device, storage medium and program product

By extracting the definitions and regulations in real script data to guide the script generation model, the problem of simple and mechanical generation of live scripts in the existing technology is solved, and high-quality script generation is achieved that is more in line with actual needs.

CN119808728APending Publication Date: 2025-04-11BEIJING DONGCHEZU TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411882804.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The prior art fails to consider the needs and techniques of different live broadcast scenarios when generating live broadcast scripts, resulting in the generated scripts being too mechanical and unable to meet the actual needs.

Method used

By defining the specification based on real script data extraction, prompt information is constructed to guide the script generation model to generate scripts that meet the requirements of specific scenarios.

Benefits of technology

Improves the flexibility of script generation and the ability to meet actual needs, and improves the quality and usability of scripts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808728A_ABST
    Figure CN119808728A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and particularly provides a script generation and model training method and device, a storage medium and a program product. In the invention, the definition protocol is extracted based on the real script data and is used for describing the script characteristics and requirements of the corresponding script type, so that the prompt information is constructed based on the definition protocol and the script generation request initiated by the user in the script generation scene; therefore, the generation direction and range of the script generation model are guided and indicated based on the prompt information, so that the script content generated by the script generation model is more flexible, the script characteristics and requirements required by each script type are better met, the actual script application requirements are met, and the usability is relatively high. In conclusion, the technical scheme provided by the invention can solve the problems of simple and mechanical script generation mode and poor practicability in related technologies to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a method and device for script generation and model training, a storage medium, and a program product. Background Art

[0002] With the rapid development of the live broadcast industry, product live broadcast has become an important means of product sales and traffic promotion. Considering the live viewing experience, artificial intelligence (AI) technology can be used to generate high-quality live broadcast scripts to assist anchors in completing product live broadcasts.

[0003] The relevant technology is implemented through a general generative large model and a simple prompt project. Generally, simple product information is added to the prompt and input into the generative large model to obtain the live broadcast script output by the generative large model. However, this script generation method does not take into account the needs and skills of different live broadcast scenarios. The generation method is too mechanical, resulting in the generated live broadcast script not being able to meet the actual live broadcast needs and poor usability. For example, compared with other e-commerce live broadcast scenarios, the core goal of the quotation link in the car live broadcast scenario is to attract customers. If the relevant technology is used to generate the live broadcast script, the focus of the quotation link is to quote and guide users to place orders. This live broadcast script conflicts with the actual goal, cannot meet actual needs, and has no practical application possibility. Summary of the invention

[0004] The present disclosure is proposed in view of the above problems. The present disclosure provides a method and device for script generation and model training, a storage medium and a program product.

[0005] According to one aspect of the present disclosure, there is provided a script generation method, comprising:

[0006] Receive script generation request;

[0007] Based on the script generation request and definition specification, construct prompt information; wherein the definition specification is extracted based on real script data and is used to describe the script characteristics and requirements of the script type;

[0008] Generate a target script based on the prompt information using a script generation model;

[0009] Output the target script.

[0010] According to one aspect of the present disclosure, a model training method is provided, comprising:

[0011] Based on the definition specification of each script type and the current script generation model, a training sample is obtained, wherein the training sample includes: an input prompt and an output script; wherein the definition specification is extracted based on real script data and is used to describe the script characteristics and requirements of the script type;

[0012] The script generation model is fine-tuned using the training samples.

[0013] According to one aspect of the present disclosure, a sample construction method is provided, comprising:

[0014] Obtaining definition specifications of each script type, wherein the definition specifications are extracted based on real script data and are used to describe script characteristics and requirements of the script type;

[0015] Based on the definition specification of each script type and the current script generation model, a training sample is constructed, and the training sample includes: an input prompt and an output script.

[0016] According to another aspect of the present disclosure, there is provided a script generating device, comprising:

[0017] A transceiver unit, used for receiving a script generation request;

[0018] A processing unit, configured to construct prompt information based on the script generation request and definition specification; wherein the definition specification is extracted based on real script data and is used to describe the script characteristics and requirements of the script type;

[0019] The processing unit is further used to generate a target script based on the prompt information using a script generation model;

[0020] The transceiver unit is also used to output the target script.

[0021] According to another aspect of the present disclosure, there is provided a model training device, comprising:

[0022] An acquisition unit, used to acquire training samples based on the definition specifications of each script type and the current script generation model, wherein the training samples include: input prompts and output scripts; wherein the definition specifications are extracted based on real script data and are used to describe the script characteristics and requirements of the script type;

[0023] A training unit is used to perform fine-tuning training on the script generation model using the training samples.

[0024] According to another aspect of the present disclosure, there is provided a sample construction device, comprising:

[0025] An acquisition unit, used for acquiring definition specifications of each script type, wherein the definition specifications are extracted based on real script data and are used for describing script characteristics and requirements of the script type;

[0026] The construction unit is used to construct training samples based on the definition specifications of each script type and the current script generation model, and the training samples include: input prompts and output scripts.

[0027] According to another aspect of the present disclosure, there is provided a script generation system, comprising:

[0028] A script generating device, used to implement the script generating method described in any embodiment of the present disclosure;

[0029] Script to generate the model.

[0030] According to another aspect of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described in any one of the above embodiments.

[0031] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the method described in any of the above embodiments is implemented.

[0032] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method described in any one of the above embodiments is implemented.

[0033] As will be described in detail below, according to a method and device for script generation and model training, a storage medium and a program product of an embodiment of the present disclosure, in the present disclosure, the definition specification is extracted based on real script data and is used to describe the script characteristics and requirements of the corresponding script type. In this way, in the script generation scenario, prompt information is constructed based on the definition specification and the script generation request initiated by the user, so as to guide and indicate the generation direction and scope of the script generation model based on the prompt information, so that the script content generated by the script generation model is more flexible, and more in line with the script characteristics and requirements required by each script type, meeting the actual script application needs, and having strong usability. For example, in the quotation link in the above-mentioned car live broadcast scene, the present disclosure can extract the script characteristics and requirements of the quotation link based on the real script data of the real live broadcast data, and construct prompt information and generate the target script accordingly. The target script can meet the requirements of the definition specification of the quotation link, avoid the problem of poor practicality caused by the conflict between the target script and the definition specification, and is more flexible. In summary, the technical solution provided by the present disclosure can solve the problem of simple mechanical and poor practicality of the script generation method in the related technology to a certain extent.

[0034] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0036] Figure 1 A schematic diagram of a live broadcast script structure provided in an embodiment of the present disclosure.

[0037] Figure 2 A flowchart of a script generation method provided in an embodiment of the present disclosure.

[0038] Figure 3 A schematic diagram for comparing definitions and conventions provided in an embodiment of the present disclosure.

[0039] Figure 4 A schematic diagram of the extraction process of the definition specification provided in the embodiment of the present disclosure.

[0040] Figure 5 A schematic diagram of the process of obtaining excellent reference samples provided in an embodiment of the present disclosure.

[0041] Figure 6 A flowchart of a model training method provided in an embodiment of the present disclosure.

[0042] Figure 7 A schematic diagram of a flow chart of a sample construction method provided in an embodiment of the present disclosure.

[0043] Figure 8 A schematic diagram of the construction process of training samples provided in an embodiment of the present disclosure.

[0044] Fig. 9 A schematic diagram of a model training process provided in an embodiment of the present disclosure.

[0045] Fig.10 A schematic diagram of prompt information for a car live broadcast script provided in an embodiment of the present disclosure.

[0046] Fig.11 A flowchart of another script generation method provided in an embodiment of the present disclosure.

[0047] Fig.12 A structural block diagram of a script generation device provided in an embodiment of the present disclosure.

[0048] Fig.13 A structural block diagram of a model training device provided in an embodiment of the present disclosure.

[0049] Fig.14 A structural block diagram of a sample construction device provided in an embodiment of the present disclosure.

[0050] Fig.15 A structural block diagram of a script generation system provided in an embodiment of the present disclosure.

[0051] Fig.16 A hardware block diagram of an electronic device provided in an embodiment of the present disclosure.

[0052] Fig.17 A schematic diagram of a computer-readable storage medium provided for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present disclosure more obvious, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.

[0054] First, the embodiments of the present disclosure can be applied to any scenario related to script generation. Among them, the script can also be called a copywriting, which can be applied to various scenarios. Exemplarily, the scenarios to which the present disclosure is applicable may include but are not limited to at least one of the following: a live broadcast scenario, a marketing scenario, an advertising scenario, a publicity scenario, etc. Thus, the script to be generated involved in the present disclosure may include but is not limited to at least one of the following: a live broadcast script, a marketing script, an advertising script, a publicity script, etc.

[0055] Let's take an example. The live broadcast script is used to arrange the anchor's speech, process, etc. in the live broadcast scene. In the actual scene, the live broadcast script can also be displayed and prompted to the anchor in the form of live broadcast copy. With the development of the live broadcast industry, various products are widely sold and diverted through live broadcast. In the actual operation process, the anchor's professional live broadcast ability, product familiarity, and sales ability are uneven, which will lead to problems such as low attractiveness of live broadcast speech, lack of persuasiveness of live broadcast speech, insufficient smoothness of live broadcast process, and poor interactivity. These problems lead to poor live viewing experience for the audience, and thus fail to achieve the established product sales or live broadcast diversion goals. Therefore, using live broadcast scripts to prompt the anchor's speech, process, etc. can solve these problems to a certain extent, improve the live broadcast effect, and achieve the established goals. It should be understood that only the live broadcast scene is used as an example here. Other application scenarios of the script generation process also have similar problems. How to generate high-quality scripts that fit the actual scene goals has become a key issue in the field of script generation.

[0056] Furthermore, the script generation method provided by the present disclosure is specifically used to generate a text-based script (or referred to as a text-based copy). For example, in the above-mentioned live broadcast script scenario, the live broadcast script may include but is not limited to a process script and a speech script. The technical solution provided by the present disclosure focuses more on the generation of the speech script, so as to provide live broadcast assistance to the anchor through a high-quality speech script.

[0057] As described in the background technology above, the live broadcast script generation method in the related technology is usually implemented by using a general generative large model and a simple prompt project. That is, a simple speech convention (for example: generate a live broadcast script for a car) and store information are added to the prompt, and then the prompt is input into the large model to obtain the live broadcast script generated by the large model. However, this generation method simply and crudely relies on the language knowledge and text generation capabilities of the general generative large model itself, which also causes the live broadcast script generated thereby to be mechanical and general, and cannot meet the needs of custom script generation in actual scenarios.

[0058] Combination Figure 1 For example, Figure 1 A schematic diagram of a live broadcast script structure provided by an embodiment of the present disclosure. A live broadcast script generally includes multiple links (which can also be understood as specific live broadcast scenarios), for example, Figure 1 Specifically shows the anchor quotation link, professional explanation link, live broadcast link, it should be understood that Figure 1 The live broadcast links shown are only exemplary, and actual scenarios may have more or fewer links. Figure 1 As shown in the figure, different live broadcast links have different forms, contents and features. Take the quotation link as an example. The quotation link is to attract users to leave contact information through the interaction between the anchor and the user in the comment area, so as to achieve the purpose of attracting offline store traffic; the professional explanation link is mainly to explain professional knowledge through the anchor to show the professionalism of the anchor, product and brand, and increase user trust.

[0059] based on Figure 1 From the examples, we can see that the forms and characteristics of different live broadcasting scenarios are different, and the anchors’ words and professional knowledge at this stage are also different. If the live broadcasting script is generated based solely on the combination of the general generative large model and the simple prompt project in the relevant technology, the final generated script cannot effectively achieve the goals of each live broadcasting scenario (for example, it cannot meet the goal of attracting traffic to the store in the anchor’s quotation link), and it also lacks professional automotive knowledge and industry experience, is difficult to speak, and has poor usability.

[0060] For example, live streaming of cars is completely different from traditional e-commerce live streaming. In the quotation stage, live streaming of cars is required not to provide accurate price values, but to use roundabout words to guide users to leave personal information and go to the store for detailed discussions while revealing as little accurate price as possible. This involves many game-playing skills, but the general generative large model (such as GPT4) lacks experience and relevant knowledge in game-playing to drive traffic to the store through car live streaming, which makes it difficult for the generated script to meet the requirements of car live streaming and the generated script has poor usability.

[0061] In response to the above-mentioned problems in the related art, the present disclosure provides a new design concept: cluster analysis is performed on real script data, various script types are counted, and the characteristic elements of the words of each script type are further analyzed and the content organization requirements are refined, so as to form definition descriptions and requirements of various script types, that is, definition specifications; thereby, training samples are constructed based on this to fine-tune the script generation model, so that the content generated by the script generation model meets the requirements of the definition specifications; and / or, in actual application scenarios, prompt information is also constructed based on the definition specifications to guide the script generation model to generate a target script that meets the definition specifications of a specific script type; in this way, by using the definition specifications as part of the prompt information, the script generated by the script generation model is more in line with the generation requirements of its script type, thereby improving the quality and practicality of script generation.

[0062] Based on this design concept, the present disclosure provides a script generation method, a model training method, a sample construction method and related devices and systems.

[0063] Furthermore, in actual application scenarios, the sample construction method is used to construct training samples, which can be used for model training; accordingly, the model training method can use the training samples constructed by the sample construction method to implement model training, and then obtain a trained script generation model; further, the trained script generation model can be deployed online or offline, and can be used to respond to script generation requests initiated by the user side, that is, to generate the target script and output it to the user side. In actual implementation scenarios, the execution subjects of the above three methods may be the same, partially the same, or completely different. For example, the sample construction device and the model training device can be the same device, or deployed in the same device (or system), while the script generation device can be deployed independently. Or, for another example, the sample construction device, the model training device and the script generation device can be the same device or deployed separately. This is not exhaustive.

[0064] The execution subject of each of the above methods can be specifically a terminal or any other device or system for data processing. Among them, the terminal, which can also be called a terminal device, a user equipment (UE), a mobile station, a mobile terminal, etc., has data processing capabilities, and further, has direct or indirect (for example, through an external human-computer interaction device or a front end, etc.) human-computer interaction capabilities. Specifically, the terminal can be widely used in various scenarios, such as device-to-device (D2D), vehicle-to-everything (V2X) communication, machine-type communication (MTC), Internet of Things (IOT), virtual reality, augmented reality, industrial control, automatic driving, telemedicine, smart grid, smart furniture, smart office, smart wear, smart transportation, smart city, etc. Based on this, the terminal can be but is not limited to: a mobile phone, a tablet computer, a computer with wireless transceiver function, a wearable device, a vehicle, a drone, a helicopter, an airplane, a ship, a robot, a mechanical arm, a smart home device, etc. The embodiment of the present application has no special restrictions on the specific technology and specific device form adopted by the terminal.

[0065] The specific instructions are as follows.

[0066] This disclosure provides a script generation method, please refer to Figure 2 , Figure 2 The following is a flow chart of a script generation method provided by an embodiment of the present disclosure. Figure 2 As shown, the method includes:

[0067] S202: Receive a script generation request.

[0068] The script generation request is used to request the generation of a live broadcast script. In actual implementation scenarios, the script generation request generally comes from a request on the user side. The user can initiate a script generation request by inputting the requested content in the input box, or by clicking, long pressing, sliding or other custom specified operations. The present disclosure has no special restrictions on the operation part of human-computer interaction.

[0069] It should be noted that the script generation request can be a simple imperative request, which does not carry a customized requirement indication; for example, the script generation request can be specific to "please generate a live broadcast script". Alternatively, the script generation request can be a request that carries specific requirement indication information, and the content that can be indicated is not limited. Exemplarily, the requirement indication information that can be carried by the script generation request can include, but is not limited to: product information, script type, etc. One or more. For example, the script generation request can be specific to "please generate a live broadcast script for XX product", or "please generate a live broadcast script for XX product", or "please combine excellent examples of opening speeches and generate an opening script in a sincere and reliable style", etc., without exhausting them.

[0070] S204, constructing prompt information based on the script generation request and definition specification; wherein the definition specification is extracted based on real script data and is used to describe the script characteristics and requirements of the script type.

[0071] In the present disclosure, the definition specification is used to describe the script characteristics and requirements of a script type. In other words, the definition specification is used to explain what characteristics a script of a certain script type should meet.

[0072] In an exemplary embodiment, the definition specification may include but is not limited to at least one of the following: definition description, core goal, requirement description, and implementation skills. The definition description is used to refine the definition of the script type, the core goal is used to specifically point out the goal to be achieved by the script type, the requirement description is used to explain the restrictive requirements of the script type, and the implementation skills are used to indicate the verbal expression skills of the script type. It should be understood that there may be more or less definition specification content in the actual implementation scenario, which can be automatically determined based on the actual cluster analysis results or manually adjusted and determined, without limitation.

[0073] For easier understanding, please refer to Figure 3 , Figure 3 A schematic diagram of the comparison of definitions and specifications provided in the embodiments of the present disclosure is shown in FIG. Figure 3 The two defined protocols shown are for the following script types: the quotation scenario in the car live broadcast scenario mentioned above. Figure 3 As shown in Method 2, the definition of this live broadcast type includes the following points: definition of the positioning and goals of the quotation in the live broadcast, description of the core goals, and description of the requirements and skills. Figure 3 As shown in method 1, the definition specification of this live broadcast type includes: quotation method and requirements.

[0074] It should be noted that the definition specifications in this disclosure are not simply implemented by human definition, but are extracted based on real script data (such as real live broadcast data). In actual scenarios, real script data can be summarized and summarized through one or more means such as cluster analysis and model analysis to obtain definition specifications that are more in line with real scenarios. Figure 3 For example, Figure 3 Method 1 is an artificial definition of quotation words, while method 2 is based on statistical analysis and extraction of real live broadcast data. By comparison, it can be seen that through the analysis, induction and extraction of real script data, the definition specification of any script type can be given in a clearer and more detailed way, which is also more conducive to the quality of the subsequent generated scripts. The extraction method of the definition specification is explained in detail later, so it will not be repeated here.

[0075] It should be understood that the definition specifications of different script types are generally different. Among them, the script type is to evaluate and classify the script from different dimensions. In actual scenarios, the script type can be custom designed or automatically determined based on data analysis methods (described in detail later). Exemplarily, the script types involved in this disclosure may include but are not limited to at least one of the following: scene type, style type, and field type.

[0076] The scene type may also be referred to as a stage type, a speech type, etc., which is used to classify different scenes in a live broadcast. In an exemplary embodiment, the scene type may include but is not limited to at least one of the following: an opening scene, an interactive scene, a trust scene, a retention scene, a quotation scene, a retention scene, a broadcast end scene, etc., without exhausting them.

[0077] The style type is used to classify the live broadcast style (or anchor style). In an exemplary embodiment, the style type may include but is not limited to at least one of the following: sincerity, humor, strong affinity, etc., which are not exhaustive.

[0078] The field type is used to classify the field to which the live broadcast object (such as a product) belongs. In an exemplary embodiment, the field type may include but is not limited to at least one of the following: automobile field, food field, tourism field, home field, smart home field, etc., which are not exhaustive.

[0079] It should be understood that the above-mentioned classification of script types is only for illustrative purposes, and there may be more or fewer classification dimensions in actual scenarios. In addition, in actual scenarios, the above-mentioned classification dimensions can be used in combination, for example, Figure 4 In the illustrated embodiment, the script classification and the extraction of definition specifications are implemented by taking scene type and style type as examples.

[0080] When implementing this step specifically, that is, when constructing prompt information based on the script generation request and the definition specification, the script generation request and the definition specification can be used as part (or all) of the prompt information to construct the prompt information. In other words, the script generation request and the definition specification can be spliced ​​together to construct a prompt information. Further, the two can be directly spliced ​​together to obtain a prompt information, or the two can be spliced ​​together according to a certain format or template to construct a prompt information. In addition, after extracting key information (such as the demand indication information carried by the script generation request, etc.), the extracted information can be spliced ​​to construct the prompt information.

[0081] In addition, it should be understood that the definition specification used in this step is related to the script generation request. For the sake of convenience, it is recorded as the definition specification of the target script type. The target script type is the script type used when the present solution is actually applied to script generation. Specifically, the target script type can be the script type indicated by the script generation request, or it can be a script type that is customized and determined based on the script generation request, which will be described in detail later.

[0082] In addition, it should be noted that in the actual implementation scenario, S204 and S206 can be steps executed by the script generation device in the background, and do not need to be visible to the front end. For example, the definition specifications of different script types can be invisible to the user; or S204 can be a step visible to the front end, for example, different script types and their definition specifications can be selected or displayed to the user through human-computer interaction. The specific implementation method can be customized based on the actual scenario requirements.

[0083] S206, using the script generation model to generate a target script based on the prompt information.

[0084] In the present disclosure, the script generation model can be specifically a generative model. The generative model in this step can be a general generative large model (such as GPT4), or a generative large model pre-trained with professional knowledge, or a generative large model trained with defined specifications, or a combination of the above methods, etc., and the present disclosure does not limit this.

[0085] In an exemplary embodiment, the script generation model adopted by S206 can be a pre-trained model based on at least one of the general generative large model and based on definition specifications, professional knowledge, etc.; thus, in this embodiment, the script generation model not only has the professional knowledge of the corresponding scenario to avoid the problem of knowledge illusion, but also can better utilize the definition specifications to output high-quality scripts that are more in line with the requirements of the definition specifications and the needs of the actual scenarios.

[0086] In the present disclosure, the script generation model is used to generate the target script based on the prompt information, wherein the target script includes one or more script types. In addition, the number of script generation models used in this step can also be one or more.

[0087] Specifically, in one embodiment, the script generation model can generate a script of a certain script type, for example, the script generation model is used to generate a live script for the quotation link. In a further possible implementation, the script generation model at this time can be a script generation model for a specific script type, so that in order to generate a complete live script, it can be achieved by combining script generation models of multiple script types. For example, script generation model 1 is specifically used to generate a live script for the opening scene, script generation model 2 is specifically used to generate a live script for the quotation scene, and script generation model 3 is specifically used to generate a live script for the download scene. In this way, by combining the three models, a group of combined scripts including opening, quotation, and download can be generated. In this case, if the script generation model is pre-trained based on the definition specification, then, in order to ensure the training effect of the script generation model, the script generation model can be trained based on sample data of a script type. In another possible real method parallel to it, the script generation model has the ability to generate a target script containing multiple script types, but can generate a script of a specific script type based on a script generation request.

[0088] Alternatively, in another embodiment, the script generation model can generate a target script containing multiple script types. For example, the script generation model can be used to generate a complete live broadcast script including an opening scene, an interactive scene, a trust scene, a retention scene, a quotation scene, a capital retention scene, and a download scene. As mentioned above, the script generation model can also be used to generate a live broadcast script for a single scene. In this embodiment, if the script generation model is pre-trained based on the definition specification, then, in order to ensure the training effect of the script generation model, the script generation model can be trained based on sample data of multiple script types.

[0089] The generative model can generate content under the guidance of prompt information. The present disclosure utilizes this feature and uses the definition specification as part of the prompt information to guide the script generation model to generate a script that conforms to the definition specification. In this way, the generated target script can generally have the information required by the definition specification, which is more in line with the actual needs of the script type and has high practicality. For example, in the above-mentioned live car quotation scenario, the definition specification of the scenario is used as part of the prompt information of the script generation model, which can control the direction and scope of the script generated by the script generation model to a certain extent, so that the target script finally generated meets the indirect quotation required by the scenario and guides users to leave information.

[0090] S208, output the target script.

[0091] Based on the aforementioned processing, the present disclosure can utilize the script generation model to generate a target script that satisfies both the user's script generation request and the relevant definition specifications under the instruction of the prompt information. In this way, when this step is implemented, the generated target script can be directly output. The present disclosure does not limit the output method. For example, it may include but is not limited to: one or more combinations of output methods in text, image, voice, and video. For example, the target script can be directly displayed on the host's prompt screen to facilitate the host's reference prompts; for another example, the target script can be output in audio form to the user's headphones, speakers, mobile phones and other audio output devices; not to be exhaustive. In addition, the target script can be output as a whole at one time after the generation is completed, or it can be output and displayed in real time based on the currently generated content, presenting a user experience of AI in anthropomorphic thinking.

[0092] In addition, in actual scenarios, in order to further improve the degree of matching with user needs, multiple scripts can be generated simultaneously or sequentially in the aforementioned S206. When executing this step, multiple scripts can be output together as target scripts, or multiple scripts can be aggregated into one target script for output.

[0093] As mentioned above, the script generation method provided by the present disclosure can be used in one or more scenarios such as live broadcast, marketing, advertising, and promotion. Based on this, the target scripts involved in the present disclosure may include but are not limited to at least one of the following: live broadcast script, marketing script, advertising script, and promotion script.

[0094] In summary, in the present disclosure, the definition specification is extracted based on the real script data and is used to describe the script characteristics and requirements of the corresponding script type. In this way, in the script generation scenario, prompt information is constructed based on the definition specification and the script generation request initiated by the user, so as to guide and indicate the generation direction and scope of the script generation model based on the prompt information, so that the script content generated by the script generation model is more flexible and more in line with the script characteristics and requirements required by each script type, meeting the actual script application needs and having strong usability. For example, in the quotation link in the above-mentioned car live broadcast scenario, the present disclosure can extract the script characteristics and requirements of the quotation link based on the real script data of the real live broadcast data, and construct prompt information and generate the target script accordingly. The target script can meet the requirements of the definition specification of the quotation link, avoid the problem of poor practicality caused by the conflict between the target script and the definition specification, and is more flexible. In summary, the technical solution provided by the present disclosure can solve the problem of simple mechanical and poor practicality of the script generation method in the related technology to a certain extent.

[0095] In the above-mentioned embodiments of the present disclosure, the definition specification of the script type is implemented. In the actual implementation scenario, the definition specification used in S204 can be obtained and determined in real time before executing S204; or, a more preferred way is to obtain the definition specification of each script type in advance and store and maintain it, so that when executing S204, the definition specification of one or more script types can be directly read and used.

[0096] Specifically, the script generation method may further include: obtaining a definition specification. When implemented specifically, it may be implemented in the following manner: first, the real script data is classified and sorted to obtain a first sample set of each script type; then, for any of the script types, a statistical analysis is performed on the first sample set corresponding to the script type to determine the definition specification corresponding to the script type.

[0097] Exemplarily, the present disclosure provides a new statistical analysis method: statistical analysis of a first sample set is implemented through a generative model to obtain its corresponding definition specification. At this time, in the script generation method, the method may also include: classifying and organizing the real script data to obtain a first sample set of each script type; for any one of the script types, using a first model to perform data analysis on the first sample set to obtain the definition specification of the script type; wherein the first model is a generative model. Similar to the script generation model mentioned above, the first model may be a general generative model that has not been specially processed, or the first model may be a model that is pre-trained on the basis of a general generative model by further using the association between data and the definition corresponding to the data.

[0098] When implementing statistics and extraction of definition specifications based on the above-mentioned first model, it is also necessary to construct prompt information for the first model (recorded as prompt information 1 for distinction). For example, the prompt information 1 may be specific as follows: Please summarize the characteristics, requirements, and skills of the first sample set 1. For another example, the prompt information 1 may be specific as follows: Please determine what characteristics and requirements of the first sample set 1. It should be understood that the prompt information 1 in the actual scenario can be more complex and can be customized. In this way, the prompt information 1 is input into the first model, and then the result output by the first model is directly obtained to obtain the definition specification of the quotation speech.

[0099] In addition, further, for any script type, after obtaining the result of the first model output, it can be further displayed to the user, and the user's operation information on the output result can be obtained, and the final definition specification can be determined based on the operation information. Among them, the user's operation on the output result can include but is not limited to at least one of the following: editing (including one or more of adding, deleting, and modifying), determining, and regenerating (regenerating the definition specification at this time until the user confirms). In other words, the present disclosure can further, after using the generative model to summarize the definition specification of a certain script type, it can also be further assisted by manual calibration, so as to obtain a more accurate definition specification that fits the actual scene requirements.

[0100] In addition, in the embodiment of the present disclosure, the real script data is classified and organized to obtain the first sample set of each script type, which can be achieved in the following way: the real script data is segmented to obtain multiple segmented samples; the script type of each segmented sample is determined, and the first sample set of each script type is determined.

[0101] Among them, the segmentation process in this embodiment takes into account that the general real script data is large. For example, a live broadcast process may take several hours, and the data volume of the real live broadcast data is large; therefore, when performing the aforementioned classification and sorting, the real script data can be first segmented to reduce the amount of data for subsequent processing, which is also more conducive to subsequent classification and model induction and summary. In specific implementation, the real live broadcast data can be split into small data volumes based on one or more granularities such as time granularity (for example, segmentation is performed every 1 minute), anchor speaking interval (for example, segmentation is performed when the pause interval between two sentences exceeds a threshold), live broadcast screen (for example, the car live broadcast scene segments the car screen and the person screen), etc., to obtain multiple segmentation samples, and on this basis, further determine the script type to which each segmentation sample belongs. The aforementioned segmentation granularity and its implementation method, numerical value, etc. are all exemplary descriptions, and can be customized in actual scenarios.

[0102] After the above segmentation process is implemented, segmentation samples based on the segmentation of real live data can be obtained. Thereafter, they are classified to determine the script type of each segmentation sample, and further determine the first sample set corresponding to each script type.

[0103] As mentioned above, the script type in the present disclosure can be a user-defined setting or can be determined based on data features. Specifically, in the above-mentioned step of classifying and arranging the real script data, it can be achieved through one or more methods such as manual classification, generative model classification, classification model classification, classification based on attribute features (such as keywords, products and other arbitrary attributes) or other possible dimensions, and preset classification algorithm classification.

[0104] For example, a small number of split samples can be labeled with script types and a classification model can be trained based on this. Then, the split samples of real script data can be input into the classification model to obtain the script type output by the classification model, thereby achieving classification and organization of the real script data.

[0105] For another example, prompt information 2 may be constructed and input into the generative model, so that the generative model determines and outputs the category to which each segmented sample belongs based on prompt information 2. Further, in a possible implementation of this embodiment, prompt information 2 input into the generative model may include a basic definition (which may include: an initial manual definition of the script type based on expert experience, which may refer to Figure 3 Method 1; one or more of the definition specifications determined in the last iteration or the last time), classification algorithms, etc. For example, prompt information 2 may be specific as follows: Please determine the script type of each segmented sample based on the basic definition of N script types. For another example, prompt information 2 may be specific as follows: Please determine the script type of each segmented sample based on classification algorithm XX. There are no special restrictions and they are not enumerated here. In addition, if the classification and sorting step is implemented by a generative model, the generative model and the aforementioned first model may be the same model, or may be different models (for example, recorded as a third model).

[0106] Combination Figure 4 For example, Figure 4 A schematic diagram of the extraction process of the definition specification provided in the embodiment of the present disclosure.

[0107] When obtaining the definition specification of one or more script types, a certain scale of live broadcast real ASR data can be obtained online. Figure 4 As shown in , M live broadcast data can be obtained, that is, M ASR data can be obtained. Considering that the ASR data of a complete live broadcast has a large amount of data and a long data duration, which is not conducive to model induction and summary, the ASR data of the entire live broadcast can be segmented. Figure 4 As shown, the above M ASR data are segmented and processed to obtain N live ASR segments (which can also be recorded as N ASR segments or N ASR segmentation samples). The segmentation method can be based on the time granularity. For example, if the interval between two adjacent sentences of the anchor reaches a preset first threshold, it can be considered that these are two independent sentences that do not affect each other. The segmentation will not destroy the semantic integrity of the sentence, and the data can be segmented between the two sentences. Other segmentation methods are also possible, please refer to the previous text and will not be repeated here.

[0108] After completing the data segmentation, each live ASR segment can be classified and sorted. Figure 4The embodiment shown is based on the third model to implement classification and sorting of each live ASR segment. In specific implementation, multiple customized scene types can be initially manually defined based on expert experience, for example Figure 3 Method 1 shown; or obtaining the current definition specification (i.e., the definition specification update scenario described later, which will not be described here). In this way, the manually defined or current definition specification is used as the basic definition, and prompt information 2 is constructed based on the basic definition, and the prompt information 2 is used to instruct the generative model to classify the script types of N live ASR segments based on the basic definition. In this way, the prompt information 2 is input into the third model (i.e., the generative model mentioned above), and the classification results of the N ASR segments output by the third model can be obtained. Based on the classification results, the set of ASR paragraphs corresponding to each script type can be determined, i.e., the first sample set. Figure 4 Two script classification schemes are shown as examples: one is a script classification scheme based on scene type, Figure 4 The example shows the opening speech set (i.e., the first sample set corresponding to the script type of the opening scene) and the interactive speech set (i.e., the first sample set corresponding to the script type of the interactive scene); the other is a script classification scheme based on style type, Figure 4 The humorous character set (i.e., the first sample set corresponding to the humorous style script type) and the affinity set (i.e., the first sample set corresponding to the affinity style script type) are shown as examples. The number of first sample sets corresponding to each script type is not limited and can be determined based on actual conditions. It should be understood that Figure 4 This is for illustrative purposes only and is not intended to limit the scope of script types.

[0109] After that, the definition specifications of each first sample set can be summarized and extracted based on the aforementioned first model. In specific implementation, prompt information 1 can be constructed first, and prompt information 1 is used to instruct the generative model to summarize and extract the definition specifications of the first sample set. In this way, by inputting prompt information 1 into the first model, the definition specifications of each script type output by the first model can be obtained, for example Figure 3 As shown in method 2.

[0110] Based on the above processing, the definition specifications of any one or more script types can be obtained. The above definition specifications can be maintained in a specified location for use in Figure 2 The prompt information is constructed in the script generation method shown, and / or can also be used in at least one of the model training methods and sample construction methods described later.

[0111] In addition, in actual scenarios, the definition specifications can also be updated regularly. For example, based on the triggering of regular, periodic, user instructions or other one or more custom trigger conditions, the real live broadcast data updated in the recent period (customized, such as the latest update cycle, the latest month, etc.) is re-acquired according to the above method for each script type, so that the definition specifications can match the actual needs. When re-acquiring the definition specifications, the current definition specifications can be used as the basic definition for data classification.

[0112] Taking the car live broadcast scenario as an example, through the above processing, the embodiment of the present disclosure can use the generative model (such as the first model) to perform cluster analysis on the collected real car live broadcast speech (that is, the real speech script data), count the common script types, and further perform characteristic element analysis and content organization requirements on the speech of each script type, and finally form the definition specification of each script type. The definition specification can be used for the evaluation and analysis of the quality of samples, scripts, etc., for example, for the evaluation and analysis of generated scripts; it can also be added to the prompt (that is, as shown in Figure 2 The prompt information shown in the figure becomes a part of the prompt, guiding the generation of a large live broadcast model to generate higher quality live broadcast script copy.

[0113] Based on the above processing, whether the definition specification of one or more script types is obtained in real time, or it is generated and stored in advance for retrieval at any time when used, the definition specification of the target script type can be obtained before executing S204. As mentioned above, the definition specification used in implementing the above S204 can be related to the script generation request.

[0114] In an exemplary embodiment, the above S204 can be implemented as follows: based on the script generation request, the definition specification of the target script type is obtained; then, the script generation request and the definition specification are spliced ​​to obtain the prompt information; and the prompt information is constructed, and the prompt information includes the definition specification and the script generation request. The method for obtaining the definition specification of the target script type and the method for splicing and constructing the prompt information are referred to above and will not be repeated here.

[0115] In this embodiment, the target script type is indicated by the script generation request, or the target script type is determined based on a preset rule or randomly.

[0116] As mentioned above, the script generation request may carry certain demand indication information, which may be used to indicate the target script type associated therewith. For example, if the script generation request indicates the generation of a live broadcast script in a sincere and reliable style, then the sincere and reliable style type (a type of script type) can be used as the target script type for subsequent script generation; for another example, if the script generation request indicates the generation of a live broadcast script containing opening, quotation, interaction, and capital retention scenes, then the target script types include: opening scene, quotation scene, interaction scene, and capital retention scene. It should be noted that in actual scenarios, the target script type may only include the script type indicated by the script generation request, or it may include but is not limited to the script type indicated by the script generation request. For example, in the above example, the script generation request indicates the generation of a live broadcast script in a sincere and reliable style, but does not specify its scene type. The target script type includes the sincere and reliable type in the style type dimension, and may also include a custom scene type or field type. Not exhaustive.

[0117] In another possible implementation, the script generation request may not clearly indicate or describe the script type to be generated (or does not clearly describe a certain type of script, such as the last example in the previous paragraph). In this case, the present disclosure may determine the target script type based on any custom algorithm or rule. Specifically, the target script type determined at this time can be determined from one or more of the scene type, style type, domain type, or other custom dimension types, and for any dimension type, such as the scene type of the scene dimension, the target script type can be one, multiple, or all of all types currently maintained.

[0118] For example, if the script generation request is "please generate a live broadcast script", then when actually implementing this solution, only the scene type can be considered. Further, the scene type can be determined as a full-process type of opening scene, interactive scene, trust scene, retention scene, quotation scene, capital retention scene, and off-air scene. Alternatively, one or more of the above scene types can be randomly selected. Alternatively, the script type most used by the current user (or anchor) can be selected from the above scene types.

[0119] For another example, if the script generation request is "Please generate a live broadcast script", then when actually implementing this solution, the scene type, style type and field type can be considered at the same time. Among them, the method of determining the specific script type for the scene type and style type is the same as the previous paragraph and will not be repeated. For example, the scene type can be determined as a full-process type of opening scene, interactive scene, trust scene, retention scene, quotation scene, capital retention scene, and offline scene, and the style type can be randomly selected from one of them, such as a strong affinity style type. In addition, the field type can be directly determined based on the product or preset in advance.

[0120] For another example, if the script generation request is "please generate a script for the quotation session of a car live broadcast", when actually implementing this solution, it can be determined that the target type at least includes: car field (field type), quotation scene (scene type). On this basis, the style type or other custom types can be further determined, which will not be repeated.

[0121] Based on any of the above embodiments, the present disclosure further provides a possible implementation method: the prompt information constructed in the above S204, in addition to including the script generation request and the definition specification, can also further combine one or more of professional knowledge and excellent reference samples. In other words, in this embodiment, the prompt information also includes at least one of the following:

[0122] Professional knowledge, the professional knowledge including at least one of the following: industry knowledge, product knowledge, product evaluation knowledge;

[0123] Excellent reference sample.

[0124] Among them, professional knowledge refers to professional knowledge in the field related to the scenario in which the script generation method is applied. In the actual scenario, it can be determined based on the field type indicated by the script generation request. For example, when the script generation method is applied to the car live broadcast scenario, that is, when the script generation request is used to request the generation of a car live broadcast script, the professional knowledge can be professional knowledge in the automotive field. Among them, industry knowledge is used to describe any relevant knowledge in the industry, and this part of data can generally be maintained through an industry knowledge base. Taking the automotive field as an example, the industry knowledge in this field can be general knowledge in the automotive industry, such as a socialized model library, a car structure library, a car information knowledge base, a car review data, any other publicly queried automotive industry knowledge, knowledge that can be queried on the network, etc., without exhaustive enumeration. Product knowledge is generally maintained by product owners, sellers, marketers, etc. For example, in the car live broadcast script generation scenario, the product knowledge base stored by itself can be called (it can be confidential data that is not disclosed to the public, or it can be product library data that is disclosed to the public, without restriction) as part of the prompt information, so as to generate a script that is more in line with the actual product needs. In addition, based on different product types, the content and maintenance methods of different product knowledge are different, and the present disclosure has no special restrictions on this. Product evaluation knowledge refers to the evaluation data of products, which can generally be maintained through one or more methods such as online vehicle review database, product review interface data, etc.

[0125] In actual scenarios, professional knowledge can be obtained based on the various professional knowledge bases described above, such as automobile knowledge bases, online car review bases, etc. The present disclosure has no special restrictions on the method of acquiring professional knowledge. In other words, when the script generation model is specifically used to generate the target script, it is also possible to retrieve professional knowledge from the professional knowledge base and add it to the prompt information to enrich the professionalism of the generated script. At this time, each professional knowledge base can be applied to this solution based on the Retrieval-Augmented Generation (RAG) mechanism.

[0126] In one embodiment of the present disclosure, when executing S204, it also includes: retrieving the professional knowledge related to the script generation request in the professional knowledge base; thus, when executing S204, the professional knowledge can be used as part of the prompt information to construct the prompt information. At this time, the prompt information constructed by S204 includes: a script generation model, a definition specification of the target script type, and professional knowledge. The professional knowledge in this embodiment can also be indicated by the script generation model (for example, if a request is made to generate a car live broadcast script, the professional knowledge is professional knowledge in the automotive field), or it can be freely selected and determined, and no further details are given. Using professional knowledge as prompt information for the script generation model enables the script generation model to generate a script that is more in line with professional field cognition and more conducive to obtaining a high evaluation under the guidance of credible professional knowledge, so that the script generated in this way has a higher degree of fit with real scenes, products, and fields, and is more practical.

[0127] In the disclosed embodiments, during the SFT training and / or application reasoning process of the script generation model, professional knowledge can be further introduced from an external professional knowledge base through RAG based on actual needs (such as the vehicle model information given by the script generation request), for example, introducing car review information related to vehicle models and topics; adding this professional knowledge to the context of the prompt information can further help the model generate content that is more relevant to the product and topic, which helps to further alleviate the large model hallucination problem.

[0128] Among them, excellent reference samples are used to assist the script generation model to refer to excellent samples for script generation. In actual scenarios, excellent reference samples can be maintained as a whole (for example, maintaining excellent samples of multiple complete live scripts), or they can be maintained separately based on script types. In actual scenarios, if there is no excellent reference sample for reference to the script generation model, the live script generated by the script generation model may have problems such as low quality, disordered speech structure, and poor spoken language. In order to improve this problem in a targeted manner and further improve the quality of the script, the present disclosure adds excellent reference samples to the prompt information for reference by the script generation model, and adopts the context learning strategy for reference and learning, which avoids problems such as disordered speech structure and poor spoken language, and also improves the quality of the script. In addition, in the prompt information constructed in different scenarios, the excellent reference samples used can be different, which makes the prompt information highly random, which can also ensure the content diversity of the generated script and avoid the situation where the content similarity of the generated script is too high.

[0129] In addition, the excellent reference samples can be selected and determined from a preset sample set (such as the first sample set mentioned above) based on a preset evaluation method. There can be multiple preset evaluation methods. For example, the excellent reference samples can be determined based on one or more evaluation methods such as manual evaluation, algorithm evaluation, and definition and specification evaluation.

[0130] Exemplarily, in one embodiment of the present disclosure, the script generation method may further include: for any script type, using the definition specification to evaluate the first sample set of the script type; based on the evaluation result, extracting the excellent reference sample from the first sample set. In this embodiment, the definition specification that has been acquired and the first sample set that is classified and sorted in the process of acquiring the definition specification can be directly used to process them to extract the excellent reference samples therein.

[0131] In specific implementation, the evaluation and analysis of each segmented sample in the first sample set can be achieved through one or more methods such as a generative model, a pre-selected trained evaluation model, semantic analysis combined with similarity matching, etc.

[0132] Exemplarily, evaluating the first sample set of the script type by using the definition specification may include the following steps: based on the definition specification, using a second model to evaluate and analyze the first sample set to obtain the evaluation result.

[0133] Among them, the second model is a generative model, or the second model is a pre-trained evaluation classification model. In other words, the second model is used to evaluate the matching or satisfaction degree of each segmented sample in the first sample set with the definition specification as a benchmark and score (which can be called quality scoring, quality score, evaluation score, etc.), thereby outputting one or more excellent samples that better meet the definition specification (in actual processing, samples with quality scores reaching a preset threshold, or a preset number of samples with higher quality score rankings can be output). Alternatively, the second model can also be used to output the quality score of each sample in the first sample set based on the definition specification, and then, the present disclosure can select samples above the preset threshold based on the quality score, or select multiple samples with higher quality scores as excellent reference samples. In addition, if the second model is a generative model, when constructing a prompt information (recorded as prompt information 3) for it, the prompt information 3 contains the definition specification. No further details are given.

[0134] In addition, based on the fact that excellent reference samples can be determined based on any of the above methods, the method may further include: maintaining the excellent reference samples using a second sample set. In other words, the second sample set is used to maintain the excellent reference samples. Further, the second sample set can be used to maintain excellent reference samples of multiple script types (e.g., all types), or one second sample set corresponds to one script type, and the second sample set is used to maintain excellent reference samples of the corresponding script type.

[0135] For example, please refer to Figure 5 , Figure 5 Schematic diagram of the process of obtaining excellent reference samples provided by the embodiment of the present disclosure. Figure 5 As shown, the second model can evaluate and analyze the corresponding first sample set based on the definition specifications corresponding to each script type, and output excellent reference samples. In this way, an excellent reference sample set corresponding to each script type can also be obtained, that is, Figure 5 The second sample set shown in FIG. Figure 5 When obtaining the excellent reference samples shown, the second model can process samples of only one script type at a time, or can process samples of multiple script types at one time, without any special restrictions.

[0136] Thus, on the basis of maintaining the second sample set, when executing the step of constructing the prompt information in S204, the following step may be further included: obtaining the excellent reference sample in the second sample set of the target script type. Thus, when constructing the prompt information, the excellent reference sample may be used as a part of the prompt information to complete the construction of the prompt information.

[0137] Among them, when constructing the prompt information of the script generation model (i.e., S204), the excellent reference samples used can specifically be excellent reference samples of the target script type. In this embodiment, the prompt information constructed in S204 includes: a script generation request, a definition specification of the target script type, and excellent reference samples of the target script type. The present disclosure has no special restrictions on the number of excellent reference samples of the target script type contained in the prompt information. The number can be customized, or all samples in the second sample set corresponding to the target script type can be involved in the processing. In addition, when selecting some of the samples, they can be randomly selected or selected according to a preset algorithm, and there is no restriction on this.

[0138] In other words, when S204 is implemented, if the excellent reference samples are used as part of the construction prompt information, it is only necessary to obtain the excellent reference samples before S204 is executed. At this time, similar to the definition of the specification, the above method can be executed in real time to obtain excellent reference samples before S204 is executed, or the excellent reference sample set (i.e., the above second sample set) can be maintained in advance, and when S204 is executed, the excellent reference samples participating in the processing can be selected from the second sample set.

[0139] In summary, the script generation method provided by the present disclosure can indicate or limit the generation scope of the script generation model based at least on the script generation request and the definition specification, so as to improve the quality of its script generation, so that the generated script can meet the requirements of the definition specification of the script type to which it belongs, and improve its practicality. On this basis, further, in the present disclosure, when the script generation model is specifically used for script generation, it can also further refer to one or more of professional knowledge and excellent reference samples, so that the script generation model can generate scripts in a high-quality direction, which can enrich the knowledge breadth and depth of the script generation model, improve the output capacity and output quality, and avoid the problem that the script text generated by the model is just an illusion, so that the generated script is more solid and more in line with actual needs.

[0140] In addition, as mentioned above, the script generation model used in the present disclosure can be a general large model, or it can be a generative large model pre-trained with defined specifications; in addition, it can further be a generative large model pre-trained with professional knowledge. Thus, in some possible embodiments of the present disclosure, the script generation method can also include the following steps: pre-training the script generation model. The pre-training method adopted in the present disclosure includes but is not limited to: supervised fine-tuning (Supervised Fine-Tuning, SFT).

[0141] In an exemplary embodiment, the script generation method may further include: Figure 6The model training method shown. In this embodiment, the execution subject of the model training method is the same as that of the script generation method, and is not repeated. The model training method is specifically described below.

[0142] This disclosure provides a model training method, please refer to Figure 6 , Figure 6 A flow chart of a model training method provided in an embodiment of the present disclosure. Figure 6 As shown, the method includes:

[0143] S602, based on the definition specification of each script type and the current script generation model, obtain training samples, the training samples include: input prompts and output scripts; wherein the definition specification is extracted based on real script data and is used to describe the script characteristics and requirements of the script type.

[0144] The current script generation model involved in this step has different forms in different scenarios. For example, in the initial model training scenario, the current script generation model can be a general generative large model, or it can be a model obtained by pre-training a general generative large model using professional knowledge. For another example, in the subsequent model application scenario, when the script generation model needs to be updated regularly, that is, in the model update scenario, the script generation model can be the current script generation model to be updated; in Figure 6 In the illustrated embodiment, the script generation model may actually be a generative model that has been pre-trained using a defined specification.

[0145] The definition of the specification and its acquisition method are referred to above and will not be described in detail. In addition, in the above-mentioned model update scenario, the training samples used to train the model can be determined based on new real script data in the recent period, and / or the definition of the specification can also be updated based on new real script data in the recent period.

[0146] In terms of specific content, a training sample may include an input prompt and an output script, wherein the input prompt is equivalent to the prompt information in the actual application scenario, and the output script is equivalent to the target script in the actual application scenario. Different from the related art, the training sample in the present disclosure is related to the definition specification.

[0147] It should be noted that this step is used to obtain training samples, and the training samples can be constructed and stored in advance, so that the training samples can be directly obtained when executing this step, or the training samples can be constructed when pointing to this step. That is, in a possible embodiment, this step can be specifically: constructing training samples based on the definition specifications of each script type and the current script generation model. For ease of understanding, the present disclosure further provides a sample construction method, which will be described later in conjunction with Figure 7 The specific instructions will not be repeated here.

[0148] S604: fine-tune the script generation model using the training samples.

[0149] In the present disclosure, there is no need to make large-scale adjustments to the script generation model. Instead, the script generation model only needs to be fine-tuned using the aforementioned training samples, so that the generative large model can learn the relationship between the input prompt and the output script, and thus can be used in subsequent application scenarios (e.g. Figure 2 The script generation scenario shown in the figure) generates a target script that better meets the requirements of the definition specification. The present disclosure has no special restrictions on the data volume and data type of the training samples, and the selection can be customized based on the actual application scenario.

[0150] The present disclosure also provides a sample construction method. The training sample constructed by the sample construction method can be applied to the model training process in any of the above embodiments. In other words, in one embodiment of the present disclosure, the above S602 can be Figure 7 This can be achieved by using the sample construction method shown.

[0151] Please refer to Figure 7 , Figure 7 A flow chart of a sample construction method provided in an embodiment of the present disclosure. Figure 7 As shown, the sample construction method includes:

[0152] S702, obtaining definition specifications of each script type, wherein the definition specifications are extracted based on real script data and are used to describe script characteristics and requirements of the script type.

[0153] For the definition specification and its acquisition method, please refer to the previous article. When implementing this step, the definition specification can be extracted in real time, or the definition specification stored for maintenance can be directly read. The definition specification can also be updated regularly or periodically. I will not go into details.

[0154] S704, constructing training samples based on the definition specifications of each script type and the current script generation model, the training samples including: input prompts and output scripts.

[0155] Specifically, to construct training samples, it is necessary to first construct an input prompt, then determine the input script based on it, and use the two as a set of training samples.

[0156] In an exemplary embodiment, the step of constructing a training sample based on the definition specification of each script type and the current script generation model includes:

[0157] Step 1: construct an input prompt for the definition specification including at least one script type.

[0158] The input prompt constructed in this process can be constructed based only on the definition specification. Alternatively, in addition to being related to the definition specification, the input prompt can also be further related to one or more of professional knowledge and excellent reference samples.

[0159] In an exemplary embodiment, an input prompt can be constructed based on the definition specification and excellent reference samples of at least one script type. Figure 8 , Figure 8 The following is a schematic diagram of the construction process of the training samples provided in the embodiment of the present disclosure. Figure 8 As shown, we can sample the excellent reference samples in the second sample set and add the definition of the corresponding script type to form an input prompt. In this way, in the subsequent model training scenario, the script generation model can use the context learning mechanism to learn the excellent expressions attached to the excellent reference samples, which can avoid problems such as disordered script structure and poor colloquialism, and significantly improve the quality of script generation.

[0160] In actual scenarios, this step can obtain the input prompt obtained by the user operation through human-computer interaction. Alternatively, the prompt information of the real script data can be summarized and analyzed to obtain the prompt information expression corresponding to a certain script type. Alternatively, a templated method can be used to substitute the definition specification into a preset template to construct an input prompt. Alternatively, a combination of any two of the above methods. This is not exhaustive or limiting.

[0161] Step 2: Generate a script based on the input prompt using the current script generation model to obtain at least one output content corresponding to the input prompt.

[0162] After the input prompt is input, the current script generation model can generate and output content based on it. For any input prompt, after being processed by the current script generation model, one or more corresponding output contents can be obtained. For example, Figure 8 The example shows x live broadcast scripts (i.e., output content) output by the script generation model.

[0163] Step 3: determine the output script in at least one of the output contents, and use the output script and the input prompt as a set of training samples.

[0164] The output script determined in this step is determined based on the output content, and the number of the two can be the same or different, and the content of the two can be the same or different. In a possible embodiment, all output contents can be directly determined as output scripts, which is equivalent to directly determining the output content obtained in step 2 as the output script without executing step 3, that is, directly obtaining a set of training samples consisting of relevant input prompts and output contents.

[0165] In another possible embodiment, the present disclosure further provides users with the ability to adjust, edit or confirm the output content to avoid uncontrollable problems such as poor quality and large deviation of the output content of the current script generation model. In other words, on the basis of the aforementioned step 2, a manual correction mechanism is superimposed to ensure the reliability of the training sample data.

[0166] In a specific implementation, one possible way is to use a third model to evaluate and analyze the output content based on the definition specification, and determine one or more output contents with the highest evaluation results as the output script. The third model is a generative model, or the third model is a pre-trained evaluation model. In this embodiment, the output content can be further evaluated based on the definition specification, so that part of the output content with higher quality is retained as the output script for effective learning of the model in subsequent processing.

[0167] and / or,

[0168] Another possible way is to display the output content, obtain the user's operation information on the output content, and determine the processing result of the operation information as the output script. The operation information includes at least one of the following: selection information and editing information.

[0169] The editing method may include but is not limited to: one or more of modification, addition, and deletion. For example, the user can modify and confirm the output content based on the output content. In this way, the number of output scripts obtained in the end is consistent with that of the output content, but the content is different. For another example, the user can add (or delete) other possible output scripts based on the output content. In this way, the number of output scripts obtained in the end is different from that of the output content. Figure 8 As shown, there are x output contents directly generated by the current script generation model, which can then be manually reviewed by data personnel (or management personnel, with no special restrictions on their identities). After their review and confirmation, y high-quality output scripts that can be used for subsequent training can be obtained. In addition, in some scenarios, the user's new operations can be restricted, that is, the user is not allowed to actively add and edit output scripts. In this case, y is less than or equal to x.

[0170] In addition, the script generation model involved in any of the above embodiments can be obtained by pre-training a general generative large model using professional knowledge. The training methods include but are not limited to at least one of the following: SFT, classification feedback reinforcement learning (Reinforcement Learning from Human Feedback, RLHF), etc., which are not exhaustive. In other words, on the basis of any of the aforementioned methods, the method may also include the following steps: using professional knowledge to perform model training on the general generative large model to obtain a script generation model. In a specific implementation scenario, this step can be performed at any stage of any of the aforementioned embodiments. For example, before executing the aforementioned training data construction plan, the general generative large model can be controlled to learn professional knowledge, possess professional capabilities, and become a script generation model. For another example, in Figure 6 In the model training method shown in FIG. 1 , the pre-training of this step is performed before S604 to allow the script generation model to learn professional knowledge in advance; or, after S604, the script generation model can be controlled to learn professional knowledge. Figure 2 Before the script is generated (ie, S206), it is possible to control the learning of professional knowledge.

[0171] For example, please refer to Fig. 9 , Fig. 9 A schematic diagram of a model training process provided in an embodiment of the present disclosure. Fig. 9 Let’s take the model used to generate a live car broadcast script as an example. Fig. 9 As shown, the model training process in the embodiment of the present disclosure is implemented through two stages.

[0172] In the first stage, a general generative large model is fine-tuned with professional knowledge ( Fig. 9 In this paper, the general large model is represented as SFT and RLHF, so that the general large model after training has rich automobile common sense output capabilities. Fig. 9 As shown, the professional knowledge used in the specific implementation may include but is not limited to: one or more of: internal enterprise automobile data, automobile review data, socialized vehicle model library, automobile information knowledge base, etc. In this way, after training with professional knowledge in the automobile field, a script generation model can be initially obtained. This script generation model can solve the problem of automobile knowledge illusion to a certain extent.

[0173] In the second stage, the preliminary script generation model is fine-tuned using training samples that contain at least the definition specification ( Fig. 9In this way, a script generation model that is trained and can be used for the generation of live car scripts in specific scenarios is obtained. In addition, the training samples can also be combined with excellent reference samples, professional knowledge and real script data. For example, Fig. 9 The training samples shown may include, but are not limited to: training data sets (i.e., the set of training samples constructed above), automobile product information (belonging to professional knowledge), live broadcast themes, anchor personality style, etc. This stage is equivalent to the advanced training of the script generation model based on its original capabilities, using a variety of sufficient live broadcast data including training data sets. In addition, in order to further reduce the problem of knowledge illusion that may exist in the model generation script, professional knowledge such as automobile product parameters and live broadcast themes can be retrieved from automobile knowledge bases and online car review bases as credible auxiliary information to construct training samples for model training and learning. In addition, when conducting model training, the present disclosure can also be combined with excellent reference samples to enrich the diversity of script generation model generation scripts.

[0174] Through Fig. 9 The model training shown in the figure finally generates a model that is actually used for script generation. It not only has the live broadcast capability and experience of automobile live broadcast scenarios, but also has the definition specifications and excellent reference samples of various script types. On this basis, the script generation model can generate high-quality live broadcast scripts that meet the requirements and are creative based on specific live broadcast requirements such as store information, product information (which can be used as retrieval auxiliary information, namely RAG), live broadcast themes, etc. (generally can be carried in the live broadcast generation request), the second sample set (based on the context learning mechanism), and the definition specifications of various script types.

[0175] For example, please refer to Fig.10 , Fig.10 A schematic diagram of prompt information of a car live broadcast script provided by an embodiment of the present disclosure. Fig.10 As shown, in the prompt information, prompts are given for the target script type, definition specifications and excellent reference samples of the target script type, live broadcast theme, business type, style type, product information (including car models and related introductions, selling points, etc., which can be obtained based on the professional knowledge base), etc. In this way, the script generation model can generate creative, high-quality live broadcast scripts that conform to the definition specifications and product characteristics based on the instructions of the prompt information.

[0176] Above, the present disclosure specifically discloses a sample construction, model training and script generation solution based on definition specifications. For ease of understanding, a more specific implementation method is now provided. Please refer to Fig.11 ,in, Fig.11 A flowchart of another script generation method provided in an embodiment of the present disclosure. Fig.11As shown, in this embodiment, the script generation method includes the following steps:

[0177] S1102, using the first model to extract definition specifications from real script data.

[0178] S1104, extract excellent reference samples based on the definition specifications.

[0179] S1106, construct training samples based on the defined specifications and excellent reference samples.

[0180] S1108, fine-tune the script generation model using the training samples.

[0181] S1110, using the trained script generation model to generate a target script.

[0182] like Fig.11 The embodiments shown are merely exemplary, and the implementation of each step can be found in the foregoing text and will not be repeated here.

[0183] The script generation method, model training method and sample construction method according to the embodiments of the present disclosure are described above with reference to the accompanying drawings. The present disclosure can effectively improve the quality and practicality of script generation by extracting and applying definition specifications.

[0184] The present disclosure also provides a script generating device. Fig.12 A structural block diagram of a script generation device provided in an embodiment of the present disclosure, such as Fig.12 As shown, the script generating device 1200 includes:

[0185] The transceiver unit 1210 is used to receive a script generation request;

[0186] The processing unit 1220 is used to construct prompt information based on the script generation request and definition specification; wherein the definition specification is extracted based on real script data and is used to describe the script characteristics and requirements of the script type;

[0187] The processing unit 1220 is further configured to generate a target script based on the prompt information using a script generation model;

[0188] The transceiver unit 1210 is further configured to output the target script.

[0189] In an exemplary embodiment, the script type includes at least one of the following: a scene type, a style type, and a field type;

[0190] The scene types include at least one of the following: opening scene, interactive scene, trust scene, retention scene, quotation scene, retention scene, and end-of-streaming scene;

[0191] The style type includes at least one of the following: sincerity, humor, and strong affinity;

[0192] Among them, the field type includes at least one of the following: automobile field, food field, tourism field, home field, and smart home field.

[0193] In an exemplary embodiment, the definition specification includes at least one of the following: definition description, core objectives, requirement description, and implementation skills.

[0194] In an exemplary embodiment, the processing unit 1220 is further configured to:

[0195] Classifying and arranging the real script data to obtain a first sample set of each script type;

[0196] For any of the script types, a first model is used to perform data analysis on the first sample set to obtain a definition specification of the script type; wherein the first model is a generative model.

[0197] In an exemplary embodiment, the processing unit 1220 is specifically configured to:

[0198] Segmenting the real script data to obtain multiple segmentation samples;

[0199] The script type of each segmented sample is determined, and the first sample set of each script type is determined.

[0200] In an exemplary embodiment, the processing unit 1220 is specifically configured to:

[0201] Based on the script generation request, obtaining the definition specification of the target script type; wherein the target script type is indicated by the script generation request, or the target script type is determined based on a preset rule or randomly;

[0202] The script generation request is combined with the definition specification to obtain the prompt information;

[0203] The prompt information is constructed, wherein the prompt information includes the definition specification and the script generation request.

[0204] In an exemplary embodiment, the prompt information further includes at least one of the following:

[0205] Professional knowledge, the professional knowledge including at least one of the following: industry knowledge, product knowledge, product evaluation knowledge;

[0206] Excellent reference sample.

[0207] In an exemplary embodiment, the processing unit 1220 is further configured to:

[0208] For any script type, evaluating a first sample set of the script type using the definition specification;

[0209] Based on the evaluation result, extracting the excellent reference samples from the first sample set;

[0210] The method further includes: maintaining the excellent reference samples using a second sample set.

[0211] In an exemplary embodiment, the processing unit 1220 is specifically configured to:

[0212] Based on the definition specification, using the second model to evaluate and analyze the first sample set to obtain the evaluation result;

[0213] The second model is a generative model, or the second model is a pre-trained evaluation model.

[0214] In an exemplary embodiment, the processing unit 1220 is further configured to:

[0215] In a second sample set of the target script type, the excellent reference sample is obtained; the second sample set is used to maintain the excellent reference sample;

[0216] The professional knowledge related to the script generation request is retrieved from a professional knowledge base.

[0217] In an exemplary embodiment, the script generation model is a generative model;

[0218] The script generation model is used to generate the target script based on the prompt information, and the target script includes one or more script types.

[0219] In an exemplary embodiment, the processing unit 1220 is further configured to:

[0220] Based on the definition specification of each script type and the current script generation model, construct training samples, the training samples include: input prompts and output scripts;

[0221] The script generation model is fine-tuned using the training samples.

[0222] In an exemplary embodiment, the processing unit 1220 is specifically configured to:

[0223] constructing an input prompt including said definition specification of at least one script type;

[0224] Generate a script based on the input prompt using the current script generation model to obtain at least one output content corresponding to the input prompt;

[0225] The output script is determined in at least one of the output contents, and the output script and the input prompt are used as a group of the training samples.

[0226] In an exemplary embodiment, the processing unit 1220 is further configured to:

[0227] Based on the definition specification, the output content is evaluated and analyzed using a third model, and one or more output contents with the highest evaluation results are determined as the output script; wherein the third model is a generative model, or the third model is a pre-trained evaluation model;

[0228] and / or,

[0229] Display the output content, obtain the user's operation information on the output content, and determine the processing result of the operation information as the output script; wherein the operation information includes at least one of the following: selection information, editing information.

[0230] In an exemplary embodiment, the processing unit 1220 is further configured to:

[0231] By using professional knowledge, the general generative large model is trained to obtain the script generation model.

[0232] In an exemplary embodiment, the target script includes at least one of the following: a live broadcast script, a marketing script, an advertising script, and a promotional script.

[0233] The present disclosure also provides a model training device. Fig.13 A structural block diagram of a model training device provided in an embodiment of the present disclosure, such as Fig.13 As shown, the model training device 1300 includes:

[0234] The acquisition unit 1310 is used to acquire training samples based on the definition specifications of each script type and the current script generation model, wherein the training samples include: input prompts and output scripts; wherein the definition specifications are extracted based on real script data and are used to describe the script characteristics and requirements of the script type;

[0235] The training unit 1320 is used to perform fine-tuning training on the script generation model using the training samples.

[0236] The present disclosure also provides a sample construction device. Fig.14 A structural block diagram of a sample construction device provided in an embodiment of the present disclosure, such as Fig.14 As shown, the sample construction device 1400 includes:

[0237] An acquisition unit 1410 is used to acquire a definition specification of each script type, wherein the definition specification is extracted based on real script data and is used to describe script characteristics and requirements of the script type;

[0238] The construction unit 1420 is used to construct a training sample based on the definition specification of each script type and the current script generation model, and the training sample includes: an input prompt and an output script.

[0239] The present disclosure also provides a script generation system. Fig.15 A structural block diagram of a script generation system provided by an embodiment of the present disclosure, such as Fig.15 As shown, the script generation system 1500 includes:

[0240] The script generating device 1510 is used to implement the script generating method provided by any of the aforementioned embodiments of the present disclosure;

[0241] The script generates a model 1520 .

[0242] In an exemplary embodiment, the system 1500 further includes at least one of the following:

[0243] Professional knowledge base, used to maintain professional knowledge;

[0244] The second dataset is used to maintain excellent reference samples;

[0245] The first model is used to extract the definition specification;

[0246] The second model is used to evaluate and analyze the samples;

[0247] The third model is used to evaluate and analyze the output content.

[0248] For parts not described in detail, please refer to the previous method examples.

[0249] Fig.16 The electronic device 1600 according to the embodiment of the present disclosure includes at least a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the XX method described in any of the above embodiments.

[0250] Fig.16The electronic device 1600 shown specifically includes: a central processing unit (CPU) 1601, a graphics processing unit (GPU) 1602 and a memory 1603. These units are connected to each other via a bus 1604. The central processing unit (CPU) 1601 and / or the graphics processing unit (GPU) 1602 can be used as the above-mentioned processor, and the memory 1603 can be used as the above-mentioned memory for storing computer-readable instructions. In addition, the electronic device 1600 may also include a communication unit 1605, a storage unit 1606, an output unit 1607, an input unit 1608 and an external device 1609, which are also connected to the bus 1604.

[0251] Fig.17 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present disclosure. A computer-readable storage medium according to an embodiment of the present disclosure stores a computer program / instruction (including but not limited to computer-readable instructions). Specifically, Fig.17 As shown, a computer-readable storage medium 1700 stores computer-readable instructions 1701. When the computer program / instructions are executed by the processor, the method described in any of the foregoing embodiments of the present disclosure is implemented. The computer-readable storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, optical disk, magnetic disk, etc.

[0252] The present disclosure further provides a computer program product, including a computer program / instruction, which implements the method described in any of the foregoing embodiments of the present disclosure when executed by a processor.

[0253] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0254] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.

[0255] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.

[0256] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0257] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.

[0258] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0259] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A script generation method, characterized in that: include: Receive script generation request; Based on the script generation request and definition specification, construct prompt information; wherein the definition specification is extracted based on real script data and is used to describe the script characteristics and requirements of the script type; Generate a target script based on the prompt information using a script generation model; Output the target script.

2. The method according to claim 1, characterized in that The definition specification includes at least one of the following: definition description, core objectives, requirement description, and implementation techniques; The script type includes at least one of the following: scene type, style type, and field type; The scene types include at least one of the following: opening scene, interactive scene, trust scene, retention scene, quotation scene, retention scene, and end-of-streaming scene; The style type includes at least one of the following: sincerity, humor, and strong affinity; Among them, the field type includes at least one of the following: automobile field, food field, tourism field, home field, and smart home field.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Classifying and arranging the real script data to obtain a first sample set of each script type; For any of the script types, a first model is used to perform data analysis on the first sample set to obtain a definition specification of the script type; wherein the first model is a generative model.

4. The method according to any one of claims 1 to 3, characterized in that: The prompt information also includes at least one of the following: Professional knowledge, the professional knowledge including at least one of the following: industry knowledge, product knowledge, product evaluation knowledge; Excellent reference sample.

5. The method according to claim 4, characterized in that The method further comprises: For any script type, evaluating a first sample set of the script type using the definition specification; Based on the evaluation result, extracting the excellent reference samples from the first sample set; The method further includes: maintaining the excellent reference samples using a second sample set.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Based on the definition specification of each script type and the current script generation model, construct training samples, the training samples include: input prompts and output scripts; The script generation model is fine-tuned using the training samples.

7. The method according to claim 6, characterized in that The construction of training samples based on the definition specifications of each script type and the current script generation model includes: constructing an input prompt including said definition specification of at least one script type; Generate a script based on the input prompt using the current script generation model to obtain at least one output content corresponding to the input prompt; The output script is determined in at least one of the output contents, and the output script and the input prompt are used as a group of the training samples.

8. The method according to claim 7, characterized in that Determining the output script in at least one of the output contents comprises: Based on the definition specification, the output content is evaluated and analyzed using a third model, and one or more output contents with the highest evaluation results are determined as the output script; wherein the third model is a generative model, or the third model is a pre-trained evaluation model; and / or, Display the output content, obtain the user's operation information on the output content, and determine the processing result of the operation information as the output script; wherein the operation information includes at least one of the following: selection information, editing information.

9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: By using professional knowledge, the general generative large model is trained to obtain the script generation model.

10. A model training method, characterized in that: include: Based on the definition specification of each script type and the current script generation model, a training sample is obtained, wherein the training sample includes: an input prompt and an output script; wherein the definition specification is extracted based on real script data and is used to describe the script characteristics and requirements of the script type; The script generation model is fine-tuned using the training samples.

11. A script generating device, characterized in that: include: A transceiver unit, used for receiving a script generation request; A processing unit, configured to construct prompt information based on the script generation request and definition specification; wherein the definition specification is extracted based on real script data and is used to describe the script characteristics and requirements of the script type; The processing unit is further used to generate a target script based on the prompt information using a script generation model; The transceiver unit is also used to output the target script.

12. A model training device, characterized in that: include: An acquisition unit, used to acquire training samples based on the definition specifications of each script type and the current script generation model, wherein the training samples include: input prompts and output scripts; wherein the definition specifications are extracted based on real script data and are used to describe the script characteristics and requirements of the script type; A training unit is used to perform fine-tuning training on the script generation model using the training samples.

13. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the method according to any one of claims 1 to 10.

14. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Broadcast script generation method and device, equipment and storage medium

    CN118708162A

  • Document writing model training method and device, medium and equipment

    CN118966186A

  • Method and device for optimizing large model generation content, electronic equipment and storage medium

    CN119106738A

Cited By

  • AI-based script audio generation method and system

    CN121191491A

  • Script generation model optimization method and device, equipment and storage medium

    CN121280832A