A non-intrusive human-machine collaborative control system based on RPA technology

Through the collaborative architecture of hardware arbitration module and edge computing unit, the latency and conflict issues of RPA technology in high-security scenarios are solved, realizing low-latency human-machine collaboration and intelligent execution, which is suitable for automated control in high-security scenarios such as finance and government affairs.

CN123137976APending Publication Date: 2026-11-20HANGZHOU XIXIU UBIQUITOUS COMPUTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing RPA technology cannot achieve low latency and seamless human-machine collaboration in high-security scenarios, nor can it meet the comprehensive requirements of high real-time performance and high reliability, resulting in difficulties in handling operational conflicts and anomalies.

Method used

It adopts a three-layer collaborative architecture consisting of a hardware arbitration module, an edge computing unit, and a cloud platform. It achieves real-time detection and arbitration of physical and virtual inputs through the hardware circuit level, and performs intelligent execution and anomaly handling by combining edge computing. It also integrates video acquisition, OCR recognition, and data uploading functions.

Benefits of technology

It achieves a state switching delay of <10ms and a physical input pass-through of <1ms, reducing the probability of operation conflicts, improving collaborative efficiency, adapting to the deployment requirements of high-security scenarios, and ensuring data collection and process integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123137976A_ABST
    Figure CN123137976A_ABST
Patent Text Reader

Abstract

The application discloses a non-intrusive man-machine collaborative control system based on RPA technology and relates to the technical field of robot process automation (RPA) and computer interactive control. The system comprises a hardware arbitration module, an edge computing unit, a video acquisition module and a cloud platform. The hardware arbitration module is connected between a physical keyboard and a host computer. Through a hardware-level USB HID priority arbitration mechanism, the physical input detection circuit, the dual-mode USB HID controller and the hardware mutual exclusion lock circuit are used to realize millisecond-level man-machine operation conflict detection and mode switching and ensure zero-delay transmission of physical input. The edge computing unit is deployed with an automated execution engine, an OCR recognition and an abnormality self-healing module. A thread-granularity-based process management and operation verification mechanism is adopted to realize accurate recovery and intelligent error correction. The application solves the problems of high switching delay, serious operation conflict and weak abnormality processing capacity of the existing RPA technology and realizes intelligent man-machine collaboration with high real-time performance and high security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robotic process automation (RPA) and computer interactive control technology, specifically to a non-intrusive human-machine collaborative control system based on RPA technology. Background Technology

[0002] With the deepening of digital transformation, Robotic Process Automation (RPA) has been widely applied to business process automation in industries such as finance, healthcare, and manufacturing. However, traditional RPA technologies based on pure software simulation (such as simulating mouse and keyboard events) have the following obvious problems and shortcomings in practical applications when dealing with the comprehensive requirements of "non-intrusive deployment + RPA automation + human-machine collaboration + data acquisition":

[0003] Existing technical approach 1: Software-based RPA solution

[0004] Data preparation: Install RPA client software (such as UiPath Robot, AutomationAnywhere Bot, Laiye Technology, etc.) on the target host and configure the automation process script. Also install screen recording software (such as OBSStudio) to capture screen footage.

[0005] Automated Execution: RPA software simulates keyboard and mouse operations through the operating system API. Taking the Windows platform as an example, the SendInput function is used to send virtual keyboard messages and mouse events to the message queue of the target window. The operating system mixes these virtual inputs with physical inputs, and the application cannot distinguish the source of the input.

[0006] Conflict Detection and Pause: The RPA software polls the operating system's input queue (using the GetMessage or PeekMessage functions). When it detects physical keyboard and mouse input from the user, it pauses the execution of the automation process. The detection cycle is typically 100ms-1000ms, limited by the operating system's message processing mechanism.

[0007] Data Acquisition and Upload: Screen recording software captures screen images via DirectX or Windows Desktop Duplication API, encodes them into video files, stores them on the local disk, and periodically uploads them to a remote server. RPA software records execution logs, including operation steps, execution time, error messages, etc.

[0008] However, in reality, input detection and switching control in software RPA solutions are implemented at the application layer of the operating system. Limited by the polling mechanism of message queues, the detection latency is typically 100ms-1000ms. When RPA is executing a mouse click operation, even if the user moves the mouse simultaneously, the RPA's virtual click instruction may have already been sent to the target window, leading to incorrect click location or accidental triggering of other controls. More seriously, because virtual and physical inputs enter the same message queue at the operating system level, the software cannot prevent sent virtual instructions at the hardware level; it can only "remediately" after a conflict is detected. This mechanism is prone to input conflicts in fast-paced scenarios, affecting user experience and automation accuracy.

[0009] Meanwhile, high-security scenarios such as finance, government affairs, and military industries typically prohibit the installation of third-party software on business hosts. Even if installation is permitted, software-based RPA solutions are highly dependent on the stability of the target host's operating system: when the host's CPU usage is too high, the system lags, or the application becomes unresponsive, the RPA software's input simulation, conflict detection, and process execution will be severely delayed or even fail. Furthermore, software solutions cannot verify whether virtual operations are truly effective in the target application. When the application lags, RPA may consider the operation complete when it has not actually taken effect, leading to errors in subsequent processes.

[0010] Technical Route 2: Solution based on hardware KVM switch

[0011] Hardware deployment: Connect the KVM switch in series between the keyboard / mouse, host, and monitor to connect multiple hosts simultaneously (or achieve signal pass-through in a single-host scenario).

[0012] Manual switching: Users can manually switch the target host they are currently controlling by pressing the physical button on the KVM switch or by using keyboard hotkeys (such as Scroll Lock + Scroll Lock + number keys).

