Template calling method and device and storage medium

By obtaining the content information of the dialogue interface and using templates to generate models, the target dialogue template is dynamically determined and displayed, which solves the problem that the existing preset templates cannot be adjusted, and achieves the satisfaction of user needs and the improvement of interactive experience.

CN120595977APending Publication Date: 2025-09-05PIPECHINA SOUTH CHINA CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510574598.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing preset templates cannot be dynamically adjusted according to user needs, resulting in users being unable to obtain conversation templates that meet their needs.

Method used

By obtaining the content information of the user's current dialogue interface, the template generation model is used to dynamically determine the target dialogue template that meets the user's needs and display the template on the dialogue interface, including generating an initial template list when the content information is empty or generating a template list that meets the user's intention based on the dialogue context.

Benefits of technology

It enables the dynamic generation and display of dialogue templates that meet user needs in large language model dialogue scenarios, lowering the technical threshold for user operations and improving the user interaction experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120595977A_ABST
    Figure CN120595977A_ABST
Patent Text Reader

Abstract

The invention discloses a template calling method and device and a storage medium, relates to the technical field of artificial intelligence, and aims to solve the problem of how to meet user requirements. The method comprises the steps of obtaining content information in a dialogue interface currently used by a user in response to a template calling operation; based on the content information, determining a target dialogue template meeting user requirements; and displaying the target dialogue template on the dialogue interface, so that the user determines an input question according to the target dialogue template.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a template calling method, device and storage medium. Background Art

[0002] With the rapid development of artificial intelligence, conversational interactions between users and large language models are becoming increasingly common. To enhance the user experience, some large language models provide preset templates with fixed categories, allowing users to quickly initiate specific types of conversations.

[0003] However, existing preset templates are static and cannot be dynamically adjusted according to user needs, which results in users being unable to obtain templates that meet their needs. Summary of the Invention

[0004] The purpose of this application is to provide a template calling method, device and storage medium, aiming to solve the problem of how to provide a dialogue template that meets user needs.

[0005] To achieve the above objectives, this application adopts the following technical solutions:

[0006] In a first aspect, the present application provides a template calling method, which includes: in response to a template calling operation, obtaining content information in a dialogue interface currently used by a user; based on the content information, determining a target dialogue template that meets user needs; and displaying the target dialogue template on the dialogue interface so that the user can determine the input question based on the target dialogue template.

[0007] The template calling method provided in the embodiment of the present application can determine a target dialogue template that meets user needs based on content information in the dialogue interface in a large language model dialogue scenario, and display the target dialogue template to the user.

[0008] In one possible implementation, a target dialogue template that meets user needs is determined based on content information, including: when the content information is empty, using a template generation model to obtain an initial template list, and displaying the initial template list on a dialogue interface; the initial template list includes multiple dialogue templates; in response to a selection operation, determining the dialogue template corresponding to the selection operation as the target dialogue template that meets user needs.

[0009] In one possible implementation, a target dialogue template that meets user needs is determined based on content information, including: when the content information is not empty, obtaining a dialogue context in the content information; based on the dialogue context, using a template generation model to obtain an initial template list that meets the user's intention, and displaying the initial template list on a dialogue interface; the initial template list includes multiple dialogue templates; in response to a selection operation, determining the dialogue template corresponding to the selection operation as the target dialogue template that meets the user's needs.

[0010] In one possible implementation, the method further includes: when it is determined that there is no target dialogue template that meets the user's needs in the initial template list, updating the initial template list using the template generation model, and displaying the updated template list on the dialogue interface.

[0011] In one possible implementation, determining that there is no target dialogue template meeting the user requirement in the initial template list includes: in response to a switching operation or a scene query operation, determining that there is no target dialogue template meeting the user requirement in the initial template list.

[0012] In one possible implementation, the method further includes: in response to the adjustment operation, obtaining the question content adjusted by the user for the target dialogue template; using the large language model to generate answer content corresponding to the adjusted question content; and displaying the answer content on the dialogue interface.

[0013] In the second aspect, the present application provides a template calling device, which includes: a communication unit and a processing unit; the communication unit is used to obtain content information in the dialogue interface currently used by the user in response to the template calling operation; the processing unit is used to determine the target dialogue template that meets the user's needs based on the content information; the processing unit is also used to display the target dialogue template on the dialogue interface so that the user can determine the input question based on the target dialogue template.

[0014] In one possible implementation, the processing unit is further used to use the template generation model to obtain an initial template list when the content information is empty, and display the initial template list on the dialogue interface; the initial template list includes multiple dialogue templates; the processing unit is further used to respond to a selection operation and determine the dialogue template corresponding to the selection operation as the target dialogue template that meets the user's needs.

[0015] In one possible implementation, the processing unit is further used to obtain the dialogue context in the content information when the content information is not empty; the processing unit is further used to use the template generation model to obtain an initial template list that meets the user's intention based on the dialogue context, and display the initial template list on the dialogue interface; the initial template list includes multiple dialogue templates; the processing unit is further used to determine the dialogue template corresponding to the selection operation as the target dialogue template that meets the user's needs in response to the selection operation.

[0016] In one possible implementation, the processing unit is further configured to, when determining that there is no target dialogue template that meets the user's needs in the initial template list, update the initial template list using the template generation model and display the updated template list on the dialogue interface.

[0017] In one possible implementation, the processing unit is further configured to determine, in response to a switching operation or a scene query operation, that there is no target dialogue template in the initial template list that meets the user's needs.

[0018] In one possible implementation, the processing unit is further used to obtain the question content adjusted by the user for the target dialogue template in response to the adjustment operation; the processing unit is further used to use the large language model to generate answer content corresponding to the adjusted question content; the processing unit is further used to display the answer content on the dialogue interface.

[0019] In a third aspect, the present application provides a template calling device, which includes: a processor and a communication interface; the communication interface and the processor are coupled, and the processor is used to run a computer program or instructions to implement the template calling method described in the first aspect and any possible implementation method of the first aspect.

[0020] In a fourth aspect, the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a terminal, the terminal executes the template calling method described in the first aspect and any possible implementation of the first aspect.

[0021] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when the computer program product is run on a template calling device, enables the template calling device to execute the template calling method as described in the first aspect and any possible implementation of the first aspect.

[0022] In a sixth aspect, the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run a computer program or instructions to implement the template calling method described in the first aspect and any possible implementation of the first aspect.

[0023] Specifically, the chip provided in this application also includes a memory for storing computer programs or instructions. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0025] Figure 1 A schematic diagram of the composition of a template calling device provided in an embodiment of the present application;

[0026] Figure 2A flow chart of a template calling method provided in an embodiment of the present application;

[0027] Figure 3 A flowchart of another template calling method provided in an embodiment of the present application;

[0028] Figure 4 A flowchart of another template calling method provided in an embodiment of the present application;

[0029] Figure 5 A flowchart of another template calling method provided in an embodiment of the present application;

[0030] Figure 6 A flowchart of another template calling method provided in an embodiment of the present application;

[0031] Figure 7 A schematic diagram of the structure of a template calling device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0033] In the description of this application, it should be understood that the terms "upper," "lower," "left," "right," "front," "back," "inner," "outer," and the like, indicating directions or positional relationships, are based on the directions or relative positional relationships shown in the accompanying drawings and are intended solely to facilitate the description of this application and simplify the description. They do not indicate or imply that the devices or components referred to must have a specific direction, be constructed, or operate in a specific direction. Therefore, they should not be construed as limitations on this application. Unless otherwise specified, the above-mentioned directionality descriptions may be flexibly set in actual application, provided that the relative positional relationships shown in the accompanying drawings are met.

[0034] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature specified as "first" or "second" may explicitly or implicitly include one or more of such features. Throughout this application, unless otherwise specified, "plurality" means two or more.

[0035] In the embodiments of the present application, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, article, or device comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of other identical elements in the process, article, or device comprising the element.

[0036] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0037] In the description of this specification, specific features, structures, materials or characteristics may be combined in an appropriate manner in any one or more embodiments or examples.

[0038] With the rapid development of artificial intelligence, conversational interactions with large language models are becoming increasingly common. Some large language models provide preset templates with fixed categories for users to use, but they lack the ability to dynamically adjust to user needs or generate new templates based on conversation history. Furthermore, users must manually search for the required templates, which is cumbersome.

