Agent-oriented heterogeneous business system unified adaptation method and device

CN122951929APending Publication Date: 2026-10-20YUANBAO DIGITAL TECH (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611054252.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0005]本发明提供一种面向智能体的异构业务系统统一适配方法及装置,用以解决现有技术中异构业务系统接入适配成本高、跨子系统状态难以协同共享以及配置热更新稳定性不足的缺陷,实现异构业务系统的低代码化快速接入、跨子系统状态的协同共享与动态决策、以及配置变更时的无损热更新与系统稳定性提升

Benefits of technology

[0019]本发明提供的面向智能体的异构业务系统统一适配方法及装置,通过接收来自智能体的原始流式消息,并基于所述原始流式消息初始化响应式上下文,在所述上下文中注入共享状态对象,所述共享状态对象用于在异步处理链路中跨子系统透传;在流式处理链路中,基于所述共享状态对象进行跨子系统状态编排与动态决策,其中,各子系统对所述共享状态对象进行协作式读写;对所述原始流式消息执行基于双层特征的路由匹配,确定目标适配规则;基于所述目标适配规则,按照多级配置优先级进行参数合并,生成本次适配的执行快照;根据所述本次适配的执行快照,对流式消息中的不同类型片段进行差异化封装与转换执行,得到适配后的响应数据;基于所述适配后的响应数据进行智能体的异构业务系统统一适配。相比于现有技术中异构业务系统接入适配成本高、跨子系统状态难以协同共享以及配置热更新稳定性不足的技术缺陷,由本方案,通过响应式上下文初始化与跨子系统状态编排、基于双层特征的路由匹配与多级配置继承、以及流式内容差异化封装与配置原子化热更新,实现异构业务系统的低代码化快速接入、跨子系统状态的协同共享与动态决策、以及配置变更时的无损热更新与系统稳定性提升。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention relates to the field of computer technology, providing a method and apparatus for unified adaptation of heterogeneous business systems for intelligent agents. The method includes: receiving raw streaming messages from intelligent agents and initializing a reactive context, injecting shared state objects into the context; performing cross-subsystem state orchestration and dynamic decision-making based on the shared state objects in the streaming processing link; performing routing matching based on two-layer features on the raw streaming messages to determine target adaptation rules, merging parameters according to multi-level configuration priorities, generating an execution snapshot of this adaptation, and using this snapshot to perform differentiated encapsulation and transformation of different types of fragments in the streaming messages to obtain adapted response data; and performing unified adaptation of heterogeneous business systems for intelligent agents based on the adapted response data. This achieves low-code, rapid access to heterogeneous business systems, collaborative sharing and dynamic decision-making of cross-subsystem states, and lossless hot updates and improved system stability during configuration changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a unified adaptation method and apparatus for heterogeneous business systems oriented towards intelligent agents. Background Technology

[0002] With the rapid development of large language model technology, agent-based application systems are becoming increasingly popular. In the actual operation of agent gateways, large language models typically output text, inference processes, and structured instructions in a streaming manner. The agent gateway needs to convert these streaming outputs into response formats recognizable by backend heterogeneous business systems in real time. However, different business systems have significant differences in the event type definition, nesting depth of message payload fields, and semantic values ​​for Server-Sent Events (SSE). Furthermore, the agent processing chain often involves multiple asynchronous sub-services such as intent recognition, main dialogue stream, and auxiliary card push.

[0003] Existing technologies typically employ hard-coding to develop separate adaptation logic for each business scenario. Whenever a new business system is integrated or the response format changes, code development, testing, and deployment must be completely rewritten, resulting in high integration costs and poor scalability for heterogeneous systems. Furthermore, in asynchronous links involving multiple sub-services, each subsystem processes messages independently. Intermediate states generated during processing (such as user intent tags and real-time matching entity identifiers) are stored in isolation within their respective systems, preventing seamless transmission and sharing across subsystems. Subsequent subsystems cannot make dynamic decisions based on the processing results of preceding subsystems, hindering the implementation of advanced features such as context-sensitive precise push and text replacement. Moreover, when business rules require hot updates, traditional solutions often require interrupting long-lived connections and restarting the service to load the new configuration. This fails to achieve atomic updates and fault rollbacks of configurations without blocking the streaming processing, severely impacting the stability of online services.

[0004] Therefore, existing technologies suffer from technical problems such as high adaptation costs for heterogeneous business systems, difficulties in cross-subsystem state coordination, and insufficient stability of configuration hot updates. Summary of the Invention

[0005] This invention provides a unified adaptation method and apparatus for heterogeneous business systems oriented towards intelligent agents, which solves the defects of existing technologies such as high access and adaptation costs for heterogeneous business systems, difficulty in collaborative sharing of cross-subsystem states, and insufficient stability of hot configuration updates. It enables low-code and rapid access of heterogeneous business systems, collaborative sharing and dynamic decision-making of cross-subsystem states, and lossless hot updates and improved system stability when configuration changes occur.