[0013] Signal pass-through: KVM switches use hardware circuitry to directly forward USB HID signals and video signals without performing any protocol parsing or data processing, resulting in extremely low latency (typically <1ms).

[0014] Limitations: Traditional KVM only performs signal switching, does not support virtual input injection, does not have data acquisition functions, and does not support automatic detection of user input, thus failing to meet the needs of RPA automation and data acquisition.

[0015] Traditional KVM switches require users to manually press a switch button, failing to achieve a seamless collaborative process of "user picks up the mouse → system automatically detects → immediately switches control → user completes operation → automatic resumption of automation." KVM switching operates in an exclusive "either A or B" mode, completely disconnecting remote automation after the switch, making it impossible to achieve a collaborative mode of "automation waiting, automatic resumption after manual completion." More importantly, KVM switches do not support virtual input injection (preventing RPA automation) and lack functions such as video capture, OCR recognition, and data uploading, failing to meet the data collection needs of business auditing and process optimization.

[0016] In summary, existing solutions fail to meet the combined requirements of high real-time performance and high reliability. In scenarios such as real-time bank teller transactions and instant government window services, automated systems need to immediately (with a delay of <10ms) stop all virtual operations upon manual intervention to avoid user disruption; they need to maintain stable operation and continuous data collection even when the host system lags; they need to verify the effectiveness of each automated operation and automatically retry or rollback upon detecting anomalies; and they need to fully record the entire process of both manual and automated operations for compliance auditing and process analysis. Existing software RPA and hardware KVM solutions cannot simultaneously meet these comprehensive technical requirements.

[0017] To address this, we propose a novel non-intrusive human-machine collaborative control system based on RPA technology. Summary of the Invention

[0018] The purpose of this invention is to provide a non-intrusive human-machine collaborative control system based on RPA technology. Through a three-layer collaborative architecture of "hardware arbitration + edge computing + cloud platform", it solves the problems of high switching latency, operation conflict and difficulty in handling anomalies in the prior art.

[0019] To achieve the above objectives, the present invention provides the following technical solution: a non-intrusive human-machine collaborative control system based on RPA technology, comprising a hardware arbitration module, an edge computing unit, a video acquisition module, and a cloud platform;

[0020] The hardware arbitration module is connected in series in the USB connection channel between the physical keyboard and mouse and the target host, and is used to realize real-time detection, priority arbitration and conflict protection of physical input and virtual input;

[0021] The video acquisition module is connected in series in the video signal channel between the target host and the display, and is used to acquire the screen image of the target host and transmit it to the edge computing unit;

[0022] The edge computing unit is connected to the hardware arbitration module, the video acquisition module and the cloud platform respectively, and is used to execute automated tasks according to the screen display and send virtual keyboard and mouse commands to the hardware arbitration module.

[0023] The cloud platform is used to distribute RPA scripts to edge computing units and manage data.

[0024] When the hardware arbitration module detects physical keyboard and mouse input, it prioritizes transmitting the physical input to the target host and interrupts or disables the input of virtual keyboard and mouse commands; when it detects that the physical keyboard and mouse are idle, it resumes the input of virtual keyboard and mouse commands.

[0025] Preferably, the hardware arbitration module includes a physical input detection circuit, a dual-mode USB HID controller, a hardware arbitration state machine, and a hardware mutex circuit.

[0026] The physical input detection circuit is used to monitor the USB communication status of the physical keyboard and mouse, and triggers an interrupt when an HID report is detected.

[0027] The dual-mode USB HID controller includes an uplink port and a downlink port. The uplink port is used to connect a physical keyboard and mouse, and the downlink port is used to connect to a target host.

[0028] The hardware arbitration state machine is connected to the physical input detection circuit and is used to switch between transparent transmission mode and analog mode according to the interrupt signal.

[0029] The hardware mutex circuit is connected between the hardware arbitration state machine and the dual-mode USB HID controller. It is used to physically prevent the virtual HID report from being written to the controller buffer in transparent mode and to allow the virtual HID report to be written in analog mode.

[0030] Preferably, the physical input detection circuit includes a USB differential signal level monitoring circuit and an HID report receive interrupt controller;

[0031] The USB differential signal level monitoring circuit is connected to the comparator circuit via a high-impedance bypass to the USB D+ and D- signal lines.

[0032] The HID report receive interrupt controller triggers an INT_EP1_IN interrupt when the dual-mode USB HID controller receives a physical keyboard and mouse HID report;

[0033] The hardware arbitration state machine switches to transparent transmission mode within 1ms after receiving an interrupt.

[0034] Preferably, the hardware mutex circuit is implemented using a D flip-flop;

[0035] The data input terminal of the D flip-flop is connected to the mode bit of the state register of the hardware arbitration state machine, the clock input terminal is connected to the state switching signal, and the output terminal is connected to the write enable pin of the dual-mode USB HID controller.

[0036] When in pass-through mode, the D flip-flop outputs a low level to disable virtual HID writing; when in analog mode, the D flip-flop outputs a high level to enable virtual HID writing.

[0037] Preferably, the edge computing unit is configured with a thread-granular process management module;

[0038] The edge computing unit divides the RPA process into multiple independent thread units, each thread containing a start node and an end node;

[0039] When the hardware arbitration state machine triggers an interrupt, the edge computing unit terminates the current thread, clears the virtual keyboard and mouse instruction queue, and records the ID of the interrupted thread.

[0040] When the hardware arbitration state machine sends a recovery signal, the edge computing unit resumes execution of the thread from the starting node corresponding to the interrupted thread ID and re-identifies the current screen state through OCR.

