Prompt text generation method, electronic equipment and storage medium

By constructing the initial prompt text and test data sets, the text generation model is used to automatically generate and improve the prompt text, which solves the problem of low-efficiency in the text generation model prompt word generation, and realizes efficient and automated prompt word optimization, which improves the output quality of the model.

CN119990323APending Publication Date: 2025-05-13阿里巴巴(中国)网络技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510142339.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In the prior art, the prompt word generation efficiency of the text generation model is low, resulting in low output quality of the model, and manual design of prompt words is time-consuming and has great limitations.

Method used

By constructing the initial prompt text and test data sets, using the text generation model to generate and improve the prompt text, the automated iteration process is realized, and the efficiency and quality of prompt words are improved.

Benefits of technology

It significantly improves the generation efficiency and improvement rate of prompt words in the text generation model, solves the problem of low prompt word generation efficiency, and reduces the time cost and technical threshold of manual design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990323A_ABST
    Figure CN119990323A_ABST
Patent Text Reader

Abstract

The invention discloses a prompt text generation method, electronic equipment and a storage medium, and relates to the field of text generation model technologies and text generation. The method comprises the steps that a first prompt text is constructed based on a sample data set and a target task, the first prompt text is used for guiding a text generation model to generate a prompt text, and the sample data set comprises at least one sample prompt text and at least one sample reply text corresponding to the sample prompt text; inputting the first prompt text into a text generation model, and generating a candidate prompt text by using the text generation model; constructing a second prompt text based on the candidate prompt text and the test data set; and inputting the second prompt text into a text generation model, and modifying the candidate prompt text by using the text generation model to obtain a target prompt text. The technical problem that the prompt word generation efficiency of a text generation model in the related technology is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to text generation model technology and the field of text generation, and in particular, to a prompt text generation method, an electronic device and a storage medium. Background Art

[0002] In recent years, with the breakthrough progress of artificial intelligence, large language models have been widely used in various industries and daily life due to their relatively good text generation and understanding capabilities. Effective prompt word design is crucial to improving the output quality of large language models. Prompt word engineering can significantly improve the model's content generation quality and task understanding ability. However, manually constructing prompt words is time-consuming and has limitations, including the need for multiple debugging, reliance on professional knowledge, the need for redesign when tasks change, and the potential limitation of the model's generalization ability.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a prompt text generation method, an electronic device, and a storage medium to at least solve the technical problem of low prompt word generation efficiency of a text generation model in the related art.

[0005] According to one aspect of an embodiment of the present application, a prompt text generation method is provided, including: constructing a first prompt text based on a sample data set and a target task, wherein the first prompt text is used to guide a text generation model to generate prompt text, and the sample data set includes at least one sample prompt text and at least one sample reply text corresponding to the sample prompt text; inputting the first prompt text into the text generation model, and using the text generation model to generate candidate prompt texts; constructing a second prompt text based on the candidate prompt texts and a test data set, wherein the second prompt text is used to guide the text generation model to modify the prompt text, and the test data set includes at least one test prompt text and at least one test reply text corresponding to the test prompt text; inputting the second prompt text into the text generation model, and using the text generation model to modify the candidate prompt text to obtain a target prompt text.

[0006] According to another aspect of the embodiments of the present application, a computing device is further provided, including: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present application is executed when the program is running.

[0007] According to another aspect of the embodiments of the present application, an electronic device is also provided, including: a memory storing an executable program; a processor connected to the memory via a bus and used to run the program, wherein the method of each embodiment of the present application is executed when the program is running.

[0008] According to another aspect of an embodiment of the present application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in each embodiment of the present application.

[0009] According to another aspect of the embodiments of the present application, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present application is implemented.

[0010] According to another aspect of an embodiment of the present application, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present application is implemented.

[0011] According to another aspect of the embodiments of the present application, a computer program is also provided, and when the computer program is executed by a processor, the methods in the various embodiments of the present application are implemented.

[0012] In an embodiment of the present application, a first prompt text is constructed based on a sample data set and a target task, wherein the first prompt text is used to guide a text generation model to generate a prompt text, and the sample data set includes at least one sample prompt text and at least one sample reply text corresponding to the sample prompt text; the first prompt text is input into the text generation model, and a candidate prompt text is generated using the text generation model; a second prompt text is constructed based on the candidate prompt text and a test data set, wherein the second prompt text is used to guide the text generation model to modify the prompt text, and the test data set includes at least one test prompt text and at least one test reply text corresponding to the test prompt text; the second prompt text is input into the text generation model, and the candidate prompt text is modified using the text generation model to obtain a target prompt text. This invention realizes improving the prompt word generation efficiency of the text generation model in the related art; it is easy to notice that by constructing an initial meta-prompt text and inputting it into the text generation model to generate candidate prompt texts, automation can be used to replace traditional manual design, which preliminarily improves the generation efficiency. Subsequently, the test data set feedback is used to automatically construct a second prompt text to guide the model to improve the candidate prompt texts. This iterative process further improves the quality of the prompt text. The present application realizes automated iteration from initial design to final improvement, significantly improving the generation efficiency and improvement rate of the prompt words of the text generation model, thereby achieving the technical effect of improving the prompt word generation efficiency of the text generation model, and then solving the technical problem of low prompt word generation efficiency of the text generation model in the related art.

[0013] It is easy to notice that the above general description and the following detailed description are only for the purpose of exemplifying and explaining the present application, and do not constitute a limitation of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0015] Figure 1 is a scenario schematic diagram of a prompt text generation process according to an embodiment of the present application;

[0016] Figure 2 is a flowchart of a method for generating prompt text according to an embodiment of the present application;

[0017] Figure 3 is a flow chart of a prompt word generation process according to an embodiment of the present application;

[0018] Figure 4 is a flowchart of a method for generating prompt text according to an embodiment of the present application;

[0019] Figure 5 is a flowchart of a method for generating prompt text according to an embodiment of the present application;

[0020] Figure 6 is a schematic diagram of a prompt text generating device according to an embodiment of the present application;

[0021] Figure 7 is a schematic diagram of a prompt text generating device according to an embodiment of the present application;

[0022] Figure 8 is a schematic diagram of a prompt text generating device according to an embodiment of the present application;

[0023] Fig. 9 is a structural block diagram of a computing device according to an embodiment of the present application;

[0024] Fig.10 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] The technical solution provided in this application is mainly implemented by large-scale model technology. The large model here refers to a deep learning model with large-scale model parameters, which can usually contain hundreds of millions, tens of billions, hundreds of billions, trillions or even more than 10 trillion model parameters. The large model can also be called a cornerstone model / foundation model (Foundation Model). The large model is pre-trained through large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability, such as large-scale language model (Large Language Model, LLM), multi-modal pre-training model (multi-modal pre-training model), etc.

[0028] It should be noted that when the large model is actually applied, the pre-trained model can be fine-tuned through a small number of samples, so that the large model can be applied to different tasks. For example, the large model can be widely used in natural language processing (NLP), computer vision, speech processing and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), image generation, etc. It can also be widely used in natural language processing tasks such as text-based sentiment classification, text summary generation, machine translation, etc. Therefore, the main application scenarios of the large model include but are not limited to digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc. In the embodiments of the present application, data processing through a large model in a text generation scenario is taken as an example for explanation,

[0029] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:

[0030] Large Language Models (LLMs) are trained with large amounts of data to understand natural language and generate responses.

[0031] Prompt, the text input of the large language model, is used to guide the model to generate specific output.

[0032] Prompt engineering is a technique for improving the output quality of generative models by designing and improving input prompts.

[0033] Meta prompt: a prompt used to generate prompt words.

[0034] In-context learning is a technique that, when using a large language model, guides the model to perform specific tasks by providing contextual examples or instructions.

[0035] With the breakthrough progress made in artificial intelligence technology, especially in the field of natural language processing in recent years, large language models are increasingly widely used in all walks of life and all aspects of daily life due to their relatively good text generation and understanding capabilities. How to ensure that the output of the text generation model meets the needs of specific tasks in practical applications has become one of the core concerns of this application in the process of using these advanced technologies. Designing effective prompts plays a vital role in improving the output of large language models. It can not only greatly improve the content quality and practical utility of the model generation output, but also help the model better understand the task details and generate expected results. Therefore, prompt engineering, as a new research and practice field, is particularly important.

[0036] Usually, prompt words are constructed manually and modified according to test results. This method undoubtedly has certain limitations. First, manually constructing prompt words takes a lot of time, and in order for the model to accurately understand the task and output as expected, multiple debugging is often required. Secondly, specific tasks may require professional domain knowledge, which means that people who lack relevant experience will face higher costs when constructing prompt words. Furthermore, when task requirements change or new tasks are added, prompt words may need to be redesigned, which will undoubtedly increase the workload. In addition, manually constructed prompt words may sometimes be too specific, limiting the model's creativity and ability to generate diverse content.

[0037] Manually constructing prompt words not only takes a lot of time, but may also limit the capabilities of the model. In order to solve this problem, this application proposes a task-driven automatic prompt word tuning technology. It can be designed into an automated process, which only requires modifying a small number of meta-prompt words and using a small amount of annotated data to allow the text generation model to generate prompt words by itself, and constantly reflect on and improve through test results, and finally generate a better prompt word.

[0038] This application proposes a task-driven automatic prompt word tuning technology. Through an automated process, this technology allows a text generation model to automatically generate and update prompt words by only slightly modifying the meta-prompt words and using a small amount of annotated data, and generates a high-quality prompt word. This method not only saves time costs, but also improves the performance and adaptability of the model.

[0039] According to an embodiment of the present application, a prompt text generation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0040] Considering the huge number of model parameters of the large model and the limited computing resources of the mobile terminal, the above method provided in the embodiment of the present application can be applied to Figure 1 The application scenarios shown are not limited to these. Figure 1 is a schematic diagram of a scenario of a prompt text generation process according to an embodiment of the present application. Figure 1 In the application scenario shown, the large model is deployed in the server 10, and the server 10 can be connected to one or more client devices 20 through a local area network connection, a wide area network connection, an Internet connection, or other types of data networks. The client device 20 here may include but is not limited to: a smart phone, a tablet computer, a laptop computer, a PDA, a personal computer, a smart home device, a vehicle-mounted device, etc. The client device 20 can interact with the user through a graphical user interface to implement the call of the large model, thereby implementing the method provided in the embodiment of the present application.

[0041] In the embodiment of the present application, the system composed of the client device and the server can perform the following steps: the client device generates a sample data set and a target task. The server constructs a first prompt text based on the sample data set and the target task; inputs the first prompt text into a text generation model, and generates candidate prompt texts using the text generation model; constructs a second prompt text based on the candidate prompt text and a test data set; inputs the second prompt text into the text generation model, and modifies the candidate prompt text using the text generation model to obtain the target prompt text.

[0042] It should be noted that, with the rapid development of high-performance computing units, in other application scenarios, the above method provided in the embodiment of the present application can also be applied to the model all-in-one machine. In an optional embodiment, a plurality of models are built into the model all-in-one machine, and the user can choose to adjust with a model as needed to obtain the user's own model, so that the high-performance computing unit built into the model all-in-one machine can directly call the adjusted model to execute the above method provided in the embodiment of the present application. In another optional embodiment, a trained model is built into the text generation model all-in-one machine, so that the high-performance computing unit built into the model all-in-one machine can directly call the model to execute the above method provided in the embodiment of the present application.

[0043] Furthermore, when users need to train their own models, they can also upload their own data sets through the client, which are sent by the client to the server, so that the server can adjust the pre-trained model with the data set to obtain the user's own model and then deploy it to the production environment. In order to facilitate users' needs for model adjustment, the server can provide complete adjustment tools, development frameworks and processes, and can support multiple adjustment strategies, so that the adjusted model can better adapt to applications in different fields and achieve a high degree of customization.

[0044] Under the above operating environment, this application provides Figure 2 The prompt text generation method shown. Figure 2 is a flow chart of a method for generating prompt text according to an embodiment of the present application. Figure 2 As shown, the method may include the following steps:

[0045] Step S202, constructing a first prompt text based on the sample data set and the target task;

[0046] The first prompt text is used to guide the text generation model to generate prompt text, and the sample data set includes at least one sample prompt text and at least one sample reply text corresponding to the sample prompt text.

[0047] The sample data set is a data set used for training and evaluating a model, and includes input text and corresponding expected output text. The first prompt text may be an initial meta prompt text.

[0048] The first prompt text mentioned above is used to guide the text generation model to generate the text of the initial prompt text, including task description, sample input-output pairs, content and format requirements of prompt words, output requirements, etc.

[0049] The above-mentioned text generation model is a large language model with powerful text generation and comprehension capabilities.

[0050] In an optional embodiment, a first prompt text can be constructed based on a sample data set and a target task. The sample data set contains at least one sample prompt text and its corresponding sample reply text, and these sample data are used to provide specific task examples to help the text generation model understand the specific requirements of the task. The first prompt text is a text containing information such as task description, sample input-output pairs, content and format requirements of prompt words, and output requirements, and is used to guide the text generation model to generate an initial prompt text that meets the task requirements. By clarifying the task description and providing sample input-output pairs, the first prompt text can help the text generation model better understand the task goal, thereby generating a high-quality initial prompt text.

[0051] Step S204, inputting the first prompt text into a text generation model, and using the text generation model to generate candidate prompt texts;

[0052] The above-mentioned text generation model can be a large model, a large language model, a multi-language model, etc. The type of text generation model is not limited here and can be selected according to actual needs.

[0053] The candidate prompt text mentioned above is a preliminary prompt text generated by the text generation model according to the first prompt text.

[0054] The candidate prompt texts mentioned above are preliminary prompt texts generated by the text generation model based on the first prompt text. These texts are intermediate products in the generation process and need further evaluation and improvement.

[0055] In an optional embodiment, the first prompt text can be input into the text generation model, and the text generation capability of the text generation model is used to generate candidate prompt texts. The first prompt text contains a detailed description of the task and sample input-output pairs, which help the text generation model understand the specific requirements of the task. The text generation model generates preliminary prompt texts, i.e., candidate prompt texts, based on this information. These candidate prompt texts are intermediate products in the generation process, and their quality and adaptability need to be ensured through evaluation and improvement in the future.

[0056] Step S206, constructing a second prompt text based on the candidate prompt text and the test data set;

[0057] The second prompt text is used to guide the text generation model to modify the prompt text, and the test data set includes at least one test prompt text and at least one test reply text corresponding to the test prompt text.

[0058] The above test data set is a data set used to evaluate the performance of candidate prompt texts, including input text and corresponding expected output text.

[0059] The second prompt text is used to guide the text generation model to improve the candidate prompt text, including task description, prompt word format requirements and output requirements, original prompt words, sample input and output and output result sets of the original prompt words, rules to be followed when modifying, etc. The second prompt text can be a reflective meta-prompt text.

[0060] In an optional embodiment, the second prompt text is constructed based on the candidate prompt text and the test data set. The test data set at least includes a test prompt text and its corresponding test reply text, which are used to evaluate the performance of the candidate prompt text. The second prompt text is a text containing information such as task description, prompt word format requirements and output requirements, original prompt words, sample input and output and output result sets of the original prompt words, and rules to be followed during modification, which is used to guide the text generation model to improve and modify the candidate prompt text. Through this information, the text generation model can identify the deviation between the candidate prompt text and the expected output, and make corresponding adjustments to generate a prompt text that better meets the task requirements.

[0061] In another optional embodiment, in each iteration of the automated prompt adjustment process, the system generates multiple versions of candidate prompt texts. These candidate prompt texts will be input into the large model and their effects will be evaluated through the test data set. After multiple rounds of testing, the system will filter out the one with better effects from these candidate prompt texts. This process not only ensures that each version of the prompt text can be fully tested, but also can select the version that meets the task requirements through comparison.

[0062] Subsequently, the system constructs the second prompt text based on the selected better prompt text and sample data set. The sample data set contains rich contextual information and target response examples, which can provide more training materials for the large model to help it better understand the task requirements and adjustment direction. By using the sample data set to construct the second prompt text, in subsequent iterations, the large model is guided to adjust and adjust the prompt text more accurately to reduce the deviation value from the target response and improve the response quality.

[0063] The process of multiple rounds of reflection is the core component of the automated prompt adjustment method, which involves continuous testing, evaluation, screening of better prompt texts, and building a second prompt text based on the better prompt text and sample data set for the next round of iteration. This process ensures the continuous adjustment of the prompt text until the preset performance standard is achieved or the specified number of iterations is completed, thus producing the final target prompt text.

