CN-121996237-A - Method and system for generating and processing usa file to realize RPA operation
Abstract
The scheme discloses a method and a system for RPA operation based on a usa file, and relates to the technical field of robot process automation (Robotic Process Automation, RPA). The scheme includes that one or more flow steps are packed into a single file usa, a file loading and analyzing module loads and analyzes the file usa, a script compiling module compiles the read operation file to generate a corresponding operation script, an explaining module executes the corresponding operation script according to the description file, and a standard function module can be called in the operation script to realize interface operation. The proposal enables the front-end developer or script developer to easily participate in the RPA operation development of the interface through the usa file, does not need to repeatedly develop a limiting function or a standard function, can meet changeable development requirements, and improves the transmission sharing convenience of the application.
Inventors
- DU BINGXIN
Assignees
- 杜炳新
Dates
- Publication Date
- 20260508
- Application Date
- 20251215
Claims (10)
- 1.A method and system for generating and processing usa files to implement RPA operation is characterized by comprising the following steps: S1, providing at least one flow step, wherein each flow step is packaged into a separate file unit (such as a folder or a file name distinction), and one flow step comprises a description file and one or more operation files; S2, packaging and compressing the at least one flow step to generate a single file in a format of usa, wherein the file in the format of usa is a packaged file of the scheme; S3, loading the usa files and analyzing the internal structure of the usa files when the scheme is operated, and reading the description file and the operation file of each flow step; S4, compiling the read operation file through a compiling module to generate a corresponding operation script, wherein if the operation script is already the script, the operation script can be skipped; s5, executing an operation script corresponding to the flow step on the defined time point and the corresponding interface (desktop window or browser page) through an interpretation module according to the description file; and S6, the operation script can call the standard function module or the extended function module packaged by the standard function module through the API to perform interface operation.
- 2. The solution according to claim 1, wherein in step S1, the description file is a text file based on JSON, XML or YAML format, and is used to define metadata such as names, interface names, script paths, running opportunities, matching rules, initial paths or websites, account identifiers, etc. of the flow steps, where the names, interface names, initial paths or websites, account identifiers of the flow steps are optional.
- 3. The solution according to claim 1, wherein in step S1, the operation file includes two expression forms: the first is a logic document before compiling, which is compiled by adopting a script language or a language in a specific field; The second executable file is compiled by the first logic file, and can be directly developed and written; the interpretation module is capable of adapting and interpreting the operation files for executing the two manifestations.
- 4. A method according to claim 3, wherein the scripting language comprises TYPESCRIPT, JAVASCRIPT, C #, JAVA, lua or Python. The domain-specific language is a specific grammar defined for interface operations.
- 5. The method according to claim 1, wherein in steps S5 and S6, when the interpretation module executes the operation file, the operation file can call the restrictive functions and the expansion functions of mouse click, mouse track simulation, input method input, system shortcut key, paste, file and the like in the flow steps corresponding to the scheme.
- 6. The method of claim 1, wherein the usa file is in ZIP, TAR, or custom compression/archiving format.
- 7. The solution is for implementing the method as claimed in any one of claims 1-6, and is characterized by comprising: the file packaging module is used for packaging and compressing one or more flow steps into usa files; The file loading and analyzing module is used for loading and analyzing the structure of the usa file when the scheme is started or operated; The script compiling module is used for compiling the operation file into an operation script; The interpretation module is used for interpreting and running the description file and the operation steps defined in the operation file, and finishing interface operation at a specific moment point; The permission module is used for configuring user restriction function permission control; the standard function module is used for packaging the limiting function, the common function and the advanced function; The function module can be installed or uninstalled according to own requirements without modifying main program codes, so that function customization is realized.
- 8. The system of claim 7, further comprising a development tool module for providing a graphical interface or command line tool to assist a user in creating, editing, and packaging process steps into a usa file.
- 9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1-6 when the program is executed.
- 10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any of claims 1-6.
Description
Method and system for generating and processing usa file to realize RPA operation Technical Field The invention relates to the technical field of robot process automation (Robotic Process Automation, RPA), in particular to an RPA system method and system for realizing automatic Web browser and desktop application window operation and data interaction based on Chrome DevTools Protocol (CDP), and particularly relates to an RPA operation method and system based on a usa (UI Script Automation, interface script automation) file. Background WebDriver, webDriver BiDi, chrome DevTools Protocol (CDP) and other technologies have call restrictions with different degrees in various aspects such as mouse click, track simulation, input method input, mouse scrolling, system shortcut key, copy and paste, and the like, namely the simulation operation cannot be performed. The existing RPA platform generally adopts a prefabricated operation step, the functions of the RPA platform are usually cured when the software is released, if a user needs to add some functions, the user often depends on a software manufacturer to release a complete new version, and the configured application flow can only be shared and cannot be transmitted, so that the flexibility is poor. Meanwhile, the browser plug-in also has strict isolation execution environment and authority control, and can not meet the requirement of simulating user operation. Therefore, what is needed is an interface operating scheme that simplifies functionality, is flexible to develop, facilitates transport, and supports multiple forms and browsers. Disclosure of Invention In order to solve the technical problems, the invention provides an RPA method and an RPA system based on a usa (UI Script Automation, interface script automation) file. The scheme generates the usa file that can be independently distributed as an application by encapsulating the restrictive or standard functions into standard functional modules and then developing or configuring the operational flow steps. The invention provides an RPA method and an RPA system based on a usa file, wherein the RPA method comprises the following steps: S1, providing at least one flow step, wherein each flow step is packaged into a separate file unit (such as a folder or a file name distinction), and one flow step comprises a description file and one or more operation files; S2, packaging and compressing the at least one flow step to generate a single file in a format of usa, wherein the file in the format of usa is a packaged file of the scheme; S3, loading the usa files and analyzing the internal structure of the usa files when the scheme is operated, and reading the description file and the operation file of each flow step; S4, compiling the read operation file through a compiling module to generate a corresponding operation script, wherein if the operation script is already the script, the operation script can be skipped; S5, executing an operation script corresponding to the flow steps on the defined time points and the corresponding interfaces (desktop window or browser page) through an interpretation module and through an interpretation module according to the description file; And S6, the operation script can call the standard function or the extension function packaged by the standard function module through the API to perform interface operation. Further, the description file is a text file based on JSON, XML or YAML format, and is used for defining metadata such as names, interface names, script paths, running opportunities, matching rules, initial paths or websites, account identifiers and the like of the flow steps, wherein the names, interface names, initial paths or websites, account identifiers of the flow steps are optional, and the script paths can be relative paths or absolute paths. The operation file comprises two forms of a logic document before compiling and an executable script after compiling, and the interpretation module can be adapted to execute the two forms, so that development convenience and running efficiency are both considered. The second aspect of the invention provides a system for realizing the method, which comprises a file packing module, a file loading and analyzing module, a script compiling module, an explaining module, a standard function module and an extended function module. In a third aspect of the present invention, a computer device and a computer-readable storage medium are provided. Advantageous effects Flexible development, namely supporting the writing of logic by using a script language (such as JavaScript) and assisting in the structured description file, so that a front-end developer or a script developer can easily participate in the automatic operation development of an interface without repeatedly developing a limiting function, and can meet the changeable development requirements. The scheme gives control rights to users, whether developers, enterprises or common us