[0041] Preferably, the edge computing unit is further configured with an operation verification and anomaly self-healing module;

[0042] The operation verification includes: capturing a specific area of ​​the screen image before and after performing virtual keyboard and mouse operations, calculating the pixel difference, and determining the operation as successful if the number of difference pixels reaches a preset threshold, otherwise determining it as a failure.

[0043] The abnormal self-healing includes: when the operation verification fails, using OCR coordinate calibration self-healing and template matching self-healing mechanisms to correct the positioning coordinates and retry.

[0044] Preferably, the OCR coordinate calibration self-healing mechanism includes:

[0045] OCR recognition is performed by expanding the scanning range outward from the original coordinates, calculating the similarity between the recognized text and the expected label, and calculating the coordinate centroid based on the recognition results to generate corrected virtual keyboard and mouse commands.

[0046] Preferably, the anomaly self-healing also includes an intelligent pop-up detection and processing mechanism;

[0047] After each operation, the edge computing unit captures a full-screen image and uses a template matching algorithm to detect pop-up window features.

[0048] If a confirmation pop-up is detected, the "OK" button will be clicked automatically.

[0049] If an error-type pop-up is detected, click the close button and record the error before rolling back the thread;

[0050] If a waiting pop-up is detected, extend the timeout period and continue waiting.

[0051] Preferably, the video acquisition module adopts a bypass sampling architecture, including a video acquisition chip and an EDID storage chip;

[0052] The video acquisition chip converts the HDMI signal into a CSI-2 digital video stream and transmits it to the edge computing unit, while simultaneously transmitting the video signal to the display.

[0053] The EDID storage chip is used to store the extended display identifier data of the display, enabling the target host to identify that a standard display device is connected.

[0054] Preferably, the cloud platform includes a visual RPA process editing platform;

[0055] The platform provides a drag-and-drop workflow editor for generating JSON-formatted RPA scripts;

[0056] The platform provides a screen recording teaching mode, which automatically detects mouse click positions, OCR recognizes text and interface change time points by parsing the recorded screen video and keyboard and mouse event logs, and generates RPA script drafts.

[0057] Compared with the prior art, the beneficial effects of the present invention are:

[0058] 1. This invention utilizes a hardware-level USB HID priority arbitration mechanism, along with circuit-level signal monitoring and mutex locks, to prohibit virtual HID writing, reducing the probability of operation conflicts to below 0.01%. Compared to software solutions, this reduces the conflict rate by approximately 99%, achieving state switching of <10ms and physical input pass-through delay of <1ms. It features a fully automatic closed-loop control system: "Automatic Physical Input Detection → Automatic Interruption → Manual Pass-through Operation → Idle Detection → Automatic Recovery," eliminating the need for users to manually click "Pause" / "Continue" buttons and fundamentally solving the slow response problem of software solutions.

[0059] By combining operation verification, OCR re-recognition, and template matching technologies, automatic handling of abnormal situations such as interface changes and pop-up interference is achieved; the thread-granular interruption recovery mechanism eliminates the need to start from scratch after manual intervention, and only the current thread needs to be restored, which greatly improves the efficiency of collaboration.

[0060] 2. The terminal device of this invention connects to the physical link in a serial manner, appearing as a standard USB keyboard, mouse, and display device to the target host. It requires no drivers or software installation on the target host, offering extremely high compatibility and security, meeting the deployment requirements of high-security scenarios such as finance, government, and military industries where the installation of third-party software is prohibited. Furthermore, the hardware arbitration module, as an independent circuit system, does not depend on the target host's operating system and can still function normally and continuously collect data even under high host load or system malfunctions. Integrating video acquisition, OCR recognition, operation verification, and data uploading functions into a single terminal device achieves integrated functionality compared to traditional solutions requiring multiple software programs. Attached Figure Description

[0061] Figure 1 This is a block diagram illustrating the principle of the hardware arbitration module of this invention.

[0062] Figure 2 The system deployment topology diagram for this invention.

[0063] Figure 3 This is a flowchart of the operation verification and anomaly handling process of the present invention.

[0064] Figure 4 This is a timing diagram of human-machine collaborative work according to the present invention.

[0065] Figure 5 This is a structural diagram of the terminal device of the present invention. Detailed Implementation

[0066] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0067] Example 1

[0068] See Figures 1-5 This invention provides a non-intrusive human-machine collaborative control system based on RPA technology. It achieves physical input detection and virtual input switching with a delay of <10ms through hardware circuits, which solves the real-time conflict between RPA automation and manual operation. It is suitable for application fields such as bank counters, government service windows, industrial control, and remote operation and maintenance that require screen data acquisition, automated control, and operation recording in human-machine collaborative operation scenarios.

[0069] The system comprises a hardware arbitration module, an edge computing unit, a video capture module, and a cloud platform. The video capture module is connected in series in the video signal channel between the target host and the monitor, used to capture the screen image of the target host and transmit it to the edge computing unit. The edge computing unit is connected to the hardware arbitration module, the video capture module, and the cloud platform, respectively, used to execute automated tasks based on the screen image and send virtual keyboard and mouse commands to the hardware arbitration module. The cloud platform is used to issue RPA scripts to the edge computing unit and perform data management. When the hardware arbitration module detects physical keyboard and mouse input, it prioritizes transmitting the physical input to the target host and interrupts or disables the input of virtual keyboard and mouse commands; when the physical keyboard and mouse are detected to be idle, it resumes the input of virtual keyboard and mouse commands.

[0070] I. System Overall Architecture