[0006] This invention provides a unified adaptation method for heterogeneous business systems oriented towards intelligent agents, comprising: Receive raw streaming messages from the agent and initialize a reactive context based on the raw streaming messages, injecting a shared state object into the context, the shared state object being used for pass-through across subsystems in the asynchronous processing link; In the streaming processing chain, cross-subsystem state orchestration and dynamic decision-making are performed based on the shared state object, wherein each subsystem performs cooperative reading and writing of the shared state object; Perform two-layer feature-based routing matching on the original streaming messages to determine target adaptation rules; Based on the target adaptation rules, parameters are merged according to multi-level configuration priorities to generate an execution snapshot for this adaptation. Based on the execution snapshot of this adaptation, different types of fragments in the streaming message are differentially encapsulated and transformed for execution to obtain the adapted response data; Based on the adapted response data, the agent performs unified adaptation to heterogeneous business systems.

[0007] In one possible implementation, the method further includes: During unified adaptation operation, asynchronously listen for configuration change events and receive configuration change notifications; Based on the configuration change notification, a snapshot of the configuration index after the configuration change is built in the background to obtain the configuration index to be effective; Perform validity verification on the configuration index to be activated; If the verification passes, the memory reference is atomically switched to the configuration index to be applied, resulting in the updated configuration index. If the verification fails, the original memory reference remains unchanged.

[0008] In one possible implementation, the method further includes: Receive raw streaming messages in server push event format from the intelligent agent, the raw streaming messages carrying event identifiers and message payloads; Based on the arrival event of the original streaming message, the context initialization mechanism of the reactive framework is triggered to create an asynchronous processing chain; A shared state object is injected into the context, which carries the link tracing identifier, session metadata, intermediate matching results, and subsystem cooperation markers.

[0009] In one possible implementation, the method further includes: The link tracing identifier in the shared state object is used for asynchronous operations across subsystems. The asynchronous operations include concatenation intent recognition, keyword listening, and auxiliary task triggering. The session metadata includes user session identifiers and timestamp information.

[0010] In one possible implementation, the method further includes: The subsystem includes an intent subsystem, a listening subsystem, and a distribution subsystem; The intent subsystem identifies user intents and writes intent tags into the shared state object; During the text stream output of the original streaming message, the monitoring subsystem matches product keywords in real time based on a preset keyword library and dynamically stores the matched entity identifiers into the cache pool of the shared state object. The distribution subsystem makes a logical judgment based on the existing intent tags and entity identifiers in the shared state object and preset trigger conditions to determine whether to trigger the auxiliary task subsystem.

[0011] In one possible implementation, the method further includes: The logical judgments of the distribution subsystem include: If the intent tag indicates a consultation intent and a matching product entity identifier exists in the cache pool, then the consultation purpose card push subsystem is triggered. If the intent label indicates a regular dialogue intent, the main dialogue flow continues to output without triggering auxiliary tasks.

[0012] In one possible implementation, the method further includes: Based on the server push event identifier in the original streaming message, the corresponding processing configuration entry is retrieved from the routing configuration table to obtain the first-level routing result; For the message load of the original streaming message, perform pattern matching based on the field path, filter out the final adaptation rule from the rule set corresponding to the first-level routing result, and obtain the target adaptation rule.

[0013] In one possible implementation, the method further includes: Retrieve the global default configuration parameters as the base parameter set; Obtain the routing-level configuration parameters corresponding to the target adaptation rule, and use the routing-level configuration parameters to override the parameters with the same name in the basic parameter set to obtain the intermediate parameter set; Obtain the rule-level configuration parameters corresponding to the target adaptation rule, and use the rule-level configuration parameters to override the parameters with the same name in the intermediate parameter set to obtain the final parameter set; The final parameter set is solidified into an execution snapshot of this message processing. The execution snapshot includes the target type, fragment type, append identifier, and converter call identifier.

[0014] In one possible implementation, the method further includes: Based on the fragment type identifier in the execution snapshot of this adaptation, identify the text stream fragment, inference stream fragment, and data stream fragment in the original streaming message; The text stream segment is encapsulated according to the standard response body format to obtain text response data; The inference stream fragment is encapsulated according to the thought response format to obtain inference response data; For the data stream segment, based on the converter call identifier in the execution snapshot, multi-level routing is performed through the identifier, and the corresponding business logic conversion module in the converter registry is called to convert the original data into structured response data adapted to the target business system.

