CN111736837A - Method, device and equipment for restoring webpage operation, readable storage medium and system - Google Patents

Method, device and equipment for restoring webpage operation, readable storage medium and system Download PDF

Info

Publication number
CN111736837A
CN111736837A CN202010860222.6A CN202010860222A CN111736837A CN 111736837 A CN111736837 A CN 111736837A CN 202010860222 A CN202010860222 A CN 202010860222A CN 111736837 A CN111736837 A CN 111736837A
Authority
CN
China
Prior art keywords
information
target element
restored
path
webpage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010860222.6A
Other languages
Chinese (zh)
Other versions
CN111736837B (en
Inventor
张野
陈泽瀛
陈志豪
李欣刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Ums Co ltd
Original Assignee
China Ums Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Ums Co ltd filed Critical China Ums Co ltd
Priority to CN202010860222.6A priority Critical patent/CN111736837B/en
Publication of CN111736837A publication Critical patent/CN111736837A/en
Application granted granted Critical
Publication of CN111736837B publication Critical patent/CN111736837B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides a webpage operation restoration method, a webpage operation restoration system, a webpage operation restoration device and a readable storage medium. And responding to the recursive path inquired into the information to be restored, and performing operation indicated by the operation information of the target element on the target element with the recursive path in the webpage. Compared with the method for traversing and searching the target element from the root node in the prior art, the method can directly position the target element according to the element identifier of the target element, and expand and position the target element from the leaf node to the root node according to the recursive path of the target element. The method avoids the defects that in the prior art, in a scene with a complex page, the positioning of the target elements takes long time, the efficiency is low, and all the target elements cannot be obtained.

Description

Method, device and equipment for restoring webpage operation, readable storage medium and system
Technical Field
The present application relates to the field of electronic information, and in particular, to a method, an apparatus, a device, a readable storage medium, and a system for restoring a web page operation.
Background
The falling of the AI (Artificial Intelligence) technology and the increase of the labor cost are used as catalysts for the process automation development, and the process automation is not only faster and faster in development speed, but also wider and wider in application scenes, and thus, the enthusiasm of process automation products is created. RPA (robust Process Automation) is translated into a Process automation robot, is intelligent software, and realizes automation in a work flow by simulating and enhancing the interaction Process of a human and a computer.
When the existing RPA restores the operation process of a person on a webpage, the time is prolonged under the condition that a large number of elements exist on the webpage, and for a complex webpage with a large number of nested HTML, the nested HTML elements cannot be obtained, so that the operation of the person on the webpage cannot be restored accurately.
It can be seen that how to reduce the time delay of web page restoring operation and improve the accuracy becomes a problem to be solved urgently at present.
Disclosure of Invention
The application provides a method, a device, equipment, a readable storage medium and a system for restoring webpage operation, and aims to reduce the time delay of webpage restoring operation and improve the accuracy.
In order to achieve the above object, the present application provides the following technical solutions:
a method for restoring webpage operation comprises the following steps:
acquiring information to be restored, wherein the information to be restored comprises attribute information and operation information of a target element, the target element is an element operated by a person in a webpage, the attribute information is used for indicating an attribute of the target element, the operation information is used for indicating an operation executed by the person on the target element, the attribute information comprises at least one of an element identifier, a recursive path and a traversal path, the recursive path is a path which is expanded from a leaf node to a root node, and the traversal path is a path which is expanded from the root node to the leaf node;
responding to the element identification in the information to be restored, and performing operation indicated by the operation information of the first target element on the first target element in the webpage; the first target element is the target element with the element identification;
responding to the recursive path inquired in the information to be restored, and performing operation indicated by the operation information of a second target element in the webpage; the second target element is the target element indicated by the leaf node in the recursive path.
Optionally, the method further comprises:
responding to the element identification and the recursive path which are not inquired in the information to be restored, and performing operation indicated by operation information of a third target element in the webpage; the third target element is the target element indicated by the last preset character string in the traversal path.
Optionally, the operation indicated by the operation information includes at least one of:
and calling a packaging function of a mouse interface and/or a keyboard interface in the FIaUI library to perform the operation indicated by the operation information.
Optionally, obtaining information to be restored includes:
and receiving the information to be restored, wherein the attribute information and the operation information of the target element are acquired in an automatic and/or man-machine interaction mode.
Optionally, in response to querying the element identifier in the information to be restored, performing an operation indicated by operation information of a first target element in the web page, where the operation is performed on the first target element, and the operation includes:
under the condition that no self-defined restoring rule exists, responding to the element identification in the information to be restored, and performing operation indicated by operation information of a first target element in the webpage;
the operation indicated by the operation information of the second target element is performed on the second target element in the webpage in response to the query of the recursive path in the information to be restored, and the operation includes:
under the condition that the self-defined restoring rule does not exist, responding to the recursive path inquired in the information to be restored, and performing operation indicated by operation information of a second target element in the webpage;
the method further comprises the following steps:
and under the condition that the user-defined reduction rule exists, operating the target element according to the user-defined reduction rule.
A web page operated restoring apparatus includes:
the information recovery method includes acquiring information to be recovered, where the information to be recovered includes attribute information and operation information of a target element, the target element is an element operated by a person in a web page, the attribute information is used to indicate an attribute of the target element, the operation information is used to indicate an operation performed on the target element by the person, the attribute information includes at least one of an element identifier, a recursive path and a traversal path, the recursive path is a path extending from a leaf node to a root node, and the traversal path is a path extending from the root node to the leaf node;
the first operation unit is used for responding to the element identifier in the information to be restored by inquiring, and performing operation indicated by the operation information of the first target element on the first target element in the webpage; the first target element is the target element with the element identification;
the second operation unit is used for responding to the recursive path inquired in the information to be restored and performing operation indicated by the operation information of a second target element in the webpage; the second target element is the target element indicated by the leaf node in the recursive path.
A web page operated restoring apparatus, comprising: a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement the steps of the method for restoring the webpage operation.
A readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the method for restoring a web page operation as described above.
A web page operated restore system, comprising:
a designer, a robot and a management control platform;
the designer is used for acquiring information to be restored and sending the information to be restored to the management control platform; the information to be restored comprises attribute information and operation information of a target element, the target element is an element operated by a person in a webpage, the attribute information is used for indicating the attribute of the target element, the operation information is used for indicating the operation executed by the person on the target element, the attribute information comprises at least one of an element identifier, a recursive path and a traversal path, the recursive path is a path which starts from a leaf node and extends to a root node, and the traversal path is a path which starts from the root node and extends to the leaf node;
the management control platform is used for sending the information to be restored to the robot;
the robot is used for responding to the element identification in the information to be restored, and performing operation indicated by the operation information of the first target element on the first target element in the webpage; the first target element is the target element with the element identification;
responding to the recursive path inquired in the information to be restored, and performing operation indicated by the operation information of a second target element in the webpage; the second target element is the target element indicated by the leaf node in the recursive path.
Optionally, the management control platform is further configured to at least one of:
sending a heartbeat message to the robot, the heartbeat message being used for the robot to maintain a heartbeat consistent with the management control platform;
monitoring a state of the robot.
According to the webpage operation restoration method, device, equipment, readable storage medium and system, information to be restored is obtained, the information to be restored comprises attribute information and operation information of a target element, the target element is an element operated by a person in a webpage, the attribute information is used for indicating the attribute of the target element, the operation information is used for indicating the operation executed by the person on the target element, and the attribute information comprises at least one of an element identifier, a recursive path and a traversal path. And responding to the element identification in the information to be restored, and performing operation indicated by the operation information of the target element on the target element with the element identification in the webpage. And responding to the recursive path inquired into the information to be restored, and performing operation indicated by the operation information of the target element on the target element with the recursive path in the webpage. Compared with the method for traversing and searching the target element from the root node in the prior art, the target element can be directly positioned according to the element identifier of the target element, so that the time delay of the operation of restoring the webpage is reduced. And the target elements are expanded and positioned from the leaf nodes to the root nodes according to the recursion paths of the target elements, so that the defect that all the target elements cannot be obtained in the scene of more nested HTML complex pages in the prior art is overcome. In conclusion, the method reduces the time delay of the webpage restoring operation and improves the accuracy of the webpage restoring operation.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a restoring system for web page operation according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a specific implementation manner of a restoring method for web page operation according to an embodiment of the present application;
fig. 3 is a service system architecture diagram of a process automation platform according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a method for restoring a web page operation according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a restoring apparatus for web page operation according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a restoring apparatus for web page operation according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The webpage operation restoring method provided by the embodiment of the application is based on the webpage operation restoring system to accurately restore the operation of people on the webpage. Fig. 1 is a system for restoring a web page operation according to an embodiment of the present disclosure, and as shown in fig. 1, the system for restoring a web page operation includes a designer, a robot, and a management control platform.
Fig. 2 is a specific implementation process of a method for restoring a web page operation, which is implemented by interacting components in a web page operating system according to an embodiment of the present application, and as shown in fig. 2, the method specifically includes the following steps:
s201, the designer acquires information to be restored.
In this embodiment, the information to be restored includes attribute information and operation information of the target element, and the target element is an element operated by a person in the web page.
In this embodiment, a human-computer interaction module, that is, an element selector is arranged in the designer, and in practical application, a person (that is, a user, which may be a pre-registered account) triggers a selection instruction of the element selector, and the element selector acquires and stores information to be restored. It should be noted that the way for the element selector to store the information to be restored is to store a json array including the target element, and the way for the element selector to store the json array is as follows: starting from the root node of the web page's HTML, the pages are saved layer by layer until the leaf nodes, each layer being a json string. Taking the selection of the Baidu input box as an example, the first json array is information such as url of a webpage, and the embodiment skips the first json array when elements are matched, and starts matching from the HTML root node.
In this embodiment, the element selector includes two selectable modes for selecting information to be restored, the first mode is an automatic mode, and the second mode is a human-computer interaction mode. The present embodiment introduces the trigger condition and the selection process of two modes, as follows:
first, in the automatic mode, the designer automatically obtains the information to be restored through an element selector.
Specifically, the designer responds to an instruction of a user for opening the element selector, pops up a selection window of the element selector, the selection window presets a selection button, when the user clicks the selection button, the selection window of the selector is hidden, further, when the user clicks an element needing to be operated on a webpage, the element selector automatically acquires the element (marked as a target element) operated by the user in the webpage, automatically analyzes information of the webpage into a json array and stores the json array, accordingly, the acquisition of the target element is completed once, then pops up the click window of the selector again, and the operation is circulated until all elements operated by the user in the webpage are automatically acquired.
It should be noted that the clicking operation generally refers to mouse clicking, and in the first mode, the element selector can automatically acquire an element operated by the user in the web page, that is, the target element, only by a simple clicking operation of the user.
It should be further noted that, after automatically acquiring the information to be restored, the designer stores and displays the information in a json array, where the information is displayed in a tree diagram structure, and the target element is highlighted.
Secondly, in a man-machine interaction mode, the designer acquires information to be restored through interaction of the element selector and a user.
The designer responds to the instruction of the user for opening the element selector, pops up a selection window of the element selector, and displays each element in the webpage in a tree diagram structure in the selection window. When a user queries layer by layer in the tree diagram and clicks and selects an element operated manually on a webpage, the element selector acquires the clicked element as a target element and identifies the clicked element by highlighting.
It should be noted that, Web frames are various in types and Web pages are complex, and in this embodiment, the information to be restored is obtained through the human-computer interaction mode, so that the accuracy of the information to be restored can be improved.
It should be noted that, in the information to be restored obtained in the two modes, the attribute information of the target element is used to indicate the attribute of the target element, the operation information is used to indicate the operation performed on the target element by a person, and the attribute information includes an element identifier, a recursive path, and a traversal path.
When the attribute information of the target element comprises the element identifier, the element selector acquires the element identifier of the target element and stores the element identifier as information to be restored to the json array.
A recursive path is a path that extends from a leaf node to a root node. When the attribute information of the target element comprises the recursion path, the element selector acquires the recursion path of the target element and stores the recursion path of the target element as information to be restored to the json array, and at the moment, the element selector does not need to store the information of the whole path of the target element.
The traversal path is a path (namely, a full path) which is expanded from the root node to the leaf node, and when the attribute information of the target element includes the traversal path, the element selector acquires the traversal path of the target element and stores the traversal path of the target element as information to be restored to the json array.
It should be noted that the attribute information of the target element includes at least one of an element identifier, a recursive path, and a traversal path.
S202, the designer sends the information to be restored to the management control platform.
And S203, the management control platform sends the information to be restored to the robot.
And S204, the robot inquires whether a custom reduction rule exists, executes S205-S207 under the condition that the custom reduction rule does not exist, and executes S208 under the condition that the custom reduction rule exists.
In this embodiment, the customized restoration rule is a preset personalized restoration rule, is customized by a user according to actual needs, and is integrated into the element selector.
S205, the robot inquires whether the acquired information to be restored comprises the element identification of the target element.
If the operation information is the first target element, the robot responds to the element identifier in the information to be restored, and performs operation indicated by the operation information of the first target element on a target element (marked as the first target element) with the element identifier in the webpage.
It should be noted that MSHTML provides seven HTML document interfaces and encapsulates various methods of document into HTMLDocument. When the attribute information of the target element comprises the element identifier, the element selector acquires the element identifier of the target element, stores the element identifier as information to be restored to the json array, and sends the information to be restored to the robot through the management control platform. In this step, the robot receives the information to be restored, queries the element identifier of the target element from the information to be restored, and executes the operation indicated by the operation information according to the operation information of the target element, and optionally, the robot calls a getElementById () method in the HTMLDocument interface to execute the operation indicated by the operation information.
In this embodiment, the operation instructed by the operation information of the first target element by the robot may include general operations, such as a value assignment operation, a click operation, and a selection operation. Wherein the value assignment uses the value attribute of the first target element, the click is a trigger click event, and the selection is a trigger select event. In general, generic operations can be encapsulated, and the operating requirements of the robot on the first target element are satisfied by invoking the encapsulation function. In this embodiment, in order to better simulate human-computer interaction and reduce the operation of the first target element by the human, the mouse interface and the keyboard interface are packaged in advance, and the packaging function is stored.
In this embodiment, the mouse interface is encapsulated, so that a click event can be triggered by a mouse click operation, and a mousedown event, a mouseup event, a left click event, and a right click event can also be triggered.
For assignment operation, most input boxes can directly assign the attribute of the first target element, but at least one of the following problems (1) - (3) exists.
(1) Password entry in an entry box (e.g., a login box) cannot be directly assigned a value.
(2) The input box can be assigned with a value, but a correct password is input, and a password error is displayed when logging in.
(3) Input box assignments cannot trigger fuzzy queries.
In this embodiment, the keyboard interface is encapsulated, so that the keyboard input operation can trigger the relevant events after the assignment. To solve the above problems (1) to (3). For example, the keyboard interface is packaged, so that the assignment of an input box (e.g., a drop-down box) of a preset type triggers a fuzzy query, so that a keyboard input operation can trigger an assignment operation.
It should be noted that FlaUI is a UI automation library, and calls the encapsulation function of the mouse interface and the keyboard interface therein, so as to simulate the operation of the keyboard and the mouse. Therefore, in this embodiment, the robot performs an operation indicated by the operation information of the first target element by calling a package function of the mouse interface and/or the keyboard interface in the FIaUI library.
S206, if the element identification of the target element is not inquired, the robot inquires whether the acquired information to be restored comprises the recursion path of the target element.
If the operation information of the second target element is the operation information of the first target element, the robot responds to the recursive path in the information to be restored, and the operation information of the second target element is indicated. Wherein the second target element is the target element indicated by the leaf node in the recursive path.
In this embodiment, the recursive path is a path that extends from the leaf node to the root node. When the robot responds to the recursion path of the second target element, recursion is performed to the leaf node, if the leaf node is matched, the parent node of the leaf node is matched, at the moment, index of the json array is reduced by 1, the unmatched nodes are pruned until the target element indicated by the leaf node in the recursion path is matched, at the moment, all information checks pass, and the final leaf node is the second target element needing to be operated.
The robot calls a package function of the mouse interface and/or the keyboard interface in the FIaUI library to perform an operation indicated by the operation information of the second target element. The specific implementation process may refer to S205 described above.
And S207, if the recursive path of the target element is not inquired, the robot performs operation indicated by the operation information of the third target element on the third target element in the webpage.
Specifically, since the information to be restored at least includes at least one of an element identifier, a recursive path, or a traversal path of the target element, when the robot queries the acquired information to be restored and does not query the element identifier and the recursive path in the information to be restored, the robot responds to the element identifier and the recursive path that are not queried in the information to be restored, and performs an operation indicated by the operation information of the third target element on the third target element in the web page. In this embodiment, the traversal path is a path that extends from the root node to the leaf node, and the third target element is a target element indicated by the last preset character string in the traversal path.
For example, the robot filters child nodes through a traversal path of a third target element from a root node, finds a matched child node through attributes such as tagName, className, id, IndexInParent and the like, adds 1 to an index of a json array, continues to match the child nodes of the child nodes, and so on until a target element indicated by a last preset character string in the traversal path is matched. At this time, the information check is all passed, and the final child node, i.e., the leaf node, is the third target element that needs to be operated.
The robot performs an operation indicated by the operation information of the third target element by calling a wrapper function of the mouse interface and/or the keyboard interface in the FIaUI library. The specific implementation process may refer to S205 described above.
And S208, operating the target element according to the customized reduction rule under the condition that the customized reduction rule exists.
Version updates can present usage problems because the framework of the Web system is extensive and update iterations are frequent. Js framework, for example, there is Id attribute for elements inside packaged components, Id is dynamically and randomly assigned, Id is dynamically assigned again when a window or a web page is closed and reopened, Id is different twice before Id and after Id, and Id attribute matching is artificially removed when the element attribute is checked, but since web page elements are numerous, efficiency is too low, and customized development is needed.
The method aims to avoid the problems of increased communication cost or low efficiency caused by customized development. In the embodiment, a customized development method is used as a self-defined reduction rule and is integrated into an element selector. When the element selector is provided with a self-defined reduction rule, a user converts an element operated in a webpage and an operation on the element into JavaScript and uses the JavaScript as an input parameter in the element selector, and when a process is executed, the RPA can directly embed the JavaScript into a browser for execution.
Based on the self-defined reduction rule, when the adjacent element of the target element has a fixed element identifier, the robot can quickly locate the target element operated by the person in the webpage by a method of ParentNode or Children, and operate the target element according to the self-defined reduction rule. In this embodiment, the robot can check the monitoring event of the target element through the Chrome browser, and directly call the monitoring event by using JavaScript embedded in the browser.
According to the technical scheme, the designer obtains and stores the information to be restored, wherein the information to be restored comprises the attribute information and the operation information of the target element, the information to be restored is sent to the robot through the management control platform, and the robot performs operation information indication operation on the target element according to the inquired attribute information of the target element in the information to be restored.
For the prior art, the beneficial effects of the method for restoring the webpage operation provided by the embodiment of the application are analyzed as follows:
first, in the method for restoring a web page operation provided in the embodiment of the present application, an operation indicated by operation information of a target element is directly performed on the target element having an element identifier in a web page. All nodes do not need to be traversed, and the reduction efficiency is improved.
For example, when there are many HTML elements in a website, it takes time to use the Children attribute of the IHTMLElement interface in the prior art when traversing nodes, each time the Children attribute is called, it takes several hundred milliseconds, and if the number of layers of an element is 50, it takes half a minute to find the element. When the attribute information of the target element comprises the element identifier, the getElementById () method in the HTMLdocument interface is directly called, the operation indicated by the operation information is executed, and the reduction efficiency of the operation on the complex webpage element is greatly improved.
Secondly, in the restoring method of the web page operation provided by the embodiment of the present application, the operation indicated by the operation information of the target element is performed on the target element having the recursive path in the web page. All nodes do not need to be traversed, and the reduction efficiency is improved.
For example, in practical application, nested HTML exists, and the elements in the nested HTML cannot be obtained by the prior art when the prior art is directly traversed from the root node. By the method for matching according to the recursive path, provided by the embodiment, recursive matching is performed from the leaf node to the root node, and the defect that all elements cannot be obtained by the root node traversal method is overcome.
Third, in the restoring method for web page operations provided by the embodiment of the application, customized user-defined restoring rules are supported, elements operated in the web page and operations on the elements are converted into JavaScript and used as an input parameter in an element selector, and the problem that communication cost is increased or communication efficiency is low due to customized development in the prior art is solved.
Fourth, in the method for restoring web page operations provided in the embodiment of the present application, movement and clicking of a Mouse are realized through a Mouse interface in a FlaUI framework, so that real operations of a human are simulated. The method overcomes the defects that in the prior art, a click event scene can only trigger click, and operation events such as mousedown and mouseup cannot be triggered.
Fifth, in the method for restoring web page operations provided in this embodiment of the present application, the Keyboard interface in the FlaUI framework is used to implement the operation of inputting by a human simulator through a Keyboard, and the Keyboard interface is packaged on the basis of the Keyboard interface, so that the function of a combination key is added. The method overcomes the defect that the element assignment operation can not directly assign the element in the prior art.
In summary, the method for restoring the webpage operation provided by the embodiment effectively solves the problems that the browser operates Web elements inaccurately, the speed is slow, events cannot be triggered, and the efficiency is low due to customized design.
It should be noted that the system for restoring a web page operation provided in the embodiment of the present application is developed based on an MSHTML component, where MSHTML is a typesetting engine of microsoft Windows-loaded browser (IE), specifically, MSHTML encapsulates all elements and attributes thereof in an HTML language, and an interface provided by MSHTML can operate the elements in the HTML language.
The web page restoration system shown in fig. 1 can be explained with the following functions. The following were used:
the management control platform is also used for sending heartbeat messages to the robot, wherein the heartbeat messages are used for keeping the heartbeat of the robot consistent with that of the management control platform, receiving an operation log fed back by the robot and monitoring the self state of the robot and the execution state of the process. In this embodiment, the management control platform is further configured to feed back status information to the user side (pre-registered account).
It should be noted that the recovery system operated by the web page may also perform an authentication or verification process.
Specifically, the designer receives a login request responding to a user, provides a login window, and receives user information input by the user, such as account information and password information, the designer sends the user information to the management control platform, and the management control platform verifies the user information based on the registration information and feeds the verification information back to the designer.
In this embodiment, the certificate management of the designer and the robot is performed by a certificate management service preset in the management control platform, as shown in fig. 3, fig. 3 shows an architecture of a process automation platform, where a service system architecture diagram of the RPA certificate management service is shown on the right side of fig. 3.
It should be noted that the specific implementation process of the restoring method of the web page operation illustrated in fig. 2 is only an optional method for implementing the restoring of the web page operation. The embodiment may also have other specific implementations for implementing the restoration of the web page operation. For example, in this embodiment, the operation of performing the operation information indication is performed by calling the package function of the mouse interface and/or the keyboard interface in the FIaUI library, which is only one way of performing the operation information indication, and may also be implemented by using other existing ways.
In summary, the embodiment summarizes the web page restoring operation of the robot as the method shown in fig. 4, and as shown in fig. 4, the web page restoring method of the robot includes the following steps.
S401, information to be restored is obtained.
The information to be restored comprises attribute information and operation information of the target element, the target element is an element operated by a person in a webpage, the attribute information is used for indicating the attribute of the target element, and the operation information is used for indicating the operation executed by the person on the target element.
The attribute information includes at least one of an element identifier, a recursive path and a traversal path, the recursive path is a path extending from a leaf node to a root node, and the traversal path is a path extending from the root node to the leaf node.
It should be noted that the information to be restored is acquired by the designer and sent to the robot through the management control platform. Reference may be made in particular to the embodiments described above.
S402, responding to the element identification in the information to be restored, and performing operation indicated by the operation information of the first target element on the first target element in the webpage.
In this embodiment, the first target element is a target element having an element identifier. Specifically, reference may be made to the above S205, which is not described herein again.
And S403, responding to the recursive path inquired into the information to be restored, and performing operation indicated by the operation information of the second target element on the second target element in the webpage.
In this embodiment, the second target element is a target element indicated by a leaf node in the recursive path. Reference may be specifically made to the above S206, which is not described herein again.
According to the technical scheme, the robot responds to the element identifier in the information to be restored by inquiring, and performs operation indicated by the operation information of the target element on the target element with the element identifier in the webpage. And responding to the recursive path inquired into the information to be restored, and performing operation indicated by the operation information of the target element on the target element with the recursive path in the webpage. Compared with the method for traversing and searching the target element from the root node in the prior art, the method can directly position the target element according to the element identifier of the target element, and reduces the time delay of the operation of restoring the webpage. In addition, the method expands and positions the target elements from the leaf nodes to the root nodes according to the recursion paths of the target elements, and avoids the defect that all the target elements cannot be obtained in the scene of a complex page in the prior art. In conclusion, the method reduces the time delay of the webpage restoring operation and improves the accuracy and efficiency of the webpage restoring operation.
Fig. 5 is a schematic structural diagram of a restoring apparatus for web page operation according to an embodiment of the present application, and as shown in fig. 5, the apparatus includes:
an information obtaining unit 501, configured to obtain information to be restored, where the information to be restored includes attribute information and operation information of a target element, the target element is an element operated by a person in a web page, the attribute information is used to indicate an attribute of the target element, the operation information is used to indicate an operation performed on the target element by the person, the attribute information includes at least one of an element identifier, a recursive path and a traversal path, the recursive path is a path extending from a leaf node to a root node, and the traversal path is a path extending from the root node to the leaf node;
a first operation unit 502, configured to perform, in response to querying the element identifier in the to-be-restored information, an operation indicated by operation information of a first target element in the web page for the first target element; the first target element is the target element with the element identification;
a second operation unit 503, configured to perform, in response to the query of the recursive path in the information to be restored, an operation indicated by operation information of a second target element in the web page; the second target element is the target element indicated by the leaf node in the recursive path.
Optionally, the apparatus further comprises a third operation unit, the third operation unit is configured to:
responding to the element identification and the recursive path which are not inquired in the information to be restored, and performing operation indicated by operation information of a third target element in the webpage; the third target element is the target element indicated by the last preset character string in the traversal path.
Optionally, the first operation unit or the second operation unit performs an operation indicated by the operation information, where the operation includes at least one of:
the first operation unit or the second operation unit is specifically configured to:
and calling a packaging function of a mouse interface and/or a keyboard interface in the FIaUI library to perform the operation indicated by the operation information.
The information acquisition unit is used for acquiring the information to be restored, and comprises:
the information acquisition unit is specifically configured to: and receiving the information to be restored, wherein the attribute information and the operation information of the target element are acquired in an automatic and/or man-machine interaction mode.
Optionally, the first operation unit is configured to, in response to querying the element identifier in the information to be restored, perform, on a first target element in the web page, an operation indicated by operation information of the first target element, and includes: the first operation unit is specifically configured to:
under the condition that no self-defined restoring rule exists, responding to the element identification in the information to be restored, and performing operation indicated by operation information of a first target element in the webpage;
optionally, the second operation unit is configured to, in response to the query of the recursive path in the information to be restored, perform, on a second target element in the web page, an operation indicated by operation information of the second target element, and includes: the second operation unit is specifically configured to:
under the condition that the self-defined restoring rule does not exist, responding to the recursive path inquired in the information to be restored, and performing operation indicated by operation information of a second target element in the webpage;
optionally, the apparatus further comprises a fourth operation unit, the fourth operation unit is configured to:
and under the condition that the user-defined reduction rule exists, operating the target element according to the user-defined reduction rule.
An embodiment of the present application further provides a restoring apparatus for web page operation, please refer to fig. 6, which shows a schematic structural diagram of the restoring apparatus for web page operation, where the apparatus may include: at least one processor 601, at least one communication interface 602, at least one memory 603, and at least one communication bus 604;
in the embodiment of the present application, the number of the processor 601, the communication interface 602, the memory 603, and the communication bus 604 is at least one, and the processor 601, the communication interface 602, and the memory 603 complete communication with each other through the communication bus 604;
the processor 601 may be a central processing unit CPU, or an application specific Integrated circuit asic, or one or more Integrated circuits configured to implement embodiments of the present invention, or the like;
the memory 603 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory), for example, at least one disk memory;
the memory stores programs, and the processor can execute the programs stored in the memory to realize the restoring method of the webpage operation.
The embodiment of the present application also provides a readable storage medium, which may store a computer program suitable for being executed by a processor, and when the computer program is executed by the processor, the method for restoring the webpage operation as described above is implemented.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for restoring webpage operation is characterized by comprising the following steps:
acquiring information to be restored, wherein the information to be restored comprises attribute information and operation information of a target element, the target element is an element operated by a person in a webpage, the attribute information is used for indicating an attribute of the target element, the operation information is used for indicating an operation executed by the person on the target element, the attribute information comprises at least one of an element identifier, a recursive path and a traversal path, the recursive path is a path which is expanded from a leaf node to a root node, and the traversal path is a path which is expanded from the root node to the leaf node;
responding to the element identification in the information to be restored, and performing operation indicated by the operation information of the first target element on the first target element in the webpage; the first target element is the target element with the element identification;
responding to the recursive path inquired in the information to be restored, and performing operation indicated by the operation information of a second target element in the webpage; the second target element is the target element indicated by the leaf node in the recursive path.
2. The method of claim 1, further comprising:
responding to the element identification and the recursive path which are not inquired in the information to be restored, and performing operation indicated by operation information of a third target element in the webpage; the third target element is the target element indicated by the last preset character string in the traversal path.
3. The method of claim 1, wherein performing the operation indicated by the operation information comprises at least one of:
and calling a packaging function of a mouse interface and/or a keyboard interface in the FIaUI library to perform the operation indicated by the operation information.
4. The method of claim 1, wherein the obtaining information to be restored comprises:
and receiving the information to be restored, wherein the attribute information and the operation information of the target element are acquired in an automatic and/or man-machine interaction mode.
5. The method according to claim 1, wherein the performing, for a first target element in the web page, an operation indicated by operation information of the first target element in response to querying the element identifier in the information to be restored comprises:
under the condition that no self-defined restoring rule exists, responding to the element identification in the information to be restored, and performing operation indicated by operation information of a first target element in the webpage;
the operation indicated by the operation information of the second target element is performed on the second target element in the webpage in response to the query of the recursive path in the information to be restored, and the operation includes:
under the condition that the self-defined restoring rule does not exist, responding to the recursive path inquired in the information to be restored, and performing operation indicated by operation information of a second target element in the webpage;
the method further comprises the following steps:
and under the condition that the user-defined reduction rule exists, operating the target element according to the user-defined reduction rule.
6. A web page operation restoring apparatus, comprising:
the information recovery method includes acquiring information to be recovered, where the information to be recovered includes attribute information and operation information of a target element, the target element is an element operated by a person in a web page, the attribute information is used to indicate an attribute of the target element, the operation information is used to indicate an operation performed on the target element by the person, the attribute information includes at least one of an element identifier, a recursive path and a traversal path, the recursive path is a path extending from a leaf node to a root node, and the traversal path is a path extending from the root node to the leaf node;
the first operation unit is used for responding to the element identifier in the information to be restored by inquiring, and performing operation indicated by the operation information of the first target element on the first target element in the webpage; the first target element is the target element with the element identification;
the second operation unit is used for responding to the recursive path inquired in the information to be restored and performing operation indicated by the operation information of a second target element in the webpage; the second target element is the target element indicated by the leaf node in the recursive path.
7. A web page operated restoring apparatus, comprising: a memory and a processor;
the memory is used for storing programs;
the processor is used for executing the program and realizing the steps of the webpage operation restoring method according to any one of claims 1 to 5.
8. A readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing the steps of the method for restoring a web page operation according to any one of claims 1 to 5.
9. A system for restoring web page operations, comprising:
a designer, a robot and a management control platform;
the designer is used for acquiring information to be restored and sending the information to be restored to the management control platform; the information to be restored comprises attribute information and operation information of a target element, the target element is an element operated by a person in a webpage, the attribute information is used for indicating the attribute of the target element, the operation information is used for indicating the operation executed by the person on the target element, the attribute information comprises at least one of an element identifier, a recursive path and a traversal path, the recursive path is a path which starts from a leaf node and extends to a root node, and the traversal path is a path which starts from the root node and extends to the leaf node;
the management control platform is used for sending the information to be restored to the robot;
the robot is used for responding to the element identification in the information to be restored, and performing operation indicated by the operation information of the first target element on the first target element in the webpage; the first target element is the target element with the element identification;
responding to the recursive path inquired in the information to be restored, and performing operation indicated by the operation information of a second target element in the webpage; the second target element is the target element indicated by the leaf node in the recursive path.
10. The system of claim 9, wherein the management control platform is further configured to at least one of:
sending a heartbeat message to the robot, the heartbeat message being used for the robot to maintain a heartbeat consistent with the management control platform;
monitoring a state of the robot.
CN202010860222.6A 2020-08-25 2020-08-25 Method, device and equipment for restoring webpage operation, readable storage medium and system Active CN111736837B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010860222.6A CN111736837B (en) 2020-08-25 2020-08-25 Method, device and equipment for restoring webpage operation, readable storage medium and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010860222.6A CN111736837B (en) 2020-08-25 2020-08-25 Method, device and equipment for restoring webpage operation, readable storage medium and system