[0071] like Figure 2 As shown, this invention adopts a three-layer collaborative architecture of "hardware arbitration + edge computing + cloud platform". The core design idea is to push the input detection and switching control, which have extremely high real-time requirements, down to the hardware circuit layer, while deploying the flexibly configurable automated execution, intelligent recognition, and anomaly handling at the edge computing layer, achieving the synergy of "millisecond-level response" and "intelligent execution". The terminal device adopts a non-intrusive serial deployment:

[0072] Hardware Connection: The physical keyboard and mouse are connected to the upstream port (USB Type-A female port) of the hardware arbitration module of the terminal device via a USB Type-A male connector. The downstream port (USB Type-A male connector) of the hardware arbitration module of the terminal device is connected to the USB interface of the target host. The HDMI output of the target host is connected to the input port of the video capture module of the terminal. The output port of the video capture module is connected to the monitor via an HDMI cable. The terminal device is connected to the remote server via an Ethernet interface.

[0073] Architecture layering:

[0074] Hardware layer: The core is the hardware arbitration module, which pushes real-time input detection and switching control down to the hardware circuit layer, responsible for millisecond-level input detection and switching, and achieves a response time of <10ms.

[0075] Edge layer: The core is the edge computing unit, which is responsible for automated execution, OCR recognition, logical judgment, operation verification, exception handling and instruction generation, providing intelligent capabilities.

[0076] Cloud layer: Provides RPA platform management, responsible for the visual configuration, distribution, and data storage and analysis of RPA scripts.

[0077] II. Hardware-level Human-Machine Arbitration Mechanism

[0078] like Figure 1As shown, the hardware arbitration module is connected in series in the USB connection channel between the physical keyboard and mouse and the target host. It is used to realize real-time detection, priority arbitration and conflict protection of physical input and virtual input at the hardware circuit level, which fundamentally solves the technical bottlenecks of high switching latency, operation conflict and need for manual intervention in the existing technology. The hardware arbitration module (in order of signal flow) consists of a physical input detection circuit, a dual-mode USB HID controller, a hardware arbitration state machine and a hardware mutex circuit.

[0079] (1) Physical input detection circuit:

[0080] The physical input detection circuit includes a USB differential signal level monitoring circuit and an HID report receive interrupt controller, used to monitor the USB communication status of the physical keyboard and mouse and trigger an interrupt when an HID report is detected. Specifically, the USB differential signal level monitoring circuit connects the USB D+ and D- signal lines to the comparator circuit through a high-impedance bypass. The comparator reference voltage is set to 0.4V (USB low-speed device threshold). When the D+ or D- level changes, the comparator outputs a high level. The HID report receive interrupt controller triggers an INT_EP1_IN interrupt when it receives a physical keyboard and mouse HID report on the uplink port of the dual-mode USB HID controller. When the user operates the physical keyboard and mouse, the interrupt signal is transmitted to the hardware arbitration state machine through the GPIO pin. The detection process is completed at the hardware circuit level, and the interrupt response time is <1ms.

[0081] (2) Dual-mode USB HID controller:

[0082] A USB HID controller chip (such as CH559T) is used to implement a Host+Device dual-port bridge. The dual-mode USB HID controller includes an uplink port and a downlink port. The uplink port operates in Host mode, connecting a physical keyboard and mouse via a USB Type-A female port to read physical HID reports. The downlink port operates in Device mode, sending HID reports to the target host via a USB Type-A male connector. The controller internally contains 256 bytes of SRAM as an HID report buffer, used to store HID reports from the physical keyboard and mouse or virtual HID reports generated by the edge computing unit. In pass-through mode, the physical HID report received by the uplink port is directly stored in the buffer and then forwarded to the host by the downlink port with zero modification, resulting in a latency of <1ms. In simulation mode, the hardware arbitration state machine writes the virtual HID report to the buffer, and the downlink port sends it to the host. The virtual HID report conforms to the USB HID 1.11 specification, making it difficult for the host to distinguish between the physical and virtual keyboard and mouse.

[0083] (3) Hardware arbitration state machine:

[0084] It is implemented using a main control microcontroller (such as STM32F407) in conjunction with a status register, timer circuit, and GPIO interrupt controller. The state machine maintains two states: transparent transmission mode and analog mode, with the initial state being transparent transmission mode.

[0085] The hardware arbitration state machine, connected to the physical input detection circuit, is used to switch between pass-through mode and analog mode based on interrupt signals. The hardware arbitration state machine switches to pass-through mode within 1ms of receiving an interrupt. When the physical input detection circuit triggers a hardware interrupt via the GPIO interrupt pin, the main control MCU responds to the interrupt with the highest priority, immediately switching the status register to pass-through mode. Simultaneously, it triggers the hardware mutex circuit to prevent virtual HID writing and sends a high-level interrupt signal to the edge computing unit via the GPIO output pin. At this time, the physical HID report received by the dual-mode controller's uplink port is directly forwarded by the USB controller hardware to the downlink port, and physical keyboard and mouse operations are passed through to the target host with zero latency.

[0086] Each time a physical input is detected, the state machine updates the last physical input time of the timer. When the timer circuit detects no physical input for 5 consecutive seconds, it triggers a timer interrupt. The state machine then determines that the user operation has been completed, switches to analog mode, triggers the hardware mutex circuit to allow virtual HID writing, and sends a recovery signal (low → high level transition) to the edge computing unit via the GPIO output pin, achieving fully automatic closed-loop control. The total delay of the entire state transition process is <10ms.

[0087] (4) Hardware mutex circuit:

