A prompt information generation method and device, computer equipment and a storage medium

By classifying the initial prompts by intent and performing multiple rounds of filtering, detailed target prompts are generated, solving the problem of poor quality generated content due to insufficient user input and achieving the generation of high-quality content.

CN117312523BActive Publication Date: 2026-03-20DOUYIN VISION CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-17
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Insufficiently detailed prompts from the user input resulted in poor quality of the generated content from the generative model.

Method used

By classifying the initial prompts by intent, multiple prompts to be filtered are generated under each intent category. Through multiple rounds of intent classification and prompt filtering, more detailed and higher-quality target prompts are generated.

Benefits of technology

This generates higher-quality content that better meets user needs, improving the quality of content output by generative models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117312523B_ABST
    Figure CN117312523B_ABST
Patent Text Reader

Abstract

The present disclosure provides a prompt information generation method and device, computer equipment and a storage medium, wherein the method comprises: obtaining initial prompt information; performing intent classification on the initial prompt information to obtain at least one intent category; generating a plurality of to-be-screened prompt information under each intent category based on a prompt information generation strategy corresponding to each intent category; for each intent category, screening intermediate prompt information from the plurality of to-be-screened prompt information under the intent category, and returning the intermediate prompt information as the initial prompt information to perform the above-mentioned intent classification step until the target prompt information meeting the preset prompt information requirement is obtained. In the above manner, the target prompt information describing more detailed and higher quality can be generated, so that the high-quality content meeting the user's demand can be further obtained based on the target prompt information and the content generation model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, and in particular, to a prompt information generation method and device, a computer device and a storage medium. BACKGROUND

[0002] With the rapid development of artificial intelligence, generative network models have gradually entered people's daily generation. The generative network model can generate text, images, audio and other content according to the content input by the user, and can be used in question and answer, automatic drawing and other scenarios.

[0003] In the related art, in order to make the generative model output high-quality generated content, the user needs to input accurate and detailed prompt information, such as accurately and detailedly describing the problem in the question and answer scenario, but the user often has difficulty in describing the problem to be asked in detail, so that the quality of the generated content output by the final generative model needs to be improved. Therefore, how to solve the problem of poor quality of the generated content output by the content generation model due to the insufficient detail of the prompt information input by the user has become a problem to be solved in the field. SUMMARY

[0004] The embodiments of the present disclosure at least provide a prompt information generation method, device, computer device and storage medium.

[0005] In a first aspect, the embodiments of the present disclosure provide a prompt information generation method, comprising:

[0006] obtaining initial prompt information;

[0007] performing intent classification on the initial prompt information to obtain at least one intent category;

[0008] generating a plurality of to-be-screened prompt information under each intent category based on a prompt information generation strategy corresponding to the at least one intent category respectively;

[0009] For each intent category, screening intermediate prompt information from the plurality of to-be-screened prompt information under the intent category, and returning the intermediate prompt information as the initial prompt information to perform the above-mentioned intent classification step until target prompt information meeting a preset prompt information requirement is obtained.

[0010] In a possible implementation, the generating a plurality of to-be-screened prompt information under each intent category based on a prompt information generation strategy corresponding to the at least one intent category respectively comprises:

[0011] For each of the intent categories, the initial prompt information is input into prompt information generation models corresponding to different groups of model parameter information in the intent category, to generate a plurality of to-be-screened prompt information in each intent category, wherein the to-be-screened prompt information output by the prompt information generation models corresponding to different groups of model parameter information is different.

[0012] In a possible implementation, the generating a plurality of to-be-screened prompt information in each intent category based on the prompt information generation strategy corresponding to the at least one intent category comprises:

[0013] For each of the intent categories, the initial prompt information is optimized according to a plurality of prompt information optimization strategies corresponding to the intent category, to obtain a plurality of optimized prompt information.

[0014] The plurality of optimized prompt information is input into a pre-trained prompt information generation model, to generate a plurality of to-be-screened prompt information in the intent category, wherein the to-be-screened prompt information corresponding to different optimized prompt information is different.

[0015] In a possible implementation, the screening intermediate prompt information from the plurality of to-be-screened prompt information in each of the intent categories comprises:

[0016] For each of the intent categories, the plurality of to-be-screened prompt information in the intent category is input into a pre-trained prompt information scoring model in sequence, to obtain a prompt score corresponding to each to-be-screened prompt information.

[0017] According to the prompt score corresponding to each to-be-screened prompt information, a preset number of intermediate prompt information in each of the intent categories is screened.

[0018] In a possible implementation, before the intermediate prompt information is returned as the initial prompt information to perform the above-mentioned intent classification, the method further comprises:

[0019] Based on the intermediate prompt information and the prompt score corresponding thereto, target training data is generated.

[0020] Based on the target training data, a model used to generate the target prompt information is optimized and adjusted, to process the intermediate prompt information as the initial prompt information based on the optimized and adjusted model, wherein the model used to generate the target prompt information comprises an intent classification model used to perform the intent classification, a prompt information generation model used to generate the to-be-screened prompt information, and the prompt information scoring model.

[0021] In a possible implementation, for each of the intent categories, intermediate prompt information is screened from the plurality of to-be-screened prompt information under the intent category, and the intermediate prompt information is returned as the initial prompt information to execute the above-mentioned intent classification step until target prompt information meeting preset prompt information requirements is obtained, including:

[0022] For each of the intent categories, intermediate prompt information corresponding to the intent category is returned as the initial prompt information to execute the above-mentioned classification processing step until the number of times of return execution reaches a target execution number; wherein the target execution number is determined based on an accuracy requirement corresponding to the initial prompt information and / or an intent category of the initial prompt information.

[0023] Among the intermediate prompt information obtained after the target execution number, intermediate prompt information meeting preset prompt information requirements is taken as the target prompt information.

[0024] In a possible implementation, the method further includes:

[0025] The target prompt information is input into a pre-trained content generation model to obtain target content corresponding to the target prompt information output by the content generation model.

[0026] In a possible implementation, the method further includes:

[0027] The initial prompt information is input into the content generation model to obtain initial content corresponding to the initial prompt information.

[0028] Based on the initial content and the target content, display content for display is generated.

[0029] In a possible implementation, the method further includes:

[0030] Based on the initial content and the target content, fusion processing is performed to generate display content containing the initial content and the target content; or

[0031] Based on a comparison result of the initial content and the target content, display content meeting preset display content requirements is determined from the initial content and the target content.

[0032] In a second aspect, the embodiments of the present disclosure further provide a prompt information generation apparatus, including:

[0033] An acquisition module is configured to acquire initial prompt information.

