Method and device for determining cue word, equipment and storage medium
By providing prompt word templates and customization options in the interactive area, users can customize prompt words according to task type, solving the problem that prompt word quality depends on user input accuracy in the prior art, and improving the quality of responses and user experience.
Patent Information
- Application Number
- CN202480002159.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2024-12-10
AI Technical Summary
In the prior art, the application directly determines the prompt word based on user input, resulting in the quality of the prompt word being affected by the accuracy of the user input, and the user needs to adjust multiple times to obtain a satisfactory response, which increases the difficulty of the user inputting the prompt word and generates the response. accuracy.
Provided is a method and device that by presenting interactive areas matching the task type, including a data input box and a prompt word template, the user can customize the attributes of the prompt word to generate a prompt word that is more in line with the needs.
It reduces the difficulty of users entering prompt words, improves the quality of prompt words and the accuracy of responses, simplifies the user-defined process, and improves the quality of model-generated responses.
Smart Images

Figure CN119110936A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to cue word management, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for determining cue words. Background Art
[0002] With the development of information technology, various terminal devices can provide various services to people in work and life. Applications that provide services can be deployed in terminal devices. The terminal device presents corresponding content and interacts with users through the user interface of the application to meet various needs of users. In some cases, the application can use a model to perform tasks. For example, the application can determine the prompt words (prompt) to be provided to the model based on the interaction with the user. The application can provide the determined prompt words to the model so that the model outputs a response to the prompt words. The application can obtain the response output by the model and provide the response to the user. The quality of the prompt words will directly affect the quality of the response generated by the model. Therefore, how to improve the quality of the prompt words is a problem that people are concerned about. Summary of the invention
[0003] In a first aspect of the present disclosure, a method for determining a prompt word is provided. The method comprises: in response to receiving a first interaction request for specifying a type of a task to be performed, presenting an interaction area matching the type, the interaction area comprising: a data input box for inputting data to be processed; and a prompt word template matching the type, the prompt word template specifying multiple attributes of a prompt word for performing the task; and in response to receiving a second interaction request for the interaction area, generating a prompt word for performing the task.
[0004] In a second aspect of the present disclosure, a device for determining a prompt word is provided. The device includes: an interaction area presentation module, configured to present an interaction area matching the type in response to receiving a first interaction request for specifying the type of a task to be performed, the interaction area including: a data input box for inputting data to be processed; and a prompt word template matching the type, the prompt word template specifying multiple attributes of a prompt word for performing the task; and a prompt word generation module, configured to generate a prompt word for performing the task in response to receiving a second interaction request for the interaction area.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device performs the method of the first aspect of the present disclosure.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect of the present disclosure.
[0007] In a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the method of the first aspect of the present disclosure when executed by a processor.
[0008] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;
[0011] FIG. 2A to FIG. 2H A schematic diagram showing an example page according to some embodiments of the present disclosure;
[0012] Figure 3 A flowchart of a process for determining a prompt word according to some embodiments of the present disclosure is shown;
[0013] Figure 4 A block diagram showing an apparatus for determining a prompt word according to some embodiments of the present disclosure; and
[0014] Figure 5 A block diagram of an electronic device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION
[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0016] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.
[0017] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0018] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0019] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0020] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that execute operations of the technical solution of the present disclosure based on the prompt message.
[0021] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0022] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0023] As used herein, the term "model" can learn the association between the corresponding input and output from the training data, so that after the training is completed, the corresponding output can be generated for a given input. The generation of the model can be based on machine learning technology. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multi-layer processing units. A neural network model is an example of a model based on deep learning. In this article, "model" may also be referred to as "machine learning model", "learning model", "machine learning network" or "learning network", and these terms are used interchangeably in this article.
[0024] A "neural network" is a machine learning network based on deep learning. A neural network is capable of processing inputs and providing corresponding outputs, and typically includes an input layer and an output layer and one or more hidden layers between the input layer and the output layer. Neural networks used in deep learning applications typically include many hidden layers, thereby increasing the depth of the network. The layers of a neural network are connected in sequence so that the output of the previous layer is provided as input to the next layer, where the input layer receives the input of the neural network and the output of the output layer serves as the final output of the neural network. Each layer of a neural network includes one or more nodes (also called processing nodes or neurons), each of which processes input from the previous layer.
[0025] Generally, machine learning can be roughly divided into three stages, namely the training stage, the testing stage, and the application stage (also called the inference stage). In the training stage, a given model can be trained using a large amount of training data, and the parameter values are continuously updated iteratively until the model can obtain consistent inferences that meet the expected goals from the training data. Through training, the model can be considered to be able to learn the association between input and output (also called input-to-output mapping) from the training data. The parameter values of the trained model are determined. In the testing stage, the test input is applied to the trained model to test whether the model can provide the correct output, thereby determining the performance of the model. The testing stage can sometimes be integrated into the training stage. In the application or inference stage, the trained model can be used to process the actual model input based on the parameter values obtained through training to determine the corresponding model output.
[0026] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. The environment 100 involves a terminal device 110. In the example environment 100, the terminal device 110 is installed with an application 115 (it can be understood that although only one application 115 is shown in the figure, there can actually be multiple applications 115). The application 115 can be any appropriate application that can provide a conversational service. The user 140 can interact with the application 115 via the terminal device 110 and / or an attached device of the terminal device 110.
[0027] Application 115 can provide conversational services to users with the help of model 120. Model 120 can be deployed locally on terminal device 110, or can be deployed on other electronic devices (e.g., server 130). Model 120 can be a machine learning model, a deep learning model, a learning model, a neural network, etc. In some embodiments, the model can be based on a language model (LM). The language model can have question-answering capabilities by learning from a large amount of corpus. Model 120 can also be based on any other appropriate model.
[0028] exist Figure 1 In the environment 100 of FIG. 1 , if the application 115 is active, the terminal device 110 may present a page 150 of the application 115. The terminal device 110 may present the page 150 to the user 140 based on the operation of the user 140 to output information to the user 140 and / or receive information from the user 140. The page 150 may be, for example, an interactive page. The terminal device 110 may receive a user input from the user 140 via the page 150, and present the response to the user input determined by the model 120 in the page 150.
[0029] In some embodiments, the terminal device 110 communicates with the server 130 to realize the supply of services for the application 115. The terminal device 110 can be any type of mobile terminal, fixed terminal or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication systems (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio broadcast receivers, e-book devices, gaming devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the terminal device 110 can also support any type of interface for the user (such as "wearable" circuits, etc.). The server 130 can be various types of computing systems / servers that can provide computing power, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, and the like.
[0030] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.
[0031] As mentioned above, the application can, for example, determine the prompt words to be provided to the model based on the interaction with the user. The application can provide the determined prompt words to the model so that the model outputs a response to the prompt words. The application can obtain the response output by the model and provide the response to the user. The quality of the prompt words will directly affect the quality of the response generated by the model. Traditionally, applications often determine the prompt words directly based on the received user input. The quality of the prompt words will be affected by the user input. If the user input is not accurate enough, the accuracy of the response generated by the model based on the prompt words may be poor, which may not meet the user's expectations. The user may need to adjust the user input multiple times to obtain a satisfactory response.
[0032] In view of this, according to an embodiment of the present disclosure, an improved scheme for determining prompt words based on enhanced input is provided. In summary, a prompt word template can be provided to enhance the convenience of user prompt words, so as to facilitate users to refine prompt words from multiple aspects, thereby determining prompt words that better meet their own needs. According to the scheme, in response to receiving a first interaction request for specifying the type of task to be performed, an interaction area matching the type is presented. The interaction area includes a data input box for inputting data to be processed and a prompt word template matching the type, and the prompt word template specifies multiple attributes of the prompt word for performing the task. In response to receiving a second interaction request for the interaction area, a prompt word for performing the task is generated.
[0033] Thus, the user can customize prompt words conveniently and quickly, reduce the difficulty of the user inputting prompt words, improve the quality of the generated prompt words, and thus improve the quality of the answer. Some example embodiments of the present disclosure will be described in detail below with reference to the examples of the accompanying drawings.
[0034] FIG. 2A to FIG. 2H Schematic diagrams of example pages 200A to 200H (also referred to as examples 200A to 200H) according to some embodiments of the present disclosure are shown. It should be understood that the pages shown in the drawings are merely examples, and various page designs may actually exist. The various graphical elements in the pages may have different arrangements and different visual representations, one or more of which may be omitted or replaced, and one or more other elements may also exist. The embodiments of the present disclosure are not limited in this respect.
[0035] The pages shown in Examples 200A to 200H may be presented at the terminal device 110. For ease of discussion, reference will be made to Figure 1Examples 200A to 200H are described with reference to environment 100. In environment 100, terminal device 110 presents an interactive page (e.g., page 150) of a conversational interactive application (e.g., application 115). Terminal device 110 may receive user input from user 140 via page 150, and provide user 140 with a response corresponding to the user input via page 150.
[0036] In some embodiments, the terminal device 110 may present at least one interactive control corresponding to the type of at least one predetermined task in the interactive page. The terminal device 110 may determine that a first interactive request for specifying the type of task to be performed is received in response to receiving a trigger operation on a target interactive control. Figure 2A As shown, example 200A shows an example of an interactive page. Example 200A includes an input box 207. The terminal device 110 can receive user input via the input box 207. The user input can be any appropriate type of input such as text type, voice type, image type, etc. Example 200A includes a send control 208. In response to receiving a user operation on the send control 208 (for example, a trigger operation of the user on the send control 208), the terminal device 110 can determine that the user input is received and present the received user input as a conversation message from the user in example 200A.
[0037] Example 200A includes multiple interactive controls corresponding to multiple types of predetermined tasks (e.g., interactive controls 201, 202, 203, 204, 205, etc.) and interactive control 206. In response to receiving a user operation on interactive control 206, terminal device 110 may present more interactive controls (e.g., if 10 predetermined task types are included, terminal device 110 may present 5 interactive controls corresponding to 5 predetermined task types in example 200A, and terminal device 110 may present 5 interactive controls corresponding to the remaining 5 predetermined task types in response to receiving a user operation on interactive control 206). For example, terminal device 110 may determine that a first interactive request for specifying the type of task to be performed as "help me write" has been received in response to receiving a user operation on interactive control 201.
[0038] The terminal device 110 may present an interactive area matching the type in response to receiving a first interactive request for specifying the type of task to be performed. The interactive area includes a data input box for inputting data to be processed and a prompt word template matching the type. The prompt word template may specify multiple attributes of the prompt word for performing the task. The terminal device 110 generates a prompt word for performing the task in response to receiving a second interactive request for the interactive area. In this way, it is convenient for the user to refine multiple attributes of the prompt word, thereby obtaining a prompt word that better matches the user's needs.
[0039] Here, the second interaction request may include an interaction request for the data input box and an interaction request for a target attribute among the multiple attributes. If it is determined that the second interaction request is an interaction request for the data input box, the terminal device 110 may determine the data to be processed based on the second interaction request. If it is determined that the second interaction request is an interaction request for a target attribute among the multiple attributes, the terminal device 110 may set the attribute value of the target attribute based on the second interaction request. The terminal device 110 may generate a prompt word based on the data and the attribute value.
[0040] like Figure 2A and Figure 2B As shown, the terminal device 110 may determine that a first interaction request for specifying a type of task to be performed, "Help me write", is received in response to receiving a user operation on the interactive control 201 in the example 200A, and then present the example 200B. The example 200B includes a cancel control 213. The terminal device 110 may cancel the presentation of the interactive area 210 in response to receiving a user operation on the cancel control 213. The terminal device 110 may, for example, present the example 200B.
[0041] Example 200B includes an interactive area 210 that matches the type "Help me write". The interactive area 210 includes a data input box 217 for inputting data to be processed. The terminal device 110 may determine the data to be processed based on the second interactive request in response to determining that the second interactive request is an interactive request for the data input box 217. For example, the terminal device 110 may determine the received text based on the text input request in response to determining that the second interactive request is a text input request for the data input box, and determine the received text as the data to be processed.
[0042] The interactive area 210 may also include, for example, a control 214, an area 215, and an area 218. The terminal device 110 may determine, for example, a prompt word template based on the control 214, the area 215, and the area 218, that is, determine multiple attributes of the prompt word used to perform the task based on the control 214, the area 215, and the area 218. The control 214 may be used to configure the functional attributes of the prompt word, which may include the option "write" and the option "reply", each option corresponding to an attribute value of the functional attribute. Taking the task type of "help me write" as an example, the terminal device 110 may determine that the attribute value corresponding to the functional attribute is "write" in response to the option "write" being selected, and the prompt word may instruct the model to actively write an email (and / or other types of documents), and the terminal device 110 may determine that the attribute value corresponding to the functional attribute is "reply" in response to the option "reply" being selected, and the prompt word may instruct the model to write a reply email to other emails.
[0043] Area 215 may be used to configure the category attribute of the prompt word. Area 215 may include multiple options such as option "copywriting", option "idea", option "monthly report", option "weekly report", option "daily report", option "outline", option "mail", etc., each option corresponds to an attribute value of the category attribute. Area 215 may include more controls 216, and the terminal device 110 may present more options in response to receiving a user operation on more controls 216.
[0044] Region 218 may present a plurality of tags, each of which may correspond to an attribute. For example, region 218 may include a tag corresponding to a tone attribute, a tag corresponding to a length attribute, a tag corresponding to a language attribute, etc. In response to determining that the second interaction request is an interaction request for a target attribute, the terminal device 110 may present a plurality of candidate attribute values associated with the target attribute, and in response to receiving a third interaction request for a target candidate attribute value among the plurality of candidate attribute values, use the target candidate attribute value to set the attribute value.
[0045] For example, the terminal device 110 may determine that the second interaction request is an interaction request for the tone attribute in response to receiving a trigger operation for a tag corresponding to the tone attribute. Figure 2C Example 200C shown in the figure shows an example of an interactive area. Example 200C presents a menu 220, which includes multiple candidate attribute values associated with the tone attribute. In response to receiving a selection operation for the attribute value "formal" among the multiple candidate attribute values, the terminal device 110 can determine that a third interaction request for the attribute value "formal" is received, and set the attribute value of the tone attribute to "formal". In this way, a desired candidate can be selected from multiple threshold candidate items of the attribute, thereby simplifying the complexity of user input.
[0046] Return to reference Figure 2B In example 200B, the terminal device 110 may determine the prompt word template based on the configuration operations of the control 214, the area 215, and the area 218. For example, if the option "Write" is selected in the control 214, the option "Copy" is selected in the area 218, and the attribute value of the tone attribute is "Formal", the attribute value of the length attribute is "Medium", and the attribute value of the language attribute is "Simplified Chinese", then the terminal device 110 may determine that the prompt word template includes texts such as "Write", "Copy", "Formal", "Medium", and "Simplified Chinese".
[0047] In some embodiments, the interactive area may further include a designated control for specifying a presentation format of the interactive area. The terminal device 110 may determine that a fourth interactive request for the designated control is received in response to receiving a user operation for the designated control. For example, the terminal device 110 may present the interactive area using the presentation format specified by the fourth interactive request in response to receiving the fourth interactive request for the designated control. Figure 2B As shown, the interactive area 210 may include a designated control 211 and a designated control 212. The terminal device 110 may determine that the presentation format of the interactive area 210 is an image format in response to receiving a user operation on the designated control 211. The terminal device 110 may determine that the presentation format of the interactive area 210 is a text format in response to receiving a user operation on the designated control 212.
[0048] For example, in response to determining that the presentation format specified by the fourth interaction request is an image format, the terminal device 110 may present the data input box in the image format in the first area of the interaction area, and present the label in the image format in the second area of the interaction area. Figure 2B As shown, the presentation format of the interactive area 210 in example 200B is an image format, and the terminal device 110 can present the data input box 217 in the first area (e.g., the area where the data input box 217 is located) of the interactive area 210, and present the label in an image format in the second area (e.g., area 218). In this way, it is convenient for the user to understand the various attributes of the prompt word and the corresponding attribute values in a visual manner, thereby supporting the user to determine whether the specified attribute values meet the user's needs.
[0049] For example, in response to determining that the presentation format specified by the fourth interaction request is a text format, the terminal device 110 may present an initial prompt word for executing the task in the interaction area, present a data input box in a text format at a first position in the initial prompt word, and present a label in a text format at a second position in the initial prompt word. Figure 2DAs shown, example 200D shows an example of presenting an interactive area in text format. In example 200D, an initial prompt word "Reply to work email, [paste email content] in ____ tone. The length of the answer is ____. [topic I want to talk about]" is presented, and the terminal device 110 can present a data input box in text format at the first position in the initial prompt word (for example, [topic I want to talk about]), and present a label in text format at the second position in the initial prompt word (for example, position 221 and position 222).
[0050] Further, the user can press the triangle symbol shown at position 221 to present multiple candidate attribute values related to tone (e.g., formal, casual, etc.); the user can press the triangle symbol shown at position 222 to present multiple candidate attribute values related to length (e.g., long, medium, short, etc.). In this way, the complete sentence of the prompt word can be presented in a text format, and the specific content of each attribute value can be presented in a highlighted format (e.g., highlighted, bold, italic, underlined) for the user to further modify or confirm.
[0051] Return to reference Figure 2B In some embodiments, the interactive area 210 may further include a submit control 219. The terminal device 110 may determine the data to be processed based on the data input box 217 and determine the prompt word template based on the control 214, the area 215, and the area 218 in response to receiving the user operation on the submit control 219. In some embodiments, the terminal device 110 may present a prompt word template in response to receiving the user operation on the submit control 219. Figure 2E Example 200E shown. Example 200E shows an example of an interactive page. As shown in Example 200E, the interactive area 210 may also include multiple candidate layouts (such as Layout 1 to Layout 5 shown in the figure), and the multiple candidate layouts respectively represent the layouts of each response element in the response to the prompt word. The response element can represent various elements that will appear in the response, such as a title, text, image, and so on. In this way, the layout of the response result can be provided in advance in a visual manner, so that it is convenient for users to choose a layout that better meets their needs.
[0052] The interaction area 210 may also include a control 231, and the terminal device 110 may present more candidate layouts in response to receiving a user operation on the control 231. The terminal device 110 may determine that a fifth interaction request for the target candidate layout is received in response to receiving a user operation on a target candidate layout among multiple candidate layouts (which may be any candidate layout among the multiple candidate layouts). For example, the terminal device 110 may directly respond to receiving the fifth interaction request for the target candidate layout among the multiple candidate layouts and generate a prompt word based on the target candidate layout.
[0053] For example, after receiving the fifth interaction request for the target candidate layout among the multiple candidate layouts, the terminal device 110 may also generate a prompt word based on the target candidate layout in response to receiving a user operation on the submit control 219. In some embodiments, the interaction area 210 may also include an input box 232, and the terminal device 110 may receive input information for the layout from the user via the input box 232, and determine or adjust the target candidate layout based on the received input information. In this way, the user can preview the response layout, enhance the user's perception of the response result, and facilitate the user to adjust the layout based on their own preferences.
[0054] In some embodiments, the terminal device 110 may also provide a prompt word to the model (e.g., model 120) in response to receiving a sixth interaction request for a submit control (e.g., receiving a user operation for submit control 219). If the model is deployed locally on the terminal device 110, the terminal device 110 may directly provide the prompt word to the model and obtain a response to the prompt word from the model. If the model is deployed at a server device (e.g., server 130) associated with a conversational interactive application (e.g., application 115), the terminal device 110 may submit the prompt word to the server 130. The server 130 may provide the prompt word to the model and obtain a response to the prompt word from the model. The terminal device 110 may then obtain a response to the prompt word from the server via a communication connection with the server 130. The terminal device 110 may present a response to the prompt word from the server 130.
[0055] like Figure 2E and Figure 2F As shown, example 200F shows an example of an interactive page. For example, the terminal device 110 may present example 200F in response to receiving a user operation on the submit control 219 in example 200E. The terminal device 110 may present the prompt word (e.g., session message 241) in the form of a conversation message from the user in example 200F. The conversation message 241 may include the prompt word and multiple tags associated with multiple attribute values of multiple attributes, respectively (e.g., the tag "copy", the tag "formal", the tag "Chinese", and the tag "Simplified Chinese" shown in the figure). The terminal device 110 may also present a response to the prompt word (e.g., session message 242) in the form of a conversation message in example 200F.
[0056] In some embodiments, the terminal device 110 may determine that the seventh interaction request for the target tag is received in response to receiving a user operation for the target tag (any tag among the multiple tags). For example, the terminal device 110 may present an edit box for editing the target attribute value associated with the target tag in response to receiving the seventh interaction request for the target tag, and update the target attribute value based on the seventh interaction request to generate an updated prompt word in response to receiving the seventh interaction request for the edit box. In this way, even after the user has submitted the prompt word, the corresponding attribute value can still be modified by clicking on the above-mentioned tags, thereby simplifying the complexity of the user operation.
[0057] The edit box may be any appropriate type of edit box, for example, it may be an input box, and the terminal device 110 may receive user input based on the input box and modify the tag based on the received user input. The edit box may also present multiple attribute values that match the attribute corresponding to the tag. For example, Figure 2F and Figure 2G As shown, the terminal device 110 may determine that the seventh interaction request for the tag "official" is received in response to receiving a user operation for the tag "official", and then present an edit box 250. The edit box 250 may present multiple attribute values associated with the attribute corresponding to the tag "official". In response to receiving a selection operation for a certain attribute value among the multiple attribute values in the edit box 250, the terminal device 110 may modify the attribute value of the attribute corresponding to the tag "official" to the selected attribute value, and update the tag to the tag corresponding to the attribute value.
[0058] like Figure 2G and Figure 2H As shown, if the user selects the attribute value "passionate" in the edit box 250, the terminal device 110 can update the attribute value of the attribute corresponding to the tag "formal" to "passionate", and update the tag to present the tag "passionate". The terminal device 110 can update the prompt word based on the updated attribute value "passionate" and present the conversation message 243 in example 200H. The conversation message 243 includes the updated prompt word and the updated tag. In some embodiments, the terminal device 110 can also provide the updated prompt word to the model to obtain a response to the updated prompt word. The terminal device 110 can present a response to the updated prompt word. For example, the terminal device 110 can present a conversation message 244, and the conversation message 244 includes a response to the updated prompt word.
[0059] The above describes an exemplary embodiment in which the type of task is "help me write". It can be understood that if the type is "help me write", the terminal device 110 can generate prompt words indicating that the model generates text. In addition to the type "help me write", if the type of task is "image generation", the terminal device 110 can also generate prompt words indicating the content, size, style, etc. of the image, and use the model to generate the image based on the prompt words. If the type of task is "search", the terminal device 110 can also generate prompt words indicating search keywords, search engines, and the number of search results, and obtain search results based on the prompt words. In this case, the terminal device 110 can directly provide the prompt words to the search engine, or provide the prompt words to the model. If the type of task is "translation", the terminal device 110 can generate prompt words indicating the source language, target language, translation style, etc. The terminal device 110 can use the model to obtain the translation result based on the prompt words.
[0060] In summary, according to the embodiments of the present disclosure, users can customize prompt words conveniently and quickly, which reduces the difficulty of users inputting prompt words, improves the quality of generated prompt words, and thus improves the quality of answers.
[0061] Figure 3 FIG. 3 is a flowchart of a process 300 for determining a prompt word according to some embodiments of the present disclosure. The process 300 may be implemented at the terminal device 110. Figure 1 Process 300 is described.
[0062] In box 310, in response to receiving a first interaction request for specifying the type of task to be performed, the terminal device 110 presents an interaction area that matches the type, the interaction area including: a data input box for entering data to be processed; and a prompt word template that matches the type, the prompt word template specifying multiple attributes of a prompt word used to perform the task.
[0063] In block 320 , in response to receiving the second interaction request for the interaction area, the terminal device 110 generates a prompt word for performing a task.
[0064] In some embodiments, generating a prompt word includes: in response to determining that the second interaction request is an interaction request for a data input box, determining the data to be processed based on the second interaction request; in response to determining that the second interaction request is an interaction request for a target attribute among multiple attributes, setting the attribute value of the target attribute based on the second interaction request; and generating a prompt word based on the data and the attribute value.
[0065] In some embodiments, the target attribute is represented by a tag, and setting the attribute value based on the second interaction request includes: in response to determining that the second interaction request is an interaction request for the target attribute, presenting multiple candidate attribute values associated with the target attribute; and in response to receiving a third interaction request for a target candidate attribute value among the multiple candidate attribute values, setting the attribute value using the target candidate attribute value.
[0066] In some embodiments, the interaction area further includes a designated control for specifying a presentation format of the interaction area, and process 300 further includes: in response to receiving a fourth interaction request for the designated control, presenting the interaction area using the presentation format specified by the fourth interaction request.
[0067] In some embodiments, presenting the interaction area using the presentation format specified by the fourth interaction request includes: in response to determining that the presentation format specified by the fourth interaction request is an image format, presenting a data input box in an image format in a first area in the interaction area; and presenting a label in an image format in a second area in the interaction area.
[0068] In some embodiments, presenting the interaction area using the presentation format specified by the fourth interaction request includes: in response to determining that the presentation format specified by the fourth interaction request is a text format, presenting an initial prompt word for performing a task in the interaction area; presenting a data input box in text format at a first position in the initial prompt word; and presenting a label in text format at a second position in the initial prompt word.
[0069] In some embodiments, the interaction area further includes multiple candidate layouts, each of which represents a layout of each response element in a response to a prompt word, and process 300 further includes: in response to receiving a fifth interaction request for a target candidate layout among the multiple candidate layouts, generating a prompt word based on the target candidate layout.
[0070] In some embodiments, process 300 is implemented in a conversational interaction application, and the interaction area further includes a submission control for submitting a prompt word, and process 300 further includes: in response to receiving a sixth interaction request for the submission control, submitting the prompt word to a server device associated with the conversational interaction application; and presenting a response to the prompt word from the server device.
[0071] In some embodiments, process 300 further includes: in response to receiving a sixth interaction request for a submit control, presenting a prompt word and a plurality of tags respectively associated with a plurality of attribute values of a plurality of attributes in the conversational interaction application.
[0072] In some embodiments, process 300 further includes: in response to receiving a seventh interaction request for a target tag among multiple tags, presenting an edit box for editing a target attribute value associated with the target tag; and in response to receiving a seventh interaction request for the edit box, updating the target attribute value based on the seventh interaction request to generate an updated prompt word.
[0073] In some embodiments, process 300 further includes presenting a response from the server device to the updated prompt word.
[0074] According to some embodiments of the present disclosure, a device for determining a prompt word is also provided. Figure 4 A block diagram of an apparatus 400 for determining a prompt word according to some embodiments of the present disclosure is shown. The apparatus 400 may be implemented as or included in a terminal device 110. Each module / component in the apparatus 400 may be implemented by hardware, software, firmware, or any combination thereof.
[0075] like Figure 4 As shown, the device 400 includes an interactive area presentation module 410, which is configured to present an interactive area matching the type in response to receiving a first interactive request for specifying the type of task to be performed, wherein the interactive area includes: a data input box for inputting data to be processed; and a prompt word template matching the type, wherein the prompt word template specifies multiple attributes of a prompt word for performing the task. The device 400 also includes a prompt word generation module 420, which is configured to generate a prompt word for performing the task in response to receiving a second interactive request for the interactive area.
[0076] In some embodiments, the prompt word generation module 420 includes: a data determination module, configured to determine the data to be processed based on the second interaction request in response to determining that the second interaction request is an interaction request for a data input box; an attribute value determination module, configured to set the attribute value of the target attribute based on the second interaction request in response to determining that the second interaction request is an interaction request for a target attribute among multiple attributes; and a first prompt word generation module, configured to generate a prompt word based on the data and the attribute value.
[0077] In some embodiments, the target attribute is represented by a tag, and the attribute value determination module includes: an attribute value presentation module, configured to present multiple candidate attribute values associated with the target attribute in response to determining that the second interaction request is an interaction request for the target attribute; and an attribute value setting module, configured to set the attribute value using the target candidate attribute value in response to receiving a third interaction request for a target candidate attribute value among the multiple candidate attribute values.
[0078] In some embodiments, the interaction area further includes a designated control for specifying a presentation format of the interaction area, and the device 400 further includes: a first area presentation module, configured to, in response to receiving a fourth interaction request for the designated control, present the interaction area using the presentation format specified by the fourth interaction request.
[0079] In some embodiments, the first area presentation module includes: a first input box presentation module, configured to present a data input box in an image format in the first area of the interaction area in response to determining that the presentation format specified by the fourth interaction request is an image format; and a first label presentation module, configured to present a label in an image format in the second area of the interaction area.
[0080] In some embodiments, the first area presentation module includes: an initial prompt word presentation module, configured to present an initial prompt word for performing a task in the interaction area in response to determining that the presentation format specified by the fourth interaction request is a text format; a second input box presentation module, configured to present a data input box in a text format at a first position in the initial prompt word; and a second label presentation module, configured to present a label in a text format at a second position in the initial prompt word.
[0081] In some embodiments, the interaction area further includes multiple candidate layouts, each of which represents a layout of each response element in a response to a prompt word, and the device 400 further includes: a second prompt word generation module, configured to generate a prompt word based on the target candidate layout in response to receiving a fifth interaction request for a target candidate layout among the multiple candidate layouts.
[0082] In some embodiments, device 400 is implemented in a conversational interaction application, and the interaction area further includes a submission control for submitting a prompt word, and device 400 further includes: a prompt word submission module, configured to submit the prompt word to a server device associated with the conversational interaction application in response to receiving a sixth interaction request for the submission control; and a first response presentation module, configured to present a response to the prompt word from the server device.
[0083] In some embodiments, the apparatus 400 further comprises: a presentation module configured to present, in response to receiving a sixth interaction request for a submit control, a prompt word and a plurality of tags respectively associated with a plurality of attribute values of a plurality of attributes in the conversational interaction application.
[0084] In some embodiments, the device 400 further includes: an edit box presentation module, configured to present an edit box for editing a target attribute value associated with a target tag in response to receiving a seventh interaction request for a target tag among multiple tags; and a prompt word update module, configured to update the target attribute value based on the seventh interaction request to generate an updated prompt word in response to receiving a seventh interaction request for the edit box.
[0085] In some embodiments, the apparatus 400 further comprises: a second response presentation module configured to present a response to the updated prompt word from the server device.
[0086] The units and / or modules included in the device 400 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units and / or modules in the device 400 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0087] It should be understood that one or more steps in the above method can be performed by a suitable electronic device or a combination of electronic devices. Such an electronic device or a combination of electronic devices may include, for example, Figure 1 The terminal device 110 in.
[0088] Figure 5 1 shows a block diagram of an electronic device 500 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 5 The electronic device 500 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 5 The electronic device 500 shown can be used to implement Figure 1 The terminal device 110, and / or Figure 4 Device 400.
[0089] like Figure 5As shown, the electronic device 500 is in the form of a general-purpose computing device. The components of the electronic device 500 may include, but are not limited to, one or more processors or processing units 510, a memory 520, a storage device 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. The processing unit 510 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 520. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 500.
[0090] The electronic device 500 typically includes a plurality of computer storage media. Such media may be any available media accessible to the electronic device 500, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 520 may be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 530 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data and may be accessed within the electronic device 500.
[0091] The electronic device 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 5 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 520 may include a computer program product 525 having one or more program modules that are configured to perform various methods or actions of various implementations of the present disclosure.
[0092] The communication unit 540 implements communication with other computing devices through a communication medium. Additionally, the functions of the components of the electronic device 500 can be implemented in a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 500 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0093] The input device 550 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 560 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 500 may also communicate with one or more external devices (not shown) through the communication unit 540 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 500, or communicate with any device that allows the electronic device 500 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0094] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0095] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0096] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0097] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0098] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0099] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. A method for determining a prompt word, comprising: In response to receiving a first interaction request for specifying a type of task to be performed, presenting an interaction area matching the type, the interaction area comprising: a data input box for inputting data to be processed; and a prompt word template matching the type, the prompt word template specifying a plurality of attributes of a prompt word for performing the task; and In response to receiving a second interaction request for the interaction area, the prompt word for performing the task is generated.
2. The method according to claim 1, wherein generating the prompt word comprises: In response to determining that the second interaction request is an interaction request for the data input box, determining the data to be processed based on the second interaction request; In response to determining that the second interaction request is an interaction request for a target attribute among the multiple attributes, setting an attribute value of the target attribute based on the second interaction request; as well as The prompt word is generated based on the data and the attribute value.
3. The method according to claim 2, wherein the target attribute is represented by a tag, and setting the attribute value based on the second interaction request comprises: In response to determining that the second interaction request is an interaction request for the target attribute, presenting a plurality of candidate attribute values associated with the target attribute; as well as In response to receiving a third interaction request for a target candidate attribute value among the plurality of candidate attribute values, the attribute value is set using the target candidate attribute value.
4. The method according to claim 3, wherein the interactive area further comprises a designated control for designating a presentation format of the interactive area, and the method further comprises: In response to receiving a fourth interaction request for the specified control, the interaction area is presented using a presentation format specified by the fourth interaction request.
5. The method of claim 4, wherein presenting the interaction area using the presentation format specified by the fourth interaction request comprises: In response to determining that the presentation format specified by the fourth interaction request is an image format, presenting the data input box in the image format in a first area of the interactive area; as well as The label is presented in the image format in a second area in the interactive area.
6. The method of claim 4, wherein presenting the interaction area using a presentation format specified by the fourth interaction request comprises: In response to determining that the presentation format specified by the fourth interaction request is a text format, presenting an initial prompt word for performing the task in the interactive area; presenting the data input box in the text format at a first position in the initial prompt word; as well as The label is presented in the text format at a second position in the initial prompt word.
7. The method according to claim 1, wherein the interaction area further comprises a plurality of candidate layouts, wherein the plurality of candidate layouts respectively represent the layouts of the respective response elements in the response to the prompt word, and the method further comprises: In response to receiving a fifth interaction request for a target candidate layout among the plurality of candidate layouts, the prompt word is generated based on the target candidate layout.
8. The method according to claim 1, wherein the method is implemented in a conversational interactive application, and the interactive area further comprises a submit control for submitting the prompt word, and the method further comprises: In response to receiving a sixth interaction request for the submit control, submitting the prompt word to a server device associated with the conversational interaction application; as well as A response to the prompt word from the server device is presented.
9. The method according to claim 8, further comprising: In response to receiving the sixth interaction request for the submit control, presenting the prompt word and a plurality of tags respectively associated with a plurality of attribute values of the plurality of attributes in the conversational interaction application.
10. The method according to claim 9, further comprising: In response to receiving a seventh interaction request for a target tag among the plurality of tags, presenting an edit box for editing a target attribute value associated with the target tag; as well as In response to receiving a seventh interaction request for the edit box, the target attribute value is updated based on the seventh interaction request to generate an updated prompt word.
11. The method according to claim 10, further comprising: A response from the server device to the updated prompt word is presented.
12. A device for determining a prompt word, comprising: an interaction area presentation module, configured to, in response to receiving a first interaction request for specifying a type of a task to be performed, present an interaction area matching the type, the interaction area comprising: a data input box for inputting data to be processed; and a prompt word template matching the type, the prompt word template specifying a plurality of attributes of a prompt word for performing the task; and The prompt word generating module is configured to generate the prompt word for executing the task in response to receiving a second interaction request for the interaction area.
13. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 11 when executed by the at least one processing unit.
14. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 11.
15. A computer program product comprising a computer program, wherein the computer program implements the method according to any one of claims 1 to 11 when executed by a processor.
