Dialogue application construction method, dialogue method, device, storage medium, and program product

By automatically establishing communication connections and building dialogue applications using the SDK and pre-defined process node sequences, the problems of high complexity and functional fragmentation in dialogue application construction are solved, achieving efficient and stable dialogue application development and improved user experience.

CN122195422APending Publication Date: 2026-06-12CHINA UNIONPAY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA UNIONPAY
Filing Date
2026-01-30
Publication Date
2026-06-12

Smart Images

  • Figure CN122195422A_ABST
    Figure CN122195422A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a dialogue application construction method, a dialogue method, a device, a storage medium and a program product. The method comprises: receiving a configuration instruction, the configuration instruction comprising an agent connection parameter and a window display parameter; calling an access SDK to perform the following dialogue window creation operation: creating a communication connection with the agent according to the agent connection parameter, and creating a dialogue window according to the window display parameter; creating a dialogue process scheduling instance based on a preset process node sequence; wherein the preset process node sequence configures a processing link from user input to agent response display; associating the communication connection, the dialogue window and the dialogue process scheduling instance to generate a dialogue application; wherein the dialogue application is configured to pause and resume the dialogue process based on a plug-in calling event by the dialogue process scheduling instance, and inject context data generated by the plug-in calling into a request sent to the agent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method for building a dialog application, a dialog method, a device, a storage medium, and a program product. Background Technology

[0002] With the rapid development of artificial intelligence technology, more and more service platforms are facing the need to integrate intelligent agents with their own front-end interactive interfaces (such as web pages, mini-programs, and applications) to meet the demand for rapid service provision. For example, in the financial industry, users can interact with intelligent agents through online customer service windows to complete business inquiries, transaction history checks, and more. On e-commerce platforms, users can converse with intelligent customer service to receive product recommendations, order status inquiries, and return / exchange guidance.

[0003] The solutions for building dialogue applications with intelligent agents provided by related technologies have problems such as high complexity and cost in building dialogue applications, and a disconnect between dialogue and extended functions, resulting in a poor user experience. Summary of the Invention

[0004] This application provides a method for building dialogue applications, a dialogue method, a device, a storage medium, and a program product, in order to solve to a certain extent the problems of high complexity and cost in building dialogue applications, the separation of dialogue and extended functions, and the resulting poor user experience.

[0005] In a first aspect, embodiments of this application provide a method for constructing a dialog application, including:

[0006] Receive configuration instructions, which include agent connection parameters and window display parameters;

[0007] The access SDK is invoked to perform the following dialog window creation operations: a communication connection with the agent is created according to the agent connection parameters, and a dialog window is created according to the window display parameters;

[0008] A dialogue flow scheduling instance is created based on a preset flow node sequence; wherein, the preset flow node sequence is configured with a processing link from user input to intelligent agent response display;

[0009] Associating the communication connection, the dialog window, and the dialog flow scheduling instance to generate a dialog application;

[0010] The dialogue application is configured to pause and resume the dialogue process based on the plugin invocation event by the dialogue process scheduling instance, and inject the context data generated by the plugin invocation into the request sent to the agent.

[0011] Secondly, embodiments of this application provide a dialogue method, which includes: in response to a first message input in a dialogue window, invoking a dialogue flow scheduling instance;

[0012] The dialogue flow scheduling instance sends the first message to the agent through the established agent communication connection, and displays the response in the dialogue window after receiving the response from the agent.

[0013] In response to the detection of a trigger operation on a registered plugin, the current dialogue flow is paused, and the corresponding function page of the plugin is loaded and run in the sandbox container;

[0014] After the function page is executed, the interactive data generated by the plugin is injected into the dialogue context, and the dialogue flow is restored.

[0015] Thirdly, embodiments of this application provide a dialog application building apparatus, comprising:

[0016] A receiving unit is configured to receive configuration instructions, which include agent connection parameters and window display parameters.

[0017] The first calling unit is used to call the access SDK to perform the following dialog window creation operations: create a communication connection with the agent according to the agent connection parameters, and create a dialog window according to the window display parameters;

[0018] A creation unit is used to create a dialogue flow scheduling instance based on a preset flow node sequence; wherein, the preset flow node sequence is configured with a processing link from user input to intelligent agent response display;

[0019] A generation unit is used to associate the communication connection, the dialog window, and the dialog flow scheduling instance to generate a dialog application;

[0020] The dialogue application is configured to pause and resume the dialogue process based on the plugin invocation event by the dialogue process scheduling instance, and inject the context data generated by the plugin invocation into the request sent to the agent.

[0021] Fourthly, embodiments of this application provide a dialogue device, including:

[0022] The second calling unit is used to call the dialog flow scheduling instance in response to the first message entered in the dialog window;

[0023] The processing unit is configured to send the first message to the agent through the established agent communication connection by the dialogue flow scheduling instance, and display the response in the dialogue window after receiving the response returned by the agent.

[0024] The plugin call response unit is used to pause the current dialog flow and load and run the corresponding function page of the plugin in the sandbox container when a trigger operation on a registered plugin is detected.

[0025] The recovery unit is used to inject the interactive data generated by the plugin into the dialogue context and restore the dialogue flow after the function page has been executed.

[0026] Fifthly, embodiments of this application provide an electronic device, including:

[0027] The memory stores computer-executed instructions;

[0028] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the methods described in the first aspect, the second aspect, and various possible designs of the first and second aspects.

[0029] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect, the second aspect, and various possible implementations of the first and second aspects described above.

[0030] In a seventh aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect, the second aspect, and various possible implementations of the first and second aspects described above.

[0031] The dialogue application construction method, dialogue method, device, storage medium, and program product provided in this application embodiment, by receiving configuration instructions including intelligent agent connection parameters and window display parameters, and having the access SDK automatically complete the communication connection establishment and dialogue window rendering, solves the problem of repeatedly developing communication and authentication logic when interfacing with intelligent agents in related solutions, achieves rapid access, and improves development efficiency; based on a preset process node sequence, a unified dialogue processing link is constructed, eliminating logical fragmentation between business scenarios, improving system stability and development reusability, avoiding repeated development under different business scenarios, improving the consistency of dialogue process development and the development efficiency of dialogue applications, and reducing the complexity and cost of dialogue application construction.