[0015] The present invention also provides a unified adaptation device for heterogeneous business systems oriented towards intelligent agents, comprising the following modules: A receiving module is used to receive raw streaming messages from an agent, initialize a reactive context based on the raw streaming messages, and inject a shared state object into the context. The shared state object is used to pass through across subsystems in an asynchronous processing link. The orchestration decision module is used to perform cross-subsystem state orchestration and dynamic decision-making based on the shared state object in the streaming processing link, wherein each subsystem performs collaborative reading and writing of the shared state object; The determination module is used to perform route matching based on two-layer features on the original streaming message to determine the target adaptation rules; The generation module is used to merge parameters according to the multi-level configuration priority based on the target adaptation rules to generate an execution snapshot of this adaptation. The encapsulation and conversion module is used to perform differentiated encapsulation and conversion on different types of fragments in the streaming message based on the execution snapshot of this adaptation, so as to obtain the adapted response data. The adaptation module is used to perform unified adaptation of the agent to heterogeneous business systems based on the adapted response data.

[0016] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the unified adaptation method for heterogeneous business systems oriented towards intelligent agents as described above.

[0017] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the unified adaptation method for heterogeneous business systems oriented towards intelligent agents as described above.

[0018] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the unified adaptation method for heterogeneous business systems oriented towards intelligent agents as described above.

[0019] The present invention provides a method and apparatus for unified adaptation of heterogeneous business systems for intelligent agents. This method involves receiving raw streaming messages from intelligent agents and initializing a reactive context based on these messages. A shared state object is injected into the context, used for cross-subsystem transmission in asynchronous processing links. In the streaming processing link, cross-subsystem state orchestration and dynamic decision-making are performed based on the shared state object, with each subsystem collaboratively reading and writing the shared state object. Routing matching based on two-layer features is performed on the raw streaming messages to determine target adaptation rules. Based on the target adaptation rules, parameters are merged according to multi-level configuration priorities to generate an execution snapshot for this adaptation. According to the execution snapshot, different types of fragments in the streaming messages are differentially encapsulated and transformed to obtain adapted response data. Finally, unified adaptation of heterogeneous business systems for intelligent agents is performed based on the adapted response data. Compared to the technical shortcomings of existing technologies, such as high cost of heterogeneous business system access and adaptation, difficulty in collaborative sharing of cross-subsystem states, and insufficient stability of configuration hot updates, this solution achieves low-code rapid access of heterogeneous business systems, collaborative sharing and dynamic decision-making of cross-subsystem states, and lossless hot updates and improved system stability during configuration changes through reactive context initialization and cross-subsystem state orchestration, routing matching based on two-layer features and multi-level configuration inheritance, and streaming content differentiation encapsulation and atomic hot updates of configuration. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating the unified adaptation method for heterogeneous business systems oriented towards intelligent agents provided by the present invention.

[0022] Figure 2 This is a flowchart of the user question and answer - large model return route matching process provided by the present invention.

[0023] Figure 3 This is a flowchart of the hot update configuration provided by the present invention.

[0024] Figure 4This is a schematic diagram of the structure of the unified adaptation device for heterogeneous business systems oriented towards intelligent agents provided by the present invention.

[0025] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0027] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.

[0028] This method is designed to address the interoperability and adaptation issues between large language model intelligent agents and various heterogeneous business systems.

[0029] With the widespread application of artificial intelligence, large language models typically output content continuously in a streaming manner when answering user questions, such as displaying the answer text word by word, demonstrating the reasoning process, or sending structured instructions. However, enterprise backends often contain various different business systems with vastly different requirements for data formats. Some require specific message event types, while others have unique definitions for the nesting level and value meaning of data fields. The traditional approach is to write hard-coded adaptations for each business scenario. Whenever a new business is integrated or rules are modified, redevelopment and offline deployment are required, which is inefficient and risky.

[0030] This method proposes a unified adaptation approach. The core idea is to first place the raw streaming messages received by the agent gateway into a state container that can be shared and transmitted among multiple subsystems. This state container carries dynamic information such as session identifiers, user intent tags, and real-time matched product keywords. During processing, different subsystems can collaboratively read and write to this shared state. For example, the intent recognition subsystem first writes the user's intent category, the keyword listening subsystem captures product names in real-time from the text stream and stores them in the state, and the distribution subsystem then uses this accumulated information to determine whether additional auxiliary tasks need to be triggered, such as automatically pushing relevant product cards.

[0031] In terms of message routing, this method employs a two-layer routing mechanism. The first layer performs preliminary classification based on the event type of the streaming message, while the second layer delves into the message itself, performing fine-grained matching based on specific field paths and values ​​to determine which set of adaptation rules should be applied. These rules support multi-level configuration inheritance, and parameters can be merged according to a hierarchy where rule-level takes precedence over route-level, and route-level takes precedence over global default, forming a complete execution strategy for this message processing.

[0032] For actual content conversion, the system differentiates between different types of fragments, such as the main text stream, inference stream, and data stream, based on the merged parameters. Especially when the message contains data fragments requiring additional conversion, the system locates the corresponding converter through routing identifiers and dynamically calls the relevant business logic modules to complete the format conversion. For example, it converts the product number in the original message into a card format containing detailed product information and returns it to the front end.