Publications (2)

Publication Number Publication Date
CN111736837A true CN111736837A (en) 2020-10-02
CN111736837B CN111736837B (en) 2020-11-24

Family

ID=72658760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010860222.6A Active CN111736837B (en) 2020-08-25 2020-08-25 Method, device and equipment for restoring webpage operation, readable storage medium and system

Country Status (1)

Country Link
CN (1) CN111736837B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112882665A (en) * 2021-02-20 2021-06-01 厦门熵基科技有限公司 Method and device for generating printing template, electronic equipment and storage medium
CN113176922A (en) * 2021-04-30 2021-07-27 上海云扩信息科技有限公司 Universal automatic detection system for interface elements
CN113176920A (en) * 2021-04-29 2021-07-27 上海云扩信息科技有限公司 Universal RPA element selector management system
CN114153530A (en) * 2022-02-08 2022-03-08 广州庚亿信息科技有限公司 Element data information capturing method and device, storage medium and intelligent terminal
CN113176920B (en) * 2021-04-29 2024-05-31 上海云扩信息科技有限公司 Universal RPA element selector management system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140365853A1 (en) * 2012-09-25 2014-12-11 Opera Software Asa Information management and display in web browsers
CN107085519A (en) * 2017-05-04 2017-08-22 网易(杭州)网络有限公司 Behavior tree debugging processing method, device, system, storage medium and processor
CN108958612A (en) * 2018-06-14 2018-12-07 北京字节跳动网络技术有限公司 Control method, control page method, system, equipment and the computer readable storage medium of page sliding
CN111045678A (en) * 2019-11-06 2020-04-21 北京奇艺世纪科技有限公司 Method, device and equipment for executing dynamic code on page and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140365853A1 (en) * 2012-09-25 2014-12-11 Opera Software Asa Information management and display in web browsers
CN107085519A (en) * 2017-05-04 2017-08-22 网易(杭州)网络有限公司 Behavior tree debugging processing method, device, system, storage medium and processor
CN108958612A (en) * 2018-06-14 2018-12-07 北京字节跳动网络技术有限公司 Control method, control page method, system, equipment and the computer readable storage medium of page sliding
CN111045678A (en) * 2019-11-06 2020-04-21 北京奇艺世纪科技有限公司 Method, device and equipment for executing dynamic code on page and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112882665A (en) * 2021-02-20 2021-06-01 厦门熵基科技有限公司 Method and device for generating printing template, electronic equipment and storage medium
CN113176920A (en) * 2021-04-29 2021-07-27 上海云扩信息科技有限公司 Universal RPA element selector management system
CN113176920B (en) * 2021-04-29 2024-05-31 上海云扩信息科技有限公司 Universal RPA element selector management system
CN113176922A (en) * 2021-04-30 2021-07-27 上海云扩信息科技有限公司 Universal automatic detection system for interface elements
CN113176922B (en) * 2021-04-30 2024-05-24 上海云扩信息科技有限公司 Universal interface element automatic detection system
CN114153530A (en) * 2022-02-08 2022-03-08 广州庚亿信息科技有限公司 Element data information capturing method and device, storage medium and intelligent terminal