[0032] When a user triggers a plugin, the dialogue flow scheduling instance actively pauses the current dialogue. The process resumes after the plugin finishes execution and injects the context data generated by the plugin into subsequent requests. This enables the intelligent agent to generate coherent responses based on a complete context, effectively solving the problems of functional fragmentation and context loss in related solutions, as well as the problem of the separation between dialogue and extended functions in related solutions, thus improving the coherence of the user experience. Attached Figure Description

[0033] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0034] Figure 1 A flowchart illustrating the method for building the dialogue application provided in this application;

[0035] Figure 2 A flowchart illustrating the dialogue method provided in this application;

[0036] Figure 3 A schematic diagram of the structure of the dialog application building device provided in this application;

[0037] Figure 4 A schematic diagram of the dialogue device provided in this application;

[0038] Figure 5 A schematic diagram of the structure of an electronic device provided in this application.

[0039] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0040] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0041] In some examples, the communication implementation of online service windows on web pages connects to the intelligent agent via HTTP or WebSocket protocols. Developers need to manually configure the interface address, request headers (including API keys), and parameter formats. For example, when connecting to large models, code needs to be written to encapsulate intelligent agent requests, handle response parsing and error capture, resulting in high coupling between the dialogue flow and the interface rendering logic. If you want to connect the intelligent agent to different web pages, you need to repeatedly manually configure the interface address, request headers, parameter formats, handle response parsing and error capture, and set different rendering code for different interfaces.

[0042] For standardized dialogue processes in online service windows, most solutions involve manually writing end-to-end dialogue logic for specific business scenarios (such as customer service inquiries and product Q&A), requiring different process steps to be configured for different business needs. For example, when integrating with intelligent agents in e-commerce scenarios, a dedicated process of "product inquiry - parameter encapsulation - order association - response display" needs to be developed separately; when switching to financial scenarios, the entire set of logic of "business inquiry - identity verification - data filtering - intelligent reply" needs to be rewritten, with no fixed process template that can be reused.

[0043] For specific needs, it is necessary to develop dedicated dialogue systems, such as building a dialogue window based on Vue to adapt to mini programs, integrating industry functions such as purchase order cards and telephone dialing, or connecting to an application programming interface (API) engine through an application programming interface (API) to achieve automatic replies. However, such solutions are customized development, cannot be reused, and have high expansion costs.

[0044] The above solutions suffer from drawbacks such as cumbersome access processes, high coupling between functional modules, and the need for deep secondary development for customized extensions. Furthermore, the dialogue process lacks standardized node design and cross-functional collaboration mechanisms, making development for interfacing with intelligent agents in different business scenarios complex and costly. In addition, the dialogue and extension mechanisms are isolated, lacking collaboration mechanisms, making data sharing difficult, resulting in a fragmented user experience and high development and maintenance costs.

[0045] This application provides a reusable dialogue access SDK and a sequence of nodes in the dialogue process (input processing, request sending, agent interaction, response parsing, and result display) for different scenarios. This simplifies the complexity of dialogue access in different scenarios. Furthermore, it enables node flow through state management and coordinates the interaction logic between dialogue and plugins through a state linkage mechanism, thereby achieving a unified and collaborative dialogue process. This can improve the fragmented user experience and reduce development and maintenance costs.

[0046] Please refer to Figure 1 , Figure 1 A flowchart illustrating the dialogue application construction method provided in this application. Figure 1 ,like Figure 1 As shown, the method includes the following steps:

[0047] S101: Receive configuration instructions, which include agent connection parameters and window display parameters.

[0048] To illustrate, the entity executing the dialog application construction method can be a terminal device, specifically a client running on the terminal device, such as a page editing client.

[0049] In some embodiments, the conversational application can be a micro-application that can be embedded in the main application, such as a front-end micro-application embedded in a web page.

[0050] In one example, to create a dialogue application, a user can enter configuration instructions for the dialogue service. For instance, a user can set configuration instructions for the dialogue service on any web page to initiate a dialogue service between the user and an agent embedded in that web page.

[0051] In one example, the configuration instructions described above may include agent connection parameters and window display parameters. The agent connection parameters include, but are not limited to: the agent's identifier, the agent's application programming interface (API) key, and dialogue mode information. The agent's identifier includes, but is not limited to, one or more of numbers, letters, and characters, and is used to distinguish different agents. The correct routing to the corresponding agent can be achieved based on the agent's identifier.

[0052] The API key corresponding to the aforementioned agent is used for authentication and / or to obtain security credentials for authorization, proving that the caller has the right to access the agent. After proving that the caller has the right to access the agent, the dialogue integration module can use it to automatically complete the authentication, without requiring developers to manually handle the token logic.

[0053] The above dialogue modes are used to specify the communication mode for interacting with the agent, such as including but not limited to: the maximum number of interaction rounds, whether the prompts can be edited, etc.

[0054] Window display parameters include window size and display position. In one example, the window size mentioned above may include window width and window height. The window size mentioned above can be an absolute size or a relative size.

[0055] Absolute dimensions are defined using fixed units that are independent of the display device. For example, window dimensions could include a window width of 400 pixels and a window height of 500 pixels.

[0056] Relative dimensions can be window sizes calculated relative to another reference point, enabling responsive adaptation. Examples include window width as a percentage of the browser window height, and window height as a percentage of the browser viewport height. For instance, a viewport width of 1% of the browser height, or a viewport height of 70% of the browser height.

[0057] S102: Call the access SDK to perform the following dialog window creation operations: create a communication connection with the agent based on the agent connection parameters, and create a dialog window based on the window display parameters.

[0058] The aforementioned execution entity can call a pre-defined access SDK (Software Development Kit). This access SDK can encapsulate the dialog window initialization process and interaction logic.

[0059] The dialog window initialization process described above includes, but is not limited to: creating a dialog window container, injecting styles (including dialog window size, position, and color) into the dialog window container, binding events (configuring event detection functions for controls such as input boxes), configuring communication (setting the address, protocol, and callback functions for communication with the agent), and building dialog state management. It is understood that the software development kit described above integrates the implementation code for each step of the dialog window initialization process.

[0060] The aforementioned interaction logic includes, but is not limited to: capturing user input events and control click events, passing events to process nodes, and displaying results. It is understood that the software development kit (SDK) integrates the implementation code corresponding to this interaction logic.

[0061] S103: Create a dialogue flow scheduling instance based on a preset flow node sequence; wherein, the preset flow node sequence is configured with the processing link from user input to agent response display.

[0062] S104: Associate the communication connection, dialog window, and dialog flow scheduling instance to generate a dialog application;

[0063] The dialogue application is configured to pause and resume the dialogue flow based on the plugin invocation event by the dialogue flow scheduling instance, and inject the context data generated by the plugin invocation into the request sent to the agent.

[0064] To adapt to different business processes and different main applications, multiple dialogue flows can be defined. Each dialogue flow can be broken down into multiple flow nodes, each required for different business processes. These multiple flow nodes are arranged in a sequential order to form a node sequence. This flow node sequence includes one or more of the following, arranged from front to back: input processing node, request sending node, agent interaction node, response parsing node, and result display node.

[0065] Understandably, reusable code that implements the corresponding function can be pre-configured for each node. This reusable code can be executable code, so that when creating a conversational application, the reusable code of multiple nodes can be called to quickly build a conversational flow scheduling instance.

[0066] In some implementations, the input processing node may encapsulate executable code for processing user input, such as text cleaning utility functions, security filtering logic, and command recognizers. Specifically, the text cleaning utility functions may include general functions such as trimming leading and trailing whitespace and normalizing character encoding. The security filtering logic may include, for example, matching and filtering logic containing a general sensitive word library. The general command recognizer may include regular expressions or rule engines capable of recognizing standardized commands across business scenarios, such as " / help" and " / reset".

[0067] The aforementioned request sending node may include reusable code that encapsulates the session ID, user identifier, and user input into a standard request format (such as a JSON structure), including a request header builder and a context manager. The request header builder includes logic for automatically adding common HTTP header information such as authentication tokens, request IDs, and timestamps. The context manager includes general logic for reading and injecting the current session context (from the information sharing module).

[0068] The aforementioned intelligent agent interaction nodes can encapsulate communication connection managers, request senders and receivers, and exception handling logic. Among these,

[0069] A communication connection manager may include, for example, heartbeat, reconnection, and keep-alive logic for maintaining connections with agents (such as WebSocket or HTTP persistent connections).

[0070] The request sender and receiver can include, for example, general network request sending and response listening logic.

[0071] Exception handling logic may include, for example, a unified handling strategy for network timeouts, error retries, circuit breaker degradation, and error code mapping logic.

[0072] The aforementioned response parsing node can encapsulate a response format unpacker, a general data extractor, and a message format converter. The response format unpacker may, for example, include general code for parsing fixed-structure data packets returned by the agent (such as parsing the root field of a JSON string). The general data extractor may, for example, include logic for extracting common fields (such as text content and status code) from the agent's response. The message format converter may, for example, include a function for converting the extracted data into a specified format.

[0073] The results displayed above show nodes, encapsulating reusable code that includes, for example, a message rendering engine, a UI state updater, and a history manager. The message rendering engine could include, for example, a generic template (such as basic rendering logic for text, images, and cards) that converts standard message objects into HTML fragments. The UI state updater could include, for example, generic functions that control the display / hiding of the "typing" indicator and automatic scrolling to the bottom. The history manager could include, for example, generic logic that appends new messages to the message history list and manages their lifecycle.

[0074] As can be seen, the reusable code of each of the multiple nodes in the above preset node sequence can be reused by different dialogues in different business scenarios. When developing corresponding dialogue applications in different business scenarios, there is no need to redevelop the code of these nodes from scratch, and more development resources can be applied to specific logic related to business scenarios.

[0075] The aforementioned execution entity can create a dialogue flow scheduling instance for the dialogue application to be built based on a preset sequence of flow nodes.

[0076] When creating a dialog flow scheduling instance, collaborative scheduling logic can be injected into it. This logic can be implemented, for example, in the form of event listeners and status callback functions. Illustratively, the aforementioned collaborative scheduling logic can include flow interruption callbacks and flow resumption and data injection callbacks.

[0077] The process interruption callback can be, for example, a listener function configured to respond to extension plugin invocation events. Illustratively, when an extension plugin is triggered, this function performs the following operations: obtains the identifier of the currently executing process node, serializes and temporarily stores the current dialogue context data (including user input history, incomplete requests, etc.) in a shared memory area, and then marks the internal state of the dialogue flow scheduling instance as "paused".

[0078] For example, process resumption and data injection callbacks can be configured as listener functions to respond to extension plugin execution completion events. When triggered, this function can perform the following operations: read previously stored context data from the shared memory area and deserialize it; reset the process scheduler's execution pointer to the corresponding node based on the saved node identifier; retrieve the context data output by the extension plugin from the preset data interface and merge it into the resumed dialogue context; update the internal state of the process scheduler to "running" to drive the dialogue flow to continue execution from the breakpoint.

[0079] In some implementations, exception handling logic can also be configured for the dialogue flow scheduling instance, which is an integral part of the collaborative scheduling capability. The exception handling logic may include, for example, setting an exception capture point in the dialogue flow scheduling instance, and when an exception such as network timeout, unresponsive agent service, or node processing error is detected, forcibly switching the flow state to "exception", and calling the corresponding recovery strategy (such as automatic retry, rollback to the previous node, or sending an error notification to the user interface) according to the error type.

[0080] With the above configuration, the dialogue flow scheduling instance can be encapsulated as an instance that provides standard interfaces such as "start," "pause," "resume," and "get status." This instance receives external event-driven input through its interfaces and controls the advancement, interruption, and resumption of the dialogue flow based on built-in node sequences and coordination logic. Furthermore, the aforementioned dialogue flow scheduling instance can be registered in the service registry for use by the main application.