[0033] At the system operation and maintenance level, this method also introduces a configuration hot update mechanism. When business rules need to be changed, the system asynchronously builds a new configuration index snapshot in the background, and instantly switches the memory reference after verification. The entire process does not require interrupting the ongoing streaming connection. If the new configuration verification fails, the system will automatically retain the old version and continue running, ensuring the stability of online services.

[0034] Overall, this method achieves efficient, flexible, and stable integration between intelligent agent gateways and heterogeneous business systems through techniques such as state sharing orchestration, two-layer dynamic routing, multi-level configuration inheritance, and atomic hot updates. It reduces the development cost of new business access while ensuring system reliability when rules are frequently changed.

[0035] Figure 1 This is a flowchart illustrating the unified adaptation method for heterogeneous business systems oriented towards intelligent agents provided by the present invention, as shown below. Figure 1 As shown, the method includes the following: S11. Receive raw streaming messages from the agent and initialize a reactive context based on the raw streaming messages. Inject a shared state object into the context, which is used for transparent transmission across subsystems in the asynchronous processing link.

[0036] In this invention, the agent gateway receives raw streaming messages from the large language model agent. These raw streaming messages typically use the Server-Sent Events (SSE) format and carry an event identifier and a message payload.

[0037] For example, when a user submits a question through the front-end interface, the large model returns a continuous data stream. This stream contains both the verbatim text output and the reasoning process and structured instructions. The gateway layer utilizes the Context mechanism of reactive programming frameworks (such as Project Reactor) to trigger context initialization based on the arrival event of this raw streaming message, creating a shared state object that can be passed through in the asynchronous processing chain. This state object carries a trace identifier (traceId), session metadata (such as user session identifier and timestamp information), and an intermediate matching result cache pool for subsequent subsystem collaboration. Among them, the traceId serves as a globally unique identifier for this request. It is generated when the user request enters the gateway and is passed through between subsystems along the asynchronous chain. It is used to connect asynchronous operations across subsystems, such as intent recognition, keyword listening, and auxiliary task triggering, ensuring that the state data of different user requests are isolated from each other in concurrent scenarios, while also providing an anchor point for the correlation retrieval of logs from various subsystems.

[0038] S12. In the streaming processing link, cross-subsystem state orchestration and dynamic decision-making are performed based on the shared state object, wherein each subsystem performs cooperative reading and writing of the shared state object.

[0039] In the streaming processing link established in step S11, each subsystem performs collaborative reading and writing of shared state objects to realize cross-subsystem state orchestration and dynamic decision-making.

[0040] Specifically, the intent subsystem first parses the user's input text, identifies the user's intent category (such as product inquiry, routine conversation, etc.), and writes the identified intent tag (Scene Tag) into the shared state object. Subsequently, during the output of the original streaming message text stream, the listening subsystem matches product keywords in real time based on a preset keyword library. Once a match is successful, the matched entity identifier (such as product ID) is dynamically stored in the cache pool of the shared state object.

[0041] The distribution subsystem reads the existing intent tags and entity identifiers in the shared state object in real time and makes logical judgments based on preset trigger conditions: if the intent tag indicates a consultation intent, such as a product consultation intent, and a matching product entity identifier already exists in the cache pool, then the auxiliary task subsystem such as product information push is automatically triggered; if the intent tag indicates a regular dialogue intent, then the main dialogue flow continues to be output and no auxiliary task is triggered.

[0042] Through the aforementioned collaborative reading and writing, the "read-and-transmit" and "on-demand access" of information between different subsystems are realized. Subsequent subsystems can make dynamic decisions based on the processing results of the preceding subsystems, significantly improving the business decision-making capabilities of the intelligent agent gateway.

[0043] S13. Perform routing matching based on two-layer features on the original streaming message to determine the target adaptation rules.

[0044] For the raw streaming message received in step S11, the system performs route matching based on two-layer features to determine the target adaptation rules required for this message processing from the complex heterogeneous adaptation logic.

[0045] like Figure 2 As shown, firstly, first-level routing is performed: based on the SSE event identifier in the original streaming message (such as the `type` field in the `data` payload being `message`, `ready`, or other custom event types), the corresponding processing configuration entry is retrieved from the routing configuration table to obtain the first-level routing result. For example, when the data stream type is `message`, the configuration corresponding to `message` is used; when the type is `ready`, the configuration corresponding to `ready` is used. Then, based on the first-level routing result, second-level routing is performed: for the message payload of the original streaming message, pattern matching is performed based on the path field (such as `source_path`, `source`, etc.), and the final adaptation rule is selected from the rule set corresponding to the first-level routing result to obtain the target adaptation rule. For example... Figure 2 As shown, after determining to use secondary routing, the value of the `source` field is further determined: if `source` is `text_reply`, a standard reply body is used; if `source` is `deep_thinking`, a thinking reply body is used; if secondary routing is not required, the return body corresponding to the `type` determined by the primary route is used directly. Through the above multi-dimensional distribution logic based on events and paths, complex heterogeneous adaptation requirements are simplified into configuration declarations, greatly reducing the development cost of new business integration.