[0064] In each round of iteration, the system generates multiple versions of candidate prompt texts and evaluates their effectiveness through test data sets. Candidate prompt texts with better results are selected as better prompt texts. Subsequently, based on the better prompt texts and sample data sets, a second prompt text is constructed to guide the next round of iterative updates. This multi-round iterative and optimized process ensures that the prompt text can be continuously improved until it reaches the preset performance standard or completes the specified number of iterations, thereby generating the final target prompt text.

[0065] This refined process not only covers the generation, evaluation, and selection of multiple versions of prompt texts, but also emphasizes the importance of constructing a second prompt text based on better prompt texts and sample data sets, as well as the role of multiple rounds of iterative updates in improving the quality of large model responses. It provides a more comprehensive and in-depth implementation guide for automated prompt adjustment methods, which helps to improve the performance and user experience of large models in practical applications.

[0066] Step S208: input the second prompt text into the text generation model, and use the text generation model to modify the candidate prompt text to obtain the target prompt text.

[0067] In an optional embodiment, by constructing a first prompt text and a second prompt text, a text generation model is used to generate and improve the prompt text, and finally a target prompt text is obtained. The first prompt text is used to guide the text generation model to generate an initial prompt text, and the second prompt text is used to guide the text generation model to improve the candidate prompt text. Through multiple iterations, the prompt text is continuously improved until the task requirements are met.

[0068] This application generates and improves prompt texts through an automated process, solving the problems of time-consuming manual construction of prompt words, reliance on professional knowledge, the need to redesign when tasks change, and possible limitations on the generalization ability of the model. By constructing a first prompt text and a second prompt text, the prompt text is generated and improved using a text generation model, and finally the target prompt text is obtained. This application not only saves time costs, but also improves the performance and adaptability of the model, lowers the technical threshold, and enables novices using large language models to easily generate efficient prompt texts suitable for specific tasks.

[0069] For example, in the scenario of intelligent customer service, if you need to generate a customer service reply prompt text for user consultation on product price. First, prepare a set of high-quality sample data sets, including different questions about product price and corresponding customer service replies. Then, construct the first prompt text, including task description (such as "generate customer service replies that meet user consultation questions"), sample input and output pairs (such as "user consultation product price, customer service replies product price information"), prompt word content and format requirements (such as "prompt words should contain key information of user consultation questions"), output requirements (such as "output format is customer service reply text"), etc. Then, the first prompt text can be input into the text generation model, and the text generation model generates candidate prompt text. After that, the second prompt text can be constructed based on the candidate prompt text and the test data set, including task description, prompt word format requirements and output requirements, original prompt words, sample input and output and output result set of the original prompt words, rules to be followed when modifying, etc. Finally, the second prompt text can be input into the text generation model, and the text generation model modifies the candidate prompt text to obtain the target prompt text. Through this solution, customer service response prompt text suitable for users' inquiries about product prices can be quickly generated, which improves the quality and efficiency of customer service responses and reduces the cost and difficulty of manually constructing prompt words.

[0070] Through the above steps, a first prompt text is constructed based on a sample data set and a target task, wherein the first prompt text is used to guide a text generation model to generate a prompt text, and the sample data set includes at least one sample prompt text and at least one sample reply text corresponding to the sample prompt text; the first prompt text is input into a text generation model, and a candidate prompt text is generated using the text generation model; a second prompt text is constructed based on the candidate prompt text and a test data set, wherein the second prompt text is used to guide a text generation model to modify a prompt text, and the test data set includes at least one test prompt text and at least one test reply text corresponding to the test prompt text; the second prompt text is input into a text generation model, and the candidate prompt text is modified using the text generation model to obtain a target prompt text , achieving the improvement of the prompt word generation efficiency of the text generation model in the related technology; it is easy to notice that by constructing the initial meta-prompt text and inputting it into the text generation model to generate candidate prompt texts, automation can be used to replace traditional manual design, which preliminarily improves the generation efficiency. Subsequently, the test data set feedback is used to automatically construct the second prompt text to guide the model to improve the candidate prompt text. This iterative process further improves the quality of the prompt text. The present application realizes automated iteration from initial design to final improvement, significantly improving the generation efficiency and improvement rate of the prompt words of the text generation model, thereby achieving the technical effect of improving the prompt word generation efficiency of the text generation model, and then solving the technical problem of low prompt word generation efficiency of the text generation model in the related technology.

[0071] In the above embodiment of the present application, the first prompt text is input into a text generation model, and candidate prompt texts are generated using the text generation model, including: inputting the first prompt text into a text generation model, and generating at least one prompt text using the text generation model; and evaluating at least one prompt text based on a test data set to obtain candidate prompt texts.

[0072] In an optional embodiment, the first prompt text can be input into a text generation model, and the text generation model generates at least one prompt text based on this information. Then, the generated prompt texts are evaluated using a test data set to determine which prompt texts perform better and can be used as candidate prompt texts. This process ensures that the generated prompt texts not only meet the task description, but also perform well in actual tests.

[0073] By inputting the first prompt text into the text generation model, and using the text generation model to generate at least one prompt text, and then evaluating these prompt texts based on the test data set, the candidate prompt text is finally determined. This method not only ensures that the generated prompt text meets the task description, but also shows good performance in actual tests. Through evaluation and selection, prompt texts that meet the task requirements can be screened out, thereby improving the performance and adaptability of the model and reducing the cost and difficulty of manually constructing prompt words.

[0074] In the above embodiment of the present application, at least one prompt text is evaluated based on a test data set to obtain candidate prompt texts, including: for any prompt text, based on the similarity between the prompt text and different test prompt texts, determining a target test prompt text corresponding to the prompt text from at least one test prompt text; inputting the prompt text into a text generation model, and using the text generation model to generate candidate reply texts corresponding to the candidate prompt text; based on the similarity between the candidate reply text and the target test reply text, determining whether the prompt text is a candidate prompt text, wherein the target test reply text is a test reply text corresponding to the target test prompt text.

[0075] The above-mentioned prompt text is text generated by the text generation model based on the first prompt text, and is used to guide the model to complete a specific task.

[0076] The above test dataset contains a dataset of input text and corresponding output text, which is used to evaluate the performance of the generated prompt text.

[0077] The target test prompt text is a test prompt text determined from the test data set that is relatively similar to the prompt text.

[0078] In an optional embodiment, at least one generated prompt text can be evaluated to determine which prompt texts can be used as candidate prompt texts. Specifically, the similarity between each prompt text and each test prompt text in the test data set is first calculated, and the test prompt text with greater similarity is selected as the target test prompt text. Then, the prompt text is input into the text generation model to generate the corresponding candidate reply text. Finally, the similarity between the candidate reply text and the target test reply text is compared. If the similarity is high, the prompt text is considered to be a candidate prompt text.

[0079] For example, in the scenario of a briefing book, a prompt word generation system can be built for intelligent customer service, and the task is to generate customer service replies that match the user's consultation questions. Some prompt texts can be generated, and a test data set is prepared. The test data set contains different variants of the user's consultation questions and their corresponding customer service replies.

[0080] Through the above steps, the performance of the generated prompt text can be systematically evaluated, and the prompt text with better performance can be selected as the candidate prompt text through the test data set as the input for the next round of reflection. This method not only ensures that the generated prompt text shows good performance in the actual test, but also further improves the quality of the prompt text through similarity evaluation. By evaluating the similarity between the generated prompt text and the prompt text in the test data set, the relevant test prompt text can be selected as the target test prompt text, and then the candidate reply text is generated, and the similarity between the candidate reply text and the target test reply text is compared to determine whether the prompt text is a candidate prompt text. The above method not only ensures that the generated prompt text shows good performance in the actual test, but also further improves the quality of the prompt text through similarity evaluation. In this way, the prompt text that meets the task requirements can be quickly screened out, thereby improving the performance and adaptability of the model and reducing the cost and difficulty of manually constructing prompt words.

[0081] In the above embodiment of the present application, based on the similarity between the candidate reply text and the target test reply text, determining whether the prompt text is a candidate prompt text includes: in response to the similarity being greater than a preset threshold, outputting the prompt text; in response to receiving feedback information on the prompt text within a preset time length after outputting the prompt text, modifying the prompt text based on the feedback information to obtain a modified prompt text, and determining that the modified prompt text is a candidate prompt text; in response to not receiving feedback information within the preset time length, determining that the prompt text is a candidate prompt text.

[0082] The above similarity is a quantitative index for measuring the similarity between two texts. Based on the similarity, a better candidate prompt text can be determined from multiple prompt texts.