[0034] A classification module is configured to perform intent classification on the initial prompt information to obtain at least one intent category.

[0035] The generating module is configured to generate a plurality of to-be-screened prompt information under each intent category based on a prompt information generation strategy corresponding to the at least one intent category respectively.

[0036] The screening module is configured to screen intermediate prompt information from the plurality of to-be-screened prompt information under each intent category, and return the intermediate prompt information as the initial prompt information to execute the intent classification step until target prompt information meeting a preset prompt information requirement is obtained.

[0037] In a possible implementation, when the generating module generates a plurality of to-be-screened prompt information under each intent category based on a prompt information generation strategy corresponding to the at least one intent category respectively, the generating module is configured to:

[0038] For each intent category, input the initial prompt information into a prompt information generation model corresponding to a plurality of sets of model parameter information under the intent category to generate a plurality of to-be-screened prompt information under the intent category, wherein the to-be-screened prompt information output by the prompt information generation model corresponding to different sets of model parameter information is different.

[0039] In a possible implementation, when the generating module generates a plurality of to-be-screened prompt information under each intent category based on a prompt information generation strategy corresponding to the at least one intent category respectively, the generating module is configured to:

[0040] For each intent category, perform optimization processing on the initial prompt information according to a plurality of prompt information optimization strategies corresponding to the intent category to obtain a plurality of optimized prompt information.

[0041] Input the plurality of optimized prompt information into a pre-trained prompt information generation model to generate a plurality of to-be-screened prompt information under the intent category, wherein the to-be-screened prompt information corresponding to different optimized prompt information is different.

[0042] In a possible implementation, when the screening module screens intermediate prompt information from the plurality of to-be-screened prompt information under each intent category, the screening module is configured to:

[0043] For each intent category, input the plurality of to-be-screened prompt information under the intent category into a pre-trained prompt information scoring model in sequence to obtain a prompt score corresponding to each to-be-screened prompt information.

[0044] Screen a preset number of intermediate prompt information under each intent category according to the prompt score corresponding to each to-be-screened prompt information.

[0045] In one possible implementation, before returning the intermediate prompt information as the initial prompt information to perform the above-described intent classification step, the generation module is further configured to:

[0046] Based on the intermediate prompt information and its corresponding prompt score, target training data is generated;

[0047] Based on the target training data, the model used to generate the target prompt information is optimized and adjusted, so as to process the intermediate prompt information, which serves as the initial prompt information, based on the optimized and adjusted model; wherein, the model used to generate the target prompt information includes: an intent classification model for performing intent classification, a prompt information generation model for generating the prompt information to be filtered, and a prompt information scoring model.

[0048] In one possible implementation, for the filtering module, for each intent category, intermediate prompts are filtered from multiple prompts to be filtered under that intent category, and the intermediate prompts are returned as the initial prompts to the intent classification step, until a target prompt that meets the preset prompt requirements is obtained, for the following purposes:

[0049] For each intent category, the intermediate prompt information corresponding to that intent category is used as the initial prompt information to return and execute the above classification processing steps until the number of times the return execution reaches the target number of executions; wherein, the target number of executions is determined based on the accuracy requirement corresponding to the initial prompt information and / or the intent category of the initial prompt information;

[0050] The intermediate prompts that meet the preset prompt requirements will be selected from the intermediate prompts obtained after the target number of executions and will be used as the target prompts.

[0051] In one possible implementation, the generation module is further configured to:

[0052] The target prompt information is input into a pre-trained content generation model to obtain the target content output by the content generation model that corresponds to the target prompt information.

[0053] In one possible implementation, the generation module is further configured to:

[0054] The initial prompt information is input into the content generation model to obtain the initial content corresponding to the initial prompt information;

[0055] Based on the initial content and the target content, display content is generated for presentation.

[0056] In a possible implementation, the generating module, when generating the display content for display based on the initial content and the target content, is configured to:

[0057] perform fusion processing based on the initial content and the target content to generate display content containing the initial content and the target content; or

[0058] determine, based on the comparison result of the initial content and the target content, display content that meets a preset display content requirement from among the initial content and the target content.

[0059] In a third aspect, the embodiments of the present disclosure further provide a computer device, including a processor, a memory, and a bus, the memory stores machine readable instructions executable by the processor, when the computer device is running, the processor and the memory communicate through the bus, and the machine readable instructions are executed by the processor to perform the steps of the first aspect or any possible implementation of the first aspect.

[0060] In a fourth aspect, the embodiments of the present disclosure further provide a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by the processor to perform the steps of the first aspect or any possible implementation of the first aspect.

[0061] The prompt information generation method and device, the computer device, and the storage medium provided by the embodiments of the present disclosure can obtain at least one intention category by performing intention classification on the obtained initial prompt information, generate a plurality of to-be-screened prompt information under each intention category based on the prompt information generation strategy corresponding to each intention category, further perform screening processing on the to-be-screened prompt information under each intention category, and return the obtained intermediate prompt information as the initial prompt information to perform the steps of intention classification and prompt information generation, so that more target prompt information meeting user demand can be obtained through the processing process of multiple rounds of intention classification, prompt information generation, and prompt information screening. In this way, compared with directly inputting the initial prompt information of the user into a generative model, the target prompt information that is more detailed and of higher quality can be generated through the processing process of multiple rounds of intention classification, prompt information generation, and prompt information screening, so that high-quality content meeting user demand can be further obtained based on the target prompt information.

[0062] In order to make the above objectives, characteristics and advantages of the present disclosure more apparent and understandable, the following preferred embodiments are specifically described below with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following will briefly introduce the drawings needed to be used in the embodiments. The drawings incorporated into the specification and form a part of the specification, which show the embodiments consistent with the present disclosure, and are used to explain the technical solutions of the present disclosure. It should be understood that the following drawings only show some of the embodiments of the present disclosure, and therefore should not be considered as a limitation to the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor.

[0064] Figure 1 A flow chart of a method for generating prompt information is shown according to some embodiments of the present disclosure;

[0065] Figure 2 A schematic diagram of generating display content is shown according to some embodiments of the present disclosure;

[0066] Figure 3 An architecture schematic diagram of a prompt information generation device is shown according to some embodiments of the present disclosure;

[0067] Figure 4 A structure schematic diagram of a computer device is shown according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0068] In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the following will combine the drawings in the embodiments of the present disclosure to make a clear and complete description of the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only some of the embodiments of the present disclosure, but not all the embodiments. The components of the embodiments of the present disclosure described and shown in the drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the claimed present disclosure, but only represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present disclosure.