[0088] A hardware mutex circuit, connected between the hardware arbitration state machine and the dual-mode USB HID controller, physically prevents virtual HID report writing to the controller buffer in pass-through mode and allows virtual HID report writing in analog mode. The hardware mutex circuit is implemented using a 74HC74 D flip-flop. The data input of the D flip-flop is connected to the mode bit of the state register of the hardware arbitration state machine, the clock input is connected to the state switching signal, and the output is connected to the write enable pin of the dual-mode USB HID controller. In pass-through mode, the D flip-flop outputs a low level to prevent virtual HID writing; in analog mode, the D flip-flop outputs a high level to allow virtual HID writing. When a physical input is detected, the state machine immediately switches to pass-through mode and physically blocks the virtual HID write channel through the hardware mutex circuit composed of the 74HC74 D flip-flops. Since the state switching time of the D flip-flop is <10ns, this hardware-level mutual exclusion mechanism ensures that the virtual HID write channel is prohibited in pass-through mode from a physical circuit level, effectively reducing the probability of conflict between physical and virtual inputs.

[0089] In summary, the signal transmission path is: "Physical keyboard and mouse → Dual-mode controller uplink port → Physical input detection circuit (bypass monitoring) → Hardware arbitration state machine (mode determination) → Dual-mode controller downlink port → Target host". The state machine interacts with the dual-mode USB HID controller via the SPI bus to read and write HID reports, sends interrupt / recovery signals to the edge computing unit via GPIO output pins, receives virtual keyboard and mouse commands from the edge computing unit via the UART interface, and controls the hardware mutex circuit via GPIO output pins.

[0090] III. Intelligent Execution and Self-Healing Mechanism

[0091] The edge computing unit employs an embedded processor (such as the Rockchip RK3566, an ARM Cortex-A55 quad-core 1.8GHz), 2GB of LPDDR4 memory, and 16GB of eMMC storage, running a lightweight Linux system to achieve intelligent RPA execution. The edge computing unit is located inside the terminal and connected via a PCB circuit board. To the target host, the terminal appears as a standard USB keyboard, mouse, and display device, requiring no driver or software installation.

[0092] The edge computing unit is equipped with a thread-granular process management module: the edge computing unit divides the RPA process into multiple independent thread units, each thread containing a start node and an end node. Each thread executes serially and independently starts its OCR service without sharing recognition results. When manual operation triggers an interruption in the hardware arbitration state machine, the edge computing unit terminates the current thread, clears the virtual keyboard and mouse command queue, and records the interrupted thread ID. When the hardware arbitration state machine sends a recovery signal, the edge computing unit does not need to record complex intermediate states such as variable values, loop counters, execution positions, etc. It directly restarts the thread from the start node corresponding to the interrupted thread ID and re-recognizes the current screen state through OCR, adapting to possible interface modifications after manual intervention.

[0093] Specifically: ① Interrupt response mechanism: When the GPIO interrupt input pin of the edge computing unit detects a high-level interrupt signal from the hardware arbitration module, the following sequence of operations is immediately executed: terminating the currently executing RPA thread subprocess (sending a SIGKILL signal), clearing the virtual keyboard and mouse instruction queue in the UART transmit buffer to prevent residual instruction transmission, recording the interrupted thread ID to a global variable, and switching the system to the human-machine interaction detection state to stop generating new virtual instructions. The entire interrupt response process is completed within 5ms.

[0094] ② Execution Resumption Mechanism: When the edge computing unit detects a low-to-high level transition on the GPIO recovery signal pin, it resumes the execution context from the interrupted thread ID and restarts the child process of that thread to resume execution from the thread's start point. The restarted thread will then re-invoke the OCR module to recognize the current screen state, automatically adapting to any interface modifications the user may have made during manual operation, such as modifying form fields, closing pop-ups, or switching pages, and then continue generating virtual keyboard and mouse commands.

[0095] ③ Granularity control: Users can independently set the process scope of each thread in the RPA platform, from the start node to the end node. By reasonably dividing the thread granularity, the scope of repeated execution after interruption can be controlled. For example, "filling in customer information form" can be set as one thread and "uploading attachments" as another thread. In this way, if the user temporarily takes over and modifies a field during the form filling process, the system only needs to re-execute the "filling in form" thread without affecting the completed preceding operations or subsequent independent operations.

[0096] The edge computing unit is also equipped with an operation verification and anomaly self-healing module;

[0097] ① Screenshot comparison and verification mechanism before and after operation: Capture specific expected change areas of the screen image before and after performing virtual keyboard and mouse operation, use OpenCV to compare and calculate the pixel difference of the screen screenshot before and after operation. If the number of difference pixels reaches the preset threshold, the operation is judged to be successful; otherwise, it is judged to be failed and the self-healing mechanism is triggered.

[0098] Before executing virtual keyboard and mouse operations, the edge computing unit reads the current video frame from the CSI-2 interface. Based on the `region` parameter in the verification configuration, it extracts the expected change area, such as the button area or text box area, and stores it in memory. After executing the virtual operation and waiting for a preset time (e.g., 500ms), it extracts the same area again, uses OpenCV functions to calculate pixel-level differences, and counts the number of changed pixels. If the number of changed pixels reaches or exceeds a preset threshold, the operation is considered successful and the next step continues. If the number of changed pixels is less than the preset threshold, the operation verification is considered failed, and an exception handling mechanism is triggered.

[0099] For different types of operations, this invention adopts an adaptive threshold mechanism: the threshold for clicking a button is usually set to 50-100 pixels to detect changes in button highlighting or focus; the threshold for inputting text is usually set to 200 pixels or more to detect changes in the content of the text box; and the threshold for opening a window or pop-up is usually set to 5000 pixels or more to detect changes in a large area of ​​the screen.