[0083] The above-mentioned preset threshold is a preset similarity threshold, which is used to determine whether the texts are similar enough. The above-mentioned preset duration can be set according to actual conditions.

[0084] The above feedback information is the evaluation or modification suggestion of the generated prompt text by the user or the system.

[0085] The modified prompt text mentioned above is the text obtained by modifying the original prompt text according to the feedback information.

[0086] The above similarity judgment is to calculate the similarity between the candidate reply text and the target test reply text. Output prompt text: If the similarity is greater than a preset threshold, output prompt text.

[0087] In an optional embodiment, the quality of the prompt text can be evaluated by calculating the similarity between the candidate reply text and the target test reply text. If the similarity exceeds a preset threshold, the prompt text is considered qualified and is output. Afterwards, wait for feedback information within a preset time. If feedback is received, the prompt text is modified according to the feedback, and the modified text is determined as the candidate prompt text. If no feedback is received, the original prompt text is directly determined as the candidate prompt text. This process ensures that the prompt text not only performs well in automatic evaluation, but can also be improved based on feedback in actual use.

[0088] For example, suppose that an intelligent customer service system is being built, and the task is to generate customer service responses that meet the user's consultation questions. Some candidate response texts have been generated and compared with the target test response text for similarity. For example, if the similarity between a candidate response text and the target test response text exceeds a preset threshold, it can be output. After that, wait for feedback from the user or system within a certain period of time. If feedback is received, for example, the user points out that the response is not detailed enough, modify the prompt text according to the feedback to make it more complete, and use the modified text as the candidate prompt text. If no feedback is received, use the original prompt text as the candidate prompt text.

[0089] Through the above steps, it is possible to ensure that the generated prompt text not only performs well in automatic evaluation, but also can be improved according to feedback in actual use. This method improves the quality and adaptability of the prompt text, making it more in line with the needs of practical applications. The present application ensures that the generated prompt text not only performs well in automatic evaluation, but also can be improved according to feedback in actual use through similarity judgment and feedback mechanism. This method improves the quality and adaptability of the prompt text, making it more in line with the needs of practical applications. In this way, prompt texts that meet the task requirements can be quickly screened out, thereby improving the performance and adaptability of the model and reducing the cost and difficulty of manually constructing prompt words.

[0090] In the above embodiment of the present application, a first prompt text is constructed based on a sample data set and a target task, including: obtaining a task description of the target task, a prompt text generation condition, and a prompt text output condition, wherein the prompt text generation condition is used to indicate a condition that needs to be met for prompt text generation, and the prompt text output condition is used to indicate a condition that needs to be met for prompt text output; based on the task description, the sample data set, the prompt text generation condition, and the prompt text output condition, the first prompt text is constructed.

[0091] The above task description is a clear definition of the task, which helps the text generation model understand the nature of the task. The above prompt text generation conditions are conditions that need to be met when generating prompt text, such as containing specific keywords or structures.

[0092] The above-mentioned prompt text output conditions are format or content requirements that need to be met when the prompt text is output, such as output format or language style.

[0093] In an optional embodiment, in the process of constructing the first prompt text, first obtain the task description of the target task, the prompt text generation conditions and the prompt text output conditions. This information helps to clarify the specific requirements of the task and the conditions that need to be met when generating the prompt text. Then, combine these conditions and the sample data set to construct the first prompt text. This process ensures that the first prompt text can fully guide the text generation model to generate prompt text that meets the task requirements.

[0094] For example, suppose you are building an intelligent customer service system, and the task is to generate customer service replies that match user consultation questions. First, get the task description, such as "generate customer service replies that match user consultation questions." Then, define prompt text generation conditions, such as "prompt text should contain key information about user consultation questions," and prompt text output conditions, such as "output format is customer service reply text, and the language style should be friendly and professional."

[0095] Based on this information and the sample data set, the first prompt text is constructed. For example, the sample data set may contain different variations of user consultation questions and their corresponding customer service replies. Combining these sample data and the defined conditions, the first prompt text is constructed to guide the text generation model to generate prompt text that meets the task requirements.

[0096] By obtaining the task description, prompt text generation conditions and prompt text output conditions, and combining with the sample data set, a comprehensive first prompt text can be constructed. This process ensures that the first prompt text can effectively guide the text generation model to generate prompt text that meets the task requirements, thereby improving the quality and adaptability of the generated prompt text. The present application constructs a comprehensive first prompt text by comprehensively considering the task description, prompt text generation conditions and prompt text output conditions. This method can not only clarify the specific requirements of the task, but also provide specific generation and output conditions, thereby improving the quality and adaptability of the generated prompt text. In this way, prompt text that meets the task requirements can be quickly generated, the performance and adaptability of the model can be improved, and the cost and difficulty of manually constructing prompt words can be reduced.

[0097] In the above embodiment of the present application, a second prompt text is constructed based on candidate prompt texts and a test data set, including: obtaining prompt text modification conditions, candidate replies, and deviation values ​​of test replies, wherein the prompt text modification conditions are used to indicate conditions that need to be met for prompt text modification; based on the task description, the test data set, prompt text generation conditions, prompt text output conditions, prompt text modification conditions, deviation values, and candidate prompt texts, a second prompt text is constructed.

[0098] The above-mentioned prompt text modification condition defines the conditions that must be met when the prompt text needs to be modified, such as the similarity being lower than a certain threshold.

[0099] The above deviation value is a quantitative indicator used to measure the difference between the candidate response text and the test response text.

[0100] In an optional embodiment, in the process of constructing the second prompt text, the conditions for modifying the prompt text and the deviation value between the candidate reply and the test reply are first obtained. This information helps to understand the shortcomings of the current prompt text. Then, the second prompt text is constructed in combination with the task description, the test data set, the prompt text generation conditions, the prompt text output conditions, the prompt text modification conditions, the deviation value and the candidate prompt text. This process ensures that the second prompt text can comprehensively guide the text generation model to improve the prompt text.

[0101] Exemplarily, suppose that an intelligent customer service system is being built, and the task is to generate customer service responses that meet user consultation questions. Some candidate prompt texts have been generated, and the deviation values ​​between the candidate responses and the test responses have been calculated. For example, it is found that the deviation value between a candidate response and the test response is high, indicating that the candidate response is not accurate enough. Prompt text modification conditions are also defined, such as when the deviation value exceeds a certain threshold, the prompt text needs to be modified. Based on this information, a second prompt text is constructed, which includes a task description, a test data set, prompt text generation conditions, prompt text output conditions, prompt text modification conditions, deviation values, and candidate prompt texts. This second prompt text will guide the text generation model to improve the prompt text to generate a more accurate response.

[0102] By obtaining the prompt text modification conditions and deviation values, combined with the task description, test data set, prompt text generation conditions, prompt text output conditions, prompt text modification conditions, deviation values, and candidate prompt texts, a comprehensive second prompt text can be constructed. This process ensures that the second prompt text can effectively guide the text generation model to improve the prompt text, thereby improving the quality and adaptability of the generated prompt text.

[0103] This application constructs a comprehensive second prompt text by comprehensively considering the task description, test data set, prompt text generation conditions, prompt text output conditions, prompt text modification conditions, deviation values, and candidate prompt texts. This method can not only identify the shortcomings of the current prompt text, but also provide specific modification guidance, thereby improving the quality and adaptability of the generated prompt text. In this way, the prompt text can be quickly improved to make it more in line with the needs of practical applications, improve the performance and adaptability of the model, and reduce the cost and difficulty of manually constructing prompt words.

[0104] In the above embodiment of the present application, the second prompt text is input into the text generation model, and the candidate prompt text is modified by the text generation model to obtain the target prompt text, including: inputting the second prompt text into the text generation model, and modifying the candidate prompt text by the text generation model to obtain the first prompt text; taking the first prompt text as the candidate prompt text, repeatedly executing the steps of constructing the second prompt text based on the candidate prompt text and the test data set, inputting the second prompt text into the text generation model, and modifying the candidate prompt text by the text generation model to obtain the first prompt text, until the preset conditions are met; determining the first prompt text as the target prompt text.

[0105] The above-mentioned second prompt text is used to guide the text generation model to modify the candidate prompt text, including task description, test data set, prompt text generation conditions, prompt text output conditions, prompt text modification conditions, deviation value and candidate prompt text and other information.

