Text generation method and device, mobile terminal and computer readable storage medium
By guiding users to clarify their text generation needs, target text matching user needs is generated, solving the problem of text generation not matching user expectations in existing technologies and achieving a higher degree of fit.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- IFLYTEK CO LTD
- Filing Date
- 2023-04-25
- Publication Date
- 2026-07-24
Smart Images

Figure CN117473077B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a text generation method, apparatus, mobile terminal, and computer-readable storage medium. Background Technology
[0002] With the advent of the data era, the amount of text that users need to generate is increasing, thus users increasingly expect efficient text generation. Current technologies typically recommend historical texts with the highest similarity in a database to the user based on the type of text they need to generate, allowing the user to modify these historical texts and thus improve text generation efficiency. However, this approach struggles to precisely meet user needs. Therefore, improving the alignment between generated text and user requirements has become a pressing issue. Summary of the Invention
[0003] The main technical problem addressed by this application is to provide a text generation method, apparatus, mobile terminal, and computer-readable storage medium that can improve the relevance of the generated text to user needs.
[0004] To address the aforementioned technical problems, this application provides a text generation method, comprising: obtaining a first requirement input by a user; in response to the absence of a text generation condition, generating guidance text to guide the user to clarify the text generation requirement, and re-executing the step of obtaining the first requirement input by the user under the guidance text; and in response to the triggering of a text generation condition, generating target text that matches the first requirement in all rounds.
[0005] To address the aforementioned technical problems, a second aspect of this application provides a text generation apparatus, comprising: an acquisition module, a guidance module, and a generation module, wherein the acquisition module is configured to acquire a first requirement input by a user; the guidance module is configured to generate guidance text guiding the user to clarify the text generation requirement in response to the absence of a text generation condition; wherein the acquisition module is further configured to re-execute the step of acquiring the first requirement input by the user under the guidance text; and the generation module is configured to generate target text matching the first requirement in all rounds in response to the triggering of a text generation condition.
[0006] To address the aforementioned technical problems, a third aspect of this application provides a mobile terminal, including a display screen, a memory, and a processor. The display screen and the memory are respectively coupled to the processor. The display screen is used at least to display text to a user and to provide input for the user. The memory stores program instructions, and the processor is used to execute the program instructions to implement the text generation method described in the first aspect.
[0007] To address the aforementioned technical problems, a fourth aspect of this application provides a computer-readable storage medium storing program instructions thereon, which, when executed by a processor, implement the text generation method described in the first aspect.
[0008] The above scheme obtains the user's initial requirement. When the text generation condition is not triggered, it generates guiding text to help the user clarify the text generation requirement. This provides prompts and guides the user to further input the initial requirement that clarifies the text generation condition based on the guiding text. The user's initial requirement is then obtained again under the guidance text, and the user's requirement for the text generation condition gradually becomes clear with the prompts of the guiding text until the text generation condition is triggered. Based on the initial requirements of all rounds, target text that matches the initial requirements of all rounds is generated, thereby improving the relevance of the generated text to the user's needs. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0010] Figure 1 This is a flowchart illustrating one implementation method of the text generation method of this application;
[0011] Figure 2 This is a schematic diagram illustrating an application scenario of one embodiment of the text generation method of this application;
[0012] Figure 3 This is a schematic diagram illustrating an application scenario of another embodiment of the text generation method of this application;
[0013] Figure 4 This is a flowchart illustrating another embodiment of the text generation method of this application;
[0014] Figure 5 yes Figure 4 A schematic diagram of an application scenario corresponding to step S405 in the middle step;
[0015] Figure 6 yes Figure 4 A schematic diagram of an application scenario corresponding to another implementation method in step S405;
[0016] Figure 7 yes Figure 4 A schematic diagram of an application scenario of an embodiment following step S401;
[0017] Figure 8 yes Figure 4 A schematic diagram of an application scenario corresponding to another implementation method after step S401;
[0018] Figure 9 This is a flowchart illustrating another implementation of the text generation method of this application;
[0019] Figure 10 yes Figure 9 A schematic diagram of an application scenario corresponding to step S905 in the middle step;
[0020] Figure 11 yes Figure 9 A schematic diagram of an application scenario corresponding to another implementation method of step S905;
[0021] Figure 12 This is a schematic diagram of one embodiment of the text generation apparatus of this application;
[0022] Figure 13 This is a schematic diagram of the structure of one embodiment of the smart terminal of this application;
[0023] Figure 14 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0025] In this paper, the terms "system" and "network" are often used interchangeably. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this paper means two or more.
[0026] The text generation method provided in this application is used to generate text that matches the user's needs. The execution entity is a processor or server that can obtain user input and has text processing functions. The text type can be at least one of official documents, academic papers, and graduation theses. This application will not list them all or make specific restrictions.
[0027] Please see Figure 1 , Figure 1This is a flowchart illustrating one embodiment of the text generation method of this application, which includes:
[0028] S101: The first requirement is to obtain user input.
[0029] Specifically, the first requirement input by the user is obtained, where the first requirement is used to generate the target text.
[0030] In one application approach, the user's input request text is obtained, resulting in the user's initial request.
[0031] In another application, the user's voice input of their needs is obtained, and the voice input is converted into text to obtain the user's first needs.
[0032] In another application, the user inputs a request image, and the request text is identified from the user input request image to obtain the first request input by the user.
[0033] In one application scenario, an input box is used to receive the user's initial request. In response to the user entering the request text in the input box, the user's initial request is obtained.
[0034] In another application scenario, the system uses an input box and a voice receiving interface to receive the user's first requirement. In response to the user entering the requirement text in the input box, the system obtains the user's first requirement. In response to the user's voice requirement input through the voice receiving interface, the system converts the voice requirement into the requirement text and displays it in the input box, thus obtaining the user's first requirement.
[0035] In another application scenario, the system uses an input box, a voice receiving interface, and an image receiving interface to receive the user's initial requirement. In response to the user entering the requirement text in the input box, the system obtains the user's initial requirement. In response to the user's voice input via the voice receiving interface, the system converts the voice into text and displays it in the input box, thus obtaining the user's initial requirement. In response to the user's image input via the image receiving interface, the system identifies the requirement text from the image and displays it in the input box, thus obtaining the user's initial requirement.
[0036] In a specific application scenario, to improve the accuracy of the requirement text, after the requirement is transcribed into text and displayed in the input box, a prompt message is generated to prompt the user to confirm whether the transcribed requirement text is accurate. After the requirement text on the requirement image is extracted and displayed in the input box, a prompt message is generated to prompt the user to confirm whether the recognized requirement text is accurate. The system also receives modifications made by the user to the requirement text in the input box based on the prompt message.
[0037] S102: In response to the failure to trigger the text generation condition, generate guiding text to clarify the text generation requirement for the user, and re-execute the first requirement step of obtaining user input under the guiding text.
[0038] Specifically, when the text generation condition is not triggered, guide text is generated to help the user clarify the text generation requirement. This provides the user with prompts and guidance, enabling the user to further input the first requirement that clarifies the text generation condition based on the guide text. The user's first requirement is then retrieved again under the guidance text, making the user's requirement for the text generation condition gradually clear under the prompts of the guide text.
[0039] Furthermore, the text generation conditions are triggered by the user or automatically once the text generation requirement is determined.
[0040] In one application method, based on the first requirement that the user has entered in at least some rounds, a guiding text is generated to guide the user to clarify the text generation requirement. The first requirement entered by the user is retrieved again under the guiding text until it is determined that the text generation requirement has been clarified, and then the text generation condition is triggered.
[0041] In one application scenario, based on the user's first requirement input in the current round, guiding text is generated to help the user clarify the text generation requirement, thereby further refining the first requirement in the current round and improving the accuracy of the text generation requirement. Once it is determined that the first requirement in the current round does not need to be further refined, the text generation condition can be triggered, thus realizing the automatic triggering of the text generation condition.
[0042] In another application scenario, based on the first requirement of all rounds of user input, guiding text is generated to help the user clarify the text generation requirements, thereby further refining the first requirement of user input, improving the accuracy of text generation requirements, and triggering text generation conditions automatically after determining that the first requirement of all rounds does not need to be further refined.
[0043] In another application scenario, based on the user's input of the current round and the first requirement of the first round, guiding text is generated to help the user clarify the text generation requirements. This further refines the user's input of the first requirement, improves the accuracy of the text generation requirements, and triggers the text generation conditions after determining that the first requirements of all rounds do not need to be further refined, thus achieving automatic triggering of text generation conditions.
[0044] For a specific application scenario, please refer to Figure 2 , Figure 2 This is a schematic diagram illustrating an application scenario of one embodiment of the text generation method of this application, wherein, Figure 2Taking the target text as an official document as an example, the system obtains the first requirement entered by the user in input box 200. Based on the first requirement entered by the user, it generates guiding text and displays it in guiding box 201. Then, under the guiding text, it obtains the first requirement entered by the user in input box 200 again. When the first requirement of the current round no longer needs to be further refined, the text generation condition is triggered, and the target text is generated and displayed in display box 202.
[0045] In another application, a pre-set text prompting the user whether to continue input is used to generate guiding text to help the user clarify their text generation needs. The user's initial requirement is retrieved again under the guiding text, and the text generation condition is triggered when the user chooses not to input the initial requirement again.
[0046] In one application scenario, a pre-set text prompting the user whether to continue input is used to generate guiding text to clarify the user's text generation needs. Corresponding options for continuing input and ending input are also generated. When the user selects the option to continue input, the system retrieves the user's initial input needs under the guiding text. The text generation conditions are triggered when the user selects the option to end input, thus enabling the user to determine whether the text generation needs match their personal intentions.
[0047] In another application scenario, a pre-set text prompting the user whether to continue input is used to generate guiding text to help the user clarify their text generation needs. When the user inputs their first requirement within the first time threshold, the first requirement input by the user is retrieved again under the guiding text. If the user does not input their first requirement after the first time threshold, the text generation condition is triggered, so that the user does not need to confirm whether to continue input each time, and the text generation condition is automatically triggered after the user has no intention to continue input.
[0048] For a specific application scenario, please refer to Figure 3 , Figure 3 This is a schematic diagram illustrating an application scenario of another embodiment of the text generation method of this application, wherein, Figure 3 Taking the target text type as an official document as an example, the system obtains the user's first requirement entered in input box 200 and utilizes preset text content (such as...) Figure 3 The system generates guiding text (e.g., "Okay, is there anything else you need?") and displays it in the guiding text box 201. Then, it retrieves the user's first requirement (e.g., the first requirement entered in the input box 200 within the first time threshold) under the guiding text. Figure 3The date of the signature is "March 30, 2015". This means that the user can continuously input their first requirement in input box 200 for several rounds within a first time threshold. Once the first time threshold is exceeded and the user no longer inputs their first requirement in input box 200, the text generation condition is triggered, and the target text is generated and displayed in display box 202. The first time threshold can be any custom time length such as 20 seconds, 25 seconds, or 30 seconds; this application does not impose specific restrictions on it.
[0049] S103: In response to the triggering text generation condition, generate target text that matches the first requirement of all rounds.
[0050] Specifically, when the text generation condition is triggered, target text matching the first requirement of all rounds is generated based on the first requirement of all rounds, thereby improving the relevance of the generated text to the user's needs.
[0051] In one application mode, when the text generation condition is triggered, a first prompt is generated based on the first requirement of all rounds, and the first prompt is provided to the large language model. The target text output by the large language model after responding to the first prompt is received, wherein the target text matches the first requirement of all rounds.
[0052] In another application, when the text generation condition is triggered, the target text generation requirement is obtained based on the first requirement of all rounds. The target text generation requirement is then input into a pre-trained text generation model, which outputs the target text based on the target text generation requirement. The target text matches the first requirement of all rounds. The text generation model is trained using historical texts and includes at least a template acquisition module and a text combination module. The template acquisition module is used to acquire templates that match the target text generation requirement, and the text combination module is used to generate text that matches the target text generation requirement and fill it into the corresponding template.
[0053] In one application scenario, the large language model is a generative pre-trained Transformer (GPT) model. It generates a first prompt based on the first needs of all rounds, provides the first prompt to the large language model, and requires the large language model to output text that matches the first prompt, so as to improve the fit between the target text and the user's needs.
[0054] In a specific application scenario, please refer to [the relevant documentation / reference]. Figure 2Based on the first requirement of all rounds, the first prompt is generated as follows: Please generate a notice on the adjustment of the scrapping age of taxis in a certain city based on the mandatory 6-year scrapping of gasoline taxis added from May 1 this year. The first prompt is provided to the large language model, and the target text output by the large language model is obtained and displayed in display box 202. Display box 202 is an editable box so that users can freely adjust the generated target text.
[0055] The above scheme obtains the user's initial requirement. When the text generation condition is not triggered, it generates guiding text to help the user clarify the text generation requirement. This provides prompts and guides the user to further input the initial requirement that clarifies the text generation condition based on the guiding text. The user's initial requirement is then obtained again under the guidance text, and the user's requirement for the text generation condition gradually becomes clear with the prompts of the guiding text until the text generation condition is triggered. Based on the initial requirements of all rounds, target text that matches the initial requirements of all rounds is generated, thereby improving the relevance of the generated text to the user's needs.
[0056] Please see Figure 4 , Figure 4 This is a flowchart illustrating another embodiment of the text generation method of this application, the method including:
[0057] S401: The first requirement is to obtain user input.
[0058] Specifically, the first requirement input by the user is obtained, as detailed in the previous embodiment, which will not be repeated here.
[0059] S402: Based on at least some of the primary requirements already entered by the user, obtain the detailed requirements corresponding to the current round.
[0060] Specifically, after obtaining the first requirements of at least one round, the detailed requirements corresponding to the current round are determined based on the first requirements of at least some rounds that the user has entered.
[0061] In one application approach, based on the user's input of the first requirement for the current round, the corresponding detailed requirements for the current round are obtained, thereby reducing the processing resource consumption for obtaining detailed requirements and improving the efficiency of triggering text generation conditions.
[0062] In another application, based on the first requirement of all rounds of user input, the detailed requirements corresponding to the current round are obtained, thereby improving the accuracy of the detailed requirements and ultimately improving the fit between the generated target text and the user's needs.
[0063] In another application, based on the user's input of the current round and the first requirement of the previous preset number of rounds, the detailed requirements corresponding to the current round are obtained, thus balancing the efficiency and accuracy of obtaining detailed requirements.
[0064] In another application, based on the user's input of the first requirement for the current round, and the first requirement including the text type of the target text, the corresponding detailed requirements for the current round are obtained, so that the detailed requirements fit the text type of the target text, thereby improving the fit between the detailed requirements and the text type.
[0065] S403: In response to the detailed requirements obtained in the current round, wait for the text generation conditions to be triggered.
[0066] Specifically, when the detailed requirements for the current round are obtained, the text generation conditions are not triggered in order to further guide users to clarify the text generation requirements.
[0067] S404: In response to the absence of a text generation condition, generate guiding text to clarify the text generation requirement for the user, and re-execute the step of obtaining the first requirement input by the user under the guiding text, wherein the guiding text is related to the detailed requirement corresponding to the first requirement input by the user.
[0068] Specifically, when the text generation condition is not triggered, based on the detailed requirements corresponding to the current round, a guiding text is generated to help the user clarify the text generation requirements, and the first requirement step of obtaining user input is re-executed under the guiding text.
[0069] In one application scenario, based on the detailed requirements of the current round, guide text is generated to encourage users to input specific detailed requirements, and the guide text is then displayed.
[0070] In another application scenario, based on the detailed requirements of the current round, guide text is generated to guide users to input specific detailed requirements, as well as guide voice matching the guide text, and an entry point for displaying the guide text and playing the guide voice is provided.
[0071] S405: In response to the lack of detailed requirements in the current round, the text generation condition is triggered.
[0072] Specifically, if the detailed requirements for the current round are not obtained, it is determined that the text generation requirements are clear, and the text generation conditions are triggered to achieve automatic triggering of text generation conditions and improve user experience.
[0073] Optionally, in response to the fact that no detailed requirements have been obtained in the current round, before triggering the text generation condition, the method further includes: generating a first prompt text to prompt the user to confirm all the first requirements that have been entered; in response to obtaining a first input instruction from the user based on the first prompt text, re-executing the step of obtaining the first requirements entered by the user; and in response to obtaining a first confirmation instruction from the user based on the first prompt text, executing the step of triggering the text generation condition.
[0074] Specifically, in response to the lack of detailed requirements in the current round, before triggering the text generation condition, a first prompt text is generated based on all the entered first requirements to prompt the user to confirm all the entered first requirements. When a first input instruction is obtained from the user based on the first prompt text, the step of obtaining the user's input first requirements is executed again. When a first confirmation instruction is obtained from the user based on the first prompt text, the step of triggering the text generation condition is executed so as to provide a prompt to the user when it is determined that the text generation condition can be triggered, and to facilitate the user's confirmation of whether the requirements are clear. When the user needs to input the first requirements, the first requirements are received again. When the user confirms the generation, the text generation condition is triggered.
[0075] In a specific application scenario, please combine Figure 2 See Figure 5 , Figure 5 yes Figure 4 The diagram illustrates an application scenario for step S405, where, in response to the absence of detailed requirements in the current round, before triggering the text generation condition, a first prompt text is generated based on the first requirements already entered in all input boxes 200. This prompt text includes a summary text generated based on all entered first requirements to indicate whether the text generation requirements are accurate. Figure 5 The first prompt text is: "Your request is: Based on the mandatory 6-year retirement age for gasoline-powered taxis added on May 1st of this year, generate a notice regarding the adjustment of the retirement age for taxis in a certain city. Would you like to generate the notice now?" The first prompt text is displayed using prompt box 203, providing the user with at least two options: "Continue input" and "Confirm generation." When the user selects the "Confirm input" option, the text generation condition is triggered. If the user selects the "Continue input" option, the system continues to retrieve the user's initial request from input box 200. If the detailed request for the current round is retrieved, a guiding text is generated and displayed in guiding box 201; otherwise, if the detailed request for the current round is not retrieved, the first prompt text is displayed using prompt box 203.
[0076] In another specific application scenario, please combine Figure 2 See Figure 6 , Figure 6 yes Figure 4 The diagram illustrates an application scenario for another implementation corresponding to step S405. In response to the lack of detailed requirements in the current round, before triggering the text generation condition, based on the first requirements already entered in all input boxes 200, a first prompt text is generated to prompt the user to confirm all entered first requirements. This prompt text includes a summary text generated based on all entered first requirements, to indicate to the user whether the text generation requirements are accurate. Figure 6 The first prompt text is: "Your request is: Based on the mandatory 6-year retirement policy for gasoline-powered taxis added on May 1st of this year, generate a notice regarding the adjustment of the retirement age for taxis in a certain city. Would you like to generate the notice now?" This first prompt text is displayed using guide box 201. When the system detects that the user's first request in input box 200 includes a confirmation of the intention to generate the notice, the text generation condition is triggered. When the system detects that the user's first request in input box 200 does not include a confirmation of the intention to generate the notice, the system retrieves the detailed requirements for the current round. If the detailed requirements for the current round are retrieved, the guide text is generated and displayed in guide box 201; otherwise, if the detailed requirements for the current round are not retrieved, the first prompt text is displayed using guide box 201.
[0077] In one implementation scenario, after obtaining the user's input of the first requirement, the process further includes: generating a text generation confirmation option; in response to detecting that the user has not selected the text generation confirmation option within a preset time threshold, performing a step of obtaining the detailed requirements corresponding to the current round based on at least part of the first requirement already entered by the user; in response to detecting that the user has selected the text generation confirmation option, triggering a text generation condition, and performing a step of generating target text that matches the first requirements of all rounds in response to triggering the text generation condition.
[0078] Specifically, after obtaining the user's initial requirement, a text generation confirmation option is generated, and a timer starts after the user completes the initial requirement input for the current round. If it is detected that the user has not selected the text generation confirmation option within a preset time threshold, the step of obtaining the detailed requirements corresponding to the current round based on at least part of the initial requirement input by the user is executed. If it is detected that the user selects the text generation option, the text generation condition is triggered so as to generate the target text as soon as possible according to the user's wishes.
[0079] Optionally, users can select the text generation confirmation option after entering their initial requirement in any round. This allows users to select the text generation confirmation option immediately after entering their initial requirement for the first round. This caters to scenarios where users have lower precision requirements for the target text but want to obtain it quickly, and also aligns with the habit of some users who prefer to generate text first and then modify it. Furthermore, even if the guiding text for the current round has already been generated, users can still select the text generation confirmation option. This allows the text generation condition to be triggered directly when users no longer need to enter their initial requirement or when they are unsure of the corresponding requirement based on the guiding text.
[0080] In a specific implementation scenario, please combine Figure 2 See Figure 7 , Figure 7 yes Figure 4 The diagram illustrates an application scenario following step S401. After receiving the user's initial input request, a text confirmation option is generated in the input box 200. Figure 7 A text generation box 204 is generated, containing corresponding prompts for the user to generate text directly. When it is detected that the user has not selected the text generation confirmation option within a preset time threshold (i.e., no user clicks on the generation box 204 within the preset time threshold), the generated guidance text is displayed in the guidance box 201. At this point, the user can further input their primary requirement based on the guidance text in the input box 200, or select the text generation confirmation option from the previous round, triggering the text generation condition. It is understood that when it is detected that the user has selected the text generation confirmation option within the preset time threshold, the guidance text is no longer generated, and the text generation condition is triggered directly. The preset time threshold can be any custom time length such as 10 seconds, 15 seconds, or 20 seconds; this application does not impose specific restrictions on it.
[0081] S406: In response to the triggering text generation condition, generate target text that matches the first requirement of all rounds.
[0082] Specifically, when the text generation condition is triggered, target text matching the first requirement of all rounds is generated based on the first requirement of all rounds, thereby improving the relevance of the generated text to the user's needs.
[0083] In one implementation scenario, before generating target text matching the first requirement across all rounds in response to triggering the text generation condition, the method further includes: in response to obtaining the first requirement for at least a preset number of rounds and not triggering the text generation condition, obtaining historical text matching the first requirement; generating text generation prediction conditions based on the historical text and all entered first requirements; generating a second prompt text to prompt the user to confirm the text generation prediction conditions; in response to obtaining a second input instruction from the user based on the second prompt text, re-executing the step of obtaining the user-inputted first requirement; and triggering the text generation condition in response to obtaining a second confirmation instruction from the user based on the second prompt text.
[0084] Specifically, if the text generation condition is not triggered after obtaining at least a preset number of first requests, historical text matching the first request is obtained. Based on the historical text and all previously entered first requests, the user's text generation requirement is predicted to obtain a text generation prediction condition. A second prompt text is generated to prompt the user to confirm the text generation prediction condition, and the second prompt text is displayed to the user. When a second input instruction is obtained from the user based on the second prompt text, the step of obtaining the user's input first request is repeated. When a second confirmation instruction is obtained from the user based on the second prompt text, the text generation condition is triggered. The preset number can be any custom value such as 5, 8, or 10; this application does not impose specific restrictions on this.
[0085] Understandably, when the text generation requirement remains unclear after multiple rounds of interaction, the system can predict the text generation requirement by acquiring and referencing historical text. The predicted text generation conditions are then used to generate a second prompt text to prompt the user for confirmation. Even if the user does not confirm the text generation prediction conditions, the prediction conditions can still provide guidance to the user, enabling them to continue inputting the first requirement that clarifies the text generation requirement. This improves the efficiency of target text generation when the text generation requirement is unclear.
[0086] Optionally, historical text can be generated text obtained after the user's personal authorization, or historical data can be reference text related to the user's first requirement obtained from the database.
[0087] In one application scenario, please refer again. Figure 2 After obtaining historical text, based on the first requirement entered by all users and referring to the historical text, the text generation requirement is predicted to obtain text generation prediction conditions. Based on the text generation prediction conditions, the second prompt text is generated. Figure 2Taking the first request entered by the user as an example, the second prompt text could be: "Your estimated request is: Based on the mandatory 6-year retirement age for gasoline-powered taxis newly added from May 1st this year, generate a notice regarding the adjustment of the retirement age for taxis in a certain city. Would you like to generate the notice based on the above estimated request?"
[0088] Optionally, please refer to [the relevant document / reference]. Figure 5 and Figure 6 The second prompt text can be displayed as a pop-up window, providing the user with at least two options: continue typing and confirm / generate. Figure 5 The prompt box 203 in the middle can also be accessed through, for example... Figure 6 The guide box 201 in the middle is displayed.
[0089] In another implementation scenario, at least one round of the first requirement includes the text type of the target text. After obtaining the first requirement input by the user, the process further includes: in response to obtaining the text type of the target text, obtaining a knowledge base that matches the text type of the target text, and proofreading the first requirement based on the knowledge base; in response to the first requirement including a first descriptive text that contradicts the content in the knowledge base, generating a third prompt text to prompt the user whether to modify the first descriptive text; in response to obtaining a third confirmation instruction input by the user based on the third prompt text, retaining the first descriptive text; and in response to obtaining a first correction option input by the user based on the third prompt text, replacing the first descriptive text with the content in the knowledge base.
[0090] Specifically, in all rounds of user input, at least one round of the first requirement includes the text type of the target text. After obtaining the text type of the target text, a knowledge base matching the text type of the target text is retrieved. The subsequent input first requirements are checked based on the knowledge base. When the first requirement includes a first description text that contradicts the content in the knowledge base, a third prompt text is generated to ask the user whether to modify the first description text. When a third confirmation instruction is obtained from the user based on the third prompt text, the first description text is retained to preserve the user's input first requirement and meet the user's personal needs. When a first correction option is obtained from the user based on the third prompt text, the first description text is replaced with the content in the knowledge base to correct the first description text in a timely manner, thereby improving the accuracy of text generation requirements and thus improving the precision of the target text.
[0091] Optionally, before the user enters their first requirement in the first round, an initial prompt text is generated to guide the user to clarify the type of the target text, thereby facilitating the proofreading of the first requirement in the first round and each subsequent round.
[0092] It should be noted that the target text type can be at least one of the general types of official documents, academic papers, and graduation theses, or it can be a sub-type under each general type. Taking official documents as an example, the sub-types include at least resolutions, decisions, orders, bulletins, announcements, notices, opinions, notifications, circulars, reports, requests for instructions, replies, motions, letters, and minutes.
[0093] In a specific implementation scenario, please combine Figure 2 See Figure 8 , Figure 8 yes Figure 4 The following is an application scenario diagram of another implementation method after step S401. When the user enters the first requirement in the input box 200, the text type of the target text is an official document. The knowledge base related to official documents is obtained. When the guidance text in the guidance box 201 is "Which departments should the notice be copied to?", and the user's first requirement based on the guidance text is "Copy to secondary departments", the first requirement is checked. It is found that the secondary departments and a certain city are at the first level, so the first description text is "secondary departments". A third prompt text is generated to prompt the user whether to modify the first description text: "Prompt: A certain city is at the first level. Do you want to correct it to copy to the first level departments?" The third prompt text is displayed using the prompt box 203, and the user is provided with at least a "confirm" option and a "confirm modification" option. When the user selects the "confirm" option, the first description text is retained. When the user selects the "confirm modification" option, the secondary departments are changed to the first level departments.
[0094] Optionally, in other specific implementation scenarios, the third prompt text can also be displayed in the guide box 201.
[0095] In another implementation scenario, at least one round of the first requirement includes the text type of the target text. In response to triggering the text generation condition, after generating the target text that matches the first requirement of all rounds, the process further includes: obtaining a knowledge base that matches the text type of the target text, and proofreading the target text based on the knowledge base; in response to the target text including a second descriptive text that contradicts the content in the knowledge base, generating a fourth prompt text to prompt the user whether to modify the second descriptive text; in response to obtaining a fourth confirmation instruction input by the user based on the fourth prompt text, retaining the second descriptive text; and in response to obtaining a second correction instruction input by the user based on the fourth prompt text, replacing the second descriptive text with the content in the knowledge base.
[0096] Specifically, after obtaining the text type of the target text, a knowledge base matching the text type of the target text is retrieved. The target text is then proofread based on the knowledge base. When the target text includes a second descriptive text that contradicts the content in the knowledge base, a fourth prompt text is generated to ask the user whether to modify the second descriptive text. When a fourth confirmation instruction is received from the user based on the fourth prompt text, the second descriptive text is retained. When a second correction instruction is received from the user based on the fourth prompt text, the second descriptive text is replaced with the content in the knowledge base to conduct a comprehensive proofreading of the content in the target text, thereby correcting the second descriptive text in a timely manner and improving the accuracy of the target text.
[0097] Optionally, please refer to [the relevant document / reference]. Figure 8 The fourth prompt text can be displayed as a pop-up window, providing the user with at least two options: confirm that everything is correct and confirm the changes. Figure 8 The prompt box 203 in the middle can also be accessed through, for example... Figure 8 The guide box 201 in the middle is displayed.
[0098] Furthermore, acquiring a knowledge base that matches the text type of the target text includes: acquiring the user's region level; wherein the region level is input by the user through a first requirement or uploaded by the user in advance; and acquiring a knowledge base that matches the text type of the target text based on the region level.
[0099] Specifically, the system obtains the user's region level after authorization. The region level can be pre-uploaded by the user or extracted from the user's first requirement. Based on the region level, a knowledge base matching the text type of the target text is obtained to improve the accuracy of the matching between the knowledge base and the user's region level.
[0100] Optionally, please refer to [the relevant document / reference]. Figure 2 Generating target text that matches the first requirement of all rounds includes: obtaining auxiliary content that matches the first requirement of all rounds from the knowledge base, generating a second prompt based on the first requirement and auxiliary content of all rounds, providing the second prompt to the large language model, and receiving the target text output by the large language model after responding to the second prompt, thereby improving the richness of the target text.
[0101] In a specific application scenario, taking the text type of the target text as an official document as an example, when the user belongs to a first-level unit, the knowledge base matching the first level is obtained; when the user belongs to a second-level unit, the knowledge base matching the second level is obtained. This application will not list them one by one.
[0102] Unlike the aforementioned embodiments, this method obtains the detailed requirements corresponding to the current round based on at least a portion of the user's input first requirements, thereby generating guiding text related to the detailed requirements corresponding to the user's input first requirements. If no detailed requirements are obtained in the current round, text generation conditions are automatically triggered, thus achieving automated triggering of text generation conditions, improving user experience. Furthermore, a text generation confirmation option is provided so that the user can select the text generation confirmation option after inputting the first requirements in any round to trigger the text generation conditions. And when the text generation requirements are still unclear after multiple rounds of interaction, text generation prediction conditions are generated by obtaining and referring to historical text, improving the efficiency of target text generation.
[0103] Please see Figure 9 , Figure 9 This is a flowchart illustrating another embodiment of the text generation method of this application, the method comprising:
[0104] S901: The first requirement is to obtain user input.
[0105] S902: In response to the absence of a text generation condition, generate guiding text to clarify the text generation requirement for the user, and re-execute the first requirement step of obtaining user input under the guiding text.
[0106] S903: In response to the triggering text generation condition, generate target text that matches the first requirement of all rounds.
[0107] Specifically, steps S901-S903 can be referred to any of the above embodiments, and will not be repeated here.
[0108] S904: The second requirement is to obtain user input.
[0109] Specifically, once the target text is obtained, if the user is dissatisfied with any aspects of the target text, the user can input a second request, which is used to adjust the target text so that the user can adjust the target text according to their personal wishes.
[0110] Optionally, the target text can be displayed using an editable box, where users can modify it. The user's modification behavior in the editable box constitutes the user's second requirement.
[0111] In one application, an input box is used to receive the user's second request. In response to the user entering the request text in the input box, the second request entered by the user is obtained.
[0112] It is understood that, in addition to the methods described above, various methods in step S101 of the above embodiments can also be used to obtain the second requirement input by the user.
[0113] In another application, in response to detecting that a user has selected at least part of the target text, multiple adjustment candidates corresponding to various adjustment methods are generated at the selected text; the adjustment candidate corresponding to one of the adjustment methods selected by the user is obtained to obtain the second requirement.
[0114] Specifically, when it is detected that a user has selected at least part of the target text, the selected text is designated as the selected text. Multiple adjustment candidate options are generated at the selected text for the user to choose from. Once the adjustment candidate option corresponding to one of the user's selected adjustment methods is obtained, the second requirement is derived. The adjustment methods include at least adding, deleting, and modifying.
[0115] In one application scenario, when it is detected that a user has selected at least one text on the target text, the selected text is designated as the selected text. Three adjustment candidates, namely expansion, abbreviation, and rewriting, are generated below the selected text for the user to choose from. When the user selects any adjustment candidate, the user's second requirement for the selected text is determined, so that the user can directly express specific requirements for the content in the target text.
[0116] S905: Adjust the target text based on the second requirement to obtain the adjusted target text.
[0117] Specifically, the target text is adjusted based on the user's second requirement, thereby obtaining the adjusted target text and improving the fit between the target text and the user's needs.
[0118] In one application method, please combine Figure 2 See Figure 10 , Figure 10 yes Figure 9 A schematic diagram of an application scenario corresponding to step S905 in one embodiment. Figure 10 The content to the left of the middle dashed line and Figure 2 Correspondingly, the user can further input a second requirement in the input box 200, "change the date of signature to March 31st". Based on the second requirement, the target text is adjusted to modify the date of signature, and the adjusted target text is displayed in the display box 202.
[0119] In another application, adjusting the target text based on a second requirement to obtain the adjusted target text includes: determining the text to be adjusted in the target text based on the second requirement; adjusting the text to be adjusted based on the second requirement to obtain the adjusted text, and generating replacement options and combination options; in response to detecting that the user selects a replacement option, replacing the text to be adjusted with the adjusted text to obtain the adjusted target text; in response to detecting that the user selects a combination option, displaying the text to be adjusted and the adjusted text, obtaining the text to be reorganized selected by the user in the text to be adjusted and / or the adjusted text, reorganizing the text to be reorganized to obtain the reorganized text, and replacing the text to be adjusted with the reorganized text to obtain the adjusted target text.
[0120] Specifically, based on the second requirement, the text to be adjusted in the target text is identified. The text to be adjusted is then adjusted based on the second requirement to obtain the adjusted text. Replacement options and combination options are generated so that the user can choose to directly replace or select a portion of the paragraph for reorganization. When the user selects a replacement option, the text to be adjusted is replaced with the adjusted text to obtain the adjusted target text, thus improving the adjustment efficiency of the target text. When the user selects a combination option, the text to be adjusted and the adjusted text are displayed. The text to be reorganized selected by the user in the text to be adjusted and / or the adjusted text is obtained. The text to be reorganized is reorganized to obtain the reorganized text. The text to be adjusted is replaced with the reorganized text to obtain the adjusted target text.
[0121] Furthermore, please combine Figure 10 See Figure 11 , Figure 11 yes Figure 9 A schematic diagram of another implementation scenario corresponding to step S905 shows that when a user selects a combination option, the text to be adjusted and the text that has been adjusted are displayed, such as... Figure 11 As shown in selection box 205, both the text to be adjusted before adjustment and the adjusted text after adjustment are displayed to the user for selection. The user can select any character from the text to be adjusted, the adjusted text, or the text to be adjusted and the adjusted text to obtain the text to be reorganized. Based on the semantics of the text to be reorganized, the text to be reorganized is reorganized and adjusted to obtain the reorganized text. The text to be adjusted is replaced by the reorganized text, that is, the text in the dotted box is replaced by the reorganized text, and the adjusted target text is displayed in display box 202, improving the adjustment accuracy of the target text.
[0122] In one implementation scenario, after obtaining the second requirement input by the user, the process further includes: obtaining a text specification that matches the text type of the target text, and proofreading the second requirement based on the text specification; in response to the second requirement conforming to the text specification, performing a step of adjusting the target text based on the second requirement to obtain the adjusted target text; in response to the second requirement violating the text specification, generating a fifth prompt text and its corresponding first confirmation option and first cancellation option; in response to detecting that the user selects the first confirmation option, performing a step of adjusting the target text based on the second requirement to obtain the adjusted target text; and in response to detecting that the user selects the first cancellation option, re-executing the step of obtaining the second requirement input by the user.
[0123] Specifically, the text specification that matches the text type of the target text is obtained, the second requirement is proofread using the text specification, and it is determined whether the modification of the target text by the second requirement conforms to the text specification. When the second requirement conforms to the text specification, the target text is adjusted based on the second requirement to obtain the adjusted target text.
[0124] Furthermore, when the second requirement violates the text specification, a fifth prompt text and its corresponding first confirmation option and first cancellation option are generated so that the user can choose whether to enter the second requirement. When the user selects the first confirmation option, the step of adjusting the target text based on the second requirement is executed to obtain the adjusted target text, thereby modifying the target text according to the user's wishes. When the user selects the first cancellation option, the step of obtaining the second requirement input by the user is executed again so that the second requirement that may violate the text specification is cancelled before the target text is adjusted, thereby improving the standardization of the target text.
[0125] In a specific implementation scenario, when the second requirement violates the text specification, a fifth prompt text is generated: "The above requirement may cause the modified text to violate the text specification. Please confirm whether you still want to make the modification." If the user confirms that they still want to make the modification, the target text is adjusted based on the second requirement to obtain the adjusted target text. If the user confirms that they want to cancel the modification, the step of obtaining the second requirement input by the user is repeated. It is understandable that the fifth prompt text can be displayed through a pop-up window.
[0126] In another implementation scenario, after adjusting the target text based on the second requirement to obtain the adjusted target text, the process further includes: obtaining a text specification that matches the text type of the target text; proofreading the adjusted target text based on the text specification; displaying the adjusted target text in response to the adjusted target text conforming to the text specification; generating a sixth prompt text and its corresponding second confirmation option and second cancellation option in response to the adjusted target text violating the text specification; displaying the adjusted target text in response to the user selecting the second confirmation option; and displaying the target text before adjustment in response to the user selecting the second cancellation option.
[0127] Specifically, the text specification that matches the text type of the target text is obtained, the adjusted target text is proofread using the text specification, and it is determined whether the adjusted target text conforms to the text specification. When the adjusted target text conforms to the text specification, the adjusted target text is displayed.
[0128] Furthermore, when the adjusted target text violates the text specification, a sixth prompt text and its corresponding second confirmation and second cancellation options are generated, allowing the user to choose whether to retain the parts of the adjusted target text that do not conform to the text specification. When the user selects the second confirmation option, the adjusted target text is displayed to comply with the user's wishes. When the user selects the second cancellation option, the target text before adjustment is displayed, so that after adjusting the target text, it can be checked whether the adjusted content conforms to the text specification. In addition, after the target text is generated, the content adjusted based on the second requirement of each round is proofread, reducing the difficulty and accuracy of proofreading and improving the standardization of the target text.
[0129] In a specific implementation scenario, when the adjusted target text violates text specifications, a sixth prompt text is generated: "The above modifications have caused the modified text to violate text specifications. Please confirm whether you still want to make the modifications." If the user confirms that they still want to make the modifications, the adjusted target text is displayed; if the user confirms that they want to cancel the modifications, the original target text is displayed. It is understandable that the sixth prompt text can be displayed via a pop-up window.
[0130] It should be noted that text specifications should at least include the necessary content of the text and word limits for paragraphs, but this application does not impose specific restrictions on these.
[0131] Unlike the previous embodiments, after generating the target text, the second requirement of the user to adjust the target text is obtained, and the second requirement is proofread in combination with the text specification, or the adjusted target text is proofread in combination with the text specification, so as to improve the fit between the target text and the user's requirements and the standardization of the target text.
[0132] Please see Figure 12 , Figure 12 This is a schematic diagram of one embodiment of the text generation device of this application. The text generation device 120 includes an acquisition module 122, a guidance module 124, and a generation module 126. The acquisition module 122 is used to acquire a first requirement input by the user. The guidance module 124 is used to generate guidance text to guide the user to clarify the text generation requirement in response to the absence of a text generation condition. The acquisition module 122 is also used to re-execute the step of acquiring the first requirement input by the user under the guidance text. The generation module 126 is used to generate target text that matches the first requirement in all rounds in response to the triggering of the text generation condition.
[0133] The above scheme obtains the user's initial requirement. When the text generation condition is not triggered, it generates guiding text to help the user clarify the text generation requirement. This provides prompts and guides the user to further input the initial requirement that clarifies the text generation condition based on the guiding text. The user's initial requirement is then obtained again under the guidance text, and the user's requirement for the text generation condition gradually becomes clear with the prompts of the guiding text until the text generation condition is triggered. Based on the initial requirements of all rounds, target text that matches the initial requirements of all rounds is generated, thereby improving the relevance of the generated text to the user's needs.
[0134] Optionally, the guiding text is related to the detailed requirements corresponding to the first requirement that the user has entered; the acquisition module 122 is also used to acquire the detailed requirements corresponding to the current round based on at least part of the first requirements that the user has entered; in response to the acquisition of detailed requirements in the current round, the generation module 126 waits to trigger the text generation conditions; in response to the failure to acquire detailed requirements in the current round, the generation module 126 triggers the text generation conditions.
[0135] Optionally, the guiding module 124 is further configured to generate a first prompt text for prompting the user to confirm all the first requirements that have been entered; in response to obtaining a first input instruction entered by the user based on the first prompt text, the obtaining module 122 re-executes the step of obtaining the first requirements entered by the user; in response to obtaining a first confirmation instruction entered by the user based on the first prompt text, the generating module 126 executes the step of triggering the text generation condition.
[0136] Optionally, the guidance module 124 is further configured to generate a text generation confirmation option; in response to detecting that the user has not selected the text generation confirmation option within a preset time threshold, the acquisition module 122 performs the step of acquiring the refined requirements corresponding to the current round based on at least part of the first requirements already entered by the user; in response to detecting that the user has selected the text generation confirmation option, triggering the text generation condition, the generation module 126 performs the step of generating target text that matches the first requirements of all rounds in response to triggering the text generation condition.
[0137] Optionally, the acquisition module 122 is further configured to, in response to acquiring at least a preset number of first requirements and without triggering the text generation condition, acquire historical text matching the first requirement; the guidance module 124 is further configured to, based on the historical text and all the first requirements that have been entered, generate text generation prediction conditions; generate a second prompt text to prompt the user to confirm the text generation prediction conditions; in response to acquiring a second input instruction from the user based on the second prompt text, the acquisition module 122 re-executes the step of acquiring the first requirement input by the user; in response to acquiring a second confirmation instruction from the user based on the second prompt text, the generation module 126 triggers the text generation condition.
[0138] Optionally, if at least one round of the first requirement includes the text type of the target text, the acquisition module 122 is further configured to, in response to acquiring the text type of the target text, acquire a knowledge base that matches the text type of the target text, and proofread the first requirement based on the knowledge base; in response to the first requirement including a first descriptive text that contradicts the content in the knowledge base, the guidance module 124 generates a third prompt text to prompt the user whether to modify the first descriptive text; in response to acquiring a third confirmation instruction input by the user based on the third prompt text, the generation module 126 retains the first descriptive text; in response to acquiring a first correction option input by the user based on the third prompt text, the generation module 126 replaces the first descriptive text with the content in the knowledge base.
[0139] Optionally, at least one round of the first requirement includes the text type of the target text. The acquisition module 122 is also used to acquire a knowledge base that matches the text type of the target text and to proofread the target text based on the knowledge base. In response to the target text including a second descriptive text that contradicts the content in the knowledge base, the guidance module 124 generates a fourth prompt text to prompt the user whether to modify the second descriptive text. In response to acquiring a fourth confirmation instruction input by the user based on the fourth prompt text, the generation module 126 retains the second descriptive text. In response to acquiring a second correction instruction input by the user based on the fourth prompt text, the generation module 126 replaces the second descriptive text with the content in the knowledge base.
[0140] Optionally, the acquisition module 122 is also used to acquire the user's region level; wherein the region level is input by the user through a first requirement or uploaded by the user in advance; based on the region level, a knowledge base matching the text type of the target text is acquired.
[0141] Optionally, the acquisition module 122 is further configured to acquire a second requirement input by the user; the generation module 126 is further configured to adjust the target text based on the second requirement to obtain the adjusted target text.
[0142] Optionally, the acquisition module 122 is further configured to acquire a text specification that matches the text type of the target text, and proofread the second requirement based on the text specification; in response to the second requirement conforming to the text specification, the generation module 126 performs the step of adjusting the target text based on the second requirement to obtain the adjusted target text; in response to the second requirement violating the text specification, the guidance module 124 generates a fifth prompt text and its corresponding first confirmation option and first cancellation option; in response to detecting that the user selects the first confirmation option, the generation module 126 performs the step of adjusting the target text based on the second requirement to obtain the adjusted target text; in response to detecting that the user selects the first cancellation option, the acquisition module 122 re-executes the step of acquiring the second requirement input by the user.
[0143] Optionally, the acquisition module 122 is further configured to acquire a text specification that matches the text type of the target text, and proofread the adjusted target text based on the text specification; in response to the adjusted target text conforming to the text specification, the generation module 126 displays the adjusted target text; in response to the adjusted target text violating the text specification, the guidance module 124 generates a sixth prompt text and its corresponding second confirmation option and second cancellation option; in response to detecting that the user selects the second confirmation option, the generation module 126 displays the adjusted target text; in response to detecting that the user selects the second cancellation option, the generation module 126 displays the target text before adjustment.
[0144] Optionally, the generation module 126 is further configured to: determine the text to be adjusted in the target text based on the second requirement; adjust the text to be adjusted based on the second requirement to obtain the adjusted text, and generate replacement options and combination options; in response to detecting that the user selects a replacement option, replace the text to be adjusted with the adjusted text to obtain the adjusted target text; in response to detecting that the user selects a combination option, display the text to be adjusted and the adjusted text, obtain the text to be reorganized selected by the user in the text to be adjusted and / or the adjusted text, reorganize the text to be reorganized to obtain the reorganized text, and replace the text to be adjusted with the reorganized text to obtain the adjusted target text.
[0145] Optionally, the acquisition module 122 is further configured to, in response to detecting that the user has selected at least part of the selected text on the target text, generate multiple adjustment candidates corresponding to the selected text; acquire the adjustment candidate corresponding to one of the adjustment methods selected by the user, and obtain the second requirement.
[0146] Please see Figure 13 , Figure 13This is a schematic diagram of the structure of an embodiment of the smart terminal of this application. The smart terminal 130 includes a display screen 1300, a memory 1301, and a processor 1302. The display screen 1300 and the memory 1301 are respectively coupled to the processor 1302. The display screen 1300 is used at least to display text to the user and to provide input for the user. The memory 1301 stores program instructions (not identified). The processor 1302 is used to execute the program instructions to implement the text generation method described in any of the above embodiments. For related explanations, please refer to the detailed description of the above method embodiments, which will not be repeated here.
[0147] The above solution can improve the relevance of the generated text to user needs.
[0148] Please see Figure 14 , Figure 14 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. The computer-readable storage medium 140 stores program instructions 1400, which, when executed by a processor, implement the text generation method described in any of the above embodiments. For further details on related content, please refer to the detailed description of the above method embodiments; it will not be repeated here.
[0149] The above solution can improve the relevance of the generated text to user needs.
[0150] It should be noted that the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0151] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0152] If the integrated unit is implemented as 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 this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0153] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A text generation method, characterized in that, The text generation method includes: The primary requirement is to obtain user input; In response to the failure to trigger the text generation condition, guide text is generated to clarify the text generation requirement for the user, and the step of obtaining the first requirement of user input is re-executed under the guide text; In response to the triggering of the text generation condition, generate target text that matches the first requirement in all rounds; Before generating target text matching the first requirement across all rounds in response to triggering the text generation condition, the method further includes: in response to obtaining the first requirement for at least a preset number of rounds and not triggering the text generation condition, obtaining historical text matching the first requirement; generating text generation prediction conditions based on the historical text and all input first requirements; generating a second prompt text to prompt the user to confirm the text generation prediction conditions; re-executing the step of obtaining the first requirement input by the user in response to obtaining a second input instruction input by the user based on the second prompt text; and triggering the text generation condition in response to obtaining a second confirmation instruction input by the user based on the second prompt text.
2. The method according to claim 1, characterized in that, The guidance text is related to the detailed requirements corresponding to the first requirement that the user has entered; After obtaining the first requirement of user input, the following is also included: Based on at least some of the first requirements already entered by the user, obtain the detailed requirements corresponding to the current round; In response to the refinement requirement being obtained in the current round, wait for the text generation condition to be triggered; In response to the failure to obtain the detailed requirements in the current round, the text generation condition is triggered.
3. The method according to claim 2, characterized in that, Before triggering the text generation condition in response to the failure to obtain the refined requirement in the current round, the method further includes: Generate a first prompt text to prompt the user to confirm all the first requirements that have been entered; In response to receiving a first input instruction from the user based on the first prompt text, the step of receiving the first request for user input is re-executed; In response to receiving a first confirmation instruction from the user based on the first prompt text input, the step of triggering the text generation condition is executed.
4. The method according to claim 2, characterized in that, After obtaining the first requirement of user input, the following is also included: Generate text and confirm option; In response to detecting that the user has not selected the text generation confirmation option within a preset time threshold, the step of obtaining the detailed requirements corresponding to the current round based on at least part of the first requirements already entered by the user is executed; In response to detecting that the user selects the text generation confirmation option, the text generation condition is triggered, and the step of generating target text that matches the first requirement in all rounds is performed in response to triggering the text generation condition.
5. The method according to claim 1, characterized in that, At least one round of the first requirement includes the text type of the target text, and after obtaining the first requirement input by the user, it further includes: In response to obtaining the text type of the target text, a knowledge base matching the text type of the target text is obtained, and the first requirement is proofread based on the knowledge base; In response to the first requirement including a first descriptive text that contradicts the content in the knowledge base, a third prompt text is generated to prompt the user whether to modify the first descriptive text; In response to receiving a third confirmation instruction from the user based on the third prompt text, the first description text is retained; In response to receiving a first correction option input by the user based on the third prompt text, the first descriptive text is replaced with content from the knowledge base.
6. The method according to claim 1, characterized in that, At least one round of the first requirement includes the text type of the target text. After generating target text matching the first requirement in all rounds in response to triggering the text generation condition, the process further includes: Obtain a knowledge base that matches the text type of the target text, and proofread the target text based on the knowledge base; In response to the target text including a second descriptive text that contradicts the content in the knowledge base, a fourth prompt text is generated to prompt the user whether to modify the second descriptive text; In response to receiving a fourth confirmation instruction from the user based on the fourth prompt text, the second description text is retained; In response to receiving a second correction instruction from the user based on the fourth prompt text, the second description text is replaced with content from the knowledge base.
7. The method according to claim 5 or 6, characterized in that, The acquisition of a knowledge base that matches the text type of the target text includes: Obtain the user's region level; wherein the region level is input by the user through the first requirement or uploaded by the user in advance; Based on the region level, a knowledge base matching the text type of the target text is obtained.
8. The method according to claim 1, characterized in that, After generating target text that matches the first requirement in all rounds in response to the triggered text generation condition, the method further includes: The second requirement is to obtain user input; The target text is adjusted based on the second requirement to obtain the adjusted target text.
9. The method according to claim 8, characterized in that, Following the second requirement of obtaining user input, the following is also included: Obtain a text specification that matches the text type of the target text, and proofread the second requirement based on the text specification; In response to the second requirement conforming to the text specification, the step of adjusting the target text based on the second requirement to obtain the adjusted target text is performed; In response to the second requirement violating the text specification, a fifth prompt text and its corresponding first confirmation option and first cancellation option are generated; In response to detecting that the user selects the first confirmation option, the step of adjusting the target text based on the second requirement to obtain the adjusted target text is performed; In response to detecting that the user has selected the first cancel option, the step of obtaining the second requirement for user input is re-executed.
10. The method according to claim 8, characterized in that, After adjusting the target text based on the second requirement to obtain the adjusted target text, the process further includes: Obtain a text specification that matches the text type of the target text, and proofread the adjusted target text based on the text specification; In response to the adjusted target text conforming to the stated text specification, the adjusted target text is displayed; In response to the adjusted target text violating the text specification, a sixth prompt text and its corresponding second confirmation option and second cancellation option are generated; In response to detecting that the user has selected the second confirmation option, the adjusted target text is displayed; In response to detecting that the user has selected the second cancel option, the target text before adjustment is displayed.
11. The method according to claim 8, characterized in that, The adjustment of the target text based on the second requirement to obtain the adjusted target text includes: Based on the second requirement, determine the text to be adjusted in the target text; Based on the second requirement, the text to be adjusted is adjusted to obtain the adjusted text, and replacement options and combination options are generated; In response to detecting that the user selects the replacement option, the text to be adjusted is replaced with the adjusted text to obtain the adjusted target text; In response to detecting that the user selects the combined option, the text to be adjusted and the adjusted text are displayed, the text to be reorganized selected by the user in the text to be adjusted and / or the adjusted text is obtained, the text to be reorganized is reorganized to obtain the reorganized text, and the text to be adjusted is replaced with the reorganized text to obtain the adjusted target text.
12. The method according to claim 8, characterized in that, The second requirement for obtaining user input includes: In response to detecting that a user has selected at least part of the target text, an adjustment candidate for multiple adjustment methods is generated at the selected text. Obtain the adjustment candidate options corresponding to one of the adjustment methods selected by the user, and obtain the second requirement.
13. A text generation device, characterized in that, The text generation device includes: The acquisition module is used to acquire the user's initial input. The guidance module is used to generate guidance text to guide the user to clarify the text generation requirement in response to the absence of a text generation condition; wherein, the acquisition module is also used to re-execute the step of acquiring the first requirement input by the user under the guidance text; The generation module is used to generate target text that matches the first requirement in all rounds in response to the triggering text generation conditions; Before generating target text matching the first requirement across all rounds in response to triggering the text generation condition, the method further includes: in response to obtaining the first requirement for at least a preset number of rounds and not triggering the text generation condition, obtaining historical text matching the first requirement; generating text generation prediction conditions based on the historical text and all input first requirements; generating a second prompt text to prompt the user to confirm the text generation prediction conditions; re-executing the step of obtaining the first requirement input by the user in response to obtaining a second input instruction input by the user based on the second prompt text; and triggering the text generation condition in response to obtaining a second confirmation instruction input by the user based on the second prompt text.
14. A mobile terminal, characterized in that, include: The device includes a display screen, a memory, and a processor, wherein the display screen and the memory are respectively coupled to the processor, the display screen is used at least to display text to a user and to provide input for the user, the memory stores program instructions, and the processor is used to execute the program instructions to implement the text generation method as claimed in any one of claims 1 to 12.
15. A computer-readable storage medium having program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, they implement the text generation method as described in any one of claims 1-12.