[0100] ② Multi-level anomaly detection and processing system: OCR coordinate calibration self-healing and template matching self-healing mechanisms are used to correct positioning coordinates. Positioning coordinates are automatically corrected through expanding the scanning range, fuzzy matching, and multi-scale template matching, and retrying is performed. Specifically, OCR recognition is performed by expanding the scanning range outward from the original coordinates, calculating the similarity between the recognized text and the expected label, and calculating the coordinate centroid based on the recognition results to generate corrected virtual keyboard and mouse commands.

[0101] After each RPA step, the system automatically checks the execution result, and immediately triggers the corresponding handling strategy upon detecting an anomaly. For different anomaly types, this invention employs a differentiated hierarchical self-healing strategy: for OCR recognition failure, a three-level degradation process is used: "retry 3 times locally → upload image to cloud OCR → skip step if it fails"; for operation verification failure, a retry-rollback strategy is used: "retry operation 3 times → roll back to thread start if it fails"; for network interruption, an offline fault-tolerance mechanism is used: "cachate data to local eMMC → check network in the background → retransmit after recovery". This ensures process continuity while improving the self-healing success rate in abnormal situations.

[0102] ③ Intelligent pop-up detection and processing mechanism; After each operation, the edge computing unit captures a full-screen image and uses a self-developed algorithm based on the OpenCV matchTemplate algorithm to detect common pop-up features: automatically detects and classifies pop-ups such as "OK", "Error", and "Loading" to avoid the process being stuck due to unexpected pop-ups. The template matching algorithm is used to detect pop-up features.

[0103] Specifically, if a confirmation pop-up such as "OK" or "Cancel" button image is detected, the OK button is clicked automatically; if an error pop-up such as "Error" or "Failure" text is detected, the close button is clicked, the error is recorded, and the thread is rolled back; if a waiting pop-up such as "Loading" or "Please wait" text is detected, the timeout period is extended and the thread continues to wait.

[0104] Abnormal situations and their handling results are recorded in local log files and uploaded to a remote server via Ethernet for statistical analysis. The log content includes the exception type, trigger time, current execution steps, number of retries, final handling result, and screenshots of the interface when the exception occurred.

[0105] IV. Video Acquisition and Cloud Platform

[0106] The video capture module employs a bypass sampling architecture, deployed in series between the host and the monitor. It captures screen images via HDMI / DisplayPort / VGA. Bypass sampling avoids interference with the host and monitor signals and does not consume host GPU bandwidth. It supports common resolutions (e.g., 1920×1080@60fps) and video data formats of YUV422 or RGB888.

[0107] The video acquisition module includes a video acquisition chip and an EDID storage chip. The video acquisition chip converts the HDMI signal into a CSI-2 digital video stream and transmits it to the edge computing unit for OCR recognition and operation verification, while also transmitting the video signal to the display. The EDID storage chip is used to store the extended display identification data of the display, enabling the target host to recognize that a standard display device is connected.

[0108] The cloud platform includes a visual RPA workflow editing platform (deployed on a remote server, providing workflow configuration and management).

[0109] (1) The platform provides a drag-and-drop process editor. The Web interface (React front-end + Spring Boot back-end) allows users to drag and drop atomic operation components (mouse click, keyboard input, image template matching, OCR recognition, condition judgment, loop, etc.) to build a linear process. After configuring the parameters of each component, a JSON format RPA script is generated and sent to the terminal device via the MQTT protocol. It supports dividing the process by thread granularity and configuring the start and end nodes of each thread. (2) The platform provides a screen recording teaching mode. Screen videos (H.264 encoding) and keyboard and mouse event logs are recorded and uploaded to HDFS. The algorithm module (Python + OpenCV) automatically parses them. By parsing the recorded screen videos and keyboard and mouse event logs, the platform automatically detects mouse click positions, uses OCR to recognize text as positioning markers, converts keyboard input content into text, and automatically inserts waiting steps when the interface changes. It generates an RPA script draft for users to review and modify.

[0110] The system then uses MySQL to store OCR recognition results, task status, and execution logs, and HDFS to store video streams, screen recordings, and verification screenshots. Built-in algorithms analyze task execution success rates, average execution times, and anomaly type distributions across various terminal devices, generating visual reports.

[0111] In summary, this invention overcomes the technical limitations of existing software RPA solutions that rely on operating system message queue polling, reducing detection latency from 100-1000ms to <10ms, resulting in a 10-100 times performance improvement. Furthermore, compared to software RPA solutions that require client installation on the target host, this invention uses a serial deployment architecture, appearing as a standard USB HID device and HDMI display device to the target host. Focusing on verifying the actual execution effect of virtual operations through pixel-level comparison of screenshots before and after the operation (compared to traditional software RPA without a verification mechanism), the single-step operation success rate is increased from approximately 85% to over 95%. A detection and handling mechanism covering multiple anomaly types, including OCR recognition failure, operation verification failure, network interruption, and abnormal interface pop-ups, is constructed. A hierarchical processing strategy of "retry → degradation → rollback → termination" is adopted, increasing the process success rate in unattended scenarios from approximately 70% to over 90%. The thread-granular interrupt recovery method automatically adapts to user modifications to the interface through re-OCR recognition, simplifying state management complexity.

[0112] Through the above-mentioned hardware and software co-design, this invention achieves efficient, stable, and intelligent human-machine collaborative control, which is particularly suitable for automation scenarios with high requirements for real-time performance and security.

[0113] Example 2

[0114] Using a bank teller handling business as an example, this illustrates the complete human-machine collaboration process.

