Text generation method and device, electronic equipment and storage medium
By obtaining reference question and answer pairs with high conversion rates, and using the task planning model and the progressive ReAct prompt model to generate recommended texts, the problem of inaccurate text generation in marketing conversations is solved, and the accuracy and conversion rate of recommended texts are improved.
Patent Information
- Application Number
- CN202411517336.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-24
AI Technical Summary
The prior art in marketing conversations causes inaccurate text generation due to voice interruptions, typos and other problems, and the Q&A pair contains content from different scenarios or product requirements, which interferes with the analysis model and affects the accuracy of the recommended text.
Put forward a text generation method. By obtaining the reference Q & A with a high conversion rate of the product to be sold, use the preset task planning model to analyze the meta -task sequence, and use the progressive React prompt model to execute the element task sequence in turn to obtain key information To generate recommended text.
By determining the meta-task sequence, we can mine the deep meaning and patterns behind the text, avoid redundant information interference, improve the accuracy of recommended text, and thus increase the conversion rate.
Smart Images

Figure CN119357360A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a text generation method, device, electronic device and storage medium. Background Art
[0002] The accuracy of recommendation text generation directly affects the accuracy of user demand matching, as well as user experience and satisfaction.
[0003] Generally, the question-answer pair is input into the parsing model, and the parsing model directly extracts the recommended text from the question-answer pair. However, there are situations such as voice interruption and non-standard speech in marketing dialogues, which lead to typos and modal particles when converted into text. In addition, the question-answer pair may contain content for different scenarios or different product requirements, which interferes with the parsing model and causes inaccurate recommended text to be generated. Summary of the invention
[0004] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0005] To this end, the first purpose of this application is to propose a text generation method to improve the accuracy of text generation.
[0006] The second objective of the present application is to provide a position determination device.
[0007] The third objective of the present application is to provide an electronic device.
[0008] A fourth objective of the present application is to provide a computer-readable storage medium.
[0009] A fifth object of the present application is to provide a computer program product.
[0010] To achieve the above-mentioned purpose, the first embodiment of the present application proposes a text generation method, comprising:
[0011] Get reference question-answer pairs with high conversion rates for products to be sold;
[0012] Use the preset task planning model to parse the reference question-answer pairs and obtain the meta-task sequence;
[0013] The progressive ReAct prompt model is used to execute each meta-task in the meta-task sequence in turn to obtain key information so as to generate recommendation texts for the products to be sold based on the key information.
[0014] To achieve the above-mentioned purpose, the second embodiment of the present application proposes a text generation device, including:
[0015] An acquisition module, used to acquire reference question-answer pairs with high conversion rates for products to be sold;
[0016] A parsing module is used to parse the reference question-answer pairs using a preset task planning model to obtain a meta-task sequence;
[0017] The generation module is used to use the progressive ReAct prompt model to sequentially execute each meta-task in the meta-task sequence to obtain key information so as to generate a recommendation text for the product to be sold based on the key information.
[0018] To achieve the above-mentioned purpose, the third aspect of the present application provides an electronic device, including:
[0019] at least one processor; and
[0020] a memory communicatively connected to at least one processor; wherein,
[0021] The memory stores instructions that can be executed by at least one processor. The instructions are executed by the at least one processor so that the at least one processor can execute the method of the above embodiment.
[0022] To achieve the above objectives, the fourth aspect of the present application proposes a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method according to the above embodiment.
[0023] To achieve the above objectives, the fifth aspect of the present application proposes a computer program product, including a computer program, which implements the method of the above embodiment when executed by a processor.
[0024] The text generation method, device, electronic device and storage medium provided by the present application obtain reference question-answer pairs with high conversion rates for products to be sold, and then parse the reference question-answer pairs using a preset task planning model to obtain a meta-task sequence, and then use a progressive ReAct prompt model to sequentially execute each meta-task in the meta-task sequence to obtain key information, so as to generate a recommendation text for the product to be sold based on the key information. Thus, by determining the meta-task sequence to dig out the deep meaning and rules hidden behind the text, the meta-task sequence is executed to obtain key information to generate the recommendation text, thereby avoiding the interference of redundant information in the generation of the recommendation text. This improves the accuracy of generating the recommendation text, which in turn helps to improve the conversion rate of the recommendation text.
[0025] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0027] Figure 1 A flowchart of a text generation method provided in an embodiment of the present application;
[0028] Figure 2 A flowchart of a text generation method provided in an embodiment of the present application;
[0029] Figure 3 A schematic diagram of the structure of a text generation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0031] The text generation method and device of the embodiments of the present application are described below with reference to the accompanying drawings.
[0032] The text generation method of the embodiment of the present application is executed by the text generation device (hereinafter referred to as the generation device) provided in the embodiment of the present application. The device can be configured in a computer device or a terminal device to improve the accuracy of determining the position.
[0033] Figure 1 A flowchart of a text generation method provided in an embodiment of the present application.
[0034] like Figure 1 As shown, the text generation method comprises the following steps:
[0035] Step 101, obtaining reference question-answer pairs with high conversion rates for products to be sold.
[0036] In this application, in the process of selling a certain product, the question and answer voice in the sales process can be obtained, and the question and answer voice can be converted into question and answer text by voice recognition. Then, the question and answer text is saved to form the historical marketing data of the product.
[0037] In this application, the historical marketing data of each salesperson for the product to be sold is obtained, wherein the historical marketing data includes question and answer texts and result identifiers of whether the conversion is successful. Afterwards, the conversion success rate of each salesperson is determined based on the result identifier, and when the conversion success rate corresponding to a certain salesperson is greater than a preset threshold, the question and answer text corresponding to the salesperson is determined as the question and answer text to be processed. The question and answer text to be processed is parsed to obtain reference question and answer pairs for the product to be sold. As a result, only the reference question and answer pairs with high conversion rates are subsequently parsed to generate recommended texts, avoiding interference from other question and answer pairs in generating recommended texts, thereby improving the accuracy of text generation.
[0038] Step 102: parse the reference question-answer pair using a preset task planning model to obtain a meta-task sequence.
[0039] In the present application, a task planning model can be pre-trained, and then the task planning model is used to parse the reference question and answer pairs to obtain a meta-task sequence. The meta-task sequence includes meta-tasks to be performed to extract key information for marketing success from the question and answer pairs. The meta-tasks in the meta-task sequence include but are not limited to extracting basic information about the product in the question and answer pairs, the advantages of the product, and the benefits that the product can bring to customers, or extracting basic information about the user and determining the product marketing goals corresponding to the question and answer pairs.
[0040] In addition, when executing the meta-tasks in the meta-task sequence, corresponding tools need to be used. In order to improve the integrity of the meta-task sequence, the names of each tool and its functional description information can be input into the task planning model so that the meta-task sequence output by the task planning model contains the tool information corresponding to each meta-task.
[0041] For example, when a user asks "How do I change my mobile phone package?", the corresponding meta-task sequence can be: "How do I change my mobile phone package?"->["Use the information_search application to query packages", "Generate basic information about the recommended product, package advantages, benefits that can be brought to customers, and specific examples of the benefits of purchasing the package", "Use the self_service application to switch packages"].
[0042] The tools used to perform each meta-task include but are not limited to the following tools:
[0043] baidu_search: A general search engine that can be used to query information on the Internet, such as understanding the latest mobile communication service policies.
[0044] information_search: Database search engine, which can access the database internal network, query package details, etc.
[0045] address_book: Obtain personal information, such as phone number, email address, address, etc., which can be used for customer information management.
[0046] Email: Send and receive emails, which can be used for customer service communication, complaint feedback, etc.
[0047] image_gen: Generates images based on input text, which can be used to generate business process diagrams, network topology diagrams, etc.
[0048] self_service: execute operations such as canceling or processing the user's corresponding package.
[0049] calendar: Get the current time and date, which can be used to query the validity period of the package, customer service hours, etc.
[0050] map_search: A tool for querying the location information of all units on the map. It can be used to locate base stations, business halls, etc.
[0051] knowledge_graph: Obtain information in various communication fields through the mobile communication knowledge graph.
[0052] math_formulation: Calculates the input string expression through Python's eval(·) function and returns the result, which is used to calculate package fees, traffic usage, etc.
[0053] distance_calculation: Calculates the distance between given target units, which can be used to locate base stations, customer locations, etc.
[0054] In addition, the training process of the task planning model is as follows: a training data set of products to be sold is obtained, wherein the training data set contains sample question-answer pairs with high conversion rates for the products to be sold and annotated meta-task sequences corresponding to the sample question-answer pairs. Afterwards, the initial task planning model is trained based on the sample question-answer pairs combined with a dynamic masking mechanism to obtain a predicted meta-task sequence. Then, a loss value is determined based on the difference between the predicted meta-task sequence and the annotated meta-task sequence, so as to correct the initial task planning model based on the loss value and obtain the final task planning model.
[0055] This proposal decomposes complex tasks into multiple specific logically related meta-task sequences, that is, the input of the task planning model is a complex task, and the output is a meta-task sequence with logical associations, that is,
[0056] S=f θ (T)
[0057] Among them, f θ (.) represents the CTP model, S = {s0, s1, …, s n} represents the meta-task set, T = {tp,pp,x0,x1,...,x i} represents a complex task instruction set, tp is the tool information in the prompt template, pp is the parameter information available in the prompt template, x i Indicates the i-th character of the instruction.
[0058] This proposal uses open source large language models to perform full fine-tuning on the training set data set to obtain a task planning model. Open source large language models include baichuan, lamma, chatglm, Qwen, Qwen-14B and other open source models.
[0059] In order to improve the model training effect, the task planning model is trained in combination with the dynamic mask mechanism. For example, assuming that the task planning model is the Qwen-14B model, the masked language model (MLM) in its framework can be improved. The commonly used Sequence Mask is to prevent the Decoder from seeing future information, that is, for a sequence, at time t, our decoding output should only depend on the output before time t, but not on the output after time t. In this application, the reference question and answer pairs are processed in batches. The question and answer pairs are generally short text data. In order not to lose text information, this proposal will pad the longest sentence length in each batch to retain the valid information of each question. For example, the filling process is as follows:
[0060] Batch 1 filling results:
[0061] “What is the 4G network coverage like?”
[0062] “How is the 5G network deployment progressing? [PAD]”
[0063] “How is the deployment of base stations? [PAD][PAD]”
[0064] Batch 2 filling results:
[0065] “How to understand frequency division multiple access technology in digital communications?”
[0066] “How much faster is the 5G network speed than 4G [PAD][PAD][PAD]?”
[0067] “Why is the density of 5G base stations greater than that of 4G base stations [PAD]?”
[0068] After padding as described above, the mask matrix is used to obtain the original data position and the padding position, and the padding label of the original data position is set to 1, and the padding label of the padding position is set to negative infinity (-inf). This can reduce the weight of the padding position in the attention mechanism. The calculation result of the attention mechanism is then multiplied by the dynamic mask matrix to mask the attention score of the invalid position. The calculation formula is:
[0069]
[0070] Among them, Q, K, and V are matrices obtained by linear transformation of the input data, and M is the constructed dynamic length MASK matrix.
[0071] In this way, the original information of each sentence in the reference question-answer pair is preserved, while the length of sentences in the batch is kept consistent. The dynamic mask mechanism masks the scores of the padding positions by constructing a mask matrix, so that the attention mechanism only focuses on the valid information in the original question. By padding with the longest sentence length in the batch, the dynamic mask mechanism can adapt to inputs of different lengths and process them efficiently.
[0072] Step 103 , using the progressive ReAct prompt model to sequentially execute each meta-task in the meta-task sequence, obtain key information, and generate a recommendation text for the product to be sold based on the key information.
[0073] In the present application, a progressive ReAct prompt model (hereinafter referred to as the PRP model) can be obtained through pre-training and set in the system. The PRP model sequentially executes each meta-task in the meta-task sequence to obtain key information, and integrates the key information to generate a recommendation text for the product to be sold.
[0074] For example, the process of the PRP model executing each meta-task in the meta-task sequence in turn to obtain key information is as follows:
[0075] r i =g(r1,r2,...,r i-1 ,S i )
[0076] Among them, g(.) represents the PRP model, r i is the running result of the ith meta-task. The PRP model can divide the meta-tasks in the meta-task sequence into three categories: completed tasks, ongoing tasks, and uncompleted tasks. Here, the PRP model combines all the results of the executed tasks and the next meta-task to be executed S i Input them together to get the running result of the current step. After all meta-tasks are executed, the PRP model will integrate the execution results of all meta-tasks to generate the recommendation text of the product to be sold.
[0077] This progressive approach can help the model better focus on the meta-task currently being performed, without being distracted by the length of the text of complex tasks.
[0078] Optionally, the reference question-answer pair may be subjected to intent recognition to obtain the intent information corresponding to the reference question-answer pair, and semantic recognition may be performed on the reference question-answer pair to obtain the key phrases in the reference question-answer pair. Afterwards, the intent information and the key phrases are used as prompt words of a progressive ReAct prompt model (hereinafter referred to as the PRP model) to sequentially execute each meta-task in the meta-task sequence based on the intent information and / or the key phrases using the progressive ReAct prompt model to obtain the key information.
[0079] In order to generate more accurate recommendation text, this proposal uses prompt engineering (PE) to design appropriate prompt words or tags based on question-answer pairs, and inputs them into the PRP model together with the question-answer pairs to help the model better understand the text and generate corresponding outputs.
[0080] In the above, the process of performing intent recognition on the reference question-answer pair and obtaining the intent information corresponding to the reference question-answer pair can be:
[0081] Assuming that the text corresponding to a sentence in the reference question-answer pair is x, and the prompt word contains the specified intent p, the judgment results {False, True} of the large model used for intent recognition have the following relationship:
[0082] LLM(x,p)={False,True}
[0083] Among them, False means that the specified intention p is not expressed in the text x, and True means that the specified intention p is expressed in the text x.
[0084] The prompt words need to be set according to the actual scenario of speech generation. For example, for the scenario of generating speech for package upgrade, the prompt words can be set as: "Your task is to determine whether the customer has the intention to upgrade the package by analyzing the customer input, and output it according to the specified output format. \nPackage upgrade means that the customer wants to upgrade the current data package or voice package. \nThe output format is: {\"Whether the package is upgraded\":bool}, where bool is True or False. \nIf the user has the intention to upgrade the package, bool is True. \nIf the user does not have the intention to upgrade the package, bool is False. \nCustomer input: %(question)." Among them, %(question) represents the reference question and answer pair.
[0085] For example, the intent information obtained by the large model for intent recognition of the reference question and answer pair is shown in Table 1 below:
[0086] Table 1
[0087]
[0088]
[0089] In addition, the key phrases in the reference question-answer pairs can be further mined. The key phrases can be product feature descriptions that are highly relevant to user intent, or product selling point descriptions, etc., so that the generated recommendation text can effectively improve the conversion rate.
[0090] As a possible implementation method, the reference question-answer pair and the preset prompt words can be input into a large model for semantic recognition, so as to use the large model to perform semantic recognition on the reference question-answer pair and obtain the key phrases in the reference question-answer pair.
[0091] For example, for the scenario of generating a package upgrade script, the prompt words can be set as:
[0092] "You are a text keyword extraction assistant. Please extract the key phrases in the speech from the text." The text is a reference question and answer pair.
[0093] Require:
[0094] 1. The output text must be the same as the user input text. No new text can be added or the word order can be adjusted.
[0095] 2. Output key phrases.
[0096] 3. Extract the three most important key information.
[0097] 4. After the output is completed, do not generate new dialogue content.
[0098] For example, the key phrases obtained by the large model for semantic recognition of the reference question-answer pair are shown in Table 2 below:
[0099] Table 2
[0100]
[0101]
[0102] In this application, intent information and key phrases are used as prompt words of the progressive ReAct prompt model, so that the progressive ReAct prompt model is used to execute each meta-task in the meta-task sequence in sequence based on the intent information and key phrases. The key information can be obtained by referring to the following process: the PRP model executes the meta-task sequence in sequence to obtain basic user information (such as traffic and voice usage (used traffic, total traffic in the package, used call duration, call duration in the package, etc.), business type (integrated customers, contract customers, etc.), card slot type (×× operator single card, ×× operator main card, other operators main card)) and basic package information, and filters out a preset number of strongly associated key phrases for different users and different intentions, and fuses the filtered phrases based on the reference question and answer pairs to generate recommended text.
[0103] In this application, a reference question-answer pair with a high conversion rate of the product to be sold is obtained, and then the reference question-answer pair is parsed using a preset task planning model to obtain a meta-task sequence, and then the progressive ReAct prompt model is used to execute each meta-task in the meta-task sequence in turn to obtain key information, so as to generate a recommendation text for the product to be sold based on the key information. Thus, by determining the meta-task sequence to dig out the deep meaning and rules hidden behind the text, the meta-task sequence is executed to obtain key information to generate the recommendation text, thereby avoiding the interference of redundant information in the generation of the recommendation text. This improves the accuracy of generating the recommendation text, which in turn helps to improve the conversion rate of the recommendation text.
[0104] Figure 2 A flowchart of a text generation method provided in an embodiment of the present application.
[0105] like Figure 2 As shown, the text generation method comprises the following steps:
[0106] Step 201, obtaining the historical marketing data of each salesperson for the product to be sold, wherein the historical marketing data includes the question and answer text and the result identification of whether the conversion is successful.
[0107] Step 202, determining the conversion success rate of each salesperson based on the result identifier.
[0108] In the present application, the specific implementation process of step 201-step 202 can be found in the detailed description of any embodiment of the present application, and will not be repeated here.
[0109] Step 203, determine the data volume corresponding to each salesperson in the historical marketing data, and when the data volume and conversion success rate corresponding to any salesperson are greater than a preset threshold, determine the question and answer text corresponding to any salesperson as the question and answer text to be processed.
[0110] For example, the process of determining the text to be processed is as follows:
[0111] (1) First, sort the data volumes corresponding to all salesmen in ascending order.
[0112] (2) Then, the preset quantile position of the data volume corresponding to all salesmen is calculated, that is, (n+1)×preset quantile, where n is the number of salesmen, and the data volume corresponding to the preset quantile position is determined as the preset threshold. If the calculation result is an integer, the data volume corresponding to the position is directly taken as the preset threshold; if it is a decimal, the preset threshold is determined by interpolation.
[0113] (3) When the amount of data corresponding to a salesperson is greater than a preset advance and the conversion success rate is greater than a preset threshold, the question and answer text corresponding to the salesperson is determined as the question and answer text to be processed.
[0114] As a result, the data corresponding to salesmen who actually handled fewer products for sale but had a higher conversion success rate were removed, which is conducive to improving the accuracy of generating recommendation texts.
[0115] Step 204: parse the question and answer text to be processed to obtain reference question and answer pairs for the product to be sold.
[0116] Step 205: parse the reference question-answer pair using a preset task planning model to obtain a meta-task sequence.
[0117] Step 206 , using the progressive ReAct prompt model to sequentially execute each meta-task in the meta-task sequence, obtain key information, and generate a recommendation text for the product to be sold based on the key information.
[0118] In the present application, the specific implementation process of steps 204 to 206 can be found in the detailed description of any embodiment of the present application, and will not be repeated here.
[0119] In order to implement the above embodiments, the present application also proposes a text generation device.
[0120] Figure 3 A schematic diagram of the structure of a text generation device provided in an embodiment of the present application.
[0121] like Figure 3 As shown, the text generation device includes an acquisition module 310 , a parsing module 320 , and a generation module 330 .
[0122] An acquisition module 310 is used to acquire reference question-answer pairs with high conversion rates for products to be sold;
[0123] A parsing module 320, for parsing the reference question-answer pair using a preset task planning model to obtain a meta-task sequence;
[0124] The generation module 330 is used to use the progressive ReAct prompt model to sequentially execute each meta-task in the meta-task sequence, obtain key information, and generate a recommendation text for the product to be sold based on the key information.
[0125] Furthermore, in a possible implementation of the embodiment of the present application, the acquisition module 310 is used to:
[0126] Obtain the historical marketing data of each salesperson for the product to be sold, where the historical marketing data includes the question and answer text and the result indicator of whether the conversion is successful;
[0127] Determine the conversion success rate of each salesperson based on the result identifier, and when the conversion success rate corresponding to any salesperson is greater than a preset threshold, determine the question and answer text corresponding to any salesperson as the question and answer text to be processed;
[0128] Parse the question and answer text to be processed to obtain reference question and answer pairs for the products to be sold.
[0129] Furthermore, in a possible implementation of the embodiment of the present application, the acquisition module 310 is used to:
[0130] Determine the amount of data corresponding to each salesperson in the historical marketing data;
[0131] When the data volume and conversion success rate corresponding to any salesperson are greater than a preset threshold, the question and answer text corresponding to any salesperson is determined as the question and answer text to be processed.
[0132] Furthermore, in a possible implementation of the embodiment of the present application, the task planning model is obtained by training through the following steps:
[0133] Obtain a training data set of products to be sold, wherein the training data set includes sample question-answer pairs with high conversion rates for the products to be sold and a labeling meta-task sequence corresponding to the sample question-answer pairs;
[0134] The initial task planning model is trained based on sample question-answer pairs combined with a dynamic mask mechanism to obtain the predicted meta-task sequence;
[0135] The loss value is determined based on the difference between the predicted meta-task sequence and the labeled meta-task sequence, so as to correct the initial task planning model based on the loss value and obtain the final task planning model.
[0136] Furthermore, in a possible implementation of the embodiment of the present application, the generating module 330 is used to:
[0137] Perform intent recognition on the reference question-answer pair to obtain intent information corresponding to the reference question-answer pair;
[0138] Perform semantic recognition on the reference question-answer pair to obtain key phrases in the reference question-answer pair;
[0139] The intention information and key phrases are used as prompt words of the progressive ReAct prompt model, so as to use the progressive ReAct prompt model to sequentially execute each meta-task in the meta-task sequence based on the intention information and key phrases to obtain key information.
[0140] It should be noted that the aforementioned explanation of the text generation method embodiment is also applicable to the text generation device of this embodiment, and will not be repeated here.
[0141] In this application, a reference question-answer pair with a high conversion rate of the product to be sold is obtained, and then the reference question-answer pair is parsed using a preset task planning model to obtain a meta-task sequence, and then the progressive ReAct prompt model is used to execute each meta-task in the meta-task sequence in turn to obtain key information, so as to generate a recommendation text for the product to be sold based on the key information. Thus, by determining the meta-task sequence to dig out the deep meaning and rules hidden behind the text, the meta-task sequence is executed to obtain key information to generate the recommendation text, thereby avoiding the interference of redundant information in the generation of the recommendation text. This improves the accuracy of generating the recommendation text, which in turn helps to improve the conversion rate of the recommendation text.
[0142] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.
[0143] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.
[0144] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.
[0145] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0146] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0147] This application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, this application is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, risks can be minimized by limiting data collection and deleting data. In addition, when applicable, personal identifiers are removed from such personal information to protect the privacy of users.
[0148] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0149] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0150] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0151] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0152] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0153] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0154] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0155] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A text generation method, characterized in that: The method comprises: Get reference question-answer pairs with high conversion rates for products to be sold; Analyze the reference question-answer pair using a preset task planning model to obtain a meta-task sequence; Each meta-task in the meta-task sequence is executed in sequence using a progressive ReAct prompt model to obtain key information so as to generate a recommendation text for the product to be sold based on the key information.
2. The method according to claim 1, characterized in that The step of obtaining reference question-answer pairs with high conversion rates for products to be sold includes: Obtaining historical marketing data of each salesperson for the product to be sold, wherein the historical marketing data includes question and answer texts and result identifiers of whether the conversion is successful; Determine the conversion success rate of each of the salespersons based on the result identifier, and when the conversion success rate corresponding to any salesperson is greater than a preset threshold, determine the question and answer text corresponding to any salesperson as the question and answer text to be processed; The question and answer text to be processed is parsed to obtain reference question and answer pairs for the product to be sold.
3. The method according to claim 1, characterized in that When the conversion success rate corresponding to any salesperson is greater than a preset threshold, determining the question and answer text corresponding to any salesperson as the question and answer text to be processed includes: Determine the amount of data corresponding to each of the salespersons in the historical marketing data; When the data volume and conversion success rate corresponding to any salesperson are greater than a preset threshold, the question and answer text corresponding to any salesperson is determined as the question and answer text to be processed.
4. The method according to claim 1, characterized in that The task planning model is trained and acquired through the following steps: Acquire a training data set for the product to be sold, wherein the training data set includes sample question-answer pairs with high conversion rates for the product to be sold and a tagging meta-task sequence corresponding to the sample question-answer pairs; Based on the sample question-answer pairs combined with a dynamic mask mechanism, an initial task planning model is trained to obtain a predicted meta-task sequence; A loss value is determined based on the difference between the predicted meta-task sequence and the labeled meta-task sequence, so as to modify the initial task planning model based on the loss value to obtain a final task planning model.
5. The method according to claim 1, characterized in that The step of using the progressive ReAct prompt model to sequentially execute each meta-task in the meta-task sequence to obtain key information includes: Performing intent recognition on the reference question-answer pair to obtain intent information corresponding to the reference question-answer pair; Performing semantic recognition on the reference question-answer pair to obtain key phrases in the reference question-answer pair; The intention information and the key phrase are used as prompt words of the progressive ReAct prompt model, so as to use the progressive ReAct prompt model to sequentially execute each meta-task in the meta-task sequence based on the intention information and the key phrase to obtain key information.
6. A text generation device, characterized in that: The device comprises: An acquisition module, used to acquire reference question-answer pairs with high conversion rates for products to be sold; A parsing module, used to parse the reference question-answer pair using a preset task planning model to obtain a meta-task sequence; A generation module is used to use a progressive ReAct prompt model to sequentially execute each meta-task in the meta-task sequence, obtain key information, and generate a recommendation text for the product to be sold based on the key information.
7. The device according to claim 6, characterized in that The acquisition module is used to: Obtaining historical marketing data of each salesperson for the product to be sold, wherein the historical marketing data includes question and answer texts and result identifiers of whether the conversion is successful; Determine the conversion success rate of each of the salespersons based on the result identifier, and when the conversion success rate corresponding to any salesperson is greater than a preset threshold, determine the question and answer text corresponding to any salesperson as the question and answer text to be processed; The question and answer text to be processed is parsed to obtain reference question and answer pairs for the product to be sold.
8. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 5 when being executed by a processor.