Page automation implementation method, device, computer equipment and storage medium
The method and device automate page operations by forming DOM process trees and generating business processes, addressing compatibility issues in existing tools to enhance user experience and versatility.
Patent Information
- Application Number
- CN202310590609.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-24
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2043-05-24
AI Technical Summary
Existing page automation tools like Selenium, Playwright, AutoIT, and Sikuli face compatibility issues with modern browsers and lack universality, leading to poor user experience and inefficient operation.
A method and device for page automation that monitors user transactions to form an operation DOM process tree, arranges similar elements, generates basic business processes, and executes tasks with real-time monitoring and result storage, using a browser plug-in to enhance compatibility and versatility.
Enables high compatibility and ease of use by automating page operations with real-time monitoring and result storage, breaking limitations of existing tools and improving user experience.
Smart Images

Figure CN116776024B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to computers, and more specifically to a page automation implementation method, device, computer equipment and storage medium. Background Art
[0002] Currently, many operating systems have IE browsers, and many old web applications are more compatible with IE. At the same time, many web applications themselves embed extensions related to office controls, and are not compatible with chrome-like browsers. There are many pitfalls in the use of selenium, and the user experience is not good. Therefore, when using selenium or playwright to automate web pages, it is often necessary to adapt the webdriver and browser kernel and browser version; AutoIT only supports system-level operations related to Windows systems and has no universality; sikuli needs to strictly control the resolution and maintain the screenshots involved in the operation.
[0003] Therefore, it is necessary to design a new method to realize page automation with high compatibility, ease of use and strong versatility. Summary of the invention
[0004] The purpose of the present invention is to overcome the defects of the prior art and provide a method, device, computer equipment and storage medium for realizing page automation.
[0005] To achieve the above purpose, the present invention adopts the following technical solution: a page automation implementation method, comprising:
[0006] Monitor user transaction operations to obtain the operation DOM process tree;
[0007] Arrange various similar elements according to the operation DOM process tree to obtain an arrangement result;
[0008] Automatically generate basic business processes according to the arrangement results;
[0009] Pull the tasks corresponding to the specified basic business process regularly and obtain the task objects from the server;
[0010] Generate a task parameter dynamic script according to the task object and process;
[0011] Execute tasks and monitor task execution to obtain task execution results;
[0012] The task execution result is sent to the server so that the task execution result is stored on the server.
[0013] A further technical solution is: the monitoring of user transactional operations to obtain an operation DOM process tree includes:
[0014] According to the user's operation on the monitorable service page, the DOM elements are automatically monitored to form an operation DOM process tree.
[0015] Its further technical solution is: the operation DOM process tree stores DOM element objects, operation coordinates relative to the page position, and previous and next operation node pointers, and compresses the content stored in the operation DOM process tree through JS compression technology, and uses a unique identifier combined with a current timestamp as a keyword, and each time the operation DOM process tree is monitored as a value, stored in the browser memory, and the value is used as an array. Within a set time, when the array size exceeds a set number, the data is retained, and when the array size is less than the set number, the array is cleared.
[0016] A further technical solution is: the arrangement of various similar elements according to the operation DOM process tree to obtain an arrangement result includes:
[0017] Obtain the operation DOM process tree from the browser memory at regular intervals;
[0018] Using a similarity algorithm to determine the similarity of the processes of the operation dom process tree, and forming a preliminary arrangement of the processes of the operation dom process tree, and marking the processes with differences in the operation dom process tree to obtain a marking result;
[0019] Perform process script arrangement according to the annotation results to obtain the initial arrangement results;
[0020] The initial orchestration result is adjusted according to the orchestration configuration to obtain an orchestration result.
[0021] A further technical solution is: automatically generating a basic business process according to the arrangement result includes:
[0022] Acquire data from the orchestration results to preliminarily generate an automation process skeleton;
[0023] Analyze the operation DOM process tree and fill the automation process skeleton to obtain a filling result;
[0024] The filling result is bound to parameter specifications or improved according to the server-side process visualization configuration to obtain the basic business process.
[0025] A further technical solution is: the periodic pulling of tasks corresponding to the designated basic business process and obtaining task objects from the server includes:
[0026] Filter basic business processes according to process operation frequency to obtain standard processes;
[0027] Obtain the task object from the server according to the characteristics of the standard process.
[0028] A further technical solution is: executing the task and monitoring the task execution to obtain the task execution result includes:
[0029] Sending the task parameter dynamic script to the intermediate script process;
[0030] The intermediate script process obtains the corresponding basic business process, dynamically assembles task parameters, and compiles them into the final process script;
[0031] Put the final process script into the browser task execution thread to complete the task execution, and monitor the task execution to obtain the task execution result.
[0032] The present invention also provides a device for realizing page automation, comprising:
[0033] The element monitoring unit is used to monitor the user's transactional operations to obtain the operation DOM process tree;
[0034] An element arrangement unit, used for arranging various similar elements according to the operation DOM process tree to obtain an arrangement result;
[0035] A process generation unit, used to automatically generate a basic business process according to the arrangement result;
[0036] The pulling unit is used to periodically pull the tasks corresponding to the specified basic business process and obtain the task objects from the server;
[0037] A script generation unit, used to generate a task parameter dynamic script according to the task object and process;
[0038] An execution unit is used to execute tasks and monitor task execution to obtain task execution results;
[0039] The sending unit is used to send the task execution result to the server so that the task execution result is stored in the server.
[0040] The present invention further provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above method when executing the computer program.
[0041] The present invention also provides a storage medium, wherein the storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0042] The beneficial effects of the present invention compared with the prior art are: the present invention forms a process tree by monitoring the operation content, arranges the operation specifications and standards according to the process tree, and automatically generates the process. When executing the tasks corresponding to the process, the assembly process can be written and automated operations can be performed, the execution results can be monitored and recorded in real time, and the corresponding processes can be stored or cleaned up as needed, thereby realizing page automation, and having high compatibility, ease of use, and strong versatility.
[0043] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0045] Figure 1 A schematic diagram of an application scenario of the page automation implementation method provided by an embodiment of the present invention;
[0046] Figure 2 A schematic diagram of a process for implementing page automation provided by an embodiment of the present invention;
[0047] Figure 3 A schematic diagram of a sub-process of a method for implementing page automation provided by an embodiment of the present invention;
[0048] Figure 4 A schematic diagram of a sub-process of a method for implementing page automation provided by an embodiment of the present invention;
[0049] Figure 5 A schematic diagram of a sub-process of a method for implementing page automation provided by an embodiment of the present invention;
[0050] Figure 6 A schematic diagram of a sub-process of a method for implementing page automation provided by an embodiment of the present invention;
[0051] Figure 7 A schematic block diagram of a device for implementing page automation provided by an embodiment of the present invention;
[0052] Figure 8 A schematic block diagram of an element arrangement unit of a page automation implementation device provided in an embodiment of the present invention;
[0053] Fig. 9 A schematic block diagram of a process generation unit of a page automation implementation device provided in an embodiment of the present invention;
[0054] Fig.10A schematic block diagram of a pulling unit of a page automation implementation device provided in an embodiment of the present invention;
[0055] Fig.11 A schematic block diagram of an execution unit of a page automation implementation device provided in an embodiment of the present invention;
[0056] Fig.12 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0059] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0060] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0061] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of an application scenario of the page automation implementation method provided in an embodiment of the present invention. Figure 2 A schematic flow chart of a page automation implementation method provided by an embodiment of the present invention. The page automation implementation method is applied to a terminal and exists in the terminal in the form of a browser plug-in. The plug-in interacts with the server to perform data interaction, and implements user operation security monitoring; automatic recording of business operations; standard arrangement of operation specifications; automatic management of business processes; convenient generation of process assembly; and on-demand storage and cleaning of processes.
[0062] In this embodiment, the browser plug-in includes a terminal plug-in, an intermediate script, and a background script; the terminal plug-in can realize element operation monitoring, operation collection and analysis, and automatic generation of the initial process, and has a user security authentication mechanism, which can realize quick customization of the process, process parameter fitting and binding to build parameter specifications, and automatic complete process confirmation. It also has client registration, connecting to the server to pull batch tasks, the client reports task results, and customizes task results; the intermediate script is a script executor and also an external communication interface; the background script is a dynamic script parser, and the automated process script completes dynamic parameter binding according to the standard parameter specification to form the final JavaScript automated script, communicates with the intermediate script, sends the intermediate script execution command, and monitors the intermediate script execution result. The server can provide user authentication logic; automated process visualization display, visualization management, visualization arrangement, parameter specification visualization configuration, and batch task visualization management and control. The functions of the plug-in tool include JavaScript browser communication interface functions, automated operation interface functions, log output functions, task scheduling functions, and calling other process functions.
[0063] Figure 2 FIG. 1 is a flow chart of a method for implementing page automation provided by an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S110 to S170.
[0064] S110, monitoring the transactional operations of the user to obtain the operation DOM process tree.
[0065] In this embodiment, the operation DOM process tree stores DOM element objects, operation coordinates relative to the page position, and previous and next operation node pointers. The content stored in the operation DOM process tree is compressed using JS compression technology, and a unique identifier combined with the current timestamp is used as a keyword. Each time the operation DOM process tree is monitored, it is stored in the browser memory as a value, and the value is used as an array. Within a set time, when the array size exceeds a set number, the data is retained, and when the array size is less than the set number, the array is cleared.
[0066] Specifically, according to the user's operation on the monitorable service page, the operation DOM element is automatically monitored to form an operation DOM process tree.
[0067] Regularly cleaning up arrays that do not meet the requirements can reduce the memory usage of the browser. The above step S110 can realize safe monitoring of user operations, and the process can be stored and cleaned up as needed.
[0068] S120, arranging various similar elements according to the operation DOM process tree to obtain an arrangement result.
[0069] In this embodiment, the arrangement result refers to the content formed after the arrangement result of the process script is adjusted. Step S120 can realize the arrangement of the operation specification standard.
[0070] In one embodiment, see Figure 3 , the above-mentioned step S120 may include steps S121 to S124.
[0071] S121, regularly obtaining the operation DOM process tree from the browser memory;
[0072] S122, using a similarity algorithm to determine the similarity of the processes in the operation dom process tree, and forming a preliminary arrangement of the processes in the operation dom process tree, and marking the processes with differences in the operation dom process tree to obtain a marking result.
[0073] In this embodiment, the marking result refers to the result formed after marking the different processes in the operation DOM process tree.
[0074] Specifically, the operation DOM process tree is obtained from the browser memory at regular intervals, and the similarity algorithm is used to determine the process similarity. When the similarity reaches a certain value, it is identified as a transactional operation with the possibility of automation. The operation DOM process tree is formed into a preliminary process arrangement, and the operation marks which processes in the DOM process tree are different.
[0075] S123. Perform process script arrangement according to the marking result to obtain an initial arrangement result.
[0076] In this embodiment, the DOM process tree is clarified and the process script arrangement is completed, and what is formed is the initial arrangement result.
[0077] S124: Adjust the initial orchestration result according to the orchestration configuration to obtain an orchestration result.
[0078] In this embodiment, the process script orchestration is automatically adjusted according to the orchestration configuration.
[0079] S130: Automatically generate a basic business process according to the arrangement result.
[0080] In this embodiment, the basic business process refers to a process formed according to the arrangement result. The business process can be automatically managed.
[0081] In one embodiment, see Figure 4 , the above-mentioned step S130 may include steps S131 to S133.
[0082] S131, acquiring data from the arrangement result, and preliminarily generating an automated process skeleton;
[0083] S132, analyzing the operation DOM process tree, filling the automation process skeleton to obtain a filling result;
[0084] S133, binding parameter specifications to the filling result or improving it according to the server-side process visualization configuration to obtain a basic business process.
[0085] Specifically, the preliminary process generation mechanism obtains data from the orchestration results, preliminarily generates an automated process skeleton, and then refines the automated process skeleton. Specifically, through the newly added DOM process tree analysis of the listener, the automated process skeleton is continuously filled, and the automated process is automatically bound to parameter specifications to form a complete automated process. Of course, in other embodiments, the automated process generation can also be completed according to the server-side process visualization configuration.
[0086] S140 , periodically pull tasks corresponding to the specified basic business process and obtain task objects from the server.
[0087] In this embodiment, the task object refers to the relevant content of the task corresponding to the specified basic business process.
[0088] In one embodiment, see Figure 5 , the above-mentioned step S140 may include steps S141 to S142.
[0089] S141. Filter basic business processes according to process operation frequency to obtain standard processes.
[0090] In this embodiment, the standard process refers to a basic business process that is currently operated most frequently and is stored as a standard process.
[0091] S142: Acquire a task object from the server according to the characteristics of the standard process.
[0092] S150: Generate a task parameter dynamic script according to the task object and process.
[0093] In this embodiment, the task parameter dynamic script refers to a dynamic script that includes the task parameter json.
[0094] S160: Execute the task and monitor the task execution to obtain the task execution result.
[0095] In this embodiment, the task execution result refers to the result of the task automation operation.
[0096] In one embodiment, see Figure 6 , the above-mentioned step S160 may include steps S161 to S163.
[0097] S161, sending the task parameter dynamic script to the intermediate script process;
[0098] S162, the intermediate script process obtains the corresponding basic business process, dynamically assembles task parameters, and compiles them into a final process script;
[0099] S163, placing the final process script into the browser task execution thread to complete task execution, and performing task execution monitoring to obtain task execution results.
[0100] In this embodiment, the browser plug-in tool function completes the actual process code analysis, parameter binding, sends the execution command, starts the automation operation, and receives the automation operation result after the automation operation is completed, so as to achieve the convenient generation of process assembly and automatic recording of business operations.
[0101] S170: Send the task execution result to the server, so that the task execution result is stored in the server.
[0102] In other embodiments, when the plug-in displays and exports results, the results are queried from the server and customized results are returned to display data, and the plug-in responds to the needs of the browser user.
[0103] In other embodiments, Automa can be used to automate tasks. Automa is an extension that automates the browser by connecting blocks. It can complete the automated operations that users want by recording and editing process nodes. Automated operations include general operations, browser operations, Web element operations, and conditional operations, including Trigger, Delay, export data (JSON / CSV / Plain text), Repeat task; Browser operations: Active tab, New tab, Go back, Go forward, Close tab, Take screenshot; Web element operations: Click element, Get text, Scroll element, Link, Attribute value, Forms, JS script execution, Trigger event; Conditional operations: Conditions, Element exists.
[0104] The method of this embodiment uses coding to achieve the target state in a logical and standardized manner, breaking the limitations of low-code, improving the compatibility of complex processes, and reducing unnecessary processes, making it easier to use.
[0105] The above elements are an abstract expression of the operation node component; controls are a general term for a single extension with special functions; browser plug-ins are a general term for browser custom extensions.
[0106] The above-mentioned page automation implementation method forms a process tree by monitoring the operation content, arranges the operation specifications according to the process tree, and automatically generates the process. When executing the tasks corresponding to the process, the assembly process can be written and automated operations can be performed, the execution results can be monitored and recorded in real time, and the corresponding processes can be stored or cleaned up as needed to achieve page automation, with high compatibility, ease of use, and strong versatility.
[0107] Figure 7 FIG. 3 is a schematic block diagram of a page automation implementation device 300 provided in an embodiment of the present invention. Figure 7 As shown, corresponding to the above page automation implementation method, the present invention also provides a page automation implementation device 300. The page automation implementation device 300 includes a unit for executing the above page automation implementation method, and the device can be configured in a desktop computer, a tablet computer, a laptop computer, etc. Specifically, please refer to Figure 7 The page automation implementation device 300 includes an element monitoring unit 301, an element arrangement unit 302, a process generation unit 303, a pulling unit 304, a script generation unit 305, an execution unit 306 and a sending unit 307.
[0108] The element monitoring unit 301 is used to monitor user transactional operations to obtain an operation DOM process tree; the element orchestration unit 302 is used to orchestrate various similar elements according to the operation DOM process tree to obtain an orchestration result; the process generation unit 303 is used to automatically generate a basic business process according to the orchestration result; the pulling unit 304 is used to periodically pull tasks corresponding to a specified basic business process and obtain task objects from the server; the script generation unit 305 is used to generate a dynamic script for task parameters according to the task object and the process; the execution unit 306 is used to execute tasks and monitor task execution to obtain task execution results; the sending unit 307 is used to send the task execution results to the server to store the task execution results on the server.
[0109] In one embodiment, the element monitoring unit 301 is used to automatically monitor the operation DOM element according to the user's operation on the monitorable service page to form an operation DOM process tree.
[0110] In one embodiment, if Figure 8 As shown, the element arrangement unit 302 includes an acquisition subunit 3021 , a marking subunit 3022 , an arrangement subunit 3023 and an adjustment subunit 3024 .
[0111] The acquisition subunit 3021 is used to periodically acquire the operation DOM process tree from the browser memory; the marking subunit 3022 is used to use a similarity algorithm to determine the similarity of the process of the operation DOM process tree, and to form a preliminary arrangement of the process of the operation DOM process tree, and to mark the different processes in the operation DOM process tree to obtain the marking result; the arrangement subunit 3023 is used to arrange the process script according to the marking result to obtain the initial arrangement result; the adjustment subunit 3024 is used to adjust the initial arrangement result according to the arrangement configuration to obtain the arrangement result.
[0112] In one embodiment, if Fig. 9 As shown, the process generation unit 303 includes a skeleton generation subunit 3031 , a filling subunit 3032 and a perfecting subunit 3033 .
[0113] The skeleton generation subunit 3031 is used to obtain data from the orchestration result and preliminarily generate an automated process skeleton; the filling subunit 3032 is used to analyze the operation dom process tree and fill the automated process skeleton to obtain a filled result; the improvement subunit 3033 is used to bind parameter specifications to the filled result or improve it according to the server-side process visualization configuration to obtain a basic business process.
[0114] In one embodiment, if Fig.10 As shown, the pulling unit 304 includes a screening subunit 3041 and an object acquiring subunit 3042 .
[0115] The screening subunit 3041 is used to screen the basic business process according to the process operation frequency to obtain the standard process; the object acquisition subunit 3042 is used to obtain the task object from the server according to the characteristics of the standard process.
[0116] In one embodiment, if Fig.11 As shown, the execution unit 306 includes a script sending subunit 3061 , an assembling subunit 3062 and a task execution subunit 3063 .
[0117] The script sending sub-unit 3061 is used to send the task parameter dynamic script to the intermediate script process; the assembling sub-unit 3062 is used to obtain the corresponding basic business process from the intermediate script process, dynamically assemble the task parameters, and compile it into the final process script; the task execution sub-unit 3063 is used to put the final process script into the browser task execution thread to complete the task execution, and perform task execution monitoring to obtain the task execution result.
[0118] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned page automation implementation device 300 and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.
[0119] The page automation implementation device 300 can be implemented in the form of a computer program. The computer program can be implemented in the form of a computer program. Fig.12 Runs on the computer device shown.
[0120] See also Fig.12 , Fig.12 500 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a terminal, wherein the terminal may be an electronic device with communication function such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device.
[0121] See also Fig.12 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0122] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a page automation implementation method.
[0123] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0124] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a page automation implementation method.
[0125] The network interface 505 is used to communicate with other devices over the network. Fig.12 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0126] The processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps:
[0127] Monitor user transactional operations to obtain an operation DOM process tree; arrange various similar elements according to the operation DOM process tree to obtain an arrangement result; automatically generate a basic business process according to the arrangement result; regularly pull tasks corresponding to a specified basic business process and obtain task objects from a server; generate a task parameter dynamic script according to the task object and process; execute tasks and monitor task execution to obtain task execution results; send the task execution results to a server to store the task execution results on the server.
[0128] In one embodiment, the processor 502 implements the following steps when implementing the monitoring of the user transactional operation to obtain the operation DOM process tree steps:
[0129] According to the user's operation on the monitorable service page, the DOM elements are automatically monitored to form an operation DOM process tree.
[0130] Among them, the operation DOM process tree stores DOM element objects, operation coordinates relative to the page position, and previous and next operation node pointers, and compresses the content stored in the operation DOM process tree through JS compression technology, and uses a unique identifier combined with the current timestamp as a keyword. Each time the operation DOM process tree is monitored, it is stored in the browser memory as a value, and the value is used as an array. Within a set time, when the array size exceeds a set number, the data is retained, and when the array size is less than the set number, the array is cleared.
[0131] In one embodiment, when the processor 502 implements the step of arranging various similar elements according to the operation DOM process tree to obtain an arrangement result, the processor 502 specifically implements the following steps:
[0132] The operation DOM process tree is obtained from the browser memory at regular intervals; a similarity algorithm is used to determine the similarity of the processes in the operation DOM process tree, and the operation DOM process tree is formed into a preliminary process arrangement, and the processes with differences in the operation DOM process tree are marked to obtain the marking results; the process script is arranged according to the marking results to obtain the initial arrangement result; the initial arrangement result is adjusted according to the arrangement configuration to obtain the arrangement result.
[0133] In one embodiment, when the processor 502 implements the step of automatically generating a basic business process according to the orchestration result, the processor 502 specifically implements the following steps:
[0134] Acquire data from the orchestration result and preliminarily generate an automated process skeleton; analyze the operation dom process tree and fill in the automated process skeleton to obtain a filled result; bind parameter specifications to the filled result or improve it according to the server-side process visualization configuration to obtain a basic business process.
[0135] In one embodiment, the processor 502 specifically implements the following steps when implementing the step of periodically pulling the task corresponding to the specified basic business process and obtaining the task object from the server:
[0136] The basic business process is screened according to the process operation frequency to obtain the standard process; and the task object is obtained from the server according to the characteristics of the standard process.
[0137] In one embodiment, when the processor 502 implements the step of executing the task and monitoring the task execution to obtain the task execution result, the processor 502 specifically implements the following steps:
[0138] Send the task parameter dynamic script to the intermediate script process; the intermediate script process obtains the corresponding basic business process, dynamically assembles the task parameters, and compiles it into a final process script; the final process script is placed in the browser task execution thread to complete the task execution, and the task execution is monitored to obtain the task execution result.
[0139] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0140] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0141] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps:
[0142] Monitor user transactional operations to obtain an operation DOM process tree; arrange various similar elements according to the operation DOM process tree to obtain an arrangement result; automatically generate a basic business process according to the arrangement result; regularly pull tasks corresponding to a specified basic business process and obtain task objects from a server; generate a task parameter dynamic script according to the task object and process; execute tasks and monitor task execution to obtain task execution results; send the task execution results to a server to store the task execution results on the server.
[0143] In one embodiment, when the processor executes the computer program to implement the monitoring of user transactional operations to obtain the steps of operating the DOM process tree, the processor specifically implements the following steps:
[0144] According to the user's operation on the monitorable service page, the DOM elements are automatically monitored to form an operation DOM process tree.
[0145] Among them, the operation DOM process tree stores DOM element objects, operation coordinates relative to the page position, and previous and next operation node pointers, and compresses the content stored in the operation DOM process tree through JS compression technology, and uses a unique identifier combined with the current timestamp as a keyword. Each time the operation DOM process tree is monitored, it is stored in the browser memory as a value, and the value is used as an array. Within a set time, when the array size exceeds a set number, the data is retained, and when the array size is less than the set number, the array is cleared.
[0146] In one embodiment, when the processor executes the computer program to implement the step of arranging various similar elements according to the operation DOM process tree to obtain an arrangement result, the processor specifically implements the following steps:
[0147] The operation DOM process tree is obtained from the browser memory at regular intervals; a similarity algorithm is used to determine the similarity of the processes in the operation DOM process tree, and the operation DOM process tree is formed into a preliminary process arrangement, and the processes with differences in the operation DOM process tree are marked to obtain the marking results; the process script is arranged according to the marking results to obtain the initial arrangement result; the initial arrangement result is adjusted according to the arrangement configuration to obtain the arrangement result.
[0148] In one embodiment, when the processor executes the computer program to implement the step of automatically generating a basic business process according to the orchestration result, the processor specifically implements the following steps:
[0149] Acquire data from the orchestration result and preliminarily generate an automated process skeleton; analyze the operation dom process tree and fill in the automated process skeleton to obtain a filled result; bind parameter specifications to the filled result or improve it according to the server-side process visualization configuration to obtain a basic business process.
[0150] In one embodiment, when the processor executes the computer program to implement the step of periodically pulling the task corresponding to the specified basic business process and obtaining the task object from the server, the processor specifically implements the following steps:
[0151] The basic business process is screened according to the process operation frequency to obtain the standard process; and the task object is obtained from the server according to the characteristics of the standard process.
[0152] In one embodiment, when the processor executes the computer program to implement the task execution and monitors the task execution to obtain the task execution result step, the processor specifically implements the following steps:
[0153] Send the task parameter dynamic script to the intermediate script process; the intermediate script process obtains the corresponding basic business process, dynamically assembles the task parameters, and compiles it into a final process script; the final process script is placed in the browser task execution thread to complete the task execution, and the task execution is monitored to obtain the task execution result.
[0154] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0155] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0156] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0157] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention 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.
[0158] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0159] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A page automation implementation method, characterized in that: include: Monitor user transaction operations to obtain the operation DOM process tree; Arrange various similar elements according to the operation DOM process tree to obtain an arrangement result; Automatically generate basic business processes according to the arrangement results; Pull the tasks corresponding to the specified basic business process regularly and obtain the task objects from the server; Generate a task parameter dynamic script according to the task object and process; Execute tasks and monitor task execution to obtain task execution results; Sending the task execution result to the server to store the task execution result on the server; The arrangement of various similar elements according to the operation DOM process tree to obtain an arrangement result includes: Obtain the operation DOM process tree from the browser memory at regular intervals; Using a similarity algorithm to determine the similarity of the processes of the operation dom process tree, and forming a preliminary arrangement of the processes of the operation dom process tree, and marking the processes with differences in the operation dom process tree to obtain a marking result; Perform process script arrangement according to the annotation results to obtain the initial arrangement results; The initial orchestration result is adjusted according to the orchestration configuration to obtain an orchestration result; and the basic business process is automatically generated according to the orchestration result, including: Acquire data from the orchestration results to preliminarily generate an automation process skeleton; Analyze the operation DOM process tree and fill the automation process skeleton to obtain a filling result; Binding parameter specifications to the filling results or improving them according to the visual configuration of the server-side process to obtain the basic business process; The monitoring of user transactional operations to obtain the operation DOM process tree includes: According to the user's operation on the monitorable service page, the DOM elements are automatically monitored to form the operation DOM process tree; The operation DOM process tree stores DOM element objects, operation coordinates relative to the page position, and previous and next operation node pointers. The content stored in the operation DOM process tree is compressed using JS compression technology, and a unique identifier combined with a current timestamp is used as a keyword. Each time the operation DOM process tree is monitored, it is stored in the browser memory as a value, and the value is used as an array. Within a set time, when the array size exceeds a set number, the data is retained, and when the array size is less than the set number, the array is cleared.
2. The page automation implementation method according to claim 1, characterized in that: The periodic pulling of tasks corresponding to the specified basic business process and obtaining task objects from the server includes: Filter basic business processes according to process operation frequency to obtain standard processes; Obtain the task object from the server according to the characteristics of the standard process.
3. The page automation implementation method according to claim 1, characterized in that: The executing the task and monitoring the task execution to obtain the task execution result includes: Sending the task parameter dynamic script to the intermediate script process; The intermediate script process obtains the corresponding basic business process, dynamically assembles task parameters, and compiles them into the final process script; Put the final process script into the browser task execution thread to complete the task execution, and monitor the task execution to obtain the task execution result.
4. A page automation implementation device, characterized in that: include: The element monitoring unit is used to monitor the user's transactional operations to obtain the operation DOM process tree; An element arrangement unit, used for arranging various similar elements according to the operation DOM process tree to obtain an arrangement result; A process generation unit, used to automatically generate a basic business process according to the arrangement result; The pulling unit is used to periodically pull the tasks corresponding to the specified basic business process and obtain the task objects from the server; A script generation unit, used to generate a task parameter dynamic script according to the task object and process; An execution unit is used to execute tasks and monitor task execution to obtain task execution results; A sending unit, used for sending the task execution result to the server, so that the task execution result is stored in the server; The element arrangement unit includes an acquisition subunit, a marking subunit, an arrangement subunit and an adjustment subunit; An acquisition subunit is used to periodically acquire the operation DOM process tree from the browser memory; A marking subunit is used to use a similarity algorithm to determine the similarity of the process of the operation dom process tree, and to preliminarily arrange the process of the operation dom process tree, and to mark the processes with differences in the operation dom process tree to obtain a marking result; Orchestration The subunit is used to perform process script arrangement according to the annotation results to obtain the initial arrangement result; An adjusting subunit, configured to adjust the initial arrangement result according to an arrangement configuration to obtain an arrangement result; The process generation unit includes a skeleton generation subunit, a filling subunit and a perfecting subunit; A skeleton generation subunit, used to obtain data from the arrangement result and preliminarily generate an automated process skeleton; A filling subunit is used to analyze the operation DOM process tree and fill the automation process skeleton to obtain a filling result; A perfecting subunit is used to bind parameter specifications to the filling result or perfect it according to the server-side process visualization configuration to obtain a basic business process; The monitoring of user transactional operations to obtain the operation DOM process tree includes: According to the user's operation on the monitorable service page, the DOM elements are automatically monitored to form the operation DOM process tree; The operation DOM process tree stores DOM element objects, operation coordinates relative to the page position, and previous and next operation node pointers. The content stored in the operation DOM process tree is compressed using JS compression technology, and a unique identifier combined with a current timestamp is used as a keyword. Each time the operation DOM process tree is monitored, it is stored in the browser memory as a value, and the value is used as an array. Within a set time, when the array size exceeds a set number, the data is retained, and when the array size is less than the set number, the array is cleared.
5. A computer device, characterized in that: The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 3 when executing the computer program.
6. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
