Intelligent Agent service method and system based on dynamic configuration, electronic equipment and medium
By introducing an external configuration center and dynamic configuration technology, the problems of rigid intelligent agent service architecture, inflexible configuration, poor scalability and insufficient security in the existing technology are solved, and flexible configuration, unified user management and high-performance operation of enterprise-level intelligent agent services are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies lack an enterprise-level intelligent agent service framework that can simultaneously meet the requirements of dynamic and flexible configuration, unified user and memory management, security policy distribution, and high-performance operation. This leads to problems such as service interruption, high resource consumption, complex user identity management, and limited system performance when enterprises experience rapid business iteration and frequent permission adjustments.
An external configuration center is introduced as the system's 'decision brain'. By dynamically configuring permissions and business scenarios through the configuration center, zero-downtime deployment and real-time effectiveness are achieved. Combined with memory management, security policies, and high-performance storage, a flexible, secure, and high-performance intelligent agent service framework is built.
It enables real-time application and zero-downtime deployment of business updates, unifies user identity management, improves system performance and scalability, ensures configuration security and memory continuity, and builds an easily scalable intelligent agent service framework.
Smart Images

Figure CN121807401A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to an intelligent Agent service method and system based on dynamic configuration, an electronic device and a medium. BACKGROUND
[0002] With the maturity of large language model technology, AI Agents have become a key tool for enterprises to improve operational efficiency and optimize customer service. Enterprises often need to deploy multiple Agents for different business scenarios, such as financial consulting Agents, IT technical support Agents, and human resources question and answer Agents.
[0003] In the prior art, the following architecture patterns are usually used to build such multi-scenario Agent service systems: The first is an architecture based on role-based access control and static configuration. For example, Spring Security or Apache Shiro framework is used to bind access permissions of different scenarios with user roles, and the business logic of scenarios is hard-coded in the service in the form of code modules. Routing rules are usually written in the application's configuration file. When a new business scenario needs to be added or the access permissions of a certain department need to be modified, the developer must modify the code and configuration file, and rebuild and deploy the entire service, resulting in service interruption. This mode cannot adapt to the needs of rapid iteration of enterprise business and frequent adjustment of permissions.
[0004] The second is an architecture combining microservices and API gateways. Each Agent scenario is split into independent microservices for deployment, and unified routing and authentication are performed through API gateways. Although this architecture achieves decoupling of services, each scenario requires independent computing resources, making operation and maintenance complex and resource consumption large. More importantly, adding a new scenario still requires the complete development, testing, and deployment of a new microservice, which cannot achieve lightweight and hot update-style publishing of business scenarios.
[0005] In addition, in the enterprise environment, Agent services also face other technical challenges: 1) Users may come from multiple platforms such as WeChat and WeChat for Enterprise, and their user identification formats are different, making it difficult to form a unified user portrait and continuous conversation memory in the same Agent service; 2) System prompt words that drive Agent behavior often contain core business logic, and there is a lack of effective solutions for their security management (such as encrypted transmission, dynamic distribution, and permission control); 3) When using streaming output technology, the real-time writing of massive intermediate events to the database causes a huge pressure, affecting the performance of the system under high concurrency.
[0006] In summary, the prior art lacks an enterprise-level Agent service framework that can simultaneously meet the requirements of dynamic and flexible configuration, unified user and memory management, security policy distribution, and high-performance operation. SUMMARY
[0007] The present application aims to solve the technical problems of rigidity, inflexible configuration, poor scalability and insufficient security of the agent service architecture in the prior art, and proposes an intelligent Agent service method and system based on dynamic configuration, an electronic device and a medium.
[0008] In a first aspect, an embodiment of the present application provides an intelligent Agent service method based on dynamic configuration, comprising: receiving a user request, wherein the user request carries a user identifier; According to the user identifier, querying an external configuration center to determine at least one target scene identifier corresponding to the user identifier, wherein the external configuration center stores scene configuration information, and the scene configuration information includes a mapping relationship between a scene identifier and a user identifier authorized to access the scene identifier; According to the target scene identifier, obtaining corresponding scene execution module information from the external configuration center; According to the scene execution module information, dynamically loading and executing the corresponding scene execution module to respond to the user request.
[0009] Preferably, the external configuration center also stores system prompt words associated with the scene identifier; The external configuration center obtains the system prompt words associated with the target scene identifier; The system prompt words are applied in the execution process of the scene execution module.
[0010] Preferably, before querying the external configuration center according to the user identifier, it further comprises: According to the original user identifier in the user request, querying a user mapping table; If the global user identifier corresponding to the original user identifier exists in the user mapping table, the global user identifier is used as the user identifier for querying the external configuration center; If not, a global user identifier is generated for the original user identifier, a mapping relationship is established and stored in the user mapping table, and the generated global user identifier is used as the user identifier for querying the external configuration center.
[0011] Preferably, it further comprises memory management, which comprises: Taking the global user identifier as an index, managing the memory data related to the user identifier in the conversation process; Among them, the management of the memory data includes data synchronization with the cloud memory service.
[0012] Preferably, the memory management comprises an application memory layer, a user identification layer and a session layer; The user identification layer is configured to maintain a mapping between the global user identification and the original user identification of an external platform; The application memory layer is configured to associate a cloud memory space; The session layer is configured to manage memory data in a single session.
[0013] Preferably, when the output of the scenario execution module is a streaming output, the execution of the corresponding scenario execution module further comprises: maintaining an event buffer for a current session in memory; temporarily storing streaming output events generated by the scenario execution module during execution in the event buffer; at the end of the session, aggregating all output events temporarily stored in the event buffer and batch persisting them to a database.
[0014] Preferably, the system prompt word stored in the external configuration center is in ciphertext form; Before the system prompt word is applied to the execution process of the scenario execution module, the method further comprises: decrypting the system prompt word in ciphertext form to obtain a plaintext system prompt word.
[0015] In a second aspect, the embodiment provides an intelligent Agent service system based on dynamic configuration, comprising: a request receiving unit configured to receive a user request, the user request carrying a user identification; a routing decision unit configured to query an external configuration center according to the user identification to determine at least one target scenario identification corresponding to the user identification, wherein the external configuration center stores scenario configuration information, and the scenario configuration information comprises a mapping relationship between a scenario identification and a user identification authorized to access the scenario identification; a scenario loading and execution unit configured to obtain corresponding scenario execution module information from the external configuration center according to the target scenario identification; dynamically load and execute a corresponding scenario execution module according to the scenario execution module information to respond to the user request.
[0016] In a third aspect, the embodiment provides an electronic device, comprising: one or more processors; a memory configured to store one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the intelligent Agent service method based on dynamic configuration.
[0017] In a fourth aspect, the embodiment provides a computer readable medium, wherein a computer program is stored on the computer readable medium, and the computer program is executed by a processor to implement the dynamic configuration-based intelligent Agent service method according to any one of the preceding aspects.
[0018] The present application has the following beneficial effects: By introducing an external configuration center as the 'decision brain' of the system, the permissions, definitions and key configurations of the business scenarios are completely decoupled from the hard coding. The system dynamically routes, loads and executes the corresponding scenarios according to the user identity and external configuration at runtime, realizing real-time effectiveness and zero downtime deployment of business updates. The present application also effectively solves the key problems of enterprise-level applications such as user identity unification, memory management, configuration security and high-performance storage through a series of accompanying technical features, and builds a flexible, secure, high-performance and easily extensible intelligent Agent service framework. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 A flowchart of the dynamic configuration-based intelligent Agent service method according to the embodiment of the present application is provided. Figure 2 A structure block diagram of the memory management according to the embodiment of the present application is provided. Figure 3 A structure block diagram of the dynamic configuration-based intelligent Agent service system according to the embodiment of the present application is provided. Figure 4 A structure block diagram of the electronic device according to the embodiment of the present application is provided. DETAILED DESCRIPTION
[0020] In order for those skilled in the art to better understand the technical solutions of the present application, the exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to help understanding, and should be considered only as exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Also, for the sake of clarity and conciseness, the description below omits the description of well-known functions and structures.
[0021] In the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.
[0022] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0023] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. "Coupled" or "connected" or similar terms are not restricted to physical or mechanical connections or associations, but can also include electrical connections, whether direct or indirect.
[0024] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted in an overly literal or overly formal sense unless expressly so defined herein.
[0025] In the technical solution of the present application, the collection, storage, use, processing, transmission, provision and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good customs. The use of user data in the technical solution complies with relevant national laws and regulations (for example, "Information Security Technology Personal Information Security Specification" and the like). For example, appropriate measures are taken for personal information access control; restrictions are given to the display of personal information; the use purpose of personal information does not exceed the direct or reasonably related range; the use of personal information eliminates the explicit identity pointing and avoids precise positioning to a specific individual.
[0026] In the intelligent agent in the prior art, an enterprise-level intelligent agent service framework cannot simultaneously meet dynamic flexible configuration, unified user and memory management, security policy distribution and high-performance operation, which brings great inconvenience to the use of intelligent agents by enterprises.
[0027] To solve the above problems, the embodiment of the present application comprises Figure 1 As shown in the figure Figure 1 The intelligent Agent service method based on dynamic configuration provided by the embodiment of the present application comprises: Receiving a user request, the user request carrying a user identifier; the user request received in the embodiment is sent by a client, the client being a Feishu or an enterprise WeChat client, and the user request carrying identifier information such as the open_id of Feishu; According to the user identifier, an external configuration center is queried to determine at least one target scene identifier corresponding to the user identifier, wherein the external configuration center stores scene configuration information, and the scene configuration information includes a mapping relationship between a scene identifier and a user identifier authorized to access the scene identifier; specifically, after receiving a user request, the user identifier is extracted by analyzing the request; An external configuration center is accessed to query a scene that the user identifier is authorized to access. The external configuration center is, for example, a Feishu multidimensional table in which multiple records are preconfigured. Each record defines a business scene, such as at least including the following fields: a scene identifier (such as “finance question and answer”), a module path (such as “scenes.finance.finance_agent”), and an authorized department / user list.
[0028] The system performs a matching query in the table according to the user identifier to determine one or more target scene identifiers that the current user is authorized to access. This process realizes dynamic and external management of routing rules.
[0029] According to the target scene identifier, scene execution module information corresponding to the target scene identifier is obtained from the external configuration center; specifically, the target scene identifier (for example, “finance question and answer”) is determined, and its corresponding module path information is obtained from the external configuration center; at runtime, a dynamic loading technology (for example, the importlib.import_module() function of Python) is used to dynamically import the corresponding business logic code module according to the path. This makes it possible to add a new scene by only developing a module according to the specification and updating the external configuration center, without modifying or restarting the core service.
[0030] According to the scene execution module information, the corresponding scene execution module is dynamically loaded and executed to respond to the user request. Specifically, when responding, a large language model API is called, the user request is processed in combination with internal logic, a final reply is generated, and the user is returned through the client.
[0031] In one embodiment, the external configuration center also stores a system prompt word template associated with each scene. When the scene module is loaded, the prompt word ciphertext corresponding to the scene is also obtained; the ciphertext is decrypted in memory (using a key stored in an environment variable through an AES-GCM algorithm), and the decrypted plaintext prompt word is set as a “system instruction” of the current AI session, thereby dynamically and securely controlling the behavior logic of the AI.
[0032] In one embodiment, the external configuration center also stores system prompt words associated with the scenario identification; specifically, a prompt word library is established in the external configuration center, at runtime, the prompt word of the target scenario identification is matched with the prompt words in the prompt word library, the system prompt word associated with the target scenario identification is matched out, after the system prompt word is matched out, the system prompt word is used in the execution process of the scenario execution module, that is, the system prompt word is input into the scenario execution module, and the scenario execution module performs the execution of the corresponding scenario according to the input system prompt word.
[0033] In one embodiment, before the user identification and the query of the external configuration center, the following steps are further included: According to the original user identification in the user request, a user mapping table is queried; the user mapping table is stored locally, when a user identification is received, the user mapping table is first queried through the user identification; if the global user identification corresponding to the original user identification exists in the user mapping table, the global user identification is used as the user identification for querying the external configuration center; If not, a global user identification is generated for the original user identification, a mapping relationship is established and stored in the user mapping table, and the generated global user identification is used as the user identification for querying the external configuration center.
[0034] In one specific example, a local user mapping table (Actor table) is maintained; when a flying book open_id (such as “ou_xxxx”) is received, the system first queries the mapping table.
[0035] If the record corresponding to the open_id exists in the table, the corresponding global user identifier (actor_id, for example, “a1b2c3d4e5f6”) generated by the system is directly taken out. The actor_id is generated according to specific rules, such as containing only lowercase letters and numbers and having a length of 12 bits, to ensure compatibility with cloud AI services (such as AWS AgentCore).
[0036] If the table does not exist, the system automatically generates a new, unique actor_id according to the rules, and inserts the mapping relationship between the open_id and the actor_id as a new record into the mapping table.
[0037] Thereafter, the system uses the uniform actor_id (rather than the original open_id) to query the external configuration center and perform all subsequent processing.
[0038] In this embodiment, a memory management is also included, which indexes global user identification and manages memory data related to the user identification during the session process; wherein the management of the memory data includes data synchronization with a cloud memory service.
[0039] Specifically, the memory management includes an application memory layer, a user identification layer and a session layer as shown in Figure 2 The user identification layer is used to maintain the mapping of the global user identification and the original user identification of the external platform; in this embodiment, the core of the user identification layer is actor_id, which is the hub of all user data. The mapping of platform ID to actor_id is recorded; The application memory layer is used to associate the cloud memory space; specifically, it corresponds to the memory space ID in a cloud memory service (such as AWSAgentCore); it is an application-level configuration The session layer is used to manage the memory data in a single session; specifically, the complete context (message list) of each specific conversation with actor_id as the primary key is managed; when the scene executor runs, the actor_id is used as the key to query the Session history table of the local database and the cloud memory service simultaneously, to obtain the historical conversation summary or key information of the user and inject it as the context into the current conversation; after the conversation ends, the complete record of the Session is stored in the local database. At the same time, through a background asynchronous task, the condensed memory summary is synchronized to the cloud memory service to update the cloud memory state under the actor_id.
[0040] This embodiment shields the difference of multi-platform user IDs through the abstraction layer of actor_id, and realizes the unified user view of "one person one file". Combined with the hybrid memory architecture of local and cloud, it not only guarantees the controllability and offline availability of data, but also utilizes the powerful memory capability of the cloud service to provide continuous and personalized conversation experience for users.
[0041] In another embodiment, when the output of the scene execution module is a streaming output, the execution of the corresponding scene execution module further includes: Maintaining an event buffer for the current session in memory; Temporarily storing the streaming output events generated by the scene execution module during execution in the event buffer; avoiding writing events into the database to occupy the memory of the database; specifically, for each streaming output event (such as a token) generated, the event (including content, timestamp, sequence number) is immediately appended to the buffer instead of being immediately written to the database; during the entire streaming output process, dozens to hundreds of such events may be generated, which are temporarily stored in the memory buffer, effectively reducing the use of the database.
[0042] At the end of the session, all output events temporarily stored in the event buffer are aggregated and batch-persisted to the database.
[0043] Specifically, when the session streaming is detected to be completed (connection closed or end flag received), the system triggers an asynchronous storage task; the task takes all events in the buffer as a complete and ordered data unit, and persists them to the session record table through a database insertion operation; this process is implemented through a message queue or a background thread, without blocking the main request response thread.
[0044] In this embodiment, the design ensures that the module runs in a controllable context, such as using a separate class loader or ensuring that the module does not directly modify the global namespace. When cleaning up resources, the system performs more aggressive measures, such as in the Python environment, trying to delete the module name dynamically imported this time from sys.modules to prompt the interpreter to reclaim its resources and prevent memory leaks caused by frequent hot loading.
[0045] This embodiment converts a large number of random small IO write operations under high concurrency into ordered batch large IO write operations, greatly reducing the pressure on the database and improving the overall throughput of the system. The module isolation and cleaning mechanism ensures the long-term running stability of the dynamic loading architecture, avoiding the risk of state pollution and resource exhaustion.
[0046] In one embodiment, as shown in Figure 3 An intelligent Agent service system based on dynamic configuration includes: A request receiving unit is configured to receive a user request, wherein the user request carries a user identifier; for example, a user initiates a request through a client (for example, @ intelligent robot in a WeChat chat group). The WeChat platform sends the user message, the unique identifier (such as open_id) of the user on the platform, and other context information to the intelligent agent service backend in the form of an HTTP POST request through a predefined Webhook or API endpoint; A routing decision unit is configured to query an external configuration center according to the user identifier to determine at least one target scene identifier corresponding to the user identifier, wherein the external configuration center stores scene configuration information, and the scene configuration information includes a mapping relationship between a scene identifier and a user identifier authorized to access the scene identifier; The routing decision unit, when executed, first performs identity extraction, the extraction method being to parse the platform identifier ('lark') and the original ID of the user on the platform ('ou_123456789') from the request; second, according to the pre-configured access credential, initiates an API query to the Feishu multidimensional table as an external configuration center; finally, the configuration center returns the matched record. The user has access rights to the two scenarios of sales_analysis and hr_qa. In combination with the'sales data' keyword in the user message, the routing decision unit determines that the target scenario identifier is sales_analysis; The scene loading and execution unit obtains corresponding scene execution module information from the external configuration center according to the target scenario identifier; specifically, when executed, according to the target scenario identifier sales_analysis, the value of the module_path field: app.scenes.sales.analyzer is read from the corresponding record returned; the service backend uses the reflection or dynamic loading mechanism of the programming language (for example, using the importlib library in Python) to dynamically load the module in the memory, rather than statically linking at the application startup; According to the scene execution module information, the corresponding scene execution module is dynamically loaded and executed to respond to the user request; specifically, the loaded executor is called and the user request context is input: agent_executor.run(user_input="Please help me analyze the sales data last month.", user_id="ou_123456789"). The executor internally calls the large language model API and may also retrieve the sales database, executes the analysis logic, and finally generates a reply; the generated reply text is returned to the Feishu platform API, which is finally presented to the user by the platform; to maintain the long-term healthy operation of the system, after a request processing is completed, gentle resource cleaning can be performed, for example, the reference of the dynamically loaded module object is set to null to create conditions for garbage collection.
[0047] Based on the same inventive concept, the embodiments of the present application also provide an electronic device. Figure 4 The structure block diagram of the electronic device provided by the embodiments of the present application is shown in FIG. 1. Figure 4 As shown in FIG. 1, the electronic device provided by the embodiments of the present application includes one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the intelligent Agent service method based on dynamic configuration as any one of the above embodiments; the one or more I / O interfaces 103 are connected between the processor and the memory, and are configured to realize the information interaction between the processor and the memory.
[0048] The processor 101 is a device with data processing capability, including but not limited to a central processing unit (CPU) and the like; the memory 102 is a device with data storage capability, including but not limited to a random access memory (RAM, more specifically SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), and a flash memory (FLASH); the I / O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus) and the like.
[0049] In some embodiments, the processor 101, the memory 102, and the I / O interface 103 are connected to each other through the bus 104, and further connected to other components of the computing device.
[0050] In some embodiments, the one or more processors 101 include a field programmable gate array.
[0051] The embodiments of the present application also provide a computer readable medium. The computer readable medium stores a computer program, wherein the program is executed by a processor to implement the steps in the method for intelligent Agent service based on dynamic configuration in any of the above embodiments. The computer readable storage medium can be a volatile or non-volatile computer readable storage medium.
[0052] The embodiments of the present application also provide a computer program product, including a computer readable code or a non-volatile computer readable storage medium carrying the computer readable code, when the computer readable code is run in a processor of an electronic device, the processor in the electronic device executes the method for intelligent Agent service based on dynamic configuration.
[0053] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the functions of the modules / units in the system and the device can be implemented as software, firmware, hardware, and appropriate combinations thereof. In the hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be performed by several physical components in cooperation. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software can be distributed on a computer readable storage medium, which can include computer storage media (or non-transitory media) and communication media (or transitory media).
[0054] As those skilled in the art will appreciate, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable program instructions, data structures, program modules or other data. Computer storage media include, but are not limited to, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disc read only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Further, as those skilled in the art will appreciate, communication media typically embodies computer readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term "modulated data signal" means a signal that has one or more of its characteristics changed or set in a manner so as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as wireless networks, cellular telephone networks, code division multiple access (CDMA) networks, and other terrestrial and satellite radio frequency communication networks. Thus the computer readable program instructions and / or other program modules can be embodied in a computer readable storage medium, which can be any device or article that is enab!ed to store and / or carry computer readable program instructions and / or data structures. The computer readable storage medium can also be distributed over networked computer systems so that the computer readable program instructions and / or other program modules are stored and executed in a distributed fashion.
[0055] Computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.
[0056] Computer readable program instructions for carrying out operations of the present application can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present application.
[0057] The computer program product described herein can be embodied in a specific manner by hardware, software, or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium. In another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), and the like.
[0058] The computer program product described herein can be embodied in a specific manner by hardware, software, or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium. In another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), and the like.
[0059] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include a non-transitory computer readable storage medium that can be a computer- readable storage medium having no data storage cycles that change state. The instructions can be executed by one or more processors of a computer, other programmable data processing apparatus, or other devices to produce a computer-implemented process such that the instructions which execute via the one or more processors of the computer or other programmable data processing devices create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0060] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0061] The flow diagrams and the block diagrams in the drawings are presented to illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to the present application. In this regard, each block in the flow diagrams and the block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions ("instructions"). In some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and
[0062] Example embodiments have been disclosed and, although a specific terminology is employed, it is merely for the convenience of the reader and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, aspects and / or elements described with respect to one embodiment can be used in combination with other embodiments, unless explicitly stated otherwise. Therefore, it is to be understood that various alterations, modifications and / or additions can be made to the above-described embodiments, without departing from the scope of the present application as defined by the appended claims.
Claims
1. A method for providing intelligent agent services based on dynamic configuration, characterized in that, include: Receive a user request, wherein the user request carries a user identifier; Based on the user identifier, an external configuration center is queried to determine at least one target scene identifier corresponding to the user identifier, wherein the external configuration center stores scene configuration information, and the scene configuration information includes a mapping relationship between scene identifiers and user identifiers that are authorized to access the scene identifiers; Based on the target scene identifier, obtain the corresponding scene execution module information from the external configuration center; Based on the scenario execution module information, the corresponding scenario execution module is dynamically loaded and executed to respond to the user request.
2. The method for providing intelligent agent services based on dynamic configuration according to claim 1, characterized in that, The external configuration center also stores system prompt words associated with the scene identifier; The external configuration center obtains the system prompt words associated with the target scene identifier; The system prompts are applied during the execution of the scene execution module.
3. The method for providing intelligent agent services based on dynamic configuration according to claim 1, characterized in that, Before querying the external configuration center based on the user identifier, the process also includes: Query the user mapping table based on the original user identifier in the user request; If a global user identifier corresponding to the original user identifier exists in the user mapping table, then the global user identifier is used as the user identifier for querying the external configuration center; If it does not exist, a global user identifier is generated for the original user identifier, a mapping relationship is established and stored in the user mapping table, and the generated global user identifier is used as the user identifier for querying the external configuration center.
4. The method for providing intelligent agent services based on dynamic configuration according to claim 3, characterized in that, It also includes memory management, which includes: Using a global user identifier as an index, manage memory data related to the user identifier during the session; The management of the memory data includes data synchronization with cloud memory services.
5. The method for providing intelligent agent services based on dynamic configuration according to claim 3, characterized in that, The memory management includes an application memory layer, a user identification layer, and a session layer; The user identifier layer is used to maintain the mapping between the global user identifier and the original user identifier of the external platform; The application memory layer is used to associate with the cloud memory space; The session layer is used to manage memory data within a single session.
6. The method for providing intelligent agent services based on dynamic configuration according to claim 1, characterized in that, When the output of the scene execution module is a streaming output, the scene execution module corresponding to the execution also includes: Maintain an event buffer in memory for the current session; The streaming output events generated by the scene execution module during execution are temporarily stored in the event buffer; When the session ends, all output events temporarily stored in the event buffer are aggregated and then persistently stored in the database in batches.
7. The method for providing intelligent agent services based on dynamic configuration according to claim 1, characterized in that, The system prompts stored in the external configuration center are in encrypted form; Before applying the system prompt to the execution process of the scene execution module, the method further includes: The encrypted system prompt is decrypted to obtain the plaintext system prompt.
8. A dynamically configured intelligent agent service system, characterized in that, include: A request receiving unit is used to receive user requests, wherein the user requests carry a user identifier; The routing decision unit queries an external configuration center based on the user identifier to determine at least one target scene identifier corresponding to the user identifier. The external configuration center stores scene configuration information, which includes a mapping relationship between scene identifiers and user identifiers that are authorized to access the scene identifiers. The scene loading and execution unit obtains the corresponding scene execution module information from the external configuration center based on the target scene identifier; Based on the scenario execution module information, the corresponding scenario execution module is dynamically loaded and executed to respond to the user request.
9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a dynamically configured intelligent agent service method as described in any one of claims 1 to 7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a dynamically configured intelligent agent service method as described in any one of claims 1 to 7.