[0069] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0070] The term "and / or" used in the present document only describes an association relationship, which means that three relationships can exist, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" in the present document means any one of a plurality or any combination of at least two of a plurality, for example, at least one of A, B, and C includes any one or more elements selected from the set consisting of A, B, and C.

[0071] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the type of personal information involved in the present disclosure, the use range, the use scenario, etc. should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.

[0072] For example, in response to receiving a user's active request, prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can voluntarily choose whether to provide personal information to the software or hardware such as an electronic device, an application program, a server, or a storage medium that performs the operation of the technical solution of the present disclosure according to the prompt information.

[0073] As an optional but non-limiting implementation manner, in response to receiving a user's active request, the manner of sending prompt information to the user may, for example, be a pop-up window manner, and the prompt information may be presented in the form of text in the pop-up window. In addition, the pop-up window may also carry selection controls for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0074] It can be understood that the above notification and user authorization process is only illustrative and does not limit the implementation manner of the present disclosure, and other manners that meet the relevant laws and regulations can also be applied to the implementation manner of the present disclosure.

[0075] It has been found through research that in order to make the generative model output high-quality generated content, accurate and detailed input prompt information prompt from the user is required, such as accurate and detailed description of the problem by the user in the question and answer scenario. However, the user often has difficulty in describing the problem to be asked in detail, so that the quality of the generated content output by the generative model needs to be improved. Therefore, how to solve the problem of poor quality of the generated content output by the content generation model due to the insufficient detail of the prompt information input by the user has become a problem to be solved in the field.

[0076] Based on the above research, the present disclosure provides a prompt information generation method and device, computer equipment and storage medium. By classifying the obtained initial prompt information, at least one intention category is obtained, and based on the prompt information generation strategy corresponding to each intention category, a plurality of screening prompt information under each intention category is generated. Further, the screening prompt information under each intention category is screened, and the obtained intermediate prompt information is returned as the initial prompt information to execute the steps of intention classification and prompt information generation. Thus, through the multi-round intention classification, prompt information generation and prompt information screening process, the target prompt information more in line with user needs can be obtained. In this way, compared with directly inputting the initial prompt information of the user into the generative model, through the multi-round intention classification, prompt information generation and prompt information screening process, the target prompt information describing more detailed and higher quality can be generated, so that based on the target prompt information, high-quality content meeting the user's needs can be further obtained.

[0077] To facilitate the understanding of the present embodiment, first, a prompt information generation method disclosed by the present embodiment is introduced in detail. The execution subject of the prompt information generation method provided by the present embodiment is generally a computer device with certain computing power, which may, for example, include a terminal device or a server or other processing device. The terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementation manners, the prompt information generation method can be realized by a processor calling computer readable instructions stored in a memory.

[0078] Referring to FIG. 1, Figure 1 The method provided by the present embodiment includes S101-S105, wherein:

[0079] S101: Obtain initial prompt information.

[0080] S102: Classify the initial prompt information by intention to obtain at least one intention category.

[0081] S103: Based on the prompt information generation strategy corresponding to each of the at least one intention category, generate a plurality of screening prompt information under each intention category.

[0082] S104: For each of the intent categories, intermediate prompt information is selected from the plurality of to-be-screened prompt information under the intent category, and the intermediate prompt information is returned as the initial prompt information to execute the above-mentioned intent classification step until the target prompt information meeting the preset prompt information requirement is obtained.

[0083] The following is a detailed introduction to the above steps.

[0084] For the initial prompt information acquisition process of S101:

[0085] Here, when acquiring the initial prompt information, the initial prompt information containing a question intention can be acquired in response to detecting a question and answer initiation operation, or the initial prompt information containing an image generation intention can be acquired in response to detecting an image generation operation; the question and answer initiation operation, image generation operation and the like can be initiated by the user by triggering the corresponding button, and the user can upload at least one form of data such as text, audio, image and the like representing the user's intention (such as question intention, image generation intention and the like) when initiating the operation, and the data uploaded by the user when initiating the operation can constitute the initial prompt information; the initial prompt information can be used as prompt information input to a generative model (such as a content generation model below) to enable the generative model to generate content according to the input prompt information, so as to input the generated content corresponding to the prompt information.

[0086] For the intent classification process of S102:

[0087] Here, the intent classification is used to identify the intent category of the initial prompt information, and the intent category can include categories such as instruction, fact, context reasoning, fill-in-the-blank, etc. When performing intent classification, at least one intent category of a preset category number can be obtained, and the preset category number can be 1, 3, 4, 5, etc.

[0088] In one possible implementation, when the initial prompt information is classified, the initial prompt information can be input into a pre-trained intent classification model to obtain an intent classification result containing a plurality of intent categories output by the intent classification model.

[0089] The intent classification model can be a neural network model with classification capability, and the network type of the intent classification model can be a convolutional neural network (CNN), a deep residual network (ResNet), a recurrent neural network (RNN), a Transformer model, or the like. When training the intent classification model, the sample prompt information can be input into the intent classification model to be trained to obtain a plurality of sample intent categories output by the intent classification model for the sample prompt information. Based on the difference information between the sample intent categories and the pre-labeled label intent categories corresponding to the sample prompt information, a loss value for training the intent classification model is determined, and the intent classification model is trained based on the determined loss value.

[0090] Specifically, the intent classification model can classify the input initial prompt information, determine the probability that the initial prompt information belongs to each preset intent category, and determine the intent categories of the preset number of categories with the highest probability from each preset intent category based on the determined probability and the preset number of categories.

[0091] Further, after the training of the intent classification model is completed, the real-time optimization can be performed through fine tuning and the like in the subsequent use process, and the specific process will be introduced below.

[0092] For the process of generating the to-be-screened prompt information of S103:

[0093] Here, the prompt information generation strategy is used to represent the way of generating prompt information, and the prompt information generation strategies under different intent categories can be different to adapt to different prompt information generation needs under different intent categories, so as to better generate prompt information under each intent category.

[0094] When generating the to-be-screened prompt information under each intent category, any one of the following ways can be used:

[0095] Method 1: generating the to-be-screened prompt information based on a prompt information generation model and a plurality of sets of model parameter information.