[0046] S14. Based on the target adaptation rules, parameters are merged according to the multi-level configuration priority to generate an execution snapshot for this adaptation.

[0047] After determining the target adaptation rule in step S13, the system performs overwrite and merging based on multi-level configuration priorities for parameters such as target type, fragment type, and append identifier to generate a complete execution snapshot of this adaptation. Specifically, first, the global default configuration parameters are obtained as the basic parameter set; then, the route-level configuration parameters corresponding to the target adaptation rule are obtained, and the route-level configuration parameters are used to overwrite the parameters with the same name in the basic parameter set to obtain the intermediate parameter set; finally, the rule-level configuration parameters corresponding to the target adaptation rule are obtained, and the rule-level configuration parameters are used to overwrite the parameters with the same name in the intermediate parameter set to obtain the final parameter set.

[0048] The priority order for the above-mentioned overlay merging is "rule-level configuration takes precedence over route-level configuration, and route-level configuration takes precedence over global default configuration". The final parameter set is solidified into an execution snapshot of this message processing. This execution snapshot includes fields such as target type (target_kind), fragment type (part_type), append identifier, transformer call identifier (data_transformer), and card name (card_name).

[0049] For example, for a message with source_path as "response / new_agent_reply", the snapshot can include parameters such as target_kind as "artifact-update", part_type as "data", card_name as "productCard", and data_transformer as "productCardsTransformer", thus providing a complete parameter basis for subsequent differentiated encapsulation and conversion.

[0050] S15. Based on the execution snapshot of this adaptation, perform differentiated encapsulation and conversion on different types of fragments in the streaming message to obtain the adapted response data.

[0051] Based on the execution snapshot generated in step S14, the system performs differentiated encapsulation and transformation on different types of fragments in the original streaming message. Specifically, based on the fragment type identifier in the execution snapshot, the system identifies the text stream fragments, reasoning stream fragments, and data stream fragments in the original streaming message. For text stream fragments, they are encapsulated according to the standard response body format to obtain text response data; for reasoning stream fragments, they are encapsulated according to the thinking response body format to obtain reasoning response data; for data stream fragments, based on the converter call identifier in the execution snapshot, multi-level routing is performed through the identifier to call the corresponding business logic transformation module in the converter registry to convert the original data into structured response data adapted to the target business system.

[0052] For example, the original SSE data contains event:message, data with type "response / new_agent_reply" and carries message content and a product_ids field (e.g., ["xxx12346"]). Based on the route matching in step S13 and the execution snapshot in step S14, the system determines to call the productCardsTransformer. This converter calls the backend product service based on the card name identifier (card_name) and product identifier (product_ids), queries the product details information corresponding to the product identifier (e.g., product name, product description), and converts it into the card format data required by the frontend. An example of the converted adaptive response data includes a cardData structure with kind "data", cardName "productCard", and a nested list of products (each entry containing fields such as product_id, product_name, and product_info). Finally, the encapsulated and converted adaptive response data is output to the frontend presentation layer or downstream heterogeneous business systems, enabling the frontend to directly render and display it, thus completing the unified adaptation of this heterogeneous business system.

[0053] S16. Based on the adapted response data, perform unified adaptation of the agent to heterogeneous business systems.

[0054] During the system's operation of continuously outputting adapted response data based on step S15 and uniformly adapting to heterogeneous business systems, configuration change events are asynchronously monitored. When a business rule is detected to require a hot update, the system builds a new configuration index snapshot in the background and verifies the validity of the configuration index to be applied. Figure 3 As shown, after successful verification, the memory reference is atomically switched to the new configuration index snapshot, ensuring that subsequent streaming messages automatically reference the updated configuration rules during route matching in step S13 and parameter merging in step S14. If verification fails or the switching is abnormal, the memory reference of the old configuration index remains unchanged, ensuring that the currently processed long-connection streaming data is not interrupted and that memory state consistency is maintained. Through this atomic hot update mechanism, lossless configuration updates and fault rollbacks are achieved without blocking the streaming processing, avoiding link interruptions caused by configuration errors and ensuring the robustness and operational stability of the intelligent agent gateway in continuously adapting to heterogeneous business systems.

[0055] Furthermore, during the system's continuous unified adaptation of heterogeneous business systems based on step S16, the configuration center and hot update module independently and asynchronously execute the configuration guardian process to ensure online stability when business rules change frequently. This step specifically includes the following sub-processes: First, the system asynchronously listens for configuration change events and receives configuration change notifications. The system continuously listens for configuration change events through the configuration center and hot update module. These events originate from sources including routing rule adjustments submitted by operations personnel through the management backend, converter mapping changes, multi-level configuration parameter modifications, or configuration distribution commands triggered by the automated operations and maintenance system. When a configuration change is detected, the system immediately captures the change details and generates a configuration change notification. This notification carries the change rule identifier, change type, and change timestamp information.