[0039] In view of this, an embodiment of the present application provides a template calling method, comprising: in response to a template calling operation, obtaining content information from a user's currently used dialogue interface. Based on this content information, a target dialogue template that meets the user's needs is determined, and the target dialogue template is displayed on the dialogue interface. In other words, the template calling method provided in an embodiment of the present application can, in a large language model dialogue scenario, determine a target dialogue template that meets the user's needs based on the content information in the dialogue interface, and display the target dialogue template to the user.

[0040] For example, Figure 1 Schematic diagram of the composition of a template calling device 10 provided in an embodiment of the present application. Figure 1 As shown, the template calling device 10 may include a processor 101 and a bus 102 .

[0041] Furthermore, the template calling device 10 may further include a communication interface 103 and a memory 104 , wherein the processor 101 , the memory 104 and the communication interface 103 may be connected via a bus 102 .

[0042] The processor 101 is a central processing unit (CPU), a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 101 may also be other devices with processing functions, such as circuits, devices, or software modules, without limitation.

[0043] The bus 102 is used to transmit information between the components included in the template calling device 10.

[0044] Communication interface 103 is used to communicate with other devices or other communication networks. Such other communication networks may be Ethernet, radio access networks (RAN), wireless local area networks (WLAN), etc. Communication interface 103 may be a module, circuit, communication interface, or any other device capable of implementing communication.

[0045] The memory 104 is used to store instructions, where the instructions may be computer programs.

[0046] The memory 104 may be a read-only memory (ROM) or other type of static storage device that can store static information and / or instructions, or a random access memory (RAM) or other type of dynamic storage device that can store information and / or instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, etc., without limitation.

[0047] It should be noted that memory 104 can exist independently of processor 101 or can be integrated with processor 101. Memory 104 can be used to store instructions, program code, or data. Memory 104 can be located within or outside of template calling device 10, without limitation. Processor 101 is configured to execute instructions stored in memory 104 to implement the template calling method provided in the following embodiments of this application.

[0048] It should be noted that the template calling device 10 can be a desktop computer, a portable computer, a network server, a mobile phone, a tablet computer, a wireless terminal, an embedded device, a chip system or a computer with a Figure 1 In addition, Figure 1 The composition shown in the Figure 1 The limitations of each device in Figure 1 In addition to the parts shown, Figure 1 The various devices in the figures may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0049] In the embodiment of the present application, the chip system can be composed of chips, or can include chips and other discrete devices.

[0050] In addition, the actions and terms involved in the various embodiments of this application can refer to each other without limitation. The message names or parameter names in the messages exchanged between the various devices in the embodiments of this application are only examples, and other names can also be used in specific implementations without limitation.

[0051] The template calling method provided in the embodiment of the present application is described below with reference to the accompanying drawings. Among them, the actions, terms, etc. involved in the various embodiments of the present application can refer to each other without limitation. The message name or parameter name in the message exchanged between the various devices in the embodiment of the present application is only an example, and other names can also be used in the specific implementation without limitation. The actions involved in the various embodiments of the present application are only an example, and other names can also be used in the specific implementation, such as: "included in" in the embodiment of the present application can also be replaced by "carried on" or "carried in", etc.

[0052] like Figure 2 As shown, the embodiment of the present application proposes a template calling method, which includes:

[0053] S201: In response to a template calling operation, obtain content information in a dialogue interface currently used by a user.

[0054] The dialogue interface refers to the visual window where users interact with the large language model.

[0055] In one possible implementation, a "Call Template" button is provided on the conversation interface to monitor user operations on the conversation interface in real time. When a user clicks the "Call Template" button, the content information in the conversation interface is obtained through the identifier of the interface element or the application programming interface (API).

[0056] As an example, assuming the conversation interface is a web page, each interface element in the conversation interface has a unique identifier. For example, the area displaying the input question is identified by userInputTextBox, and the area displaying the answer content is identified by ResponseArea. Retrieving content information from the conversation interface using the interface element identifiers can be accomplished by using the code document.getElementById('userInputTextBox').value to retrieve the input question and the code document.getElementById('ResponseArea').innerText to retrieve the answer content.