[0115] Assume the automated process has completed ID card recognition and customer information query (Thread_1) and is currently executing form filling (Thread_2). Subsequent submission confirmation is required (Thread_3). During Thread_2, the teller discovers a field needs modification and directly edits it using the mouse.

[0116] Phase 1: Automated Execution Phase

[0117] The hardware arbitration module operates in analog mode, while the edge computing unit's automated execution engine runs the Thread_2 subprocess. This subprocess, after identifying the current form field position via the OCR module, generates a virtual keyboard and mouse command sequence (moving the mouse to field coordinates, clicking to activate a field, entering text, etc.). These commands are sent to the hardware arbitration module via the UART interface. The hardware arbitration state machine checks the status register to confirm analog mode, checks that the Q output of the hardware mutex circuit is high (allowing writing), converts the virtual commands into the standard USB HID report format, writes it to the dual-mode USB HID controller's buffer via the SPI interface, and finally sends the HID report to the target host via the downlink port.

[0118] Phase Two: Physical Input Detection and Rapid Switching

[0119] Let time T1 be the moment when the teller picks up the mouse and touches it to generate physical input.

[0120] T1+1ms: The USB differential signal monitoring section of the physical input detection circuit captures a change in the D+ / D- signal level. The HID report receive interrupt controller detects the arrival of a new HID report and immediately triggers a hardware interrupt signal to the hardware arbitration state machine via the GPIO pin.

[0121] T1+2ms: The main MCU of the hardware arbitration state machine responds to the GPIO interrupt. The interrupt service routine immediately executes the following atomic operations: switches the status register to pass-through mode, triggers the D flip-flop of the hardware mutex circuit to set the Q output to low level to prevent virtual HID writing, and sends a high-level interrupt signal to the edge computing unit through the GPIO output pin.

[0122] T1+5ms: The GPIO interrupt input pin of the edge computing unit detects a high level. The interrupt handler immediately sends a SIGKILL signal to forcibly terminate the Thread_2 child process, clears the queue of unsent virtual instructions in the UART transmit buffer, writes the interrupted thread ID (Thread_2) to global shared memory, switches the system state to human-machine interaction detection state, and stops generating new virtual instructions.

[0123] T1+10ms: The teller has taken over control. At this point, the mouse response is basically the same as that of the directly connected target host (latency <1ms).

[0124] See appendix Figure 4 The time T1 in the human-machine collaborative work timing diagram shows the time series of physical input detection.

[0125] Phase Three: Manual Takeover Phase

[0126] The teller completes the operation using a physical mouse and keyboard: moving the mouse to locate the form field to be modified, clicking to activate the field, deleting incorrect content, entering the correct content, and clicking the next field to confirm the modification. During this period, the hardware arbitration module remains in pass-through mode, and all physical HID reports are directly forwarded to the target host via the dual-mode controller hardware, with a latency of <1ms. The edge computing unit is in standby mode, pausing the generation of virtual commands, but the video capture module continues to capture screen images and cache the latest frames for OCR recognition during subsequent recovery.

[0127] Phase Four: Idle Detection and Intelligent Judgment

[0128] When the teller releases the mouse and keyboard after making changes and no new physical input is generated, the intelligent judgment mechanism of the hardware arbitration state machine is activated. For 5 consecutive seconds, the timer circuit continuously monitors the last timestamp of the physical input, checking the difference between the current time and the last physical input time every 100ms. The hardware arbitration module maintains a transparent transmission mode to ensure that if the teller operates the keyboard and mouse again within 5 seconds, it can still respond immediately.

[0129] After 5 consecutive seconds of no physical input, the timer interrupt is triggered, the hardware arbitration state machine determines that the teller's operation has been completed, and the main control MCU executes the state switching sequence: switching the state register to analog mode, triggering the D flip-flop of the hardware mutex circuit to set the Q output to a high level to allow virtual HID writing, and sending a recovery signal (low → high level transition) to the edge computing unit through the GPIO output pin.

[0130] Phase 5: Intelligent Recovery and Adaptive Reboot

[0131] The recovery mechanism is triggered when the GPIO recovery signal input pin of the edge computing unit detects a low-to-high level transition. The GPIO detection response latency based on hardware interrupts is less than 100μs, while in non-real-time operating system environments, the response latency of traditional software polling schemes can reach 1ms–500ms. The hardware interrupt scheme improves the response speed by more than three orders of magnitude and does not require continuous CPU polling overhead.

[0132] The system reads the interrupted thread ID (Thread_2) from the global shared memory and loads the thread's configuration information, including the start node, execution step sequence, OCR recognition configuration, and operation verification configuration. The system restarts the child process of Thread_2 from its start node (start_node). The restarted Thread_2 child process first calls the OCR recognition module to perform a complete recognition of the current screen. During manual intervention, tellers may modify form fields, close pop-ups, or switch pages; these interface changes are captured by re-performing OCR recognition. Existing edge OCR solutions have a single recognition processing time of approximately 200ms, with an accuracy rate exceeding 99% in standard scenarios. After recognition, the child process regenerates the virtual keyboard and mouse command sequence based on the current actual interface state and thread configuration logic, and sends it to the hardware arbitration module via the UART interface. For example, at a baud rate of 115200, the transmission time for a 20-byte command packet is approximately 1.7ms, which is suitable for real-time on-site operations.