[0106] The candidate prompt texts mentioned above are prompt texts that are considered to have potential after preliminary evaluation and need further improvement.

[0107] The first prompt text mentioned above is the text obtained after the text generation model modifies the candidate prompt text according to the second prompt text.

[0108] The above-mentioned preset conditions are pre-set conditions used to determine whether to stop the improvement process, such as reaching a certain similarity or after a certain number of iterations.

[0109] In an optional embodiment, in the process of improving the prompt text, the second prompt text is first input into the text generation model, and the candidate prompt text is modified using the text generation model to obtain the first prompt text. Then, the first prompt text is used as a new candidate prompt text, and the steps of constructing the second prompt text and modifying the candidate prompt text are repeated until the preset conditions are met. This process ensures that the prompt text is improved through multiple iterations and finally reaches a target prompt text with high quality and high adaptability.

[0110] Exemplarily, suppose that an intelligent customer service system is being built, and the task is to generate customer service replies that meet user consultation questions. Some candidate prompt texts have been generated, and the deviation values ​​between the candidate replies and the test replies have been calculated. Based on this information, a second prompt text is constructed, which contains a task description, a test data set, prompt text generation conditions, prompt text output conditions, prompt text modification conditions, deviation values, and candidate prompt texts. The second prompt text is input into a text generation model, and the text generation model modifies the candidate prompt text to obtain a first prompt text. Then, the first prompt text is used as a new candidate prompt text, and the steps of constructing the second prompt text and modifying the candidate prompt text are repeated until a preset condition is met, such as the similarity between the candidate reply and the test reply reaches a certain threshold or after a certain number of iterations. Finally, the first prompt text is determined to be the target prompt text.

[0111] By inputting the second prompt text into the text generation model, the candidate prompt text is modified by the text generation model to obtain the first prompt text, and the first prompt text is used as the new candidate prompt text, and the improvement process is repeated until the preset conditions are met, thereby determining the target prompt text. This process ensures the quality and adaptability of the prompt text through multiple iterations of improvement, making it more in line with the needs of actual applications.

[0112] This application uses a text generation model to modify candidate prompt texts through multiple iterations until the preset conditions are met, thereby determining the target prompt text. This method can not only identify the shortcomings of the current prompt text, but also gradually improve the quality and adaptability of the prompt text through multiple improvements. In this way, high-quality prompt texts can be quickly generated, the performance and adaptability of the model can be improved, and the cost and difficulty of manually constructing prompt words can be reduced.

[0113] In the above embodiments of the present application, satisfying the preset conditions includes at least one of the following: the similarity between the first prompt text and the candidate prompt text is less than a preset threshold; the number of times the text generation model modifies the candidate prompt text is greater than or equal to the preset threshold.

[0114] The above similarity is a quantitative indicator to measure the similarity between two texts.

[0115] The above-mentioned preset threshold is a preset threshold of similarity or number of modifications, which is used to determine whether to stop the improvement process.

[0116] The above-mentioned number of modifications is the number of times the text generation model modifies the candidate prompt text.

[0117] The above similarity judgment is to calculate the similarity between the first prompt text and the candidate prompt text. The number of modifications is to count the number of modifications of the candidate prompt text by the text generation model. The above preset condition is to judge whether the similarity is less than a preset threshold, or whether the number of modifications is greater than or equal to the preset threshold. If the preset condition is met, the first prompt text is determined to be the target prompt text.

[0118] In an optional embodiment, in the process of improving the prompt text, the similarity between the first prompt text and the candidate prompt text is first calculated, and the number of modifications of the candidate prompt text by the text generation model is counted. Then, it is determined whether the similarity is less than a preset threshold, or whether the number of modifications is greater than or equal to the preset threshold. If any condition is met, the first prompt text is determined to be the target prompt text. This process ensures that the improvement process stops after reaching a certain similarity or after a certain number of modifications, thereby avoiding excessive improvement and waste of resources.

[0119] Exemplarily, in the scenario of the briefing book, it is assumed that an intelligent customer service system is being built, and the task is to generate customer service responses that meet the user's consultation questions. Some candidate prompt texts have been generated, and the deviation values ​​between the candidate responses and the test responses have been calculated. Based on this information, a second prompt text is constructed, and the second prompt text is input into the text generation model, which modifies the candidate prompt text to obtain the first prompt text. Then, the similarity between the first prompt text and the candidate prompt text is calculated, and the number of modifications is counted. If the similarity is less than a preset threshold, or the number of modifications is greater than or equal to the preset threshold, the first prompt text is determined to be the target prompt text.

[0120] By calculating the similarity between the first prompt text and the candidate prompt text and counting the number of times the text generation model modifies the candidate prompt text, it is determined whether the preset conditions are met. If the conditions are met, the first prompt text is determined to be the target prompt text. This process sets thresholds for similarity and number of modifications to ensure that the improvement process stops after reaching a certain similarity or after a certain number of modifications, thereby avoiding excessive improvement and waste of resources.

[0121] This step ensures that the improvement process stops after reaching a certain similarity or after a certain number of modifications by setting thresholds for similarity and number of modifications. This method can not only identify the shortcomings of the current prompt text, but also gradually improve the quality and adaptability of the prompt text through multiple improvements. In this way, high-quality prompt text can be generated quickly, the performance and adaptability of the model can be improved, and the cost and difficulty of manually constructing prompt words can be reduced. At the same time, excessive improvement and waste of resources are avoided, and the efficiency of the improvement process is improved.

[0122] Figure 3 is a flowchart of a prompt word generation process according to an embodiment of the present application. Figure 3 As shown in the figure, a high-quality prompt word (Prompt) can be generated for a large language model (LLM) through a small amount of labeled data and iterative updates. The specific steps are as follows:

[0123] Small amount of labeled data: The starting point of the process is a small amount of labeled training data in the form of question (q) and answer (a) pairs, i.e.<q,a> This data is used to guide the large model to learn task-specific features.

[0124] Prompt_LLM: This part uses a large language model to generate prompt words. The model generates initial prompt words based on the input meta prompt words and a small amount of annotated data.

[0125] Generate prompt words: This is the prompt word generated by the model for the first time, based on the guidance of the initialization meta prompt word.

[0126] Candidate prompt words: The initial prompt words generated by the model will enter this stage to generate multiple candidate solutions for subsequent evaluation and selection.

[0127] Target prompt word: Among the candidate prompt words, the most effective prompt word is selected as the target prompt word according to the test results, which will be the result of the overall process improvement.

[0128] Large model task (Task_LLM): The large model performs a specific task based on the final selected prompt word and generates output.

[0129] Small amount of labeled data: Here again, we emphasize the importance of small amount of labeled data for testing and evaluating the performance of the model when using the target prompt word. The format can be a question (q) and answer (a) pair, that is,<q,a> .

[0130] Complete task execution cycle (Q, Prompt, A_real, A_general): This represents a complete task execution cycle, that is, inputting the question (Q), using the prompt word (Prompt), obtaining the actual output (A_real) and the expected general output (A_general).

[0131] Reflect Meta Prompt: This is a key part of the process. The output of the model is analyzed through Reflect Meta Prompt, deviations from the expected output are identified, and the prompts are improved based on this feedback, forming a closed loop of continuous learning and improvement.

[0132] Update prompt words: After reflection and analysis, the prompt words will be updated and then tested again through the large model. This process will be iterated repeatedly until the effect of the prompt words reaches the expected level or there is no significant improvement.

[0133] Overall, the attached figure shows an automated process that starts with a small amount of training data, automatically generates prompt words through the model, and then evaluates, reflects and updates, ultimately achieving the goal of improving the model's task execution performance. This process places special emphasis on feedback mechanisms and iterative updates to ensure that the generated prompt words can accurately guide the model to complete specific tasks while maintaining efficiency and flexibility.

[0134] This application has designed a set of automatic generation process of prompt words, which is used to generate and improve prompt words. In this process, this application first prepares a batch of high-quality input and output data for the target task. These data are not only used to guide the generation process of prompt words, but also used to test the effectiveness and performance of prompt words.

[0135] Step 1: Generate initial prompt words.

[0136] In this step, the present application constructs an initialization meta prompt to generate an initial prompt. The meta prompt consists of four key components:

[0137] Task description: Provide a clear definition of the task to help large models identify the nature of the task, because the input and output data themselves may not accurately reveal the task requirements.

[0138] Example input-output pairs: Following the principle of in-context learning, these examples help the model understand the requirements of the current task more clearly and guide the model to generate the desired output.

[0139] Content and format requirements for prompt words: Clarify the content and format that need to be included when generating prompt words to help the model generate high-quality initial prompt words.

[0140] Output requirements: Set specific output format requirements to facilitate the extraction of generated initial prompt words from the model output.

[0141] Step 2: Evaluate the initial cue word.

[0142] The generated initial cue words are evaluated on the test dataset to determine their effectiveness.

[0143] Step 3: Reflect and improve the initial prompt words.

[0144] In this stage, reflective meta prompts are used to improve the initial prompts and generate multiple candidate solutions. Reflective meta prompts include the following six parts:

[0145] Task description, prompt word format requirements and output requirements: similar to the corresponding parts in the initialization meta prompt word.

[0146] Original prompt words: The original prompt words are indispensable as the basis for improvement.

[0147] Example inputs, outputs, and output results for the original prompt: In addition to the input-output pairs in the initialization meta-prompt, the newly added output results help the model identify the deviation between the current prompt output and the expected output.

[0148] Rules to follow when modifying: These rules prevent the model from blindly adding new rules when modifying the prompt words, which would make the prompt words lengthy and less effective.

[0149] By inputting the reflective meta-prompt words for multiple times, multiple different versions of improved candidate prompt words are obtained.

[0150] Step 4: Choose better prompt words.

[0151] Evaluate the performance of all candidate prompt words on the test set and select the prompt words with better performance.

[0152] Step 5: Iterate repeatedly.

[0153] Continue the process of steps 3 and 4 until the evaluation indicator no longer improves or the specified number of iterations is reached.

[0154] Through the systematic execution of this process, it is ensured that the generated prompt words are rigorously improved to meet the needs of the task.

[0155] This application only needs to provide a task description and a set of high-quality input and output data for the target task, and the automated process can generate efficient prompt words suitable for specific tasks. This process is designed to be particularly friendly to novices who use large language models, simplifying the complexity of constructing prompt words and significantly lowering the technical threshold.

[0156] This application proposes an automated process for generating prompt words. The entire method forms a closed-loop automated process from generation to evaluation and then to update, and allows the quality of prompt words to be continuously improved through multiple iterations until the performance requirements of the task are met. In the reflection and update stage, emphasis is placed on learning and improving from the difference between the output of the original prompt word and the expected output. By identifying deviations from the output result set of the original prompt word, guidance is provided for the update, forming a feedback closed loop to improve the fit between the prompt word and the task requirements.

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

[0158] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0159] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0160] Figure 4 is a flow chart of a method for generating prompt text according to an embodiment of the present application. Figure 4 As shown, the method may include the following steps:

[0161] Step S402, in response to an input instruction on the operation interface, displaying a sample data set and a target task on the operation interface;

[0162] The sample data set includes at least one sample prompt text and at least one sample reply text corresponding to the sample prompt text.

[0163] The above input instruction may be generated according to the user's touch operation on the operation interface.

[0164] Step S404, in response to the processing instruction acting on the operation interface, the target prompt text is displayed on the operation interface.

[0165] Among them, the target prompt text is obtained by inputting the second prompt text into the text generation model and modifying the candidate prompt text using the text generation model, the second prompt text is constructed based on the candidate prompt text and the test data set, the candidate prompt text is generated by inputting the first prompt text into the text generation model, the first prompt text is constructed based on the sample data set and the target task, the first prompt text is used to guide the text generation model to generate prompt text, the second prompt text is used to guide the text generation model to modify the prompt text, and the test data set includes at least one test prompt text and at least one test reply text corresponding to the test prompt text.

[0166] The above processing instructions may be obtained by performing processing operations on the sample data set and the target task.

[0167] The system displays the sample data set and target task on the operation interface, allowing users to view and operate the data. The system displays the target prompt text on the operation interface, allowing users to view and use the adjusted prompt text. These two steps ensure that users can intuitively view and operate data, as well as use the adjusted prompt text.

[0168] By displaying the sample data set and target task on the operation interface, as well as displaying the target prompt text, an intuitive user interface is provided, allowing users to easily view and operate data, as well as use the adjusted prompt text. This approach not only improves the efficiency of user-system interaction, but also ensures that users can intuitively understand and use the adjusted prompt text, thereby improving the performance and adaptability of the model and reducing the cost and difficulty of manually constructing prompt words.

[0169] Through the above steps, in response to the input instruction on the operation interface, the sample data set and the target task are displayed on the operation interface; wherein the sample data set includes at least one sample prompt text and at least one sample reply text corresponding to the sample prompt text. In response to the processing instruction on the operation interface, the target prompt text is displayed on the operation interface. Among them, the target prompt text is obtained by inputting the second prompt text into the text generation model and modifying the candidate prompt text using the text generation model, the second prompt text is constructed based on the candidate prompt text and the test data set, the candidate prompt text is generated by inputting the first prompt text into the text generation model, the first prompt text is constructed based on the sample data set and the target task, the first prompt text is used to guide the text generation model to generate the prompt text, and the second prompt text is used to guide the text generation model to modify the prompt text. The test data set includes at least one test prompt text and at least one test reply text corresponding to the test prompt text, thereby improving the prompt word generation efficiency of the text generation model in the related art; it is easy to notice that by constructing the initial meta-prompt text and inputting it into the text generation model to generate the candidate prompt text, the traditional manual design can be replaced by automated means, which preliminarily improves the generation efficiency. Subsequently, the test data set feedback is used to automatically construct the second prompt text to guide the model to improve the candidate prompt text. This iterative process further improves the quality of the prompt text. The present application realizes automated iteration from initial design to final improvement, significantly improves the generation efficiency and improvement rate of the prompt words of the text generation model, thereby achieving the technical effect of improving the prompt word generation efficiency of the text generation model, thereby solving the technical problem of low prompt word generation efficiency of the text generation model in the related art.

[0170] Figure 5 is a flow chart of a method for generating prompt text according to an embodiment of the present application. Figure 5 As shown, the method may include the following steps:

[0171] Step S502, obtaining a sample data set and a target task by calling a first interface;

[0172] The first interface includes a first parameter, and a parameter value of the first parameter includes a sample data set and a target task.

[0173] The first interface mentioned above can be an interface for data interaction between the cloud server and the client, and the sample data set and the target task can be passed into the interface function as the first parameter of the interface function to achieve the purpose of uploading the sample data set and the target task to the cloud server.

[0174] Step S504, constructing a first prompt text based on the sample data set and the target task;

[0175] The first prompt text is used to guide the text generation model to generate the prompt text.

[0176] The sample data set includes at least one sample prompt text and at least one sample reply text corresponding to the sample prompt text.

[0177] Step S506, inputting the first prompt text into a text generation model, and using the text generation model to generate candidate prompt texts;

[0178] Step S508, constructing a second prompt text based on the candidate prompt text and the test data set;

[0179] The second prompt text is used to guide the text generation model to modify the prompt text, and the test data set includes at least one test prompt text and at least one test reply text corresponding to the test prompt text.

[0180] Step S510, inputting the second prompt text into the text generation model, and using the text generation model to modify the candidate prompt text to obtain the target prompt text;

[0181] Step S512: output the target prompt text by calling the second interface.

[0182] The second interface includes a second parameter, and a parameter value of the second parameter includes a target prompt text.

[0183] The above-mentioned second interface can be an interface for data interaction between the cloud server and the client. The cloud server can pass the target prompt text into the interface function as the second parameter of the interface function to achieve the purpose of sending the target prompt text to the client.

[0184] Through the above steps, a sample data set and a target task are obtained by calling a first interface, wherein the first interface includes a first parameter, and a parameter value of the first parameter includes a sample data set and a target task; a first prompt text is constructed based on the sample data set and the target task, wherein the first prompt text is used to guide a text generation model to generate a prompt text, wherein the sample data set includes at least one sample prompt text and at least one sample reply text corresponding to the sample prompt text; the first prompt text is input into a text generation model, and a candidate prompt text is generated using the text generation model; a second prompt text is constructed based on the candidate prompt text and a test data set, wherein the second prompt text is used to guide a text generation model to modify a prompt text, and the test data set includes at least one test prompt text and at least one test reply text corresponding to the test prompt text; the second prompt text is input into a text generation model, and the candidate prompt text is modified using the text generation model to obtain target prompt text; outputting the target prompt text by calling the second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter includes the target prompt text, thereby improving the prompt word generation efficiency of the text generation model in the related art; it is easy to notice that by constructing an initial meta-prompt text and inputting it into the text generation model to generate candidate prompt texts, automation can be used to replace traditional manual design, thereby preliminarily improving the generation efficiency, and then, using the test data set feedback, automatically constructing the second prompt text to guide the model to improve the candidate prompt text, and this iterative process further improves the quality of the prompt text. The present application realizes automated iteration from initial design to final improvement, significantly improving the generation efficiency and improvement rate of the prompt words of the text generation model, thereby achieving the technical effect of improving the prompt word generation efficiency of the text generation model, thereby solving the technical problem of low prompt word generation efficiency of the text generation model in the related art.

