CN113722017A - Data processing method and system - Google Patents

Data processing method and system Download PDF

Info

Publication number
CN113722017A
CN113722017A CN202111086283.2A CN202111086283A CN113722017A CN 113722017 A CN113722017 A CN 113722017A CN 202111086283 A CN202111086283 A CN 202111086283A CN 113722017 A CN113722017 A CN 113722017A
Authority
CN
China
Prior art keywords
positioning
preset
node
information corresponding
plug
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.)
Pending
Application number
CN202111086283.2A
Other languages
Chinese (zh)
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202111086283.2A priority Critical patent/CN113722017A/en
Publication of CN113722017A publication Critical patent/CN113722017A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45508Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation
    • G06F9/45512Command shells

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a data processing method and a data processing system, which can be applied to the financial field or other fields. If the element has a preset positioning element, positioning the element to obtain positioning information and displaying the positioning information, if the element does not have the preset positioning element and the upper node has the preset positioning element, positioning the element through the positioning plug-in and the preset positioning element to obtain the positioning information and displaying the positioning information, and if the upper node does not have the preset positioning element, positioning the element through the positioning plug-in and the top node to obtain the positioning information and displaying the positioning information. Through the method, when the element position is positioned, the element is positioned without manually opening the webpage source code, and even if the element is not preset with a positioning element, the selected element is positioned without manually inquiring the superior father node step by step, so that the efficiency of positioning to obtain the element position is improved. In addition, scripts corresponding to the element positions are automatically generated, a user can write the scripts in batches, the difficulty of writing the scripts in batches is reduced, and the efficiency of writing the scripts is improved.

Description

Data processing method and system
Technical Field
The present application relates to the field of element processing technologies, and in particular, to a data processing method and system.
Background
In the daily development, operation and maintenance process, operations of repeatedly filling in a webpage text box or submitting a webpage class are encountered, and if a webpage execution script is required to be generated to automatically execute repeated operations (for example, some dialog boxes on a webpage need to be automatically filled with values, or some buttons are manually clicked to modify and submit operations), at this time, the element position needs to be accurately positioned and an event which can be triggered by the element needs to be accurately positioned.
Elements refer to various buttons, text boxes, drop-down boxes, check buttons, etc. on a web page. An element-triggerable event refers to an event that an element can trigger, such as a single click, double click, press, release of a button, text change of a text box, mouse move, etc.
In the prior art, the positioning element needs to manually open the source code of the webpage and manually select the corresponding node step by step to position the element position, so that more time is spent to position the selected element.
Thus, existing ways of locating elements are inefficient.
Disclosure of Invention
In view of this, the present application discloses a data processing method and system, which aim to improve the efficiency of obtaining element positions by positioning. In addition, the scripts corresponding to the element positions are automatically generated, and the user can write the scripts in batches, so that the difficulty in writing the scripts in batches is reduced, and the efficiency of writing the scripts is improved.
In order to achieve the purpose, the technical scheme is as follows:
a first aspect of the present application discloses a data processing method, including:
acquiring elements corresponding to the webpage; the elements are selected from the webpage by a user;
if the preset positioning element exists in the element, positioning the element through a preset positioning plug-in and the preset positioning element existing in the element to obtain and display positioning information corresponding to the element;
if the element does not have the preset positioning element, the upper node of the element is traversed step by step, and whether the upper node has the preset positioning element is judged;
if a preset positioning element exists in the superior node, positioning the element through the positioning plug-in and the preset positioning element existing in the superior node to obtain and display positioning information corresponding to the element;
and if the upper node does not have the preset positioning element, traversing to the top node of the element, positioning the element through the positioning plug-in and the top node, and obtaining and displaying positioning information corresponding to the element.
Preferably, the preset location element includes a unique id identifier, and if the preset location element exists in the element, the element is located through a pre-established location plug-in and the preset location element existing in the element, so as to obtain and display location information corresponding to the element, including:
if the unique id exists in the element, positioning the element through a pre-established positioning plug-in and the unique id to obtain positioning information corresponding to the element;
and displaying the positioning information corresponding to the elements through a preset display page.
Preferably, the preset location element includes a unique id identifier, and if the preset location element exists in the superior node, the element is located through the location plug-in and the preset location element existing in the superior node, so as to obtain and display location information corresponding to the element, including:
if the unique id exists in the superior node, positioning the element through the positioning plug-in and the unique id existing in the superior node to obtain positioning information corresponding to the element;
and displaying the positioning information corresponding to the elements through a preset display page.
Preferably, the method further comprises the following steps:
acquiring each node of the element;
if brother nodes exist in the nodes, identifying the brother nodes through preset identifiers; the preset mark is used for positioning a text element of the element.
Preferably, the method further comprises the following steps:
and displaying the event list information corresponding to the elements in a preset display mode.
A second aspect of the present application discloses a data processing system, the system comprising:
the first acquisition unit is used for acquiring elements corresponding to the webpage; the elements are selected from the webpage by a user;
the first positioning unit is used for positioning the element through a pre-established positioning plug-in and a preset positioning element in the element if the preset positioning element exists in the element, and obtaining and displaying positioning information corresponding to the element;
the judging unit is used for traversing the upper node of the element step by step if the preset positioning element does not exist in the element, and judging whether the preset positioning element exists in the upper node or not;
the second positioning unit is used for positioning the element through the positioning plug-in and the preset positioning element in the superior node if the preset positioning element exists in the superior node, and obtaining and displaying the positioning information corresponding to the element;
and the third positioning unit is used for traversing to a top node of the element if no preset positioning element exists in the superior node, positioning the element through the positioning plug-in and the top node, and obtaining and displaying positioning information corresponding to the element.
Preferably, the first positioning unit includes:
the first positioning module is used for positioning the element through a pre-established positioning plug-in and the unique id if the element has the unique id to obtain positioning information corresponding to the element;
and the first display module is used for displaying the positioning information through a preset display page.
Preferably, the second positioning unit includes:
the second positioning module is used for positioning the element through the positioning plug-in and the unique id existing in the superior node if the unique id exists in the superior node, so as to obtain the positioning information corresponding to the element;
and the second display module is used for displaying the positioning information corresponding to the element through a preset display page.
Preferably, the method further comprises the following steps:
a second obtaining unit configured to obtain each node of the element;
the identification unit is used for identifying the brother nodes through preset identifications if the brother nodes exist in the nodes; the preset mark is used for positioning a text element of the element.
Preferably, the method further comprises the following steps:
and the display unit is used for displaying the event list information corresponding to the elements in a preset display mode.
The technical solution can be seen that, the present application discloses a data processing method and system, acquiring elements corresponding to a web page, the elements being selected by a user from the web page, if a preset positioning element exists in the elements, positioning the elements by a preset positioning plug-in and a preset positioning element existing in the elements, acquiring and displaying positioning information corresponding to the elements, if the preset positioning element does not exist in the elements, traversing a superior node of the elements step by step, and determining whether the preset positioning element exists in the superior node, if the preset positioning element exists in the superior node, positioning the elements by the preset positioning plug-in and the preset positioning element existing in the superior node, acquiring and displaying positioning information corresponding to the elements, if the preset positioning element does not exist in the superior node, traversing to a top node of the elements, positioning the elements by the positioning plug-in and the top node, and obtaining and displaying the positioning information corresponding to the elements. Through the scheme, when the element position is located, the element is located without manually opening a source code of the webpage, even if the element does not have a unique id locating element, the selected element is located without manually querying a superior father node step by step, and therefore the efficiency of obtaining the element position through locating is improved. In addition, the scripts corresponding to the element positions are automatically generated, and the user can write the scripts in batch, so that the difficulty of writing the scripts in batch is reduced, and the efficiency of writing the scripts is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flow chart of a data processing method disclosed in an embodiment of the present application;
FIG. 2 is a schematic illustration of positioning an element as disclosed in an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating a process of positioning an element to obtain corresponding positioning information and displaying the positioning information, disclosed in an embodiment of the present application;
fig. 4 is another schematic flow chart illustrating positioning of an element to obtain corresponding positioning information thereof and displaying the positioning information, disclosed in the embodiment of the present application;
fig. 5 is a schematic structural diagram of a data processing system 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.
In this application, 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.
As can be seen from the background art, in the prior art, the positioning element needs to manually open the source code of the web page, and manually select the corresponding node step by step to position the element, thereby spending more time to position the selected element. Thus, existing ways of locating elements are inefficient.
In order to solve the above problem, an embodiment of the present application discloses a data processing method and system, when an element position is located, a source code of a web page does not need to be manually opened to locate the element, and even if there is no located element in the element, it is not necessary to manually query a parent node of a higher level step by step to locate a selected element, so that efficiency of obtaining the element position by location is improved. In addition, the scripts corresponding to the element positions are automatically generated, and the user can write the scripts in batch, so that the difficulty of writing the scripts in batch is reduced, and the efficiency of writing the scripts is improved. The specific implementation is specifically illustrated by the following examples.
The data processing method and system provided by the application can be used in the financial field or other fields, for example, can be used in browser application scenarios in the financial field. The other fields are arbitrary fields other than the financial field, for example, a web page development field. The foregoing is merely an example, and does not limit the application field of the data processing method and system provided by the present invention.
Referring to fig. 1, a schematic flow chart of a data processing method disclosed in an embodiment of the present application is shown, where the data processing method mainly includes the following steps:
s101: acquiring elements corresponding to the webpage; the elements are selected from the web page by the user.
In S101, it is obtained that the user clicks a corresponding element on the web page, where the element refers to various buttons, text boxes, drop-down boxes, check buttons, and the like on the web page.
S102: and judging whether the element has a preset positioning element, if so, executing S103, and if not, executing S104.
In S102, when the user moves to the corresponding element of the web page through the mouse, a hypertext Markup Language (HTML) code corresponding to the element is automatically located, and whether a preset location element exists in the HTML code corresponding to the element is determined.
And the preset positioning element is used for positioning the position of the element.
And (4) positioning the element selected by the user by the unique positioning method (unique id identification, unique CLASS CLASS, unique label and the like) supported by the front-end JS script at present.
The preset positioning element can be a unique id identifier, a name attribute, a unique class and the like, the determination of the preset bitmap element is not specifically limited in the application, and the preset positioning element of the application has priority to the unique id identifier.
The elements are located by their unique ID identifications, the ID in each unique ID identification being different.
The unique ID is identified as an attribute ID of an element on the web page, the unique element on the web page can be located through the ID, but the ID is not an essential parameter, the element can have the ID or not, and the element without the ID is generally located through the downward traversal of the element with the ID in the upper node or the top-level element at the outermost layer, namely the < body > element, in sequence to obtain the location information corresponding to the element.
S103: and positioning the elements through the pre-established positioning plug-in and the preset positioning elements in the elements to obtain the positioning information corresponding to the elements and display the positioning information.
In S103, if the element has the unique id, the element is located through the pre-established location plug-in and the unique id existing in the element, and location information corresponding to the element is obtained and displayed.
The positioning plug-in is a browser plug-in, after the positioning plug-in is installed, a user triggers the positioning plug-in after the element is selected by a webpage, the element with the unique id identification is positioned through the positioning plug-in, and positioning information corresponding to the element can be generated quickly.
The positioning information corresponding to the element comprises an element positioning script and an element triggerable event, wherein the element triggerable event comprises single click, double click, pressing and releasing of a button, text change of a text box, mouse moving-out and the like.
And displaying the positioning information corresponding to the elements through a preset display page.
An element positioning script is displayed in the text box, and an element triggerable event list is automatically displayed in a mode of prompting a drop-down box.
For convenience of understanding, a process of positioning an element through a pre-established positioning plug-in and a pre-set positioning element existing in the element to obtain positioning information corresponding to the element and display the positioning information is described, by way of example here:
for example, when a user moves to a corresponding element of a web page through a mouse, an HTML code corresponding to the element is automatically located, the code is driver, fine _ element _ by _ id ("kw"), a unique id ("kw")) exists in the HTML code corresponding to the element, the id ("kw") is unique, the location information of the corresponding element is located through the id ("kw"), an element location script is displayed in a text box, and the element can be automatically displayed in a manner of prompting a drop-down box to trigger an event list.
After the element positioning script is generated, the element positioning script is displayed in a text box through a pre-acquired element type (the element type includes all element types in HTML, such as < div >, < p >, < h1>, < h6>, < ol >, < ul >, < dl >, < table >, < address >, < block quote >, < form >, < a >, < span >, < i >, < em >, < string >, < label >, < q >, < var >, < cite >, < code >, < img >, < input >, and the like), and the element can trigger event list is automatically displayed in a mode of prompting a drop-down box, and automatic screening is carried out along with input of a user.
Displaying the generated script in a text box of the plug-in display page, wherein the generated script comprises a positioning script of a selection element, such as: [ id ═ test1]/div [0]/div [3]/tbody/tr [2]/a [0], and event drop-down boxes that a element can select, such as click, double click, doublleclk, etc.
To facilitate understanding of the process of displaying the generated script in the text box of the plug-in display page, the following description is given by way of example:
for example, the generated script is displayed in a text box of a plug-in display page, containing a positioning script of the selected element, such as: [ id ═ test1]/div [0] tr [2]/a, and event drop-down boxes that the a element can select, such as click, double click, etc. And finally, selecting the scripts added in the script text box of the plug-in page as follows:
Figure BDA0003265673190000071
after obtaining the element positioning information, the user may select to add an event type to which the element may be added.
By clicking the whole lower table through the plug-in, the JS selection script of the table can be obtained, such as document.getElementsByTagName ('table') [2]. childNodes [3]. childNodes, one of the buttons is clicked, the JS selection script of the button can be obtained, a triggerable event is prompted, and the cycle is automatically nested according to the brother node relationship.
for(i=1;i<240;i=i+2)
{
nodeList[i].childNodes[17].childNodes[1].onclick();
}
Similar to the above operation, the selected deployment strategy script can be obtained in sequence, and the remark filling script and the save button clicking script are as follows:
for(i=1;i<240;i=i+2)
{
nodeList[i].childNodes[13].childNodes[1].childNodes[9].setAttribute("selected","selected");
nodeList [ i ]. childNodes [15]. childNodes [1]. innerHTML ═ deployed at T5;
nodeList[i].childNodes[17].childNodes[1].onclick();
}
if clicked manually, it takes tens of minutes and manual editing omissions may occur. And circulating 240 elements through the script, selecting nodes corresponding to each lower level to add modification attributes, realizing the functions of selecting corresponding webpage drop-down box options, adding a text description corresponding to each drop-down option, and finally saving a button to click. The whole process uses plug-ins to quickly operate manually or operate in batches.
After the scripts are spliced, the scripts can run in a command window of a browser, so that the functions of batch editing, automatic strategy selection, remark information filling and storage are achieved, and a large amount of time is saved. By adopting the plug-in, elements can be quickly positioned and operation scripts can be generated by adopting the plug-in on various webpages needing manual operation or batch operation, a large amount of time and energy of users can be saved after execution, a user can write the scripts in batches, the difficulty of writing the scripts in batches is reduced, and the efficiency of writing the scripts is improved.
S104: and traversing the upper node of the element step by step, judging whether the upper node has a preset positioning element, if the upper node has the preset positioning element, executing S105, and if the upper node does not have the preset positioning element, executing S106.
In S104, whether the unique id exists is searched for step by step for an upper node (parent node) of the element.
S105: and positioning the elements through the preset positioning elements in the positioning plug-in and the superior node to obtain and display the positioning information corresponding to the elements.
In S105, if the unique id exists in the upper node of the element, the unique id exists in the final location plug-in and the upper node, generates location information (an element location script and an element triggerable event) capable of locating the current element, displays the element location script in the text box, and automatically displays the element triggerable event list in a prompt drop-down box manner.
The format of the element location script is shown as (document. getElementById ("logo-default"). children [1 ]).
S106: traversing to the top level node of the element, positioning the element through the positioning plug-in and the top level node, obtaining the positioning information corresponding to the element and displaying the positioning information.
In S106, if there is no unique id positioning element in the upper node, traversing to the top node of the element, positioning the element through the positioning plug-in and the top node to obtain an element positioning script of the current element and an element triggerable event, displaying the element positioning script in the text box, and automatically displaying the element triggerable event list in a manner of prompting a drop-down box.
To facilitate understanding of the process of locating elements, reference is made to fig. 2.
In fig. 2, BODY is a top node, TBODY is a parent element of tr, DIV1 and DIV2 are element types, DIV1 is an upper node of DIV2, DIV2 is an upper node of TBODY, td1, td2 and td3 are elements, and tr is a parent element of td1, td2 and td 3.
Specifically, the elements are located by the top level node as follows:
for example, if the element selected by the user is td2, but the corresponding td2 has no unique id identifier, the parent element tr (tr/td [1]) is searched upwards, if the parent element tr also has no unique id identifier, the parent element tbody (tbody/tr/td [1]) of the parent element tr is continuously searched, if the tbody also has no unique id identifier, the upwards search is continuously performed, and the div has the corresponding unique id identifier (id ═ div2), so that the final tag format (i.e., the element positioning script) is div [ id ═ div2]/tbody/tr/td [1].
In the embodiment of the application, when the element position is positioned, the element is positioned without manually opening the source code of the webpage, and even if the element is not preset with a positioning element, the upper parent node is not required to be manually inquired step by step to position the selected element, so that the efficiency of positioning to obtain the element position is improved. In addition, the scripts corresponding to the element positions are automatically generated, and the user can write the scripts in batch, so that the difficulty of writing the scripts in batch is reduced, and the efficiency of writing the scripts is improved.
Optionally, each node of the element is obtained, and if a brother node exists in each node, the brother node is identified through a preset identifier; the preset flag is used to locate a text element of the element.
Wherein, for the subscript identifier with sibling node, such as/div 2/tr 1/text, it indicates that div and tr both have sibling node, and in order to locate the finally required selected text element, it needs to use subscript (preset identifier) to select the superior element of the element selected by the current user layer by layer.
And for the condition that brother nodes exist in each node of the element, using subscripts to identify the current element node in the generated positioning script, and adding nested loop logic.
For those with multiple siblings, if there are 3 a tags under one div tag, a 3-time loop script is added by default, the same operation is performed on all three tags, and if the user does not need to perform on each sibling, the loop can be cleared, or the execution is selected to be performed on some child nodes, and the other child nodes skip. Specifically, for a plurality of sibling elements, as determined by the following table, for example, there are 3A-tag elements under one DIV element, which correspond to the corresponding group indices,/DIV/a [0],/DIV/a [1],/DIV/a [2], where 0, 1, and 2 are the corresponding array indices.
In the embodiment of the application, each node of the element is obtained, if the brother node exists in each node, the brother node is identified through the preset identification, and the preset identification is used for positioning the text element of the element, so that the purpose that the brother node is identified by the identification to obtain the text element of the positioning element is achieved.
Optionally, the event list information of the event that can be triggered by the element is displayed in a preset display mode.
Wherein, the event list information can be triggered by the display element in a prompt drop-down frame mode.
In the embodiment of the application, the purpose of displaying the event list information of the event which can be triggered by the element is achieved through a preset display mode.
Referring to fig. 3, a process involved in S103, locating an element through a pre-established location plug-in and a preset location element existing in the element, obtaining location information corresponding to the element, and displaying the location information mainly includes the following steps:
s301: if the element has the unique id identification, the element is positioned through a pre-established positioning plug-in and the unique id identification to obtain positioning information corresponding to the element.
S302: and displaying the positioning information corresponding to the elements through a preset display page.
The execution principle of S301-S302 is consistent with the execution principle of S103, and it can be referred to, and is not described herein again.
In the embodiment of the application, if the element has the unique id, the element is positioned through the pre-established positioning plug-in and the unique id, so that the purposes of obtaining and displaying the positioning information corresponding to the element are achieved.
Referring to fig. 4, a process involved in S105, locating an element through a positioning plug-in and a preset positioning element existing in an upper node, obtaining positioning information corresponding to the element, and displaying the positioning information mainly includes the following steps:
s401: if the unique id exists in the superior node, the element is positioned through the positioning plug-in and the unique id existing in the superior node, and the positioning information corresponding to the element is obtained.
S402: and displaying the positioning information corresponding to the elements through a preset display page.
The execution principle of S401-S402 is consistent with the execution principle of S105, and it can be referred to, and is not described herein again.
In the embodiment of the application, if the unique id exists in the superior node, the element is positioned through the positioning plug-in and the unique id existing in the superior node, so that the purposes of obtaining and displaying the positioning information corresponding to the element are achieved.
Based on the data processing method disclosed in fig. 1 in the foregoing embodiment, the embodiment of the present application also correspondingly discloses a data processing system, as shown in fig. 5, the data processing system includes a first obtaining unit 501, a first positioning unit 502, a judging unit 503, a second positioning unit 504, and a third positioning unit 505.
A first obtaining unit 501, configured to obtain an element corresponding to a web page; the elements are selected from the web page by the user.
The first positioning unit 502 is configured to, if a preset positioning element exists in an element, position the element through a preset positioning plug-in and the preset positioning element existing in the element, to obtain positioning information corresponding to the element, and display the positioning information.
The determining unit 503 is configured to, if there is no preset positioning element in the element, traverse the upper node of the element step by step, and determine whether there is a preset positioning element in the upper node.
The second positioning unit 504 is configured to, if a preset positioning element exists in the superior node, position the element through the positioning plug-in and the preset positioning element existing in the superior node, obtain positioning information corresponding to the element, and display the positioning information.
And a third positioning unit 505, configured to traverse to a top node of the element if the preset positioning element does not exist in the upper node, and position the element through the positioning plug-in and the top node, to obtain positioning information corresponding to the element, and display the positioning information.
Further, the first positioning unit 501 includes a first positioning module and a first display module.
And the first positioning module is used for positioning the element through a pre-established positioning plug-in and the unique id if the element has the unique id so as to obtain the positioning information corresponding to the element.
And the first display module is used for displaying the positioning information through a preset plug-in display page.
Further, the second positioning unit 504 includes a second positioning module and a second display module.
And the second positioning module is used for positioning the element through the positioning plug-in and the unique id existing in the superior node if the unique id exists in the superior node, so as to obtain the positioning information corresponding to the element.
And the second display module is used for displaying the positioning information corresponding to the element through a preset plug-in display page.
Further, the system also comprises a second acquisition unit and an identification unit.
And the second acquisition unit is used for acquiring each node of the element.
The identification unit is used for identifying the brother nodes through preset identifications if the brother nodes exist in all the nodes; the preset flag is used to locate a text element of the element.
Further, the display unit is also included.
And the display unit is used for displaying the event list information corresponding to the elements in a preset display mode.
In the embodiment of the application, when the element position is positioned, the element is positioned without manually opening the source code of the webpage, and even if the element is not preset with a positioning element, the upper parent node is not required to be manually inquired step by step to position the selected element, so that the efficiency of positioning to obtain the element position is improved. In addition, the scripts corresponding to the element positions are automatically generated, and the user can write the scripts in batch, so that the difficulty of writing the scripts in batch is reduced, and the efficiency of writing the scripts is improved.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present application is not limited by the order of acts or acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the system-class embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The steps in the method of the embodiments of the present application may be sequentially adjusted, combined, and deleted according to actual needs.
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.
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.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method of data processing, the method comprising:
acquiring elements corresponding to the webpage; the elements are selected from the webpage by a user;
if the preset positioning element exists in the element, positioning the element through a preset positioning plug-in and the preset positioning element existing in the element to obtain and display positioning information corresponding to the element;
if the element does not have the preset positioning element, the upper node of the element is traversed step by step, and whether the upper node has the preset positioning element is judged;
if a preset positioning element exists in the superior node, positioning the element through the positioning plug-in and the preset positioning element existing in the superior node to obtain and display positioning information corresponding to the element;
and if the upper node does not have the preset positioning element, traversing to the top node of the element, positioning the element through the positioning plug-in and the top node, and obtaining and displaying positioning information corresponding to the element.
2. The method according to claim 1, wherein the preset positioning element includes a unique id identifier, and if the preset positioning element exists in the element, the element is positioned through a pre-established positioning plug-in and the preset positioning element existing in the element, so as to obtain and display positioning information corresponding to the element, including:
if the unique id exists in the element, positioning the element through a pre-established positioning plug-in and the unique id to obtain positioning information corresponding to the element;
and displaying the positioning information corresponding to the elements through a preset display page.
3. The method according to claim 1, wherein the preset positioning element includes a unique id identifier, and if a preset positioning element exists in the superior node, the element is positioned through the positioning plug-in and the preset positioning element existing in the superior node, and positioning information corresponding to the element is obtained and displayed, including:
if the unique id exists in the superior node, positioning the element through the positioning plug-in and the unique id existing in the superior node to obtain positioning information corresponding to the element;
and displaying the positioning information corresponding to the elements through a preset display page.
4. The method of claim 1, further comprising:
acquiring each node of the element;
if brother nodes exist in the nodes, identifying the brother nodes through preset identifiers; the preset mark is used for positioning a text element of the element.
5. The method of claim 1, further comprising:
and displaying the event list information corresponding to the elements in a preset display mode.
6. A data processing system, characterized in that the system comprises:
the first acquisition unit is used for acquiring elements corresponding to the webpage; the elements are selected from the webpage by a user;
the first positioning unit is used for positioning the element through a pre-established positioning plug-in and a preset positioning element in the element if the preset positioning element exists in the element, and obtaining and displaying positioning information corresponding to the element;
the judging unit is used for traversing the upper node of the element step by step if the preset positioning element does not exist in the element, and judging whether the preset positioning element exists in the upper node or not;
the second positioning unit is used for positioning the element through the positioning plug-in and the preset positioning element in the superior node if the preset positioning element exists in the superior node, and obtaining and displaying the positioning information corresponding to the element;
and the third positioning unit is used for traversing to a top node of the element if no preset positioning element exists in the superior node, positioning the element through the positioning plug-in and the top node, and obtaining and displaying positioning information corresponding to the element.
7. The system of claim 6, wherein the first positioning unit comprises:
the first positioning module is used for positioning the element through a pre-established positioning plug-in and the unique id if the element has the unique id to obtain positioning information corresponding to the element;
and the first display module is used for displaying the positioning information through a preset display page.
8. The system of claim 6, wherein the second positioning unit comprises:
the second positioning module is used for positioning the element through the positioning plug-in and the unique id existing in the superior node if the unique id exists in the superior node, so as to obtain the positioning information corresponding to the element;
and the second display module is used for displaying the positioning information corresponding to the element through a preset display page.
9. The system of claim 6, further comprising:
a second obtaining unit configured to obtain each node of the element;
the identification unit is used for identifying the brother nodes through preset identifications if the brother nodes exist in the nodes; the preset mark is used for positioning a text element of the element.
10. The system of claim 6, further comprising:
and the display unit is used for displaying the event list information corresponding to the elements in a preset display mode.
CN202111086283.2A 2021-09-16 2021-09-16 Data processing method and system Pending CN113722017A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111086283.2A CN113722017A (en) 2021-09-16 2021-09-16 Data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111086283.2A CN113722017A (en) 2021-09-16 2021-09-16 Data processing method and system

