Mcp multi-service cooperative cross-platform ai test resource arrangement method and system
By constructing a three-layer architecture of Electron-React-MCP and an MCP event debouncing and deduplication mechanism, and by unifying and coordinating the management of MCP services and other modules, the problems of scattered resource management and multi-service interaction conflicts in cross-platform AI testing have been solved, and efficient and stable test resource orchestration and task execution have been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU YIZHI INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2026-03-09
- Publication Date
- 2026-07-03
AI Technical Summary
Existing cross-platform AI testing technologies lack a unified architecture and collaborative management mechanism, resulting in fragmented management of testing resources, low scheduling efficiency, lack of single-step debugging capabilities, and easy occurrence of instruction redundancy and execution conflicts during multi-service interaction. Incomplete device information transmission, lack of real-time synchronization and notification mechanisms, and difficulty in tracing abnormal nodes in the testing process are also issues.
A three-tier architecture of Electron-React-MCP is constructed. ServiceManager is used for unified collaborative management of modules such as MCP services and AI executors. Better-Sqlite3 embedded database and JSONL files are used for resource classification and storage and environment association. MCP event debouncing and deduplication mechanism is used to coordinate multi-service interaction, generate orchestration rule sets adapted for cross-platform execution, and distribute instructions through a three-level device ID propagation mechanism. Combined with the concurrent management and connection reuse capabilities of multi-conversation AI chat, the execution status is persisted and layered log verification is achieved, and real-time synchronization and visual monitoring of resource status are performed.
It significantly improves the structured management level and ease of use of test resources, ensures the stability and reliability of multi-service collaboration, improves the execution efficiency and resource utilization of test tasks, provides accurate task execution traceability and problem localization capabilities, and reduces operation and maintenance management costs.
Smart Images

