A data processing method and system
Through preset bit plug-ins and step-by-step traversal technology, web page elements are automatically positioned and scripts are generated, which solves the problem of low positioning efficiency in the existing technology, and achieves fast and efficient element positioning and script writing.
Patent Information
- Application Number
- CN202111086283.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-16
- Publication Date
- 2024-11-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, positioning web page elements requires manual opening of source code, resulting in low positioning efficiency. When there is no unique ID identification in the element, you need to manually query the superior node step by step, which increases the operation time and difficulty.
Through pre-established positioning plug-ins and pre-set bit elements, the positioning information of the element is automatically obtained. If there is no pre-set bit element, the superior node will be traversed step by step until the top node to realize element positioning, and automatically generate scripts to reduce the difficulty of writing.
It improves the efficiency of element positioning, reduces manual operation time, simplifies the script writing process, and users can write scripts in batches, improving writing efficiency.
Smart Images

Figure CN113722017B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of element processing technology, and more specifically, to a data processing method and system. Background Art
[0002] In the daily development and operation process, you may encounter operations such as repeatedly filling in web page text boxes or submitting pages. If you want to generate a web page execution script to automatically perform repetitive operations (for example, you need to automatically fill in values in certain dialog boxes on the web page, or manually click some buttons to modify or submit operations), you need to accurately locate the element position and the events that the element can trigger.
[0003] Elements refer to various buttons, text boxes, drop-down boxes, check boxes, etc. on a web page. Events that elements can trigger refer to events that elements can trigger, such as a single click, double click, press, release of a button, text change of a text box, mouse in, mouse out, etc.
[0004] In the prior art, locating an element requires manually opening the source code of a webpage and manually selecting corresponding nodes level by level to locate the element position, thereby taking a long time to locate the selected element.
[0005] Therefore, the existing way of locating elements is inefficient. Summary of the invention
[0006] In view of this, the present application discloses a data processing method and system, aiming to improve the efficiency of locating element positions. In addition, a script corresponding to the element position is automatically generated, and the user can write the script in batches, which reduces the difficulty of batch script writing and improves the efficiency of script writing.
[0007] In order to achieve the above purpose, the disclosed technical solution is as follows:
[0008] The first aspect of the present application discloses a data processing method, the method comprising:
[0009] Obtaining an element corresponding to a web page; the element is selected by a user from the web page;
[0010] If there is a preset positioning element in the element, the element is positioned by using a pre-established positioning plug-in and the preset positioning element in the element, and the positioning information corresponding to the element is obtained and displayed;
[0011] If the element does not contain a preset positioning element, traverse the parent node of the element level by level, and determine whether the parent node contains a preset positioning element;
[0012] If there is a preset positioning element in the upper node, the element is positioned by using the positioning plug-in and the preset positioning element in the upper node, and the positioning information corresponding to the element is obtained and displayed;
[0013] If there is no preset positioning element in the upper node, traverse to the top-level node of the element, locate the element through the positioning plug-in and the top-level node, obtain the positioning information corresponding to the element and display it.
[0014] Preferably, the preset positioning element includes a unique ID identifier, and if the preset positioning element exists in the element, the element is positioned by using a pre-established positioning plug-in and the preset positioning element in the element, and the positioning information corresponding to the element is obtained and displayed, including:
[0015] If the unique ID exists in the element, the element is located by using a pre-established positioning plug-in and the unique ID to obtain positioning information corresponding to the element;
[0016] The positioning information corresponding to the element is displayed through a preset display page.
[0017] Preferably, the preset positioning element includes a unique ID identifier, and if the preset positioning element exists in the upper node, the element is positioned by using the positioning plug-in and the preset positioning element in the upper node, and the positioning information corresponding to the element is obtained and displayed, including:
[0018] If the unique ID exists in the upper node, the element is located by using the positioning plug-in and the unique ID in the upper node to obtain the positioning information corresponding to the element;
[0019] The positioning information corresponding to the element is displayed through a preset display page.
[0020] Preferably, it also includes:
[0021] Get each node of the element;
[0022] If there are brother nodes in each of the nodes, the brother nodes are identified by a preset mark; the preset mark is used to locate the text element of the element.
[0023] Preferably, it also includes:
[0024] The event list information corresponding to the element is displayed through a preset display method.
[0025] A second aspect of the present application discloses a data processing system, the system comprising:
[0026] A first acquisition unit is used to acquire an element corresponding to a web page; the element is selected by a user from the web page;
[0027] A first positioning unit is used to locate the element by using a pre-established positioning plug-in and the preset positioning element in the element if there is a preset positioning element in the element, and obtain and display the positioning information corresponding to the element;
[0028] A judging unit, configured to traverse the parent nodes of the element level by level if the element does not contain a preset positioning element, and judge whether the parent nodes contain a preset positioning element;
[0029] A second positioning unit is used to locate the element by using the positioning plug-in and the preset positioning element in the upper node if there is a preset positioning element in the upper node, obtain the positioning information corresponding to the element and display it;
[0030] The third positioning unit is used to traverse to the top-level node of the element if there is no preset positioning element in the upper node, locate the element through the positioning plug-in and the top-level node, obtain the positioning information corresponding to the element and display it.
[0031] Preferably, the first positioning unit includes:
[0032] A first positioning module is used to locate the element by using a pre-established positioning plug-in and the unique ID to obtain positioning information corresponding to the element if a unique ID exists in the element;
[0033] The first display module is used to display the positioning information through a preset display page.
[0034] Preferably, the second positioning unit comprises:
[0035] A second positioning module is used to locate the element by using the positioning plug-in and the unique ID in the upper node to obtain positioning information corresponding to the element if there is a unique ID in the upper node;
[0036] The second display module is used to display the positioning information corresponding to the element through a preset display page.
[0037] Preferably, it also includes:
[0038] A second acquisition unit, used to acquire each node of the element;
[0039] The identification unit is used to identify the brother nodes by using a preset mark if there are brother nodes in the nodes; the preset mark is used to locate the text element of the element.
[0040] Preferably, it also includes:
[0041] The display unit is used to display the event list information corresponding to the element in a preset display manner.
[0042] Through the above technical scheme, it can be known that the present application discloses a data processing method and system, which obtains the element corresponding to the web page. The element is selected by the user in the web page. If there is a preset positioning element in the element, the element is positioned by the pre-established positioning plug-in and the preset positioning element in the element, and the positioning information corresponding to the element is obtained and displayed. If there is no preset positioning element in the element, the parent node of the element is traversed level by level, and it is judged whether there is a preset positioning element in the parent node. If there is a preset positioning element in the parent node, the element is positioned by the positioning plug-in and the preset positioning element in the parent node, and the positioning information corresponding to the element is obtained and displayed. If there is no preset positioning element in the parent node, it is traversed to the top-level node of the element, and the element is positioned by the positioning plug-in and the top-level node, and the positioning information corresponding to the element is obtained and displayed. Through the above scheme, when locating the element position, there is no need to manually open the source code of the web page to locate the element. Even if there is no unique id positioning element in the element, there is no need to manually query the parent node of the parent node level by level to locate the selected element, thereby improving the efficiency of locating the element position. In addition, scripts corresponding to element positions are automatically generated, and users can write these scripts in batches, which reduces the difficulty of batch writing scripts and improves the efficiency of script writing. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0044] Figure 1 A flowchart of a data processing method disclosed in an embodiment of the present application;
[0045] Figure 2 A schematic diagram of positioning elements disclosed in an embodiment of the present application;
[0046] Figure 3 A schematic diagram of a process for locating an element, obtaining its corresponding positioning information and displaying it, disclosed in an embodiment of the present application;
[0047] Figure 4 A schematic diagram of another process of locating an element, obtaining its corresponding positioning information and displaying it according to an embodiment of the present application;
[0048] Figure 5 A schematic diagram of the structure of a data processing system disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0051] As can be seen from the background technology, in the prior art, locating an element requires manually opening the source code of a web page and manually selecting corresponding nodes level by level to locate the element position, which takes a long time to locate the selected element. Therefore, the efficiency of the existing method of locating elements is low.
[0052] In order to solve the above problems, the embodiment of the present application discloses a data processing method and system. When locating the element position, there is no need to manually open the source code of the webpage to locate the element. Even if there is no located element in the element, there is no need to manually query the upper parent node level by level to locate the selected element, thereby improving the efficiency of locating the element position. In addition, the script corresponding to the element position is automatically generated, and the user can write the script in batches, which reduces the difficulty of batch script writing and improves the efficiency of script writing. The specific implementation method is specifically described through the following embodiments.
[0053] The data processing method and system provided by the present application can be used in the financial field or other fields, for example, can be used in browser application scenarios in the financial field. Other fields are any fields other than the financial field, for example, the field of web page development. The above is only an example and does not limit the application field of the data processing method and system provided by the present invention.
[0054] refer to Figure 1 FIG. 1 is a flow chart of a data processing method disclosed in an embodiment of the present application, and the data processing method mainly includes the following steps:
[0055] S101: Obtaining an element corresponding to a web page; the element is selected by a user in the web page.
[0056] In S101, the element corresponding to the user clicking on the webpage is obtained, wherein the element refers to various buttons, text boxes, drop-down boxes, check buttons, etc. on the webpage.
[0057] S102: Determine whether there is a preset positioning element in the element. If there is a preset positioning element in the element, execute S103; if there is no preset positioning element in the element, execute S104.
[0058] In S102, when the user moves the mouse to a corresponding element of the webpage, the Hypertext Markup Language (HTML) code corresponding to the element is automatically located to determine whether there is a preset positioning element in the HTML code corresponding to the element.
[0059] Among them, the preset positioning element is used to locate the position of the element.
[0060] The element selected by the user is located through the unique positioning method currently supported by the front-end JS script (unique ID, unique CLASS, unique tag, etc.).
[0061] The preset positioning element can be a unique ID identifier, a name attribute, a unique class, etc. This application does not make any specific restrictions on the determination of the preset positioning element. The preset positioning element of this application takes precedence over the unique ID identifier.
[0062] The element is located by its unique ID. The ID in each unique ID is different.
[0063] The unique ID is an attribute ID of an element on a web page. A unique element on a web page can be located through the ID, but the ID is not a required parameter. An element can have an ID or not. Elements without an ID are generally located through elements with IDs in the parent node or the outermost top-level elements, that is, the elements are traversed downward in sequence to obtain the corresponding location information of the element.
[0064] S103: Positioning the element through a pre-established positioning plug-in and a preset positioning element in the element, obtaining and displaying positioning information corresponding to the element.
[0065] In S103, if there is a unique ID in the element, the element is located by using a pre-established positioning plug-in and the unique ID in the element, and the positioning information corresponding to the element is obtained and displayed.
[0066] Among them, the positioning plug-in is a browser plug-in. After the positioning plug-in is installed, the user triggers the positioning plug-in after selecting an element on the web page. The positioning plug-in is used to locate the element with a unique ID identifier, and the positioning information corresponding to the element can be quickly generated.
[0067] The positioning information corresponding to the element includes the element positioning script and the events that the element can trigger. Among them, the events that the element can trigger include a single click, double click, press, release of a button, text change of a text box, mouse move in, mouse move out, etc.
[0068] The positioning information corresponding to the element is displayed through the preset display page.
[0069] Display the element positioning script in the text box, and automatically display the list of events that the element can trigger in a prompt drop-down box.
[0070] In order to facilitate understanding of the process of positioning elements through pre-established positioning plug-ins and preset positioning elements in elements, obtaining the corresponding positioning information of the elements and displaying them, an example is given here to illustrate:
[0071] For example, when the user moves the mouse to the corresponding element of the web page, the HTML code corresponding to the element will be automatically located. The code is driver.find_element_by_id("kw"), and there is a unique id identifier (id("kw")) 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"), the element location script is displayed in the text box, and the list of events that can be triggered by the element is automatically displayed in the form of a prompt drop-down box.
[0072] After generating the element positioning script, the element type obtained in advance (the element type includes all element types in HTML, such as 、 、 <h1>...< / h1> <h6>、 、 、 、 <address>、 <blockquote> 、 <form>< / form> 、 、 、 、 <em>、 <strong>、 <label>、 <q>、 <var>、 <cite>、 <code>, , <input> etc.), display the element positioning script in the text box, and automatically display the list of events that can be triggered by the element in the form of a prompt drop-down box, which is automatically filtered as the user enters.
[0073] The generated script is displayed in the text box of the plug-in display page, including the positioning script for selecting elements, such as: [id=test1] / div[0] / div[3] / tbody / tr[2] / a[0], and the event drop-down box for the a element, such as click, double-click, etc.
[0074] To help you understand the process of displaying the generated script in the text box on the plug-in display page, here is an example:
[0075] For example, the generated script is displayed in the text box of the plug-in display page, including the positioning script for selecting elements, such as: [id=test1] / div[0]tr[2] / a, and the event drop-down box for the a element, such as click, double-click, etc. The script added to the script text box of the plug-in page is as follows:
[0076]
[0077] After obtaining the element location information, the user can choose to add the event types that can be added to the element.
[0078] By clicking the entire table below through the plug-in of the present invention, the JS selected script of the table can be obtained, such as document.getElementsByTagName('table')[2].childNodes[3].childNodes. By clicking one of the buttons, the JS selected script of the button can be obtained and the triggerable event can be prompted, and the loop is automatically nested according to the relationship between the sibling nodes.
[0079] for(i=1;i<240;i=i+2)
[0080] {
[0081] nodeList[i].childNodes
[17] .childNodes[1].onclick();
[0082] }
[0083] Similar to the above operations, you can obtain the scripts for selecting the deployment strategy, filling in the remarks, and clicking the Save button as follows:
[0084] for(i=1;i<240;i=i+2)
[0085] {
[0086] nodeList[i].childNodes
[13] .childNodes[1].childNodes[9].setAttribute("selected","selected");
[0087] nodeList[i].childNodes
[15] .childNodes[1].innerHTML="Deployed in T5";
[0088] nodeList[i].childNodes
[17] .childNodes[1].onclick();
[0089] }
[0090] If you click manually, it will take dozens of minutes and there may be omissions in manual editing. Through the above script, 240 elements are looped, and each node below is selected to add and modify attributes. The function is to select the corresponding web page drop-down box option, then add the text description corresponding to each drop-down option, and finally click the Save button. The whole process can be quickly operated manually or in batches using plug-ins.
[0091] After splicing the above scripts, you can run them in the command window of the browser to achieve the functions of batch editing, automatic strategy selection, filling in notes and saving, which saves a lot of time. Similar principles, in various web pages that require manual operation or batch operation, this plug-in can quickly locate elements and generate operation scripts, which saves a lot of time and energy of users after execution. Users can write the script in batches, which reduces the difficulty of batch script writing and improves the efficiency of script writing.
[0092] S104: Traverse the parent node of the element level by level, and determine whether there is a preset positioning element in the parent node. If there is a preset positioning element in the parent node, execute S105; if there is no preset positioning element in the parent node, execute S106.
[0093] In S104, the upper node (parent node) of the element is searched level by level to see whether there is a unique ID.
[0094] S105: Position the element by positioning the plug-in and the preset positioning element in the upper node, obtain the positioning information corresponding to the element and display it.
[0095] In S105, if there is a unique ID in the parent node of the element, the plug-in and the unique ID in the parent node are finally located to generate positioning information (element positioning script and events that can be triggered by the element) that can locate the current element, and the element positioning script is displayed in the text box, and the list of events that can be triggered by the element is automatically displayed in the form of a prompt drop-down box.
[0096] The format of the element positioning script is as shown in (document.getElementById("logo-default").childs[1]).
[0097] S106: traverse to the top-level node of the element, locate the element through the positioning plug-in and the top-level node, obtain the positioning information corresponding to the element and display it.
[0098] In S106, if there is no unique id locating element in the upper node, traverse to the top-level node of the element, locate the element through the positioning plug-in and the top-level node, obtain the element positioning script of the current element and the events that the element can trigger, display the element positioning script in the text box, and automatically display the list of events that the element can trigger in the form of a prompt drop-down box.
[0099] In order to facilitate the understanding of the process of positioning elements, combined with< / code> < / cite> < / var> < / q> < / label> < / strong> < / em> <em> <strong> <code> Figure 2 Provide explanation.
[0100] Figure 2 In the figure, BODY is the top-level node, TBODY is the parent element of tr, DIV1 and DIV2 are both element types, DIV1 is the parent node of DIV2, DIV2 is the parent node of TBODY, td1, td2 and td3 are all elements, and tr is the parent element of td1, td2 and td3.
[0101] Specifically, the elements are positioned through the top-level nodes as follows:
[0102] For example, if the element selected by the user is td2, but the corresponding td2 does not have a unique id, the parent element tr is searched upwards (tr / td[1]). If the parent element tr also does not have a unique id, the parent element tbody of the parent element tr is searched further upwards (tbody / tr / td[1]). If tbody also does not have a unique id, the search continues upwards to obtain a div with a corresponding unique id (id=div2). The final tag format (i.e., element positioning script) is div[id=div2] / tbody / tr / td[1].
[0103] In the embodiment of the present application, when locating the element position, there is no need to manually open the source code of the webpage to locate the element. Even if there is no preset positioning element in the element, there is no need to manually query the parent node of the upper level level by level to locate the selected element, thereby improving the efficiency of locating the element position. In addition, the script corresponding to the element position is automatically generated, and the user can write the script in batches, which reduces the difficulty of batch script writing and improves the efficiency of script writing.
[0104] Optionally, each node of the element is obtained, and if there are sibling nodes in each node, the sibling nodes are identified by a preset mark; the preset mark is used to locate the text element of the element.
[0105] Among them, the existence of sibling nodes is marked with a subscript, such as / div[2] / tr[1] / text, which means that div and tr are both sibling nodes. In order to locate the final selected text element, it is necessary to use the subscript (preset mark) to select the parent element of the element currently selected by the user layer by layer.
[0106] When there are sibling nodes in each node of an element, the generated positioning script uses a subscript to identify the current element node and adds nested loop logic.
[0107] For multiple sibling nodes, such as a div tag with three A tags, a three-time loop script is added by default to perform the same operation on the three tags. If the user does not need to execute it on each sibling node, the loop can be cleared, or it can be executed on certain child nodes and skipped on other child nodes. Specifically, for multiple sibling elements, the following table is used to determine, for example, if a DIV element has three A tag elements, the corresponding ones are .. / div / a[0], .. / div / a[1], and .. / div / a[2], where 0, 1, and 2 are the corresponding array subscripts.
[0108] In an embodiment of the present application, each node of the element is obtained. If there are brother nodes in each node, the brother nodes are identified by a preset identifier. The preset identifier is used to locate the text element of the element, thereby achieving the purpose of identifying the brother nodes by the identifier and obtaining the text element of the located element.
[0109] Optionally, event list information of events that can be triggered by the element is displayed through a preset display method.
[0110] Among them, the prompt drop-down box method displays the list information of events that can be triggered by the element.
[0111] In the embodiment of the present application, the purpose of displaying the event list information of the events that can be triggered by the element is achieved through a preset display method.
[0112] refer to Figure 3 As shown, the process of locating the element by using the pre-established positioning plug-in and the preset positioning element in the element in the above S103, obtaining the positioning information corresponding to the element and displaying it mainly includes the following steps:
[0113] S301: If a unique ID exists in the element, the element is located by using a pre-established positioning plug-in and the unique ID to obtain positioning information corresponding to the element.
[0114] S302: Displaying the positioning information corresponding to the element through a preset display page.
[0115] The execution principle of S301-S302 is consistent with the execution principle of the above-mentioned S103, which can be used as a reference and will not be repeated here.
[0116] In the embodiment of the present application, if there is a unique ID in the element, the element is located through the pre-established positioning plug-in and the unique ID, so as to achieve the purpose of obtaining and displaying the positioning information corresponding to the element.
[0117] refer to Figure 4 As shown, the process of locating an element by using a positioning plug-in and a preset positioning element in an upper node in the above S105, obtaining and displaying the positioning information corresponding to the element, mainly includes the following steps:
[0118] S401: If there is a unique ID in the upper node, the element is located by using the positioning plug-in and the unique ID in the upper node to obtain the positioning information corresponding to the element.
[0119] S402: Displaying the positioning information corresponding to the element through a preset display page.
[0120] The execution principle of S401-S402 is consistent with the execution principle of the above-mentioned S105, which can be used for reference and will not be repeated here.
[0121] In an embodiment of the present application, if there is a unique ID identifier in the upper node, the element is located through the positioning plug-in and the unique ID identifier in the upper node, so as to achieve the purpose of obtaining and displaying the positioning information corresponding to the element.
[0122] Based on the above embodiments Figure 1 A data processing method disclosed in the present application is also disclosed in the embodiment of the present application. Figure 5 As shown, the data processing system includes a first acquisition unit 501 , a first positioning unit 502 , a judgment unit 503 , a second positioning unit 504 and a third positioning unit 505 .
[0123] The first acquisition unit 501 is used to acquire elements corresponding to the web page; the elements are selected by the user in the web page.
[0124] The first positioning unit 502 is used to position the element by using a pre-established positioning plug-in and the preset positioning element in the element if there is a preset positioning element in the element, and obtain and display the positioning information corresponding to the element.
[0125] The judging unit 503 is used to traverse the parent nodes of the element level by level if there is no preset positioning element in the element, and judge whether there is a preset positioning element in the parent nodes.
[0126] The second positioning unit 504 is used to position the element by using the positioning plug-in and the preset positioning element in the upper node if there is a preset positioning element in the upper node, and obtain and display the positioning information corresponding to the element.
[0127] The third positioning unit 505 is used to traverse to the top-level node of the element if there is no preset positioning element in the upper node, locate the element through the positioning plug-in and the top-level node, obtain the positioning information corresponding to the element and display it.
[0128] Furthermore, the first positioning unit 502 includes a first positioning module and a first display module.
[0129] The first positioning module is used to locate the element through a pre-established positioning plug-in and the unique ID if there is a unique ID in the element, so as to obtain the positioning information corresponding to the element.
[0130] The first display module is used to display the positioning information through a preset plug-in display page.
[0131] Furthermore, the second positioning unit 504 includes a second positioning module and a second display module.
[0132] The second positioning module is used to locate the element through the positioning plug-in and the unique ID in the upper node if there is a unique ID in the upper node, so as to obtain the positioning information corresponding to the element.
[0133] The second display module is used to display the positioning information corresponding to the element through a preset plug-in display page.
[0134] Furthermore, it also includes a second acquisition unit and an identification unit.
[0135] The second acquisition unit is used to acquire each node of the element.
[0136] The identification unit is used to identify the brother nodes by using preset identification if there are brother nodes in each node; the preset identification is used to locate the text element of the element.
[0137] Furthermore, a display unit is also included.
[0138] The display unit is used to display the event list information corresponding to the element through a preset display method.
[0139] In the embodiment of the present application, when locating the element position, there is no need to manually open the source code of the webpage to locate the element. Even if there is no preset positioning element in the element, there is no need to manually query the parent node of the upper level level by level to locate the selected element, thereby improving the efficiency of locating the element position. In addition, the script corresponding to the element position is automatically generated, and the user can write the script in batches, which reduces the difficulty of batch script writing and improves the efficiency of script writing.
[0140] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0141] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0142] The steps in the methods of the embodiments of the present application can be adjusted in order, combined, and deleted according to actual needs.
[0143] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0144] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
[0145] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.< / code> < / strong> < / em> < / blockquote> < / address> 、 < / h6>
Claims
1. A data processing method, characterized in that: The method comprises: Obtaining an element corresponding to a web page; the element corresponding to the web page is selected by a user from the web page; If there is a preset positioning element in the element corresponding to the webpage, the element corresponding to the webpage is positioned by using a pre-established positioning plug-in and the preset positioning element in the element corresponding to the webpage, and positioning information corresponding to the element corresponding to the webpage is obtained and displayed; the preset positioning element is a positioning element for locating the position of the element corresponding to the webpage; If there is no preset positioning element in the element corresponding to the webpage, traverse the parent node of the element corresponding to the webpage level by level, and determine whether there is a preset positioning element in the parent node; If there is a preset positioning element in the upper node, the element corresponding to the webpage is positioned by using the positioning plug-in and the preset positioning element in the upper node, and the positioning information corresponding to the element corresponding to the webpage is obtained and displayed; If there is no preset positioning element in the upper node, traverse to the top-level node of the element corresponding to the web page, locate the element corresponding to the web page through the positioning plug-in and the top-level node, obtain the positioning information corresponding to the element corresponding to the web page and display it.
2. The method according to claim 1, characterized in that The preset positioning element includes a unique ID identifier. If the preset positioning element exists in the element corresponding to the webpage, the element corresponding to the webpage is positioned by using a pre-established positioning plug-in and the preset positioning element existing in the element corresponding to the webpage, and the positioning information corresponding to the element corresponding to the webpage is obtained and displayed, including: If the unique ID exists in the element corresponding to the webpage, the element corresponding to the webpage is located by using the pre-established positioning plug-in and the unique ID to obtain positioning information corresponding to the element corresponding to the webpage; The positioning information corresponding to the element corresponding to the webpage is displayed through a preset display page.
3. The method according to claim 1, characterized in that The preset positioning element includes a unique ID identifier. If the preset positioning element exists in the upper node, the element corresponding to the webpage is positioned by using the positioning plug-in and the preset positioning element in the upper node, and the positioning information corresponding to the element corresponding to the webpage is obtained and displayed, including: If the unique ID exists in the upper node, the element corresponding to the webpage is located by using the positioning plug-in and the unique ID in the upper node to obtain the positioning information corresponding to the element corresponding to the webpage; The positioning information corresponding to the element corresponding to the webpage is displayed through a preset display page.
4. The method according to claim 1, characterized in that: Also includes: Obtaining each node of the element corresponding to the webpage; If there are brother nodes among the nodes, the brother nodes are identified by a preset identifier; The preset identifier is used to locate the text element of the element corresponding to the webpage.
5. The method according to claim 1, characterized in that Also includes: The event list information corresponding to the element corresponding to the webpage is displayed through a preset display method.
6. A data processing system, characterized in that: The system comprises: A first acquisition unit is used to acquire an element corresponding to a web page corresponding to a web page; the element corresponding to the web page is selected by a user from the web page; A first positioning unit is used to locate the element corresponding to the web page by using a pre-established positioning plug-in and the preset positioning element existing in the element corresponding to the web page, if there is a preset positioning element in the element corresponding to the web page, to obtain and display the positioning information corresponding to the element corresponding to the web page; the preset positioning element is a positioning element for locating the position of the element corresponding to the web page; A judging unit, configured to traverse the parent nodes of the elements corresponding to the webpage level by level if the preset positioning element does not exist in the elements corresponding to the webpage, and judge whether the parent nodes have the preset positioning element; A second positioning unit is used to locate the element corresponding to the webpage by using the positioning plug-in and the preset positioning element in the upper node if there is a preset positioning element in the upper node, obtain the positioning information corresponding to the element corresponding to the webpage and display it; The third positioning unit is used to traverse to the top-level node of the element if there is no preset positioning element in the upper node, locate the element corresponding to the web page through the positioning plug-in and the top-level node, obtain the positioning information corresponding to the element corresponding to the web page and display it.
7. The system according to claim 6, characterized in that The first positioning unit comprises: A first positioning module is used to locate the element corresponding to the webpage by using a pre-established positioning plug-in and the unique ID if there is a unique ID in the element corresponding to the webpage, so as to obtain positioning information corresponding to the element corresponding to the webpage; The first display module is used to display the positioning information through a preset display page.
8. The system according to claim 6, characterized in that The second positioning unit comprises: A second positioning module is used to locate the element corresponding to the web page by using the positioning plug-in and the unique ID in the upper node if there is a unique ID in the upper node, so as to obtain the positioning information corresponding to the element corresponding to the web page; The second display module is used to display the positioning information corresponding to the element corresponding to the webpage through a preset display page.
9. The system according to claim 6, characterized in that Also includes: A second acquisition unit, used to acquire each node of the element corresponding to the webpage; The identification unit is used to identify the brother nodes by using a preset identification if there are brother nodes among the nodes; the preset identification is used to locate the text element of the element corresponding to the web page.
10. The system according to claim 6, characterized in that Also includes: The display unit is used to display the event list information corresponding to the element corresponding to the webpage in a preset display mode.