[0081] The aforementioned execution entity can associate and integrate the communication connection with the intelligent agent, the dialogue window, and the dialogue flow scheduling instance to establish a series of binding relationships, thereby obtaining a working dialogue application.

[0082] To illustrate, a communication connection (such as a WebSocket connection object or its proxy interface) can be set as the communication channel for the dialogue flow scheduling instance. Specifically, the sending method and receiving callback function of the communication connection can be injected into the "request sending node" and "smart agent interaction node" of the dialogue flow scheduling instance, respectively. After that, all outward requests generated by the dialogue flow scheduling instance can be sent through this communication connection, and all responses received through this communication connection can be listened to.

[0083] Intuitively, a bidirectional event and control link can be established between the dialog window and the dialog flow scheduling instance. For example, user interaction events (such as "message sent" or "window closed") from the dialog window can be bound to the input processing node of the dialog flow scheduling instance. When the user enters information in the window and clicks send, the window's UI module encapsulates the input as a "user input event" and passes it to the trigger interface of the dialog flow scheduling instance's "input processing node" via the framework's internal event bus. As another example, the output of the dialog flow scheduling instance's "result display node" can be bound to the dialog window's rendering interface. After the dialog flow scheduling instance completes response parsing, its result data is encapsulated as a "rendering instruction" event and sent to the dialog window via the event bus. The dialog window's rendering module listens for this event and updates the message list display accordingly.

[0084] To illustrate, a shared data module can be created and simultaneously connected to the dialogue flow scheduling instance, the dialogue window, and any authorized extension plugins that may be loaded subsequently. This shared data module acts as a coordination hub, responsible for storing and synchronizing session-level shared data (such as current dialogue history, user identifiers, and business data generated by plugins). When pausing / resuming the process, the dialogue flow scheduling instance saves and retrieves the context through this shared data module; authorized extension plugins read and write authorized data from this pool through an interface during runtime.

[0085] In this embodiment, by receiving configuration instructions containing intelligent agent connection parameters and window display parameters, and having the access SDK automatically complete the communication connection establishment and dialogue window rendering, the problem of repeatedly developing communication and authentication logic when interfacing with intelligent agents in related solutions is solved, enabling rapid access and improving development efficiency. Based on a preset process node sequence, a unified dialogue processing link is constructed, eliminating logical fragmentation between business scenarios, improving system stability and development reusability, avoiding repeated development under different business scenarios, and improving the consistency and efficiency of process development.

[0086] When a user triggers a plugin, the dialogue flow scheduling instance actively pauses the current dialogue. The process resumes after the plugin finishes execution and injects the context data generated by the plugin into subsequent requests. This enables the intelligent agent to generate coherent responses based on a complete context, effectively solving the problems of functional fragmentation and context loss in related solutions, as well as the problem of the separation between dialogue and extended functions in related solutions, thus improving the coherence of the user experience.

[0087] In some embodiments, the method further includes the following steps:

[0088] Receive plugin registration information, generate a plugin identifier indicated by the plugin registration information, and associate the identifier with the plugin registration information; the plugin registration information includes plugin function information and function page information;

[0089] In response to the identifier of the associated plugin and the association command of the dialog application, the plugin is associated with the dialog application; after the plugin and the dialog application are associated, the first interactive control corresponding to the plugin is displayed in the dialog window; the first interactive control is used to trigger the display of the function page corresponding to the plugin.

[0090] Figure 1The dialog application created in the illustrated embodiment can support extended functionality. This extended functionality can be integrated into the dialog application as plugins. In one example, a user can enter plugin registration information on the development page corresponding to the dialog application. Plugin registration information includes the plugin name, function icon image, and the network address (e.g., a Uniform Resource Locator) of the corresponding function page. In one example, the above plugin registration information can be encapsulated into a structured request (e.g., JSON format) and sent to the server.

[0091] After receiving the request, the server-side plugin registration module can perform validity checks on the plugin registration information (such as name non-empty checks). If the checks pass, a globally unique string is generated as the plugin identifier for the plugin indicated by the registration information. Subsequently, a mapping relationship is established between the plugin identifier and the plugin registration information (name, icon storage path, page Uniform Resource Locator), and stored in a preset database. The plugin identifier is then returned to the aforementioned development page, completing the plugin registration.

[0092] The aforementioned execution entity can create a first interactive control and configure its properties and display style. Then, it binds the click event listener of this first interactive control to an event handler function. This event handler function can be associated with the plugin identifier and the plugin's functional page's Uniform Resource Locator (URL).

[0093] After generating and configuring the first interactive control, the aforementioned execution entity can integrate the first interactive control into the user interface of the dialog window: for example, it can determine the container position of the interactive control according to a preset layout strategy (e.g., above the message input box or in the sidebar). Subsequently, through the Document Object Model (DOM) manipulation interface, the created interactive control element is dynamically inserted into the specified container in the DOM tree of the dialog window.

[0094] Understandably, the display and hiding of plugins as extended functionality within a dialog window can be related to session state, user permissions, and other factors. For example, the control might only be made visible when a dialog is in progress and the user has the appropriate permissions.

[0095] By receiving plugin registration information, a unique identifier and first interactive control for the corresponding plugin are automatically generated, and the control is dynamically associated with the dialog window for display. This allows for the loosely coupled and visual integration of third-party function entry points into the dialog interface without modifying the core code, achieving seamless embedding of plugins and the interface, significantly reducing the development cost of extended functions and improving system flexibility and maintainability.

[0096] In some implementations, the method further includes:

[0097] Set data access permissions for plugins based on their functionality and / or a least privilege policy; or...

[0098] Based on the permission information entered by the user for the plugin, set the data access permissions indicated by the permission information for the plugin;

[0099] Among them, data access permissions are used to control the plugin's read and write operations on the dialog application context data.

[0100] In one example, fine-grained permission rule entries can be pre-defined for dialogues and multiple plugins with different functions. Permission rule entries can include, for example, operation permissions for different data domains within the dialogue context (such as historical dialogue records, user identity information, and extended business data). These operation permissions can specify, for example, the types of operations allowed for the plugin or dialogue (e.g., read-only, read-write, no access).