[0057] As another example, assuming the conversation interface is an application software, the conversation interface provides an API called getConversationContent, which, when called, returns all content currently displayed on the conversation interface. Retrieving the content information in the conversation interface through the API can be accomplished by sending a Hypertext Transfer Protocol (HTTP) GET request to a server resource that implements the getConversationContent API to retrieve the content information in the conversation interface.

[0058] Optionally, after obtaining the content information in the dialogue interface, data verification and cleaning operations can be performed on the content information, such as removing special characters, blank characters, converting the format, etc., to ensure that the content information meets the requirements of subsequent processing.

[0059] S202: Determine a target dialogue template that meets user needs based on the content information.

[0060] In one possible implementation, the content information is detected to determine whether it is empty. If the content information is empty, the template generation model is used to generate a template list multiple times until the generated template list contains a target dialogue template that meets the user's needs. If the content information is not empty, the dialogue context in the content information is obtained, the template generation model is used to analyze the dialogue context, and the template list is generated multiple times until the generated template list contains a target dialogue template that meets the user's needs. For details, please refer to the following Figure 4 and Figure 5 The embodiments described are not described in detail here.

[0061] S203: Display the target dialogue template on the dialogue interface.

[0062] The target conversation template includes a scenario name, scenario description, prompt word template, and prompt word examples. The scenario name summarizes the conversation scenario to which the template applies. The scenario description further explains the template's functionality, helping users understand its scope of application. The prompt word template is a framework with placeholders that specifies the basic structure and key elements of the user-entered question. The prompt word examples are specific question instances generated based on the prompt word template, providing users with intuitive references.

[0063] In one possible implementation, the middle area of ​​the conversation interface serves as the template display area. The scene name is displayed at the top of the template display area in the first font size. The scene description is displayed below the scene name in the second font size. The prompt word template is displayed below the scene description in the third font size, with different font colors used to distinguish the placeholder and fixed text in the prompt word template. The prompt word example is displayed below the prompt word template in the third font size. The second font size is larger than the third font size and smaller than the first font size.

[0064] Furthermore, when displaying the target dialogue template, a "copy" button can be added next to the prompt word template and prompt word example. After the user clicks the button, the corresponding text content can be copied to the dialogue input box of the dialogue interface.

[0065] It is understandable that by displaying the target dialogue template on the dialogue interface, the user only needs to make simple modifications to the text content in the target dialogue template to quickly obtain input questions that meet their needs.

[0066] The template invocation method provided in this application obtains content information from the user's current conversation interface. Based on this content information, a target conversation template that meets the user's needs is determined, and the target conversation template is displayed in the conversation interface. In other words, the template invocation method provided in this embodiment of the application can, in a large language model conversation scenario, determine a target conversation template that meets the user's needs based on the content information in the conversation interface and display the target conversation template to the user.

[0067] Furthermore, after S203, the user can adjust the target dialogue template in the input box and click the "Send" button after the adjustment is completed, so that the large language model can generate the answer content according to the question content sent by the user. Figure 3 As shown, the template calling method recorded in the embodiment of the present application may also include the following steps.

[0068] S301. In response to an adjustment operation, obtain the question content after the user adjusts the target dialogue template.

[0069] In one possible implementation, the user's actions on the dialogue interface are monitored in real time. When the user edits the template content in the dialogue input box and clicks the "Send" button next to the dialogue input box, the dialogue input box element is located and the user's adjusted question content for the target dialogue template is retrieved based on the element's identifier.

[0070] S302: Generate answer content corresponding to the adjusted question content using the large language model.

[0071] In one possible implementation, the question content is preprocessed and then fed into a large language model. The large language model analyzes and understands the preprocessed question content and generates an answer corresponding to the question content.

[0072] S303: Display the answer content on the dialogue interface.

[0073] In one possible implementation, the answer content is displayed below the question content input by the user and is distinguished from the question content in a different color or font.

[0074] Optionally, interactive elements can be added to the answer display area. For example, a "Copy" button can be placed at the top of the answer display area, allowing users to copy the answer to the clipboard for direct pasting elsewhere. Alternatively, "Like" and "Dislike" buttons can be placed at the bottom of the answer display area, allowing users to rate the answer. This allows the large language model to be optimized based on user feedback.