Figure CN121807727B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of software testing technology, specifically relating to a cross-platform AI testing resource orchestration method and system for MCP multi-service collaboration. Background Technology
[0002] Existing cross-platform AI testing technologies have achieved basic test resource scheduling and automated execution capabilities, supporting test scenario coverage across multiple browsers and operating systems. Through AI-assisted test case generation and integration with CI / CD toolchains, they reduce the cost of manual coding and repetitive operations, improving the automation level of the testing process and team collaboration efficiency. For example, cloud-based real device platforms, through remote device access capabilities, break geographical limitations, allowing testers to conduct compatibility testing without needing to own multiple device models locally. Traditional test management systems standardize the testing workflow through standardized test case entry and defect tracking processes. Standalone executors provide efficient script execution capabilities for specific scenarios (such as a single browser or a specific system version), meeting automation needs in simple scenarios. These technologies collectively construct the basic framework for test automation, enabling the transition from manual testing to partially automated testing. They provide practical references for subsequent technology upgrades in complex scenarios. Furthermore, some technologies can achieve functional verification of single services, basic data storage, and simple cross-system interaction, providing initial tool support and process foundations for conducting complex AI testing tasks.
[0003] Existing cross-platform AI testing technologies lack a unified architecture and collaborative management mechanism. Functional modules such as MCP services, AI executors, device management, locators, and AI chat modules operate in isolation. Test resources such as remote real devices and browser instances are scattered across different entry points, resulting in low scheduling efficiency. Test datasets and script resources lack a unified management entry point, version control, and environment association mechanism, and have not formed a structured storage system, resulting in low reusability and poor cross-scenario adaptability. There is no effective debouncing and deduplication mechanism during multi-service interactions, which easily leads to instruction redundancy, execution conflicts, and event storms. At the same time, there is a lack of standardized orchestration rules adapted to cross-platform execution. Device information is not fully transmitted in the execution chain, and there is no clear hierarchical propagation mechanism for instruction distribution. Multi-conversation AI chat adopts a single-conversation mode. The system cannot handle multiple independent tasks in parallel, requires manual reconnection when the network fluctuates, and lacks automatic reconnection and heartbeat keep-alive mechanisms. Execution state is not persisted throughout the entire process, and the task execution context cannot be recovered after application restarts or crashes. It lacks single-step debugging capabilities, and log recording is fragmented with no layered verification mechanism, making it difficult to trace abnormal nodes during testing and resulting in low efficiency in problem localization. Synchronization between the local resource state library and rendering layer data lacks real-time performance, has no efficient cross-layer communication push mechanism, and lacks desktop-level real-time notifications and centralized log display functions. The browser environment makes it difficult to continuously control local files, configurations, peripherals, and multi-window states, and cannot persist UI layout preferences. Engineers need to reconfigure the interface every time they log in, severely impacting test security, maintainability, and efficiency. Summary of the Invention
[0004] This application provides a cross-platform AI test resource orchestration method and system for MCP multi-service collaboration to solve problems such as low scheduling efficiency and lack of single-step debugging capability in the existing technology.
[0005] The first aspect of this application provides a cross-platform AI test resource orchestration method for MCP multi-service collaboration, comprising the following steps: acquiring test resource data; based on the test resource data, using the Electron-React-MCP three-layer architecture, unified collaboration of MCP services, AI executors, device management, locators, and AI chat modules is achieved through ServiceManager, and resource classification and storage and environment association are performed using Better-Sqlite3 embedded database and JSONL files to obtain service-specific structured resource data, while coordinating multi-service interactions through the MCP event debouncing and deduplication mechanism to generate an orchestration rule set adapted for cross-platform execution; inputting the structured resource data and orchestration rule set into the task execution manager, distributing execution instructions through a three-level device ID propagation mechanism, and generating preliminary orchestration results by combining the concurrency management and connection reuse capabilities of multi-conversation AI chat, and generating the final orchestration state through execution state persistence and layered log verification; updating the local resource state library according to the final orchestration state, synchronizing it to the rendering layer in real time through IPC push, and triggering desktop tray notification or log display mechanisms.
[0006] Preferably, acquiring test resource data includes: constructing a test resource data acquisition and routing platform; based on the test resource data acquisition and routing platform, combined with the MCP client service discovery and device polling strategy, determining the service affiliation and access permissions of resource requests, and generating service identity authentication and routing decision results; according to the service identity authentication and routing decision results, performing cross-service resource isolation access and real-time acquisition through multi-service data routing middleware and Better-Sqlite3 storage engine, and generating a multi-service test resource data set.
[0007] Preferably, based on the Electron-React-MCP three-layer architecture, the ServiceManager enables unified coordination of MCP services, AI executors, device management, locators, and AI chat modules. The Better-Sqlite3 embedded database and JSONL files are used for resource classification, storage, and environment association to obtain service-specific structured resource data. This includes: constructing a multi-service resource isolation management platform based on the Electron-React-MCP three-layer architecture; using the ServiceManager to uniformly schedule and coordinate MCP services, AI executors, device management, locators, and AI chat modules based on the multi-service resource isolation management platform; prioritizing resource access requests using a service identifier routing algorithm; and obtaining service-specific resource routing evaluation results based on resource partitioning strategies; according to the service-specific resource routing evaluation results, persistent storage of resources is performed using the Better-Sqlite3 embedded database; real-time optimization of the resource storage structure is achieved using the JSONL file mechanism; resource isolation levels and access performance indicators are identified; and an environment association mapping relationship is established between the database stored data and the JSONL file, generating service-specific structured resource data return signals and corresponding resource status push information.
[0008] Preferably, the MCP event debouncing and deduplication mechanism coordinates multi-service interactions to generate an orchestration rule set adapted for cross-platform execution, including: constructing a multi-service event coordination debouncing model; based on the multi-service event coordination debouncing model, combining service identifiers and service type, interaction frequency, and event priority identifiers in multi-dimensional event configuration parameters, calculating the event combination weights and processing order applicable to the current service through an event matching algorithm to generate a service event configuration profile; and according to the service event configuration profile, performing event logic parsing and real-time loading through an event parsing engine and a hot update mechanism to generate a structured orchestration rule set adapted for cross-platform execution.
[0009] Preferably, the structured resource data and orchestration rule set are input into the task execution manager, and execution instructions are distributed through a three-level device ID propagation mechanism. Combined with the concurrent management and connection reuse capabilities of multi-conversation AI chat, a preliminary orchestration result is generated, including: constructing a service-level instruction distribution and concurrent control system for the task execution manager; based on the service-specific structured resource data and the execution dimensions in the orchestration rule set, the task execution manager's device ID propagation module transmits three-level instructions (Task, Execution, Step), the WebSocket session module manages multi-AI connection reuse, and the log layering module records three-level logs (task / use case / step), outputting multi-dimensional execution tracking results; based on the multi-dimensional execution tracking results and the condition judgment logic in the orchestration rule set, a preliminary orchestration result is generated, including instruction matching results and preliminary resource scheduling judgments. The preliminary orchestration result includes successful items, items to be retried, and corresponding execution confidence levels.
[0010] Preferably, the final orchestration state is generated after execution state persistence and hierarchical log verification, including: constructing an execution state persistence and hierarchical log verification model; based on the execution state persistence and hierarchical log verification model, combined with the preliminary orchestration results and service-specific rules, outputting a state verification score and a comprehensive confidence level through a state matching algorithm and a confidence-weighted fusion method; when the state verification score and the comprehensive confidence level meet a preset orchestration threshold, an orchestration state decision mechanism is triggered to generate the final orchestration state, wherein the final orchestration state includes orchestration completed, orchestration interrupted, or manual intervention required state types and corresponding confidence levels.
[0011] The second aspect of this application provides a cross-platform AI test resource orchestration system for MCP multi-service collaboration, including: a test resource acquisition module for acquiring test resource data; and an MCP collaboration and rule generation module for, based on the test resource data and using the Electron-React-MCP three-layer architecture, performing unified collaboration of MCP services, AI executors, device management, locators, and AI chat modules through ServiceManager, and combining Better-Sqlite3 embedded database and JSONL files for resource classification storage and environment association, to obtain service-specific structured resource data. The system coordinates multi-service interactions through an MCP event debouncing and deduplication mechanism to generate an orchestration rule set adapted for cross-platform execution. The task scheduling and status generation module inputs the structured resource data and orchestration rule set into the task execution manager, distributes execution instructions through a three-level device ID propagation mechanism, and generates preliminary orchestration results by combining the concurrency management and connection reuse capabilities of multi-conversation AI chat. After execution status persistence and layered log verification, the final orchestration status is generated. The resource status synchronization and display module updates the local resource status library according to the final orchestration status, synchronizes it to the rendering layer in real time through IPC push, and triggers desktop tray notifications or log display mechanisms.
[0012] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the program to implement the MCP multi-service collaborative cross-platform AI test resource orchestration method as described in the above embodiments.
[0013] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the cross-platform AI test resource orchestration method for MCP multi-service collaboration as described in the above embodiments.
[0014] The fifth aspect of this application provides a computer program product, including a computer program or instructions, for implementing the cross-platform AI test resource orchestration method for MCP multi-service collaboration as described in the above embodiments.
[0015] Therefore, this application includes the following beneficial effects: By constructing a three-layer Electron-React-MCP architecture and relying on ServiceManager for unified collaborative management of multiple modules such as MCP services and AI executors, and combining Better-Sqlite3 embedded database and JSONL files to complete the classification, storage, and environment association of test resources, the structured management level and ease of access of test resources can be significantly improved; at the same time, the MCP event debouncing and deduplication mechanism effectively avoids multi-service interaction conflicts, ensuring the stability and reliability of multi-service collaboration, and the generated cross-platform orchestration rule set can be adapted to different operating environments, breaking down platform barriers; the instruction distribution method based on the three-level device ID propagation mechanism, combined with the concurrent management and connection reuse capabilities of multi-conversation AI chat, greatly improves the execution efficiency and resource utilization of test tasks, and the persistence of execution status and layered log verification provide accurate basis for the traceability and problem localization of the entire task execution process; finally, through IPC real-time synchronization and desktop tray notification mechanism, real-time feedback and visual monitoring of resource status are achieved, reducing operation and maintenance management costs, and improving the overall intelligence, efficiency, and accuracy of cross-platform AI test resource orchestration. This solves the problems of low scheduling efficiency and lack of single-step debugging capability in existing technologies.
[0016] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0017] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0018] Figure 1 This is a flowchart of a cross-platform AI test resource orchestration method for MCP multi-service collaboration provided in an embodiment of this application;
[0019] Figure 2 This is a flowchart of a cross-platform AI test resource orchestration method for MCP multi-service collaboration provided according to an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of the structure of a cross-platform AI test resource orchestration system for MCP multi-service collaboration provided according to an embodiment of this application;
[0021] Figure 4 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0022] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0023] The following describes a cross-platform AI test resource orchestration method and system based on MCP multi-service collaboration, according to embodiments of this application, with reference to the accompanying drawings. Addressing the low scheduling efficiency mentioned in the background section, this application provides a cross-platform AI test resource orchestration method based on MCP multi-service collaboration. This method constructs a three-layer Electron-React-MCP architecture and relies on ServiceManager for unified collaborative management of multiple modules such as MCP services and AI executors. It combines a Better-Sqlite3 embedded database and JSONL files to classify, store, and associate test resources with their environment, significantly improving the structured management level and ease of access to test resources. Simultaneously, it effectively avoids multi-service interaction conflicts by leveraging the MCP event debouncing and deduplication mechanism. This system ensures the stability and reliability of multi-service collaboration, and the generated cross-platform orchestration rule set can adapt to different operating environments, breaking down platform barriers. The instruction distribution method based on a three-level device ID propagation mechanism, combined with the concurrent management and connection reuse capabilities of multi-session AI chat, significantly improves the execution efficiency and resource utilization of test tasks. Execution status persistence and layered log verification provide precise evidence for tracing the entire task execution process and locating problems. Finally, through real-time IPC synchronization and desktop tray notification mechanisms, real-time feedback and visual monitoring of resource status are achieved, reducing operation and maintenance costs and comprehensively improving the intelligence, efficiency, and accuracy of cross-platform AI test resource orchestration. This solves the problems of low scheduling efficiency and lack of single-step debugging capabilities in existing technologies.
[0024] Specifically, Figure 1 This application provides a cross-platform AI test resource orchestration method for MCP multi-service collaboration.
[0025] like Figure 1 As shown, this MCP multi-service collaborative cross-platform AI test resource orchestration method includes the following steps:
[0026] In step S101, test resource data is obtained.
[0027] It is understood that the acquisition of test resource data in this application embodiment is the fundamental premise and core support for the orchestration of MCP multi-service collaborative cross-platform AI test resources. It not only provides a unified data source for the Electron-React-MCP three-layer architecture, enabling ServiceManager to perform precise collaboration among multiple modules such as MCP services and AI executors, but also provides the original basis for the resource classification storage and environment association of Better-Sqlite3 embedded database and JSONL files, helping to generate service-specific structured resource data. At the same time, this data can support the effective coordination of multi-service interaction through the MCP event debouncing and deduplication mechanism, laying the foundation for the generation of orchestration rule sets adapted to cross-platform execution and the distribution of instructions for three-level propagation of device IDs, ensuring the full utilization of the concurrent management and connection reuse capabilities of multi-conversation AI chat, and reducing data fragmentation and adaptation errors in cross-platform testing by providing comprehensive resource context information, thereby improving the accuracy, execution efficiency, and resource utilization of orchestration results, and providing reliable data support for subsequent execution state persistence, layered log verification, and real-time state synchronization.
[0028] In this application example, acquiring test resource data includes: constructing a test resource data acquisition and routing platform; based on the test resource data acquisition and routing platform, combined with the MCP client service discovery and device polling strategy, determining the service affiliation and access permissions of resource requests, and generating service authentication and routing decision results; based on the service authentication and routing decision results, performing cross-service resource isolation access and real-time acquisition through multi-service data routing middleware and Better-Sqlite3 storage engine, and generating a multi-service test resource data set.
[0029] Among them, the device polling strategy is a scheduling mechanism that periodically initiates status queries or command interactions for multiple target devices in a network or system according to a preset order, priority or time interval to achieve device status monitoring and control.
[0030] It is understood that the device polling strategy in this application embodiment periodically traverses the connected MCP clients through DeviceService, calls the corresponding platform tools to obtain device data and standardize fields. This effectively solves the pain points of fragmented access and management of devices such as remote real devices and browser instances in traditional testing platforms, as well as low scheduling efficiency. It enables unified classification and storage of device resources from multiple sources and real-time status awareness. Furthermore, it can dynamically synchronize the device list to the rendering layer through the IPC push mechanism, ensuring that engineers can keep abreast of the device availability status. This provides reliable data support for accurate device allocation and targeted instruction issuance during task execution. At the same time, it works with the MCP discovery service to trigger automatic connection of new devices, further improving the efficiency of device scheduling and the seamlessness of cross-platform collaboration, and ensuring the stable implementation of AI testing tasks on different types of devices.
[0031] For example, in a cross-platform AI test cluster scenario, the device polling strategy uses DeviceService to iterate through 65 connected MCP clients every 5 seconds. This includes 40 remote real devices (25 Android and 15 iOS) and 25 browser instances (12 Chrome, 12 Firefox, and 1 WebKit). Platform tools such as android_list_devices and ios_device_query are used to obtain eight core data categories, including device online status, available memory, and battery level. After standardization, this data is synchronized to B. The etter-Sqlite3 database ensures a single polling response time of ≤300ms and device status synchronization latency within 1 second. New devices can be identified and have their permissions verified within 10 seconds of being connected via polling. The accuracy rate for detecting device offline or excessive resource consumption reaches 99.7%. Compared to traditional manual inspection, the device scheduling conflict rate is reduced from 7.8% to 0.3%, providing accurate device data support for subsequent Task, Execution, and Step-level instruction distribution. This improves the device matching efficiency of AI testing tasks by 70% and shortens the average execution cycle of cross-platform testing tasks by 40%.
[0032] In step S102, based on the test resource data and the Electron-React-MCP three-layer architecture, the ServiceManager is used to coordinate the MCP service, AI executor, device management, locator, and AI chat module. The Better-Sqlite3 embedded database and JSONL files are combined to classify and store resources and associate them with the environment, resulting in service-specific structured resource data. At the same time, the MCP event debouncing and deduplication mechanism coordinates the interaction of multiple services to generate an orchestration rule set that is compatible with cross-platform execution.
[0033] Among them, the MCP event debouncing and deduplication mechanism refers to the management control plane's control rules for high-frequency triggering of similar events within a short period of time. This is achieved by suppressing repeated triggering actions and filtering events with identical content, thereby reducing the processing load on the receiving end and ensuring the accuracy of event processing and the efficiency of system operation.
[0034] It is understandable that this application's embodiments, by merging frequent events within a short period and employing a deduplication strategy that prioritizes the last event, can effectively avoid event storms in scenarios such as MCP service startup / shutdown, network discovery, and configuration changes, preventing system response delays due to a large number of duplicate events. Simultaneously, by automatically triggering MCP client connection and disconnection through listening to the `service:enabled / disabled` event, and combining this with the MCP discovery service for automatic association of new services, the orderly and accurate interaction of multiple services is ensured. This mechanism reduces the repeated processing of invalid events, lowers system resource consumption, provides stable event coordination support for multi-service collaboration under the Electron-React-MCP three-layer architecture, ensures the efficient generation and execution of cross-platform AI test resource orchestration rules, and further improves the stability and operational efficiency of the entire system.
[0035] In this application example, based on the Electron-React-MCP three-layer architecture, ServiceManager is used to unify the coordination of MCP services, AI actuators, device management, locators, and AI chat modules. The Better-Sqlite3 embedded database and JSONL files are combined for resource classification, storage, and environment association, resulting in service-specific structured resource data. This includes: constructing a multi-service resource isolation management platform based on the Electron-React-MCP three-layer architecture; using ServiceManager to uniformly schedule and coordinate MCP services, AI actuators, device management, locators, and AI chat modules based on the multi-service resource isolation management platform; prioritizing resource access requests using a service identifier routing algorithm; and obtaining service-specific resource routing evaluation results based on resource partitioning strategies. Based on the service-specific resource routing evaluation results, the Better-Sqlite3 embedded database is used for persistent resource storage, and the JSONL file mechanism is used to optimize the resource storage structure in real time, identifying resource isolation levels and access performance indicators. Simultaneously, an environment association mapping relationship is established between the database stored data and the JSONL file, generating service-specific structured resource data return signals and corresponding resource status push information.
[0036] Among them, environmental correlation mapping refers to the logical relationship system that establishes corresponding correlations and presents them in a visual or quantitative manner through specific rules or models for the interaction, dependence or constraint relationships between different environmental elements and between environmental systems and external systems.
[0037] It is understood that the embodiments of this application establish precise binding between test resources such as datasets and scripts and different environments such as development, testing, and production through associated fields such as environment identifiers. This can effectively solve the problems of resource dispersion and repeated configuration when switching environments in traditional testing, ensuring that each environment uses dedicated and adapted resource configurations and avoiding test errors or execution failures caused by cross-environment resource mixing. It can also simplify the environment switching process, reduce the operation cost of manually adjusting resources, and ensure the consistency and availability of test resources in different environments. This provides reliable support for the smooth execution and accurate verification of cross-platform AI testing tasks in multiple environments, further improving testing efficiency and result credibility.
[0038] For example, in a cross-platform AI compatibility testing project for an e-commerce app, a precise mapping between datasets, scripts, and development, testing, and production environments was established using environment identifiers. The development environment was bound to a "functional test dataset (JSONL format, containing 200 test case entries)" and a Python script with breakpoint debugging parameters (execution timeout set to 120 seconds). The testing environment was bound to a "regression verification dataset (350 entries, including 100 abnormal scenario test cases)" and a script version with data integrity verification enabled (verification triggered every 10 test cases). The production environment was bound to a "formal business dataset (800 real user scenario entries)" and a script configuration to optimize execution speed (timeout set to 60 seconds, debug log output disabled). All relationships were stored in the dataset and script tables of the local Better-Sqlite3 database, achieving a one-to-one binding through environment identifiers. When test engineers switch the project environment from "test" to "production", the system can match and load the corresponding resources in just 200ms by environment identifier, without the need to manually modify the script entry command or dataset path. Compared with traditional manual configuration, it reduces the operation time by 80%, avoids the distortion of test results caused by mixing test data in the development environment with formal data in the production environment (the occurrence rate of this type of error has been reduced from 15% to 0), ensures the continuity of cross-environment test tasks, improves the execution efficiency of AI test tasks in the production environment by 50%, and achieves a result reliability of 99.8%.
[0039] In this application example, the MCP event debouncing and deduplication mechanism coordinates multi-service interactions to generate an orchestration rule set adapted for cross-platform execution. This includes: constructing a multi-service event coordination debouncing model; based on the multi-service event coordination debouncing model, combining service identifiers and service type, interaction frequency, and event priority identifiers in multi-dimensional event configuration parameters, calculating the event combination weights and processing order applicable to the current service through an event matching algorithm to generate a service event configuration profile; and based on the service event configuration profile, performing event logic parsing and real-time loading through an event parsing engine and a hot update mechanism to generate a structured orchestration rule set adapted for cross-platform execution.
[0040] Hot update mechanism refers to the technical mechanism that enables dynamic updates and activation of code, resources or configurations without interrupting the operation of applications or system components or requiring a restart, so as to quickly iterate functions, fix vulnerabilities and reduce the impact of service interruption.
[0041] It is understood that the hot update mechanism in this application embodiment supports the real-time effect of MCP tools, configuration parameters, etc. during service operation without restarting the entire application or related services. This can avoid cross-platform test task interruption caused by updates, ensure the continuity of the test process, reduce service downtime, and reduce the operational costs of manual restart and maintenance. At the same time, it adapts to the needs of tool iteration and configuration adjustment in multiple environments, allowing the system to quickly respond to changes in test resources, further improving the flexibility and operational efficiency of the modular architecture, and ensuring the smooth execution of AI test resource orchestration.
[0042] For example, during the execution of a cross-platform AI testing project, it was necessary to optimize the test case verification tool's validation logic in the MCPServer to adapt to new testing rules. Through a hot update mechanism, after developers uploaded a 200KB tool update package, the system automatically triggered a dynamic tool registration process without restarting the entire application or the MCP service cluster. The tool logic replacement and activation took only 800ms after the update request was initiated. During this period, the 12 AI testing tasks (involving 3 types of devices and 50 test cases) proceeded without any interruption, and the validation accuracy improved from 92% to 99.5%. Compared to the traditional service restart method, this avoided an average of 3 minutes of service downtime, improved the overall execution efficiency of the testing tasks by 35%, and reduced the operational costs of manual restart maintenance, ensuring the continuity and stability of the cross-platform testing process.
[0043] In step S103, structured resource data and orchestration rule sets are input into the task execution manager. Execution instructions are distributed through the three-level propagation mechanism of device ID. Combined with the concurrent management and connection reuse capabilities of multi-conversation AI chat, preliminary orchestration results are generated. After execution status persistence and hierarchical log verification, the final orchestration status is generated.
[0044] Among them, layered log verification is a process of verifying the integrity, accuracy, and consistency of logs at each layer according to the level of log processing, so as to ensure that log data is reliable and traceable.
[0045] It is understood that this application embodiment records and associates logs according to a three-level structure of task, use case, and step, and embeds screenshots of key nodes, enabling any exception or failure during execution to be quickly and accurately located to the specific operation step and its context. This not only greatly reduces the operational costs of problem diagnosis and reproduction, but also provides accurate recovery basis for task breakpoint continuation after cross-application restarts. At the same time, the structured log data also provides a high-quality data foundation for automated analysis, statistical report generation, and AI-assisted root cause analysis, thereby significantly improving the observability, maintainability, and overall execution reliability of the test automation process.
[0046] In this embodiment, structured resource data and orchestration rule sets are input into the task execution manager. Execution instructions are distributed through a three-level device ID propagation mechanism. Combined with the concurrent management and connection reuse capabilities of multi-conversation AI chat, a preliminary orchestration result is generated. This includes: constructing a service-level instruction distribution and concurrent control system for the task execution manager; based on the service-specific structured resource data and the execution dimensions in the orchestration rule set, using the task execution manager's device ID propagation module to transmit Task, Execution, and Step instructions, the WebSocket session module to manage multi-AI connection reuse, and the log layering module to record task / use case / step logs, outputting multi-dimensional execution tracking results; and based on the multi-dimensional execution tracking results and the condition judgment logic in the orchestration rule set, generating a preliminary orchestration result including instruction matching results and preliminary resource scheduling judgments. The preliminary orchestration result includes successful items, items to be retried, and corresponding execution confidence levels.
[0047] The Task, Execution, and Step three-level instruction transmission is a top-down instruction flow and implementation mechanism that decomposes the top-level task objectives into feasible execution plans and further refines them into standardized operation steps.
[0048] It is understandable that the embodiments of this application, through a hierarchical instruction distribution logic, can ensure that the execution instructions of the test task are accurately routed from the top-level task planning to the specific operation steps, while transmitting key information such as device identification throughout the process, avoiding the loss or deviation of core parameters during instruction transmission, and ensuring the accurate implementation of operations on cross-platform devices; it can also rely on the execution status records at each level to provide clear contextual support for task breakpoint resumption, and with the help of layered logs, achieve full-link traceability of "task-use case-step", allowing execution anomalies to be quickly located to specific links; in addition, this transmission mode also standardizes the process order of task execution, making instruction distribution in scenarios with multiple concurrent tasks and multiple device collaborations more controllable, and effectively improving the execution stability and result credibility of cross-platform AI test tasks.
[0049] For example, in an AI testing task of cross-platform order payment process of an e-commerce APP, the three-level instruction transmission mechanism of Task, Execution, and Step achieved accurate and efficient instruction distribution: the top-level "full-process verification task of order payment" (Task) specifies the target device identifier as "device_879". After the instruction is transmitted to the Execution layer, the device identifier is automatically copied to the execution record, and the 8 test cases to be executed are locked at the same time. Then the instruction sinks to the Step layer. All 45 execution steps are sent to the executor through network sockets carrying the "device_879" parameter. The transmission time of each level of instruction is ≤30 milliseconds, of which the transmission from Task to Execution takes 22 milliseconds, and the transmission from Execution to a single Step takes an average of 8 milliseconds. The accuracy of device identifier transmission for the 45 steps is 100%. When step 23, "Payment Amount Verification," fails due to an interface error, the system uses a three-level index to pinpoint the specific error step in just 28 milliseconds. Compared to traditional single-layer instruction transmission, this improves error location efficiency by 82%. Furthermore, by relying on the device identifier transmitted throughout the process, the system confirms that the problem lies in the payment interface adaptation of the target device rather than instruction distribution deviation, thus ensuring the accuracy of cross-platform test task execution and the efficiency of problem tracing.
[0050] In this embodiment, the final orchestration state is generated after execution state persistence and hierarchical log verification, including: constructing an execution state persistence and hierarchical log verification model; based on the execution state persistence and hierarchical log verification model, combined with the preliminary orchestration results and service-specific rules, outputting the state verification score and comprehensive confidence level through a state matching algorithm and a confidence weighted fusion method; when the state verification score and comprehensive confidence level meet the preset orchestration threshold, the orchestration state decision mechanism is triggered to generate the final orchestration state, wherein the final orchestration state includes the state types of orchestration completed, orchestration interrupted, or requiring manual intervention and the corresponding confidence level.
[0051] Among them, service-specific rules are special management guidelines that are customized for specific service scenarios, service recipients or service needs, and are used to regulate service behavior and clarify service rights and responsibilities and implementation standards.
[0052] It is understood that the service-specific rules in this application are customized for the functional characteristics and operational requirements of different modules such as MCP service, AI executor, and device management. They can accurately adapt to the specific scenarios of resource scheduling, instruction execution, and status verification of each service, avoiding execution deviations or efficiency losses caused by insufficient adaptation of general rules. They can also clarify the interaction boundaries and collaboration logic of each service, reducing the risk of conflicts when multiple services are running in parallel. At the same time, the dedicated rules provide accurate basis for service execution status verification and anomaly judgment, allowing problem investigation to be directly located at the rule adaptation level of the corresponding service, simplifying the difficulty of operation and maintenance. They can also flexibly adapt to the iterative upgrade requirements of different services, ensuring the orderliness and stability of multi-service collaboration under the Electron-React-MCP architecture, and laying a solid rule support for the accurate execution of cross-platform AI test resource orchestration.
[0053] For example, in a cross-platform AI testing system, service-specific rules are customized for the Device Management MCP service and the AI Actuator service respectively: the dedicated rules for the Device Management MCP service specify that "the heartbeat reporting interval is ≤10 seconds, the device is judged to be offline after 3 consecutive heartbeat timeouts, and automatic reconnection is triggered 5 seconds after offline", while the dedicated rules for the AI Actuator service limit "the number of concurrent tasks executed by a single device is ≤3, the timeout threshold for a single step is 60 seconds, and the device is immediately terminated and a retry mechanism is triggered after the timeout". During system operation, the device management service, relying on dedicated rules, improved the accuracy of device offline status identification from 85% under general rules to 99.2%, and the automatic reconnection success rate reached 98%. The AI executor service, following dedicated rules, reduced the single-device task concurrency conflict rate from 12% to 0.5% and the step execution timeout rate from 8% to 1.2%. Compared with the general rule's uniform setting of "20-second heartbeat interval, 5 concurrent tasks per device", the overall test task execution efficiency was improved by 40%, and the anomaly handling response speed was accelerated by 60%. This effectively avoided problems such as device misjudgment and task blocking caused by insufficient rule adaptation, ensuring the accuracy and stability of multi-service collaboration.
[0054] In step S104, the local resource state library is updated according to the final orchestration state, and synchronized to the rendering layer in real time via IPC push, triggering desktop tray notification or log display mechanism.
[0055] IPC push is a technical operation based on inter-process communication mechanism, in which one process actively transmits data, instructions or status information to other processes.
[0056] Understandably, the real-time IPC push mechanism of this application can break down the communication barriers between the main process, rendering process, and MCP service in a cross-platform AI testing system, enabling real-time bidirectional transmission of device status changes, command execution results, and abnormal alarm information. It eliminates the need for inefficient communication methods such as polling, reducing system resource consumption while ensuring that critical data such as device heartbeat status and task execution progress are synchronized to the front-end UI within 100ms. Simultaneously, it ensures that Task, Execution, and Step-level commands are accurately delivered from the main process to the executor process, avoiding information delays or loss in multi-process collaboration. This provides stable communication support for real-time reporting of layered logs and accurate push of hot update packages, further improving the efficiency of multi-process collaboration and the reliability of command transmission.
[0057] For example, during the operation of a cross-platform AI testing system, an Android device triggered a heartbeat timeout due to network fluctuations. The Device Management Platform (MCP) service immediately generated a "Device Offline" status change event and synchronized this information to the main process and front-end rendering process via IPC push mechanism. The entire transmission time was ≤50ms, which is more than 98% faster than the traditional polling method that occurs every 3 seconds. After receiving the event, the engineer issued a "Device Automatic Reconnect" command through the interface. This command was also pushed to the MCP service executor via IPC, achieving 100% accuracy in command delivery. The service initiated the reconnection process within 1 second. Relying on the real-time bidirectional communication capability of IPC push, this device offline did not cause any interruption to the test tasks. Compared to the 15% task interruption rate in the polling mode, the interruption rate was reduced to 2%, while the device reconnection response time was shortened from an average of 10 seconds to less than 1 second, significantly improving the efficiency of multi-process collaboration and the accuracy of device status management.
[0058] The following will illustrate the cross-platform AI test resource orchestration method for MCP multi-service collaboration through a specific embodiment, such as... Figure 2 As shown, it includes:
[0059] The testing team of a large software company adopted a cross-platform AI test resource orchestration method based on MCP multi-service collaboration to conduct automated testing of its intelligent office application covering three major systems: Windows 11, macOS Sonoma, and Linux Ubuntu 22.04. This application integrates core functions such as intelligent document analysis, multimodal interaction, and automated process construction, and needs to be compatible with x86 and ARM architecture hardware. It involves 20 physical test devices, 8 AI model execution environments, and 12 types of test tools. The testing team hopes to solve the pain points of traditional test platforms such as resource dispersion, difficulty in cross-platform collaboration, and multi-service interaction conflicts through this method.
[0060] After launching the TinypaceAIDesktop application, the Electron main process quickly initializes logs and windows. WindowStateManager immediately restores the window position, maximized state, and UI layout preferences, including the sidebar collapsible state and AI drawer width, which were previously persisted via a 100ms debouncing mechanism, without requiring test engineers to reconfigure them. Subsequently, ServiceManager starts core services in parallel, including the Better-Sqlite3 embedded database, MCP service cluster, device management, AI executor, locator, and AI chat. Each service uses event and Promise mechanisms to achieve parallel startup and state detection. Dependency injection ensures that modules such as DeviceService can obtain necessary resources such as the connection list from MCPClientManager. After the rendering layer completes Vite loading, it synchronously restores the UI layout and registers event listeners. The entire startup process is highly efficient. The seamless integration ensures rapid and coordinated readiness of all modules. DeviceService periodically polls connected MCP clients every 5 seconds, using the platform_list_devices tool to retrieve device JSON data containing information such as device name, operating status, platform, and hardware configuration. This data is standardized, categorized by platform, and stored. The onDeviceListUpdatedIPC event then pushes the data to the React rendering layer. The deviceService.ts file in the rendering layer refreshes the device list in real-time after a 500ms throttling process, allowing engineers to clearly understand the status of all available test resources. This process precisely replicates the entire execution logic, with each step from timer triggering to UI updates strictly corresponding, ensuring the accuracy and real-time nature of cross-platform device resource integration and providing a reliable resource foundation for subsequent task scheduling.
[0061] The test engineer opens the AI drawer according to the test requirements and requests the AIChatService to establish a session via IPC. AIChatService checks if a corresponding connection already exists through sessionsMap. Because it's a new task requirement, the system creates an independent WebSocket connection in concurrent mode and starts a 30-second heartbeat keep-alive timer, sending PING / PONG messages every 30 seconds. If three heartbeats fail, a reconnection mechanism is triggered. After the engineer inputs "Generate cross-platform compatibility test cases for the document intelligent analysis module," AIChatService sends the user context and current project data to AIAgent. The Agent returns the test case content in real-time via streaming. After the engineer confirms that everything is correct, they trigger the "Write Test Cases" operation with one click. The system automatically stores the test cases in test_ via IPC call to the create-testcase interface. The `cases` table is linked with corresponding project IDs and test environments, achieving deep integration of AI capabilities and business assets. Engineers then select a target task on the `Tasks` page and click "Execute." The front-end calls the `taskExecutionStart` interface via IPC to request the main process to start the task. `TaskExecutionManager` reads the task and associated test cases from the Better-Sqlite3 database, breaks down the test cases into standardized steps, and ensures that instructions are accurately delivered to the target device through a three-level device ID propagation mechanism: `Task.device_id` → `Execution.device_id` → `Step.device_id` → executor command parameters. If no device is specified, the default device is automatically used. Simultaneously, a WebSocket session is established with the AI executor to continuously distribute task commands and listen for execution feedback.
[0062] During execution, a sudden network fluctuation occurred. Thanks to the MCP event debouncing and deduplication mechanism (500ms), frequent events within a short period were merged and deduplicated according to the "last event wins" principle, effectively avoiding system response delays caused by event storms. The AI session quickly restored the connection through a 999-times automatic reconnection mechanism with a reconnection interval of 3000ms, without interrupting task execution. At this time, the engineer needed to handle an urgent matter and clicked the "pause" button. The TaskExecutionManager immediately updated the status of the task in the task_executions table to "paused" and persisted the index of the currently executed test case and step, while maintaining the WebSocket connection to ensure the session state continued. The next day, the engineer restarted the application. The system automatically queried the database for execution records with a status of "paused". The TaskExecutionManager read the last log in the task_execution_logs table, determined that the previous step had been completed, and resumed execution from the next step indexed by the current step, updating the status to "running" and continuing to issue commands, achieving breakpoint continuation across application restarts. During execution, the system recorded task-level and test case data in real time through a hierarchical logging system. Logs are categorized into three levels: task level, step level, and tagged as stream, response, and summary. The stream type corresponds to AI streaming output and executor real-time output; the response type corresponds to complete AI responses and executor command results; and the summary type corresponds to a task execution summary. Each log entry is immediately pushed to the rendering layer via IPC after being written to the database, triggering a "task-execution-log-added" event. Progress can be displayed in real-time without polling. When the executor returns a screenshot, the log message is prefixed with "[SCREENSHOT]" and embeds base64 encoded image data for easy engineering. The teacher can review the playback later; at the same time, the dynamic timeout reset mechanism of the streaming message ensures that the 60-second timeout timer is reset every time a stream type message is received, which is perfectly adapted to long-term AI inference tasks; throughout the testing process, the three built-in MCP servers work together. DesktopMCPServer exposes CRUD tools for projects, test cases, and tasks, TestcaseMCPServer provides dedicated tools for test case query, execution, and verification, and ProxyMCPServer forwards requests to multiple upstream MCP services in an aggregated proxy mode, supports both stdio and HTTP modes, exposes interfaces for unified tools, and simplifies client configuration;ServiceManager manages the entire lifecycle of service processes such as executors and locators through mechanisms like PID file tracking, port conflict detection, 3-second heartbeat monitoring, and 5-second graceful shutdown. If a process crashes, it can automatically restart and recover, ensuring stable system operation.
[0063] Upon task completion, the local resource status database updates the task results in real time, triggering a notification in the desktop tray and displaying an execution summary log. Engineers can quickly locate potential problems through a multi-dimensional tracing path of task → test case → step → log, significantly reducing operational costs. Furthermore, the system supports concurrent management and connection reuse for multi-session AI chat, allowing engineers to handle multiple independent test tasks simultaneously. When switching sessions, a switching mode is used to reuse existing connections and send a switch_session message, avoiding the overhead of repeatedly establishing connections. The multi-environment configuration system allows teams to load corresponding .env files based on different environments such as development, testing, UAT, and production, generating application packages adapted to different platforms through independent build commands. Log levels can also be dynamically adjusted according to the environment: debug level for development environments and error level for production environments. Level; The entire testing process, from resource acquisition, service collaboration, task execution to state synchronization, fully relies on a three-tier architecture of Electron main process + React rendering process + MCP service network. It achieves unified scheduling of multiple modules through ServiceManager, and completes unified management of data resources and environment association with Better-Sqlite3 database and JSONL files. All core technical innovations have been implemented and are effective. It not only solves the pain points of traditional Web testing platforms such as fragmented device management, single AI session, non-persistent window state, and difficulty in recovering task execution, but also realizes cross-platform integrated operation, which greatly improves test automation coverage and operation and maintenance efficiency. It allows the testing team to focus on core testing tasks without spending too much time on switching multiple tools, repetitive configuration, and troubleshooting.
[0064] In summary, this invention precisely addresses the pain points of traditional cross-platform testing, such as resource dispersion, multi-service interaction conflicts, complex cross-system adaptation, and easy task interruption, through core technologies such as the Electron-React-MCP three-layer architecture, device synchronization process, MCP event debouncing and deduplication, three-level device ID propagation, and breakpoint resumption. It not only provides unified management and efficient scheduling of test resources across multiple systems (Windows, macOS, Linux) and x86 / ARM architectures, significantly improving test script reusability, task execution stability, and cross-platform adaptation efficiency, but also reduces the time cost of manual configuration and troubleshooting through features such as streaming generation and one-click test case writing in the AI chat module, and real-time synchronization of layered logs. Furthermore, it provides a reusable practical sample for similar cross-platform AI application testing projects, encompassing the entire chain from resource acquisition and service collaboration to task execution and state synchronization. This demonstrates the precise support of the technical architecture for business needs and provides a practical solution for improving testing efficiency and quality assurance in enterprise digital transformation.
[0065] Figure 3 This is a block diagram of the MCP multi-service collaborative cross-platform AI test resource orchestration system according to an embodiment of this application.
[0066] like Figure 3 As shown, the MCP multi-service collaborative cross-platform AI test resource orchestration system 10 includes: a test resource acquisition module 100, an MCP collaboration and rule generation module 200, a task scheduling and status generation module 300, and a resource status synchronization and display module 400.
[0067] The system comprises the following modules: a test resource acquisition module 100, used to acquire test resource data; an MCP collaboration and rule generation module 200, used to coordinate MCP services, AI executors, device management, locators, and AI chat modules based on the test resource data and the Electron-React-MCP three-layer architecture via ServiceManager, combining Better-Sqlite3 embedded database and JSONL files for resource classification, storage, and environment association to obtain service-specific structured resource data, and coordinating multi-service interactions through an MCP event debouncing and deduplication mechanism to generate an orchestration rule set adapted for cross-platform execution; a task scheduling and status generation module 300, used to input structured resource data and orchestration rule set into the task execution manager, distribute execution instructions through a three-level device ID propagation mechanism, and generate preliminary orchestration results by combining the concurrent management and connection reuse capabilities of multi-conversation AI chat, and generate the final orchestration status through execution status persistence and layered log verification; and a resource status synchronization and display module 400, used to update the local resource status library based on the final orchestration status, synchronize it to the rendering layer in real time via IPC push, and trigger desktop tray notifications or log display mechanisms.
[0068] It should be noted that the foregoing explanation of the cross-platform AI test resource orchestration method embodiment for MCP multi-service collaboration also applies to the cross-platform AI test resource orchestration system for MCP multi-service collaboration in this embodiment, and will not be repeated here.
[0069] The cross-platform AI test resource orchestration system based on MCP multi-service collaboration proposed in this application constructs a three-layer Electron-React-MCP architecture and relies on ServiceManager for unified collaborative management of multiple modules such as MCP services and AI executors. It combines a Better-Sqlite3 embedded database and JSONL files to classify, store, and associate test resources with their environments, significantly improving the structured management level and ease of access to test resources. Simultaneously, the MCP event debouncing and deduplication mechanism effectively avoids multi-service interaction conflicts, ensuring the stability of multi-service collaboration. In terms of performance and reliability, the generated cross-platform orchestration rule set can adapt to different operating environments, breaking down platform barriers. The instruction distribution method based on a three-level device ID propagation mechanism, combined with the concurrent management and connection reuse capabilities of multi-session AI chat, significantly improves the execution efficiency and resource utilization of test tasks. Execution status persistence and layered log verification provide precise evidence for tracing the entire task execution process and locating problems. Finally, through real-time IPC synchronization and desktop tray notification mechanisms, real-time feedback and visual monitoring of resource status are achieved, reducing operation and maintenance costs and comprehensively improving the intelligence, efficiency, and accuracy of cross-platform AI test resource orchestration. This solves the problems of low scheduling efficiency and lack of single-step debugging capabilities in existing technologies.
[0070] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:
[0071] The memory 401, the processor 402, and the computer program stored on the memory 401 and capable of running on the processor 402.
[0072] When the processor 402 executes the program, it implements the cross-platform AI test resource orchestration method for MCP multi-service collaboration provided in the above embodiments.
[0073] Furthermore, electronic devices also include:
[0074] Communication interface 403 is used for communication between memory 401 and processor 402.
[0075] The memory 401 is used to store computer programs that can run on the processor 402.
[0076] The memory 401 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.
[0077] If the memory 401, processor 402, and communication interface 403 are implemented independently, then the communication interface 403, memory 401, and processor 402 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0078] Optionally, in a specific implementation, if the memory 401, processor 402, and communication interface 403 are integrated on a single chip, then the memory 401, processor 402, and communication interface 403 can communicate with each other through an internal interface.
[0079] Processor 402 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.
[0080] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described cross-platform AI test resource orchestration method for MCP multi-service collaboration.
[0081] Furthermore, this application also provides a computer program product, including a computer program or instructions, which, when executed, implement the aforementioned cross-platform AI test resource orchestration method for MCP multi-service collaboration.
[0082] In the description of this specification, the references to "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0083] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0084] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0085] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by suitable instructions. For example, if implemented in hardware as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0086] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0087] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A cross-platform AI test resource orchestration method for MCP multi-service collaboration, characterized in that, include: Obtain test resource data; Based on the test resource data, and using the Electron-React-MCP three-layer architecture, ServiceManager is used to unify the coordination of MCP services, AI executors, device management, locators, and AI chat modules. Better-Sqlite3 embedded database and JSONL files are combined for resource classification, storage, and environment association, resulting in service-specific structured resource data. Simultaneously, an MCP event debouncing and deduplication mechanism coordinates multi-service interactions, generating an orchestration rule set adapted for cross-platform execution. Specifically, a multi-service event coordination debouncing model is constructed. Based on this model, and combining service identifiers with service type, interaction frequency, and event priority identifiers from multi-dimensional event configuration parameters, an event matching algorithm calculates the applicable event combination weights and processing order for the current service, generating a service event configuration profile. Based on this profile, an event parsing engine and hot update mechanism are used to parse event logic and load it in real time, generating a structured orchestration rule set adapted for cross-platform execution. The structured resource data and orchestration rule set are input into the task execution manager, and execution instructions are distributed through the three-level propagation mechanism of device ID. Combined with the concurrency management and connection reuse capabilities of multi-conversation AI chat, a preliminary orchestration result is generated. After execution status persistence and hierarchical log verification, the final orchestration state is generated. The local resource state library is updated based on the final orchestration state, and synchronized to the rendering layer in real time via IPC push, triggering desktop tray notifications or log display mechanisms.
2. The cross-platform AI test resource orchestration method for MCP multi-service collaboration according to claim 1, characterized in that, Obtain test resource data, including: Build a test resource data collection and routing platform; Based on the aforementioned test resource data collection and routing platform, combined with the MCP client service discovery and device polling strategy, the service affiliation and access permissions of resource requests are determined, and service identity authentication and routing decision results are generated. Based on the service identity authentication and routing decision results, cross-service resource isolation access and real-time acquisition are performed through multi-service data routing middleware and Better-Sqlite3 storage engine to generate a multi-service test resource data set.
3. The cross-platform AI test resource orchestration method for MCP multi-service collaboration according to claim 1, characterized in that, Based on the Electron-React-MCP three-layer architecture, ServiceManager enables unified coordination of MCP services, AI executors, device management, locators, and AI chat modules. Combined with the Better-Sqlite3 embedded database and JSONL files, resources are categorized, stored, and associated with the environment, resulting in service-specific structured resource data, including: Build a multi-service resource isolation management platform based on the Electron-React-MCP three-tier architecture; Based on the multi-service resource isolation management platform, ServiceManager is used to uniformly schedule and coordinate MCP services, AI executors, device management, locators, and AI chat modules. Service identification routing algorithm is used to prioritize resource access requests, and combined with resource partitioning strategy, service-specific resource routing evaluation results are obtained. Based on the service-specific resource routing evaluation results, Better-Sqlite3 embedded database is used for persistent storage of resources. Combined with the JSONL file mechanism, the resource storage structure is optimized in real time, resource isolation levels and access performance indicators are identified, and an environment association mapping relationship between database stored data and JSONL file is established to generate service-specific structured resource data return signals and corresponding resource status push information.
4. The cross-platform AI test resource orchestration method for MCP multi-service collaboration according to claim 1, characterized in that, The structured resource data and orchestration rule set are input into the task execution manager. Execution instructions are distributed through a three-level device ID propagation mechanism. Combined with the concurrency management and connection reuse capabilities of multi-conversation AI chat, preliminary orchestration results are generated, including: Construct a service-level instruction distribution and concurrency control system for the task execution manager; Based on the service-level instruction distribution and concurrency control system of the task execution manager, and based on the execution dimension of service-specific structured resource data and orchestration rule set, the task execution manager transmits three-level instructions (Task, Execution, and Step) through the device ID propagation module, manages multiple AI connection reuse through the WebSocket session module, and records three-level logs (task / use case / step) through the log layering module, outputting multi-dimensional execution tracking results. Based on the multi-dimensional execution tracking results, and in accordance with the condition judgment logic in the orchestration rule set, a preliminary orchestration result is generated, which includes instruction matching results and preliminary resource scheduling judgments. The preliminary orchestration result includes successful items, items to be retried, and corresponding execution confidence levels.
5. The cross-platform AI test resource orchestration method for MCP multi-service collaboration according to claim 1, characterized in that, After execution state persistence and hierarchical log verification, the final orchestration state is generated, including: Construct an execution state persistence and layered log verification model; Based on the execution state persistence and hierarchical log verification model, combined with the preliminary orchestration results and service-specific rules, the state verification score and comprehensive confidence are output through the state matching algorithm and the confidence weighted fusion method. When the state verification score and the overall confidence level meet the preset orchestration threshold, the orchestration state decision mechanism is triggered to generate the final orchestration state. The final orchestration state includes the state type of orchestration completion, orchestration interruption, or manual intervention required, and the corresponding confidence level.
6. A cross-platform AI test resource orchestration system for multi-service collaboration using MCP, characterized in that: include: The test resource acquisition module is used to acquire test resource data; The MCP collaboration and rule generation module is used to coordinate MCP services, AI executors, device management, locators, and AI chat modules in a unified manner through ServiceManager based on the test resource data and the three-layer architecture of Electron-React-MCP. It combines the Better-Sqlite3 embedded database and JSONL files for resource classification, storage, and environment association to obtain service-specific structured resource data. Simultaneously, it coordinates multi-service interactions through an MCP event debouncing and deduplication mechanism to generate an orchestration rule set adapted for cross-platform execution. Specifically, it constructs a multi-service event coordination debouncing model; based on this model, and combining service identifiers with service type, interaction frequency, and event priority identifiers from multi-dimensional event configuration parameters, it calculates the applicable event combination weights and processing order for the current service using an event matching algorithm, generating a service event configuration profile; and based on this profile, it performs event logic parsing and real-time loading through an event parsing engine and a hot update mechanism to generate a structured orchestration rule set adapted for cross-platform execution. The task scheduling and status generation module is used to input the structured resource data and orchestration rule set into the task execution manager, distribute execution instructions through the device ID three-level propagation mechanism, combine the concurrency management and connection reuse capabilities of multi-conversation AI chat, generate preliminary orchestration results, and generate the final orchestration status through execution status persistence and hierarchical log verification. The resource status synchronization and display module is used to update the local resource status library according to the final orchestration status, push it to the rendering layer in real time via IPC, and trigger desktop tray notification or log display mechanism.
7. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the cross-platform AI test resource orchestration method for MCP multi-service collaboration as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When a computer program or instruction is executed, it implements the cross-platform AI test resource orchestration method for MCP multi-service collaboration as described in any one of claims 1-5.
9. A computer program product, comprising a computer program or instructions, characterized in that, When a computer program or instruction is executed, it implements the cross-platform AI test resource orchestration method for MCP multi-service collaboration as described in any one of claims 1-5.