[0101] After the plugin is registered, the aforementioned execution entity can determine the plugin's data access permissions based on the plugin's functionality and permission rule entries. Then, it can set the aforementioned data access permissions for the plugin.

[0102] In one example, a user can set permission information in the plugin registration information. After the plugin registration is complete, the aforementioned executing entity can set the plugin's data access permissions based on the permission information. Alternatively, in another example, data access permissions for the plugin can be set after plugin registration.

[0103] In these implementations, by dynamically configuring plugin data access permissions based on plugin functionality, least privilege rules, or explicit user authorization, fine-grained control over plugin operation dialog context data is achieved, effectively preventing unauthorized access and data leakage, and ensuring both data security and flexibility and controllability.

[0104] In some implementations, the method further includes:

[0105] Provide a first preset interface to the plugin so that the plugin can directly initiate requests by reusing the communication connection through the first preset interface;

[0106] Based on the plugin's identifier, a response adaptation strategy is associated with the plugin; the response adaptation strategy is used to convert the agent's response into a preset format, and the preset format is adapted to the plugin.

[0107] After a plugin completes registration, a first preset interface can be injected into the plugin at runtime based on the plugin's identifier. This first preset interface encapsulates access to established communication connections with the agent and can also include built-in authentication logic. When a plugin calls the first preset interface, it can reuse the communication connection to directly send requests to the agent, and the request can carry the plugin's identifier for permission verification and context association.

[0108] It can also match the corresponding response adaptation strategy according to the plugin's identifier, so that after the agent returns the original response data, it can perform field mapping, structure reorganization or protocol conversion operations on the original response data according to the response adaptation strategy to generate preset format data compatible with the plugin.

[0109] In some implementations, the method further includes:

[0110] In response to an update command for a registered plugin, update the plugin's registration information; and / or,

[0111] In response to a deletion command for a registered plugin, uninstall the plugin's registration information.

[0112] The above update instructions may include, for example, one or more of the following: updating the plugin's feature page network address, updating the plugin's feature image.

[0113] Understandably, updating or uninstalling plugins can take effect while the conversational application is running, without requiring a restart of the conversational application or its host application.

[0114] In these implementations, registered plugins of the dialog application can be updated or uninstalled in real time without interrupting the operation of the dialog, thus avoiding the problem of redeploying front-end resources due to modification of plugin configuration in related technologies.

[0115] In some implementations, the method further includes: in response to an operation on a first interactive control, loading and running a functional page in a first sandbox container isolated from the dialog window environment.

[0116] For example, when a user performs a trigger operation (such as clicking) on ​​the first interactive control, the associated plugin identifier can be parsed from the context of the trigger operation event or the binding data of the control.

[0117] Based on the plugin identifier, query the pre-stored plugin registration information to obtain the corresponding function page's network address. The aforementioned execution entity can dynamically create a sandbox container within the dialog window's Document Object Model (DOM), for example, by creating a... <iframe>The element serves as a sandbox container.<iframe> The element's attributes are configured to enable same-origin restrictions and script isolation policies to ensure its runtime environment is isolated from the talk window. The obtained function page address is loaded into this...<iframe> This allows its resources to operate independently in an isolated context and communicate with the dialog window via a secure channel.

[0118] In these embodiments, by creating an isolated first sandbox container for the plugin and loading the corresponding extended function page of the plugin in the first sandbox container, the style, script and execution environment of the plugin are effectively isolated, avoiding style pollution and script conflicts between the plugin and the dialog application, and ensuring the stability and security of the dialog application. The dynamic creation and loading mechanism makes it possible to access new functions without recompiling or deploying the dialog application.

[0119] In some embodiments, the method further includes: embedding a conversational application in a main application, wherein the conversational application runs in a second sandbox container isolated from the main application environment.

[0120] The main application mentioned above can be a web page or an application.

[0121] In the front-end page of the main application, the access script of the dialogue application is called through an embedded instruction; the access script dynamically creates a second sandbox container at runtime and loads the front-end resources of the dialogue application (such as the DOM structure, styles, and communication connections with the smart agent of the dialogue window) into the second sandbox container for execution. The second sandbox container is isolated from the runtime environment of the main application through an isolation mechanism. This isolation mechanism may include, but is not limited to, using iframe elements, ShadowDOM, or Web Workers. This isolation mechanism can block direct access to global variables, styles, and scripts between the dialogue application and the main application.

[0122] The dialog application can independently initialize the dialog application's running context in the second sandbox container, including the communication module, interface rendering engine and plugin manager, and conduct controlled data interaction with the main application through a preset secure communication channel.

[0123] In these embodiments, by deploying the dialog application in a second sandbox container isolated from the main application environment, the physical isolation of the scripts, styles and global states of the main application and the dialog application is effectively achieved, avoiding interface abnormalities or function crashes caused by conflicts in front-end resources between the two (such as CSS pollution, JavaScript global variable overriding, incompatibility of third-party library versions, etc.); at the same time, while ensuring the stability of the main application, the dialog application can be supported to iterate independently, which can improve the maintainability and cross-platform compatibility of the system.

[0124] In some embodiments, the method further includes:

[0125] Create a data sharing module, which is used to store the interaction records generated by the dialogue application; and to receive and store the interaction data associated with the plugin;

[0126] The dialogue application and the plugin access the data sharing module based on their respective permissions.

[0127] The aforementioned data sharing module can be created during the initialization of the dialogue application and can reside in the runtime environment of the dialogue application. The interaction records generated by the dialogue application include, but are not limited to, user input, agent responses, dialogue state, and context metadata;

[0128] The interactive data associated with the plugin includes, but is not limited to, function call results, user operation logs or business context information, and interactive data with the intelligent agent.

[0129] In one example, a permission control unit can be pre-configured in the data sharing module. The permission control unit dynamically determines the access permissions of the dialog application or plugin to the structured storage area based on the identifiers pre-assigned to the dialog application and each registered plugin, combined with the least privilege policy; wherein, the dialog application is granted read and write permissions to all interaction records, and each plugin is granted read and write permissions to data related to its function, or read-only permissions.

