Recommendation method and device of session template, computer readable medium and electronic equipment
By obtaining the context of the chat session and the content to be sent, and using artificial intelligence to recommend session templates, the problem of insufficient predefined template library is solved, and more efficient and accurate template recommendation is achieved, thereby improving the efficiency of communication and information transmission.
Patent Information
- Application Number
- CN202410608021.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2025-11-14
AI Technical Summary
In existing technologies, the number of predefined session template libraries is limited, which cannot efficiently and accurately provide users with the templates they need, and users need to select them manually, resulting in low communication efficiency and information transmission efficiency.
By obtaining the context information of the current chat session and the content to be sent, artificial intelligence algorithms are used to recommend matching chat templates and dynamically generate personalized template options, including searching for matching templates from a preset template library and a custom template library, and automatically recommending them in the chat window.
It improves the efficiency and accuracy of obtaining conversation templates, simplifies the user operation process, provides more comprehensive and personalized template options, meets the needs of different scenarios, and improves the efficiency of communication and information transmission.
Smart Images

Figure CN120951964A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and more specifically, to a method, apparatus, computer-readable medium, and electronic device for recommending conversation templates. Background Technology
[0002] Currently, when users chat and communicate through communication tools, in order to improve communication efficiency, users can select suitable templates from a predefined template library to quickly generate conversation content.
[0003] However, because the number of templates in the predefined template library is limited, and users need to manually select templates from the predefined template library, it is impossible to obtain the required templates efficiently and accurately. Summary of the Invention
[0004] Embodiments of this application provide a method, apparatus, computer-readable medium, and electronic device for recommending conversation templates, thereby enabling users to obtain the desired conversation templates more efficiently and accurately, at least to some extent.
[0005] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0006] According to one aspect of the embodiments of this application, a method for recommending conversation templates is provided. The method includes: obtaining context information of a current chat session, wherein the context information is conversation content that has been sent to a recipient in the current chat session; if conversation content to be sent is entered in the chat window of a target user in the current chat session, obtaining the conversation content to be sent; and recommending a conversation template to the target user based on the context information and the conversation content to be sent.
[0007] According to one aspect of the embodiments of this application, a conversation template recommendation apparatus is provided. The apparatus includes: a context information acquisition unit, configured to acquire context information of a current chat conversation, wherein the context information is conversation content that has been sent to a recipient in the current chat conversation; a conversation content to be sent acquisition unit, configured to acquire the conversation content to be sent if the conversation content to be sent is entered in the chat window of a target user in the current chat conversation; and a template recommendation unit, configured to recommend a conversation template to the target user based on the context information and the conversation content to be sent.
[0008] In some embodiments of this application, based on the foregoing scheme, after obtaining the context information of the current chat session, the template recommendation unit is further configured to: if no conversation content to be sent is entered in the chat window of the target user in the current chat session, recommend a conversation template to the target user according to the context information.
[0009] In some embodiments of this application, based on the foregoing scheme, the template recommendation unit is configured to: obtain a session template matching the context information and the session content to be sent through at least one of the following methods: generate a session template matching the context information and the session content to be sent using an artificial intelligence algorithm; search for a session template matching the context information and the session content to be sent in a preset template library; search for a session template matching the context information and the session content to be sent in the target user's custom template library; determine the target session template among the various session templates matching the context information and the session content to be sent, and recommend the target session template to the target user.
[0010] In some embodiments of this application, based on the foregoing scheme, the template recommendation unit is configured to: display conversation templates recommended to the target user through a template recommendation page, wherein the template recommendation page is displayed based on the trigger operation of the target element in the chat window.
[0011] In some embodiments of this application, based on the foregoing scheme, the device is triggered to execute when one of the following triggering conditions is detected: a triggering operation on the target element in the chat window is detected; the template recommendation page is in a display state and new context information is generated in the current chat session; the template recommendation page is in a display state and the session content to be sent entered in the target user's chat window meets preset conditions.
[0012] In some embodiments of this application, based on the foregoing scheme, the device further includes an editing unit and a sending unit; after displaying the recommended conversation template to the target user through the template recommendation page, the editing unit is configured to: upon receiving an editing instruction for the conversation template, adjust the conversation template in the template recommendation page to an editable state so that the target user can edit the conversation template; the sending unit is configured to: upon receiving a sending instruction for the editing result of the conversation template, send the editing result of the conversation template obtained through the template recommendation page to the current chat session.
[0013] In some embodiments of this application, based on the foregoing scheme, the template recommendation unit is configured to: determine an original session template and template content to be recommended to the target user based on the context information and the session content to be sent; fill the original session template with the template content to obtain a final session template; and recommend the final session template to the target user.
[0014] In some embodiments of this application, based on the foregoing scheme, the template recommendation unit is configured to: extract at least one of the following information from the context information and the session content to be sent: entity information, intent information, and key information; and recommend a session template to the target user based on the extracted at least one piece of information.
[0015] In some embodiments of this application, based on the foregoing scheme, the template recommendation unit is configured to recommend conversation templates corresponding to each group of topic content in the overall context information to the target user, wherein the overall context information includes the context information and the conversation content to be sent, and the overall context information includes at least one group of topic content.
[0016] According to one aspect of the embodiments of this application, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method for recommending session templates as described in the above embodiments.
[0017] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the session template recommendation method as described in the above embodiments.
[0018] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium, a processor of a computer device reading the computer instructions from the computer-readable storage medium, and the processor executing the computer instructions, causing the computer device to perform the session template recommendation method as described in the above embodiments.
[0019] In some embodiments of this application, the technical solutions involve obtaining the context information of the current chat session and, when the target user in the current chat session has entered the content to be sent in their chat window, also obtaining the content to be sent. Finally, a chat template is recommended to the target user based on the context information and the content to be sent. Because the solution in this application can automatically recommend chat templates to the target user, it improves the efficiency of the user obtaining chat templates. Furthermore, because the solution in this application recommends chat templates based on both the context information and the content to be sent, the recommended chat templates are more likely to match the user's needs, thereby improving the accuracy of template recommendations.
[0020] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0022] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown;
[0023] Figure 2 A flowchart illustrating a method for recommending session templates according to an embodiment of this application is shown;
[0024] Figure 3 A schematic diagram illustrating the principle of reading and writing a preset template library according to an embodiment of this application is shown;
[0025] Figure 4 A schematic diagram illustrating the principle of reading and writing a custom template library according to an embodiment of this application is shown;
[0026] Figure 5 A schematic diagram of a chat window is shown according to an embodiment of this application when there is input content in the input box;
[0027] Figure 6 A schematic diagram of a template recommendation process according to an embodiment of this application is shown;
[0028] Figure 7 An embodiment according to this application is shown. Figure 2 A flowchart detailing step 230 in the embodiment;
[0029] Figure 8 An embodiment according to this application is shown. Figure 2 A flowchart detailing step 230 in the embodiment;
[0030] Figure 9 An embodiment according to this application is shown. Figure 2 A flowchart detailing step 230 in the embodiment;
[0031] Figure 10 A schematic diagram of a custom template management interface according to an embodiment of this application is shown;
[0032] Figure 11 A schematic diagram illustrating the addition of a custom template in a custom template management interface according to an embodiment of this application is shown;
[0033] Figure 12 A flowchart illustrating a method for recommending a session template to a target user based on context information and the session content to be sent, according to an embodiment of this application, is shown.
[0034] Figure 13 An embodiment according to this application is shown. Figure 7 A flowchart of the steps following step 230' in the embodiment;
[0035] Figure 14 A user interface according to an embodiment of this application is shown. Figure 5 The image shows a chat window after editing the recommended template titled "Movie Viewing Experience";
[0036] Figure 15 A user interface according to an embodiment of this application is shown. Figure 5 The image shows a chat window after editing and sending the recommended template titled "Movie Viewing Experience";
[0037] Figure 16 An embodiment according to this application is shown. Figure 2 Flowchart of the steps following step 210 in the embodiment;
[0038] Figure 17 A schematic diagram of a chat window is shown according to an embodiment of this application when the input box does not contain any input content;
[0039] Figure 18 A block diagram of a session template recommendation device according to an embodiment of this application is shown;
[0040] Figure 19 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0041] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0042] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0043] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0044] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0045] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0046] Currently, when users chat and communicate through communication tools, they can only manually type and send the conversation content word by word in most cases. This method not only has the problem of low communication efficiency, but also, because the sent conversation content is often not neat and concise, the recipient of the conversation content often needs to spend a considerable amount of time to understand the conversation content, thus also having the problem of low information transmission efficiency.
[0047] In related technologies, to improve communication and information transmission efficiency, predefined template functionality is provided, allowing users to select suitable templates from a predefined template library to quickly generate documents or messages. These predefined templates typically contain fixed fields and formatting requirements.
[0048] However, the inventors of this application have discovered the following drawbacks in the related technology:
[0049] 1. The scope of predefined templates is limited, while users' chat needs are diverse. This results in the inability to meet all possible office scenarios and user needs, meaning that the templates provided to users are not comprehensive enough.
[0050] 2. Predefined templates cannot be dynamically adjusted based on the context of the chat and the specific content of the user's input, which may result in the recommended template options not being accurate or personalized enough.
[0051] 3. Related technologies often require users to manually select templates, and cannot achieve automatic template recommendations. Users find it difficult to find the templates they need, resulting in low efficiency in obtaining templates.
[0052] 4. The relevant technology cannot automatically fill in the relevant information for the template based on the context or user input. Users need to select a template and then manually fill in the content, which is inefficient.
[0053] Therefore, this application first provides a method for recommending conversation templates. The method for recommending conversation templates based on the embodiments of this application can overcome the shortcomings of related technologies, such as limited range of predefined templates, inaccurate recommendations, and low efficiency, and can at least achieve the following advantages:
[0054] 1. Providing more comprehensive and personalized template options: The solution provided in this application dynamically generates template options related to the context and user input based on the chat context and the specific content of the user input. This provides more comprehensive and personalized template options to meet the needs of different scenarios and achieve accurate template recommendation.
[0055] 2. Context-Aware Recommendations: The solution provided in this application not only considers the content in the user input box but also comprehensively takes into account the context of the chat. By analyzing the context of the current conversation and the content in the user input box, the system can more accurately understand the user's intent and generate template options related to the current conversation, thereby more effectively meeting the user's needs.
[0056] 3. Streamlined Processes and Increased Efficiency: With intelligent template recommendations and automatic information filling, users can streamline the process, saving time and effort. Users only need to focus on editing and adjusting key information in the template, instead of writing and filling in everything from scratch.
[0057] The solutions in this application can be applied to various software with chat functions, such as instant messaging tools, and are especially suitable for enterprise-level instant messaging tools, thereby improving the efficiency of office communication in enterprise-level instant messaging tools. Below, we will introduce the solutions in this application using the application of the solutions in an instant messaging tool as an example.
[0058] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown. For example... Figure 1 As shown, the system architecture 100 may include a first user terminal 110, a second user terminal 130, and a cloud 120. The cloud 120 includes a backend server 121, a first database server 122, and a second database server 123. Both the first user terminal 110 and the second user terminal 130 have established communication connections with the backend server 121 in the cloud 120. The backend server 121 in the cloud 120 has also established connections with the first database server 122 and the second database server 123 in the cloud 120, respectively. A chat software (such as an instant messaging tool) server is deployed on the backend server 121. Each user terminal has a chat software client installed and running. A pre-set template library is deployed on the first database server 122, storing multiple pre-set templates. A custom template library is deployed on the second database server 123, storing at least one custom template for the first user of the first user terminal 110. The backend server 121 can be the execution entity of the scheme in this application embodiment. When the method for recommending conversation templates provided in this application embodiment is applied... Figure 1In the system architecture shown, a process can be as follows: First, the first user on the first user terminal 110 opens a chat window in the client interface of the chat software to chat with the second user on the second user terminal 130. At this time, a chat session between the two users is established in the chat software. Then, the first user on the first user terminal 110 and the second user on the second user terminal 130 chat through the established chat session, each entering the chat content through the input box in their own chat window and requesting to send the chat content to the other. The chat content is transmitted to the other party through the server of the backend server 121. The chat content sent by the user and the chat content received by the other party are displayed in the chat window. Next, when the first user on the first user terminal 110 clicks the specified button at the specified location in the chat window, it requests to open the template recommendation page. At this time, the server of the backend server 121 obtains the chat session. The system retrieves the context of the conversation content and, if the first user's chat window contains input, the system retrieves the input conversation content. Then, the server on the backend server 121 searches for candidate templates matching all the retrieved content in the preset template library of the first database server 122 and the custom template library of the second database server 123, based on the retrieved context and the input conversation content. It then identifies the target conversation template to be recommended from these candidate templates and saves the target conversation template. The server on the backend server 121 sends a notification message to the client on the first user terminal 110. The client on the first user terminal 110 sends a pull request to the backend server 121 based on the received notification message to retrieve the target conversation template from the backend server 121. Finally, the client on the first user terminal 110 loads the template recommendation page, which displays the retrieved target conversation template.
[0059] In some embodiments of this application, the client of the first user terminal 110 automatically uploads the chat content to the server of the backend server 121 when it is determined that there is input content in the input box of the first user's chat window.
[0060] In some embodiments of this application, a large language model is also provided on the backend server 121, and the backend server 121 also generates candidate templates that match the context of the obtained conversation content and the input conversation content by calling the large language model.
[0061] In some embodiments of this application, the context of the obtained session content and the input session content include multiple topics, and the server of the backend server 121 will determine the target session template corresponding to each topic.
[0062] In some embodiments of this application, the backend server 121 will determine multiple target session templates corresponding to each topic.
[0063] In some embodiments of this application, the server of the backend server 121 will also fill the target session template with template content based on the context of the obtained session content and the input session content. The client of the first user terminal 110 pulls the target session template filled with template content from the backend server 121.
[0064] In some embodiments of this application, a plurality of custom template libraries are deployed on the second database server 123, each custom template library corresponding to a user, and the plurality of custom template libraries include a custom template library corresponding to the second user, which stores at least one custom template of the second user of the second user terminal 130.
[0065] In some embodiments of this application, the first user and the second user are users who are friends in the chat software.
[0066] It should be understood that Figure 1 The number of user terminals and the number of backend servers and database servers in the cloud are merely illustrative. Depending on implementation needs, there can be any number of user terminals, and the number of backend servers and database servers in the cloud can also be arbitrary. That is, the number of user terminals and the number of database servers in the cloud can exceed two, and the backend servers can be a server cluster consisting of multiple servers.
[0067] It should be noted that, Figure 1 The illustration shown is merely one embodiment of this application. Although in Figure 1 In the embodiments of this application, each user terminal is a desktop computer. However, in other embodiments of this application, the user terminal can also be various types of terminal devices such as smartphones, laptops, tablets, vehicle terminals, portable wearable devices, and workstations, and the terminal types of different user terminals can be different. Figure 1 In the embodiment, there is only one database server for deploying the pre-built template library and the custom template library, but in other embodiments of this application, multiple database servers for deploying the pre-built template library and multiple database servers for deploying the custom template library can be set up; although Figure 1 The solution in this embodiment is applied to a scenario where two users chat directly through chat software. However, in other embodiments of this application, it can also be applied to scenarios where multiple users chat (such as group chats, chat rooms, etc.). Figure 1In the embodiment, the large language model is deployed on the same device as the chat software's server. However, in other embodiments of this application, the large language model can also be deployed on other devices in the cloud, or even on devices outside the cloud. In this case, the chat software's server can interact with the large language model by calling an interface. Figure 1 In the embodiment, the template recommendation page requires the user to click a designated button to open it. However, in other embodiments of this application, the template recommendation page can be permanently open within the chat window, meaning it can be embedded in the chat window and continuously displayed. This application does not limit this aspect, and the scope of protection of this application should not be restricted in any way.
[0068] It is easy to understand that the session template recommendation method provided in this application embodiment is generally executed by a server, and correspondingly, the session template recommendation device is generally set in the server. However, in other embodiments of this application, the terminal device may also have similar functions to the server, thereby executing the session template recommendation scheme provided in this application embodiment.
[0069] Therefore, the embodiments of this application can be applied to terminals or servers. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, and this application does not impose any restrictions.
[0070] As mentioned above, the solutions in this application can be applied to cloud computing scenarios. Cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, the resources in the "cloud" are infinitely scalable, readily available, on-demand, expandable, and pay-as-you-go.
[0071] As a provider of fundamental cloud computing capabilities, a cloud resource pool (referred to as a cloud platform, generally called an IaaS (Infrastructure as a Service) platform) is established. Various types of virtual resources are deployed in the resource pool for external customers to choose from. The cloud resource pool mainly includes: computing devices (virtualized machines containing operating systems), storage devices, and network devices.
[0072] Based on logical function, a PaaS (Platform as a Service) layer can be deployed on top of the IaaS (Infrastructure as a Service) layer, and a SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. Alternatively, SaaS can be deployed directly on top of IaaS. PaaS is a platform for running software, such as databases and web containers. SaaS refers to various types of business software, such as web portals and bulk SMS senders. Generally speaking, SaaS and PaaS are upper layers compared to IaaS.
[0073] The implementation details of the technical solutions in the embodiments of this application are described in detail below:
[0074] Figure 2 A flowchart illustrating a session template recommendation method according to an embodiment of this application is shown. This session template recommendation method can be executed by various devices with processing and computing capabilities. Specifically, it can be executed by a target device, such as a user terminal or a cloud server. User terminals include, but are not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, in-vehicle terminals, aircraft, smartwatches, etc. Please refer to... Figure 2 As shown, the recommended method for this session template includes at least the following steps:
[0075] Step 210: Obtain the context information of the current chat session. The context information is the conversation content that has been sent to the recipient in the current chat session.
[0076] Step 220: If the target user in the current chat session has entered the content to be sent in the chat window, obtain the content to be sent.
[0077] Step 230: Recommend a conversation template to the target user based on the context information and the conversation content to be sent.
[0078] In detail Figure 2 Before describing the steps in the embodiments, the design architecture of the backend system used in this application embodiment will be introduced, which may include the following modules:
[0079] 1. Template Library Management Module: Responsible for the management of the template library, including reading and writing of the preset template library and adding, deleting, modifying and querying of the custom template library.
[0080] 2. Template Recommendation Result Management Module: Responsible for managing template recommendation results, including adding, deleting, modifying, and querying template recommendation results.
[0081] 3. Template Recommendation Module: Receives the input content from the client's input box and the message context content from the message module, and uses artificial intelligence (AI) algorithms to perform template recommendations and obtain template recommendation results.
[0082] 4. Message module: Responsible for sending and receiving conversation messages, and provides a message push channel to support the background to actively push notification information to the client.
[0083] In addition to the modules mentioned above, the backend system used in this application embodiment may also include two databases: a preset template library and a custom template library. The preset template library stores multiple predefined conversation templates for the system. This library can be globally shared, meaning it is used for recommending conversation templates to all users. The custom template library stores one or more conversation templates specific to each user. The chat templates stored in the custom template library can be user-defined; therefore, multiple custom template libraries can be set up, with one library corresponding to each user. Custom template libraries do not need to be shared between users; that is, a user's custom template library may not be accessible to other users. When recommending chat templates to a user, only conversation templates from that user's custom template library can be used, without using conversation templates from other users' custom template libraries.
[0084] Of course, the same custom templates for different users can be stored together to save space.
[0085] Figure 3 A schematic diagram illustrating the principle of reading and writing a preset template library according to an embodiment of this application is shown. Please refer to... Figure 3 As shown, system administrators (such as members of the instant messaging tool's development team) can perform read and write operations (CRUD operations) on the pre-built template library through the template library management module of the backend system. User read and write operations on the pre-built template library are not supported. In other words, the template library management module verifies the identity information of the requester seeking access to the pre-built template library. Since only system administrators can pass the verification when requesting access, ordinary users cannot pass the verification and therefore do not have permission to access the pre-built template library. Figure 3The document also shows a template recommendation module capable of reading from the template library management module. This module resides in the backend system. When recommending session templates, the template recommendation module can query the preset template library through the template library management module.
[0086] Figure 4 A schematic diagram illustrating the principle of reading and writing a custom template library according to an embodiment of this application is shown. Please refer to... Figure 4 As shown, the client of the instant messaging tool used by the user can perform read and write operations such as adding, deleting, modifying, and querying the custom template library through the template library management module of the backend system; 2. When recommending templates, the module recommendation module in the backend can query the custom template library through the template library management module.
[0087] It should be noted that although the backend system in this embodiment only includes one template library management module, and both client read / write operations on the custom template library and system administrator read / write operations on the preset template library are implemented through the same template library management module, in other embodiments of this application, two template library management modules can be set up. One template library management module is used for client read / write operations on the custom template library, and the other template library management module is used for system administrator read / write operations on the preset template library. The advantage of doing so is that since the template library management module used for client read / write operations on the custom template library cannot be used for read / write operations on the preset template library, the template library management module does not need to verify the identity of the requester, which ensures the security and reliability of the system in terms of software architecture.
[0088] In detail Figure 2 Before the steps shown in the embodiment, let's first introduce... Figure 2 The steps preceding the steps shown.
[0089] In one embodiment of this application, the method for recommending conversation templates is triggered when one of the following conditions is detected: a trigger operation on a target element in the chat window is detected; the template recommendation page is displayed and new context information is generated in the current chat session; the template recommendation page is displayed and the conversation content to be sent entered in the target user's chat window meets preset conditions.
[0090] The target element can be a button or other space. When a user clicks on the target element, the recommended method of the session template provided in this application embodiment can be triggered.
[0091] In essence, each user of an instant messaging tool has a corresponding account, and within the tool, user and account can be considered equivalent. Each user can open chat windows corresponding to different chat sessions through the tool's front-end interface.
[0092] Figure 5 This diagram illustrates a chat window when input content is present in the input field, according to an embodiment of this application. Please refer to... Figure 5 As shown, it displays the chat window of the current chat session. The left side of the chat window includes a context information display area at the top and an input box at the bottom. The content displayed in the context information display area shows that the current chat session is a group chat of a team communication group. All users in this group chat can send session content (session messages) to the current chat session through the input box in their chat window. In this way, new context information, i.e., new messages, will be generated in the current chat session. Figure 5 The conversation content displayed in the input box of the chat window shown is the conversation content entered by the user corresponding to the chat window into the input box. This conversation content is to be sent to the team communication group. Figure 5 The chat window shown has a button in the upper right corner of the input box to open the template recommendation page. When the user clicks this button, the template recommendation page will open, triggering the session template recommendation method provided in this embodiment, i.e., triggering a calculation process for session template recommendation. Please continue to see... Figure 5 As shown, the right side of the chat window is the template recommendation page that opens after the user clicks the button located in the upper right corner of the input box. It is used to display the conversation templates recommended to the user corresponding to the chat window, i.e., the chat templates.
[0093] It is easy to understand that if the session template recommendation method provided in this application embodiment is triggered simultaneously with the opening of the template recommendation page when the user triggers the target element, the template recommendation page will open immediately, while the execution of the session template recommendation method will take some time. Since the session templates recommended to the user generated by the execution of the session template recommendation method need to be displayed on the template recommendation page, the template recommendation page may not immediately display the recommended session templates after being opened, thus giving the user a feeling of lag and affecting the user experience. Therefore, a transition animation can be set for opening the template recommendation page. When the user triggers the target element, the transition animation can be played first, and the template recommendation page can be fully opened after the transition animation finishes playing. At this time, the session templates recommended to the user have also been basically calculated. The session templates recommended to the user can be displayed immediately when the template recommendation page is fully opened, which can reduce the feeling of lag that the user can perceive, thereby improving the user experience.
[0094] It is easy to understand that, in practical application of the solution provided in this application embodiment, the session template recommendation method provided in this application embodiment will only be triggered when a triggering operation on the target element in the chat window is detected if the template recommendation page is not in the display state; if the template recommendation page is in the display state, the session template recommendation method provided in this application embodiment will not be triggered even if a triggering operation on the target element in the chat window is detected.
[0095] Furthermore, the execution of the session template recommendation method provided in this application embodiment is not guaranteed each time a user opens the template recommendation page. For example, if a user opens the template recommendation page, closes it, and then reopens it, and the context information of the current chat session and the content entered in the input box of the chat window remain unchanged during the time between closing and reopening the template recommendation page, then when the template recommendation page is reopened, the execution of the session template recommendation method provided in this application embodiment may not be triggered. Instead, the user can be directly recommended the session template that was previously recommended by triggering the execution of the session template recommendation method provided in this application embodiment, thus saving computing resources.
[0096] When a user remains on the template recommendation page and there is a new message in the current chat session, a calculation process for recommending a chat template can be triggered; when a user remains on the template recommendation page and the chat content entered by the user in the input box of the current chat meets the preset conditions, a calculation process for recommending a chat template can also be triggered.
[0097] Since the content users enter in the input box of the current session is often dynamically changing—for example, they might only enter one character at a time—if a calculation process for recommending session templates is triggered every time a character is entered, it would generate many useless calculations and waste a lot of computing resources. Therefore, by setting preset conditions, the calculation process for recommending session templates is only triggered when the content entered by the user in the input box of the current session meets the preset conditions, which can effectively save computing resources.
[0098] The preset conditions can be varied. For example, a preset condition could be that the length of the newly added conversation content in the input box of the current conversation reaches a preset length compared to the length of the conversation content in the input box when the calculation process for conversation template recommendation was last triggered. Alternatively, it could be that the time elapsed since the last triggering of the calculation process for conversation template recommendation has reached a predetermined time. Or it could be that both the sub-condition of the length of the newly added conversation content in the input box of the current conversation compared to the length of the conversation content in the input box when the calculation process for conversation template recommendation was last triggered and the sub-condition of the time elapsed since the last triggering of the calculation process for conversation template recommendation are considered to be met. If either sub-condition is met, the preset condition is considered to be met.
[0099] It is easy to understand that although the method for recommending conversation templates in this application embodiment is triggered after the template recommendation page is opened, in other embodiments of this application, it can also be triggered without opening the template recommendation page. For example, the triggering condition of the method for recommending conversation templates can be simply that new context information is generated in the current chat session or that the conversation content to be sent entered in the target user's chat window meets the preset conditions, without including the condition that the template recommendation page is in a display state. Although the template recommendation page in this embodiment requires the user to open it manually, in other embodiments of this application, the template recommendation page can be opened automatically when chat template recommendations are needed. It can even be set as a fixed display area on the front end, continuously displaying the template recommendation page, and the recommended conversation templates on the template recommendation page can be dynamically updated. Furthermore, a toggle switch can be set in the chat window of the instant messaging tool to switch whether to allow the automatic opening of the template recommendation page. When the toggle switch is switched to allow automatic opening of the template recommendation page, the template recommendation page can be automatically opened and the conversation template recommendation method can be triggered when new context information is generated in the current chat session, or when conversation content to be sent is entered in the target user's chat window. The template recommendation page will also be used to recommend conversation templates.
[0100] Below is a detailed introduction. Figure 2 The steps are shown in the example.
[0101] In step 210, the context information of the current chat session is obtained. The context information is the session content that has been sent to the recipient in the current chat session.
[0102] The context information of the current chat session can be obtained from the message module by the template recommendation module.
[0103] Each session can consist of a single message sent by the user. The context information of the current chat session can include... Figure 5The conversation content displayed in the context information area at the top left of the chat window, also known as the conversation record, is the content of the conversation. Each user in the current chat conversation is both a sender and a receiver. If a piece of conversation content is successfully sent and received, then it becomes the context information.
[0104] Contextual information can include both text and voice information.
[0105] The context information of the current chat session may contain a small amount of conversation content or a large amount of content. When the context information contains a large amount of content, it's more efficient to retrieve only a portion of the current chat session's context information to conserve resources. This is because users often only need conversation template recommendations based on a subset of the current chat session's context information. Recommending conversation templates based on all the context information of the current chat session would not only waste computing resources but also degrade the user experience, as users often have to spend time searching for the template they need due to the large number of recommended templates.
[0106] Therefore, it is possible to obtain only a portion of all context information of the current chat session to recommend a session template, and this portion can be the part of all context information of the current chat session whose generation time is closest to the current time.
[0107] Therefore, a filter can be set to extract the desired context information from the current chat session's context information. This filter can be a predetermined number of recently generated session content items within the context information, or it can be session content generated within a recently predetermined time range within the context information, or it can be the session content displayed in the context information's display area.
[0108] In addition, users can customize the number of reservations or the recent reservation time range in the filter conditions to meet their personalized needs.
[0109] Of course, you can also set an option in the instant messaging tool that allows users to choose whether the instant messaging tool uses all the context information of the current chat session or only a portion of the context information of the current chat session to recommend a chat template.
[0110] In step 220, if the target user in the current chat session has entered the content to be sent in the chat window, the content to be sent is obtained.
[0111] If the target user's chat window contains text to be sent, the instant messaging client can upload that text.
[0112] Whether there is any conversation content to be sent in the input box of the target user's chat window can be determined by the client of the instant messaging tool, or by the execution subject of this application embodiment.
[0113] Figure 6 A schematic diagram of a template recommendation process according to an embodiment of this application is shown.
[0114] Please see Figure 6 As shown, the template recommendation process is as follows: First, when a user opens the template recommendation page, or stays on the template recommendation page and there is a new message in the current chat session, or the user enters content in the input box of the current chat session, the template recommendation calculation will be started; then, the template recommendation module obtains the message context from the message module and obtains the input box content (i.e., the conversation content to be sent) from the client, and adds the input box content to the message context information, thereby obtaining the overall context information including the input box content and the message context.
[0115] Please continue reading Figure 5 As shown, the information in the input box of the chat window is the content of the conversation to be sent.
[0116] In step 230, a session template is recommended to the target user based on the context information and the session content to be sent.
[0117] In this embodiment of the application, the entirety including context information and the session content to be sent can be regarded as the overall context information, and a session template matching the overall context information can be recommended to the target user based on the overall context information.
[0118] A conversation template is a formatted, standardized text that is concise and intuitive, helping users convey conversation content clearly and intuitively. A conversation template can include several "title-description" pairs, where the description can be replaced with placeholders such as spaces.
[0119] In one embodiment of this application, recommending a session template to a target user based on context information and the session content to be sent includes: generating a session template that matches the context information and the session content to be sent using an artificial intelligence algorithm, and recommending the session template to the target user.
[0120] Artificial intelligence algorithms can be large language models (LLMs).
[0121] Large language models can be language models with over 1 billion parameters. They represent a major breakthrough in artificial intelligence in recent years, and are Natural Language Processing (NLP) models developed based on deep learning techniques, particularly the Transformer architecture. These models learn from massive amounts of text data, mastering the latent patterns and rules of language, thus gaining the ability to generate and understand natural language.
[0122] When contextual information includes speech information, conversation templates can be generated and recommended directly based on speech information using a multimodal large model. Alternatively, speech information can be converted into text information first, and then conversation templates can be generated and recommended based on the text information using a large language model.
[0123] By leveraging generative large language models for conversation template generation and recommendation, more accurate, comprehensive, and personalized template options can be provided to meet the needs of different scenarios.
[0124] When a generative large language model generates and recommends conversation templates, it can also provide a setting option that allows users to set the style of the conversation templates to be generated. When recommending conversation templates to users, the style of the conversation templates to be generated can be input into the large language model as prompt words, thereby generating conversation templates that correspond to the style required by the user.
[0125] The style of a conversation template refers to how it is expressed. For example, it can be a business style or a casual style. Thanks to the capabilities of large language models, various styles of conversation templates can be generated using generative large language models.
[0126] Figure 7 An embodiment according to this application is shown. Figure 2 A flowchart detailing step 230 in the embodiment is provided. Please refer to [link / reference]. Figure 7 As shown, recommending a session template to the target user based on context information and the session content to be sent may specifically include the following steps:
[0127] In step 231, a session template matching the context information and the session content to be sent is obtained through at least one of the following methods: generating a session template matching the context information and the session content to be sent using an artificial intelligence algorithm; searching for a session template matching the context information and the session content to be sent in a preset template library; or searching for a session template matching the context information and the session content to be sent in the target user's custom template library.
[0128] A session template matching the overall context information, including context information and the session content to be sent, can be obtained through any of the above methods.
[0129] In practical applications, a session template that matches the overall context information can be obtained through all of the above methods.
[0130] Artificial intelligence algorithms can be large language models.
[0131] In one embodiment of this application, recommending a session template to a target user based on context information and the session content to be sent includes: extracting at least one of the following information from the context information and the session content to be sent: entity information, intent information, and key information; and recommending a session template to the target user based on the extracted information.
[0132] The steps in this embodiment can also be sub-steps of step 231, which involves generating a session template that matches the context information and the session content to be sent using an artificial intelligence algorithm.
[0133] It can simultaneously extract entity information, intent information, and key information, and recommend conversation templates to target users based on all the extracted information.
[0134] The specific details of the embodiments of this application are described below.
[0135] After obtaining the overall context information, including context information and the session content to be sent, the overall context information can be processed through the following steps:
[0136] a) Text preprocessing: Preprocessing the text to provide overall contextual information, including word segmentation, stop word removal, and part-of-speech tagging. Word segmentation algorithms can be jieba or NLTK, used to divide the input text into words.
[0137] b) Entity recognition: Using entity recognition algorithms, such as Named Entity Recognition (NER), to identify entities in the overall context, such as names of people, places, and times.
[0138] c) Intent recognition: Use intent recognition algorithms, such as text classification models (e.g., SVM, deep learning models, etc.) or sequence labeling models (e.g., CRF, etc.), to determine the intent and purpose involved in the overall context information.
[0139] d) Key information extraction: Use keyword extraction algorithms (such as TF-IDF, TextRank, etc.) or other techniques to extract keywords and important context information contained in the overall context.
[0140] After context processing, the output is as follows: Extracted entity information: Identified entity information, such as names of people, places, and times; User intent: Used to determine the intent and purpose involved in the overall context information; Key information: Extracted keywords and important context.
[0141] These outputs can be used for matching session templates, dynamically generating session templates, or other related processing and responses.
[0142] Before generating a template, you can predefine the template's structure and field rules. For example, a movie review template might include fields for movie name, viewing time, rating, and comments. You can then determine the data type, length limits, and other constraints for each field.
[0143] After obtaining the structure and field rules of a predefined template, a conversation template can be dynamically generated based on the predefined rules or template generation algorithm, according to the output content obtained from context processing. For example, conditional statements, rule engines, or other algorithms such as machine learning can be used to generate conversation templates. For instance, a rule engine can be used to generate different template structures and fields based on different intentions and key information. Alternatively, machine learning-based methods, such as sequence generation models or generative adversarial networks (GANs), can be used to generate conversation templates based on the output content understood from the context. Furthermore, the structure and field rules of the predefined template, along with the output content obtained from context processing, can be input into a large language model to generate conversation templates.
[0144] After obtaining the above output content through context processing, the session templates that match the output content and the overall context information can be searched in the preset template library and the target user's custom template library, respectively.
[0145] This can be achieved through methods such as text similarity calculation, keyword matching, machine learning models, or artificial intelligence algorithms such as large language templates.
[0146] Please continue reading Figure 7 In step 232, the target session template is determined from the various session templates that match the context information and the session content to be sent, and the target session template is recommended to the target user.
[0147] Multiple target session templates can be recommended to the target user.
[0148] One or more target conversation templates can be randomly selected from all conversation templates that match the overall context information. Alternatively, other large language models can be used to select the conversation template that best matches the overall context information from all conversation templates that match the overall context information. These other large language models can be large language models other than those used to generate chat templates. Furthermore, other machine learning algorithms can be used to determine the matching score of each conversation template that matches the overall context information. Then, based on the matching score and other factors, all conversation templates that match the overall context information are scored and sorted according to the score. The most suitable conversation template is then found based on the sorting result.
[0149] Figure 8 An embodiment according to this application is shown. Figure 2 A flowchart detailing step 230 in the embodiment is provided. Please refer to [link / reference]. Figure 8 As shown, recommending a conversation template to the target user based on context information and the conversation content to be sent may also include the following steps:
[0150] In step 230', a recommended conversation template is displayed to the target user through a template recommendation page, which is displayed based on the triggered operation of the target element in the chat window.
[0151] The session templates recommended to the target user can be stored in memory.
[0152] Please continue reading Figure 5 As shown, the right side of the chat window is the template recommendation page that opens after the user clicks the button located in the upper right corner of the input box. This template recommendation page displays conversation templates recommended to the target user, and the user can also search among the recommended conversation templates.
[0153] Figure 9 An embodiment according to this application is shown. Figure 2 A flowchart detailing step 230 in the embodiment is provided. Please refer to [link / reference]. Figure 9 As shown, recommending a conversation template to the target user based on context information and the conversation content to be sent may also include the following steps:
[0154] In step 230", a conversation template corresponding to each group of topic content in the overall context information is recommended to the target user. The overall context information includes context information and conversation content to be sent, and the overall context information includes at least one group of topic content.
[0155] The overall context information may include one or more sets of topic content. A set of topic content refers to the conversation content related to a topic or theme. A set of topic content may include one or more sets of conversation content.
[0156] It can recommend one or more corresponding conversation templates for each group of topics.
[0157] Since conversation templates typically need to correspond to topics, recommending conversation templates that correspond to each set of topic content in the overall context to the target user can make conversation template recommendations more accurate and refined.
[0158] Typically, the content to be sent in a chat box belongs to a single topic. Therefore, a corresponding conversation template can be recommended separately for the content to be sent in the overall context.
[0159] Please continue reading Figure 5 As shown, the conversation content to be sent in the chat box belongs to the topic of "movie viewing experience". Therefore, a conversation template named "movie viewing experience" is recommended. Through analysis, it is determined that there is a topic of "movie recommendation" in the context information. Therefore, a conversation template named "movie recommendation" is recommended.
[0160] It's easy to understand; the order in which recommended conversation templates are arranged can correspond to the order in which the conversation content is generated. For example, the conversation content to be sent in the overall context information can be placed at the top of the template recommendation page, with the conversation templates corresponding to each group of topics in the overall context information arranged below. The later the topic content in the overall context information is generated, the higher its corresponding conversation template can be ranked.
[0161] Figure 10 A schematic diagram of a custom template management interface according to an embodiment of this application is shown. Please refer to... Figure 10 As shown, the right side of the chat window actually includes tab components corresponding to the template recommendation page and the custom template management interface, respectively. Users can switch between the custom template management interface and the template recommendation page by clicking the tab components. When a user clicks the tab component corresponding to the custom template management interface, the custom template management interface will open. The conversation templates displayed here are only visible and effective to the current user and are stored in the current user's custom template library.
[0162] Users can perform operations such as editing, deleting, adding, and querying. A sharing option can also be set for the custom template management interface, allowing a user to share their custom templates with friends and other users.
[0163] Figure 11 This diagram illustrates adding a custom template in a custom template management interface according to an embodiment of this application. Please refer to... Figure 11As shown, after adding a custom template, the user can save it. Figure 10 and Figure 11 As you can see, the template content of a custom template can include a template title and multiple lines of data. Each line of data can be of two types: the first is plain text, and the second is a "title-description" pair. The title and description are both in plain text format and can be separated by a colon. The description can be replaced with placeholders such as spaces to allow for content filling.
[0164] In a way that is easy to understand, the conversation templates recommended by the template recommendation page can be obtained through one of several methods. The method of obtaining the conversation template can be marked on the template recommendation page. Then, for conversation templates generated by artificial intelligence algorithms and those searched in the pre-set template library, the template recommendation page can provide corresponding save options. Target users can use the save option to save the recommended conversation templates to custom templates in the custom template library with one click.
[0165] A synchronization option can be set on the template recommendation page, and users can also synchronize the recommended conversation templates to their notes or to-do schedules with one click.
[0166] The recommended conversation templates can also be synchronized to the cloud. Once approved by the system administrator, these conversation templates can be synchronized to the pre-set template library for storage. Alternatively, they can be reviewed by the large model first, and then by the system administrator.
[0167] Figure 12 A flowchart illustrating a method for recommending a session template to a target user based on context information and the session content to be sent, according to an embodiment of this application, is shown. Please refer to... Figure 12 As shown, recommending a session template to the target user based on context information and the session content to be sent can include the following process:
[0168] In step 1210, the original session template and template content to be recommended to the target user are determined based on the context information and the session content to be sent.
[0169] The output content obtained after context processing can be used as template content, or the overall context information can be directly input into the large language model, and the large language model can output template content.
[0170] In step 1220, the template content is filled into the original session template to obtain the final session template.
[0171] The output obtained through context processing can be automatically filled into the corresponding fields of the original session template to generate the final session template.
[0172] Specifically, techniques such as string replacement, template engines, or large language models can be used to achieve automatic filling.
[0173] For example, suppose the output obtained through context processing includes the movie title, viewing time, and rating entered by the user. If a movie review template is matched, which contains movie title, viewing time, rating, and comment fields, the system can automatically populate the corresponding fields with the output obtained from the context processing. Specifically, the system can populate the movie title field in the template with the user-entered movie title, the viewing time with the viewing time field, and the rating with the rating field. If the user also provides a comment, the system can also populate the comment field with that comment.
[0174] By automatically populating template content, the system can quickly generate a complete movie review template, which includes key information and intent provided by the user. This eliminates the need for users to manually enter each field; instead, the template is quickly generated and further processed or displayed through contextual understanding and auto-fill. The populated content can then be validated and processed according to field rules and constraints.
[0175] Please continue reading Figure 5 As shown, the user entered some content in the input box, and the system recommended a conversation template named "Movie Viewing Experience," automatically filling in the "Summary" in the first line and the "Movie Title" in the second line. Simultaneously, based on the context of the conversation, the system recommended a "Movie Recommendation" template, automatically filling in key information such as "Recommended Movie Title," "Reason for Recommendation," and "Related Actors or Directors."
[0176] In step 1230, the final session template is recommended to the target user.
[0177] Please continue reading Figure 6 As shown, after obtaining the overall context information, including the input box content and message context, the template recommendation module obtains key information, intent, and other output content through context understanding. Then, through template generation and template matching, it obtains a conversation template that matches the overall context information. Next, the system automatically fills in the template content to obtain the recommendation result, and saves the recommendation result through the template recommendation result management module. Finally, the backend notifies the client to update the result through the message module, that is, the client has completed the template recommendation calculation, and the template recommendation result management module has generated the updated recommendation result.
[0178] When the client receives a notification from the messaging module, it will request the template recommendation results from the backend template recommendation results management module and display them to the user for selection or editing. The user can choose to accept the template and send it, or continue editing a custom template.
[0179] Figure 13 An embodiment according to this application is shown. Figure 7 A flowchart of the steps following step 230' in the embodiment. Please refer to [link / reference]. Figure 13 As shown, after displaying recommended conversation templates to target users through the template recommendation page, the method may further include the following steps:
[0180] In step 250, when an edit instruction for the conversation template is received, the conversation templates on the template recommendation page are made editable so that the target user can edit the conversation templates.
[0181] Figure 14 A user interface according to an embodiment of this application is shown. Figure 5 The image shows a screenshot of the chat window after editing the recommended template titled "Movie Viewing Experience." Please see below. Figure 14 As shown, users can further edit the conversation templates on the template recommendation page and enter the content they want to input.
[0182] Please continue reading Figure 13 As shown, in step 260, when a command to send the editing result of the conversation template is received, the editing result of the conversation template obtained through the template recommendation page is sent to the current chat conversation.
[0183] Please continue reading Figure 14 As shown, when the conversation template is in an editable state, it displays "Send" and "Cancel" buttons. The user can trigger the sending command by clicking the "Send" button.
[0184] Figure 15 A user interface according to an embodiment of this application is shown. Figure 5 The image shows a screenshot of the chat window after editing and sending the recommended template titled "Movie Viewing Experience". Please see below. Figure 15 As shown, when the user clicks the "Send" button, the edited result of the conversation template will be sent directly to the current chat conversation. At this time, the conversation content to be sent in the input box can be cleared at the same time. That is, the conversation content to be sent in the input box will be replaced by the edited result of the conversation template and sent to the current chat conversation.
[0185] Figure 16 An embodiment according to this application is shown. Figure 2 A flowchart of the steps following step 210 in the embodiment. Please refer to [link / reference]. Figure 16 As shown, after obtaining the context information of the current chat session, the method for recommending a session template may further include the following steps:
[0186] In step 240, if no message content to be sent is entered in the chat window of the target user in the current chat session, a chat template is recommended to the target user based on the context information.
[0187] In other words, if there is no content to be sent in the input box of the target user's chat window, a conversation template is recommended to the target user directly based on the context information.
[0188] Recommending session templates to target users based on context information can be performed in the same way as recommending session templates to target users based on context information and the session content to be sent in the previous embodiment, and will not be described again here.
[0189] Figure 17 This diagram illustrates a chat window according to an embodiment of the present application when the input field does not contain any input content. Please refer to [link to relevant documentation]. Figure 17 As shown, when there is no content to be sent in the input box of the target user's chat window, a conversation template corresponding to each topic in the context information can be recommended to the target user. The conversation templates are arranged in chronological order of their corresponding topic content on the template recommendation page; the later the topic content was generated, the higher the corresponding conversation template appears on the template recommendation page. Clearly, Figure 17 The context information shown includes two topics: "movie recommendations" and "mountain climbing plans".
[0190] In summary, the recommended method for session templates provided in the embodiments of this application can achieve at least the following technical effects:
[0191] 1. Improve user experience: By understanding context and dynamically generating templates, the system can more accurately understand the user's intent and needs, generate template content that meets the user's expectations, and thus provide a better user experience.
[0192] 2. Improve work efficiency: Using dynamically generated templates and automatically populated template content can reduce the amount of manual input for users, save time and effort, and improve work efficiency.
[0193] 3. Personalization and flexibility: By dynamically generating templates based on contextual understanding, personalized templates can be generated according to the needs of different users and scenarios, meeting specific user requirements and providing more flexible template selection and filling methods.
[0194] 4. Accuracy and consistency: By automatically filling in template content, the workload required for users to chat is greatly reduced, human error and omissions can be reduced, the accuracy and consistency of template content can be ensured, and the quality and reliability of information can be improved.
[0195] 5. Automated processing: Through contextual understanding and template matching, the system can automatically select and apply appropriate templates, reducing manual intervention and realizing an automated template generation and filling process.
[0196] In summary, the beneficial effects of the solutions provided in this application include improved user experience, increased work efficiency, personalization and flexibility, accuracy and consistency, and automated processing. These effects can help users complete tasks more easily, improve work efficiency and accuracy, and provide a better user experience.
[0197] The following describes an apparatus embodiment of this application, which can be used to execute the session template recommendation method in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the session template recommendation method described above.
[0198] Figure 18 A block diagram of a recommended device for a session template according to an embodiment of this application is shown. (Refer to...) Figure 18 As shown, a conversation template recommendation device 1800 according to an embodiment of this application includes: a context information acquisition unit 1810, a conversation content to be sent acquisition unit 1820, and a template recommendation unit 1830. The context information acquisition unit 1810 is used to acquire context information of the current chat conversation, wherein the context information is the conversation content already sent to the recipient in the current chat conversation; the conversation content to be sent acquisition unit 1820 is used to acquire the conversation content to be sent if the target user in the current chat conversation window has entered the conversation content to be sent; the template recommendation unit 1830 is used to recommend conversation templates to the target user based on the context information and the conversation content to be sent.
[0199] In some embodiments of this application, based on the foregoing scheme, after obtaining the context information of the current chat session, the template recommendation unit 1830 is further configured to: recommend a chat template to the target user based on the context information if no chat content to be sent is entered in the chat window of the target user in the current chat session.
[0200] In some embodiments of this application, based on the foregoing scheme, the template recommendation unit 1830 is configured to: obtain a session template matching the context information and the session content to be sent through at least one of the following methods: generating a session template matching the context information and the session content to be sent using an artificial intelligence algorithm; searching for a session template matching the context information and the session content to be sent in a preset template library; searching for a session template matching the context information and the session content to be sent in the target user's custom template library; determining a target session template among the various session templates matching the context information and the session content to be sent, and recommending the target session template to the target user.
[0201] In some embodiments of this application, based on the foregoing scheme, the template recommendation unit 1830 is configured to: display a session template recommended to the target user through a template recommendation page, wherein the template recommendation page is displayed based on a trigger operation on a target element in the chat window.
[0202] In some embodiments of this application, based on the foregoing scheme, the device is triggered to execute when one of the following triggering conditions is detected: a triggering operation on the target element in the chat window is detected; the template recommendation page is in a display state and new context information is generated in the current chat session; the template recommendation page is in a display state and the session content to be sent entered in the target user's chat window meets preset conditions.
[0203] In some embodiments of this application, based on the foregoing scheme, the device further includes an editing unit and a sending unit; after displaying the recommended conversation template to the target user through the template recommendation page, the editing unit is configured to: upon receiving an editing instruction for the conversation template, adjust the conversation template in the template recommendation page to an editable state so that the target user can edit the conversation template; the sending unit is configured to: upon receiving a sending instruction for the editing result of the conversation template, send the editing result of the conversation template obtained through the template recommendation page to the current chat session.
[0204] In some embodiments of this application, based on the foregoing scheme, the template recommendation unit 1830 is configured to: determine an original session template and template content to be recommended to the target user based on the context information and the session content to be sent; fill the original session template with the template content to obtain a final session template; and recommend the final session template to the target user.
[0205] In some embodiments of this application, based on the foregoing scheme, the template recommendation unit 1830 is configured to: extract at least one of the following information from the context information and the session content to be sent: entity information, intent information, key information; and recommend a session template to the target user based on the extracted at least one piece of information.
[0206] In some embodiments of this application, based on the foregoing scheme, the template recommendation unit 1830 is configured to recommend conversation templates corresponding to each group of topic content in the overall context information to the target user, wherein the overall context information includes the context information and the conversation content to be sent, and the overall context information includes at least one group of topic content.
[0207] Figure 19 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.
[0208] It should be noted that, Figure 19 The computer system 1900 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0209] like Figure 19 As shown, the computer system 1900 includes a Central Processing Unit (CPU) 1901, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1902 or programs loaded from storage portion 1908 into Random Access Memory (RAM) 1903, such as performing the methods described in the above embodiments. Various programs and data required for system operation are also stored in RAM 1903. The CPU 1901, ROM 1902, and RAM 1903 are interconnected via bus 1904. An Input / Output (I / O) interface 1905 is also connected to bus 1904.
[0210] The following components are connected to I / O interface 1905: input section 1906 including keyboard, mouse, etc.; output section 1907 including cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; storage section 1908 including hard disk, etc.; and communication section 1909 including network interface card, modem, etc. Communication section 1909 performs communication processing via a network such as the Internet. Drive 1910 is also connected to I / O interface 1905 as needed. Removable media 1911, such as disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1910 as needed so that computer programs read from them can be installed into storage section 1908 as needed.
[0211] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1909, and / or installed from removable medium 1911. When the computer program is executed by central processing unit (CPU) 1901, it performs various functions defined in the system of this application.
[0212] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0213] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0214] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0215] In one aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0216] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0217] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.
[0218] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0219] The data collection and processing plan outlined in this application must be implemented in strict accordance with the requirements of relevant national laws and regulations, obtaining the informed consent or separate consent of the data subject (or having a legal basis as stipulated by the relevant national laws and regulations), and conducting subsequent data use and processing within the scope authorized by laws and regulations and the data subject.
[0220] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for recommending conversation templates, characterized in that, The method includes: Obtain the context information of the current chat session, wherein the context information is the session content that has been sent to the recipient in the current chat session; If the target user in the current chat session has entered the content to be sent in their chat window, retrieve the content to be sent. Based on the context information and the session content to be sent, a session template is recommended to the target user.
2. The method for recommending conversation templates according to claim 1, characterized in that, After obtaining the context information of the current chat session, the method further includes: If no message content is entered in the chat window of the target user in the current chat session, a chat template is recommended to the target user based on the context information.
3. The method for recommending conversation templates according to claim 1, characterized in that, The step of recommending a session template to the target user based on the context information and the session content to be sent includes: A conversation template matching the context information and the conversation content to be sent can be obtained through at least one of the following methods: generating a conversation template matching the context information and the conversation content to be sent using an artificial intelligence algorithm; searching for a conversation template matching the context information and the conversation content to be sent in a preset template library; or searching for a conversation template matching the context information and the conversation content to be sent in the target user's custom template library. The target session template is determined from among the various session templates that match the context information and the session content to be sent, and the target session template is recommended to the target user.
4. The method for recommending conversation templates according to claim 1, characterized in that, The step of recommending a session template to the target user based on the context information and the session content to be sent includes: A template recommendation page is used to display conversation templates recommended to the target user. The template recommendation page is displayed based on the triggering operation of the target element in the chat window.
5. The method for recommending conversation templates according to claim 4, characterized in that, The method is triggered upon detecting one of the following conditions: A trigger operation on the target element in the chat window was detected; The template recommendation page is detected to be in a display state and new context information has been generated in the current chat session; The template recommendation page is detected to be in display mode and the conversation content to be sent entered in the target user's chat window meets the preset conditions.
6. The method for recommending conversation templates according to claim 4, characterized in that, After displaying recommended conversation templates to the target user via a template recommendation page, the method further includes: When an edit instruction for the conversation template is received, the conversation template in the template recommendation page is adjusted to an editable state so that the target user can edit the conversation template; When a command to send the editing result of the conversation template is received, the editing result of the conversation template obtained through the template recommendation page will be sent to the current chat conversation.
7. The method for recommending conversation templates according to claim 1, characterized in that, The step of recommending a session template to the target user based on the context information and the session content to be sent includes: Based on the context information and the session content to be sent, determine the original session template and template content to be recommended to the target user; The template content is then filled into the original conversation template to obtain the final conversation template; The final session template is recommended to the target user.
8. The method for recommending conversation templates according to claim 1, characterized in that, The step of recommending a session template to the target user based on the context information and the session content to be sent includes: Extract at least one of the following information from the context information and the session content to be sent: entity information, intent information, and key information; A conversation template is recommended to the target user based on the extracted at least one piece of information.
9. The method for recommending conversation templates according to any one of claims 1-8, characterized in that, The step of recommending a session template to the target user based on the context information and the session content to be sent includes: The system recommends conversation templates corresponding to each set of topic content in the overall context information to the target user. The overall context information includes the context information and the conversation content to be sent, and the overall context information includes at least one set of topic content.
10. A device for recommending conversation templates, characterized in that, The device includes: A context information acquisition unit is used to acquire the context information of the current chat session, wherein the context information is the session content that has been sent to the receiver in the current chat session; The pending session content acquisition unit is used to acquire the pending session content if the target user in the current chat session has entered the pending session content in the chat window of the chat window. The template recommendation unit is used to recommend a session template to the target user based on the context information and the session content to be sent.
11. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the recommended method for the session template as described in any one of claims 1 to 9.
12. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the recommended method for the session template as described in any one of claims 1 to 9.
13. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, a processor of a computer device reading the computer instructions from the computer-readable storage medium, and the processor executing the computer instructions to cause the computer device to perform the recommended method of the session template as described in any one of claims 1 to 9.