Content output method and device, readable medium and electronic equipment
By selecting reference script content with high similarity from the video script library and generating target script content, the problems of low efficiency and low quality of script content writing are solved, and efficient and product-friendly script content is automatically generated.
Patent Information
- Application Number
- CN202410224699.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-28
- Publication Date
- 2025-08-29
AI Technical Summary
In the existing technology, script content is inefficient, script content written by non-professionals is insufficiently creative and fresh, and professionals take time to write. General copy generation tools cannot accurately understand specific scenarios and professional terms, resulting in low quality of generated script content.
By determining the product description information, select the reference script content with high similarity from the preset video script library, and use the script content generation model to automatically generate the target script content based on the product description information.
The automatic generation of script content is realized, which improves writing efficiency, and the generated script content is more in line with the product, improving relevance and quality.
Smart Images

Figure CN120568149A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular, to a content output method, device, readable medium, and electronic device. Background Art
[0002] Video production generally includes three steps: script writing, video shooting, and post-editing. Since the script content is the basis for video shooting and post-editing, the script content is particularly important in video production.
[0003] The script content in the related art is generally written manually, which takes a lot of time to write and has the problem of low script content writing efficiency. Summary of the Invention
[0004] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] In a first aspect, the present disclosure provides a content output method, the method comprising:
[0006] Determine product description information;
[0007] Determining reference script content from a preset video script library based on the product description information, wherein the video script library is used to store video script content;
[0008] Output target script content based on the reference script content and the product description information.
[0009] In a second aspect, the present disclosure provides a content output device, the device comprising:
[0010] A first determination module is used to determine product description information;
[0011] A second determining module determines reference script content from a preset video script library based on the product description information, wherein the video script library is used to store the script content of the video;
[0012] An output module is used to output target script content based on the reference script content and the product description information.
[0013] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of any one of the methods described in the first aspect.
[0014] In a fourth aspect, the present disclosure provides an electronic device, comprising:
[0015] a storage device having a computer program stored thereon;
[0016] A processing device is used to execute the computer program in the storage device to implement the steps of any one of the methods in the first aspect.
[0017] Through the above technical solution, the product description information can be determined, and based on the product description information, the reference script content can be determined from the preset video script library, and the target script content can be output based on the reference script content and the product description information. In this way, the script content can be automatically generated based on the product description information and the reference script content, reducing the difficulty of script content generation and improving the efficiency of script content generation. On the other hand, since the reference script content is determined from the video script library based on the product description information, the correlation between the reference script content and the product corresponding to the product description information is higher. Therefore, when generating script content based on the reference script content, the generated script content can be made more suitable for the product, improving the correlation between the script content and the product and the quality of the script content.
[0018] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings:
[0020] Figure 1 is a flowchart illustrating a content output method according to an exemplary embodiment of the present disclosure;
[0021] Figure 2 is a flowchart illustrating another content output method according to an exemplary embodiment of the present disclosure;
[0022] Figure 3 is a structural block diagram of a content output device according to an exemplary embodiment of the present disclosure;
[0023] Figure 4 The figure is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0025] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0026] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0027] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0028] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0030] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0031] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0032] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0033] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0034] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0035] As mentioned in the background technology, video production generally includes three steps: script writing, video shooting and post-editing. Since the script content is the basis for video shooting and post-editing, the script content is particularly important in video production.
[0036] For example, in the field of short video applications, if you want to produce short videos with better expressiveness, you generally need a more logical or interesting storyline and richer short video production materials as support. In other words, you need to write high-quality script content as support.
[0037] However, in related technologies, scripts are mostly written manually. For non-professionals, due to their lack of professional knowledge in video production or script writing, the scripts they write may lack creative freshness or have loose story structures. For professionals, writing high-quality scripts takes a lot of time, resulting in low script writing efficiency.
[0038] To overcome these issues, the inventors attempted to use general-purpose copywriting tools to generate script content. However, when using these tools to generate product-related script content, they discovered that these tools were unable to accurately understand the context and requirements of specific scenarios, resulting in low-quality script content. Furthermore, when generating script content for products in certain specific fields, specialized terminology is required, which general-purpose copywriting tools generally struggle to generate or understand. Consequently, the generated script content may not meet requirements or be of high quality.
[0039] In view of this, the present disclosure provides a content output method, device, readable medium and electronic device to solve the above technical problems.
[0040] The following further explains the embodiments of the present disclosure with reference to the accompanying drawings.
[0041] Figure 1 is a flowchart of a content output method according to an exemplary embodiment of the present disclosure, referring to Figure 1 , the method may include the following steps:
[0042] S101: Determine product description information.
[0043] The product description information refers to information describing the attributes, features, or functions of the product. The specific product description information can be determined based on actual conditions and is not limited in this embodiment. For example, the product description information may include information such as the product name, product color, product size, product price, and product functions.
[0044] The product description information may be determined by parsing user input information to obtain the product description information.
[0045] For example, when the user input information is text information, keyword extraction technology can be used to extract product description information by identifying keywords and phrases related to product descriptions in the text information. For example, product description information can be extracted from text information by identifying sentences or phrases including words such as "color", "size" or "material". Alternatively, the target product description information can be determined by identifying product identification information in the text information and comparing the identified product identification information with a pre-set comparison table for characterizing the correspondence between product identification information and product description information. For example, the target product description information can be determined by identifying product numbers in the text information and comparing the identified product numbers with a pre-set comparison table for characterizing the correspondence between product numbers and product description information.
[0046] It should be understood that this is only an illustrative description and does not constitute a limitation to the solution. In a possible manner, the user input information may also be a product QR code, a product link, or an image including product description information.
[0047] S102: Determine reference script content from a preset video script library based on the product description information, where the video script library is used to store video script content.
[0048] Among them, the script content in the video script library can be script content of the same type, script content of different types, or high-quality script content, which is determined according to actual conditions and is not limited in any way in the embodiments of the present disclosure.
[0049] When the script contents in the video script library are of the same type, the video script library can be constructed in the following way: from the existing script contents, determine the product category, product name or product function corresponding to each script content, and use the script contents with the same product category, product name or product function as script contents of the same type to construct the video script library.
[0050] When the script content in the video script library is high-quality script content, the video script library can be constructed in the following way: from the existing script content, screen out script content with high user adoption rate, no user modification and / or less modification to construct the video script library, and / or construct the video script library with script content corresponding to videos with good user feedback.
[0051] Wherein, the script content in the video script library can be fixed or dynamically changed, and the disclosed embodiment does not impose any restriction on this. When the script content in the video script library dynamically changes, it can be that the target script content generated is put into the video script library to enrich the script content in the video script library. It can also be that some high-quality script contents are screened from the target script content generated or the script content generated by other means and put into the video script library, so as to improve the quality of the script content in the video script library while enriching the script content in the video script library, and then further improve the quality of the target video script.
[0052] In a possible manner, determining the reference script content from a preset video script library based on the product description information may include:
[0053] Determine a first similarity between the product description information and the script content in the video script library; and determine a reference script content in the video script library based on the first similarity.
[0054] It should be understood that determining the first similarity between the product description information and the script content can be by directly calculating the similarity between the product description information and the script content, or by first extracting the product description information from the script content and then calculating the similarity between the product description information and the extracted product description information. The embodiments of the present disclosure do not impose any restrictions on this.
[0055] In addition, it should be understood that determining the first similarity between the product description information and the script content in the video script library can be determining the similarity between the product description information and each script content in the video script library, or determining the similarity between the product description information and a specific script content in the video script library. Among them, the specific script content can be a script content in which the product category corresponding to the script content is the same as or similar to the product category corresponding to the product description information, or a script content in which the product function corresponding to the script content is the same as or similar to the product function corresponding to the product description information, or a script content in which the product name corresponding to the script content is the same as or similar to the product name corresponding to the product description information. The embodiments of the present disclosure do not impose any restrictions on this.
[0056] It should also be understood that, based on the first similarity, determining the reference script content in the video script library can be by comparing the first similarity with a preset first similarity threshold value, and when the first similarity is greater than or equal to the first similarity threshold value, determining the script content corresponding to the first similarity as the reference script content. It can also be by comparing the first similarity with a preset first similarity threshold value, and when the first similarity is greater than or equal to the first similarity threshold value, determining the script content corresponding to the first similarity as the candidate script content, and then randomly selecting a preset number of candidate script contents from the candidate script content as the reference script content. It can also be by selecting the script content corresponding to the largest first similarity as the reference script content based on the size of the first similarity, and the embodiments of the present disclosure do not impose any restrictions on this.
[0057] In a possible manner, determining the first similarity between the product description information and the script content in the video script library may include:
[0058] Determining a target product category based on the product description information; determining similar script content in the video script library based on the target product category, wherein the product category corresponding to the similar script content is the same as or similar to the product category corresponding to the product description information; and determining a first similarity between the product description information and the similar script content;
[0059] Accordingly, determining reference script content in the video script library according to the first similarity may include:
[0060] According to the first similarity, reference script content is determined in the same type of script content.
[0061] The target product category may be one or more, which is determined according to actual conditions, and the embodiments of the present disclosure do not impose any limitation on this.
[0062] For example, if the target product description information input by the user includes only one classification information that can be used to determine the product category, then a target product category can be determined based on the classification information. For example, if the classification information in the target product description information input by the user is “sweeping robot”, then the target product category can be determined as “smart home” based on “sweeping robot”. If the target product description information includes multiple classification information that can be used to determine the product category, then a target product category can be determined based on each classification information, thereby obtaining multiple target product categories. For example, if the classification information in the target product description information input by the user includes “tablet” and “portable office”, then the target product category can be determined as “electronic products” based on “tablet”, and the target product category can be determined as “office supplies” based on “portable office”.
[0063] Accordingly, when there are multiple target product categories, a similar script content can be determined in the video script library for each target product category, thereby obtaining multiple similar script contents. Alternatively, a candidate similar script content can be determined in the video script library for each target product category, and then the target similar script content can be selected from the multiple candidate similar script contents, wherein the product categories corresponding to the target similar script content include the multiple target product categories mentioned above.
[0064] For example, if the target product categories determined based on the product description information input by the user include two, one is "electronic products" and the other is "office supplies", then the corresponding "electronic product candidate script content" and "office supplies candidate script content" can be determined in the video script library based on the target product categories "electronic products" and "office supplies", and then the same candidate script content can be filtered out from the "electronic product candidate script content" and "office supplies candidate script content" as the target similar script content.
[0065] Among them, the method of determining the reference script content in the same type of script content based on the first similarity can refer to the method of determining the reference script content in the video script library based on the first similarity, and will not be repeated here.
[0066] Through the above scheme, only the first similarity between the product description information and similar script content can be calculated, and the reference script content can be determined from the similar script content based on the first similarity. This can reduce the amount of calculation of the first similarity and the amount of script content screening, and improve the output efficiency of the target script content.
[0067] In a possible manner, determining the reference script content from a preset video script library based on the product description information may include:
[0068] Determine a second similarity between the product description information and the script content in the video script library; determine candidate reference script content in the video script library based on the second similarity; determine a third similarity between the candidate reference script content and historical script content, wherein the historical script content is used to characterize script content generated based on historical product description information, and the historical product description information is similar or identical to the product description information; determine reference script content in the candidate reference script content based on the third similarity.
[0069] Among them, the method of determining the second similarity between the product description information and the script content in the video script library can refer to the method of determining the first similarity between the product description information and the script content in the video script library. The method of determining the candidate reference script content in the video script library based on the second similarity and the method of determining the reference script content in the candidate reference script content based on the third similarity can refer to the method of determining the reference script content in the video script library based on the first similarity, and will not be repeated here.
[0070] The historical product description information may be product description information input by the same user or may be product description information input by different users, and the embodiments of the present disclosure do not impose any limitation on this.
[0071] In this embodiment, since the historical script content is the script content generated based on the historical product description information, and the historical product description information is similar or identical to the product description information, by calculating the similarity between the candidate reference script content and the historical script content, and determining the reference script content in the candidate reference script content based on the similarity, the reference script content that has been output in the candidate reference script content can be eliminated, thereby avoiding outputting the same or similar target script content based on the same or similar product description information, improving the diversity of the output target script content, and increasing the user experience.
[0072] In a possible manner, determining the reference script content from a preset video script library based on the product description information may include:
[0073] Determining reference script content from the video script library according to the product description information through a reference script content selection model;
[0074] The reference script content selection model can be trained in the following way:
[0075] Obtain sample product description information and sample script content corresponding to the sample product description information, wherein the sample script content is script content that meets preset conditions; input the sample product description information into the reference script selection model to obtain predicted script content, wherein the predicted script content is obtained by screening the reference script content selection model according to the similarity between the sample product description information and the script content in the video script library; determine the loss function value of the predicted script content and the sample script content, and adjust the parameters of the reference script content selection model according to the loss function value.
[0076] The preset conditions may be determined based on actual conditions, and the present disclosure does not impose any restrictions thereon. For example, the preset conditions may be set to: the adoption rate of the script content is greater than a preset adoption rate threshold and / or the modification ratio of the script content is less than a preset modification ratio threshold.
[0077] Determining the reference script content from the video script library based on the product description information using the reference script content selection model can be as follows: inputting the product description information into the reference script content selection model, determining a first similarity between the product description information and the script content in the video script library using the reference script content selection model, and determining the reference script content in the video script library based on the first similarity. Alternatively, the product description information can be input into the reference script content selection model, and the reference script content selection model first determines the target product category based on the product description information, then determines similar script content in the video script library based on the target product category, and finally determines a first similarity between the product description information and similar script content, and determines the reference script content from the similar script content based on the first similarity. Alternatively, the product description information may be input into a reference script content selection model, and the reference script content selection model may first determine the target product category based on the product description information, and then determine similar script content in the video script library based on the target product category, and then determine a first similarity between the product description information and similar script content, and determine candidate reference script content in similar script content based on the first similarity, and finally determine a third similarity between the candidate reference script content and the historical script content, and determine the reference script content in the candidate reference script content based on the third similarity. The embodiments of the present disclosure do not impose any restrictions on this.
[0078] In this embodiment, since the sample script content is high-quality script content selected based on preset conditions, after the reference script content selection model is trained based on the high-quality script content and the corresponding product description information, the reference script content selection model has the ability to select high-quality reference script content from the video script library. In other words, in actual application, the reference script content selection model can determine high-quality reference script content from the video script library based on the product description information, and then when generating target script content based on the reference script content and the product description, the quality of the target script content can be improved.
[0079] S103: Outputting target script content according to the reference script content and the product description information.
[0080] In a possible manner, outputting target script content according to the reference script content and the product description information may include:
[0081] According to the product description information and the reference script content, the target prompt text is determined, and the target prompt text is used for the script content generation model to generate script content. The script content generation model is trained based on sample script content and sample prompt text; the target prompt text is input into the script content generation model to generate candidate script content; based on the candidate script content, the target script content is output.
[0082] The format of the target prompt text generated each time can be fixed or variable, and the disclosed embodiments do not impose any restrictions on this. When the format of the target prompt text is fixed, a prompt text template can be pre-set. After obtaining the product description information and reference script content, the product description information and reference script content are filled into the corresponding positions of the prompt text template to quickly generate the target prompt text.
[0083] For example, the preset prompt text template can be expressed as: Please refer to the reference script content "XXX", and based on the product description information "XXX", generate script content similar in style to the reference script content "XXX". Therefore, after obtaining the reference script content "AAAA" and the product description information "BBBB", the reference script content "AAAA" and the product description information "BBBB" can be filled in the corresponding positions in the prompt text template, and the target prompt text can be obtained: Please refer to the reference script content "AAAA", and based on the product description information "BBBB", generate script content similar in style to the reference script content "XXX".
[0084] Among them, the script content generation model can be an existing model in the relevant technology, such as a text generation model or a dialogue generation model, or it can be a model that is improved from an existing model in the relevant technology. The embodiments of the present disclosure do not impose any restrictions on this.
[0085] For example, the large language model in the related art can be used as a script content generation model, thereby using the large language model to output candidate script content according to the target prompt text. The large language model can also be trained in the following way:
[0086] Obtain sample prompt text and labels, where the labels are used to indicate the actual script content corresponding to the sample prompt text; input the sample prompt text into the large language model to obtain the predicted script content; determine the loss function value of the labels and the predicted script content, and adjust the parameters of the large language model based on the loss function value until a preset number of iterations is reached.
[0087] Among them, outputting the target script content can be done by the server outputting the target script content to the terminal device to display the target script content on the terminal device, or by the processing device in the terminal device outputting the target script content to the display device to display the target script content on the display device. The embodiments of the present disclosure do not impose any restrictions on this.
[0088] In this embodiment, candidate script content is generated according to the target prompt text through the script content generation model, thereby making the content generation method of the present disclosure compatible with different models and facilitating switching of the script content generation model.
[0089] In a possible manner, a fourth similarity between the reference script content and the candidate script content is determined, and / or a verification result of the candidate script content is determined, the verification result being used to characterize whether the reference script content passes the verification of preset verification rules; based on the fourth similarity and / or the verification result, the target script content is determined in the candidate script content; and the target script content is output.
[0090] The preset verification rules can be determined based on actual conditions, and the embodiments of the present disclosure do not impose any restrictions on this. For example, the preset verification rules can be used to verify whether the grammar in the target script content is correct, whether the style of the target script content is similar to that of the reference script content, and whether the target script content contains non-compliant content and typos.
[0091] Through the above technical solution, the product description information can be determined, and based on the product description information, the reference script content can be determined from the preset video script library, and the target script content can be output based on the reference script content and the product description information. In this way, the script content can be automatically generated based on the product description information and the reference script content, reducing the difficulty of script content generation and improving the efficiency of script content generation. On the other hand, since the reference script content is determined from the video script library based on the product description information, the correlation between the reference script content and the product corresponding to the product description information is higher. Therefore, when generating script content based on the reference script content, the generated script content can be made more suitable for the product, improving the correlation between the script content and the product and the quality of the script content.
[0092] In a possible way, in order to update and optimize the generation results of the script content generation model in real time without fine-tuning the script content generation model and ensure the sustainable iteration of script quality, the reference script content can be determined from the video script library according to the product description information through the reference script content selection model, such as Figure 2 It should be understood that Figure 2 The other processes shown can be referred to above and will not be described here. Figure 2 In the content output method shown, when the script content in the video script library is updated, the script content generation model will not be affected. At the same time, since the script content in the video script library is updated, the reference script content selection model can screen out higher-quality reference script content based on the product description information, thereby improving the quality of the script content generated by the script content generation model.
[0093] Based on the same concept, the embodiment of the present disclosure also provides a content output device, such as Figure 3 As shown, the content output device 300 may include:
[0094] The first determining module 301 is used to determine product description information;
[0095] A second determining module 302 determines reference script content from a preset video script library based on the product description information, wherein the video script library is used to store video script content;
[0096] The output module 303 is used to output the target script content according to the reference script content and the product description information.
[0097] Through the above technical solution, the product description information can be determined, and based on the product description information, the reference script content can be determined from the preset video script library, and the target script content can be output based on the reference script content and the product description information. In this way, the script content can be automatically generated based on the product description information and the reference script content, reducing the difficulty of script content generation and improving the efficiency of script content generation. On the other hand, since the reference script content is determined from the video script library based on the product description information, the correlation between the reference script content and the product corresponding to the product description information is higher. Therefore, when generating script content based on the reference script content, the generated script content can be made more suitable for the product, improving the correlation between the script content and the product and the quality of the script content.
[0098] In a possible manner, the second determining module 302 may include:
[0099] A first determining unit, configured to determine a first similarity between the product description information and the script content in the video script library;
[0100] The second determining unit is used to determine the reference script content in the video script library according to the first similarity.
[0101] In a possible manner, the second determining module 302 may include:
[0102] A third determining unit is configured to determine a second similarity between the product description information and the script content in the video script library;
[0103] a fourth determining unit, configured to determine candidate reference script content in the video script library according to the second similarity;
[0104] a fifth determining unit, configured to determine a third similarity between the candidate reference script content and historical script content, wherein the historical script content is used to represent script content generated based on historical product description information, and the historical product description information is similar to or identical to the product description information;
[0105] A sixth determination unit is configured to determine reference script content from among the candidate reference script contents based on the third similarity.
[0106] In a possible manner, the first determining unit may include:
[0107] A first determining subunit, configured to determine a target product category based on the product description information;
[0108] A second determining subunit is configured to determine similar script content in the video script library according to the target product category, wherein the product category corresponding to the similar script content is the same as or similar to the product category corresponding to the product description information;
[0109] A third determining subunit is configured to determine a first similarity between the product description information and the content of the similar script;
[0110] Accordingly, the second determining unit may be configured to determine reference script content from the same type of script content according to the first similarity.
[0111] In a possible manner, the second determining module 302 may include:
[0112] a seventh determining unit, configured to determine reference script content from the video script library according to the product description information using a reference script content selection model;
[0113] The reference script content selection model is trained in the following way:
[0114] Obtaining sample product description information and sample script content corresponding to the sample product description information, wherein the sample script content is script content that meets preset conditions;
[0115] Inputting the sample product description information into the reference script selection model to obtain predicted script content, wherein the predicted script content is obtained by screening the reference script content selection model according to the similarity between the sample product description information and the script content in the video script library;
[0116] Determine loss function values of the predicted script content and the sample script content, and adjust parameters of the reference script content selection model according to the loss function values.
[0117] In a possible manner, the output module 303 may include:
[0118] An eighth determining unit is configured to determine a target prompt text based on the product description information and the reference script content, wherein the target prompt text is used by a script content generation model to generate script content, wherein the script content generation model is trained based on sample script content and sample prompt text;
[0119] a generating unit, configured to input the target prompt text into the script content generating model to generate candidate script content;
[0120] An output unit is used to output target script content based on the candidate script content.
[0121] In a possible embodiment, the output unit may include:
[0122] a fourth determining subunit, configured to determine a fourth similarity between the reference script content and the candidate script content, and / or determine a verification result of the candidate script content, wherein the verification result is used to indicate whether the reference script content passes a verification according to a preset verification rule;
[0123] a fifth determining subunit, configured to determine target script content from among the candidate script contents based on the fourth similarity and / or the verification result;
[0124] The output subunit is used to output the target script content.
[0125] Based on the same concept, an embodiment of the present disclosure further provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of any one of the methods described in the first aspect are implemented.
[0126] Based on the same concept, an embodiment of the present disclosure further provides an electronic device, which may include:
[0127] a storage device having a computer program stored thereon;
[0128] A processing device is used to execute the computer program in the storage device to implement the steps of any one of the methods in the first aspect.
[0129] Reference below Figure 4 , which shows a schematic structural diagram of an electronic device 400 suitable for implementing the embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0130] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. Various programs and data required for the operation of the electronic device 400 are also stored in the RAM 403. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0131] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0132] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0133] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0134] In some embodiments, communication can be performed using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0135] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0136] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device is enabled to: determine the product description information; determine the reference script content from a preset video script library based on the product description information, and the video script library is used to store the script content of the video; output the target script content based on the reference script content and the product description information.
[0137] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0138] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0139] The modules described in the embodiments of the present disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the module itself.
[0140] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0141] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0142] According to one or more embodiments of the present disclosure, Example 1 provides a content output method, which includes: determining product description information; determining reference script content from a preset video script library based on the product description information, wherein the video script library is used to store the script content of the video; and outputting target script content based on the reference script content and the product description information.
[0143] According to one or more embodiments of the present disclosure, Example 2 provides the content output method described in Example 1, which determines the reference script content from a preset video script library based on the product description information, including: determining a first similarity between the product description information and the script content in the video script library; and determining the reference script content in the video script library based on the first similarity.
[0144] According to one or more embodiments of the present disclosure, Example 3 provides the content output method described in Example 1, wherein the reference script content is determined from a preset video script library based on the product description information, including: determining a second similarity between the product description information and the script content in the video script library; determining candidate reference script content in the video script library based on the second similarity; determining a third similarity between the candidate reference script content and historical script content, wherein the historical script content is used to characterize the script content generated based on historical product description information, and the historical product description information is similar or identical to the product description information; and determining the reference script content in the candidate reference script content based on the third similarity.
[0145] According to one or more embodiments of the present disclosure, Example 4 provides the content output method described in Example 2, wherein determining the first similarity between the product description information and the script content in the video script library includes: determining the target product category based on the product description information; determining similar script content in the video script library based on the target product category, the product category corresponding to the similar script content being the same as or similar to the product category corresponding to the product description information; determining the first similarity between the product description information and the similar script content; accordingly, determining the reference script content in the video script library based on the first similarity includes: determining the reference script content in the similar script content based on the first similarity.
[0146] According to one or more embodiments of the present disclosure, Example 5 provides the content output method described in any one of Examples 1-4, wherein determining the reference script content from a preset video script library based on the product description information includes: determining the reference script content from the video script library based on the product description information through a reference script content selection model; wherein the reference script content selection model is trained in the following manner: obtaining sample product description information and sample script content corresponding to the sample product description information, wherein the sample script content is a script content that meets preset conditions; inputting the sample product description information into the reference script selection model to obtain predicted script content, wherein the predicted script content is obtained by screening the reference script content selection model according to the similarity between the sample product description information and the script content in the video script library; determining the loss function value of the predicted script content and the sample script content, and adjusting the parameters of the reference script content selection model according to the loss function value.
[0147] According to one or more embodiments of the present disclosure, Example 6 provides the content output method described in Examples 1-4, which outputs the target script content based on the reference script content and the product description information, including: determining the target prompt text based on the product description information and the reference script content, the target prompt text is used for a script content generation model to generate script content, and the script content generation model is trained based on sample script content and sample prompt text; inputting the target prompt text into the script content generation model to generate candidate script content; and outputting the target script content based on the candidate script content.
[0148] According to one or more embodiments of the present disclosure, Example 7 provides the content output method described in Example 6, which outputs the target script content based on the candidate script content, including: determining a fourth similarity between the reference script content and the candidate script content, and / or determining a verification result of the candidate script content, the verification result being used to characterize whether the reference script content passes the verification of preset verification rules; determining the target script content in the candidate script content based on the fourth similarity and / or the verification result; and outputting the target script content.
[0149] According to one or more embodiments of the present disclosure, Example 8 provides a content output device, which includes: a first determination module for determining product description information; a second determination module for determining reference script content from a preset video script library based on the product description information, wherein the video script library is used to store the script content of the video; and an output module for outputting target script content based on the reference script content and the product description information.
[0150] According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in any one of Examples 1-7 when executed by a processing device.
[0151] According to one or more embodiments of the present disclosure, Example 10 provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of any one of the methods described in Examples 1-7.
[0152] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0153] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0154] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.
Claims
1. A content output method, characterized in that: The method comprises: Determine product description information; Determining reference script content from a preset video script library based on the product description information, wherein the video script library is used to store video script content; Output target script content based on the reference script content and the product description information.
2. The content output method according to claim 1, characterized in that: Determining reference script content from a preset video script library based on the product description information includes: Determining a first similarity between the product description information and the script content in the video script library; According to the first similarity, reference script content is determined in the video script library.
3. The content output method according to claim 1, wherein: Determining reference script content from a preset video script library based on the product description information includes: Determining a second similarity between the product description information and the script content in the video script library; Determining candidate reference script content in the video script library according to the second similarity; Determining a third similarity between the candidate reference script content and historical script content, wherein the historical script content is used to represent script content generated based on historical product description information, and the historical product description information is similar to or identical to the product description information; According to the third similarity, reference script content is determined from the candidate reference script contents.
4. The content output method according to claim 2, characterized in that: The determining of a first similarity between the product description information and the script content in the video script library includes: Determine the target product category based on the product description information; Determining similar script content in the video script library according to the target product category, wherein the product category corresponding to the similar script content is the same as or similar to the product category corresponding to the product description information; Determining a first similarity between the product description information and the content of the similar script; Determining reference script content in the video script library according to the first similarity includes: According to the first similarity, reference script content is determined in the same type of script content.
5. The content output method according to any one of claims 1 to 4, characterized in that: Determining reference script content from a preset video script library based on the product description information includes: Determining reference script content from the video script library according to the product description information through a reference script content selection model; The reference script content selection model is trained in the following way: Obtaining sample product description information and sample script content corresponding to the sample product description information, wherein the sample script content is script content that meets preset conditions; Inputting the sample product description information into the reference script selection model to obtain predicted script content, wherein the predicted script content is obtained by screening the reference script content selection model according to the similarity between the sample product description information and the script content in the video script library; Determine loss function values of the predicted script content and the sample script content, and adjust parameters of the reference script content selection model according to the loss function values.
6. The content output method according to any one of claims 1 to 4, characterized in that: Outputting target script content according to the reference script content and the product description information includes: Determine target prompt text based on the product description information and the reference script content, wherein the target prompt text is used by a script content generation model to generate script content, wherein the script content generation model is trained based on sample script content and sample prompt text; Inputting the target prompt text into the script content generation model to generate candidate script content; Output the target script content based on the candidate script content.
7. The content output method according to claim 6, characterized in that: Outputting target script content according to the candidate script content includes: Determining a fourth similarity between the reference script content and the candidate script content, and / or determining a verification result of the candidate script content, the verification result being used to indicate whether the reference script content passes a verification according to a preset verification rule; Determining target script content from among the candidate script contents based on the fourth similarity and / or the verification result; Output the target script content.
8. A content output device, characterized in that: The device comprises: A first determination module is used to determine product description information; A second determining module determines reference script content from a preset video script library based on the product description information, wherein the video script library is used to store the script content of the video; An output module is used to output target script content based on the reference script content and the product description information.
9. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method according to any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 7.