[0185] According to an embodiment of the present application, a prompt text generating device for implementing the prompt text generating method is also provided. Figure 6 is a schematic diagram of a prompt text generating device according to an embodiment of the present application, such as Figure 6 As shown, the device 600 includes: a first construction module 602 , a generation module 604 , a second construction module 606 , and a modification module 608 .

[0186] Among them, the first construction module is used to construct a first prompt text based on a sample data set and a target task, wherein the first prompt text is used to guide a text generation model to generate prompt text, and the sample data set includes at least one sample prompt text and at least one sample reply text corresponding to the sample prompt text; the generation module is used to input the first prompt text into the text generation model, and use the text generation model to generate candidate prompt texts; the second construction module is used to construct a second prompt text based on the candidate prompt text and a test data set, wherein the second prompt text is used to guide the text generation model to modify the prompt text, and the test data set includes at least one test prompt text and at least one test reply text corresponding to the test prompt text; the modification module is used to input the second prompt text into the text generation model, and use the text generation model to modify the candidate prompt text to obtain the target prompt text.

[0187] It should be noted that the first construction module 602, the generation module 604, the second construction module 606, and the modification module 608 correspond to steps S202 to S208 in the above embodiment, and the four modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run in the server 10 provided in the above embodiment as part of the device.

[0188] In the above embodiment of the present application, the generation module is used to input the first prompt text into the text generation model, and generate at least one prompt text using the text generation model; and evaluate the at least one prompt text based on the test data set to obtain a candidate prompt text.

[0189] In the above-mentioned embodiment of the present application, the generation module is used to determine, for any prompt text, a target test prompt text corresponding to the prompt text from at least one test prompt text based on the similarity between the prompt text and different test prompt texts; input the prompt text into the text generation model, and use the text generation model to generate candidate reply texts corresponding to the candidate prompt text; based on the similarity between the candidate reply text and the target test reply text, determine whether the prompt text is a candidate prompt text, wherein the target test reply text is a test reply text corresponding to the target test prompt text.

[0190] In the above-mentioned embodiment of the present application, the generation module is used to output a prompt text in response to the similarity being greater than a preset threshold; in response to receiving feedback information on the prompt text within a preset time length after outputting the prompt text, modify the prompt text based on the feedback information to obtain a modified prompt text, and determine the modified prompt text as a candidate prompt text; in response to not receiving feedback information within the preset time length, determine the prompt text as a candidate prompt text.

[0191] In the above embodiment of the present application, the first construction module is used to obtain the task description, prompt text generation conditions and prompt text output conditions of the target task, wherein the prompt text generation conditions are used to indicate the conditions that need to be met for prompt text generation, and the prompt text output conditions are used to indicate the conditions that need to be met for prompt text output; based on the task description, sample data set, prompt text generation conditions and prompt text output conditions, the first prompt text is constructed.

[0192] In the above embodiment of the present application, the second construction module is used to obtain the prompt text modification conditions, candidate replies and deviation values ​​of the test replies, wherein the prompt text modification conditions are used to indicate the conditions that need to be met for prompt text modification; based on the task description, test data set, prompt text generation conditions, prompt text output conditions, prompt text modification conditions, deviation values ​​and candidate prompt texts, the second prompt text is constructed.

[0193] In the above embodiment of the present application, the modification module is used to input the second prompt text into the text generation model, and use the text generation model to modify the candidate prompt text to obtain the first prompt text; use the first prompt text as the candidate prompt text, repeatedly execute the steps of constructing the second prompt text based on the candidate prompt text and the test data set, input the second prompt text into the text generation model, and use the text generation model to modify the candidate prompt text to obtain the first prompt text, until the preset conditions are met; determine that the first prompt text is the target prompt text.

[0194] In the above embodiments of the present application, satisfying the preset conditions includes at least one of the following: the similarity between the first prompt text and the candidate prompt text is less than a preset threshold; the number of times the text generation model modifies the candidate prompt text is greater than or equal to the preset threshold.

[0195] According to an embodiment of the present application, a prompt text generating device for implementing the prompt text generating method is also provided. Figure 7 is a schematic diagram of a prompt text generating device according to an embodiment of the present application, such as Figure 7 As shown, the device 700 includes: a first display module 702 and a second display module 704 .

[0196] Among them, the first display module is used to respond to the input instructions acting on the operation interface, and display the sample data set and the target task on the operation interface, wherein the sample data set includes at least one sample prompt text and at least one sample reply text corresponding to the sample prompt text; the second display module is used to respond to the processing instructions acting on the operation interface, and display the target prompt text on the operation interface, wherein the target prompt text is obtained by inputting the second prompt text into the text generation model and modifying the candidate prompt text using the text generation model, the second prompt text is constructed based on the candidate prompt text and the test data set, the candidate prompt text is generated by inputting the first prompt text into the text generation model, the first prompt text is constructed based on the sample data set and the target task, the first prompt text is used to guide the text generation model to generate the prompt text, the second prompt text is used to guide the text generation model to modify the prompt text, and the test data set includes at least one test prompt text and at least one test reply text corresponding to the test prompt text.

[0197] It should be noted that the first display module 702 and the second display module 704 correspond to steps S402 to S404 in the above embodiment, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run as part of the device in the server 10 provided in the above embodiment.

[0198] According to an embodiment of the present application, a prompt text generating device for implementing the prompt text generating method is also provided. Figure 8 is a schematic diagram of a prompt text generating device according to an embodiment of the present application, such as Figure 8 As shown, the device 800 includes: an acquisition module 802 , a first construction module 804 , a generation module 806 , a second construction module 808 , a modification module 810 , and an output module 812 .

[0199] Among them, the acquisition module is used to obtain a sample data set and a target task by calling a first interface, wherein the first interface includes a first parameter, and the parameter value of the first parameter includes the sample data set and the target task; the first construction module is used to construct a first prompt text based on the sample data set and the target task, wherein the first prompt text is used to guide the text generation model to generate a prompt text, wherein the sample data set includes at least one sample prompt text and at least one sample reply text corresponding to the sample prompt text; the generation module is used to input the first prompt text into the text generation model, and use the text generation model to generate candidate prompt texts; the second construction module is used to construct a second prompt text based on the candidate prompt text and a test data set, wherein the second prompt text is used to guide the text generation model to modify the prompt text, and the test data set includes at least one test prompt text and at least one test reply text corresponding to the test prompt text; the modification module is used to input the second prompt text into the text generation model, and use the text generation model to modify the candidate prompt text to obtain the target prompt text; the output module is used to output the target prompt text by calling the second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter includes the target prompt text.

[0200] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in the above embodiments, as well as the application scenario and implementation process, but is not limited to the scheme provided in the above embodiments.

[0201] An embodiment of the present application may provide a computing device. Fig. 9 is a structural block diagram of a computing device according to an embodiment of the present application. Fig. 9 As shown, the computing device 100 may include: one or more (only one is shown in the figure) processors 102, a memory 104, a storage controller, and a peripheral interface.

[0202] The above-mentioned computing device can be understood as an integrated intelligent terminal, including but not limited to a server, a desktop computer, a PC (Personal Computer), a model all-in-one machine, etc., and the computing device can be pre-installed with the model in the above-mentioned embodiment of the present application.

[0203] Specifically, the computing device can pre-set multiple types of models, including but not limited to models in the fields of natural language processing, visual processing, speech processing, code processing, multimodal task processing, etc., so as to provide a variety of model choices. In different product forms, the computing device can support one or more model usage methods, including but not limited to model training, model calling, model fine-tuning, model deployment, model reasoning and application, etc. In some product forms, the computing device also supports model management, including but not limited to multi-type model management (supporting the management of multiple types of models such as discriminants and generative models), model version control (supporting the control of different model versions), model evaluation (based on model evaluation tools, evaluating the performance and effect of the model), etc. In other product forms, the computing device can also create applications based on the model, provide API calling capabilities, and can call the model to the created application through the API interface, while providing application management tools to achieve management and monitoring of the application.