[0130] When a dialog application or any plugin initiates a data read or write request, the permission control unit verifies its subject identifier and the type of request operation, and allows access only if the permissions match; otherwise, the request is rejected.

[0131] By constructing a unified data sharing module and combining it with an access control mechanism based on subject identifiers and the least privilege policy, secure aggregation and controlled sharing of interactive data between the dialog application and multiple plugins are achieved. On the one hand, this ensures that plugins can obtain the necessary context information to support collaborative functions; on the other hand, it strictly restricts unauthorized access to plugin dialog data, effectively preventing data leakage and contamination.

[0132] In some embodiments, the method further includes:

[0133] When the dialog application is initialized or a session is established, the identity information of the currently logged-in user is obtained from the main application through the cross-domain communication interface;

[0134] In response to successful identity verification, the user's identity information is bound to the context of the current conversation.

[0135] In these embodiments, by obtaining the identity information of the logged-in user from the main application, there is no need for the user to repeatedly enter the user's identity information, which can simplify the user operation.

[0136] Please refer to Figure 2. Figure 2 is a schematic flowchart of the dialogue method provided by an embodiment of the present application. As shown in Figure 2, the method includes the following steps:

[0137] S201: In response to the first message input in the dialogue window, call the dialogue process scheduling instance.

[0138] S202: The dialogue process scheduling instance sends the first message to the agent through the established agent communication connection, and after receiving the response returned by the agent, displays the response in the dialogue window.

[0139] The execution subject of the dialogue method can be a dialogue application running on a terminal device. In some examples, the above dialogue application can be embedded in the main application.

[0140] The dialogue application can run in a sandbox container isolated from the main application environment.

[0141] The dialogue application can be created based on the method provided by the embodiment shown in Figure 1. When the dialogue application runs, it can display a dialogue window.

[0142] The user can enter the first message in the dialogue window. The first message can be, for example, a message for interacting with the agent.

[0143] After receiving the first message, the above dialogue application can call the dialogue process scheduling instance.A dialogue flow scheduling instance may include one or more of the following nodes arranged from beginning to end:

[0144] Input processing node, request sending node, agent interaction node, response parsing node, result display node.

[0145] The above dialogue flow scheduling example can sequentially execute input parsing, request encapsulation and communication sending operations according to the order of the above multiple nodes, and send the first message to the intelligent agent through the established intelligent agent communication connection.

[0146] Receive the first response data returned by the intelligent agent, and have the dialogue flow scheduling instance perform response parsing and result rendering to display the first response data in the dialogue window;

[0147] S203: In response to detecting a trigger operation on a registered plugin, pause the current dialogue flow, load and run the function page corresponding to the plugin in the sandbox container.

[0148] The network address of the function page can be determined by the identifier of the corresponding plugin, and the above function page can be loaded and run in the sandbox container.

[0149] S204: After the function page is executed, inject the interactive data generated by the plugin into the dialogue context and restore the dialogue flow.

[0150] For example, interactive data can be stored in a data sharing module for access by the dialogue.

[0151] In this embodiment, by introducing a standardized dialogue mechanism uniformly managed by a dialogue flow scheduling instance, and dynamically pausing / resuming the dialogue flow when a plugin is triggered, combined with sandbox isolation execution and context data injection, seamless collaboration between the main dialogue and the extended functions of the plugin is achieved. Plugin calls no longer interrupt or sever the dialogue, ensuring the continuity of the dialogue. The interactive data generated by the plugin is automatically injected into the subsequent dialogue context, enabling the intelligent agent to generate related responses based on the complete context, which can improve the consistency of the context, the accuracy of the answers, and the user experience. The functional pages run in a sandbox container, effectively isolating them from the scripts, styles, and states of the main dialogue environment, preventing conflicts.

[0152] In some embodiments, the method further includes:

[0153] In response to the detection of network interruption or agent response timeout, the exception handling logic is triggered to execute automatic retry or return an error message to the user. By automatically triggering the preset exception handling logic in abnormal scenarios such as network interruption or agent response timeout, the robustness of the dialogue flow and the continuity of user experience are achieved.

[0154] The dialogue application construction method corresponding to the above embodiments, Figure 3 is a structural block diagram of a dialogue application construction device provided by an embodiment of the present disclosure. For ease of description, only parts related to the embodiments of the present disclosure are shown. Referring to Figure 3, the dialogue application construction device 30 includes: a receiving unit 301, a first calling unit 302, a creating unit 303, and a generating unit 304. Among them,

[0155] The receiving unit 301 is configured to receive a configuration instruction, and the configuration instruction includes agent connection parameters and window display parameters;

[0156] The first calling unit 302 is configured to call the access SDK to perform the following dialogue window creation operations: create a communication connection with the agent according to the agent connection parameters, and create a dialogue window according to the window display parameters;

[0157] The creating unit 303 is configured to create a dialogue process scheduling instance based on a preset process node sequence; wherein, the preset process node sequence configures a processing link from user input to agent response display;

[0158] The generating unit 304 is configured to associate the communication connection, the dialogue window, and the dialogue process scheduling instance to generate a dialogue application;

[0159] Among them, the dialogue is configured to pause and resume the dialogue process by the dialogue process scheduling instance based on the calling event of the plugin, and inject the context data generated by the plugin call into the request sent to the agent.

[0160] In some embodiments, the device 30 further includes a plug-in registration and association unit (not shown in the figure), which is used for:

[0161] Receive plugin registration information, generate the identifier of the plugin indicated by the plugin registration information, and associate the identifier with the plugin registration information; the plugin registration information includes plugin function information and function page information;

[0162] In response to the identifier of the associated plugin and the association instruction of the dialog application, the plugin is associated with the dialog application; wherein, after the plugin and the dialog application are associated, the first interactive control corresponding to the plugin is displayed in the dialog window; the first interactive control is used to trigger the display of the function page corresponding to the plugin.