Publications (1)

Publication Number Publication Date
CN113722017A true CN113722017A (en) 2021-11-30

Family

ID=78684080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111086283.2A Pending CN113722017A (en) 2021-09-16 2021-09-16 Data processing method and system

Country Status (1)

Country Link
CN (1) CN113722017A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104866509A (en) * 2014-02-26 2015-08-26 阿里巴巴集团控股有限公司 Page element positioning method and device
CN109597954A (en) * 2018-11-28 2019-04-09 南京赛克蓝德网络科技有限公司 Data item methods of exhibiting, calculates equipment and medium at device
CN111221612A (en) * 2020-01-03 2020-06-02 北京小米移动软件有限公司 Method, device and medium for positioning user interface element

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104866509A (en) * 2014-02-26 2015-08-26 阿里巴巴集团控股有限公司 Page element positioning method and device
CN109597954A (en) * 2018-11-28 2019-04-09 南京赛克蓝德网络科技有限公司 Data item methods of exhibiting, calculates equipment and medium at device
CN111221612A (en) * 2020-01-03 2020-06-02 北京小米移动软件有限公司 Method, device and medium for positioning user interface element

Similar Documents

Publication Publication Date Title
CN102890681B (en) A kind of method and system of generating web page stay in place form
US20190392026A1 (en) Configuring a page for drag and drop arrangement of content artifacts in a page development tool
US10387535B2 (en) System and method for selectively displaying web page elements
CA2720548C (en) Web portal application customization method and system using profiles
US8239882B2 (en) Markup based extensibility for user interfaces
US20080033996A1 (en) Techniques for approximating the visual layout of a web page and determining the portion of the page containing the significant content
US20060190355A1 (en) System and Method for Designing and Operating an Electronic Store
US20140337715A1 (en) Computer Language Source Code Visualization
US5973695A (en) Method for graphically displaying a UNIX directory structure
CN103019925B (en) Selector acquisition method and device
CN109656552B (en) Method for automatically converting design drawing into webpage based on box model
CN111444696B (en) Report form display and editing method and device
US20170351656A1 (en) Method of preparing documents in markup languages
US8302075B1 (en) Methods and systems for selective code collapse
CN107678943B (en) Page automatic testing method of abstract page object
US10572566B2 (en) Image quality independent searching of screenshots of web content
WO2006107529A2 (en) Method and system for aggregating rules for a property associated with a document element
CN1776678A (en) Method and system for client-side manipulation of tables
US20120304051A1 (en) Automation Tool for XML Based Pagination Process
CN110489625A (en) A kind of generation method and device of collecting webpage data template
CN107193549A (en) Webpage quick development method based on metadata
US20080010587A1 (en) Document Processing Device and Document Processing Method
US11644949B2 (en) Autotagging a template of a reporting workbook
CN113722017A (en) Data processing method and system
US7512905B1 (en) Highlight linked-to document sections for increased readability

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