[0075] In one embodiment, Figure 4 As shown, when the content information in the dialogue interface is empty, the above S202 can be specifically determined through the following S401 to S402.

[0076] S401: Use the template generation model to obtain an initial template list, and display the initial template list on the dialogue interface.

[0077] The initial template list includes multiple dialogue templates.

[0078] In one possible implementation, a first request is sent to a template generation model, instructing the template generation model to generate multiple conversation templates suitable for various common scenarios. Initial template list data is returned by the template generation model. The initial template list data is parsed and processed, and each conversation template in the initial template list is displayed on the conversation interface using a preset layout.

[0079] For example, the first request information may be the following:

[0080] Please return the five most commonly used prompt word templates. When answering, please strictly follow the following format and only return a JSON array. Do not return anything other than a JSON array:

[0081] [{

[0082] "scene": content to be filled"

[0083] "description":"Content to be filled",

[0084] "template":"content to be filled",

[0085] "example":"content to be filled"

[0086] }]

[0087] Among them, scene is the scene name, description is the scene description, template is the prompt word template, and example is the prompt word example.

[0088] For example, the json array returned by the template generation model can be as follows:

[0089]

[0090]

[0091] "example":"Please help me generate a summary for a document about the application of artificial intelligence in the medical field."

[0092] } ]

[0094] It should be noted that the above scenario names and descriptions are intended to help users understand the purpose of the template. Furthermore, users can modify the placeholder content in the prompt word template to create an input question or directly use the prompt word example as the input question. The placeholder content refers to the content enclosed in angle brackets.

[0095] For example, the preset layout can be a card-based layout. Specifically, each dialogue template occupies a separate card, which displays the scene name, scene description, prompt word template, and prompt word example in sequence. The scene name is displayed in a larger font at the top of the card, the scene description is displayed in a moderate font below the scene name, and the prompt word template and prompt word example are displayed in different colors or formats to distinguish them.

[0096] Optionally, when displaying conversation templates in card format, a "Favorite" button can be set on each template card. By clicking the "Favorite" button, the user can save the corresponding conversation template to the favorite, making it easier to quickly access the favorite conversation template during subsequent conversations, thereby improving the user's interactive experience.

[0097] S402: In response to a selection operation, determine a dialog template corresponding to the selection operation as a target dialog template that meets user needs.

[0098] In one possible implementation, when displaying a list of templates, a "Select" button is placed next to each dialog template in the list, and user actions on the dialog interface are monitored in real time. When a user clicks the "Select" button next to a dialog template, that dialog template is identified as the target dialog template that meets the user's needs.

[0099] Furthermore, before S402 , if there is no target dialogue template that meets the user's needs in the initial template list, the template generation model is used to update the initial template list, and the updated template list is displayed on the dialogue interface until a target dialogue template that meets the user's needs is determined.

[0100] Optionally, determining that the target dialogue template in the initial template list does not meet the user's requirements can be implemented by determining that the target dialogue template in the initial template list does not meet the user's requirements in response to a switch operation or a scene query operation. The switch operation refers to the user clicking the "Switch" button below the initial template list. The scene query operation refers to the user entering the desired scene name in the dialogue input box.

[0101] Furthermore, if the template generation model is used to regenerate the template list in response to the input scenario operation, the scenario name of each dialogue template in the generated template list is limited to be the scenario name input by the user.

[0102] Optionally, the template generation model may be an existing large language model or a trained template generation model.

[0103] In one embodiment, Figure 5 As shown, when the content information in the dialogue interface is not empty, the above S202 can be specifically determined through the following S501 to S503.

[0104] S501: Acquire the conversation context in the content information.

[0105] In a possible implementation, all text contents in the content information are traversed, and the text contents are integrated according to a chronological order or a logical order to obtain a complete conversation context.

[0106] S502: Based on the conversation context, use the template generation model to obtain an initial template list that meets the user's intention, and display the initial template list on the conversation interface.

[0107] Among them, the initial template list includes multiple dialogue templates