[0133] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A non-intrusive human-machine collaborative control system based on RPA technology, characterized in that, It includes a hardware arbitration module, an edge computing unit, a video acquisition module, and a cloud platform; The hardware arbitration module is connected in series in the USB connection channel between the physical keyboard and mouse and the target host, and is used to realize real-time detection, priority arbitration and conflict protection of physical input and virtual input; The video acquisition module is connected in series in the video signal channel between the target host and the display, and is used to acquire the screen image of the target host and transmit it to the edge computing unit; The edge computing unit is connected to the hardware arbitration module, the video acquisition module and the cloud platform respectively, and is used to execute automated tasks according to the screen display and send virtual keyboard and mouse commands to the hardware arbitration module. The cloud platform is used to distribute RPA scripts to edge computing units and manage data. When the hardware arbitration module detects physical keyboard and mouse input, it prioritizes transmitting the physical input to the target host and interrupts or disables the input of virtual keyboard and mouse commands; when it detects that the physical keyboard and mouse are idle, it resumes the input of virtual keyboard and mouse commands.

2. The non-intrusive human-machine collaborative control system based on RPA technology according to claim 1, characterized in that, The hardware arbitration module includes a physical input detection circuit, a dual-mode USB HID controller, a hardware arbitration state machine, and a hardware mutex circuit. The physical input detection circuit is used to monitor the USB communication status of the physical keyboard and mouse, and triggers an interrupt when an HID report is detected. The dual-mode USB HID controller includes an uplink port and a downlink port. The uplink port is used to connect a physical keyboard and mouse, and the downlink port is used to connect to a target host. The hardware arbitration state machine is connected to the physical input detection circuit and is used to switch between transparent transmission mode and analog mode according to the interrupt signal. The hardware mutex circuit is connected between the hardware arbitration state machine and the dual-mode USB HID controller. It is used to physically prevent the virtual HID report from being written to the controller buffer in transparent mode and to allow the virtual HID report to be written in analog mode.

3. The non-intrusive human-machine collaborative control system based on RPA technology according to claim 1, characterized in that, The physical input detection circuit includes a USB differential signal level monitoring circuit and an HID report receive interrupt controller; The USB differential signal level monitoring circuit is connected to the comparator circuit via a high-impedance bypass to the USB D+ and D- signal lines. The HID report receive interrupt controller triggers an INT_EP1_IN interrupt when the dual-mode USB HID controller receives a physical keyboard and mouse HID report; The hardware arbitration state machine switches to transparent transmission mode within 1ms after receiving an interrupt.

4. The non-intrusive human-machine collaborative control system based on RPA technology according to claim 1, characterized in that, The hardware mutex circuit is implemented using a D flip-flop. The data input terminal of the D flip-flop is connected to the mode bit of the state register of the hardware arbitration state machine, the clock input terminal is connected to the state switching signal, and the output terminal is connected to the write enable pin of the dual-mode USB HID controller. When in pass-through mode, the D flip-flop outputs a low level to disable virtual HID writing; when in analog mode, the D flip-flop outputs a high level to enable virtual HID writing.

5. The non-intrusive human-machine collaborative control system based on RPA technology according to claim 1, characterized in that, The edge computing unit is configured with a thread-granular process management module; The edge computing unit divides the RPA process into multiple independent thread units, each thread containing a start node and an end node; When the hardware arbitration state machine triggers an interrupt, the edge computing unit terminates the current thread, clears the virtual keyboard and mouse instruction queue, and records the ID of the interrupted thread. When the hardware arbitration state machine sends a recovery signal, the edge computing unit resumes execution of the thread from the starting node corresponding to the interrupted thread ID and re-identifies the current screen state through OCR.

6. The non-intrusive human-machine collaborative control system based on RPA technology according to claim 1, characterized in that, The edge computing unit is also equipped with an operation verification and anomaly self-healing module; The operation verification includes: capturing a specific area of ​​the screen image before and after performing virtual keyboard and mouse operations, calculating the pixel difference, and determining the operation as successful if the number of difference pixels reaches a preset threshold, otherwise determining it as a failure. The abnormal self-healing includes: when the operation verification fails, using OCR coordinate calibration self-healing and template matching self-healing mechanisms to correct the positioning coordinates and retry.

7. The non-intrusive human-machine collaborative control system based on RPA technology according to claim 1, characterized in that, The OCR coordinate calibration self-healing mechanism includes: OCR recognition is performed by expanding the scanning range outward from the original coordinates, calculating the similarity between the recognized text and the expected label, and calculating the coordinate centroid based on the recognition results to generate corrected virtual keyboard and mouse commands.

8. The non-intrusive human-machine collaborative control system based on RPA technology according to claim 1, characterized in that, The abnormal self-healing also includes an intelligent pop-up detection and processing mechanism; After each operation, the edge computing unit captures a full-screen image and uses a template matching algorithm to detect pop-up window features. If a confirmation pop-up is detected, the "OK" button will be clicked automatically. If an error-type pop-up is detected, click the close button and record the error before rolling back the thread; If a waiting pop-up is detected, extend the timeout period and continue waiting.

9. The non-intrusive human-machine collaborative control system based on RPA technology according to claim 1, characterized in that, The video acquisition module adopts a bypass sampling architecture, including a video acquisition chip and an EDID storage chip; The video acquisition chip converts the HDMI signal into a CSI-2 digital video stream and transmits it to the edge computing unit, while simultaneously transmitting the video signal to the display. The EDID storage chip is used to store the extended display identifier data of the display, enabling the target host to identify that a standard display device is connected.

10. The non-intrusive human-machine collaborative control system based on RPA technology according to claim 1, characterized in that, The cloud platform includes a visual RPA workflow editing platform; The platform provides a drag-and-drop workflow editor for generating JSON-formatted RPA scripts; The platform provides a screen recording teaching mode, which automatically detects mouse click positions, OCR recognizes text and interface change time points by parsing the recorded screen video and keyboard and mouse event logs, and generates RPA script drafts.