[0163] In some embodiments, the plug-in registration and association unit is further used for:

[0164] Set data access permissions for the plugin based on its functionality and / or least privilege policy; or...

[0165] Based on the permission information entered by the user for the plugin, set the data access permissions indicated by the permission information for the plugin;

[0166] Data access permissions are used to control the plugin’s read and write operations on dialog application context data.

[0167] In some embodiments, the plug-in registration and association unit is further configured to: provide a first preset interface to the plug-in so that the plug-in can directly initiate a request through the communication connection reused by the first preset interface;

[0168] Based on the plugin's identifier, a response adaptation strategy is associated with the plugin; wherein, the response adaptation strategy is used to convert the agent's response into a preset format, and the preset format is adapted to the plugin.

[0169] In some embodiments, the plugin registration and association unit is further configured to: update the plugin registration information in response to an update instruction for a registered plugin; and / or,

[0170] In response to a deletion command for a registered plugin, uninstall the plugin's registration information;

[0171] The update or uninstallation of the plugin can take effect during the operation of the dialogue service instance without restarting the dialogue service instance and its host application.

[0172] In some embodiments, the device 30 further includes a loading and running unit (not shown in the figure), which is used for:

[0173] In response to an operation on the first interactive control, the function page is loaded and run in a first sandbox container isolated from the dialog window environment.

[0174] In some embodiments, the preset process node sequence includes one or more of the following nodes arranged from front to back:

[0175] Input processing node, request sending node, agent interaction node, response parsing node, result display node.

[0176] In some embodiments, the input processing node encapsulates reusable code for processing user input;

[0177] The request sending node is encapsulated with reusable code that is encapsulated according to a preset encapsulation format;

[0178] The agent sending node encapsulates a communication connection manager, a request sending and receiving mechanism, and exception handling logic; the communication connection manager includes logic for maintaining the connection with the agent; the request sending and receiving mechanism includes request sending and response logic.

[0179] The response parsing node encapsulates reusable code for parsing the agent's response, as well as logic for format conversion of the response;

[0180] The result display node encapsulates a message rendering engine, user interface state update logic, and history management logic.

[0181] In some embodiments, the device 30 further includes a creation unit (not shown in the figures), the creation unit being used for:

[0182] Create a data sharing module, which is used to store the interaction records generated by the dialogue application; and to receive and store the interaction data associated with the plugin;

[0183] The dialogue application and the plugin access the data sharing module based on their respective permissions.

[0184] In some embodiments, the device 30 further includes an embedding unit (not shown in the figures), the embedding unit being used for:

[0185] The dialogue application is embedded in the main application, wherein the dialogue application runs in a second sandbox container isolated from the main application environment.

[0186] In some embodiments, the apparatus 30 further includes a verification unit (not shown in the figure), and the verification unit is configured to:

[0187] When the dialogue application is initialized or a session is established, obtain the identity information of the currently logged-in user from the main application through the cross-domain communication interface;

[0188] In response to successful verification of the identity information, bind the identity information of the user to the context of the current dialogue.

[0189] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. The implementation principles and technical effects are similar, and will not be elaborated here.

[0190] Corresponding to the dialogue method in the above embodiments, Figure 4 is a structural block diagram of the dialogue apparatus provided in an embodiment of the present disclosure. For ease of description, only parts related to the embodiments of the present disclosure are shown. Referring to Figure 3, the dialogue apparatus 40 includes: a second invocation unit 401, a second invocation unit 402, a processing unit 403, and a restoration unit 404. Among them,

[0191] The second invocation unit 401 is configured to invoke a dialogue process scheduling instance in response to a first message input in the dialogue window;

[0192] The processing unit 402 is configured to send the first message to the agent through the established agent communication connection by the dialogue process scheduling instance, and display the response in the dialogue window after receiving the response returned by the agent;

[0193] The plug-in invocation response unit 403 is configured to pause the current dialogue process when a trigger operation on a registered plug-in is detected, and load and run the function page corresponding to the plug-in in the sandbox container;

[0194] The restoration unit 404 is configured to inject the interaction data generated by the plug-in into the dialogue context and resume the dialogue process after the function page is executed.

[0195] In some embodiments, the apparatus 40 further includes an exception handling unit (not shown in the figure), and the exception handling unit is configured to:

[0196] In response to detecting a network interruption or an agent response timeout, trigger exception handling logic and perform automatic retry or return an error prompt to the user.

[0197] The apparatus provided in this embodiment can be used to implement the technical solutions of the above method embodiments. The implementation principles and technical effects are similar, and will not be elaborated here in this embodiment.

[0198] In order to implement the above embodiments, the present disclosure also provides an electronic device.

[0199] Figure 5 is a schematic structural diagram of the electronic device provided in this application. As shown in Figure 5, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 further includes a communication component 503. Among them, the processor 501, the memory 502, and the communication component 503 are connected through a bus.

[0200] In a specific implementation process, at least one processor 501 executes the computer execution instructions stored in the memory 502, so that at least one processor 501 executes the above method.

[0201] The specific implementation process of the processor 501 can be referred to the above method embodiments. The implementation principles and technical effects are similar, and will not be elaborated here in this embodiment.

[0202] The electronic device can be the terminal device or the server in the above method embodiments.

[0203] In the above embodiments, it should be understood that the processor can be a central processing unit (English: Central Processing Unit, abbreviated: CPU), and can also be other general-purpose processors, digital signal processors (English: Digital Signal Processor, abbreviated: DSP), application specific integrated circuits (English: Application Specific Integrated Circuit, abbreviated: ASIC), etc.The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.

[0204] The memory may include Random Access Memory (RAM) and may also include Non-volatile Memory (NVM), such as at least one disk storage device.

[0205] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings of this application are not limited to only one bus or one type of bus.

[0206] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method for a terminal device; or, when executed by a processor, the computer program implements the above-described method.

[0207] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method for a terminal device; or implement the above-described method.

[0208] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0209] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium may also be a component of the processor.The processor and readable storage medium can be located in an application-specific integrated circuit (ASIC). Alternatively, the processor and readable storage medium can exist as discrete components within the device.