[0108] In one possible implementation, a second request is sent to the template generation model, instructing the template generation model to generate multiple dialogue templates matching the user's next question. Initial template list data is returned by the template generation model. The initial template list data is parsed and processed, and each dialogue template in the initial template list is displayed on the dialogue interface using a preset layout.

[0109] Exemplarily, the second request information may include the following content and conversation context:

[0110] Please predict the user's next question based on the conversation context and return the five prompt word templates that match the predicted user's next question. When answering, please strictly follow the following format and only return a JSON array. Do not return anything outside the JSON array:

[0111] [{

[0112] "scene":"content to be filled",

[0113] "description":"Content to be filled",

[0114] "template":"content to be filled",

[0115] "example":"content to be filled"

[0116] }]

[0117] Among them, scene is the scene name, description is the scene description, template is the prompt word template, and example is the prompt word example.

[0118] S503: In response to the selection operation, determine the dialog template corresponding to the selection operation as a target dialog template that meets the user's needs.

[0119] It is understandable that the implementation of S503 can be understood by referring to the relevant description of S402 above, which will not be elaborated here.

[0120] Furthermore, before S503, if there is no target dialogue template that meets the user's needs in the initial template list, the template generation model is used to update the initial template list, and the updated template list is displayed on the dialogue interface until a target dialogue template that meets the user's needs is determined.

[0121] For example, Figure 6 This is a flow chart of a template calling method provided in an embodiment of the present application. Figure 6 As shown, the template calling method provided in the embodiment of the present application may include the following steps.

[0122] S601: In response to a template calling operation, obtain content information in a dialogue interface currently used by a user.

[0123] S602: Determine whether the content information is empty.

[0124] If the content information is empty, execute step S603.

[0125] S603: Use the template generation model to obtain a template list, and display the template list on the dialogue interface.

[0126] If the content information is not empty, execute step S606.

[0127] S604: Determine whether the template list contains a target dialogue template that meets the user's needs.

[0128] If the template list contains a target dialogue template that meets the user's needs, step S605 is executed.

[0129] S605: Display the target dialogue template on the dialogue interface.

[0130] If the template list does not contain the target dialogue template that meets the user's needs, step S603 is executed.

[0131] S606: Acquire the conversation context in the content information.

[0132] S607: Use the template generation model to obtain a template list that meets the user's intention, and display the template list on the dialogue interface.

[0133] S608: Determine whether the template list contains a target dialogue template that meets the user's needs.

[0134] If the template list contains a target dialogue template that meets the user's needs, step S605 is executed.

[0135] If the template list does not contain the target dialogue template that meets the user's needs, step S607 is executed.

[0136] To sum up, the template calling method provided in the embodiment of the present application automatically generates a dialogue template that meets user needs by dynamically analyzing the user interaction scenario and dialogue context, and can realize the full process intelligence from template calling, scene matching to template reuse, thereby lowering the technical threshold for users to ask questions.

[0137] It is understandable that the above-mentioned template calling method can be implemented by a template calling device. In order to realize the above-mentioned functions, the template calling device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the modules and algorithm steps of each example described in the embodiments disclosed herein, the embodiments disclosed in this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments disclosed in this application.

[0138] The embodiments disclosed in this application can divide the functional modules according to the template calling device generated by the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments disclosed in this application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0139] Figure 7 This is a schematic diagram of the structure of a template calling device provided in an embodiment of the present application. Figure 7 As shown, the template calling device 70 can be used to execute Figure 2-Figure 6 The template calling method shown in FIG. 7 shows a template calling device 70 including a communication unit 701 and a processing unit 702 .

[0140] The communication unit 701 is used to obtain content information in the dialogue interface currently used by the user in response to a template call operation; the processing unit 702 is used to determine a target dialogue template that meets the user's needs based on the content information; the processing unit 702 is also used to display the target dialogue template on the dialogue interface so that the user can determine the input question based on the target dialogue template.

[0141] In one possible implementation, the processing unit 702 is further used to use the template generation model to obtain an initial template list when the content information is empty, and to display the initial template list on the dialogue interface; the initial template list includes multiple dialogue templates; the processing unit 702 is further used to respond to a selection operation and determine the dialogue template corresponding to the selection operation as the target dialogue template that meets the user's needs.