[0096] Here, for each of the intent categories, the initial prompt information can be input into the prompt information generation model corresponding to the multiple sets of model parameter information under the intent category, to generate multiple to-be-screened prompt information under each intent category, wherein the to-be-screened prompt information output by the prompt information generation model corresponding to different sets of model parameter information is different; the prompt information generation model can be a neural network model with content generation capability, such as an Artificial Intelligence Generated Content (AIGC) model, a Generative Pre-Trained Transformer (GPT), etc.; when training the prompt information generation model, a supervised training method can be used for training, and the supervision data used in the training process can be the score of the generated sample to-be-screened prompt information, or the label prompt information corresponding to the training data (sample prompt information). By determining the loss value for representing the difference between the sample to-be-screened prompt information corresponding to the training data and the supervision data, the prompt information generation model can be trained according to the loss value; further, after the prompt information generation model is trained, it can also be optimized in real time through fine tuning and other methods in the subsequent use process, and the specific process will be introduced below, and will not be expanded here.

[0097] Among them, a set of model parameter information can contain at least one target model parameter for changing the output result of the prompt information generation model, and the target model parameter can include a temperature value (Temperature) for regulating the randomness and creativity of the output result, a maximum text generation length (max tokens) for regulating the maximum length of the output text, and other hyperparameters; the parameter value of the target model parameter in each set of model parameter information in the multiple sets of model parameter information can be different. By setting multiple different sets of model parameter information, multiple to-be-screened prompt information under each intent category can be generated using the same prompt information generation model and the same initial prompt information, so as to perform subsequent screening and other processing steps according to the multiple to-be-screened prompt information, thereby finally obtaining target prompt information and target content that are more in line with the user's intent.

[0098] Method 2: Generating to-be-screened prompt information based on prompt information generation model and multiple prompt information optimization strategies.

[0099] Here, the prompt information optimization strategy can optimize the initial prompt information, for example, can include content expansion processing on the initial prompt information to improve the semantic richness of the initial prompt information, or can include semantic coherence processing on the initial prompt information, such as optimizing the context connection in the initial prompt information to improve the semantic coherence of the initial prompt information. By executing the prompt information optimization strategy, the input data quality input to the prompt information generation model can be higher, so that the to-be-screened prompt information obtained after the input data is processed by the prompt information generation model can be more in line with the user's intention.

[0100] Specifically, in generating the to-be-screened prompt information based on the prompt information generation model and the plurality of prompt information optimization strategies, the following steps A1-A2 can be performed:

[0101] A1: For each of the intent categories, the initial prompt information is optimized according to the plurality of prompt information optimization strategies corresponding to the intent category, to obtain a plurality of optimized prompt information.

[0102] The mapping relationship between the intent category and the prompt information optimization strategy can be pre-set.

[0103] Specifically, in optimizing the initial prompt information according to the plurality of prompt information optimization strategies corresponding to the intent category, the plurality of prompt information optimization strategies corresponding to the intent category can be determined according to the pre-set mapping relationship between the intent category and the prompt information optimization strategy, and then the initial prompt information is optimized based on the determined plurality of prompt information optimization strategies, to obtain a plurality of optimized prompt information.

[0104] A2: The plurality of optimized prompt information is input into the pre-trained prompt information generation model to generate a plurality of to-be-screened prompt information under the intent category; wherein the to-be-screened prompt information corresponding to different optimized prompt information is different.

[0105] Further, after obtaining the plurality of optimized prompt information, the plurality of optimized prompt information can be input into the pre-trained prompt information generation model to generate a plurality of to-be-screened prompt information under the intent category.

[0106] In this way, the plurality of to-be-screened prompt information under each intent category can be obtained through the above steps, so that subsequent screening and other processing steps can be performed according to the plurality of to-be-screened prompt information, so as to finally obtain target prompt information and target content more in line with the user's intention.

[0107] The generation process of the target prompt information of S104 is as follows:

[0108] In a possible implementation, for each of the intent categories, when the intermediate prompt information is screened from the plurality of to-be-screened prompt information under the intent category, the following steps B1-B2 can be used:

[0109] B1: For each of the intent categories, the plurality of to-be-screened prompt information under the intent category is sequentially input into the pre-trained prompt information scoring model, to obtain the prompt score corresponding to each to-be-screened prompt information.

[0110] Here, the prompt score is used to represent the matching degree of the to-be-screened prompt information and the user intent, and the higher the prompt score is, the higher the matching degree of the corresponding to-be-screened prompt information and the user intent is. The prompt information scoring model is used to score the input to-be-screened prompt information. The prompt information scoring model can be a neural network model with scoring capability, and the network type of the prompt information scoring model can be a convolutional neural network (CNN), a deep residual network (ResNet), a recurrent neural network (RNN), a Transformer model, or the like. When the prompt information scoring model is trained, the sample to-be-screened prompt information is input into the to-be-trained prompt information scoring model, to obtain the sample prompt score output by the prompt information scoring model for the sample to-be-screened prompt information. Based on the difference between the sample prompt score and the pre-labeled label prompt score corresponding to the sample to-be-screened prompt information, a loss value for training the prompt information scoring model is determined. The prompt information scoring model can be trained based on the determined loss value.

[0111] B2: According to the prompt score corresponding to each to-be-screened prompt information, a preset number of intermediate prompt information under each of the intent categories is screened.

[0112] Here, the preset number can be 1, 2, or the like.

[0113] Specifically, when the preset number of intermediate prompt information under each of the intent categories is screened according to the prompt score corresponding to each to-be-screened prompt information, the preset number of intermediate prompt information with the highest score can be screened from the to-be-screened prompt information according to the prompt score corresponding to each to-be-screened prompt information.

[0114] For example, if the preset number is 1, the to-be-screened prompt information under the intent category "intent category 1" is to-be-screened prompt information 1-3, and the corresponding prompt scores of the to-be-screened prompt information 1-3 are 75, 80, and 90, respectively, the to-be-screened prompt information 3 with the highest corresponding prompt score can be used as the intermediate prompt information under the "intent category 1".

[0115] Further, the model for generating the target prompt information can be further optimized and adjusted through steps C1-C2 as follows:

[0116] C1: generating target training data based on the intermediate prompt information and the corresponding prompt score thereof.

[0117] C2: optimizing and adjusting the model for generating the target prompt information based on the target training data; wherein the model for generating the target prompt information includes an intent classification model for performing the intent classification, a prompt information generation model for generating the to-be-screened prompt information, and the prompt information scoring model.

[0118] Here, after the intermediate prompt information is obtained by screening the to-be-screened prompt information, the intermediate prompt information and the corresponding prompt score thereof can be used as positive sample data for training the intent classification model, the prompt information generation model, and the prompt information scoring model; in addition, negative sample data for training the intent classification model, the prompt information generation model, and the prompt information scoring model can also be generated based on other prompt information in the to-be-screened prompt information except the intermediate prompt information and the corresponding prompt score of the other prompt information.

