Browser control method, concurrent task execution method, equipment and medium
By creating named pipes based on unique IDs and channel names between the RPA console and browser instances, the problems of inaccurate browser instance control and high latency in existing technologies are solved, enabling efficient and stable automated execution of online banking tasks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUJIAN HUADIAN FURUI ENERGY DEVELOPMENT CO LTD
- Filing Date
- 2025-12-25
- Publication Date
- 2026-05-26
Smart Images

Figure CN122086591A_ABST
Abstract
Description
Technical Field
[0001] This application relates to, but is not limited to, the technical field of automating online banking tasks, and particularly to a method for controlling a browser, a method for concurrently executing tasks, a device, and a medium. Background Technology
[0002] With the development of Machine Process Automation (RPA), RPA can simulate human user operations and automatically perform repetitive tasks. Due to its advantages in financial information scenarios such as centralized management of enterprise online banking keys and concurrent processing of multiple accounts, RPA is increasingly widely used in automating online banking tasks. Existing RPA consoles control each browser instance through remote debugging protocols or browser extension interfaces provided by the browser instance. Specifically, the RPA console needs to encapsulate each simulated command from a mouse click or keyboard input, carrying a specific logical identifier in the encapsulated data. This encapsulated data is then transmitted through a shared channel (such as WebSocket for remote debugging or the IPC interaction module of a browser extension interface). The central distributor relies on the logical identifier within the data packet for parsing and routing, thus sending the data to the browser instance. During this data transmission process, serialization, deserialization, context switching, and queuing all consume time, resulting in high latency in the delivery of task instructions to the RPA console. At the same time, in high-concurrency dynamic scenarios, if window handle management malfunctions (such as unexpected window closure or identifier changes due to new window creation) or task instructions are blocked, RPA console instructions may be sent to the wrong browser instance, making it impossible for the RPA console to accurately control the browser instance and failing to meet the requirements for automated execution of online banking tasks. Summary of the Invention
[0003] This application provides a method for controlling a browser, a method for concurrently executing tasks, a device, and a medium that can meet the requirements for automated execution of online banking tasks.
[0004] In a first aspect, embodiments of this application provide a method for controlling a browser, applied to a controller, comprising: The RPA console calls the CEF multi-process management module to create an instance based on the number of online banking tasks, and obtains the browser instance and the ID corresponding to the browser instance. Create a named pipe between the RPA console and the browser instance based on the ID and channel name; The RPA console sends the task instructions corresponding to the online banking task to the corresponding browser instance through the named pipe for control.
[0005] Secondly, embodiments of this application provide a method for concurrently executing tasks, including: The browser instance receives task instructions corresponding to the online banking task from the RPA console through named pipes, wherein the task instructions include initialization instructions and online banking business operation instructions; The browser instance completes the initialization configuration based on the initialization command; After initialization, the browser instance, based on the online banking operation instructions, invokes the Chromium rendering engine and JavaScript engine, and coordinates with the key management platform to automatically execute the corresponding online banking operation, obtain the operation result, and feed the operation result back to the RPA console through the named pipe. Thirdly, an electronic device provided according to an embodiment of this application includes: At least one processor; At least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the browser control method as described in any of the first aspects or the concurrent task execution method as described in any of the second aspects is implemented.
[0006] Fourthly, according to the embodiments of the application, a computer-readable storage medium is provided, storing computer-executable instructions, which are used to execute the browser control method as described in any of the first aspects or the concurrent task execution method as described in any of the second aspects.
[0007] In summary, the above embodiments of this application include: the RPA console calls the CEF multi-process management module to create an instance based on the number of online banking tasks, obtaining a browser instance and its corresponding ID; a named pipe is created between the RPA console and the browser instance based on the ID and channel name; the RPA console sends task instructions corresponding to the online banking task to the corresponding browser instance for control through the named pipe. This embodiment first creates a dedicated named pipe between the RPA console and the browser instance based on their unique ID and channel name, constructing an independent point-to-point data transmission channel between them; then, the RPA console directly addresses the named pipe using its unique identifier ID and pipe name, and the task instructions are directly delivered from the RPA console to the browser instance through the dedicated named pipe. This ensures accurate delivery of instructions to the corresponding browser instance from the physical communication level, enabling accurate control of the browser instance. It skips the central distributor and multiple IPC forwarding steps within the browser in existing technologies, reducing task instruction transmission latency and achieving instance-level isolation for faults and blockages, thereby meeting the requirements for automated execution of online banking tasks. Attached Figure Description
[0008] Figure 1 This is a flowchart of the steps of a method for controlling a browser provided in one embodiment of this application; Figure 2 This is a flowchart illustrating the steps of a method for concurrently executing tasks according to an embodiment of this application; Figure 3 This is a hardware schematic diagram of an electronic device provided in one embodiment of this application. Detailed Implementation
[0009] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0010] It is understandable that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, or the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0011] With the development of Machine Process Automation (RPA), RPA can simulate human user operations and automatically perform repetitive tasks. Due to its advantages in financial information scenarios such as centralized management of enterprise online banking keys and concurrent processing of multiple accounts, RPA is increasingly widely used in automating online banking tasks. Existing RPA consoles control each browser instance through remote debugging protocols or browser extension interfaces provided by the browser instance. Specifically, the RPA console needs to encapsulate each simulated command from a mouse click or keyboard input, carrying a specific logical identifier in the encapsulated data. This encapsulated data is then transmitted through a shared channel (such as WebSocket for remote debugging or the IPC interaction module of a browser extension interface). The central distributor relies on the logical identifier within the data packet for parsing and routing, thus sending the data to the browser instance. During this data transmission process, serialization, deserialization, context switching, and queuing all consume time, resulting in high latency in the delivery of task instructions to the RPA console. At the same time, in high-concurrency dynamic scenarios, if window handle management malfunctions (such as unexpected window closure or identifier changes due to new window creation) or task instructions are blocked, RPA console instructions may be sent to the wrong browser instance, making it impossible for the RPA console to accurately control the browser instance and failing to meet the requirements for automated execution of online banking tasks.
[0012] Based on this, embodiments of this application provide a method for controlling a browser, a method for concurrently executing tasks, a device, and a medium that can meet the requirements for automated execution of online banking tasks.
[0013] For example, in this embodiment, a dedicated named pipe is first created between the RPA console and the browser instance based on their unique ID and channel name, thus constructing an independent point-to-point data transmission channel between the RPA console and the browser instance. Then, the RPA console directly addresses the named pipe using its unique identifier ID and pipe name. Task instructions are sent directly from the RPA console to the browser instance through the dedicated named pipe. This ensures that instructions are accurately delivered to the corresponding browser instance at the physical communication level to accurately control the browser instance. By skipping the central distributor and multiple IPC forwarding steps within the browser in the prior art, the latency of task instruction transmission can be reduced while achieving instance-level isolation for faults and blockages, thereby meeting the requirements for automated execution of online banking tasks.
[0014] This application provides a method for controlling a browser instance, applied to a controller, as described below. Figure 1 As shown, including but not limited to the following steps: In step S100, the RPA console calls the CEF multi-process management module to create an instance based on the number of online banking tasks, and obtains the browser instance and the ID corresponding to the browser instance.
[0015] For example, the RPA console first parses the online banking tasks to be executed to determine the number of tasks that need to be executed concurrently (e.g., processing the download of bills from 5 different banks simultaneously). Then, the console sends an instruction to the instance management module in the middleware layer to create the corresponding number of browser instances. For each instance to be created, the instance management module initializes it using preset initialization parameters, including window information (CefWindowInfo) and a client handler object with the built-in CefClient interface. The window information defines the properties of the new browser window, usually set as a child window of a parent window managed by the RPA console, or directly creates an independent top-level window. The client handler is a custom object that inherits from CEF's CefClient and implements functions such as CefLifeSpanHandler and CefLoadHandler. Upon receiving the callback interface, the handler object is bound to the lifecycle of the browser instance, responsible for handling all events specific to that instance, such as loading status and certificate selection requests (OnSelectClientCertificate). Next, the instance management module, in the application's UI main thread, repeatedly calls the CEF core creation function CefBrowserHost::CreateBrowserSync(). Each call passes in window information and the client handler. Upon receiving the request, the CEF underlying layer (multi-process management module) starts a new browser process and creates an independent rendering process for the first tab within that process, thus completing the construction of a complete browser instance. Simultaneously, a unique system-level window handle (HWND) is assigned to the browser instance, which is the ID corresponding to the browser instance. This embodiment leverages CEF's process isolation advantage, enabling each browser instance to correspond to an independent rendering process, achieving process-level isolation and improving the stability of concurrent online banking tasks.
[0016] For example, in this application embodiment, the Electron framework can be used instead of CEF4Delphi, and the communication between the RPA console and the browser example can be realized through Node.js. Process isolation and concurrent instance management can also be achieved, and it can be adapted to the JavaScript development environment.
[0017] Step S110: Create a named pipe between the RPA console and the browser instance based on the ID and channel name.
[0018] For example, the browser instance, acting as a server, calls the API of the operating system running the controller to create a named pipe based on the browser instance's ID, channel name, and other parameters such as pipe access mode and buffer size. After the named pipe is successfully created, the browser instance calls functions such as ConnectNamedPipe and enters a waiting state, listening for connection requests from the RPA console (client).
[0019] Understandably, the existing data link for controlling browser instances from an RPA console is: RPA console -> shared channel -> central dispatcher -> browser instance, resulting in high latency in RPA control command transmission. This application's embodiment reduces RPA control command transmission latency by constructing a direct named pipe between the RPA console and the browser instance, eliminating the need for an additional central dispatcher.
[0020] Understandably, in conventional RPA or inter-process communication designs, named pipes are typically used as a shared, universal communication channel. If named pipes were directly used as the communication method between the RPA console and browser instances, all browser instances might be connected to a named pipe named \\.\pipe\MyRPAPipe. When the RPA console sends control commands, all commands flood into the same shared pipe. However, serial transmission of multiple commands in the same pipe can lead to contention and blocking. Furthermore, the processing power and stability of the central dispatcher directly constrain the concurrency performance and reliability of the entire system, posing a risk of process conflicts. This application addresses this by creating a dedicated named pipe for each browser instance based on its unique ID and channel name. This establishes an independent point-to-point data transmission channel between the RPA console and browser instances, allowing commands to reach the target instance precisely without passing through a common queue and central dispatcher. This completely avoids multi-path contention, achieves instance-level isolation for faults and blocking, and significantly reduces the risk of process conflicts.
[0021] For example, the embodiments of this application use Socket communication instead of named pipes to distinguish concurrent browser instances by IP and port. The core principle is the same as pipe communication, only the communication carrier is different. It is suitable for cross-network concurrency management scenarios, and will not be elaborated here.
[0022] In some instances, creating named pipes between the RPA console and browser instance based on ID and channel name involves: determining the pipe type based on the controller's runtime environment; generating a pipe path name by concatenating the ID and channel name based on the runtime environment; and the RPA console calling the system API corresponding to the runtime environment to create the named pipe based on the pipe type and pipe path name.
[0023] For example, in a Windows-based controller environment, a browser instance acting as a server (or a middleware module serving it) calls an API to create a named pipe. Specifically, taking \\.\pipe\RPABrowserCommunication_12345 as an example, the ID and \\.\pipe\RPABrowserCommunication_12345 are first concatenated to obtain the pipe pathname. Then, the CreateNamedPipe function is called, passing the pipe pathname, access mode (PIPE_ACCESS_DUPLEX supports bidirectional communication), pipe mode, buffer size, and other pipe parameters. The CreateNamedPipe function creates a pipe file named after the pipe pathname based on the passed data, thus completing the creation of the named pipe.
[0024] Understandably, after a named pipe is successfully created, the browser instance calls the ConnectNamedPipe function to put the pipe into a listening state, waiting for a connection from the RPA console (client). The RPA console, acting as a client, uses WaitNamedPipe to wait for the pipe to become available, and then calls the CreateFile function to open the pipe with that specific name in write or read-write mode, thereby establishing a connection. After the connection is established, both parties can use the ReadFile and WriteFile functions to read and write instructions (in JSON format) and results through the pipe.
[0025] For example, in a Linux-based controller environment, the browser instance is also responsible for creating the named pipe (FIFO). Specifically, taking the channel name / tmp / RPABrowserCommunication_1001 as an example, the ID and / tmp / RPABrowserCommunication_1001 are first concatenated to obtain the pipe pathname. Then, based on the mkfifo() system call or the mkfifo command, the generated pipe pathname and permission mode (such as 0666) are passed in to create the FIFO file, i.e., the named pipe.
[0026] In some embodiments, generating a pipeline path name by concatenating the ID and channel name based on the runtime environment includes: checking whether the historical pipeline corresponding to the pipeline path name exists; if the historical pipeline exists, deleting the historical pipeline or generating a pipeline path name based on the ID, channel name, and timestamp.
[0027] For example, first check if the historical pipe file corresponding to the pipe path name exists. If it exists, then use commands such as fuser to verify if any process is using this pipe. If it is confirmed that the historical pipe is not occupied by any process, delete it (e.g., using the rm command) to clean up resources. Otherwise, if the pipe is still in use, to avoid conflicts, the deletion operation will not be performed. Instead, a brand new and unique pipe path name will be dynamically generated based on the ID, channel name and current timestamp, thereby ensuring that the creation of the new pipe will not fail and maintaining the independence and uniqueness of each instance's communication channel.
[0028] In step S120, the RPA console sends the task instructions corresponding to the online banking task to the corresponding browser instance for control via named pipes.
[0029] For example, taking the online banking task of logging into a bank and downloading transaction records as an example, the RPA console can control the task by sending the corresponding task instructions to the corresponding browser instance through named pipes through the following steps: (I) The RPA console first breaks down the process of logging into the bank and downloading transaction records into a series of atomic online banking operation instructions, such as navigating to the login page, entering the username, entering the password, clicking the login button, and performing transactions and inquiries. These operations are encapsulated into structured task instructions. Specifically, lightweight data exchange formats such as JSON are used as the format for the task instructions. Each instruction explicitly includes the target function name, the target browser tab handle (tabId), the location information of the web page elements (such as XPath or CSS selectors), and the parameters required for the operation, forming a command sequence that can be precisely parsed by the machine.
[0030] (ii) The RPA console does not broadcast task instructions to a shared channel. Instead, it calls operating system APIs (CreateFile and WriteFile in Windows) to dynamically construct a named pipe name specific to the browser instance based on the unique ID (i.e., window handle) of the target browser instance. This name directly corresponds to a specific browser instance process, and the console actively connects to the named pipe server created by the browser instance. After the connection is established, the RPA console writes the encapsulated structured task instructions directly through this named pipe. Since the pipe is a bidirectional communication channel, the RPA console can also synchronously receive execution status feedback from the browser instance.
[0031] Understandably, task instructions are delivered directly from the RPA console to the target browser instance via a dedicated named pipe, bypassing the central distributor and multiple IPC forwarding steps within the browser as in existing solutions, significantly reducing instruction delivery latency. Furthermore, each browser instance in this embodiment has an independent named pipe. The RPA console directly addresses the browser instance using the unique identifier ID and pipe name, ensuring 100% accurate delivery of instructions to the corresponding browser instance at the physical communication level. This completely avoids the race conditions, blocking, and mismatches that can occur when multiple instructions are transmitted serially in a single shared pipe. Moreover, due to the strict one-to-one correspondence between named pipes and browser instances, a physical USB key (managed via a USB Server) or a set of digital certificates can be logically bound to a specific pipe name (i.e., the browser instance). When a named pipe receives a transaction instruction, it can automatically trigger the bound security device to perform the operation, achieving precise binding between the online banking key and the browser instance, meeting the security requirements of financial-grade operations.
[0032] This application provides a method for concurrently executing online banking tasks, referring to... Figure 2 As shown, including but not limited to the following steps: In step S200, the browser instance receives the task instructions corresponding to the online banking task from the RPA console through named pipes. The task instructions include initialization instructions and online banking business operation instructions. Step S210: The browser instance completes the initialization configuration based on the initialization instructions.
[0033] In some embodiments, the browser instance completes the initialization configuration based on the initialization instruction by: obtaining the online banking account, certificate information and key index corresponding to the initialization instruction from the key management platform; binding the certificate information, online banking account and key index to the browser instance to complete the initialization configuration.
[0034] Step S220: After initialization, the browser instance calls the Chromium rendering engine and JavaScript engine based on the online banking business operation instructions, and links with the key management platform to automatically execute the corresponding online banking business operations, obtain the operation results, and feed the operation results back to the RPA console through named pipes.
[0035] For example, the browser instance listens to the corresponding named pipe in real time. When the RPA console needs to send instructions to the browser instance, it connects to this dedicated named pipe and writes structured task instructions (usually in JSON format, containing operation type, target element location information, etc.). The browser instance reads the data stream in real time through the listening end of the named pipe. After being parsed by the internal message processing module, it calls the API provided by CEF (such as executing JavaScript or simulating user events) according to the content of the task instructions to drive the Chromium rendering engine and JavaScript engine, linking with the key management platform. Finally, it performs automated operations such as clicking, inputting, and navigating on the corresponding online banking page, thereby realizing unmanned execution of online banking tasks.
[0036] In some embodiments, after initialization, the browser instance, based on online banking operation instructions, invokes the Chromium rendering engine and JavaScript engine, and collaborates with the key management platform to automatically execute the corresponding online banking operations, obtain operation results, and feed the operation results back to the RPA console via named pipes. This includes: parsing the online banking operation instructions to obtain parsed data, wherein the parsed data includes page information and operation information corresponding to the page information; the Chromium rendering engine renders based on the page information to obtain the online banking page, and when logging in on the online banking page according to the operation information, it invokes the certificate adaptation module and the JavaScript engine to log in, obtaining the login result in the operation results; when the Chromium rendering engine, in conjunction with the JavaScript engine, performs a transaction on the online banking page according to the operation information, it combines the IPC interaction module and the key management platform to obtain key information for the transaction, obtaining the transaction result in the operation results; and the JavaScript engine performs a query on the online banking page according to the operation information, obtaining the query data in the operation results.
[0037] In some embodiments, when logging in on the online banking page based on operation information, the certificate adaptation module and the JavaScript engine are invoked to perform the login. The login result obtained in the operation result includes: the Chromium rendering engine invokes the JavaScript engine to trigger the login operation on the online banking page based on the operation information, and at the same time sends a certificate selection request to the certificate adaptation module; the certificate adaptation module triggers a callback event, queries the certificate information bound to the browser instance, and returns the certificate information to the Chromium rendering engine through the callback event for certificate verification, and obtains the verification result; if the verification result is successful, the Chromium rendering engine performs the login and obtains the login result.
[0038] For example, this application embodiment replaces the OnSelectClientCertificate mechanism of the callback event by pre-setting the online banking certificate path in the registry, thereby realizing automatic certificate loading, which is applicable to some special online banking systems that do not support CEF certificate callback.
[0039] In some embodiments, when the Chromium rendering engine, in conjunction with the JavaScript engine, conducts a transaction on an online banking page based on operation information, it combines the IPC interaction module and the key management platform to obtain key information for the transaction. The transaction result obtained includes: the Chromium rendering engine calling the JavaScript engine to convert the confirmation key simulation instruction into a transaction operation based on the operation information, and simultaneously transmitting a key retrieval instruction to the IPC interaction module via a Web API to the JavaScript engine; the JavaScript engine responding to the key retrieval instruction transmitted by the IPC interaction module, encrypting the key retrieval instruction and transmitting it to the key management platform; the key management platform generating key information based on the key retrieval instruction and returning it to the JavaScript engine via an API; and the JavaScript engine conducting the transaction based on the key information to obtain the transaction result.
[0040] For example, a detailed description is given using the complete three-tier architecture of RPA console control of browser instances. The architecture includes a low-level engine layer based on CEF-enhanced browser kernel, an intermediate encapsulation layer based on CEF4Delphi bridging, and an application control layer based on RPA+online banking management.
[0041] The underlying engine layer includes the Chromium rendering engine, the JavaScript engine, and the CEF multi-process management module. Once the pipeline communication module of the middle encapsulation layer parses the JSON-formatted task instructions (such as "Log in to Bank A and execute a transfer") issued by the RPA console, the underlying engine layer begins to work collaboratively. First, the CEF multi-process management module responds to the scheduling of the middle encapsulation layer instance management module, dynamically allocating an independent Chromium rendering process for the current task, ensuring that the operating environment of this online banking instance is completely isolated from other concurrent tasks at the process level. Subsequently, the instructions are distributed to this rendering process, where the Chromium rendering engine loads the target online banking page and accurately calculates the layout and style based on the element positioning information (such as XPath) in the instructions, completing the rasterization and compositing rendering of the page. When the instructions involve simulating physical buttons (such as automatically pressing the "OK" button on the online banking USB key), the rendering engine can utilize its supported custom drawing callback mechanism to inject specific simulated input events into the compositing stage of the rendering pipeline, precisely triggering the response of page controls. Simultaneously, the JavaScript engine is driven synchronously, executing scripts embedded or dynamically injected in the instructions. For operations requiring security authentication (such as transaction signing), the script initiates an HTTPS request to the key management platform deployed on the intranet via the browser's built-in Web API (such as the Fetch API). This request carries the key index identifier bound to the current browser instance. After verifying the request, the key management platform drives the corresponding physical USB key to complete the signature calculation and returns the result. The JavaScript engine receives the signature result, fills it into the specified form on the online banking page, and finally, the rendering engine submits it, thus completing the entire transaction process securely and automatically without manual intervention. Throughout the process, the multi-process management module maintains the lifecycle of the rendering process, dynamically releasing resources upon task completion to make room for new task instances.
[0042] Specifically, based on the data input / output and processing logic of the Chromium rendering engine, JavaScript engine, and CEF multi-process management module, Table 1 is constructed. Referring to Table 1 below, taking three concurrent tasks—"ICBC transfer, CCB balance query, and ABC transaction export"—as an example, the following steps can be taken: (i) Instance-specific rendering process and process-level isolation: When the RPA console issues 3 tasks, the "Instance Management Module" in the middle encapsulation layer sends a request to the CEF multi-process management module to "create 3 independent rendering processes". The module assigns 3 unique rendering process IDs (e.g., ID1 corresponds to ICBC, ID2 corresponds to CCB, and ID3 corresponds to ABC). Each process only loads the corresponding online banking HTML / CSS / JS resources, and memory space and resource calls are completely independent. If the CCB page script crashes, only the ID2 process will terminate, without affecting the operation of ID1 (ICBC) and ID3 (ABC). (II) Custom drawing callback adaptation of rendering engine to OK key press: When ICBC task requires verification of U-shield OK key, the intermediate encapsulation layer "certificate adaptation module" passes the instruction "trigger U-shield OK key simulation" to Chromium rendering engine. The engine calls Web API to link with key management platform through custom drawing callback. The platform "key simulation module" transmits control signal to ID1 rendering process. The engine converts the signal into online banking page confirmation operation to complete U-shield verification. (III) Automated Key Invocation of JavaScript Engine: The JavaScript engine receives the JS script of the online banking page from the rendering process, and at the same time receives the key invocation request from the IPC interaction module through the Web API. While compiling and executing JS to realize page interaction, it encrypts and transmits key information to the key management platform to complete the key invocation.
[0043] Table 1
[0044] The intermediate encapsulation layer includes: TChromium components, TCEFWindowParent components, a pipe communication module, a certificate adaptation module, and an IPC interaction module. As the core bridge connecting the application control layer (RPA console) and the underlying engine layer (CEF / Chromium), the intermediate encapsulation layer encapsulates CEF's native C / C++ interfaces into components that can be easily called by the Delphi environment (such as TChromium and TCEFWindowParent), and integrates several dedicated functional modules for high-security, high-concurrency online banking automation scenarios.
[0045] Specifically, based on the data input / output and processing logic of the TChromium component, TCEFWindowParent component, pipe communication module, certificate adaptation module, and IPC interaction module, Table 2 is constructed. Referring to Table 2, taking the "execute ICBC transfer" task as an example, the complete process of collaborative work of each module in this intermediate encapsulation layer is illustrated: (i) When the RPA console issues the "ICBC transfer" task instruction, the intermediate encapsulation layer immediately starts its collaborative workflow. First, the instance management module (whose functions are implemented in the Delphi layer by components such as TCEFWindowParent) receives the task assignment instruction, dynamically creates an independent browser instance dedicated to ICBC online banking, generates its unique main window handle, and synchronously sends the instance status (such as "creation successful") back to the application control layer for monitoring; (ii) The pipe communication module receives specific transfer instructions encapsulated in JSON format from the RPA console (e.g., {"functionCall": "doTransfer", "param": {"amount": "1000", "payee": "XXX"}}). Based on the implicit or explicit target identifier in the instruction, and combined with its internally maintained mapping table, the pipe communication module can accurately match the dedicated named pipe corresponding to the newly created ICBC instance (e.g., \\.\pipe\RPABrowserCommunication_12345) through the dual identifier of "window handle + pipe name", thereby transmitting the instruction to the target browser instance without error and feeding back the "instruction delivered" status to the RPA console. (III) When the browser instance loads the ICBC login page and triggers a client certificate authentication request, the certificate adaptation module is activated. The certificate adaptation module has pre-obtained the binding relationship configuration of "online banking instance - digital certificate" from the key management platform. When the underlying rendering engine initiates a certificate selection request through the CEF event mechanism (such as OnSelectClientCertificate), the certificate adaptation module can automatically match and return the ICBC-specific certificate bound to it from the system certificate storage area according to the browser instance handle that is currently initiating the request, thereby realizing unmanned certificate selection in the login process and notifying the upper layer of the "certificate matching successful" result. (iv) The TChromium component receives RPA instructions parsed from the pipeline communication module and the rendering process ID from the CEF multi-process management module. The data processing logic of the TChromium component is to translate high-level business instructions (such as "transfer") into a series of atomic operation instructions (such as "execute JavaScript script: document.querySelector('#amount').value='1000') that can be recognized and executed by the underlying Chromium rendering engine and JavaScript engine, and ensure that these instructions are sent to the correct rendering process for execution. At the same time, it is responsible for collecting the execution status of the instance (such as "page loading", "script execution completed") and feeding it back upwards. (v) During the entire instruction execution process, the IPC interaction module is responsible for establishing and maintaining the communication channel between the main process of the browser instance and multiple rendering processes. When the TChromium component needs to inject a script into the page of a specific rendering process to perform a transfer operation, or needs to obtain the page execution result (such as grabbing the message text indicating successful transaction), reliable two-way data interaction is carried out through this module.
[0046] In summary, the instance management module is responsible for the dynamic scheduling and lifecycle management of resources, the pipeline communication module ensures the precise point-to-point delivery of control commands, the certificate adaptation module realizes the automatic processing of security authentication, the TChromium component completes the translation and dispatch of command language, and the IPC interaction module ensures the stability of inter-process communication. Together, they form an efficient, reliable, and secure "bridge" that enables the online banking business commands of the application control layer to be accurately and automatically converted into the actual operations of the underlying browser engine.
[0047] Table 2
[0048] The application control layer includes: RPA console, RPA agent, and key management platform.
[0049] Functionality Expansion: Building upon the traditional browser shell's user interface, network request, and data storage capabilities, the RPA console now supports parallel scheduling of multiple online banking tasks, dynamically allocating browser instances, and enabling a one-to-one binding between online banking keys and browser ports to eliminate the risk of key swapping. The status monitoring module collects real-time data on browser instance connection status, operation progress, and error messages, supporting anomaly alerts and automatic retries. The RPA console sends operation commands to the intermediate encapsulation layer through the agent, while the key management platform provides key retrieval and encrypted storage services to the intermediate encapsulation layer via API.
[0050] Specifically, based on the data input, data output, and processing logic of the RPA console, status monitoring module, and key management platform, Table 3 is constructed. Referring to Table 3, the complete workflow of their collaborative work is explained in detail using three concurrent tasks: "ICBC transfer, CCB query, and ABC export" as examples. (i) When an operations staff member submits a list containing three independent online banking tasks—"ICBC Transfer," "CCB Inquiry," and "ABC Export"—through the RPA console, the collaborative workflow of the application control layer is immediately initiated. The RPA console receives and parses this multi-task list, adhering to the isolation principle of "one task, one instance," and decomposes the tasks and dynamically allocates them to independent browser instance resource pools. For example, "Instance 1" is created and bound for the "ICBC Transfer" task, "Instance 2" is assigned to the "CCB Inquiry" task, and "Instance 3" is assigned to the "ABC Export" task. This design draws on the idea of a task-driven architecture, decomposing batch operations into independent schedulable units. The module then generates a task allocation instruction containing the target instance identifier and accurately distributes it to the corresponding instance management module in the intermediate encapsulation layer through the RPA agent, while simultaneously feeding back the "task distributed" status to the RPA console interface. (II) To ensure secure transaction processing, the key management platform receives ICBC account information (such as account number and operator identifier) from the RPA console and interacts with the key management platform via API to obtain a unique identifier for the physical U-shield (key) strictly bound to the account. The module establishes and solidifies the "ICBC Account A" key in the encrypted storage area. The one-to-one binding relationship of "Key Device 1" ensures that in subsequent automated processes, any signature request from "Instance 1" (ICBC task) will be automatically and error-free routed to "Key Device 1" for processing, fundamentally eliminating the risk of "mistakenly changing shields" and "incorrect signatures" between different accounts; (III) Once the task instructions and security credentials are ready, the three browser instances begin to execute their dedicated tasks in parallel. During this process, the status monitoring module collects real-time running status data streams of each instance through the instance management module in the intermediate encapsulation layer, including whether the connection is normal, page loading progress, script execution steps, and whether there are error logs. For example, when "Instance 2" corresponding to the "CCB Query" task experiences a script execution exception due to page element loading timeout, the monitoring module can immediately identify this "process crash" or "script timeout" exception. Upon detecting the exception, a two-level response is triggered: first, a real-time alarm of "CCB instance exception: script execution timeout" is sent to the console and relevant maintenance personnel; second, according to the preset strategy, the instance is automatically restarted or the task is recovered from the point of failure to ensure the continuity of the overall business process. In summary, the RPA console enables intelligent decomposition and resource scheduling of multiple tasks, laying the foundation for high concurrency; the key management platform, through strong binding between hardware and instances, constructs a security defense line for financial-grade operations; and the status monitoring module provides full-process observability and self-healing capabilities, ensuring the stable operation of the system. Together, these features enable the RPA system to safely, efficiently, and reliably complete complex multi-bank concurrent automated tasks such as "ICBC transfer, CCB query, and ABC export".
[0051] Table 3
[0052] It is understood that the embodiments of this application have the following beneficial effects: (i) By using process isolation and independent pipe communication, multiple online banking instances can be executed concurrently, reducing command response latency and improving concurrency efficiency, thereby meeting the needs of enterprises for batch processing of multiple accounts. (ii) The named pipe communication mechanism avoids process conflicts and instruction loss, improves the success rate of instruction transmission, and does not require network dependence. Compared with existing methods such as Socket communication, it can improve stability. (iii) Process isolation can avoid the risk of data crosstalk, and automatic certificate selection and key encryption call meet the security authentication requirements of online banking and meet the control requirements of "closed storage and online authorization" of online banking keys; (iv) Based on the CEF kernel, it can support the adaptation of various bank online banking systems, and through the dynamic binding of window handles and pipes, the number of concurrent instances can be flexibly expanded. (v) Achieve full automation of the entire process from instruction issuance, certificate selection, key retrieval to result feedback, without the need for manual intervention, reducing operating costs and improving work efficiency.
[0053] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned browser control method or concurrent task execution method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0054] Please see Figure 3 , Figure 3 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 301 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 302 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 302 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 302 and is called and executed by the processor 301 to execute the browser control method or concurrent task execution method of the embodiments of this application. Input / output interface 303 is used to implement information input and output; The communication interface 304 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 305 transmits information between various components of the device (e.g., processor 301, memory 302, input / output interface 303, and communication interface 304); The processor 301, memory 302, input / output interface 303, and communication interface 304 are connected to each other within the device via bus 305.
[0055] In some embodiments, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described browser control method or concurrent task execution method.
[0056] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0057] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0058] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0059] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0060] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0061] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0062] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0063] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0064] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0065] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0066] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for controlling a browser, characterized in that, Applied to controllers, including: The RPA console calls the CEF multi-process management module to create an instance based on the number of online banking tasks, and obtains the browser instance and the ID corresponding to the browser instance. Create a named pipe between the RPA console and the browser instance based on the ID and channel name; The RPA console sends the task instructions corresponding to the online banking task to the corresponding browser instance through the named pipe for control.
2. The browser control method according to claim 1, characterized in that, The process of creating a named pipe between the RPA console and the browser instance based on the ID and channel name includes: The pipeline type is determined based on the operating environment of the controller; Based on the operating environment, the ID and the channel name are concatenated to generate the pipeline path name; The RPA console calls the system API corresponding to the runtime environment to create a named pipe based on the pipe type and the pipe path name.
3. The browser control method according to claim 2, characterized in that, The step of generating the pipeline path name by concatenating the ID and the channel name based on the operating environment includes: Check if the historical pipeline corresponding to the pipeline path name exists; If the historical pipeline exists, delete the historical pipeline or generate the pipeline path name based on the ID, the channel name, and the timestamp.
4. A method for concurrent task execution, characterized in that, include: The browser instance receives task instructions corresponding to the online banking task from the RPA console through named pipes, wherein the task instructions include initialization instructions and online banking business operation instructions; The browser instance completes the initialization configuration based on the initialization command; After initialization, the browser instance, based on the online banking operation instructions, calls the Chromium rendering engine and JavaScript engine, and links with the key management platform to automatically execute the corresponding online banking operation, obtain the operation result, and feed the operation result back to the RPA console through the named pipe.
5. The concurrent task execution method according to claim 4, characterized in that, The browser instance completes the initialization configuration based on the initialization instructions, including: Obtain the online banking account, certificate information, and key index corresponding to the initialization instruction from the key management platform; Bind the certificate information, the online banking account, the key index, and the browser instance to complete the initial configuration.
6. The concurrent task execution method according to claim 4, characterized in that, The browser instance, after initialization, invokes the Chromium rendering engine and JavaScript engine based on the online banking operation instructions, and coordinates with the key management platform to automatically execute the corresponding online banking operation, obtain the operation result, and feed the operation result back to the RPA console through the named pipe, including: The online banking operation instructions are parsed to obtain parsed data, which includes page information and operation information corresponding to the page information. The Chromium rendering engine renders the online banking page based on the page information, and calls the certificate adaptation module and the JavaScript engine to log in when logging in on the online banking page according to the operation information, and obtains the login result in the operation result. When the Chromium rendering engine, in conjunction with the JavaScript engine, performs a transaction on the online banking page based on the operation information, it also uses the IPC interaction module and the key management platform to obtain key information for the transaction, thus obtaining the transaction result in the operation result. The JavaScript engine performs a query on the online banking page based on the operation information to obtain the query data in the operation results.
7. The concurrent task execution method according to claim 6, characterized in that, When logging into the online banking page based on the operation information, the certificate adaptation module and the JavaScript engine are invoked to perform the login, and the login result obtained in the operation result includes: The Chromium rendering engine calls the JavaScript engine to trigger the login operation on the online banking page based on the operation information, and at the same time sends a certificate selection request to the certificate adaptation module; The certificate adaptation module triggers a callback event, queries the certificate information bound to the browser instance, and returns the certificate information to the Chromium rendering engine for certificate verification through the callback event to obtain the verification result. If the verification result is successful, the Chromium rendering engine logs in and obtains the login result.
8. The concurrent task execution method according to claim 6, characterized in that, When the Chromium rendering engine, in conjunction with the JavaScript engine, performs a transaction on the online banking page based on the operation information, it also uses the IPC interaction module and the key management platform to obtain key information for the transaction, resulting in the transaction result in the operation result, which includes: The Chromium rendering engine calls the JavaScript engine to convert the key simulation instruction into a transaction operation based on the operation information, and at the same time transmits the key invocation instruction to the JavaScript engine through the Web API to the IPC interaction module. The JavaScript engine responds to receiving the key invocation instruction transmitted by the IPC interaction module, and encrypts and transmits the key invocation instruction to the key management platform; The key management platform generates the key information based on the key invocation instruction and returns it to the JavaScript engine via API. The JavaScript engine performs the transaction based on the key information and obtains the transaction result.
9. An electronic device, characterized in that, include: At least one processor; At least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the browser control method as described in any one of claims 1 to 3 or the concurrent task execution method as described in any one of claims 4 to 8 is implemented.
10. A computer-readable storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are used to execute the browser control method as described in any one of claims 1 to 3 or the concurrent task execution method as described in any one of claims 4 to 8.