[0056] Secondly, based on the configuration change notification, a snapshot of the configuration index after the configuration change is built in the background to obtain the configuration index to be effective. Upon receiving the configuration change notification, the system does not block the currently executing main stream message processing flow. Instead, in a separate background thread or asynchronous task pool, it rebuilds a complete snapshot of the configuration index based on the changes. This configuration index to be effective contains a complete mapping relationship between the updated routing configuration table, rule-level configuration parameters, route-level configuration parameters, and global default configuration parameters, ensuring isolation from the old version configuration index currently in memory.

[0057] Next, the validity of the configuration index to be activated is verified. After the configuration index to be activated is built, the system performs multi-dimensional validity verification, including: syntax verification, checking whether the configuration format conforms to the preset JSONSchema or configuration pattern definition; dependency verification, verifying whether the converter identifier (data_transformer), target type (target_kind), and card name (card_name) referenced in the configuration have been registered and are available in the converter registry and business system; and conflict verification, detecting whether there are mutual exclusions or matching ambiguities caused by overlapping field paths between sibling routing rules. Only configuration indexes to be activated that pass all verification items are allowed to proceed to the next step of the switching process.

[0058] Next, if the verification passes, the memory reference is atomically switched to the configuration index to be activated, resulting in the updated configuration index. After successful verification, the system uses atomic references or similar memory barrier mechanisms to complete the atomic switching of memory references within nanoseconds, seamlessly pointing the currently active configuration index pointer from the old version to the configuration index to be activated. This switching process has no intermediate states; the ongoing routing matching in step S13 and parameter merging in step S14 are unaffected by the instantaneous switching. After the switching is complete, subsequent newly arriving original streaming messages will automatically reference the updated configuration index when performing two-layer routing matching in step S13 and multi-level configuration merging in step S14, thereby achieving unified adaptation of heterogeneous business systems based on the latest business rules.

[0059] Finally, if verification fails, the original memory reference remains unchanged. If the configuration index to be activated fails at any stage of validity verification (such as incorrect configuration format, unregistered dependent converters, routing rule conflicts, etc.), the system immediately discards the configuration index to be activated and releases the background resources it occupies, while maintaining the memory reference of the old version configuration index. The currently processed long-connection streaming data continues to follow the processing flow from steps S13 to S16 of the old version configuration, ensuring uninterrupted streaming connections and maintaining memory state consistency. This avoids link interruptions or service degradation caused by configuration errors, thereby ensuring the robustness and operational stability of the intelligent agent gateway in continuously adapting to heterogeneous business systems.

[0060] The present invention provides a unified adaptation method for heterogeneous business systems for intelligent agents. This method involves receiving raw streaming messages from intelligent agents and initializing a reactive context based on these messages. A shared state object is injected into the context, used for cross-subsystem transmission in asynchronous processing links. In the streaming processing link, cross-subsystem state orchestration and dynamic decision-making are performed based on the shared state object, with each subsystem collaboratively reading and writing the shared state object. Routing matching based on two-layer features is performed on the raw streaming messages to determine target adaptation rules. Based on the target adaptation rules, parameters are merged according to multi-level configuration priorities to generate an execution snapshot for this adaptation. According to the execution snapshot, different types of fragments in the streaming messages are differentially encapsulated and transformed for execution to obtain adapted response data. Finally, unified adaptation of heterogeneous business systems for intelligent agents is performed based on the adapted response data. Compared to the technical shortcomings of existing technologies, such as high cost of heterogeneous business system access and adaptation, difficulty in collaborative sharing of cross-subsystem states, and insufficient stability of configuration hot updates, this method achieves low-code rapid access of heterogeneous business systems, collaborative sharing and dynamic decision-making of cross-subsystem states, and lossless hot updates and improved system stability during configuration changes through reactive context initialization and cross-subsystem state orchestration, routing matching based on two-layer features and multi-level configuration inheritance, and streaming content differentiation encapsulation and atomic hot updates of configuration.

[0061] The following describes the unified adaptation device for heterogeneous business systems oriented towards intelligent agents provided by the present invention. The unified adaptation device for heterogeneous business systems oriented towards intelligent agents described below and the unified adaptation method for heterogeneous business systems oriented towards intelligent agents described above can be referred to in correspondence with each other.

[0062] Figure 4 This is a schematic diagram of the structure of the unified adaptation device for heterogeneous business systems for intelligent agents provided by the present invention, specifically including: The receiving module 401 is configured to receive raw streaming messages from the agent, initialize a reactive context based on the raw streaming messages, and inject a shared state object into the context. The shared state object is used for transparent transmission across subsystems in the asynchronous processing link. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.

[0063] The orchestration decision module 402 is used to perform cross-subsystem state orchestration and dynamic decision-making based on the shared state object in the streaming processing link, wherein each subsystem performs cooperative read and write operations on the shared state object. For detailed explanations, please refer to the relevant descriptions in the above method embodiments, which will not be repeated here.

[0064] The determination module 403 is used to perform route matching based on two-layer features on the original streaming message to determine the target adaptation rules. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.

[0065] The generation module 404 is used to merge parameters according to multi-level configuration priorities based on the target adaptation rules to generate an execution snapshot for this adaptation. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.

[0066] The encapsulation and conversion module 405 is used to perform differentiated encapsulation and conversion on different types of fragments in the streaming message based on the execution snapshot of this adaptation, so as to obtain the adapted response data. For detailed explanations, please refer to the relevant descriptions in the above method embodiments, which will not be repeated here.

[0067] The adaptation module 406 is used to perform unified adaptation of the agent to heterogeneous business systems based on the adapted response data. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.

[0068] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other through the communications bus 540. The processor 510 can call logical instructions in the memory 530 to execute a unified adaptation method for heterogeneous business systems oriented towards intelligent agents. This method includes: receiving raw streaming messages from intelligent agents and initializing a reactive context based on the raw streaming messages; injecting a shared state object into the context, the shared state object being used for cross-subsystem pass-through in an asynchronous processing link; performing cross-subsystem state orchestration and dynamic decision-making based on the shared state object in the streaming processing link, wherein each subsystem performs cooperative read and write operations on the shared state object; performing routing matching based on two-layer features on the raw streaming messages to determine target adaptation rules; merging parameters according to multi-level configuration priorities based on the target adaptation rules to generate an execution snapshot for this adaptation; performing differentiated encapsulation and transformation execution on different types of fragments in the streaming messages according to the execution snapshot for this adaptation to obtain adapted response data; and performing unified adaptation of heterogeneous business systems for intelligent agents based on the adapted response data.

[0069] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, 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 a 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, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0070] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the heterogeneous business system unified adaptation method for intelligent agents provided by the above methods. The method includes: receiving raw streaming messages from intelligent agents and initializing a reactive context based on the raw streaming messages; injecting a shared state object into the context, the shared state object being used for cross-subsystem pass-through in an asynchronous processing link; performing cross-subsystem state orchestration and dynamic decision-making based on the shared state object in the streaming processing link, wherein each subsystem performs cooperative read and write operations on the shared state object; performing routing matching based on two-layer features on the raw streaming messages to determine target adaptation rules; merging parameters according to multi-level configuration priorities based on the target adaptation rules to generate an execution snapshot of this adaptation; performing differentiated encapsulation and conversion execution on different types of fragments in the streaming messages according to the execution snapshot of this adaptation to obtain adapted response data; and performing unified adaptation of heterogeneous business systems for intelligent agents based on the adapted response data.

[0071] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the unified adaptation method for heterogeneous business systems for intelligent agents provided by the above methods. The method includes: receiving raw streaming messages from intelligent agents and initializing a reactive context based on the raw streaming messages; injecting a shared state object into the context, the shared state object being used for cross-subsystem pass-through in an asynchronous processing link; performing cross-subsystem state orchestration and dynamic decision-making based on the shared state object in the streaming processing link, wherein each subsystem performs cooperative read and write operations on the shared state object; performing routing matching based on two-layer features on the raw streaming messages to determine target adaptation rules; merging parameters according to multi-level configuration priorities based on the target adaptation rules to generate an execution snapshot of the current adaptation; performing differentiated encapsulation and conversion execution on different types of fragments in the streaming messages according to the execution snapshot of the current adaptation to obtain adapted response data; and performing unified adaptation of heterogeneous business systems for intelligent agents based on the adapted response data.

[0072] The device embodiments described above are merely illustrative. 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0073] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A unified adaptation method for heterogeneous business systems oriented towards intelligent agents, characterized in that, include: Receive raw streaming messages from the agent and initialize a reactive context based on the raw streaming messages, injecting a shared state object into the context, the shared state object being used for pass-through across subsystems in the asynchronous processing link; In the streaming processing chain, cross-subsystem state orchestration and dynamic decision-making are performed based on the shared state object, wherein each subsystem performs cooperative reading and writing of the shared state object; Perform two-layer feature-based routing matching on the original streaming messages to determine target adaptation rules; Based on the target adaptation rules, parameters are merged according to multi-level configuration priorities to generate an execution snapshot for this adaptation. Based on the execution snapshot of this adaptation, different types of fragments in the streaming message are differentially encapsulated and transformed for execution to obtain the adapted response data; Based on the adapted response data, the agent performs unified adaptation to heterogeneous business systems.

2. The method according to claim 1, characterized in that, The method further includes: During unified adaptation operation, asynchronously listen for configuration change events and receive configuration change notifications; Based on the configuration change notification, a snapshot of the configuration index after the configuration change is built in the background to obtain the configuration index to be effective; Perform validity verification on the configuration index to be activated; If the verification passes, the memory reference is atomically switched to the configuration index to be applied, resulting in the updated configuration index. If the verification fails, the original memory reference remains unchanged.

3. The method according to claim 1, characterized in that, The process of receiving raw streaming messages from the agent and initializing a reactive context based on the raw streaming messages, and injecting a shared state object into the context, includes: Receive raw streaming messages in server push event format from the intelligent agent, the raw streaming messages carrying event identifiers and message payloads; Based on the arrival event of the original streaming message, the context initialization mechanism of the reactive framework is triggered to create an asynchronous processing chain; A shared state object is injected into the context, which carries the link tracing identifier, session metadata, intermediate matching results, and subsystem cooperation markers.

4. The method according to claim 3, characterized in that, The link tracing identifier in the shared state object is used for asynchronous operations across subsystems. The asynchronous operations include concatenation intent recognition, keyword listening, and auxiliary task triggering. The session metadata includes user session identifiers and timestamp information.

5. The method according to claim 1, characterized in that, The subsystem includes an intent subsystem, a listening subsystem, and a distribution subsystem; In the streaming processing link, cross-subsystem state orchestration and dynamic decision-making based on the shared state object include: The intent subsystem identifies user intents and writes intent tags into the shared state object; During the text stream output of the original streaming message, the monitoring subsystem matches product keywords in real time based on a preset keyword library and dynamically stores the matched entity identifiers into the cache pool of the shared state object. The distribution subsystem makes a logical judgment based on the existing intent tags and entity identifiers in the shared state object and preset trigger conditions to determine whether to trigger the auxiliary task subsystem.

6. The method according to claim 5, characterized in that, The logical judgments of the distribution subsystem include: If the intent tag indicates a consultation intent and a matching product entity identifier exists in the cache pool, then the consultation purpose card push subsystem is triggered. If the intent label indicates a regular dialogue intent, the main dialogue flow continues to output without triggering auxiliary tasks.

7. The method according to claim 1, characterized in that, The step of performing route matching based on two-layer features on the original streaming message to determine the target adaptation rules includes: Based on the server push event identifier in the original streaming message, the corresponding processing configuration entry is retrieved from the routing configuration table to obtain the first-level routing result; For the message load of the original streaming message, perform pattern matching based on the field path, filter out the final adaptation rule from the rule set corresponding to the first-level routing result, and obtain the target adaptation rule.

8. The method according to claim 7, characterized in that, The step of merging parameters according to multi-level configuration priorities based on the target adaptation rules to generate an execution snapshot for this adaptation includes: Retrieve the global default configuration parameters as the base parameter set; Obtain the routing-level configuration parameters corresponding to the target adaptation rule, and use the routing-level configuration parameters to override the parameters with the same name in the basic parameter set to obtain the intermediate parameter set; Obtain the rule-level configuration parameters corresponding to the target adaptation rule, and use the rule-level configuration parameters to override the parameters with the same name in the intermediate parameter set to obtain the final parameter set; The final parameter set is solidified into an execution snapshot of this message processing. The execution snapshot includes the target type, fragment type, append identifier, and converter call identifier.

9. The method according to claim 8, characterized in that, The process involves differentially encapsulating and transforming different types of fragments in the streaming message based on the execution snapshot of this adaptation, to obtain adapted response data, including: Based on the fragment type identifier in the execution snapshot of this adaptation, identify the text stream fragment, inference stream fragment, and data stream fragment in the original streaming message; The text stream segment is encapsulated according to the standard response body format to obtain text response data; The inference stream fragment is encapsulated according to the thought response format to obtain inference response data; For the data stream segment, based on the converter call identifier in the execution snapshot, multi-level routing is performed through the identifier, and the corresponding business logic conversion module in the converter registry is called to convert the original data into structured response data adapted to the target business system.

10. A unified adaptation device for heterogeneous business systems oriented towards intelligent agents, characterized in that, include: A receiving module is used to receive raw streaming messages from an agent, initialize a reactive context based on the raw streaming messages, and inject a shared state object into the context. The shared state object is used to pass through across subsystems in an asynchronous processing link. The orchestration decision module is used to perform cross-subsystem state orchestration and dynamic decision-making based on the shared state object in the streaming processing link, wherein each subsystem performs collaborative reading and writing of the shared state object; The determination module is used to perform route matching based on two-layer features on the original streaming message to determine the target adaptation rules; The generation module is used to merge parameters according to the multi-level configuration priority based on the target adaptation rules to generate an execution snapshot of this adaptation. The encapsulation and conversion module is used to perform differentiated encapsulation and conversion on different types of fragments in the streaming message based on the execution snapshot of this adaptation, so as to obtain the adapted response data. The adaptation module is used to perform unified adaptation of the agent to heterogeneous business systems based on the adapted response data.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the unified adaptation method for heterogeneous business systems oriented towards intelligent agents as described in any one of claims 1 to 9.

12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the unified adaptation method for heterogeneous business systems oriented towards intelligent agents as described in any one of claims 1 to 9.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the unified adaptation method for heterogeneous business systems oriented towards intelligent agents as described in any one of claims 1 to 9.