[0119] Specifically, when the model for generating the target prompt information is optimized and adjusted based on the target training data, the network parameters of the above multiple models can be fine-tuned through a back propagation model parameter adjustment strategy, so as to realize the synchronous update of the above multiple models.

[0120] In actual applications, the step of optimizing and adjusting the model for generating the target prompt information can be executed in real time when the target prompt information is generated, such as after the intermediate prompt information is generated, the step of optimizing and adjusting can be executed to process the intermediate prompt information as the initial prompt information based on the model that is optimized and adjusted, so that the model that is optimized and adjusted can be used to continue the generation and processing steps of the intermediate prompt information until the target prompt information is obtained; or the step of optimizing and adjusting the model for generating the target prompt information can be executed according to a preset optimization and adjustment period, and a few-shot or other small sample learning method can be used to optimize and adjust the model for generating the target prompt information when the optimization and adjustment is performed. The optimization and adjustment period can be, for example, one week or one month, that is, the model can be optimized and adjusted according to the steps C1-C2 above after one week or one month from the last optimization and adjustment, so as to realize timely updating of the model.

[0121] In a possible implementation, for each of the intent categories, the step of returning the intermediate prompt information as the initial prompt information to execute the intent classification until the target prompt information that meets the preset prompt information requirement is obtained can be performed by the following steps D1-D2:

[0122] D1: For each of the intent categories, the intermediate prompt information corresponding to the intent category is returned as the initial prompt information to execute the classification processing until the number of returned executions reaches a target execution number.

[0123] The target execution number is determined based on an accuracy requirement corresponding to the initial prompt information and / or an intent category of the initial prompt information.

[0124] Specifically, the accuracy requirement can be selected by a user when initiating the question and answer initiation operation, and the target execution number can be positively correlated with the accuracy requirement, that is, the higher the accuracy requirement, the more the target execution number can be. The mapping relationship between the intent category of the initial prompt information and the execution number can be preset. When setting the mapping relationship between the execution number and the intent category, the semantic understanding complexity corresponding to the intent category can be set. For an intent category with high semantic understanding complexity, a higher execution number can be set to obtain a target prompt information that is easy for the model to understand through more rounds of processing, and for an intent category with low semantic understanding complexity, a lower execution number can be set to improve the generation efficiency of the target prompt information.

[0125] It should be noted that the parameters used to determine the target execution times above are only part of the parameters that can determine the target execution times, and in actual application, at least one of various parameters such as user selection instructions and specific task requirements can be combined to determine the target execution times, and the embodiments of the present disclosure do not limit how to determine the target execution times.

[0126] D2: Among the intermediate prompt information obtained after the target execution times, the intermediate prompt information meeting the preset prompt information requirement is taken as the target prompt information.

[0127] Here, the intermediate prompt information meeting the preset filtering condition can be the intermediate prompt information with the highest corresponding prompt score, so that the intermediate prompt information with the highest prompt score generated after multiple rounds of processing can be taken as the target prompt information.

[0128] Further, after obtaining the target prompt information, the target prompt information can also be input into a pre-trained content generation model to obtain the target content corresponding to the target prompt information output by the content generation model.

[0129] Here, the content generation model can be a neural network model with content generation capability, such as an Artificial Intelligence Generated Content (AIGC) model, a Generative Pre-Trained Transformer (GPT) model, etc. The training process of the content generation model can refer to the training process of the prompt information generation model described above, which will not be repeated here. The content generation model used specifically can be a selected content generation model from a plurality of pre-set candidate content generation models. The content generation model can be a picture generation model for generating picture content according to input prompt information, a question and answer model for generating text content according to input prompt information, etc. Taking the content generation model as a question and answer model as an example, different candidate question and answer models can be used to answer questions in different industries (or fields). After the content generation model generates the target content, the generated target content can be subjected to content verification, and if the content verification is passed, the corresponding target content is used, and if the content verification is not passed, different target content can be generated by using the content generation model again and the content verification is continued until the target content that passes the content verification is obtained. The content verification can include content accuracy verification, sensitive content verification, etc.

[0130] Specifically, in the step of inputting the target prompt information into the pre-trained content generation model, the target prompt information under each intent category (i.e., the prompt information with the highest prompt score) can be sequentially input into the content generation model to obtain the generated content under each intent category, and the generated content under each intent category can constitute the target content; or, the target prompt information with the highest prompt score (the score is globally highest at this time) can be determined from the target prompt information under each intent category, and the determined target prompt information with the highest prompt score can be input into the content generation model to obtain the target content corresponding to the target prompt information with the highest prompt score.

[0131] Further, the answer display content for display can also be generated through the following steps E1-E2:

[0132] E1: inputting the initial prompt information into the content generation model to obtain initial content corresponding to the initial prompt information.

[0133] Here, the initial prompt information is not subjected to the processing of steps S102-S104, and inputting the initial prompt information into the content generation model can obtain the initial content corresponding to the initial prompt information without processing.

[0134] E2: generating display content for display based on the initial content and the target content.

[0135] When generating the display content for display, any one of the following methods can be used:

[0136] Method 1: performing fusion processing based on the initial content and the target content to generate display content containing the initial content and the target content.

[0137] Here, when performing fusion processing based on the initial content and the target content, similar content in the initial content and the target content can be determined, and the first content in the initial content excluding the similar answer content, the second content in the target content excluding the similar content, and the similar content can be taken as the display content, so that the similar content in the initial content and the target content can be de-duplicated when performing fusion processing, and the generated display content can avoid repeated content, thereby improving the information acquisition efficiency of the user when browsing the display content.

[0138] For example, when the content types of the initial content and the target content are text content, the initial content and the target content can be subjected to sentence segmentation processing to obtain multiple pieces of initial text content and multiple pieces of target text content. Then, according to the text semantic similarity between each piece of initial text content and each piece of target text content, the initial text content and the target text content with a text semantic similarity higher than a preset similarity threshold are determined as the similar content in the initial content and the target content.

[0139] In this way, by performing fusion processing on the initial content and the target content, the display content containing the initial content and the target content is generated. Compared with displaying only the initial content or only the target content, more rich display content can be displayed, and by fusion processing, the repeated parts in the initial content and the target content can be filtered, thereby improving the information acquisition efficiency and browsing experience of the user when browsing the display content.

[0140] Option 2: determining display content meeting preset display content requirements from the initial content and the target content based on the comparison result of the initial content and the target content.

[0141] Here, the preset display content requirements can include requirements for the number of words of the display content, requirements for the completeness of the display content, requirements for the display content meeting the user style, and the like. The preset display content requirements can be set by the user in advance.