[0210] The division of units is merely a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms.

[0211] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0212] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0213] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media that can store program code.

[0214] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disk, or optical disk.

[0215] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.< / iframe>

Claims

1. A method for constructing a dialogue application, characterized in that, include: Receive configuration instructions, which include agent connection parameters and window display parameters; The access SDK is invoked to perform the following dialog window creation operations: a communication connection with the agent is created according to the agent connection parameters, and a dialog window is created according to the window display parameters; A dialogue flow scheduling instance is created based on a preset flow node sequence; wherein, the preset flow node sequence is configured with a processing link from user input to intelligent agent response display; Associating the communication connection, the dialog window, and the dialog flow scheduling instance to generate a dialog application; The dialogue application is configured to pause and resume the dialogue process based on the plugin invocation event by the dialogue process scheduling instance, and inject the context data generated by the plugin invocation into the request sent to the agent.

2. The method according to claim 1, characterized in that, Also includes: Receive plugin registration information, generate an identifier for the plugin indicated by the plugin registration information, and associate the identifier with the plugin registration information; The plugin registration information includes plugin function information and function page information; In response to an association instruction between the plugin's identifier and the chat application, the plugin is associated with the chat application; wherein, after the plugin is associated with the chat application, a first interactive control corresponding to the plugin is displayed in the chat window; the first interactive control is used to trigger the display of the function page corresponding to the plugin.

3. The method according to claim 2, characterized in that, Also includes: Based on the plugin's functionality and / or least privilege policy, set data access permissions for the plugin; or, Based on the permission information entered by the user for the plugin, set the data access permissions indicated by the permission information for the plugin; The data access permissions are used to control the plugin's read and write operations on the dialog application context data.

4. The method according to claim 2, characterized in that, The method further includes: A first preset interface is provided to the plugin so that the plugin can reuse the communication connection to directly initiate requests through the first preset interface; Based on the plugin's identifier, a response adaptation strategy is associated with the plugin; wherein, the response adaptation strategy is used to convert the agent's response into a preset format, and the preset format is adapted to the plugin.

5. The method according to claim 2, characterized in that: Also includes: In response to an update instruction for a registered plugin, update the registration information of the plugin; And / or, In response to a deletion command for a registered plugin, uninstall the registration information of the plugin; The ability to update or uninstall plugins can take effect while the dialog application is running.

6. The method according to any one of claims 2-5, characterized in that, Also includes: In response to an operation on the first interactive control, the functional page is loaded and run in a first sandbox container isolated from the dialog window environment.

7. The method according to claim 1, characterized in that, The preset process node sequence includes one or more of the following nodes arranged from front to back: Input processing node, request sending node, agent interaction node, response parsing node, and result display node.

8. The method according to claim 7, characterized in that, The input processing node encapsulates reusable code for processing user input; The request sending node is encapsulated with reusable code that encapsulates user input according to a preset encapsulation format; The agent sending node encapsulates a communication connection manager, a request sender and receiver, and exception handling logic; the communication connection manager includes logic for maintaining the connection with the agent; the request sender and receiver includes request sending and response logic; The response parsing node encapsulates reusable code for parsing the agent's response, as well as logic for format conversion of the response; The result display node encapsulates a message rendering engine, user interface state update logic, and history management logic.

9. The method according to claim 1 or 2, characterized in that, The method further includes: A data sharing module is created, which is used to store the interaction records generated by the dialogue application; and to receive and store the interaction data associated with the plugin; The dialogue application and the plugin access the data sharing module based on their respective permissions.

10. The method according to claim 1, characterized in that, Also includes: The dialog application is embedded in the main application, wherein the dialog application runs in a second sandbox container isolated from the main application environment.

11. The method according to claim 10, characterized in that, Also includes: When the dialog application is initialized or a session is established, the identity information of the currently logged-in user is obtained from the main application through a cross-domain communication interface; In response to the successful verification of the identity information, the user's identity information is bound to the context of the current conversation.

12. A dialogue method, characterized in that, include: In response to the first message entered in the dialog window, the dialog flow scheduling instance is invoked; The dialogue flow scheduling instance sends the first message to the agent through the established agent communication connection, and displays the response in the dialogue window after receiving the response from the agent. In response to the detection of a trigger operation on a registered plugin, the current dialogue flow is paused, and the corresponding function page of the plugin is loaded and run in the sandbox container; After the function page is executed, the interactive data generated by the plugin is injected into the dialogue context, and the dialogue flow is restored.

13. The method according to claim 12, characterized in that, The method further includes: In response to a detected network interruption or agent response timeout, exception handling logic is triggered to perform automatic retry or return an error message to the user.

14. A dialog application building apparatus, characterized in that, include: A receiving unit is configured to receive configuration instructions, which include agent connection parameters and window display parameters. The first calling unit is used to call the access SDK to perform the following dialog window creation operations: create a communication connection with the agent according to the agent connection parameters, and create a dialog window according to the window display parameters; A creation unit is used to create a dialogue flow scheduling instance based on a preset flow node sequence; wherein, the preset flow node sequence is configured with a processing link from user input to intelligent agent response display; A generation unit is used to associate the communication connection, the dialog window, and the dialog flow scheduling instance to generate a dialog application; The dialogue application is configured to pause and resume the dialogue process based on the plugin invocation event by the dialogue process scheduling instance, and inject the context data generated by the plugin invocation into the request sent to the agent.

15. A dialogue device, characterized in that, include: The second calling unit is used to call the dialog flow scheduling instance in response to the first message entered in the dialog window; The processing unit is configured to send the first message to the agent through the established agent communication connection by the dialogue flow scheduling instance, and display the response in the dialogue window after receiving the response returned by the agent. The plugin call response unit is used to pause the current dialog flow and load and run the corresponding function page of the plugin in the sandbox container when a trigger operation on a registered plugin is detected. The recovery unit is used to inject the interactive data generated by the plugin into the dialogue context and restore the dialogue flow after the function page has been executed.

16. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1 to 13.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-13.

18. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-13.