Intelligent agent-based data processing method and device, equipment, medium and product
By connecting the agent into the application and calling the session model to generate reply information, the problem of low session efficiency between the application and the agent is solved, and efficient conversations and unified management are achieved within the application.
Patent Information
- Application Number
- CN202510404202.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-08-01
AI Technical Summary
In the prior art, the session requirements of applications and agents need to jump to the business platform, resulting in inefficiency of sessions.
Access the agent in the application, generate reply information through sub-application calls the agent's session model, and render the session page in the application, supporting unified page template data and session data management.
It improves the session efficiency with the agent in the application, realizes direct conversation with the agent within the application, and unifies the page style and data management of the agent access.
Smart Images

Figure CN120407731A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a data processing method, apparatus, device, medium, and product based on an agent. Background Art
[0002] With the rapid development of computer technology, the application scenarios of agents are becoming increasingly rich, and there is also a need for conversations with agents in application programs. Currently, when there is a need for a conversation with an agent in an application program, it is necessary to jump to the business platform that provides the agent and have a conversation with the agent in the business platform. It is not difficult to see that in the current conversation solution with an agent, the time-consuming from the application program to the business platform is relatively high, seriously affecting the conversation efficiency with the agent. Therefore, how to improve the conversation efficiency with the agent in the application program has become a current research hotspot. Summary of the Invention
[0003] Embodiments of this application provide a data processing method, apparatus, device, medium, and product based on an agent, which can access the agent in the application program and improve the conversation efficiency with the agent in the application program.
[0004] On the one hand, embodiments of this application provide a data processing method based on an agent. The data processing method based on an agent includes:
[0005] In response to a session request for a target agent triggered in the parent application program, obtain page template data, where the page template data is used to generate a session page for having a conversation with at least one agent, and the target agent is any one of the at least one agent;
[0006] Render the page template data to obtain a session page for the target agent, and display the session page;
[0007] In response to the conversation information input in the session page, call the session model corresponding to the target agent through the child application program to generate a reply message corresponding to the conversation information, and there is a subordinate relationship between the child application program and the parent application program;
[0008] Render the reply message to the session page.
[0009] Correspondingly, embodiments of this application provide a data processing apparatus based on an agent. The data processing apparatus based on an agent includes:
[0010] A processing unit, configured to obtain page template data in response to a session request for a target agent triggered in the parent application program, where the page template data is used to generate a session page for having a conversation with at least one agent, and the target agent is any one of the at least one agent;
[0011] A display unit for rendering page template data to obtain a session page for the target agent and displaying the session page;
[0012] A processing unit is further configured to, in response to the dialogue information input in the session page, generate a reply message corresponding to the dialogue information by calling the session model corresponding to the target agent through a sub-application, and there is a subordinate relationship between the sub-application and the parent application;
[0013] The display unit is further configured to render the reply message to the session page.
[0014] On the other hand, an embodiment of the present application provides a data processing method based on an agent. The data processing method based on an agent includes:
[0015] Display a session page for the target agent through a sub-application. The session page includes session data with the target agent, and the session data includes dialogue information and reply information;
[0016] In response to a publishing operation on the session data, receive the session data sent by the sub-application;
[0017] Perform conversion processing on the session data through the parent application to obtain multiple images to be published, determine a target publishing content including the multiple images to be published, and publish the target publishing content; wherein, there is a subordinate relationship between the parent application and the sub-application.
[0018] Correspondingly, an embodiment of the present application provides a data processing device based on an agent. The data processing method based on an agent includes:
[0019] A display unit for displaying a session page for the target agent through a sub-application. The session page includes session data with the target agent, and the session data includes dialogue information and reply information;
[0020] A processing unit for receiving the session data sent by the sub-application in response to a publishing operation on the session data;
[0021] The processing unit is further configured to perform conversion processing on the session data through the parent application to obtain multiple images to be published, determine a target publishing content including the multiple images to be published, and publish the target publishing content; wherein, there is a subordinate relationship between the parent application and the sub-application.
[0022] On the other hand, an embodiment of the present application provides a computer device, which includes: a processor suitable for executing a computer program; a computer-readable storage medium, and a computer program is stored in the computer-readable storage medium. When the computer program is executed by the processor, the above-mentioned data processing method based on an agent is implemented.
[0023] On the other hand, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program is loaded and executed by a processor to perform the above-mentioned agent-based data processing.
[0024] On the other hand, an embodiment of the present application provides a computer program product, which includes a computer program or computer instructions, and when the computer program or computer instructions are executed by a processor, the above-mentioned agent-based data processing method is implemented.
[0025] In an embodiment of the present application, in response to a session request for a target agent triggered in a parent application, page template data can be obtained, and the page template data can be used to generate a session page for communicating with at least one agent; the page template data can be rendered to obtain a session page for the target agent, and the session page can be displayed; in response to the dialogue information input in the session page, the corresponding session model of the target agent can be called through a sub-application to generate a reply message corresponding to the dialogue information, and there is a subordinate relationship between the sub-application and the parent application; the reply message can be rendered to the session page. It can be seen that the application can be used as the parent application, and the agent can be accessed in the parent application in the form of a sub-application. Therefore, the agent can be accessed in the application; and after the agent is accessed in the application, in response to a session request for the agent triggered in the application, the session page for the agent can be rendered in the application. Therefore, a session can be conducted with the agent in the application, that is, the session page for the agent can be directly displayed and a session can be conducted with the agent in the application without jumping from the application to other service platforms, which can improve the session efficiency with the agent in the application; in addition, for at least one agent accessed in the parent application, the session page for communicating with at least one agent can be rendered based on the same page template data, which can make the session pages for at least one agent accessed in the parent application have a unified style and improve the standardization degree of agent access to the application. Description of the Drawings
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0027] Figure 1a It is a schematic diagram of the architecture of a data processing system provided by an embodiment of the present application;
[0028] Figure 1b It is a schematic structural diagram of another data processing system provided by an embodiment of the present application;
[0029] Figure 2 It is a schematic flow diagram of the first agent-based data processing method provided by an embodiment of the present application;
[0030] Figure 3a It is a schematic interface diagram of triggering a session request with an agent from the personal page of the parent application provided by an embodiment of the present application;
[0031] Figure 3b It is a schematic interface diagram of triggering a session request with an agent from the publishing content page of the parent application provided by an embodiment of the present application;
[0032] Figure 3c It is a schematic interface diagram of triggering a session request with an agent from the message page of the parent application provided by an embodiment of the present application;
[0033] Figure 3d It is a schematic interface diagram of triggering a session request with an agent from the search page of the parent application provided by an embodiment of the present application;
[0034] Figure 3e It is a schematic interface diagram of triggering a session request with an agent from the comment page of the parent application provided by an embodiment of the present application;
[0035] Figure 4 It is a schematic flow diagram of the second agent-based data processing method provided by an embodiment of the present application;
[0036] Figure 5 It is a schematic diagram of the calling process in the parent application client provided by an embodiment of the present application;
[0037] Figure 6 It is a schematic technical framework diagram of having a session with an agent in the parent application client provided by an embodiment of the present application;
[0038] Figure 7 It is a schematic flow diagram of the third agent-based data processing method provided by an embodiment of the present application;
[0039] Figure 8a It is a schematic flow diagram of the fourth agent-based data processing method provided by an embodiment of the present application;
[0040] Figure 8b It is a schematic interface diagram of publishing session data as publishing content provided by an embodiment of the present application;
[0041] Figure 8cIt is a schematic diagram of an interface for selecting session data to be published provided by an embodiment of the present application;
[0042] Figure 8d It is a schematic diagram of an interface where the number of selectable session data groups is fixed provided by an embodiment of the present application;
[0043] Figure 8e It is a schematic diagram of an interface for copying and deleting session data provided by an embodiment of the present application;
[0044] Figure 9 It is a schematic diagram of the process of the fifth data processing method based on an agent provided by an embodiment of the present application;
[0045] Figure 10 It is a schematic diagram of a technical framework for integrating an agent into a parent application provided by an embodiment of the present application;
[0046] Figure 11 It is a schematic diagram of a unified rendering standard provided by an embodiment of the present application;
[0047] Figure 12 It is another schematic diagram of a unified rendering standard provided by an embodiment of the present application;
[0048] Figure 13 It is a schematic diagram of a rendering result under a unified rendering standard provided by an embodiment of the present application;
[0049] Figure 14 It is a schematic diagram of the structure of a data processing device based on an agent provided by an embodiment of the present application;
[0050] Figure 15 It is a schematic diagram of the structure of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0051] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0052] An embodiment of the present application proposes a data processing method based on an agent. In this data processing method based on an agent, an application program can be used as a parent application program, and at least one agent can be accessed in the parent application program in the form of a sub-application program, thereby improving the intelligence level of the parent application program. Moreover, in order to reduce the access cost of the agent, a session component (chatbox) can provide standardized open capabilities for the access of at least one agent, enabling at least one agent to access the parent application program in a standardized manner, and the session component can uniformly manage the at least one accessed agent according to a unified standard.
[0053] In addition, the data processing method based on an agent can respond to a session request triggered in the parent application program for any one of the accessed agents (taking any one of the accessed agents as the target agent as an example), and render and present a session page with the target agent in the parent application program through a sub-application program. That is to say, the session page with the target agent can be directly displayed in the parent application program without jumping to an agent business platform outside the application program. Therefore, the session efficiency with the agent in the application program can be improved.
[0054] Furthermore, the data processing method based on an agent can also combine the usage object of the application program and the session data of the agent with the business functions of the application program itself. For example, it can be combined with the content publishing function of the application program, and the session data with the agent can be published as published content (such as note content or social dynamic content). Another example is that it can be combined with the sharing function of the application program, and the session data with the agent can be shared as chat content, and so on. By combining with the business functions of the application program itself, not only can the utilization rate of the session data with the agent in the application program be improved, but also the intelligence level of the business functions of the application program itself can be enhanced.
[0055] In the data processing method based on an agent proposed in the embodiment of the present application, technical terms such as application program, parent application program, sub-application program, agent, and session component (chatbox) are involved. For the convenience of understanding, these technical terms will be introduced here first:
[0056] ① An application program (APP) refers to a computer program developed to complete specific tasks. The client corresponding to the application program can run on a terminal device. The user of the application program can interact with the application program through the client corresponding to the application program. The client corresponding to the application program can provide local services for the user of the application program in the terminal device. The client corresponding to the application program can communicate with the server corresponding to the application program through a communication network, and the server corresponding to the application program can provide service support for the client corresponding to the application program.
[0057] ② There can be a subordinate relationship between the parent application program and the child application program. The so-called subordinate relationship means that one application program depends on another application program in terms of function, resources, or data. The dependent application program can be called the child application program (i.e., the subordinate application), and the application program it depends on can be called the parent application program (i.e., the master application). For example, a map service application program can be accessed in the form of a small program in a social media application program, and there is a subordinate relationship between the social media application program and the map service application program.
[0058] Among them, the client corresponding to the parent application program can be called the parent application client, and the server corresponding to the parent application program can be called the parent application server. The client corresponding to the child application program can be called the child application client, and the server corresponding to the child application program can be called the child application server.
[0059] Based on the subordinate relationship between the parent application program and the child application program, the parent application client can provide a child application container for running the child application client. Among them, the child application container is a container technology for lightweight application programs, which can be used to run the child application client in the parent application client. The child application container packs the child application client code with the runtime environment provided by the parent application program to form a container that can run on the parent application client. When the user of the parent application program opens the child application client on the parent application client, the parent application client can load the child application container and run the child application client code in it, so as to run the child application client.
[0060] ③ An agent refers to an intelligent system with autonomous perception, decision-making, and execution capabilities. It can achieve goals by interacting with the environment. Its essence is a digital entity that simulates the human cognitive framework and has a closed-loop ability of "perception → planning → action". In the embodiments of this application, the agent specifically refers to an AI (Artificial Intelligence) agent, which is an agent combined with AI. The basis for the agent to have a conversation with the user of the parent application is the conversation model corresponding to the agent. The conversation model corresponding to the agent can refer to an AI model with language generation capabilities, which can be used to generate response information corresponding to the conversation information of the user. The embodiments of this application do not limit the type of the conversation model. For example, the conversation model can be an LLM (Large Language Model).
[0061] ④ A chatbox refers to a tool in the parent application that provides the user of the parent application with the ability to have a conversation with the agent. To achieve this conversation ability, the chatbox can provide the parent application with the standardized access ability and standardized management ability of the agent. Moreover, the chatbox can be used to carry the conversation link between the agent and the user of the parent application. The conversation link refers to the complete conversation process between the parent application and the conversation model corresponding to the agent.
[0062] ⑤ Published content refers to the content published in the parent application. For example, the published content can include note content or social dynamic content published in the parent application, etc.
[0063] ⑥ In response to the conditions or states on which the executed operations depend, when the dependent conditions or states are met, the one or more executed operations can be real-time or can have a set delay; without special instructions, there is no limit on the execution order of the multiple executed operations. For example, for "in response to a conversation request for a target agent triggered in the parent application, obtain page template data", the operation is "obtain page template data", and the condition on which this operation depends is "a conversation request for a target agent triggered in the parent application".
[0064] ⑦ Trigger operation: A trigger operation refers to an operation performed by the user of the parent application on the parent application (including sub-applications). For example, a trigger operation refers to a trigger operation performed by the user of the parent application on a control in the parent application. Such trigger operations can be, for example, clicking, double-clicking, and long-pressing, etc.
[0065] Next, the architecture of the data processing system provided in the embodiments of this application will be introduced in conjunction with the accompanying drawings.
[0066] An agent can access the parent application through a sub-application. Specifically, the access method can include any of the following: First, an agent can access the parent application in the form of a sub-application; Second, at least one agent can access the same sub-application of the parent application in the form of an agent instance, and one agent corresponds to one agent instance in the sub-application. Among them, an agent instance refers to the access form of an agent in a sub-application, and the agent instance can provide the interaction ability between the user object of the parent application and the agent in the sub-application. The architectures of the data processing systems under these two access methods are introduced separately below:
[0067] The data processing system when an agent accesses the parent application in the form of a sub-application is as Figure 1a shown. The data processing system can include a terminal device 101, a sub-application server 102, a parent application server 103, and a service provider server 104. Devices that need to communicate can establish a direct communication connection through wired communication, or can establish an indirect communication connection through wireless communication. This application embodiment does not limit this. Among them:
[0068] The parent application client corresponding to the parent application can run in the terminal device 101, and the sub-application client corresponding to the sub-application can run in the parent application client. Taking the access of the first agent and the second agent in the parent application as an example, the client corresponding to the first sub-application corresponding to the first agent (hereinafter simply referred to as the first sub-application client) and the client corresponding to the second sub-application corresponding to the second agent (hereinafter simply referred to as the second sub-application client) can run in the parent application client.
[0069] The sub-application server 102 can be used to provide service support for the sub-application client. Taking the access of the first agent and the second agent in the parent application as an example, the sub-application server 102 can include the server 1021 corresponding to the first sub-application corresponding to the first agent (hereinafter simply referred to as the first sub-application server 1021), and the server 1022 corresponding to the second sub-application corresponding to the second agent (hereinafter simply referred to as the second sub-application server 1022). The parent application server 103 can be used to provide service support for the parent application client. Figure 1aTaking the data processing system shown as an example where the sub-application server 102 and the parent application server 103 are integrated in different devices, optionally, the sub-application server 102 and the parent application server 103 can also be integrated in the same device. For example, the sub-application server 102 can be integrated into the parent application server 103. It can be understood that the sub-application server 102 can be used as a service module of the parent application server 103 and integrated into the parent application server 103.
[0070] The session model corresponding to the agent can be deployed in the application server (for example, it can be deployed in the sub-application server 102), or the session model corresponding to the agent can be deployed in the business party server that provides the relevant services of the agent. Figure 1a Taking the data processing system shown as an example where the session model corresponding to the first agent is deployed in the first sub-application server 1021 and the session model corresponding to the second agent is deployed in the business party server 104 that provides the relevant services of the second agent.
[0071] In Figure 1a In the data processing system shown, taking the first agent as an example (the second agent is similar to the first agent), the process of invoking the session page of the first agent in the parent application client can include: responding to the session request for the first agent triggered in the parent application client, obtaining the page template data, rendering the page template data to obtain the session page of the first agent, and displaying the session page of the first agent.
[0072] In Figure 1a In the data processing system shown, taking the first agent as an example, the session process with the agent whose corresponding session model is deployed in the sub-application server 102 in the parent application can include: responding to the conversation information input in the session page of the first agent, calling the session model corresponding to the first agent in the first sub-application server 1021 through the first sub-application client to generate the reply information corresponding to the conversation information; and rendering the reply information to the session page of the first agent.
[0073] In Figure 1aIn the data processing system shown, taking the second agent as an example, the session process of the agent deployed in the business party server 104 in the parent application program and the corresponding session model can include: in response to the dialogue information input on the session page with the second agent, the dialogue information can be sent to the second sub-application server 1022 through the second sub-application client, and the second sub-application server 1022 can call the session model corresponding to the second agent in the business party server 104 to generate a reply message corresponding to the dialogue information; the second sub-application server 1022 can send the reply message to the second sub-application client and render the reply message on the session page with the second agent.
[0074] In Figure 1a In the data processing system shown, taking the first agent as an example (the second agent is similar to the first agent), the process of publishing the session data with the first agent as the published content in the parent application program can include: in response to the publishing operation of the session data, the parent application client can receive the session data sent by the first sub-application client; the parent application client can send the session data to the parent application server 103, and the parent application server 103 can perform conversion processing on the session data to obtain multiple images to be published and determine the published content including the multiple images to be published; the parent application server 103 can send the published content to the parent application client, and the parent application client can render the published content on the published content page to publish the published content.
[0075] It can be seen that in Figure 1a In the data processing system shown, the agent can be accessed in the form of a sub-application program in the parent application program. One agent corresponds to one sub-application program. Through the session request triggered in the parent application program, the session page with the agent can be quickly called up, so that a session can be established with the agent, improving the session efficiency with the agent. Moreover, the session data with the agent can also be published in the parent application program, making the published content of the parent application program intelligent and diversified.
[0076] In the data processing system where at least one agent is accessed in the same sub-application program of the parent application program in the form of an agent instance, as Figure 1b shown, the data processing system can include a terminal device 101, a sub-application server 102, a parent application server 103, and a business party server 104. Devices that need to communicate can establish a direct communication connection through wired communication, or can establish an indirect communication connection through wireless communication. This application embodiment does not limit this. Among them:
[0077] In the terminal device 101, a client corresponding to the parent application (i.e., the parent application client) can run, and in the parent application client, a client corresponding to the sub-application (i.e., the sub-application client) can run. Taking the example that the first agent and the second agent are connected in the same sub-application of the parent application, the sub-application client can include an agent instance corresponding to the first agent (hereinafter simply referred to as the first agent instance) and an agent instance corresponding to the second agent (hereinafter simply referred to as the second agent instance). The first agent instance can be used to provide the interaction ability between the user of the parent application and the first agent, and the second agent instance can be used to provide the interaction ability between the user of the parent application and the second agent.
[0078] The sub-application server 102 can be used to provide service support for the sub-application client, and the parent application server 103 can be used to provide service support for the parent application client. Figure 1b Taking the example that the sub-application server 102 and the parent application server 103 are integrated in different devices in the shown data processing system, optionally, the sub-application server 102 and the parent application server 103 can also be integrated in the same device. For example, the sub-application server 102 can be integrated into the parent application server 103. It can be understood that the sub-application server 102 can be used as a service module of the parent application server 103 and integrated into the parent application server 103.
[0079] The session model corresponding to the agent can be deployed in the application server (for example, deployed in the sub-application server 102), or the session model corresponding to the agent can be deployed in the business party server that provides the relevant services of the agent. Figure 1b Taking the example that the session model corresponding to the first agent is deployed in the sub-application server 102 and the session model corresponding to the second agent is deployed in the business party server 104 that provides the relevant services of the second agent in the shown data processing system.
[0080] In Figure 1b In the shown data processing system, taking the first agent as an example (the second agent is similar to the first agent), the process of invoking the session page with the first agent in the parent application client can include: in response to the session request for the first agent triggered in the parent application client, obtaining the page template data; rendering the page template data to obtain the session page with the first agent, and displaying the session page with the first agent.
[0081] In Figure 1bIn the data processing system shown, taking the first agent as an example, the session process between the mother application program and the agent whose corresponding session model is deployed in the sub-application server 102 may include: It may respond to the dialogue information input in the session page with the first agent, and the first agent instance in the sub-application client may call the session model corresponding to the first agent in the sub-application server 102 to generate a reply message corresponding to the dialogue information; The reply message may be rendered to the session page with the first agent.
[0082] In Figure 1b In the data processing system shown, taking the second agent as an example, the session process between the mother application program and the agent whose corresponding session model is deployed in the business party server 104 may include: It may respond to the dialogue information input in the session page with the second agent, and the second agent instance in the sub-application client may send the dialogue information to the sub-application server 102, and the sub-application server 102 may call the session model corresponding to the second agent in the business party server 104 to generate a reply message corresponding to the dialogue information; The reply message may be rendered to the session page with the second agent.
[0083] In Figure 1b In the data processing system shown, taking the first agent as an example (the second agent is similar to the first agent), the process of publishing the session data with the first agent as the published content in the mother application program may include: In response to the publishing operation of the session data, the mother application client may receive the session data sent by the first agent instance; The mother application client may send the session data to the mother application server 103, and the mother application server 103 may perform conversion processing on the session data to obtain multiple images to be published, and determine the published content including the multiple images to be published; The mother application server 103 may send the published content to the mother application client, and the mother application client may render the published content to the published content page to publish the published content.
[0084] It can be seen that in Figure 1b In the data processing system shown, at least one agent may be accessed in the same sub-application program in the mother application program. One agent corresponds to one agent instance in the sub-application program. Through the session request triggered in the mother application program, the session page with the agent can be quickly evoked, so that a session can be conducted with the agent, improving the session efficiency with the agent. Moreover, the session data with the agent can also be published in the mother application program, making the published content of the mother application program intelligent and diversified.
[0085] Figure 1a and Figure 1bThe data processing system of the illustrated embodiment is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation to the technical solution provided by the embodiment of the present application. Those skilled in the art know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solution provided by the embodiment of the present application is equally applicable to similar technical problems.
[0086] The terminal devices mentioned in the embodiments of the present application include, but are not limited to: smart phones, tablet computers, smart wearable devices, smart voice interaction devices, smart home appliances, personal computers, vehicle-mounted terminals, smart cameras and other devices. The present application does not make any restrictions on this. The server can be a single physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited thereto.
[0087] Next, in combination with the accompanying drawings, a detailed introduction to the agent-based data processing method provided by the embodiments of the present application will be given.
[0088] The embodiments of the present application propose an agent-based data processing method. The content introduced by this agent-based data processing method may include: triggering the display of a session page with an agent from different pages of the parent application, and the technical process of having a conversation with the agent in the parent application. This agent-based data processing method can be executed by a terminal device, specifically by the parent application running on the terminal device. As Figure 2 shown, this agent-based data processing method may include, but is not limited to, the following steps S201-S204:
[0089] S201, in response to a session request for a target agent triggered in the parent application, obtain page template data, where the page template data is used to generate a session page for having a conversation with at least one agent, and the target agent is any one of the at least one agent.
[0090] S202, render the page template data to obtain a session page for the target agent, and display the session page.
[0091] In steps S201 - S202, a session request for the target agent can be triggered on different pages of the parent application (specifically, the parent application client). For example, a session request for the target agent can be triggered on any one of the personal page, content publishing page, message page, search page, and comment page of the parent application, thereby triggering the display of a session page with the target agent. The following separately introduces the triggering methods of the session request for the target agent on these pages:
[0092] (1) Personal page:
[0093] The personal page of the target agent can be displayed through the parent application. A session request can be generated in response to a session triggering operation on the personal page, triggering the display of a session page with the target agent. Here, the personal page refers to the page in the parent application used to display personal information and published content. The personal page of the target agent refers to the page with the target agent as the account subject, used to display the introduction information of the target agent and the published content of the target agent.
[0094] The session triggering operation for the personal page can include any one of the following: First, as shown in Figure 3a , the personal page 30 of the target agent may include a session entry 301 for the target agent. A session request can be generated in response to the triggering operation on the session entry 301, triggering the display of a session page 80 with the target agent. The triggering operation here can include, for example, clicking, double - clicking, and long - pressing, etc. The embodiments of the present application do not limit this. Second, during the process of the parent application displaying the personal page of the target agent, a session request can be generated in response to a gravity sensing operation performed on the terminal device running the parent application. For example, the gravity sensing operation can include a shaking operation and a rotation operation, etc. The embodiments of the present application do not limit this. Third, a session request can be generated in response to a gesture triggering operation performed on the personal page of the target agent. The gesture triggering operation refers to an operation of drawing a specific pattern on the personal page using a specific gesture. For example, an operation of drawing the letter 'A' on the personal page with the index finger.
[0095] Optionally, in addition to being set on the personal page of the target agent, the session entry for the target agent can also be set on the personal page of any object in the parent application. A session request can be generated in response to the triggering operation on the session entry for the target agent in the personal page of any object, enabling a conversation with the target agent, or enabling a conversation with the target agent regarding the content in the personal page of this object.
[0096] (2) Content publishing page:
[0097] The release content page can be displayed through the parent application. The release content page may include a session entry for the target agent, and a session request can be generated in response to a session trigger operation for the session entry. Herein, the release content page refers to a page in the parent application for displaying release content. Specifically, as Figure 3b shown, the release content page 31 of any object (e.g., the first object in Figure 3b ) may include an agent invocation entry 311. In response to a trigger operation on the agent invocation entry 311, an agent entry list 312 can be displayed. The agent entry list 312 may include session entries for at least one agent, and among the session entries for at least one agent, there may be a session entry 301 for the target agent. A session request can be generated in response to a trigger operation on the session entry 301, triggering the display of the session page 80 for the target agent.
[0098] (3) Message page:
[0099] As Figure 3c shown, the message page 32 can be displayed through the parent application. Herein, the message page 32 refers to a page in the parent application for displaying session messages with at least one object. The message page 32 may include session messages of at least one object (e.g., the target agent and the first object), and at least one object may include the target agent. That is to say, the message page may include the session message 321 with the target agent. A session request can be generated in response to a session trigger operation on the target agent in the message page 32. Here, the session trigger operation may refer to a trigger operation on the session message 321 with the target agent in the message page 32, thereby triggering the display of the session page 80 for the target agent.
[0100] (4) Search page:
[0101] The search page can be displayed through the parent application. The search page may include a session entry for the target agent, and a session request can be generated in response to a session trigger operation for the session entry. Herein, the search page refers to a page in the application for providing a search function. Specifically, as Figure 3d shown, the search page 33 of the parent application may include an agent entry list 312. The agent entry list 312 may include session entries for at least one agent, and among the session entries for at least one agent, there may be a session entry 301 for the target agent. A session request can be generated in response to a trigger operation on the session entry 301, triggering the display of the session page 80 for the target agent.
[0102] (5) Comment page:
[0103] A comment page can be displayed through the parent application. Here, the comment page refers to a page in the parent application for posting comment content and conducting comment interactions. The comment page may include comment content related to the target agent, and a session request can be generated in response to a session trigger operation on the target agent in the comment page. Specifically, as Figure 3e shown, the comment page 34 of the parent application may include comment content 341 related to the target agent. The comment content 341 related to the target agent may include a session entry 301 for the target agent. A session request can be generated in response to a trigger operation on the session entry 301, triggering the display of a session page 80 for the target agent.
[0104] It can be seen that the embodiments of the present application can support triggering a session request for the target agent in different pages of the parent application, which can improve the efficiency of invoking the agent in the parent application, and thus improve the session efficiency with the agent in the parent application.
[0105] In step S201, page template data can be obtained in response to a session request for the target agent triggered in the parent application. The page template data can be used to generate a session page for communicating with at least one agent. The page template data can be used to define a unified page framework for the session page for communicating with at least one agent. The unified page framework refers to the various regions included in the session page and the information supported for display in each region, so that the page template data can be used to generate a session page for communicating with at least one agent according to a unified session page style, that is, the session page styles for communicating with at least one agent are unified.
[0106] Specifically, the page template data may include basic area data, session information area data, and input area data. The unified page framework may include a basic area, a session information area, and an input area. Among them, the basic area can be used to display global control controls for the agent (for example, controls for triggering reporting the agent, viewing historical session data, etc.). The session information area can be used to display session data. The input area can be used to display an input box for dialogue information, session control controls (such as a new dialogue control and extended function controls (such as a deep thinking control and an Internet search control)), and controls for triggering external sending functions (such as a control for triggering sending dialogue information, and controls for triggering functions such as album and taking pictures)).
[0107] In step S202, after obtaining the page template data, the page template data can be rendered to obtain a session page corresponding to the target agent, and the session page can be displayed. Specifically, the basic area data can be rendered to obtain the basic area of the session page corresponding to the target agent, the session information area data can be rendered to obtain the session information area of the session page corresponding to the target agent, and the input area data can be rendered to obtain the input area of the session page corresponding to the target agent. It can be seen that in this case, the session pages with each agent are all rendered based on the same page template data, which can not only make the styles of the session pages of each agent unified, but also make the page contents of the session pages with each agent exactly the same.
[0108] Optionally, the page content data corresponding to the target agent can also be obtained. The page content data can include at least one of the following: the configuration data corresponding to the target agent and the historical session data with the target agent. Among them, the configuration data corresponding to the target agent can be custom-configured during the access process of the target agent. The configuration data corresponding to the target agent can include, but is not limited to: the basic area configuration data corresponding to the target agent (for example, it can include the identifier corresponding to the target agent displayed in the basic area), the welcome message configuration data corresponding to the target agent (for example, it can include the welcome message displayed when having the first session with the target agent in the session information area), and the extended function control configuration data corresponding to the target agent (for example, it can include the extended function controls displayed in the input area).
[0109] In this case, the page template data and the page content data corresponding to the target agent can be rendered to obtain the conversation page of the target agent. Specifically, the basic area data and the basic area configuration data corresponding to the target agent can be rendered to obtain the basic area of the conversation page of the target agent. The conversation information area data and the historical conversation data with the target agent (or the welcome message configuration data corresponding to the target agent) can be rendered to obtain the conversation information area of the conversation page of the target agent. The input area data and the extended function control configuration data corresponding to the target agent can be rendered to obtain the input area of the conversation page of the target agent. It can be seen that in this case, the conversation pages with each agent are rendered based on the same page template data, which can make the styles of the conversation pages with each agent unified. Moreover, since the page content data corresponding to each agent is custom-configured, it can be different, so that the page content of the conversation pages with each agent can be different. For example, the identifiers of each agent in the basic area are different, the historical conversation data with each agent in the conversation information area is different, the welcome messages corresponding to each agent in the conversation information area can be different, and the extended function controls of each agent in the input area can be different. This can improve the flexibility of agent access.
[0110] S203. In response to the conversation information input in the conversation page, call the conversation model corresponding to the target agent through the sub-application to generate a reply message corresponding to the conversation information. There is a subordinate relationship between the sub-application and the parent application.
[0111] Before step S203, the conversation information can be preprocessed through the sub-application to obtain the preprocessed conversation information. After preprocessing, in step S203, the sub-application can be used to call the conversation model corresponding to the target agent to generate a reply message corresponding to the preprocessed conversation information. Here, preprocessing means assembling information that helps the conversation model corresponding to the target agent generate a reply message for the conversation information. During the preprocessing process, the information assembled for the conversation information can include reference information and / or answer patterns. Among them:
[0112] ① Reference information:
[0113] For the case of assembling reference information for the conversation information, the reference information can be obtained through the sub-application (specifically referring to the sub-application server). The reference information and the conversation information are assembled and processed through the sub-application to obtain the preprocessed conversation information. Then, the sub-application can be used to call the conversation model corresponding to the target agent to generate a reply message corresponding to the conversation information based on the reference information and the conversation information.
[0114] Among them, the reference information refers to the information referred to by the session model corresponding to the target intelligent agent when generating the response information corresponding to the dialogue information. The reference information may include, but is not limited to, at least one of the following: the context information of the interaction between the user and the target intelligent agent (for example, the historical conversation data between the user and the target intelligent agent, and the historical comment interaction data between the user and the target intelligent agent, etc.), the published content of the target intelligent agent, the object feature information of the user, and the operation feature information of the user (for example, the published content that the user has historically accessed, etc.). By providing the reference information to the session model corresponding to the target intelligent agent, the session model corresponding to the target intelligent agent can learn the knowledge provided by the reference information and generate the response information corresponding to the dialogue information based on the learned knowledge, improving the accuracy of the response information and the adaptability between the response information and the user.
[0115] Moreover, the reference information can match the trigger scenario corresponding to the session request. The trigger scenario corresponding to the session request refers to the scenario to which the page that triggers the generation of the session request belongs, such as the personal page scenario, the message page scenario, and the comment page scenario, etc. Matching means that different trigger scenarios can correspond to different types of reference information, and the obtained type of reference information corresponds to the trigger scenario corresponding to the current session request; for example, if the trigger scenario corresponding to the session request is the personal page scenario, then the obtained reference information may include the published content of the target intelligent agent and the historical conversation data between the user and the target intelligent agent; another example is that if the trigger scenario corresponding to the session request is the comment page scenario, then the obtained reference information may include the historical comment interaction data between the user and the target intelligent agent on the comment page. By stipulating that the reference information matches the trigger scenario corresponding to the session request, the accuracy of the reference information can be improved, thereby improving the accuracy of the response information.
[0116] ② Answer mode:
[0117] For the case of assembling the answer mode for the dialogue information, the answer mode can be obtained through a sub-application program (specifically referring to the sub-application server). The sub-application program assembles and processes the answer mode and the dialogue information to obtain the preprocessed dialogue information. Furthermore, the sub-application program can call the session model corresponding to the target intelligent agent to generate the response information corresponding to the dialogue information according to the answer mode.
[0118] Among them, the response mode refers to the information mode of the response message, specifically the information style of the response message. The response mode can be used to instruct the conversation model corresponding to the target agent to generate a response message in the specified information style. The response mode can include, but is not limited to, any of the following: chat mode (CHAT) and related word mode (RELATED_WORD); among them, the chat mode can instruct the conversation model corresponding to the target agent to return a response message in a more daily and lively style, and the related word mode can instruct the conversation model corresponding to the target agent to predict more content that the user wants to know based on the context information, and generate at least one related text (each related text does not exceed 16 characters), in a style separated by commas. By providing the response mode to the conversation model corresponding to the target agent, the conversation model corresponding to the target agent can generate a response message in the specified style, which can improve the accuracy of the response message.
[0119] Moreover, the response mode can match the conversation scenario corresponding to the conversation page. The conversation scenario corresponding to the conversation page refers to the type of conversation triggered by the user on the conversation page. For example, the conversation information manually entered by the user on the conversation page can trigger the chat type, and the conversation scenario corresponding to this conversation page is the chat scenario. Another example is that the conversation information automatically entered by the user through some preset automatic question methods on the conversation page (such as clicking the "Learn More" control) can trigger the related word scenario, and the conversation scenario corresponding to this conversation page is the related word scenario. Matching means that different conversation scenarios can correspond to different response modes, and the obtained response mode corresponds to the conversation scenario corresponding to the current conversation page. For example, the chat scenario corresponds to the chat mode, and the related word scenario corresponds to the related word mode. By stipulating that the response mode matches the conversation scenario corresponding to the conversation page, the adaptability of the response mode to the conversation scenario can be improved, thereby improving the accuracy of the response message and making the response message adapt to the conversation scenario.
[0120] Optionally, at least one extended function control (included in the session operation controls mentioned above) can also be displayed on the session page, and each extended function control can correspond to an answer generation strategy respectively. Among them, the answer generation strategy refers to the strategy adopted by the session model when generating the reply information corresponding to the conversation information, and can be used to indicate the thinking mode adopted by the session model when generating the reply information corresponding to the conversation information; for example, at least one extended function control can include a deep thinking control and an internet search control. The answer generation strategy corresponding to the deep thinking control is the deep thinking strategy, and the answer generation strategy corresponding to the internet search control is the internet search strategy. The deep thinking strategy can indicate that when the session model generates the reply information corresponding to the conversation information, it can analyze the conversation information based on the training knowledge base and logical reasoning to provide a logically rigorous and well-organized reply information. The internet search strategy can indicate that the session model enhances the timeliness and data support of the answer by obtaining internet information in real time.
[0121] Based on this, in response to the triggering operation on the target extended function control in at least one extended function control and the conversation information input on the session page, the session model corresponding to the target agent can be called through the sub-application to generate the reply information corresponding to the conversation information according to the answer generation strategy corresponding to the target extended function control.
[0122] It can be seen that the user can control whether to enable the answer generation strategy corresponding to the extended function control by triggering or not triggering the extended function control, so as to control whether the session model generates the reply information corresponding to the conversation information according to the corresponding answer generation strategy. This can improve the controllability during the conversation between the user and the agent, and make the reply information more adaptable to the user's needs.
[0123] S204, render the reply information to the session page.
[0124] In step S204, the content type included in the reply information can be determined, and the rendering service matching the content type included in the reply information can be called to render the reply information to obtain the rendered reply information, and the rendered reply information can be displayed on the session page.
[0125] That is to say, the embodiments of the present application can provide multiple rendering services, each rendering service can correspond to a content type respectively, each rendering service can be used to provide the rendering ability for the corresponding content type, and the rendering ability provided by the rendering service corresponding to the content type of the reply information can be called to render the reply information to the session page. It can be seen that by providing the rendering ability for multiple content types, a better rendering effect can be achieved for the reply information containing multiple content types.
[0126] For example, services such as Markdown content rendering service, rich text content rendering service, thought chain content rendering service, and thinking content rendering service can be provided. Among them: Markdown is a lightweight markup language, Markdown content refers to the content written in Markdown, and the Markdown content rendering service can be used to provide the rendering ability for Markdown content. Rich text is a form of text containing various format information, rich text content is the content written in rich text, and the rich text content rendering service can be used to provide the rendering ability for rich text content. A thought chain is an artificial intelligence technology that disassembles a logically complex problem by simulating the thinking steps of humans, and forms a complete thinking process through a series of logically related thoughts, enabling the corresponding conversation model of the intelligent agent to understand the problem more deeply and provide answers; thought chain content refers to the content organized in the form of a thought chain, and the thought chain rendering service can provide the rendering ability for thought chain content. Thinking content refers to the content used to describe the thinking process of the conversation model when generating reply information. The thinking content rendering service can be set for in-depth thinking strategies and can provide the rendering ability for thinking content.
[0127] In the embodiments of the present application, an intelligent agent can be accessed through a sub-application that depends on the parent application in the parent application. Thus, a conversation can be conducted with the intelligent agent inside the parent application without jumping outside the parent application, which can improve the conversation efficiency with the intelligent agent in the parent application. Moreover, it is possible to support triggering a conversation request for a target intelligent agent on different pages of the parent application, which can improve the efficiency of invoking the intelligent agent in the parent application, and thus improve the conversation efficiency with the intelligent agent in the parent application. The sub-application can assemble reference information and / or an answer model for the dialogue information input by the user object, so that when the conversation model corresponding to the intelligent agent is called to generate a reply message corresponding to the dialogue information, the conversation model corresponding to the intelligent agent can learn the instructions in the reference information and / or generate a reply message in the style indicated by the answer model, which can improve the accuracy of the reply message; moreover, the reference information can be matched with the triggering scenario of the conversation request, which can make the reply message generated based on the reference information adapt to the triggering scenario, and thus improve the generation effect of the reply message; the answer mode can be matched with the conversation scenario of the conversation page, which can make the reply message generated based on the answer mode adapt to the style of the conversation scenario, and thus improve the generation effect of the reply message. In addition, the conversation page can also provide an extended function control for the user object, and the user object can control whether to enable the answer generation strategy corresponding to the extended function control through the extended function control, so as to control whether the conversation model generates a reply message corresponding to the dialogue information according to the corresponding answer generation strategy, so that the reply message can better meet the needs of the user object.
[0128] An embodiment of the present application proposes a data processing method based on an agent. The content introduced by this data processing method based on an agent may include: An agent accesses the rendering process and the session process in the access mode of a mother application in the form of a sub-application. As Figure 4 shown, this data processing method based on an agent may include but is not limited to the following steps S401 - step S404:
[0129] S401, in response to a session request for a target agent triggered in the mother application, call the sub-application corresponding to the target agent to obtain page template data. The page template data is used to generate a session page for communicating with at least one agent. The target agent is any one of the at least one agent.
[0130] In step S401, one agent accessing the mother application corresponds to one sub-application. It can be understood that the agent accesses the mother application in the form of a sub-application. The page template data can be stored in a sub-application container or a session component. In response to a session request for a target agent triggered in the mother application (specifically, the mother application client), call the sub-application corresponding to the target agent (specifically, the sub-application client corresponding to the target agent) to obtain the page template data from the sub-application container or the session component.
[0131] Optionally, it is also possible to call the sub-application corresponding to the target agent (specifically, the sub-application client corresponding to the target agent) to obtain the page content data corresponding to the target agent, that is, to obtain the configuration data corresponding to the target agent and the historical session data with the target agent (when there is historical session data with the target agent). Among them, the configuration data corresponding to the target agent can be managed by the sub-application server corresponding to the target agent. It is possible to call the sub-application client corresponding to the target agent to obtain the configuration data corresponding to the target agent from the sub-application server corresponding to the target agent. The historical session data with the target agent can be managed by the mother application (specifically, the mother application server). It is possible to call the sub-application client corresponding to the target agent to obtain the historical session data with the target agent from the mother application server. Or, the historical session data with the target agent can be managed by the sub-application server corresponding to the target agent. It is possible to call the sub-application client corresponding to the target agent to obtain the historical session data with the target agent from the sub-application server corresponding to the target agent.
[0132] S402, call the sub-application corresponding to the target agent to render the page template data, obtain a session page corresponding to the target agent, and display the session page.
[0133] In step S402, the sub-application corresponding to the target agent (specifically, the sub-application client corresponding to the target agent) can be called to render the page template data and the page content data corresponding to the target agent, so as to obtain a session page corresponding to the target agent, and the sub-application corresponding to the target agent (specifically, the sub-application client corresponding to the target agent) can be called to display the session page. For the specific rendering process of the session page, reference can be made to the relevant description of step S202 in the embodiment shown above Figure 2 and will not be elaborated here.
[0134] The content of the above steps S401 - S402 introduces that the session page corresponding to the target agent can be rendered by the sub-application corresponding to the target agent. Optionally, the session page corresponding to the target agent can also be rendered by the parent application (specifically, the parent application client). Specifically, the parent application (specifically, the parent application client) can obtain the page template data and the page content data. The page content data can include the configuration data corresponding to the target agent and the historical session data with the target agent (when there is historical session data with the target agent); for the page template data, the parent application client can receive the page template data sent by the sub-application client corresponding to the target agent, or the parent application client can obtain the page template data from the parent application server. The page template data can be stored in the parent application server after the parent application client first receives the page template data sent by the sub-application client corresponding to the target agent; for the configuration data corresponding to the target agent, the parent application client can obtain the configuration data corresponding to the target agent from the sub-application server corresponding to the target agent, or the parent application client can obtain the configuration data corresponding to the target agent from the parent application server. The configuration data corresponding to the target agent is stored in the parent application server after the parent application client first obtains the configuration data corresponding to the target agent from the sub-application server corresponding to the target agent. For the historical session data with the target agent, the historical session data with the target agent can be managed by the parent application server, and the parent application client can obtain the historical session data with the target agent from the parent application server, or the historical session data with the target agent can be managed by the sub-application server corresponding to the target agent, and the parent application client can obtain the historical session data with the target agent from the sub-application server corresponding to the target agent. The parent application (specifically, the parent application client) can render the page template data and the page content data corresponding to the target agent to obtain a session page corresponding to the target agent. For the specific rendering process of the session page, reference can be made to the relevant description of step S202 in the embodiment shown above Figure 2 and will not be elaborated here.
[0135] The content of the above steps S401 - S402 details the technical process of triggering the display of the session page with the target agent in the parent application. It should be noted that in this technical process, the process of the parent application calling the sub - application corresponding to the target agent may include: The container of the parent application client (which can also be called the end - container) can start the container of the sub - application client (which can also be called the sub - application container or mini - program container). The container of the sub - application client can start the session component (chatbox). The session component can include the sub - applications corresponding to each of the at least one agent, that is, the session component can include the sub - application corresponding to the target agent. Among them, the container of the parent application client can be used to provide a running environment for the parent application client, and the container of the sub - application client can be used to provide a running environment for the sub - application client.
[0136] As Figure 5 shown, taking the example of triggering a session request for the target agent in the comment page of the parent application client, the user can interact with the target agent in the comment page. After the user triggers the session entry with the target agent in the comment page, the container of the parent application client can be started. The container of the parent application client can start the container of the sub - application client. The container of the sub - application client can start the session component. The sub - application corresponding to the target agent in the session component can render the page template data and the page content data corresponding to the target agent to obtain the session page. Or, the sub - application corresponding to the target agent in the session component can send the page template data and the page content data corresponding to the target agent to the parent application, and the parent application can render the page template data and the page content data corresponding to the target agent to obtain the session page. And, if there is historical session data between the user and the target agent, the sub - application client corresponding to the target agent can be called to obtain the historical session data from the sub - application server corresponding to the target agent. The historical session data can be included in the page content data corresponding to the target agent.
[0137] Figure 5 Taking the session component as a functional component in the container of the sub - application client as an example for illustration. Optionally, the session component can also be the native sub - application client container of the parent application. In this case, the process of the parent application calling the sub - application corresponding to the target agent may include: The container of the parent application client (which can also be called the end - container) can start the container of the sub - application client (which can also be called the sub - application container or mini - program container, that is, the session component). The container of the sub - application client can include the sub - applications corresponding to each of the at least one agent, that is, the container of the sub - application client can include the sub - application corresponding to the target agent.
[0138] S403. In response to the conversation information input on the conversation page, call the conversation model corresponding to the target intelligent agent through the sub-application corresponding to the target intelligent agent to generate a reply message corresponding to the conversation information. There is a subordinate relationship between the sub-application and the parent application.
[0139] In step S403, the calling method of the conversation model corresponding to the target intelligent agent by the sub-application corresponding to the target intelligent agent may include any of the following:
[0140] First, the conversation model corresponding to the target intelligent agent may be deployed in the sub-application server corresponding to the target intelligent agent. In response to the conversation information input on the conversation page of the sub-application client corresponding to the target intelligent agent, the sub-application client corresponding to the target intelligent agent may call the conversation model corresponding to the target intelligent agent in the sub-application server corresponding to the target intelligent agent to generate a reply message corresponding to the conversation information. The calling method may include: sending the conversation information from the sub-application client corresponding to the target intelligent agent to the sub-application server corresponding to the target intelligent agent, and the sub-application server corresponding to the target intelligent agent calls the conversation model corresponding to the target intelligent agent to generate a reply message corresponding to the conversation information; or, the sub-application client corresponding to the target intelligent agent may call the conversation model corresponding to the target intelligent agent through the model calling interface provided by the sub-application server corresponding to the target intelligent agent to generate a reply message corresponding to the conversation information.
[0141] Second, the conversation model corresponding to the target intelligent agent may be deployed in the business party server corresponding to the target intelligent agent. In response to the conversation information input on the conversation page of the sub-application client corresponding to the target intelligent agent, the sub-application client corresponding to the target intelligent agent may send the conversation information to the sub-application server corresponding to the target intelligent agent, and the sub-application server corresponding to the target intelligent agent may call the conversation model corresponding to the target intelligent agent in the business party server to generate a reply message corresponding to the conversation information. The calling method may include: sending the conversation information from the sub-application server corresponding to the target intelligent agent to the business party server, and the business party server calls the conversation model corresponding to the target intelligent agent to generate a reply message corresponding to the conversation information; or, the sub-application server corresponding to the target intelligent agent may call the conversation model corresponding to the target intelligent agent through the model calling interface provided by the business party server to generate a reply message corresponding to the conversation information.
[0142] Optionally, the preprocessing process of the conversation information may be executed by the sub-application server corresponding to the target intelligent agent. The preprocessing process of the conversation information may refer to the relevant description of step S203 in the above Figure 2 illustrated embodiment and will not be elaborated here.
[0143] S404. Call the sub-application corresponding to the target intelligent agent to render the reply message to the conversation page.
[0144] In step S404, the sub-application corresponding to the target intelligent agent (specifically, the sub-application client corresponding to the target intelligent agent) can be called to obtain the reply information, and the sub-application corresponding to the target intelligent agent (specifically, the sub-application client corresponding to the target intelligent agent) can be called to render the reply information to the conversation page. For the specific rendering process of the reply information, reference can be made to the relevant description in step S204 above, which will not be elaborated here.
[0145] Corresponding to the invocation method of the conversation model corresponding to the target intelligent agent, the method for the sub-application client corresponding to the target intelligent agent to obtain the reply information from the conversation model corresponding to the target intelligent agent can include any of the following:
[0146] First, the conversation model corresponding to the target intelligent agent can be deployed in the sub-application server corresponding to the target intelligent agent, and the sub-application client corresponding to the target intelligent agent can obtain the reply information from the sub-application server corresponding to the target intelligent agent. Among them, the obtaining method can include: the sub-application client corresponding to the target intelligent agent can receive the reply information sent by the sub-application server corresponding to the target intelligent agent, or the sub-application client corresponding to the target intelligent agent can obtain the reply information through the model invocation interface provided by the sub-application server corresponding to the target intelligent agent.
[0147] Second, the conversation model corresponding to the target intelligent agent can be deployed in the business party server corresponding to the target intelligent agent, and the sub-application server corresponding to the target intelligent agent can obtain the reply information from the business party server; among them, the obtaining method can include: the sub-application server corresponding to the target intelligent agent can receive the reply information sent by the business party server, or the sub-application server corresponding to the target intelligent agent can obtain the reply information through the model invocation interface provided by the business party server. The sub-application client corresponding to the target intelligent agent can receive the reply information sent by the sub-application server corresponding to the target intelligent agent.
[0148] The content of step S404 above introduces that the reply information can be rendered by the sub-application corresponding to the target intelligent agent. Optionally, the reply information can be rendered by the parent application (specifically, the parent application client). Specifically, the parent application client can receive the reply information sent by the sub-application corresponding to the target intelligent agent, and the parent application client can render the reply information to the conversation page. For the specific rendering process of the reply information, reference can be made to the relevant description in step S204 in the above Figure 2 illustrated embodiment, which will not be elaborated here.
[0149] The content of steps S403 - S404 above details the technical process of having a conversation with the target intelligent agent in the parent application. It should be noted that in this technical process, the process of the parent application calling the sub-application can include: such as Figure 5As shown, the parent application client can launch the session component, and the sub-application corresponding to the target agent can call the session model corresponding to the target agent to generate a reply message corresponding to the conversation message, and the reply message can be rendered on the session page.
[0150] Taking the rendering by the sub-application client corresponding to the target agent as an example, the process of steps S401 - S404 above can be summarized as Figure 6 The technical architecture shown: The user can trigger a session request for the target agent on pages such as the personal page, content publishing page, or message page of the parent application client; in response to the session request, the parent application client can launch the sub-application client corresponding to the target agent through a deep link (deeplink), call the sub-application client corresponding to the target agent to render and display the session page with the target agent, and the session page can provide a session service (i.e., session function) with the target agent, a sharing service for session data with the target agent (i.e., sharing function), and an association service (i.e., association function) to trigger the target agent to generate association text; in response to the conversation message input by the user in the session page, the sub-application client corresponding to the target agent can send the conversation message to the sub-application server corresponding to the target agent, and the sub-application server corresponding to the target agent can preprocess the conversation message, assemble reference information (i.e., context record) and / or answer mode for the conversation message to ensure the generation effect of the session model corresponding to the target agent; the sub-application server corresponding to the target agent can call the session model corresponding to the target agent to generate a reply message corresponding to the conversation message, and send the reply message to the sub-application client corresponding to the target agent, and the sub-application client corresponding to the target agent can render and display the reply message on the session page.
[0151] In the embodiments of the present application, an agent can be accessed in the parent application, and an agent can be accessed in the parent application in the form of a sub-application. After the agent is accessed in the parent application, in response to a session request for the agent triggered in the parent application, the session page with the agent can be rendered in the parent application through the parent application or by calling the sub-application corresponding to the agent. Thus, a session can be conducted with the agent in the parent application, that is, the session page with the agent can be directly displayed and a session can be conducted with the agent in the parent application without jumping from the parent application to other business platforms, which can improve the session efficiency with the agent in the application.
[0152] The embodiments of the present application propose a data processing method based on an agent. The content introduced by this data processing method based on an agent can include: the rendering process and session process in the access mode where at least one agent is accessed in the same sub-application of the parent application in the form of an agent instance. AsFigure 7 As shown, the agent-based data processing method may include, but is not limited to, the following steps S701 - S704:
[0153] S701, in response to a session request for a target agent triggered in the parent application, call the agent instance corresponding to the target agent in the child application to obtain page template data, where the page template data is used to generate a session page for conducting a session with at least one agent, and the target agent is any one of the at least one agent.
[0154] In step S701, at least one agent can access the parent application by accessing the child application, and one agent accessing the child application corresponds to one agent instance. The page template data can be stored in the child application container or session component. In response to a session request for a target agent triggered in the parent application (specifically, the parent application client), the agent instance corresponding to the target agent in the child application (specifically, the child application client) can be called to obtain the page template data from the child application container or session component.
[0155] Optionally, the agent instance corresponding to the target agent in the child application (specifically, the child application client) can also be called to obtain the page content data corresponding to the target agent, that is, obtain the configuration data corresponding to the target agent and the historical session data with the target agent (when there is historical session data with the target agent). Among them, the configuration data corresponding to the target agent can be managed by the child application server, and the agent instance corresponding to the target agent can be called to obtain the configuration data corresponding to the target agent from the child application server. The historical session data with the target agent can be managed by the parent application (specifically, the parent application server), and the agent instance corresponding to the target agent can be called to obtain the historical session data with the target agent from the parent application server, or the historical session data with the target agent can be managed by the child application server, and the agent instance corresponding to the target agent can be called to obtain the historical session data with the target agent from the child application server.
[0156] S702, call the agent instance corresponding to the target agent in the child application to render the page template data to obtain a session page corresponding to the target agent, and display the session page.
[0157] In step S702, the agent instance corresponding to the target agent in the child application (specifically, the child application client) can be called to render the page template data and the page content data corresponding to the target agent to obtain a session page corresponding to the target agent, and the agent instance corresponding to the target agent in the child application can be called to display the session page. For the specific rendering process of the session page, reference can be made to the above Figure 2The relevant description of step S202 in the illustrated embodiment will not be elaborated here.
[0158] The content of the above steps S701 - S702 introduces that the session page with the target agent can be rendered by the agent instance corresponding to the target agent in the sub - application. Optionally, the session page with the target agent can be rendered by the parent application (specifically, the parent application client). Specifically, the parent application (specifically, the parent application client) can obtain page template data and page content data. The page content data can include the configuration data corresponding to the target agent and the historical session data with the target agent (when there is historical session data with the target agent); for the page template data, the parent application client can receive the page template data sent by the agent instance corresponding to the target agent, or the parent application client can obtain the page template data from the parent application server. The page template data can be stored in the parent application server after the parent application client first receives the page template data from the agent instance corresponding to the target agent; for the configuration data corresponding to the target agent, the parent application client can obtain the configuration data corresponding to the target agent from the sub - application server, or the parent application client can obtain the configuration data corresponding to the target agent from the parent application server. The configuration data corresponding to the target agent is stored in the parent application server after the parent application client first obtains the configuration data corresponding to the target agent from the sub - application server. For the historical session data with the target agent, the historical session data with the target agent can be managed by the parent application server, and the parent application client can obtain the historical session data with the target agent from the parent application server, or the historical session data with the target agent can be managed by the sub - application server, and the parent application client can obtain the historical session data with the target agent from the sub - application server. The parent application (specifically, the parent application client) can render the page template data and the page content data corresponding to the target agent to obtain the session page with the target agent.
[0159] Optionally, the session page with the target agent can also be rendered by a sub-application (specifically, a sub-application client). Specifically, the sub-application (specifically, the sub-application client) can obtain page template data and page content data. The page content data can include configuration data corresponding to the target agent and historical session data with the target agent (when there is historical session data with the target agent). For the page template data, the sub-application client can obtain the page template data from the sub-application container or the session component. For the configuration data corresponding to the target agent, the sub-application client can obtain the configuration data corresponding to the target agent from the sub-application server. For the historical session data with the target agent, the historical session data with the target agent can be managed by the parent application server, and the sub-application client can obtain the historical session data with the target agent from the parent application server. Or, the historical session data with the target agent can be managed by the sub-application server, and the sub-application client can obtain the historical session data with the target agent from the sub-application server. The sub-application (specifically, the sub-application client) can render the page template data and the page content data corresponding to the target agent to obtain the session page with the target agent. For the specific rendering process of the session page, reference can be made to the relevant description of step S202 in the above Figure 2 illustrated embodiment, which will not be elaborated here.
[0160] The content of the above steps S701 - S702 details the technical process of triggering the display of the session page with the target agent in the parent application. It should be noted that in this technical process, the process of the parent application calling the agent instance corresponding to the target agent in the sub-application can include: The container of the parent application client (which can also be called the terminal container) can start the container of the sub-application client (which can also be called the sub-application container or the applet container). The container of the sub-application client can start the sub-application client, and the sub-application client can start the session component (chatbox). Each agent instance corresponding to each agent in at least one agent can be included in the session component, that is, the agent instance corresponding to the target agent can be included in the session component.
[0161] S703. In response to the conversation information input in the session page, call the session model corresponding to the target agent through the agent instance corresponding to the target agent in the sub-application to generate a reply message corresponding to the conversation information. There is a subordinate relationship between the sub-application and the parent application.
[0162] In step S703, the calling method of the session model corresponding to the target agent by the agent instance corresponding to the target agent can include any one of the following:
[0163] First, the session model corresponding to the target intelligent agent can be deployed in the sub-application server. In response to the conversation information input in the conversation page of the sub-application client, the intelligent agent instance corresponding to the target intelligent agent can call the session model corresponding to the target intelligent agent in the sub-application server to generate a reply message corresponding to the conversation information. The calling method can include: the intelligent agent instance corresponding to the target intelligent agent sends the conversation information to the sub-application server, and the sub-application server calls the session model corresponding to the target intelligent agent to generate a reply message corresponding to the conversation information; or, the intelligent agent instance corresponding to the target intelligent agent can call the session model corresponding to the target intelligent agent through the model calling interface provided by the sub-application server to generate a reply message corresponding to the conversation information.
[0164] Second, the session model corresponding to the target intelligent agent can be deployed in the business party server corresponding to the target intelligent agent. In response to the conversation information input in the conversation page of the sub-application client, the intelligent agent instance corresponding to the target intelligent agent can send the conversation information to the sub-application server, and the sub-application server can call the session model corresponding to the target intelligent agent in the business party server to generate a reply message corresponding to the conversation information. The calling method can include: the sub-application server sends the conversation information to the business party server, and the business party server calls the session model corresponding to the target intelligent agent to generate a reply message corresponding to the conversation information; or, the sub-application server can call the session model corresponding to the target intelligent agent through the model calling interface provided by the business party server to generate a reply message corresponding to the conversation information.
[0165] Optionally, the preprocessing process of the conversation information can be executed by the sub-application server. For the preprocessing process of the conversation information, reference can be made to the relevant description of step S203 in the above Figure 2 illustrated embodiment, which will not be elaborated here.
[0166] S704, call the intelligent agent instance corresponding to the target intelligent agent in the sub-application program to render the reply message to the conversation page.
[0167] In step S704, the intelligent agent instance corresponding to the target intelligent agent in the sub-application program can be called to obtain the reply message, and the intelligent agent instance corresponding to the target intelligent agent can be called to render the reply message to the conversation page. For the specific rendering process of the reply message, reference can be made to the relevant description in step S204 above, which will not be elaborated here.
[0168] Corresponding to the calling method of the session model corresponding to the target intelligent agent, the method for the intelligent agent instance corresponding to the target intelligent agent to obtain the reply message from the session model corresponding to the target intelligent agent can include any one of the following:
[0169] First, the conversation model corresponding to the target agent can be deployed in the sub-application server, and the agent instance corresponding to the target agent can obtain the reply information from the sub-application server. The obtaining methods can include: the agent instance corresponding to the target agent can receive the reply information sent by the sub-application server, or the agent instance corresponding to the target agent can obtain the reply information through the model call interface provided by the sub-application server. Second, the conversation model corresponding to the target agent can be deployed in the business party server corresponding to the target agent, and the sub-application server can obtain the reply information from the business party server; the obtaining methods can include: the sub-application server can receive the reply information sent by the business party server, or the sub-application server can obtain the reply information through the model call interface provided by the business party server. The agent instance corresponding to the target agent can receive the reply information sent by the sub-application server.
[0170] The content of step S704 above describes that the reply information can be rendered by the agent instance corresponding to the target agent in the sub-application. Optionally, the reply information can be rendered by the parent application (specifically, the parent application client). Specifically, the sub-application client can receive the reply information sent by the agent instance corresponding to the target agent, the parent application client can receive the reply information sent by the sub-application client, and the parent application client can render the reply information to the conversation page. Optionally, the reply information can also be rendered by the sub-application (specifically, the sub-application client). Specifically, the sub-application client can receive the reply information sent by the agent instance corresponding to the target agent, and the sub-application client can render the reply information to the conversation page. The specific rendering process of the reply information can refer to the relevant description of step S204 in the above Figure 2 illustrated embodiment and will not be elaborated here.
[0171] The content of steps S703 - S704 above details the technical process of having a conversation with the target agent in the parent application. It should be noted that in this technical process, the process of the parent application calling the agent instance corresponding to the target agent can include: the parent application client can launch the conversation component, the agent instance corresponding to the target agent can call the conversation model corresponding to the target agent to generate the reply information of the conversation information, and the reply information can be rendered to the conversation page.
[0172] Taking the rendering by the agent instance corresponding to the target agent as an example, the process of steps S701 - S704 above can be summarized into the following technical architecture: The use object can trigger a session request for the target agent on pages such as the personal page, the content publishing page, or the message page of the parent application client; In response to the session request, the parent application client can launch the child application client through a deep link (deeplink), and the child application client can launch the agent instance corresponding to the target agent, call the agent instance corresponding to the target agent to render and display the session page with the target agent. The session page can provide a session service (i.e., session function) with the target agent, a sharing service (i.e., sharing function) for the session data with the target agent, and an association service (i.e., association function) to trigger the target agent to generate associated text; In response to the conversation information input by the use object in the session page, the agent instance corresponding to the target agent can send the conversation information to the child application server, and the child application server can preprocess the conversation information, assemble reference information and / or answer patterns for the conversation information to ensure the generation effect of the session model corresponding to the target agent; The child application server can call the session model corresponding to the target agent to generate a reply message corresponding to the conversation information, and send the reply message to the agent instance corresponding to the target agent. The agent instance corresponding to the target agent can render and display the reply message in the session page.
[0173] In the embodiments of the present application, an agent can be integrated into the parent application, and at least one agent can be integrated into the same child application in the parent application. After integrating the agent into the parent application, in response to a session request for the agent triggered in the parent application, the session page with the agent can be rendered in the parent application through the parent application, the child application, or the agent instance corresponding to the agent. Thus, a session can be conducted with the agent in the parent application, that is, the session page with the agent can be directly displayed in the parent application and a session can be conducted with the agent without jumping from the parent application to other business platforms, which can improve the session efficiency with the agent in the application.
[0174] The embodiments of the present application propose a data processing method based on an agent. The content introduced by the data processing method based on an agent can include: The technical process of publishing the session data with the agent as the published content of the parent application. The data processing method based on an agent can be executed by a terminal device, specifically by the parent application running on the terminal device. As Figure 8a shown, the data processing method based on an agent can include but is not limited to the following steps S801 - S803:
[0175] S801. Display a conversation page with the target agent through a sub-application. The conversation page includes conversation data with the target agent, and the conversation data includes conversation information and reply information.
[0176] In step S801, the process of displaying a conversation page with the target agent through a sub-application is described in steps S201 - S202 of the above Figure 2 illustrated embodiment. In steps S401 - S402 of the above Figure 4 illustrated embodiment (corresponding to the case of displaying through the sub-application corresponding to the target agent), in steps S701 - S702 of the above Figure 7 illustrated embodiment (corresponding to the case of displaying through the agent instance corresponding to the target agent in the sub-application), specifically, reference can be made to the relevant descriptions of the above Figure 2 、 Figure 4 and Figure 7 illustrated embodiments, which will not be elaborated here. The process of displaying conversation data with the target agent in the conversation page is described in steps S203 - S204 of Figure 2 the illustrated embodiment. In steps S403 - S404 of the above Figure 4 illustrated embodiment (corresponding to the case of displaying through the sub-application corresponding to the target agent), in steps S703 - S704 of the above Figure 7 illustrated embodiment (corresponding to the case of displaying through the agent instance corresponding to the target agent in the sub-application), specifically, reference can be made to the relevant descriptions of the above Figure 2 、 Figure 4 and Figure 7 illustrated embodiments, which will not be elaborated here.
[0177] S802. In response to a publishing operation on the conversation data, receive the conversation data sent by the sub-application.
[0178] In step S802, in response to a publishing operation on the conversation data, the mother application can receive the conversation data sent by the sub-application. Specifically, it means that the mother application client can receive the conversation data sent by the sub-application client. For the case where an agent is accessed by the mother application in the form of a sub-application, the mother application client can receive the conversation data sent by the sub-application client corresponding to the target agent; for the case where at least one agent is accessed by the mother application in the same sub-application, the mother application client can receive the conversation data sent by the agent instance corresponding to the target agent in the sub-application client.
[0179] The publishing operation on the conversation data can include any of the following: First, a triggering operation on the publishing control in the conversation page with the target agent; specifically, as Figure 8bAs shown, in the conversation page 80 between the user and the target agent, conversation data 801 with the target agent can be included. In response to a trigger operation on the conversation data 801 (the trigger operation here can be, for example, a long press), a sharing control 802 can be displayed in the conversation page 80. In response to a trigger operation on the sharing control 802 (the trigger operation here can be, for example, a click), a publishing control 803 can be displayed in the conversation page 80. The parent application can receive the conversation data sent by the sub-application in response to a trigger operation on the publishing control 803 (the trigger operation here can be, for example, a click). Second, after selecting the conversation data in the conversation page with the target agent, the parent application can receive the conversation data sent by the sub-application in response to the gravity sensing operation of the terminal device running the parent application; for example, the gravity sensing operation can include a shaking operation, a rotation operation, etc., and the embodiments of the present application do not limit this. Third, after selecting the conversation data in the conversation page with the target agent, the parent application can receive the conversation data sent by the sub-application in response to the gesture trigger operation on the conversation page; the gesture trigger operation refers to the operation of drawing a specific pattern in the conversation page using a specific gesture. For example, the operation of drawing the letter "P" in the conversation page with the index finger.
[0180] The publishing operation on the conversation data can be the publishing operation on all or part of the conversation data in the conversation page. The part of the conversation data can be the conversation data selected by the user. For the case of part of the conversation data, as Figure 8c shown, the user selects a set of conversation data composed of a conversation message and a reply message in the conversation page as the conversation data to be published.
[0181] Optionally, the number of groups that can be set to support as the conversation data to be published can be set (for example, it can be set to one group). In this case, as Figure 8d shown, if a set of conversation data has been selected as the conversation data to be published, then the selection controls for other conversation data are set to the non-selectable state (for example Figure 8d the filled state in Figure 8d ), and a non-selectable prompt can be output (for example,
[0182] "Only one group of conversations is supported for sharing" in Figure 8e ).
[0183] Optionally, as Figure 8e shown, it is also possible to support copying of session data. In response to a trigger operation on the session data 801 (the trigger operation here can be, for example, a long press), a copy control 805 can be displayed on the session page 80. In response to a trigger operation on the copy control 805 (the trigger operation here can be, for example, a click), the session data 801 can be copied, and a copy prompt can be displayed (for example, Figure 8e "Copied" in
[0184] S803, the mother application processes the conversion of the session data to obtain multiple images to be published, determines the target published content including the multiple images to be published, and publishes the target published content; wherein, there is a subordinate relationship between the mother application and the child application.
[0185] In step S703, the mother application can process the conversion of the session data to obtain multiple images to be published; wherein, the conversion process can include image conversion and image segmentation. Image conversion means converting the session data into an image containing the session data, and image segmentation means segmenting the image according to the image standard of the published content to obtain multiple images to be published.
[0186] The mother application can determine the target published content including the multiple images to be published and publish the target published content. Among them, the process of determining the target published content can include: the mother application can obtain a cover image and description information. The cover image can be generated according to the conversation information in the session data, and the description information can be generated according to the conversation information in the session data. The mother application generates the target published content based on the cover image, the multiple images to be published, and the description information.
[0187] Specifically, in the process of publishing the session data as the published content, the interaction process between the mother application client and the mother application server can include: the mother application client can send the session data to the mother application server, and the mother application server can process the conversion of the session data to obtain multiple images to be published and determine the target published content including the multiple images to be published; the mother application server can send the target published content to the mother application client, and the mother application client renders the target published content to the published content page to publish the target published content.
[0188] The content of the above step S703 introduces the technical process of converting session data into target published content. In terms of product presentation, as Figure 8bAs shown, in response to a publishing operation on session data, for example, in response to a triggering operation on the publishing control 803 (the triggering operation here can be, for example, a click), a content editing page 81 can be displayed. The content editing page can include target publishing content 811 and a publishing confirmation control 812. In response to a triggering operation on the publishing confirmation control 812 (the triggering operation here can be a click), a publishing content page 82 of the user of use can be displayed, and the target publishing content 811 can be included in the publishing content page 82.
[0189] Optionally, for a publishing content page that uses the session data with the target agent as the publishing content, a session entry with the target agent can be included. In response to a triggering operation on the session entry, a session page for communicating with the target agent can be displayed, so that communication can be carried out with the target agent. For example, in Figure 8b the shown publishing content page 82, there can be a session entry 301 with the target agent.
[0190] In the embodiments of the present application, the session data between the user of the parent application and the agent can be combined with the business functions provided by the parent application itself. For example, the session data can be combined with the content publishing function provided by the parent application itself, and the session data can be converted into publishing content for publishing. In this way, the business functions provided by the parent application itself can use the interaction content with the agent, improving the intelligence level of the business functions provided by the parent application itself.
[0191] The above Figure 2 、 Figure 4 、 Figure 7 and Figure 8a the content of the shown embodiments are all based on the premise that an agent has been connected in the parent application. The embodiments of the present application propose a data processing method based on an agent. The content introduced by the data processing method based on an agent can include: the standard access method and unified management method of the agent in the parent application. As Figure 9 shown, the data processing method based on an agent can include but is not limited to the following steps S901 - step S902:
[0192] S901, connect at least one agent in the parent application, and the target agent is any one of the at least one agent.
[0193] In step 901, in one implementation, an agent can be accessed into the parent application in the form of a sub-application, that is, at least one sub-application corresponding to the agent can be accessed into the parent application; in this case, the sub-application corresponding to at least one agent can specifically be accessed into the session component of the sub-application container accessed into the parent application (corresponding to the case where the session component is included in the sub-application container), as Figure 10 shown, at least one sub-application corresponding to the agent can be accessed into the session component; or, the sub-application corresponding to at least one agent can specifically be accessed into the sub-application container of the parent application, corresponding to the case where the session component is the sub-application container. In another implementation, at least one agent can be accessed into the same sub-application of the parent application, and at least one agent instance corresponding to the agent can be accessed into the sub-application of the parent application.
[0194] Accessing the agent (including the sub-application corresponding to the agent or the agent instance corresponding to the agent) involves the front-end access of the agent. The front-end access process of the agent can include: downloading the subprogram IDE (Integrated Development Environment), and performing custom development with reference to the issued code access example; completing local development and testing; releasing the experience version for testing; and clicking to go live.
[0195] During the front-end access process, by introducing the xhs-ai-chatbox component in the rendering layer, it is possible to support the configuration of enabling and disabling (i.e., showing and not showing) the extended function controls on the session page. Taking the extended function controls including the in-depth thinking control and the network search control as an example, the exemplary code of the xhs-ai-chatbox component is as follows:
[0196]
[0197] As Figure 10 shown, in addition to the front-end access, the agent can also involve the back-end access. The back-end access refers to docking the agent (including the sub-application corresponding to the agent or the agent instance corresponding to the agent) with the session model corresponding to the agent. For the case where the session model corresponding to the agent is deployed on the sub-application server, the docking means deploying the session model corresponding to the agent on the sub-application server. For the case where the session model corresponding to the agent is deployed on the business party server, the docking means defining the call interface between the sub-application server and the session model corresponding to the agent. The call interface can be, for example, SPI (Serial Peripheral Interface), and the embodiments of the present application do not limit this.
[0198] If the conversation model corresponding to the agent is deployed on the business server, the sub-application server can request the conversation model corresponding to the agent to generate reply information corresponding to the dialogue information in the form of a request, and the conversation model corresponding to the agent can return the reply information corresponding to the dialogue information in the form of a response. The definition of the call interface can include the definition of request parameters and response parameters. The following Table 1 shows an example of the definition of request parameters:
[0199] Table 1
[0200]
[0201] It is worth noting that in the request parameters shown in Table 1 above, the field value of the deep_thinking field is used to indicate whether the user object triggers the deep thinking control. The field value of the enable_search field can be used to indicate whether the user object triggers the network search control. The field value of the generate_type field can be the answer mode mentioned above. Through this field, it can be required that this field requires the assistant (the conversation model corresponding to the intelligent agent) to output reply information that meets the requirements as much as possible; for example, the answer mode can include chat mode (CHAT) and associative word mode (RELATED_WORD). The field value of the stream field can be used to indicate the return form of the reply information of the conversation model corresponding to the intelligent agent. The return form can include streaming return and non-streaming return; among them, streaming return means that there is no need to wait for the reply information to be fully generated, and it can be returned while generating. Non-streaming return means that it is necessary to wait for the reply information to be fully generated and all the reply information is returned at one time.
[0202] The following code shows an example of a request from a sub-application (specifically a sub-application server) to the conversation model corresponding to the agent:
[0203]
[0204] Table 2 below shows an example definition of response parameters:
[0205] Table 2
[0206]
[0207]
[0208] The following code shows an example of the response of the conversation model corresponding to the agent to the sub-application (specifically, the sub-application server) (corresponding to the case of successful response (streaming)):
[0209]
[0210]
[0211] The following code shows an example of the response of the session model corresponding to the agent to the sub-application (specifically, the sub-application server) (corresponding to the case of successful response (non-streaming)):
[0212]
[0213] The following code shows an example of the response of the session model corresponding to the agent to the sub-application (specifically, the sub-application server) (corresponding to the case of failed response):
[0214]
[0215] S902, uniformly manage at least one agent according to a unified standard; wherein, the unified standard includes a rendering standard and a session standard, and the unified management includes rendering management corresponding to the rendering standard and session management corresponding to the session standard.
[0216] In step S902, for the case where an agent is accessed into the parent application in the form of a sub-application, the sub-applications corresponding to at least one agent can be uniformly managed according to the unified standard. Or, for the case where at least one agent is accessed into the same sub-application of the parent application, the agent instances corresponding to at least one agent can be uniformly managed according to the unified standard.
[0217] The unified standard means that the standards used to manage at least one accessed agent are unified, which is beneficial to improving the management efficiency of agents when the number of accessed agents is large. The unified standard can include a rendering standard and a session standard.
[0218] Among them, the rendering standard can be used to define the unified rendering method of at least one agent, and the rendering management refers to rendering according to the rendering method defined by the rendering standard, which can specifically include the page rendering standard for the session page and the rendering standard for the session data in the session page. The page rendering standard can be used to define the unified page template data, that is, the unified session page style, and the rendering standard for the session data can be used to define the correspondence between the content type of the session data and the rendering service. Figure 11 and Figure 12 is an exemplary unified rendering standard: in the basic area of the session page, the identifier of the agent can be included (for example, in Figure 11The icons of the target agents and the names of the target agents), controls for triggering global functions (such as settings, complaints and reports, and restarting the session, etc.); in the session information area of the session page, there can be functions for operating on session data (such as copying and sharing), and the reply information can also be rendered according to the unified rendering standard of the session data; in the input area of the session page, functions for session control can be set (such as new conversation function, in-depth thinking function, and network search function), and functions for external sending can also be set (such as album and taking pictures, etc.). Figure 13 It is an exemplary session page rendered for different agents according to a unified rendering standard. It can be seen that through the unified rendering standard, the overall forms of the session pages of different agents are unified, which can improve the usage experience of the users.
[0219] The session standard can be used to define the unified session manner of at least one agent. Session management refers to having a session with the agent according to the session manner defined by the session standard; session management can include: historical session management, reference information injection management, request management with the agent, and response management with the agent. Among them, historical session management can be used to uniformly manage the historical session data with each agent. Reference information injection management can be used to manage the types of reference information to be injected under different triggering scenarios of session requests. Request management with the agent can be used to manage the request parameters of the sub-application server requesting the session model corresponding to the agent. Response management with the agent can be used to manage the response parameters of the session model corresponding to the agent responding to the sub-application server.
[0220] In the embodiments of the present application, for the business parties of the agents, it provides the ability to quickly access the application program ecosystem that is common to different agents, and can quickly dock through the open capabilities to interact with the users of the application program within the application program. For the users of the application program, they can access more open agent capabilities in the application program, enriching the interaction scenarios between the users and the application program.
[0221] Please refer to Figure 14 ], Figure 14 is a schematic structural diagram of a data processing device based on agents provided by the embodiments of the present application. The data processing device based on agents can be set in the computer device provided by the embodiments of the present application, and the computer device can be a terminal device running the parent application program. Figure 14 The data processing device based on agents shown can be a computer program running in the computer device. The data processing device based on agents can be used to execute Figure 2 , Figure 4 , Figure 7 , Figure 8a orFigure 9 Some or all of the steps in the method embodiments shown. Please refer to Figure 14 , the agent-based data processing device may include the following units:
[0222] A processing unit 1401, configured to obtain page template data in response to a session request for a target agent triggered in a parent application, where the page template data is used to generate a session page for having a session with at least one agent, and the target agent is any one of the at least one agent;
[0223] A display unit 1402, configured to render the page template data to obtain a session page for the target agent, and display the session page;
[0224] The processing unit 1401 is further configured to, in response to the conversation information input in the session page, call the session model corresponding to the target agent through a sub-application to generate a reply message corresponding to the conversation information, and there is a subordinate relationship between the sub-application and the parent application;
[0225] The display unit 1402 is further configured to render the reply message to the session page.
[0226] In one implementation, when the display unit 1402 is configured to render the page template data to obtain a session page for the target agent, it is specifically configured to perform any one of the following:
[0227] Render the page template data through the parent application to obtain a session page for the target agent;
[0228] Call the sub-application corresponding to the target agent to render the page template data to obtain a session page corresponding to the target agent; wherein, one agent accessing the parent application corresponds to one sub-application;
[0229] Call the agent instance corresponding to the target agent in the sub-application to render the page data to obtain a session page for the target agent; wherein, at least one agent accesses the parent application by accessing the sub-application, and one agent accessing the sub-application corresponds to one agent instance.
[0230] In one implementation, in one implementation, the display unit 1402 is further configured to perform any one of the following:
[0231] Display the personal page of the target agent through the parent application, and generate a session request in response to a session trigger operation for the personal page;
[0232] Display a published content page through the parent application, where the published content page includes a session entry for the target agent, and generate a session request in response to a session trigger operation for the session entry;
[0233] The message page is displayed through the parent application. The message page includes session messages of at least one object, and at least one object includes the target agent. In response to a session trigger operation for the target agent in the message page, a session request is generated.
[0234] The search page is displayed through the parent application. The search page includes a session entry for the target agent. In response to a session trigger operation for the session entry, a session request is generated.
[0235] The comment page is displayed through the parent application. The comment page includes comment content for the target agent. In response to a session trigger operation for the target agent in the comment page, a session request is generated.
[0236] In one implementation, the display unit 1402 is further configured to display a session page with the target agent through a sub-application. The session page includes session data between the display unit and the target agent, and the session data includes conversation information and reply information.
[0237] The processing unit 1401 is further configured to receive the session data sent by the sub-application in response to a publishing operation on the session data.
[0238] The processing unit 1401 is further configured to perform conversion processing on the session data through the parent application to obtain multiple images to be published, determine the target publishing content including the multiple images to be published, and publish the target publishing content. Among them, there is a subordinate relationship between the parent application and the sub-application.
[0239] In one implementation, the processing unit 1401 is further configured to perform the following steps:
[0240] In response to the conversation information input in the session page, the corresponding reply information of the conversation information is generated by calling the session model corresponding to the target agent through the sub-application.
[0241] Render the reply information to the session page.
[0242] In one implementation, when the processing unit 1401 is used to generate the reply information corresponding to the conversation information by calling the session model corresponding to the target agent through the sub-application, it is specifically configured to perform any one of the following:
[0243] Through the sub-application corresponding to the target agent, call the session model corresponding to the target agent to generate the reply information corresponding to the conversation information. Among them, one agent accessing the parent application corresponds to one sub-application.
[0244] Call the session model corresponding to the target agent through the agent instance corresponding to the target agent in the sub-application to generate a reply message corresponding to the conversation message; wherein, at least one agent accesses the parent application by accessing the sub-application, and one agent accessing the sub-application corresponds to one agent instance.
[0245] In one implementation, the processing unit 1401 is further configured to perform any one of the following:
[0246] Preprocess the conversation message through the sub-application to obtain the preprocessed conversation message;
[0247] When the processing unit 1401 is configured to call the session model corresponding to the target agent through the sub-application to generate a reply message corresponding to the conversation message, it is specifically configured to perform the following steps:
[0248] Call the session model corresponding to the target agent through the sub-application to generate a reply message corresponding to the preprocessed conversation message.
[0249] In one implementation, when the processing unit 1401 is configured to preprocess the conversation message through the sub-application to obtain the preprocessed conversation message, it is specifically configured to perform the following steps:
[0250] Obtain reference information through the sub-application, and the reference information matches the trigger scenario corresponding to the session request;
[0251] Assemble and process the reference information and the conversation message through the sub-application to obtain the preprocessed conversation message;
[0252] Wherein, the session model corresponding to the target agent generates a reply message corresponding to the conversation message according to the reference information and the conversation message.
[0253] In one implementation, when the processing unit 1401 is configured to preprocess the conversation message through the sub-application to obtain the preprocessed conversation message, it is specifically configured to perform the following steps:
[0254] Obtain an answer mode through the sub-application, and the answer mode matches the session scenario corresponding to the session page;
[0255] Assemble and process the answer mode and the conversation message through the sub-application to obtain the preprocessed conversation message;
[0256] Wherein, the session model corresponding to the target agent generates a reply message corresponding to the conversation message according to the answer mode.
[0257] In one implementation, when the processing unit 1401 is used to generate a reply message corresponding to the conversation message by calling the conversation model corresponding to the target agent through a sub-application in response to the conversation message input in the conversation page, it is specifically used to perform the following steps:
[0258] Display at least one extended function control on the conversation page, and each extended function control corresponds to an answer generation strategy;
[0259] In response to the trigger operation on the target extended function control among the at least one extended function control and the conversation message input in the conversation page, call the conversation model corresponding to the target agent through the sub-application to generate a reply message corresponding to the conversation message according to the answer generation strategy corresponding to the target extended function control.
[0260] In one implementation, when the processing unit 1401 is used to render the reply message to the conversation page, it is specifically used to perform the following steps:
[0261] Determine the content type included in the reply message;
[0262] Call the rendering service that matches the content type to render the reply message to obtain the rendered reply message;
[0263] Display the rendered reply message on the conversation page.
[0264] In one implementation, the processing unit 1401 is further used to perform any one of the following:
[0265] Connect at least one sub-application corresponding to an agent in the parent application and uniformly manage at least one sub-application corresponding to an agent according to a unified standard;
[0266] Or, connect at least one agent instance corresponding to an agent in the sub-application and uniformly manage at least one agent instance corresponding to an agent according to a unified standard;
[0267] Wherein, the unified standard includes a rendering standard and a session standard, and the unified management includes rendering management corresponding to the rendering standard and session management corresponding to the session standard.
[0268] According to an embodiment of the present application, Figure 14Each unit in the agent-based data processing device shown can be separately or all combined into one or several other units to form, or some of them can be further split into multiple smaller units with more specific functions to form. This can achieve the same operations without affecting the realization of the technical effects of the embodiments of this application. The above units are divided based on logical functions. In practical applications, the function of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of this application, the device can also include other units. In practical applications, these functions can also be assisted and realized by other units, and can be realized through the cooperation of multiple units.
[0269] According to another embodiment of this application, it can be achieved by running a computer program capable of executing the steps involved in some or all of the methods shown in, for example, Figure 2 , Figure 4 , Figure 7 , Figure 8a or Figure 9 on a general computing device such as a computer including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), and a read-only storage medium (ROM), to construct the agent-based data processing device shown in Figure 14 , and to implement the agent-based data processing method of the embodiments of this application. The computer program can be recorded on, for example, a computer-readable storage medium, loaded into the above computing device through the computer-readable storage medium, and run therein.
[0270] In an embodiment of the present application, in response to a session request for a target agent triggered in a parent application, page template data can be obtained. The page template data can be used to generate a session page for conducting a session with at least one agent. The page template data can be rendered to obtain a session page for the target agent, and the session page can be displayed. In response to the conversation information input in the session page, a reply message corresponding to the conversation information can be generated by calling the session model corresponding to the target agent through a sub-application. There is a subordinate relationship between the sub-application and the parent application. The reply message can be rendered to the session page. It can be seen that the application can be used as the parent application, and the agent can be accessed in the parent application in the form of a sub-application. Thus, the agent can be accessed in the application. Moreover, after the agent is accessed in the application, in response to a session request for the agent triggered in the application, the session page for the agent can be rendered in the application. Thus, a session can be conducted with the agent in the application, that is, the session page for the agent can be directly displayed in the application and a session can be conducted with the agent without jumping from the application to other business platforms, which can improve the session efficiency with the agent in the application. In addition, for at least one agent accessed in the parent application, the session page for conducting a session with at least one agent can be rendered based on the same page template data, which can make the session pages for at least one agent accessed in the parent application have a unified style and improve the standardization degree of agent access to the application.
[0271] Based on the above method and device embodiments, an embodiment of the present application provides a computer device. Please refer to Figure 15 , Figure 15 which is a schematic structural diagram of a computer device provided by an embodiment of the present application. Figure 15 The computer device shown at least includes a processor 1501, an input interface 1502, an output interface 1503, and a computer-readable storage medium 1504. Among them, the processor 1501, the input interface 1502, the output interface 1503, and the computer-readable storage medium 1504 can be connected through a bus or other means.
[0272] The computer-readable storage medium 1504 can be stored in the memory of the computer device. The computer-readable storage medium 1504 is used to store a computer program. The computer program includes computer instructions. The processor 1501 is used to execute the computer program stored in the computer-readable storage medium 1504. The processor 1501 (or CPU (Central Processing Unit, central processor)) is the computing core and control core of the computer device, and is suitable for implementing the computer program. Specifically, it is suitable for loading and executing the computer program to implement the corresponding method flow or corresponding function.
[0273] The embodiments of the present application also provide a computer-readable storage medium (Memory). A computer-readable storage medium is a memory device in a computer device, used to store programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and, of course, the extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, and the operating system of the computer device is stored in this storage space. And, a computer program suitable for being loaded and executed by the processor (which can include program instructions 1 - program instructions n) is also stored in this storage space. It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory (Non-Volatile Memory), such as at least one disk memory; alternatively, it can also be at least one computer-readable storage medium located far from the aforementioned processor.
[0274] The computer device can be a terminal device, and the terminal device runs a parent application program. In a specific implementation, the processor 1501 can load and execute the computer program stored in the computer-readable storage medium 1504 to implement the relevant Figure 2 、 Figure 4 、 Figure 7 、 Figure 8a or Figure 9 the corresponding steps in the methods shown. In a specific implementation, the computer program in the computer-readable storage medium 1504 is loaded and executed by the processor 1501 as follows:
[0275] In response to a session request for a target agent triggered in the parent application program, obtain page template data. The page template data is used to generate a session page for having a session with at least one agent, and the target agent is any one of the at least one agent;
[0276] Render the page template data to obtain a session page for the target agent, and display the session page;
[0277] In response to the conversation information input in the session page, call the session model corresponding to the target agent through a sub-application program to generate a reply message corresponding to the conversation information. There is a subordinate relationship between the sub-application program and the parent application program;
[0278] Render the reply message to the session page.
[0279] In one implementation, when the computer program in the computer-readable storage medium 1504 is loaded and executed by the processor 1501 to render the page template data to obtain a session page for the target agent, it is specifically used to execute any one of the following:
[0280] Render the page template data through the parent application to obtain the session page for the target agent;
[0281] Call the sub-application corresponding to the target agent to render the page template data to obtain the session page corresponding to the target agent; wherein, one agent accessing the parent application corresponds to one sub-application;
[0282] Call the agent instance corresponding to the target agent in the sub-application to render the page data to obtain the session page for the target agent; wherein, at least one agent accesses the parent application by accessing the sub-application, and one agent accessing the sub-application corresponds to one agent instance.
[0283] In one implementation, in one implementation, the computer program in the computer-readable storage medium 1504 is loaded by the processor 1501 and is further used to perform any one of the following:
[0284] Display the personal page of the target agent through the parent application, and generate a session request in response to a session trigger operation on the personal page;
[0285] Display the content publishing page through the parent application. The content publishing page includes a session entry for the target agent, and generate a session request in response to a session trigger operation on the session entry;
[0286] Display the message page through the parent application. The message page includes session messages of at least one object, and at least one object includes the target agent; generate a session request in response to a session trigger operation on the target agent in the message page;
[0287] Display the search page through the parent application. The search page includes a session entry for the target agent, and generate a session request in response to a session trigger operation on the session entry;
[0288] Display the comment page through the parent application. The comment page includes the comment content for the target agent; generate a session request in response to a session trigger operation on the target agent in the comment page.
[0289] In one implementation, the computer program in the computer-readable storage medium 1504 is loaded by the processor 1501 and executes the following steps:
[0290] Display the session page for the target agent through the sub-application. The session page includes the session data between the target agent and the agent, and the session data includes conversation information and reply information;
[0291] In response to a publishing operation on the session data, receive the session data sent by the sub-application;
[0292] The master application processes the session data to obtain multiple images to be published, determines the target published content including the multiple images to be published, and publishes the target published content; wherein, there is a subordinate relationship between the master application and the sub - applications.
[0293] In one implementation, the computer program in the computer - readable storage medium 1504 is loaded by the processor 1501 and is further used to perform any one of the following:
[0294] In response to the dialogue information input in the session page, the sub - application calls the session model corresponding to the target agent to generate a reply message corresponding to the dialogue information;
[0295] Render the reply message to the session page.
[0296] In one implementation, when the computer program in the computer - readable storage medium 1504 is loaded by the processor 1501 and executes to generate a reply message corresponding to the dialogue information by calling the session model corresponding to the target agent through the sub - application, it is specifically used to perform any one of the following:
[0297] Through the sub - application corresponding to the target agent, call the session model corresponding to the target agent to generate a reply message corresponding to the dialogue information; wherein, one agent accessing the master application corresponds to one sub - application;
[0298] Through the agent instance corresponding to the target agent in the sub - application, call the session model corresponding to the target agent to generate a reply message corresponding to the dialogue information; wherein, at least one agent accesses the master application by accessing the sub - application, and one agent accessing the sub - application corresponds to one agent instance.
[0299] In one implementation, the computer program in the computer - readable storage medium 1504 is loaded by the processor 1501 and is further used to perform any one of the following:
[0300] Pre - process the dialogue information through the sub - application to obtain the pre - processed dialogue information;
[0301] When the computer program in the computer - readable storage medium 1504 is loaded by the processor 1501 and executes to generate a reply message corresponding to the dialogue information by calling the session model corresponding to the target agent through the sub - application, it is specifically used to perform the following steps:
[0302] Call the session model corresponding to the target agent through the sub - application to generate a reply message corresponding to the pre - processed dialogue information.
[0303] In one implementation, when the computer program in the computer-readable storage medium 1504 is loaded and executed by the processor 1501 to preprocess the conversation information through a sub-application and obtain the preprocessed conversation information, it is specifically used to perform the following steps:
[0304] Obtain reference information through the sub-application, where the reference information matches the trigger scenario corresponding to the conversation request;
[0305] Perform an assembly process on the reference information and the conversation information through the sub-application to obtain the preprocessed conversation information;
[0306] Among them, the conversation model corresponding to the target intelligent agent generates a reply message corresponding to the conversation information according to the reference information and the conversation information.
[0307] In one implementation, when the computer program in the computer-readable storage medium 1504 is loaded and executed by the processor 1501 to preprocess the conversation information through a sub-application and obtain the preprocessed conversation information, it is specifically used to perform the following steps:
[0308] Obtain an answer mode through the sub-application, where the answer mode matches the conversation scenario corresponding to the conversation page;
[0309] Perform an assembly process on the answer mode and the conversation information through the sub-application to obtain the preprocessed conversation information;
[0310] Among them, the conversation model corresponding to the target intelligent agent generates a reply message corresponding to the conversation information according to the answer mode.
[0311] In one implementation, when the computer program in the computer-readable storage medium 1504 is loaded and executed by the processor 1501 to call the conversation model corresponding to the target intelligent agent to generate a reply message corresponding to the conversation information in response to the conversation information input in the conversation page, it is specifically used to perform the following steps:
[0312] Display at least one extended function control on the conversation page, and each extended function control corresponds to an answer generation strategy;
[0313] In response to the trigger operation on the target extended function control among the at least one extended function control and the conversation information input in the conversation page, call the conversation model corresponding to the target intelligent agent through the sub-application to generate a reply message corresponding to the conversation information according to the answer generation strategy corresponding to the target extended function control.
[0314] In one implementation, when the computer program in the computer-readable storage medium 1504 is loaded and executed by the processor 1501 to render the reply message to the conversation page, it is specifically used to perform the following steps:
[0315] Determine the content type included in the response information;
[0316] Call the rendering service that matches the content type to render the response information and obtain the rendered response information;
[0317] Display the rendered response information on the session page.
[0318] In one implementation, the computer program in the computer-readable storage medium 1504 is loaded by the processor 1501 and is also used to perform any one of the following:
[0319] Connect at least one sub-application corresponding to an agent in the parent application and uniformly manage the at least one sub-application corresponding to the agent according to a unified standard;
[0320] Alternatively, connect at least one agent instance corresponding to an agent in the sub-application and uniformly manage the at least one agent instance corresponding to the agent according to a unified standard;
[0321] Wherein, the unified standard includes a rendering standard and a session standard, and the unified management includes rendering management corresponding to the rendering standard and session management corresponding to the session standard.
[0322] In an embodiment of the present application, in response to a session request for a target agent triggered in a parent application, page template data can be obtained. The page template data can be used to generate a session page for conducting a session with at least one agent. The page template data can be rendered to obtain a session page for the target agent and the session page can be displayed. In response to the conversation information input in the session page, a reply message corresponding to the conversation information can be generated by calling the session model corresponding to the target agent through a sub-application. There is a subordinate relationship between the sub-application and the parent application. The reply message can be rendered to the session page. It can be seen that the application can be used as the parent application, and the agent can be accessed in the parent application in the form of a sub-application. Thus, the agent can be accessed in the application. Moreover, after the agent is accessed in the application, in response to a session request for the agent triggered in the application, the session page for the agent can be rendered in the application. Thus, a session can be conducted with the agent in the application, that is to say, the session page for the agent can be directly displayed in the application and a session can be conducted with the agent without jumping from the application to other business platforms, which can improve the session efficiency with the agent in the application. In addition, for at least one agent accessed in the parent application, the session page for conducting a session with at least one agent can be rendered based on the same page template data, which can make the session pages for at least one agent accessed in the parent application have a unified style and improve the standardization degree of agent access to the application.
[0323] In addition, it should be noted here that: The embodiment of the present application also provides a computer-readable storage medium, and a computer program is stored in the computer-readable storage medium. The computer program includes computer instructions. When the processor executes the above computer instructions, it can execute the methods in the corresponding embodiments of Figure 2 , Figure 4 , Figure 7 , Figure 8a or Figure 9 as mentioned above. Therefore, it will not be elaborated here.
[0324] According to one aspect of the present application, a computer program product is provided. The computer program product includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device can execute the methods in the corresponding embodiments of Figure 2 , Figure 4 , Figure 7 , Figure 8a or Figure 9 as mentioned above. Therefore, it will not be elaborated here.
[0325] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. This computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above various methods. Among them, the computer-readable storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0326] The above-disclosed are only the preferred embodiments of the present application. Of course, the scope of rights of the present application cannot be limited thereby. Those of ordinary skill in the art can understand all or part of the processes of the above embodiments, and the equivalent changes made according to the claims of the present application still fall within the scope covered by the present application.
Claims
1. A data processing method based on an agent, characterized in that, Including: In response to a session request for a target agent triggered in a parent application, obtain page template data for generating a session page for conversing with at least one agent, where the target agent is any one of the at least one agent; Render the page template data to obtain a session page for the target agent, and display the session page; In response to the conversation information input in the session page, call the session model corresponding to the target agent through a sub-application to generate a reply message corresponding to the conversation information, where there is a subordinate relationship between the sub-application and the parent application; Render the reply message to the session page.
2. The method according to claim 1, characterized in that The rendering the page template data to obtain a session page for the target agent includes any one of the following: Render the page template data through the parent application to obtain a session page for the target agent; Call the sub-application corresponding to the target agent to render the page template data to obtain a session page corresponding to the target agent; wherein, one agent accessing the parent application corresponds to one sub-application; Call the agent instance corresponding to the target agent in the sub-application to render the page data to obtain a session page for the target agent; wherein, the at least one agent accesses the parent application by accessing the sub-application, and one agent accessing the sub-application corresponds to one agent instance.
3. The method according to claim 1, characterized in that, The method further includes any one of the following: Display a personal page of the target agent through the parent application, and generate the session request in response to a session trigger operation on the personal page; Display a content publishing page through the parent application, where the content publishing page includes a session entry for the target agent, and generate the session request in response to a session trigger operation on the session entry; Display a message page through the parent application, where the message page includes session messages of at least one object, and the at least one object includes the target agent; generate the session request in response to a session trigger operation on the target agent in the message page; Display a search page through the parent application, where the search page includes a session entry for the target agent, and generate the session request in response to a session trigger operation on the session entry; Display a comment page through the parent application, where the comment page includes comment content for the target agent; Generate the session request in response to a session trigger operation on the target agent in the comment page.
4. A data processing method based on an agent, characterized in that, Including: Display a session page for the target agent through a sub-application, where the session page includes session data between the sub-application and the target agent, and the session data includes conversation information and reply information; Receive the session data sent by the sub-application in response to a publishing operation on the session data. The mother application processes the session data to obtain multiple images to be published, determines the target published content including the multiple images to be published, and publishes the target published content; wherein, there is a subordinate relationship between the mother application and the child application.
5. The method according to claim 4, wherein The method further includes: In response to the dialogue information input on the session page, the child application calls the session model corresponding to the target agent to generate a reply message corresponding to the dialogue information; Render the reply message to the session page.
6. The method according to claim 1 or 5, characterized in that The calling, by the child application, the session model corresponding to the target agent to generate a reply message corresponding to the dialogue information includes any one of the following: Through the child application corresponding to the target agent, call the session model corresponding to the target agent to generate a reply message corresponding to the dialogue information; wherein, one agent accessing the mother application corresponds to one child application; Through the agent instance corresponding to the target agent in the child application, call the session model corresponding to the target agent to generate a reply message corresponding to the dialogue information; wherein, at least one agent accesses the mother application by accessing the child application, and one agent accessing the child application corresponds to one agent instance.
7. The method according to claim 1 or 5, characterized in that The method further includes: The child application preprocesses the dialogue information to obtain the preprocessed dialogue information; The calling, by the child application, the session model corresponding to the target agent to generate a reply message corresponding to the dialogue information includes: The child application calls the session model corresponding to the target agent to generate a reply message corresponding to the preprocessed dialogue information.
8. The method according to claim 7, wherein The preprocessing, by the child application, the dialogue information to obtain the preprocessed dialogue information includes: The child application obtains reference information that matches the trigger scenario corresponding to the session request; The child application assembles and processes the reference information and the dialogue information to obtain the preprocessed dialogue information; Wherein, the session model corresponding to the target agent generates a reply message corresponding to the dialogue information according to the reference information and the dialogue information.
9. The method according to claim 7, wherein The preprocessing, by the child application, the dialogue information to obtain the preprocessed dialogue information includes: The child application obtains an answer mode that matches the session scenario corresponding to the session page; The child application assembles and processes the answer mode and the dialogue information to obtain the preprocessed dialogue information; Wherein, the session model corresponding to the target agent generates a reply message corresponding to the dialogue information according to the answer mode.
10. The method according to claim 1 or 5, characterized in that, The calling, in response to the dialogue information input on the session page, by the child application the session model corresponding to the target agent to generate a reply message corresponding to the dialogue information includes: Display at least one extended function control on the session page, and each extended function control corresponds to an answer generation strategy; In response to a triggering operation on a target extended function control among the at least one extended function control and the conversation information input in the session page, the corresponding session model of the target agent is called through the sub-application to generate a reply message corresponding to the conversation information according to the reply generation policy corresponding to the target extended function control.
11. The method according to claim 1 or 5, characterized in that, The rendering the reply message to the session page includes: Determining the content type included in the reply message; Invoking a rendering service matching the content type to render the reply message to obtain a rendered reply message; Displaying the rendered reply message in the session page.
12. The method according to any one of claims 1 to 5, characterized in that The method further includes any one of the following: Connecting the sub-applications corresponding to the at least one agent in the parent application and uniformly managing the sub-applications corresponding to the at least one agent according to a unified standard; or, Connecting the agent instances corresponding to the at least one agent in the sub-application and uniformly managing the agent instances corresponding to the at least one agent according to a unified standard; Wherein, the unified standard includes a rendering standard and a session standard, and the unified management includes rendering management corresponding to the rendering standard and session management corresponding to the session standard.
13. An agent-based data processing device, characterized in that, Includes: A processing unit, configured to obtain page template data in response to a session request for a target agent triggered in the parent application, where the page template data is used to generate a session page for having a conversation with at least one agent, and the target agent is any one of the at least one agent; A display unit, configured to render the page template data to obtain a session page for the target agent and display the session page; The processing unit is further configured to, in response to the conversation information input in the session page, call the session model corresponding to the target agent through the sub-application to generate a reply message corresponding to the conversation information, and there is a subordinate relationship between the sub-application and the parent application; The display unit is further configured to render the reply message to the session page.
14. An agent-based data processing device, characterized in that, Includes: A display unit, configured to display, through the sub-application, a session page for a target agent, where the session page includes session data with the target agent, and the session data includes conversation information and reply information; A processing unit, configured to receive the session data sent by the sub-application in response to a publishing operation on the session data; The processing unit is further configured to perform conversion processing on the session data through the parent application to obtain multiple images to be published, determine a target publishing content including the multiple images to be published, and publish the target publishing content; wherein, there is a subordinate relationship between the parent application and the sub-application.
15. A computer device, characterized in that, Includes: A processor, suitable for executing a computer program; A computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by the processor, it executes the data processing method based on an agent according to any one of claims 1 to 12.
16. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, it executes the agent-based data processing method according to any one of claims 1 to 12.
17. A computer program product, characterized in that, The computer program product includes a computer program. When the computer program is executed by a processor, it implements the agent-based data processing method according to any one of claims 1 to 12.