[0142] The requirement of the number of words of the display content may be, for example, selecting content with more words as the display content based on the comparison result of the initial content and the target content. The requirement of the completeness of the display content may be, for example, selecting content with higher completeness as the display content based on the comparison result of the initial content and the target content. The completeness may be determined based on a pre-trained completeness prediction model. The initial content and the initial prompt information are input into the completeness prediction model, and the completeness prediction result of the content to be predicted is obtained from the output of the completeness prediction model. The network type and training method of the completeness prediction model may refer to the description of the related network model above, and will not be described here. The requirement that the display content conforms to the user style may be, for example, selecting content with higher user style matching degree as the display content based on the comparison result of the initial content and the target content. The user style matching degree may be determined based on a pre-trained user style matching degree prediction model. Each content (initial content and target content) is input into the user style matching degree prediction model in turn, and the user style matching degree prediction result of each content is obtained from the output of the user style matching degree prediction model. The network type of the user style matching degree prediction model may refer to the description above. When training the user style matching degree prediction model, the content matching the user style of the current user may be used as training data to train the user style matching degree prediction model, so that the user style matching degree prediction model can learn the user style to predict the matching degree of the generated content and the user style.

[0143] The prompt information generation method provided by the embodiments of the present disclosure will be introduced below with reference to the accompanying drawings. The schematic diagram of generating display content provided by the embodiments of the present disclosure may be as shown in Figure 2 Figure 2 The method may include the following steps:

[0144] Step 1, obtaining initial prompt information.

[0145] Step 2, classifying the initial prompt information according to the intent to obtain multiple intent categories.

[0146] Step 3, generating multiple to-be-screened prompt information under each intent category.

[0147] Step 4, scoring each to-be-screened prompt information based on a pre-trained prompt information scoring model.

[0148] Step 5, screening each to-be-screened prompt information according to the prompt score, and returning the screened intermediate prompt information as the initial prompt information to execute N times, where N is the target execution number.

[0149] ​Step 6, among the intermediate prompt information obtained after the target execution times, intermediate prompt information meeting a preset screening condition is taken as target prompt information, and the target prompt information is input into a content generation model to obtain target content.

[0150] Step 7, based on the target content and initial content corresponding to the initial prompt information, display content corresponding to the initial prompt information is determined.

[0151] Specifically, the specific description of the above steps can refer to the related content in the foregoing description, and will not be repeated here.

[0152] The prompt information generation method provided by the embodiments of the present disclosure can obtain at least one intention category by performing intention classification on the obtained initial prompt information, generate a plurality of to-be-screened prompt information under each intention category based on the prompt information generation strategy corresponding to each intention category, further screen the to-be-screened prompt information under each intention category, and return the obtained intermediate prompt information as the initial prompt information to perform the steps of intention classification and prompt information generation, so that more target prompt information meeting the user's demand can be obtained through the processing process of multiple rounds of intention classification, prompt information generation and prompt information screening. In this way, compared with directly inputting the initial prompt information of the user into the generative model, the target prompt information describing more detailed and higher quality can be generated through the processing process of multiple rounds of intention classification, prompt information generation and prompt information screening, so that high-quality content meeting the user's demand can be further obtained based on the target prompt information.

[0153] Those skilled in the art can understand that in the above method of the specific embodiment, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process, and the specific execution order of each step should be determined by its function and possible internal logic.

[0154] Based on the same inventive concept, the embodiments of the present disclosure also provide a prompt information generation device corresponding to the prompt information generation method. Since the principle of solving problems of the device in the embodiments of the present disclosure is similar to the above-mentioned prompt information generation method, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be repeated.

[0155] Referring to Figure 3 Fig. 1 shows an architecture schematic diagram of a prompt information generation device provided by the embodiments of the present disclosure, and the device comprises an acquisition module 301, a classification module 302, a generation module 303 and a screening module 304, wherein,

[0156] The acquisition module 301 is configured to acquire initial prompt information.

[0157] The classification module 302 is configured to perform intent classification on the initial prompt information to obtain at least one intent category.

[0158] The generation module 303 is configured to generate a plurality of to-be-screened prompt information in each intent category based on a prompt information generation strategy corresponding to the at least one intent category.

[0159] The screening module 304 is configured to screen intermediate prompt information from the plurality of to-be-screened prompt information in each intent category, and return the intermediate prompt information as the initial prompt information to perform the above-mentioned intent classification step until target prompt information meeting a preset prompt information requirement is obtained.

[0160] In a possible implementation, when the generation module 303 generates a plurality of to-be-screened prompt information in each intent category based on a prompt information generation strategy corresponding to the at least one intent category, the generation module 303 is configured to:

[0161] For each intent category, the initial prompt information is input into a prompt information generation model corresponding to a plurality of sets of model parameter information in the intent category to generate a plurality of to-be-screened prompt information in the intent category, wherein the to-be-screened prompt information output by the prompt information generation model corresponding to different sets of model parameter information is different.

[0162] In a possible implementation, when the generation module 303 generates a plurality of to-be-screened prompt information in each intent category based on a prompt information generation strategy corresponding to the at least one intent category, the generation module 303 is configured to:

[0163] For each intent category, the initial prompt information is processed according to a plurality of prompt information optimization strategies corresponding to the intent category to obtain a plurality of optimized prompt information.

[0164] The plurality of optimized prompt information is input into a pre-trained prompt information generation model to generate a plurality of to-be-screened prompt information in the intent category, wherein the to-be-screened prompt information corresponding to different optimized prompt information is different.

[0165] In a possible implementation, when the screening module 304 screens intermediate prompt information from the plurality of to-be-screened prompt information in each intent category, the screening module 304 is configured to:

[0166] For each intent category, the plurality of to-be-screened prompt information in the intent category is input into a pre-trained prompt information scoring model in sequence to obtain a prompt score corresponding to each to-be-screened prompt information.

[0167] According to the prompt scores corresponding to the to-be-screened prompt information, intermediate prompt information of a preset number under each of the intent categories is screened out.

[0168] In a possible implementation, before returning the intermediate prompt information as the initial prompt information to execute the above-mentioned intent classification, the generation module 303 is further configured to:

[0169] generate target training data based on the intermediate prompt information and the prompt scores corresponding to the intermediate prompt information;

[0170] optimize and adjust a model used to generate the target prompt information based on the target training data, so as to process the intermediate prompt information as the initial prompt information based on the model after the optimization and adjustment; wherein the model used to generate the target prompt information includes an intent classification model used to perform the intent classification, a prompt information generation model used to generate the to-be-screened prompt information, and the prompt information scoring model.