Also Published As

Publication number Publication date
CN111736837B (en) 2020-11-24

Similar Documents

Publication Publication Date Title
CN111736837B (en) Method, device and equipment for restoring webpage operation, readable storage medium and system
US11126443B2 (en) Method and apparatus for user interface modification
CN108628661B (en) Automatic establishment method of cloud manufacturing service and cloud manufacturing system
US7685609B1 (en) Using a distributed form object model to facilitate form event processing
AU2015218520B2 (en) Service extraction and application composition
CN109829096B (en) Data acquisition method and device, electronic equipment and storage medium
CN111428166A (en) Page configuration method, page element replacement method, device, equipment and medium
US20050268280A1 (en) Encapsulating changes to a software application
AU2005220377B2 (en) Script generation
CN105808701B (en) Realize the method and system communicated between list automatic Verification and multisystem
CN104268241A (en) Attribute display method in configuration database
CN111679976A (en) Method and device for searching page object
CN113297086A (en) Test case generation method and device, electronic equipment and storage medium
CN115328479A (en) Webpage generating method and system
CN113535587B (en) Target application detection method and device and computer equipment
JP4507206B2 (en) Internet information collecting apparatus, program and method
CN114398138A (en) Interface generation method and device, computer equipment and storage medium
CN112685487B (en) Method and apparatus for simulating relational database through IndexDB in browser environment
JP5422589B2 (en) Module analysis system, module analysis method, and module analysis program
CN115016782A (en) vue component generation method and device
CN114185795A (en) Embedded point configuration method and device, electronic equipment and storage medium
Sabharwal et al. Modeling the navigation behavior of dynamic web applications
Li et al. Modeling web application for cross-browser compatibility testing
CN114020589A (en) Embedded point processing method and device, computer equipment and storage medium
CN107451167A (en) The click data acquisition methods and system of position are clicked in standing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant