Text object generation method and device, electronic equipment and storage medium
By combining the target text object generation model with prompt information, the problem of low coverage of text object survey templates is solved, and efficient and professional text object generation is achieved, ensuring that the generation results match business needs.
Patent Information
- Application Number
- CN202410232064.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-29
- Publication Date
- 2025-09-05
AI Technical Summary
Existing text object survey templates have low coverage, and users need to make a lot of modifications to adapt to survey needs. They are difficult to write and take a long time for non-professional users, making it difficult to ensure professionalism and completeness.
A method based on target text object generation model is adopted. The model is adjusted by introducing reference text object results related to the task type, and the target prompt information is used to guide the generation of text objects to ensure the accuracy of the topic and description.
The efficiency and accuracy of text object generation are improved, and the generated text objects are more in line with actual business needs and meet the research purposes of specific goals and audiences.
Smart Images

Figure CN120597946A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, electronic device, and storage medium for generating a text object. Background Art
[0002] As an important data collection method, text-based surveys (such as questionnaires) are widely used in various fields, especially in the internet industry. Text-based surveys can help understand user needs, product satisfaction, market trends, and other information, thereby optimizing products and services.
[0003] Writing text objects such as questionnaires is difficult and time-consuming for users who are not research professionals. Furthermore, the professionalism and integrity of the text objects cannot be guaranteed. To improve the efficiency of writing text objects, you can rely on preset text object template libraries and question libraries. For common text object survey scenarios, if the system has preset templates, you can create text objects based on the preset templates, saving time on repeatedly writing similar questions. However, the disadvantage of this approach is that the template or question library has low coverage, and users rarely have the opportunity to use the templates. Even if a text object is created from a template, it still requires a lot of modification to adapt to the survey needs. Summary of the Invention
[0004] The present disclosure provides a text object generation method, device, electronic device, and storage medium to achieve more efficient and flexible text object generation to meet the text object needs of different users.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for generating a text object, the method comprising:
[0006] Determining a target text object generation model for a target text object generation task, wherein the target text object generation model is obtained by adjusting a pre-trained text object generation model based on training data constructed based on reference text object results related to a task type to which the target text object generation task belongs;
[0007] Determining target prompt information corresponding to the target text object generation task, wherein the target prompt information is used to at least indicate a text object theme and a text object description that need to be satisfied when executing the target text object generation task to generate a text object;
[0008] Based on the target prompt information, a target text object result of the target text object generation task is output through the target text object generation model.
[0009] In a second aspect, an embodiment of the present disclosure further provides a text object generation device, the device comprising:
[0010] A first determination module is configured to determine a target text object generation model to be used for a target text object generation task, wherein the target text object generation model is obtained by adjusting a pre-trained text object generation model based on training data constructed based on reference text object results related to a task type to which the target text object generation task belongs;
[0011] A second determining module is configured to determine target prompt information corresponding to the target text object generation task, wherein the target prompt information is at least used to indicate a text object theme and a text object description that need to be satisfied when executing the target text object generation task to generate a text object;
[0012] A generation module is used to output a target text object result of a target text object generation task through the target text object generation model based on the target prompt information.
[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to execute the text object generation method according to any one of the above embodiments.
[0017] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable medium, wherein the computer-readable medium stores computer instructions, and the computer instructions are used to enable a processor to implement the text object generation method described in any one of the above embodiments when executed.
[0018] In the embodiment of the present disclosure, by determining the target text object generation model adopted by the target text object generation task, not only can the target text object result be quickly generated, thereby improving the efficiency of text object generation, but the target text object generation model is obtained by adjusting the pre-trained text object generation model by introducing training data constructed by reference text object results related to the task type to which the target text object generation task belongs. Using the target text object generation model, a text object result matching the text object field can be generated under the guidance of the text object subject and description corresponding to the target prompt information, thereby improving the accuracy of text object generation and thus improving the quality of text object generation; and, by determining the target prompt information corresponding to the target text object generation task, the target prompt information is at least used to indicate the text object subject and text object description that need to be met when executing the target text object generation task to generate the text object. The text object subject and description indicated in the target prompt information can be customized, so that the text object generated according to the target prompt information can better meet specific needs and goals, ensuring that the generated text object matches the target audience and research purpose.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0021] Figure 1 This is a flowchart of a method for generating a text object provided by an embodiment of the present disclosure;
[0022] Figure 2 This is a schematic diagram of a format of prompt information provided by an embodiment of the present disclosure;
[0023] Figure 3a This is a schematic diagram of a reply format for a text object result provided by an embodiment of the present disclosure;
[0024] Figure 3b is a result schematic diagram of a text object result provided by an embodiment of the present disclosure;
[0025] Figure 4a This is a schematic diagram of a model adjustment of a text object generation model provided by an embodiment of the present disclosure;
[0026] Figure 4bThis is a model reasoning diagram of a text object generation model provided by an embodiment of the present disclosure;
[0027] Figure 5 is a flowchart of another text object generation method provided by an embodiment of the present disclosure;
[0028] Figure 6 This is a flow chart of question option generation using a text object generation model provided by an embodiment of the present disclosure;
[0029] Figure 7 This is a schematic diagram of an example of adding a question to prompt information provided by an embodiment of the present disclosure;
[0030] Figure 8 This is a flowchart of an example of a search topic provided by an embodiment of the present disclosure;
[0031] Figure 9 A structural diagram of a text object generation device provided by an embodiment of the present disclosure;
[0032] Figure 10 It is a structural diagram of an electronic device for implementing a text object generation method provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0034] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0035] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0036] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0037] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0038] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0039] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0040] Figure 1 This is a flow chart of a text object generation method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to situations where text object results that meet the requirements of the text object business field are to be quickly generated. The method can be executed by a text object generation device, which can be implemented in the form of software and / or hardware and is generally integrated on any electronic device with network communication function, which can be a mobile terminal, PC or server, etc.
[0041] like Figure 1 As shown, the text object generation method of the embodiment of the present disclosure may include the following process:
[0042] S110 , determining a target text object generation model to be used for the target text object generation task, wherein the target text object generation model is obtained by adjusting a pre-trained text object generation model based on training data constructed based on reference text object results related to the task type to which the target text object generation task belongs.
[0043] For common text object research scenarios, such as text objects that can include questionnaires, examination papers, and test questions, if there is a preset template, the text object can be created based on the preset template to save time in repeatedly writing similar questions. However, the template or question bank has low coverage, and there are few opportunities to use the template. Even if the text object is created from the template, a lot of modifications are still required to adapt to the research needs. Especially for long text objects, the writing is difficult, and it takes a long time for non-research professionals. In addition, the professionalism and integrity of the text object cannot be guaranteed.
[0044] To this end, this solution introduces a text object generation model for the target text object generation task. The text object generation model can automatically generate the text object results required for the target text object generation task, which can not only reduce the time and energy consumption of manually writing text objects, but also reduce the risk of inappropriate generated text objects due to low coverage of templates or question banks. This method can greatly improve the work efficiency of text object generation in situations where frequent text object surveys are required.
[0045] At the same time, if a pre-trained text object generation model is used directly to generate text objects, the content such as the title in the text object cannot be combined with business knowledge. For example, taking the text object as a questionnaire, if one wants to generate a satisfaction survey text object for "Platform A", because the pre-trained text object generation model does not know what "Platform A" is, it is difficult for the pre-trained text object generation model to generate the correct text object result. In view of the above situation, by exporting reference text object results related to the task type to which the target text object generation task belongs from the existing system (such as reference text object results that are similar or identical to the business domain knowledge corresponding to the target text object generation task), these data can be used to construct a dataset for training the model to fine-tune the pre-trained text object generation model. Through model fine-tuning, the model can be adaptively adjusted according to specific task types and datasets to improve the model's performance on the target text object generation task. By introducing business domain knowledge, the professionalism of text object generation can be improved, which helps the text object generation model generate text objects that are more in line with actual business needs.
[0046] S120: Determine target prompt information corresponding to the target text object generation task, where the target prompt information is at least used to indicate the text object theme and text object description that need to be satisfied when executing the target text object generation task to generate a text object.
[0047] S130 : Outputting a target text object result of the target text object generation task through a target text object generation model based on the target prompt information.
[0048] When using the target text object generation model to perform the target text object generation task, the generated text object results may be unstable. For example, taking the text object as a questionnaire, when it is necessary to generate a text object for "Return Experience Survey on B E-commerce Platform", the text object results generated by the target text object generation model may contain some content that is not closely related to "Return Experience Survey on B E-commerce Platform". For this reason, see Figure 2Taking the text object questionnaire as an example, it is necessary to form target prompt information for the target text object generation task that can prompt or guide the target text object generation model. The target prompt information is configured with the text object theme and text object description that need to be met when executing the target text object generation task to generate text objects, so as to provide more contextual information and relevant knowledge for the target text object generation model, so that the target text object generation model can understand the text object generation intention according to the prompt of the target prompt information, guide the target text object generation model to think in a specific direction and generate corresponding text object results that meet the expectations.
[0049] Optionally, the text object description information indicated in the target prompt information can provide the target text object generation model with detailed information about the background and purpose of the text object, so that the target text object generation model can better understand the meaning of the question and the context of the answer, thereby generating more targeted text object results. The text object subject information indicated in the target prompt information can assist the target text object generation model in clarifying the scope and focus of the answer, enabling the target text object generation model to focus more on relevant questions and knowledge points, and avoiding the generated text object results from deviating from the text object subject. Among them, the text object subject information can be the core issue or research object to be investigated by the text object, which determines the content and direction of the text object; the text object description information can refer to the text part that explains the purpose, content, filling method, precautions, etc. of the text object.
[0050] As an optional but non-limiting implementation, the target text object generation model is configured and generated based on a natural language model, and is used to generate text object results that meet the text object conditions corresponding to the target prompt information according to the target prompt information when executing the text object generation task. The target text object generation model can be a deep learning natural language model trained using a large amount of text data, capable of generating natural language text or understanding the meaning or intent of language text.
[0051] As an optional but non-limiting implementation method, determining target prompt information corresponding to the target text object generation task includes the following steps A1-A3:
[0052] Step A1: Determine target text object information corresponding to the target text object generation task. The target text object information is the text object subject and text object description input in response to the trigger operation corresponding to the target text object generation task.
[0053] Step A2: Determine the reference auxiliary information used in the target text object generation task. The reference auxiliary information is at least used to indicate the text object requirements and text object formats that are expected to be met when executing the target text object generation task to generate the text object. The text object format is used to describe the topic types to be included in the text object and the topic content to be included corresponding to various topic types.
[0054] Step A3: Generate target prompt information corresponding to the target text object generation task based on the target text object information and the reference auxiliary information.
[0055] See also Figure 2 Taking the text object questionnaire as an example, when using target prompt information to guide the target text object generation model, although the target text object generation model has understood the text object generation intention of the target text object generation task based on the text object description information and the text object subject information, it may not be able to accurately understand the expectations for the text object generation quality, which may lead to uneven quality of the generated text object results. At the same time, the text object format generated by the target text object generation model may lack consistency in style and content or may not meet the requirements.
[0056] To this end, it is also necessary to obtain the reference auxiliary information used by the target text object generation task. This reference auxiliary information, including the text object requirements and text object format that are expected to be met when generating the text object during the target text object generation task, combined with the text object subject and text object description, is added to the target prompt information. The text object format and text object requirements in the target prompt information guide the target text object generation model to follow the specific text object format and text object requirements when answering questions. This includes the length of the answer, the language style, and whether specific resources need to be cited. By clarifying the text object requirements and text object format, the target text object generation model can better understand the expectations and requirements for the answer. For example, if the text object requires specific examples or detailed explanations, the model will strive to meet these requirements, thereby improving the quality and depth of the answer.
[0057] Alternatively, see Figure 2 The target prompt information's text object format information will enumerate the types of questions to be included in the text object and the corresponding content to be included for each question type. For example, it will enumerate supported types such as single-choice questions, multiple-choice questions, long / short text questions, scale questions, matrix questions, and ranking questions. This ensures that the text object generated by the target text object generation model conforms to the question types of professional text object systems. Optionally, the text object format may also include, but is not limited to, at least one of the following: the typesetting and layout of the text object, such as the text object's title, instructions, the arrangement of questions and options, and the page design.
[0058] As an optional but non-limiting implementation method, the target text object result can be a text object result that is directly described in a structured manner using a universal structured information format. For example, the universal structured information format can include but is not limited to JSON, YAML, and TOML formats.
[0059] As another optional but non-limiting implementation method, the target text object result can be a text object result that is structured and described in a reference reply format. The reference reply format is a customized reply format that has at least partially removed reference characters and can make the readability of the question in the target text object result meet preset readability conditions. The reference characters include at least one of the following types of information: redundant characters and control characters.
[0060] See also Figure 3a Taking the questionnaire as an example, when a common structured information format (such as JSON, YAML, or TOML) is used to represent the text object results, some additional control characters are involved. These control characters are used to define the structure of the data and the separation between fields. Taking JSON as an example, strings need to be wrapped in double quotes, and different fields are separated by commas. These additional control characters do increase the number of output tokens. Token is a concept in natural language processing. In the process of generating text objects, each character can be regarded as a token. Therefore, increasing the number of control characters means an increase in the number of output tokens. The increase in the number of output tokens may cause the speed of generating text objects to slow down.
[0061] To this end, taking the text object as an example of a questionnaire, in order to solve the token redundancy problem, a reference response format can be designed. The reference response format is a compact text object result response format. After at least partially removing the reference characters, the readability of the questions in the target text object result can be customized to meet the preset readability conditions. This means that a more concise representation can be used to describe the content of the text object result, avoiding the use of too many control characters or marks, and reducing the number of output tokens. In addition, it is ensured that each question in the text object result structured in the reference response format can be parsed unambiguously. This means that the reference response should have clear rules and structure so that the program can accurately understand and parse the content of the text object, avoiding ambiguity or ambiguity, and ensuring that the program can correctly process the text object result.
[0062] It can be understood that when using the reference reply format given in this solution to describe the text object results, when performing tokenizer encoding, it is possible to avoid using too many control characters or marks when outputting the text results, thereby reducing the number of output tokens. Taking one of the text object generation processes as an example, the number of corresponding tokens when replying in json format is 66, while the number of corresponding tokens when replying in the reference reply format of the disclosed solution is 45. Compared with the text reply in json format, the reference reply format of the disclosed solution saves about 32% of the tokens.
[0063] Optionally, the reference character includes at least one of the following: a redundant character and a control character. The reference character may also include at least one of the following: a character syntax element, an identifier, an operator, or a symbol with a specific meaning.
[0064] Alternatively, taking a questionnaire as an example, for a text object, specific characters or symbols can be used to represent different types of fields, such as questions, options, and answers, for the reference response format. Furthermore, the representation of options needs to be defined, such as using numbers, letters, or specific markers to represent different options. Furthermore, in order to correctly parse each question in the text object results, the separation between questions needs to be defined in the compact reference response format. This can be achieved, for example, using specific characters, spaces, line breaks, or other markers.
[0065] In this solution, when the generated text object contains a large number of questions, the response format for the generated text object is simplified as much as possible, reducing redundant and control characters while ensuring normal parsing and readability. The highly compact reference response format can reduce data redundancy and duplication, thereby reducing data transmission and processing overhead. For the model's inference process, the compact format can reduce the number of tokens the model needs to process. Fewer tokens means fewer calculations and operations required by the model, which may increase the speed of inference. This solution uses a compact reference response format to more efficiently utilize storage space and bandwidth. By reducing format overhead, more questions can be generated within the same storage capacity or bandwidth constraints.
[0066] As an optional but non-limiting implementation, when outputting the target text object result of the target text object generation task through the target text object generation model based on the target prompt information, the following steps are also included:
[0067] The target text object results of the target text object generation task output by the target text object generation model are displayed in batches using a streaming generation method.
[0068] Optionally, the target text object results output by the target text object generation model are structured, and the target text object results of the target text object generation task that have undergone structured processing are displayed in batches using a streaming generation method.
[0069] See also Figure 3b Taking the text object as an example of a questionnaire, the target text object result of the target text object generation task displays multiple question texts and corresponding question options when the question text has options in the reference response format. The target text object result to be generated by the target text object generation model has a lot of content. For large-scale text object result data, generating and displaying the entire result at once may cause performance problems. Streaming generation divides the data into smaller batches for processing and transmission, which can more efficiently process large-scale data. Displaying text object results in batches can reduce the load on the server. The server can generate and send results gradually instead of generating and sending the entire text object result at once, better manage server resources, and improve server performance and responsiveness. In addition, by displaying text object results in batches, only a portion of the data is loaded each time, which can reduce the waiting time when loading the entire text object result. Users can start viewing and processing the content of the text object more quickly, thereby improving work efficiency.
[0070] As an optional but non-limiting implementation, the process of constructing the target text object generation model provided in the embodiment of the present disclosure includes the following steps B1-B2:
[0071] Step B1. Determine the reference training data used to adjust the pre-trained text object generation model. The reference training data includes training input samples and corresponding pre-annotation results obtained by preprocessing reference text object results related to the task type to which the target text object generation task belongs. The training input samples include the corresponding text object topics and text object descriptions in the reference text object results, as well as the corresponding text object requirements and text object formats in the reference text object results. The pre-annotation results corresponding to the training input samples include text object results in the reference text object results that are structured and described in a reference response format.
[0072] Step B2: Adjust the pre-trained text object generation model based on the reference training data to obtain a target text object generation model.
[0073] See also Figure 4aTaking the questionnaire as an example, when generating text objects, it is easy to ignore the business background or professional text object design specifications, and the pre-trained text object generation model generates irrelevant text objects. To this end, when obtaining the pre-trained text object generation model, the reference text object results related to the task type of the target text object generation task will be exported from the existing text object system according to the task type of the target text object generation task. Then, the reference text object results are pre-processed in combination with the question type and option design to form reference training data. The reference training data includes multiple training input samples and corresponding pre-labeled results. The training input samples include the corresponding text object topics and text object descriptions in the reference text object results as prompt information, as well as the corresponding text object requirements and text object formats in the reference text object results. The pre-labeled results corresponding to the training input samples serve as the model's response results, including the text object results in the reference text object results that are structured using the reference response format for description.
[0074] See also Figure 4a , the text pairs consisting of the prompt information formed by the training input samples and the model responses formed by the corresponding pre-labeled results constitute the reference training data, and the reference training data is input into the pre-trained text object generation model, and the text object generation model is fine-tuned by the reference training data. Among them, model fine-tuning can refer to further training on an already trained machine learning model, by using a dataset for a specific task or field, adjusting the weights and parameters of the model so that it can better adapt to this specific task or dataset. This process utilizes the general knowledge learned by the model on large-scale data, and improves the performance of the model on specific tasks through minor adjustments for specific tasks.
[0075] Optionally, you can fine-tune the pre-trained text object generation model using full fine-tuning or prompt tuning. Prompt tuning is a method used to adjust or improve the behavior of a natural language model by designing and adjusting the prompts provided by the user to the model to influence the model's performance on specific tasks. This method uses carefully designed prompt text to guide the model to produce output that is more in line with expectations. By continuously optimizing the structure and content of the prompt text, you can influence the model's generation behavior, making it more suitable for specific tasks or producing specific types of language output.
[0076] The training method of this solution is adopted. Taking the text object as the questionnaire as an example, historical data is exported from the existing system. Then, training data and prompt information are designed in combination with the question type and options. This guides the pre-trained text object generation model to generate a structured format. At the same time, business domain knowledge is also introduced to improve the professionalism of the text object.
[0077] As an optional but non-limiting implementation, see Figure 4b After constructing the target prompt information corresponding to the target text object generation task based at least on the text object subject and text object description that need to be satisfied when executing the target text object generation task to generate the text object, the target prompt information corresponding to the target text object generation task can be input into the target text object generation model, and the target text object generation task can be executed through the target text object generation model to obtain the target text object result of the target text object generation task.
[0078] The technical solution of the embodiment of the present disclosure, by determining the target text object generation model adopted by the target text object generation task, can not only quickly generate the target text object result, thereby improving the efficiency of text object generation, but also the target text object generation model is obtained by adjusting the pre-trained text object generation model by introducing training data constructed by reference text object results related to the task type to which the target text object generation task belongs. The target text object generation model can be used to generate text object results that match the text object field under the guidance of the text object subject and description corresponding to the target prompt information, thereby improving the accuracy of text object generation and thus improving the quality of text object generation; and, by determining the target prompt information corresponding to the target text object generation task, the target prompt information is at least used to indicate the text object subject and text object description that need to be met when executing the target text object generation task to generate the text object. The text object subject and description indicated in the target prompt information can be customized, so that the text object generated according to the target prompt information can better meet specific needs and goals, ensuring that the generated text object matches the target audience and research purpose.
[0079] Figure 5 A flow chart of another text object generation method provided in an embodiment of the present disclosure. The technical solution of this embodiment further optimizes the process of outputting the target text object result of the target text object generation task through the target text object generation model based on the target prompt information in the aforementioned embodiment on the basis of the technical solution of the aforementioned embodiment. This embodiment can be combined with various optional solutions in one or more of the above embodiments.
[0080] like Figure 5 As shown, the text object generation method of the embodiment of the present disclosure may include the following process:
[0081] S510 , determining a target text object generation model to be used for the target text object generation task, wherein the target text object generation model is obtained by adjusting a pre-trained text object generation model based on training data constructed based on reference text object results related to the task type to which the target text object generation task belongs.
[0082] S520: Determine target prompt information corresponding to the target text object generation task, where the target prompt information is at least used to indicate the text object theme and text object description that need to be satisfied when executing the target text object generation task to generate a text object.
[0083] S530. In the process of executing the target text object generation task through the target text object generation model, the current question type and the corresponding current question text that match the target prompt information are generated through the target text object generation model.
[0084] See also Figure 6 Taking the text object as an example of a questionnaire, the text object format of the target prompt information includes the question types involved in the text object to be generated. The current question type is generated from the prompted question type through the target text object generation model, and the target text object generation model is guided by the text object description and text object theme in the target prompt information to automatically generate the current question text corresponding to the current question type.
[0085] As an optional but non-limiting implementation, after the target text object generation model generates the current topic type that matches the target prompt information, the following steps C1-C2 are also included:
[0086] Step C1: Check whether the current question type is a preset question type. The preset question types include at least one of the following types of questions: single-choice questions, multiple-choice questions, and scale questions.
[0087] Step C2: If it is a preset question type, the target text object generation model is used to detect whether the current question text is the preset question text.
[0088] Step C3: If it is not a preset question type, determine that the current question is completed and proceed to generate the next question.
[0089] S540: If the current question text belongs to a preset question text, the target text object generation model is used to search for a question option that matches the current question text from the candidate question options included in the preset question database, and the next question is generated when the current question is completed.
[0090] S550. If the current question text does not belong to the preset question text, the current question text is learned and understood by the target text object generation model based on the target prompt information to generate question options matching the current question text, and the next question is generated when the current question is completed.
[0091] See also Figure 6, taking the text object as a questionnaire as an example, the preset question database contains multiple candidate question options, and these candidate question options all belong to the question options corresponding to the preset question text. The preset question text is a regular question text. If the current question text belongs to the preset question text, the target text object generation model will directly search for question options that match the current question text from the preset question database. Optionally, the target text object generation model will search the preset question database for question options that match the current question text based on the characteristics and content of the current question text. Once a matching question option is found in the preset question database, the current question text completes the question option matching, and the target text object generation model will continue to generate the next question to gradually complete the entire text object generation process.
[0092] Using the above method, taking the text object as an example of a questionnaire, when generating the question options corresponding to the question text, you can decide whether to skip option generation based on whether the question type is a preset question type. At the same time, it will also detect whether the question text belongs to a common question text. If it is, the question options are directly obtained from the preset question database, and there is no need for the target text object generation model to understand and generate them, so as to reduce the number of tokens generated. For uncommon question texts, the target text object generation model is used to automatically generate options, which helps to improve the efficiency and accuracy of text object generation and ensure that each question has corresponding options to choose from. At the same time, by using the preset question database, existing question option resources can be reused to reduce duplication of work.
[0093] S560 : Determine a target text object result of the target text object generation task according to a question obtained in the process of executing the target text object generation task by the target text object generation model.
[0094] As an optional but non-limiting implementation method, in the process of generating target text object results by executing the target text object generation task through the target text object generation model, the target text object generation model can use context learning (In-Context Learning) to enhance the effect of generating target text object results when executing the target text object generation task.
[0095] In-Context Learning refers to the ability of the target text object generation model to learn and respond by analyzing and understanding a given context (such as a conversation, an article, or any text sequence). This learning approach relies on the model understanding and using contextual information, such as previous conversation content or text information, to more accurately predict and generate subsequent text. In-Context Learning enables the target text object generation model to adapt and learn based on contextual information without additional training data.
[0096] Optionally, when the target text object generation model performs the target text object generation task, reference title examples related to the text object information in the target prompt information corresponding to the target text object generation task can be provided to the target text object generation model based on RAG. In this way, the target text object generation model can better utilize the title examples in the reference text object results, thereby improving the quality and accuracy of the generated text object. RAG (Retrieval-Augmented Generation) is a model architecture for natural language processing that combines retrieval and generation technologies.
[0097] Optionally, in the process of executing the target text object generation task and generating the target text object result through the target text object generation model, the target text object generation model is accelerated by inference through GPTQ and GGMl to improve the speed at which the target text object generation model responds to the generated text object result.
[0098] As an optional but non-limiting implementation, when determining the target prompt information corresponding to the target text object generation task, the following steps D1-D2 are also included:
[0099] Step D1: Determine a reference topic example corresponding to the target text object generation task, where the reference topic example is a topic example related to the text object information in the target prompt information corresponding to the target text object generation task.
[0100] Step D2: Add a reference title example to the target prompt information corresponding to the target text object generation task. The reference title example is used to provide context information when the target text object generation task is executed by the target text object generation model so that the target text object generation model can understand the requirements and intentions of the target text object generation task.
[0101] See also Figure 7, taking the text object as an example of a questionnaire, usually, when using the target text object generation model to generate text objects, as long as the target prompt information Prompt contains the text object description, text object subject, text object requirements and text object format, for example, let the target text object generation model generate a survey on APP satisfaction. However, the understanding ability of the target text object generation model may be limited. The text object generated by relying solely on the text object description, text object subject, text object requirements and text object format may not meet the requirements, especially in terms of format. For example, letting the target text object generation model generate text objects about e-commerce surveys may generate semantically related questions, but the format is unlikely to fully meet expectations. Therefore, reference question examples can be obtained for the target text object generation task.
[0102] See also Figure 7 Adding reference examples to the target prompt for the target text object generation task reduces the likelihood of errors when the target text object generation model generates questions. The reference examples in the target prompt directly inform the target text object generation model of what a question looks like, such as using square brackets to indicate the question type, followed by the question text, and, for multiple-choice questions, including the options. This reduces the probability of the target text object generation model making errors when generating the text for the question.
[0103] This approach adds example questions to the target prompt information, helping the target text object generation model better understand the text object requirements and formatting for the corresponding questions when generating text objects, thus reducing the likelihood of errors. The example can be a complete text object question, including the question type, question text, and options. By providing specific examples, the model can generate text object questions that better meet the requirements, especially with more accurate formatting. This improves the quality and effectiveness of generated text objects.
[0104] As an optional but non-limiting implementation method, determining a reference topic example corresponding to the target text object generation task includes the following steps E1-E2:
[0105] Step E1: Generate a reference query search statement based on the text object information in the target prompt information.
[0106] Step E2: searching, according to the reference query search statement, for topic examples related to the text object information in the target prompt information corresponding to the target text object generation task from the topics included in the pre-stored reference text object results, to serve as reference topic examples corresponding to the target text object generation task.
[0107] See also Figure 8Taking the text object as a questionnaire as an example, when the target text object generation model is asked to perform the target text object generation task, by providing the model with more accurate reference topic examples, the problem of the target text object generation model generating errors or absurd results when generating text can be alleviated. The specific implementation steps are as follows: Save the topics in the reference text object results to the database for subsequent retrieval and use. Generate a reference query search statement based on the text object information in the target prompt information provided by the user, and search the database for relevant topics in the reference text object results through the reference query search statement. Add the target prompt information as a reference topic example to the search result and provide it to the target text object generation model, so that the model can refer to these reference topic examples to generate more accurate and reasonable text object results.
[0108] Optionally, based on the document or vector correlation between the reference query search statement and the topics included in the pre-stored reference text object results, a search is performed for topic examples related to the text object information in the target prompt information corresponding to the target text object generation task, to serve as reference topic examples corresponding to the target text object generation task. Document search is a text content-based search method that provides results by searching for documents related to the search statement, while vector search is a vector representation-based search method that converts text into vectors and uses similarity calculations to find the most similar vectors.
[0109] The technical solution of the embodiment of the present disclosure, by determining the target text object generation model adopted by the target text object generation task, can not only quickly generate the target text object result, thereby improving the efficiency of text object generation, but also the target text object generation model is obtained by adjusting the pre-trained text object generation model by introducing training data constructed by reference text object results related to the task type to which the target text object generation task belongs. The target text object generation model can be used to generate text object results that match the text object field under the guidance of the text object subject and description corresponding to the target prompt information, thereby improving the accuracy of text object generation and thus improving the quality of text object generation; and, by determining the target prompt information corresponding to the target text object generation task, the target prompt information is at least used to indicate the text object subject and text object description that need to be met when executing the target text object generation task to generate the text object. The text object subject and description indicated in the target prompt information can be customized, so that the text object generated according to the target prompt information can better meet specific needs and goals, ensuring that the generated text object matches the target audience and research purpose.
[0110] Figure 9This is a structural schematic diagram of a text object generation device provided in an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to situations where text object results that meet the needs of the text object business field will be quickly generated. The text object generation device can be implemented in the form of software and / or hardware and is generally integrated on any electronic device with network communication function, which can be a mobile terminal, PC or server, etc.
[0111] like Figure 9 As shown, the text object generation device of the embodiment of the present disclosure may include the following:
[0112] A first determining module 910 is configured to determine a target text object generation model to be used for the target text object generation task, wherein the target text object generation model is obtained by adjusting a pre-trained text object generation model based on training data constructed based on reference text object results related to the task type to which the target text object generation task belongs;
[0113] The second determining module 920 is configured to determine target prompt information corresponding to the target text object generation task, wherein the target prompt information is at least used to indicate the text object theme and text object description that need to be satisfied when executing the target text object generation task to generate a text object;
[0114] The generation module 930 is configured to output a target text object result of the target text object generation task through the target text object generation model based on the target prompt information.
[0115] Based on the above embodiment, optionally, determining target prompt information corresponding to the target text object generation task includes:
[0116] Determining target text object information corresponding to the target text object generation task, wherein the target text object information is a text object subject and a text object description in response to a triggering operation input corresponding to the target text object generation task;
[0117] Determining reference auxiliary information used by the target text object generation task, the reference auxiliary information being used to at least indicate text object requirements and text object formats that are expected to be met when executing the target text object generation task to generate a text object, the text object format being used to describe topic types to be included in the text object and topic content to be included in each topic type;
[0118] Based on the target text object information and the reference auxiliary information, target prompt information corresponding to the target text object generation task is generated.
[0119] Based on the above embodiment, optionally, the target text object generation model construction process includes:
[0120] Determining reference training data used to adjust a pre-trained text object generation model, the reference training data comprising training input samples and corresponding pre-annotated results obtained by preprocessing reference text object results related to a task type to which a target text object generation task belongs, the training input samples comprising corresponding text object topics and text object descriptions in the reference text object results, as well as corresponding text object requirements and text object formats in the reference text object results, the pre-annotated results corresponding to the training input samples comprising text object results in the reference text object results that are structuredly described using a reference response format;
[0121] The target text object generation model is obtained by performing model adjustment on the pre-trained text object generation model based on the reference training data.
[0122] Based on the above embodiment, optionally, the target text object result is a text object result that is structuredly described in a reference reply format, and the reference reply format is a custom reply format that is at least partially removed from reference characters and can make the readability of the question in the target text object result meet preset readability conditions, and the reference characters include at least one of the following types of information: redundant characters and control characters.
[0123] Based on the above embodiment, optionally, outputting a target text object result of the target text object generation task through the target text object generation model based on the target prompt information includes:
[0124] In the process of executing the target text object generation task by the target text object generation model, generating a current topic type and a corresponding current topic text that match the target prompt information by the target text object generation model;
[0125] If the current question text belongs to a preset question text, the target text object generation model is used to search for a question option that matches the current question text from the candidate question options included in the preset question database, and the next question is generated when the current question is completed;
[0126] If the current question text does not belong to the preset question text, the current question text is learned and understood by the target text object generation model based on the target prompt information to generate question options matching the current question text, and the next question is generated when the current question is completed;
[0127] The target text object result of the target text object generation task is determined according to the question obtained in the process of the target text object generation model executing the target text object generation task.
[0128] Based on the above embodiment, optionally, the device further includes:
[0129] Detecting whether the current question type is a preset question type, wherein the preset question type includes at least one of the following types of questions: single-choice questions, multiple-choice questions, and scale questions;
[0130] If it is a preset question type, detecting whether the current question text is a preset question text by generating a target text object model;
[0131] If it is not a preset question type, it is determined that the current question is completed and the next question is generated.
[0132] Based on the above embodiment, optionally, when determining target prompt information corresponding to the target text object generation task, the method further includes:
[0133] Determining a reference topic example corresponding to the target text object generation task, wherein the reference topic example is a topic example related to the text object information in the target prompt information corresponding to the target text object generation task, wherein the text object information includes a text object subject and a text object description;
[0134] The reference title example is added to the target prompt information corresponding to the target text object generation task. The reference title example is used to provide context information when the target text object generation task is performed by the target text object generation model so that the target text object generation model can understand the requirements and intentions of the target text object generation task.
[0135] Based on the above embodiment, optionally, determining a reference topic example corresponding to the target text object generation task includes:
[0136] Generate a reference query search statement based on the text object information in the target prompt information;
[0137] According to the reference query search statement, the topics included in the pre-stored reference text object results are searched for topic examples related to the text object information in the target prompt information corresponding to the target text object generation task, as reference topic examples corresponding to the target text object generation task.
[0138] Based on the above embodiment, optionally, when outputting the target text object result of the target text object generation task through the target text object generation model based on the target prompt information, the method further includes:
[0139] The target text object results of the target text object generation task output by the target text object generation model are displayed in batches in a streaming generation manner.
[0140] In the embodiment of the present disclosure, by determining the target text object generation model adopted by the target text object generation task, not only can the target text object result be quickly generated, thereby improving the efficiency of text object generation, but the target text object generation model is obtained by adjusting the pre-trained text object generation model by introducing training data constructed by reference text object results related to the task type to which the target text object generation task belongs. Using the target text object generation model, a text object result matching the text object field can be generated under the guidance of the text object subject and description corresponding to the target prompt information, thereby improving the accuracy of text object generation and thus improving the quality of text object generation; and, by determining the target prompt information corresponding to the target text object generation task, the target prompt information is at least used to indicate the text object subject and text object description that need to be met when executing the target text object generation task to generate the text object. The text object subject and description indicated in the target prompt information can be customized, so that the text object generated according to the target prompt information can better meet specific needs and goals, ensuring that the generated text object matches the target audience and research purpose.
[0141] The text object generation device provided by the embodiments of the present disclosure can execute the text object generation method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects for executing the text object generation method.
[0142] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0143] Figure 10 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 10 , which shows an electronic device (eg Figure 10 The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 10 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0144] like Figure 10As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. Various programs and data required for the operation of the electronic device 1000 are also stored in the RAM 1003. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An edit / output (I / O) interface 1005 is also connected to the bus 1004.
[0145] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Figure 10 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0146] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the text object generation method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the text object generation method of the embodiment of the present disclosure are performed.
[0147] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0148] The electronic device provided by the embodiment of the present disclosure and the text object generation method provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0149] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the text object generation method provided in the above embodiment is implemented.
[0150] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0151] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0152] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0153] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: determines the target text object generation model adopted by the target text object generation task, and the target text object generation model is obtained by adjusting the pre-trained text object generation model based on training data constructed based on reference text object results related to the task type to which the target text object generation task belongs; determines the target prompt information corresponding to the target text object generation task, and the target prompt information is at least used to indicate the text object theme and text object description that need to be satisfied when executing the target text object generation task to generate a text object; and outputs the target text object result of the target text object generation task through the target text object generation model based on the target prompt information.
[0154] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0155] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0156] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0157] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0158] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0159] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in the present disclosure.
[0160] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0161] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A method for generating a text object, characterized in that: The method comprises: Determining a target text object generation model for a target text object generation task, wherein the target text object generation model is obtained by adjusting a pre-trained text object generation model based on training data constructed based on reference text object results related to a task type to which the target text object generation task belongs; Determining target prompt information corresponding to the target text object generation task, wherein the target prompt information is used to at least indicate a text object theme and a text object description that need to be satisfied when executing the target text object generation task to generate a text object; Based on the target prompt information, a target text object result of the target text object generation task is output through the target text object generation model.
2. The method according to claim 1, characterized in that Determine the target prompt information corresponding to the target text object generation task, including: Determining target text object information corresponding to the target text object generation task, wherein the target text object information is a text object subject and a text object description in response to a triggering operation input corresponding to the target text object generation task; Determining reference auxiliary information used by the target text object generation task, the reference auxiliary information being used to at least indicate text object requirements and text object formats that are expected to be met when executing the target text object generation task to generate a text object, the text object format being used to describe topic types to be included in the text object and topic content to be included in each topic type; Based on the target text object information and the reference auxiliary information, target prompt information corresponding to the target text object generation task is generated.
3. The method according to claim 1 or 2, characterized in that The process of constructing the target text object generation model includes: Determining reference training data used to adjust a pre-trained text object generation model, the reference training data comprising training input samples and corresponding pre-annotated results obtained by preprocessing reference text object results related to a task type to which a target text object generation task belongs, the training input samples comprising corresponding text object topics and text object descriptions in the reference text object results, as well as corresponding text object requirements and text object formats in the reference text object results, the pre-annotated results corresponding to the training input samples comprising text object results in the reference text object results that are structuredly described using a reference response format; The target text object generation model is obtained by performing model adjustment on the pre-trained text object generation model based on the reference training data.
4. The method according to claim 1 or 2, characterized in that The target text object result is a text object result that is structured and described in a reference reply format. The reference reply format is a custom reply format that has at least partially removed reference characters and can ensure that the readability of the question in the target text object result meets preset readability conditions. The reference characters include at least one of the following types of information: redundant characters and control characters.
5. The method according to claim 1 or 2, characterized in that Outputting a target text object result of a target text object generation task through the target text object generation model based on the target prompt information includes: In the process of executing the target text object generation task by the target text object generation model, generating a current topic type and a corresponding current topic text that match the target prompt information by the target text object generation model; If the current question text belongs to a preset question text, the target text object generation model is used to search for a question option that matches the current question text from the candidate question options included in the preset question database, and the next question is generated when the current question is completed; If the current question text does not belong to the preset question text, the current question text is learned and understood by the target text object generation model based on the target prompt information to generate question options matching the current question text, and the next question is generated when the current question is completed; The target text object result of the target text object generation task is determined according to the question obtained in the process of the target text object generation model executing the target text object generation task.
6. The method according to claim 1 or 2, characterized in that When determining the target prompt information corresponding to the target text object generation task, it also includes: Determining a reference topic example corresponding to the target text object generation task, wherein the reference topic example is a topic example related to the text object information in the target prompt information corresponding to the target text object generation task, wherein the text object information includes a text object subject and a text object description; The reference title example is added to the target prompt information corresponding to the target text object generation task. The reference title example is used to provide context information when the target text object generation task is performed by the target text object generation model so that the target text object generation model can understand the requirements and intentions of the target text object generation task.
7. The method according to claim 6, characterized in that Determine the reference topic examples corresponding to the target text object generation task, including: Generate a reference query search statement based on the text object information in the target prompt information; According to the reference query search statement, the topics included in the pre-stored reference text object results are searched for topic examples related to the text object information in the target prompt information corresponding to the target text object generation task, as reference topic examples corresponding to the target text object generation task.
8. The method according to claim 1, characterized in that When the target text object result of the target text object generation task is output through the target text object generation model based on the target prompt information, the method further includes: The target text object results of the target text object generation task output by the target text object generation model are displayed in batches in a streaming generation manner.
9. A text object generating device, characterized in that: The device comprises: A first determination module is configured to determine a target text object generation model to be used for a target text object generation task, wherein the target text object generation model is obtained by adjusting a pre-trained text object generation model based on training data constructed based on reference text object results related to a task type to which the target text object generation task belongs; A second determining module is configured to determine target prompt information corresponding to the target text object generation task, wherein the target prompt information is at least used to indicate a text object theme and a text object description that need to be satisfied when executing the target text object generation task to generate a text object; A generation module is used to output a target text object result of a target text object generation task through the target text object generation model based on the target prompt information.
10. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the text object generation method according to any one of claims 1 to 8.
11. A storage medium containing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to perform the text object generation method according to any one of claims 1 to 8.