[0171] In a possible implementation, for the screening module 304, when the intermediate prompt information is obtained for each of the intent categories, the step of returning the intermediate prompt information as the initial prompt information to execute the above-mentioned intent classification is performed until the target prompt information meeting the preset prompt information requirement is obtained.

[0172] for each of the intent categories, the step of returning the intermediate prompt information corresponding to the intent category as the initial prompt information to execute the above-mentioned classification processing is performed until the number of times of returning execution reaches a target number of times of execution; wherein the target number of times of execution is determined based on an accuracy requirement corresponding to the initial prompt information and / or an intent category of the initial prompt information.

[0173] the intermediate prompt information meeting the preset prompt information requirement obtained after the target number of times of execution is taken as the target prompt information.

[0174] In a possible implementation, the generation module 303 is further configured to:

[0175] input the target prompt information into a pre-trained content generation model to obtain target content corresponding to the target prompt information output by the content generation model.

[0176] In a possible implementation, the generation module 303 is further configured to:

[0177] input the initial prompt information into the content generation model to obtain initial content corresponding to the initial prompt information;

[0178] generate the display content for display based on the initial content and the target content.

[0179] In a possible implementation, the generating module 303, when generating the display content for display based on the initial content and the target content, is configured to:

[0180] perform fusion processing based on the initial content and the target content to generate the display content containing the initial content and the target content; or

[0181] determine the display content meeting a preset display content requirement from the initial content and the target content based on a comparison result of the initial content and the target content.

[0182] The prompt information generation apparatus provided by the embodiments of the present disclosure can obtain at least one intention category by performing intention classification on the obtained initial prompt information, generate a plurality of to-be-screened prompt information under each intention category based on the prompt information generation strategy corresponding to each intention category, further perform screening processing on the to-be-screened prompt information under each intention category, and return the obtained intermediate prompt information as the initial prompt information to perform the steps of intention classification and prompt information generation, so that more target prompt information meeting the user demand can be obtained through the processing process of multiple rounds of intention classification, prompt information generation, and prompt information screening. In this way, compared with directly inputting the initial prompt information of the user into the generative model, the target prompt information describing more detailed and higher quality can be generated through the processing process of multiple rounds of intention classification, prompt information generation, and prompt information screening, so that the high-quality content meeting the user demand can be further obtained based on the target prompt information.

[0183] The description of the processing flow of each module in the apparatus and the interaction flow between the modules can refer to the related description in the method embodiments, and will not be described in detail here.

[0184] Based on the same technical concept, the embodiments of the present disclosure also provide a computer device. Referring to FIG. 4, Figure 4 As shown in FIG. 4, the structure schematic diagram of the computer device 400 provided by the embodiments of the present disclosure includes a processor 401, a memory 402, and a bus 403. The memory 402 is used to store execution instructions, including an internal memory 4021 and an external memory 4022; the internal memory 4021 is also called an internal storage, and is used to temporarily store operation data in the processor 401 and exchange data with the external memory 4022 such as a hard disk, the processor 401 exchanges data with the external memory 4022 through the internal memory 4021, and when the computer device 400 is running, the processor 401 and the memory 402 communicate through the bus 403, so that the processor 401 executes the following instructions:

[0185] obtaining initial prompt information;

[0186] performing intent classification on the initial prompt information to obtain at least one intent category;

[0187] generating a plurality of to-be-screened prompt information under each intent category based on a prompt information generation strategy corresponding to the at least one intent category;

[0188] screening intermediate prompt information from the plurality of to-be-screened prompt information under each intent category, and returning the intermediate prompt information as the initial prompt information to perform the step of intent classification until target prompt information meeting preset prompt information requirements is obtained.

[0189] In a possible implementation, the instructions of the processor 401 include that the generating a plurality of to-be-screened prompt information under each intent category based on a prompt information generation strategy corresponding to the at least one intent category includes:

[0190] inputting the initial prompt information into a prompt information generation model corresponding to a plurality of groups of model parameter information under each intent category to generate a plurality of to-be-screened prompt information under each intent category, where the to-be-screened prompt information output by the prompt information generation model corresponding to different groups of model parameter information is different.

[0191] In a possible implementation, the instructions of the processor 401 include that the generating a plurality of to-be-screened prompt information under each intent category based on a prompt information generation strategy corresponding to the at least one intent category includes:

[0192] performing optimization processing on the initial prompt information according to a plurality of prompt information optimization strategies corresponding to each intent category to obtain a plurality of optimized prompt information;

[0193] inputting the plurality of optimized prompt information into a pre-trained prompt information generation model to generate a plurality of to-be-screened prompt information under the intent category, where the to-be-screened prompt information corresponding to different optimized prompt information is different.

[0194] In a possible implementation, the instructions of the processor 401 include that the screening intermediate prompt information from the plurality of to-be-screened prompt information under each intent category includes:

[0195] inputting the plurality of to-be-screened prompt information under each intent category into a pre-trained prompt information scoring model in sequence to obtain a prompt score corresponding to each to-be-screened prompt information;

[0196] According to the prompt scores corresponding to the to-be-screened prompt information, intermediate prompt information of a preset number under each of the intent categories is screened out.

[0197] In a possible implementation, before returning the intermediate prompt information as the initial prompt information to execute the above-mentioned intent classification, the instructions of the processor 401 further include:

[0198] Based on the intermediate prompt information and the prompt scores corresponding thereto, target training data is generated.

[0199] Based on the target training data, a model used to generate the target prompt information is adjusted and optimized, so as to process the intermediate prompt information as the initial prompt information based on the model after the adjustment and optimization; wherein the model used to generate the target prompt information includes an intent classification model used to perform the intent classification, a prompt information generation model used to generate the to-be-screened prompt information, and the prompt information scoring model.

[0200] In a possible implementation, before returning the intermediate prompt information as the initial prompt information to execute the above-mentioned intent classification, the instructions of the processor 401 further include:

[0201] For each of the intent categories, the intermediate prompt information corresponding to the intent category is returned as the initial prompt information to execute the above-mentioned classification processing until the number of times of returning execution reaches a target number of times of execution; wherein the target number of times of execution is determined based on an accuracy requirement corresponding to the initial prompt information and / or an intent category of the initial prompt information.

[0202] The intermediate prompt information that meets the preset prompt information requirement from the intermediate prompt information obtained after the target number of times of execution is taken as the target prompt information.

[0203] In a possible implementation, the instructions of the processor 401 further include:

[0204] The target prompt information is input into a pre-trained content generation model to obtain target content corresponding to the target prompt information output by the content generation model.