[0142] In one possible implementation, the processing unit 702 is further used to obtain the dialogue context in the content information when the content information is not empty; the processing unit 702 is further used to use the template generation model to obtain an initial template list that meets the user's intention based on the dialogue context, and display the initial template list on the dialogue interface; the initial template list includes multiple dialogue templates; the processing unit 702 is further used to determine, in response to a selection operation, the dialogue template corresponding to the selection operation as the target dialogue template that meets the user's needs.

[0143] In one possible implementation, the processing unit 702 is further configured to, when determining that the initial template list does not contain a target dialogue template that meets the user's needs, update the initial template list using the template generation model and display the updated template list on the dialogue interface.

[0144] In a possible implementation, the processing unit 702 is further configured to determine, in response to a switching operation or a scene query operation, that there is no target dialogue template in the initial template list that meets the user's needs.

[0145] In one possible implementation, processing unit 702 is further used to obtain the question content adjusted by the user for the target dialogue template in response to the adjustment operation; processing unit 702 is further used to use the large language model to generate answer content corresponding to the adjusted question content; processing unit 702 is further used to display the answer content on the dialogue interface.

[0146] Through the description of the above embodiments, those skilled in the art will clearly understand that for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0147] The present disclosure also provides a computer-readable storage medium having instructions stored thereon. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the template calling method provided in the above-mentioned embodiment of the present disclosure.

[0148] The embodiments of the present disclosure also provide a computer program product containing instructions, which, when executed on an electronic device, enables the electronic device to execute the template calling method provided by the embodiments of the present disclosure.

[0149] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above, or any other form of computer-readable storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application-specific integrated circuit (ASIC). In the embodiments of the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0150] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A template calling method, characterized in that: The method comprises: In response to the template call operation, obtaining content information in the dialogue interface currently used by the user; Based on the content information, determining a target dialogue template that meets the user's needs; The target dialogue template is displayed on the dialogue interface so that the user can determine the input question according to the target dialogue template.

2. The method according to claim 1, characterized in that Determining a target dialogue template that meets user needs based on the content information includes: When the content information is empty, an initial template list is obtained using a template generation model, and the initial template list is displayed on the dialogue interface; the initial template list includes a plurality of dialogue templates; In response to a selection operation, the dialogue template corresponding to the selection operation is determined as the target dialogue template that meets the user's needs.

3. The method according to claim 1, characterized in that Determining a target dialogue template that meets user needs based on the content information includes: If the content information is not empty, obtaining the conversation context in the content information; According to the conversation context, using a template generation model to obtain an initial template list that meets the user's intention, and displaying the initial template list on the conversation interface; the initial template list includes multiple conversation templates; In response to a selection operation, the dialogue template corresponding to the selection operation is determined as the target dialogue template that meets the user's needs.

4. The method according to claim 2 or 3, characterized in that The method further comprises: When it is determined that the target dialogue template that meets the user's needs is not included in the initial template list, the initial template list is updated using a template generation model, and the updated template list is displayed on the dialogue interface.

5. The method according to claim 4, characterized in that The determining that the target dialogue template that meets the user's needs is not present in the initial template list includes: In response to a switching operation or a scene query operation, it is determined that the target dialogue template that meets the user's needs is not included in the initial template list.

6. The method according to any one of claims 1 to 3, characterized in that The method further comprises: In response to the adjustment operation, obtaining the question content after the user adjusts the target dialogue template; Use a large language model to generate answers corresponding to the adjusted question content; The answer content is displayed on the dialogue interface.

7. A template calling device, characterized in that: The device includes: a communication unit and a processing unit; The communication unit is configured to obtain content information in the dialogue interface currently used by the user in response to the template calling operation; The processing unit is configured to determine a target dialogue template that meets user needs based on the content information; The processing unit is further configured to display the target dialogue template on the dialogue interface so that the user can determine the input question based on the target dialogue template.

8. A template calling device, characterized in that: include: A processor and a communication interface; the communication interface is coupled to the processor, and the processor is used to run a computer program or instruction to implement the template calling method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is caused to execute the template calling method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product includes computer program instructions, and when the computer program instructions are executed by a processor, the template calling method according to any one of claims 1 to 6 is implemented.