[0204] Furthermore, the computing device can also include data management (supporting the creation and management of model tuning data sets), a training center (providing rich training resources to help users learn and master AI technology), and basic management and control capabilities (providing enterprise-level basic management and control capabilities to ensure the security and efficient operation of the system). Through the above functions, a comprehensive, integrated AI development, training, deployment and application device is provided.

[0205] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the methods in the above embodiments. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal A via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0206] The processor may call the executable program stored in the memory through the transmission device to execute any method in the above embodiments.

[0207] An embodiment of the present application may provide an electronic device. Fig.10 is a structural block diagram of an electronic device according to an embodiment of the present application. Fig.10 As shown, the electronic device may include: an input / output device 112 ; a memory 114 and a processor 116 , wherein the processor 116 is connected to the input / output device 112 and the memory 114 via a bus 118 .

[0208] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the methods in the above embodiments. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal A via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0209] The processor may call the executable program stored in the memory through the transmission device to execute the method described in any one of the above embodiments.

[0210] Those skilled in the art will understand that Fig.10 The structure shown is for illustration only, and the computing device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Fig.10 The structure of the computing device is not limited. For example, the computing device 100 may include more or fewer components (such as a network interface, a display device, etc.) than those shown in the figure, or may have a different configuration than that shown in the figure.

[0211] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0212] The embodiment of the present application further provides a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the method provided in the above embodiment.

[0213] Optionally, in this embodiment, the above storage medium may be located in a computing device.

[0214] Optionally, in this embodiment, the computer-readable storage medium is configured to store an executable program, and when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the method described in any one of the above embodiments.

[0215] The embodiment of the present application further provides a computer program product. Optionally, in this embodiment, the computer program product may include a computer program, and the computer program implements the method provided in the embodiment when executed by a processor.

[0216] The embodiments of the present application also provide a computer program product. Optionally, the computer program product may include a non-volatile computer-readable storage medium, which may be used to store a computer program, and when the computer program is executed by a processor, the method provided in the embodiments is implemented.

[0217] The embodiment of the present application further provides a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the method provided in the above embodiment is implemented.

[0218] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0219] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0220] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0221] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0222] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly or all or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program code.

[0223] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for generating a prompt text, characterized in that: include: Constructing a first prompt text based on a sample data set and a target task, wherein the first prompt text is used to guide a text generation model to generate a prompt text, and the sample data set includes at least one sample prompt text and a sample reply text corresponding to the at least one sample prompt text; Inputting the first prompt text into a text generation model, and using the text generation model to generate candidate prompt texts; Constructing a second prompt text based on the candidate prompt text and the test data set, wherein the second prompt text is used to guide the text generation model to modify the prompt text, and the test data set includes at least one test prompt text and a test reply text corresponding to the at least one test prompt text; The second prompt text is input into the text generation model, and the candidate prompt text is modified using the text generation model to obtain a target prompt text.

2. The method for generating prompt text according to claim 1, characterized in that: Inputting the first prompt text into a text generation model, and using the text generation model to generate candidate prompt texts, includes: Inputting the first prompt text into the text generation model, and using the text generation model to generate at least one prompt text; The at least one prompt text is evaluated based on the test data set to obtain the candidate prompt text.

3. The method for generating prompt text according to claim 2, characterized in that: Evaluating the at least one prompt text based on the test data set to obtain the candidate prompt text includes: For any prompt text, based on the similarity between the prompt text and different test prompt texts, determine a target test prompt text corresponding to the prompt text from the at least one test prompt text; Inputting the prompt text into the text generation model, and using the text generation model to generate candidate reply texts corresponding to the candidate prompt texts; Based on the similarity between the candidate reply text and the target test reply text, it is determined whether the prompt text is the candidate prompt text, wherein the target test reply text is a test reply text corresponding to the target test prompt text.

4. The method for generating prompt text according to claim 3, characterized in that: Determining whether the prompt text is the candidate prompt text based on the similarity between the candidate reply text and the target test reply text includes: In response to the similarity being greater than a preset threshold, outputting the prompt text; In response to receiving feedback information on the prompt text within a preset time period after outputting the prompt text, modifying the prompt text based on the feedback information to obtain a modified prompt text, and determining the modified prompt text as the candidate prompt text; In response to not receiving the feedback information within the preset time period, determining the prompt text as the candidate prompt text.

5. The method for generating prompt text according to claim 1, characterized in that: Construct the first prompt text based on the sample dataset and target task, including: Obtaining a task description, a prompt text generation condition, and a prompt text output condition of the target task, wherein the prompt text generation condition is used to indicate a condition that needs to be met for the prompt text to be generated, and the prompt text output condition is used to indicate a condition that needs to be met for the prompt text to be output; The first prompt text is constructed based on the task description, the sample data set, the prompt text generation condition and the prompt text output condition.

6. The method for generating prompt text according to claim 1, characterized in that: Constructing a second prompt text based on the candidate prompt text and the test data set includes: Obtaining a prompt text modification condition, a candidate reply, and a deviation value of the test reply, wherein the prompt text modification condition is used to indicate a condition that needs to be satisfied for prompt text modification; The second prompt text is constructed based on the task description, the test data set, the prompt text generation condition, the prompt text output condition, the prompt text modification condition, the deviation value and the candidate prompt text.

7. The method for generating prompt text according to any one of claims 1 to 6, characterized in that: Inputting the second prompt text into the text generation model, and using the text generation model to modify the candidate prompt text to obtain a target prompt text, including: Inputting the second prompt text into the text generation model, and using the text generation model to modify the candidate prompt text to obtain a first prompt text; The first prompt text is used as the candidate prompt text, and the steps of constructing a second prompt text based on the candidate prompt text and a test data set are repeatedly performed, the second prompt text is input into the text generation model, and the candidate prompt text is modified by using the text generation model to obtain the first prompt text, until a preset condition is met; The first prompt text is determined to be the target prompt text.

8. The method for generating prompt text according to claim 7, characterized in that: The satisfying of the preset condition includes at least one of the following: The similarity between the first prompt text and the candidate prompt text is less than a preset threshold; The number of times the text generation model modifies the candidate prompt text is greater than or equal to a preset threshold.

9. A method for generating a prompt text, characterized in that: include: In response to an input instruction acting on an operation interface, a sample data set and a target task are displayed on the operation interface, wherein the sample data set includes at least one sample prompt text and a sample reply text corresponding to the at least one sample prompt text; In response to a processing instruction acting on the operation interface, a target prompt text is displayed on the operation interface, wherein the target prompt text is obtained by inputting a second prompt text into a text generation model and modifying a candidate prompt text using the text generation model, the second prompt text is constructed based on the candidate prompt text and a test data set, the candidate prompt text is generated by inputting a first prompt text into the text generation model, the first prompt text is constructed based on the sample data set and the target task, the first prompt text is used to guide the text generation model to generate prompt text, the second prompt text is used to guide the text generation model to modify the prompt text, and the test data set includes at least one test prompt text and a test reply text corresponding to the at least one test prompt text.

10. A method for generating a prompt text, characterized in that: include: Acquire a sample data set and a target task by calling a first interface, wherein the first interface includes a first parameter, and a parameter value of the first parameter includes the sample data set and the target task; Constructing a first prompt text based on a sample data set and a target task, wherein the first prompt text is used to guide a text generation model to generate a prompt text, wherein the sample data set includes at least one sample prompt text and a sample reply text corresponding to the at least one sample prompt text; Inputting the first prompt text into a text generation model, and using the text generation model to generate candidate prompt texts; Constructing a second prompt text based on the candidate prompt text and the test data set, wherein the second prompt text is used to guide the text generation model to modify the prompt text, and the test data set includes at least one test prompt text and a test reply text corresponding to the at least one test prompt text; Inputting the second prompt text into the text generation model, and using the text generation model to modify the candidate prompt text to obtain a target prompt text; The target prompt text is output by calling a second interface, wherein the second interface includes a second parameter, and a parameter value of the second parameter includes the target prompt text.

11. An electronic device, characterized in that: include: A memory storing an executable program; A processor, connected to the memory via a bus, and configured to run the program, wherein the program executes the method described in any one of claims 1 to 10 when running.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 10.

13. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 10.