[0205] In a possible implementation, the instructions of the processor 401 further include:

[0206] The initial prompt information is input into the content generation model to obtain initial content corresponding to the initial prompt information.

[0207] generate, based on the initial content and the target content, a display content for display.

[0208] In a possible implementation, the instructions of the processor 401 include that the generating, based on the initial content and the target content, a display content for display comprises:

[0209] performing fusion processing based on the initial content and the target content to generate a display content containing the initial content and the target content; or

[0210] determining, based on a comparison result of the initial content and the target content, a display content meeting a preset display content requirement from the initial content and the target content.

[0211] The embodiments of the present disclosure further provide a computer-readable storage medium, which stores a computer program. The computer program is run by a processor to perform the steps of the prompt information generation method described in the above method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0212] The embodiments of the present disclosure further provide a computer program product, which carries a program code. The instructions included in the program code can be used to perform the steps of the prompt information generation method described in the above method embodiments. For details, refer to the above method embodiments, which will not be described here.

[0213] The computer program product can be specifically implemented by means of hardware, software or a combination thereof. In an optional embodiment, the computer program product is specifically embodied as a computer storage medium. In another optional embodiment, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.

[0214] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system and device can refer to the corresponding process in the foregoing method embodiments, which will not be described here. In the several embodiments provided by the present disclosure, it should be understood that the disclosed system, device and method can be implemented by other ways. The above-described device embodiments are only schematic, for example, the division of the units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection between each other can be indirect coupling or communication connection through some communication interfaces, devices or units, and can be electrical, mechanical or other forms.

[0215] The units described as separate components may or may not be physically separate. 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.

[0216] In addition, the functional units in the various embodiments of this disclosure 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.

[0217] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion 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.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. 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.

[0218] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A method for generating prompt information, characterized in that, include: Get the initial prompt information; The initial prompt information is classified into at least two intent categories. Based on the prompt information generation strategy corresponding to the at least two intent categories, generate multiple prompt information to be filtered under each intent category; The prompt information generation strategy is used to characterize the way prompt information is generated, and the prompt generation strategy is different for different intent categories; For each intent category, intermediate prompts are selected from multiple prompts to be filtered under that intent category, and the intermediate prompts are used as the initial prompts to return to the intent classification step until the target prompts that meet the preset prompts requirements are obtained. The target prompt information is input into a pre-trained content generation model to obtain the target content output by the content generation model that corresponds to the target prompt information.

2. The method according to claim 1, characterized in that, The strategy for generating prompt information based on the at least two intent categories generates multiple prompt messages to be filtered under each intent category, including: For each intent category, the initial prompt information is input into the prompt information generation model corresponding to multiple sets of model parameter information under that intent category to generate multiple prompt information to be filtered under each intent category. The prompt information to be filtered output by the prompt information generation model corresponding to different sets of model parameter information is different.

3. The method according to claim 1, characterized in that, The strategy for generating prompt information based on the at least two intent categories generates multiple prompt messages to be filtered under each intent category, including: For each intent category, the initial prompt information is optimized according to various prompt information optimization strategies corresponding to that intent category to obtain multiple optimized prompt information; The multiple optimized prompts are input into a pre-trained prompt generation model to generate multiple prompts to be filtered under the intent category; wherein, the prompts to be filtered are different for different optimized prompts.

4. The method according to claim 1, characterized in that, For each intent category, the step of filtering intermediate prompts from multiple prompts to be filtered under that intent category includes: For each intent category, multiple prompts to be filtered under that intent category are sequentially input into a pre-trained prompt scoring model to obtain the prompt score corresponding to each prompt. Based on the prompt scores corresponding to each prompt message to be filtered, a preset number of intermediate prompt messages are selected under each intent category.

5. The method according to claim 4, characterized in that, Before returning the intermediate prompt information as the initial prompt information to perform the above intent classification step, the method further includes: Based on the intermediate prompt information and its corresponding prompt score, target training data is generated; Based on the target training data, the model used to generate the target prompt information is optimized and adjusted, so as to process the intermediate prompt information, which serves as the initial prompt information, based on the optimized and adjusted model; wherein, the model used to generate the target prompt information includes: an intent classification model for performing intent classification, a prompt information generation model for generating the prompt information to be filtered, and a prompt information scoring model.

6. The method according to claim 1, characterized in that, For each intent category, intermediate prompts are selected from multiple prompts to be filtered under that intent category, and these intermediate prompts are used as the initial prompts to be returned to the intent classification step until a target prompt that meets the preset prompt requirements is obtained, including: For each intent category, the intermediate prompt information corresponding to that intent category is used as the initial prompt information to return and execute the above classification processing steps until the number of times the return execution reaches the target number of executions; wherein, the target number of executions is determined based on the accuracy requirement corresponding to the initial prompt information and / or the intent category of the initial prompt information; The intermediate prompts that meet the preset prompt requirements will be selected from the intermediate prompts obtained after the target number of executions and will be used as the target prompts.

7. The method according to claim 1, characterized in that, The method further includes: The initial prompt information is input into the content generation model to obtain the initial content corresponding to the initial prompt information; Based on the initial content and the target content, display content is generated for presentation.

8. The method according to claim 7, characterized in that, The step of generating display content based on the initial content and the target content includes: The initial content and the target content are fused together to generate the display content that includes both the initial content and the target content; or, Based on the comparison results between the initial content and the target content, the display content that meets the preset display content requirements is determined from the initial content and the target content.

9. A notification information generation device, characterized in that, include: The acquisition module is used to obtain the initial prompt information; The classification module is used to classify the initial prompt information into intent categories, resulting in at least two intent categories; The generation module is used to generate multiple prompt messages to be filtered under each intent category based on the prompt message generation strategy corresponding to the at least two intent categories respectively; The prompt information generation strategy is used to characterize the way prompt information is generated, and the prompt generation strategy is different for different intent categories; The filtering module is used to filter out intermediate prompts from multiple prompts to be filtered under each intent category, and return the intermediate prompts as the initial prompts to the intent classification step until the target prompts that meet the preset prompts requirements are obtained. The generation module is further configured to input the target prompt information into a pre-trained content generation model to obtain the target content output by the content generation model corresponding to the target prompt information.

10. A computer device, characterized in that, include: The computer device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the prompt message generation method as described in any one of claims 1 to 8 are performed.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the prompt message generation method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Input prompting method and device for question-answering robot

    CN110765247A

  • Inquiry session processing method and device based on artificial intelligence, and computer equipment

    CN112307168A

  • Image generation method and device, electronic equipment and storage medium

    CN116580408A