CN111930616B - Data processing method, device, electronic equipment and readable storage medium - Google Patents

Data processing method, device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN111930616B
CN111930616B CN202010732727.4A CN202010732727A CN111930616B CN 111930616 B CN111930616 B CN 111930616B CN 202010732727 A CN202010732727 A CN 202010732727A CN 111930616 B CN111930616 B CN 111930616B
Authority
CN
China
Prior art keywords
page data
data
operation instruction
page
program
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.)
Active
Application number
CN202010732727.4A
Other languages
Chinese (zh)
Other versions
CN111930616A (en
Inventor
谢林
朱兴军
刘通
惠超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Future Vipkid Ltd
Original Assignee
Future Vipkid 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 Future Vipkid Ltd filed Critical Future Vipkid Ltd
Priority to CN202010732727.4A priority Critical patent/CN111930616B/en
Publication of CN111930616A publication Critical patent/CN111930616A/en
Application granted granted Critical
Publication of CN111930616B publication Critical patent/CN111930616B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents

Abstract

The embodiment of the invention provides a data processing method, a device, electronic equipment and a readable storage medium, and relates to the technical field of computers, wherein the method comprises the following steps: receiving at least one operation instruction; determining first page data, wherein the first page data is used for representing data of a display page before a first program responds to the at least one operation instruction; determining second page data, wherein the second page data is used for representing data of a display page after the first program responds to the at least one operation instruction; and sending the at least one operation instruction, the first page data and the second page data to a server, so that the server performs testing or fault processing based on the at least one operation instruction, the first page data and the second page data. The invention can improve the utilization rate of data and the working efficiency of the server.

Description

Data processing method, device, electronic equipment and readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method, apparatus, electronic device, and readable storage medium.
Background
Currently, with the development of computer technology, users use more and more application programs, and further, developers need to continuously update, test and maintain the application programs.
In the process of updating, testing and maintaining the application program, sample data of the user side needs to be obtained, however, the prior art has limited ways of obtaining the sample data, which results in insufficient application of the sample data and further results in reduced working efficiency of subsequent updating, testing and maintaining.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a data processing method, apparatus, electronic device, and readable storage medium, so as to improve the data utilization rate and the working efficiency of the server.
In a first aspect, a data processing method is provided, where the method is applied to a first terminal, and the method includes:
receiving at least one operation instruction;
determining first page data, wherein the first page data is used for representing data of a display page before a first program responds to the at least one operation instruction;
determining second page data, wherein the second page data is used for representing data of a display page after the first program responds to the at least one operation instruction; and
And sending the at least one operation instruction, the first page data and the second page data to a server so that the server performs testing or fault processing based on the at least one operation instruction, the first page data and the second page data.
Optionally, the page data comprises a document object model DOM tree structure.
Optionally, the method further comprises:
responding to the second page data as a fault page, and sending a fault processing instruction to a server; and
and receiving a fault processing result which is sent by the server and comprises target page data, wherein the target page data is corrected second page data.
In a second aspect, there is provided a data processing method, the method being applied to a server, the method comprising:
receiving at least one operation instruction, first page data and second page data sent by a first terminal; and
the operation instruction is an instruction received when a first program of a first terminal is operated, the first page data is used for representing data of a display page before the first program responds to the at least one operation instruction, and the second page data is used for representing data of the display page after the first program responds to the at least one operation instruction;
Testing is performed based on the at least one operation instruction, the first page data and the second page data, or fault processing is performed based on the at least one operation instruction, the first page data and the second page data.
Optionally, the page data comprises a DOM tree structure.
Optionally, the testing based on the at least one operation instruction, the first page data and the second page data includes:
transmitting the at least one operation instruction and the first page data to at least one second terminal;
receiving third page data sent by the at least one second terminal, wherein the third page data is at least one page data generated by the at least one second terminal by executing a second program based on the at least one operation instruction and the first page data, and the second program is an updated version of the first program; and
the analysis determines at least one test conclusion, the test conclusion being determined based on the second page data and the third page data.
Optionally, the analyzing determines at least one test conclusion, including:
and comparing the DOM tree corresponding to the second page data with the DOM tree corresponding to the third page data, and determining a matching result as the test conclusion.
Optionally, the fault processing based on the at least one operation instruction, the first page data and the second page data includes:
determining standard page data according to the at least one operation instruction in response to the second page data being a fault page and receiving a fault processing instruction, wherein the standard page data is used for representing page data expected to be generated when the first program sequentially runs the at least one operation instruction based on the first page data;
determining correction data according to the standard page data and the second page data;
correcting the second page data according to the correction data to determine target page data; and
and sending a fault processing result comprising the target page data.
Optionally, the determining correction data according to the standard page data and the second page data includes:
comparing the standard page data with the second page data to determine at least one abnormal node position; and
and determining the data at the position of at least one abnormal node in the standard page data as correction data.
In a third aspect, there is provided a data processing apparatus for application to a first terminal, the apparatus comprising:
The first receiving module is used for receiving at least one operation instruction;
a first determining module, configured to determine first page data, where the first page data is used to characterize data of a display page before the first program responds to the at least one operation instruction;
a second determining module, configured to determine second page data, where the second page data is used to characterize data of a display page after the first program responds to the at least one operation instruction; and
and the first sending module is used for sending the at least one operation instruction, the first page data and the second page data to a server so that the server performs testing or fault processing based on the at least one operation instruction, the first page data and the second page data.
Optionally, the page data comprises a document object model DOM tree structure.
Optionally, the apparatus further includes:
the second sending module is used for responding to the second page data as a fault page and sending a fault processing instruction to the server; and
the second receiving module is used for receiving a fault processing result which is sent by the server and comprises target page data, wherein the target page data is corrected second page data.
In a fourth aspect, there is provided a data processing apparatus for application to a server, the apparatus comprising:
the receiving module is used for receiving at least one operation instruction, first page data and second page data sent by the first terminal;
the operation instruction is an instruction received when a first program of a first terminal is operated, the first page data is used for representing data of a display page before the first program responds to the at least one operation instruction, and the second page data is used for representing data of the display page after the first program responds to the at least one operation instruction;
the testing module is used for testing based on the at least one operation instruction, the first page data and the second page data; and
and the fault processing module is used for performing fault processing based on the at least one operation instruction, the first page data and the second page data.
Optionally, the page data comprises a DOM tree structure.
Optionally, the test module is specifically configured to:
transmitting the at least one operation instruction and the first page data to at least one second terminal;
receiving third page data sent by the at least one second terminal, wherein the third page data is at least one page data generated by the at least one second terminal by executing a second program based on the at least one operation instruction and the first page data, and the second program is an updated version of the first program; and
The analysis determines at least one test conclusion, the test conclusion being determined based on the second page data and the third page data.
Optionally, the test module is specifically further configured to:
and comparing the DOM tree corresponding to the second page data with the DOM tree corresponding to the third page data, and determining a matching result as the test conclusion.
Optionally, the fault handling module is specifically configured to:
determining standard page data according to the at least one operation instruction in response to the second page data being a fault page and receiving a fault processing instruction, wherein the standard page data is used for representing page data expected to be generated when the first program sequentially runs the at least one operation instruction based on the first page data;
determining correction data according to the standard page data and the second page data;
correcting the second page data according to the correction data to determine target page data; and
and sending a fault processing result comprising the target page data.
Optionally, the fault processing module is specifically further configured to:
comparing the standard page data with the second page data to determine at least one abnormal node position; and
And determining the data at the position of at least one abnormal node in the standard page data as correction data.
In a fifth aspect, an embodiment of the present invention provides an electronic device comprising a memory and a processor, the memory storing one or more computer program instructions, wherein the one or more computer program instructions are executable by the processor to implement the method according to the first and/or second aspects.
In a sixth aspect, embodiments of the present invention provide a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method according to the first and/or second aspects.
According to the embodiment of the invention, after receiving at least one operation instruction, the first terminal can actively report the at least one operation instruction, the first page data and the second page data to the server, and in the process, the operation instruction, the first page data and the second page data can completely describe one computer event, so that the server can fully utilize the data corresponding to each computer event in the processes of updating, testing and maintaining, namely, the utilization rate of the data is improved, and the working efficiency is further improved.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent from the following description of embodiments of the present invention with reference to the accompanying drawings, in which:
FIG. 1 is a schematic diagram of a data processing system according to an embodiment of the present invention;
FIG. 2 is a flowchart of a data processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a DOM tree according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a first terminal reporting a fault according to an embodiment of the present invention;
FIG. 5 is a flowchart of another data processing method according to an embodiment of the present invention;
FIG. 6 is a flowchart of another data processing method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of another DOM tree according to an embodiment of the present invention;
FIG. 8 is a flowchart of another data processing method according to an embodiment of the present invention;
FIG. 9 is a flowchart of another data processing method according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of another data processing apparatus according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention is described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth in detail. The present invention will be fully understood by those skilled in the art without the details described herein. Well-known methods, procedures, flows, components and circuits have not been described in detail so as not to obscure the nature of the invention.
Moreover, those of ordinary skill in the art will appreciate that the drawings are provided herein for illustrative purposes and that the drawings are not necessarily drawn to scale.
Unless the context clearly requires otherwise, the words "comprise," "comprising," and the like in the description are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, it is the meaning of "including but not limited to".
In the description of the present invention, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present invention, unless otherwise indicated, the meaning of "a plurality" is two or more.
Referring to fig. 1, fig. 1 is a schematic diagram of a data processing system according to an embodiment of the present invention, where the schematic diagram includes: terminal 11, terminal 12 and server 13.
The terminal is a general data processing terminal with communication function, such as a smart phone, a tablet computer or a personal computer (Personal Computer, PC) and the like, capable of running an application program, and the server may be a single server or may be a server cluster configured in a distributed manner.
In the embodiment of the present invention, the terminal 11, the terminal 12, and the server 13 may interact with each other through a network.
For example, the terminal 11 and the terminal 12 are provided with the teaching application X, the user holding the terminal 11 is a learner, the user holding the terminal 12 is a learner, and the learner can perform online teaching activities after starting the application X. In the on-line teaching activities, the learner may operate the terminal 11 and the learner may also operate the terminal 12.
Clicking on the "start lesson" control corresponding to "lesson" of application X running in terminal 11 by the learner may trigger an operation instruction so that terminal 11 and terminal 12 may display a page including the teaching content of "lesson 1" in response to the operation instruction.
In this process, the terminal 11 or the terminal 12 may receive an operation instruction input by the user, and then the terminal 11 or the terminal 12 may execute the operation instruction (i.e., display a page including the teaching content of "course 1") and transmit the operation instruction and page data before and after execution of the operation instruction to the server 13.
After the server 13 receives the operation instruction and the page data sent by the terminal 11 or the terminal 12, the server 13 may perform a test or a fault process on the application X based on the operation instruction and the page data.
It should be noted that, the terminal and the server in fig. 1 are only examples provided in the embodiments of the present invention, and the embodiments of the present invention do not limit the types of terminals, the number of terminals, the types of servers, and the number of servers.
The following will describe in detail a data processing method provided by the embodiment of the present invention with reference to the specific implementation, where the method is applied to a first terminal, and the first terminal may be either the terminal 11 or the terminal 12 in fig. 1, and the embodiment of the present invention is not limited, as shown in fig. 2, and specific steps are as follows:
step 100, receiving at least one operation instruction.
Step 200, determining first page data.
Wherein the first page data is used for representing data of a display page before the first program responds to at least one operation instruction.
Step 300, determining second page data.
Wherein the second page data is used for representing data of a display page after the first program responds to at least one operation instruction.
Step 400, sending at least one operation instruction, first page data and second page data to the server, so that the server performs testing or fault processing based on the at least one operation instruction, the first page data and the second page data.
According to the embodiment of the invention, after receiving at least one operation instruction, the first terminal can actively report the at least one operation instruction, the first page data and the second page data to the server, and in the process, the operation instruction, the first page data and the second page data can completely describe one computer event, so that the server can fully utilize the data corresponding to each computer event in the processes of updating, testing and maintaining, namely, the utilization rate of the data is improved, and the working efficiency is further improved.
In addition, the terminal can send the operation instruction, the first page data and the second page data to the server in real time, so that timeliness of data processing can be improved through the embodiment of the invention.
Optionally, the page data in the embodiment of the present invention may include a document object model (Document Object Model, DOM) tree structure, and specifically may be an HTML DOM tree structure.
The DOM is a standard programming interface for processing the extensible markup language, is not limited by a platform and a programming language, and can dynamically access programs and scripts, update the contents, structures, styles of www documents and the like of the programs and the scripts. The DOM provides an access model for the whole document, the document is used as a tree structure, each node of the tree represents an HTML label or text item in the label, the HTML DOM tree structure accurately describes the interrelation among the labels in the HTML document, and the HTML document is converted into a DOM tree after being analyzed, so that the processing of the HTML document can be realized through the operation of the DOM tree.
As shown in fig. 3, fig. 3 is a schematic diagram of a DOM tree according to an embodiment of the present invention, where the schematic diagram includes: "body", "img", "p", "div", "hello", "span", "child" and "3 rd bit".
Wherein, "body", "img", "p", "div" and "span" are labels in the DOM tree, "hello", "child" and "3 rd bit" are text items within the labels, "font-size:16px "is the annotation node corresponding to" body ".
In practical application, the terminal may determine components in the display page based on the DOM tree, and then display the display page by rendering or the like.
Therefore, in the embodiment of the invention, the page data represents all data in one display page, and the server can perform test or fault processing according to the page data.
Optionally, as shown in fig. 4, fig. 4 is a schematic diagram of a first terminal reporting a fault, where the schematic diagram includes: a first terminal 41 and a server 42.
When the display page of the first terminal 41 fails (for example, the content in the display page does not match the operation instruction, etc.), the first terminal 41 may perform the steps of:
and step one, responding to the second page data as a fault page, and sending a fault processing instruction to the server.
In combination with the content shown in fig. 3, the reason for the failure of the page may be that any node in the DOM tree is in error, which results in the page failure.
And step two, receiving a fault processing result which is sent by the server and comprises target page data.
The target page data is corrected second page data.
According to the embodiment of the invention, the first terminal can report the fault page and the fault processing instruction in real time, so that the server can send the corrected page data to the first terminal at the first time, and the fault processing efficiency is improved.
The following will describe a data processing method provided in the embodiment of the present invention in detail from the perspective of a server, as shown in fig. 5, the specific steps are as follows:
and 500, receiving at least one operation instruction, first page data and second page data sent by the first terminal.
The operation instruction is an instruction received when a first program of the first terminal is operated, the first page data is used for representing data of a display page before the first program responds to at least one operation instruction, and the second page data is used for representing data of the display page after the first program responds to at least one operation instruction.
Step 600, performing a test based on at least one operation instruction, the first page data, and the second page data, or performing fault handling based on at least one operation instruction, the first page data, and the second page data.
According to the embodiment of the invention, the server can receive at least one operation instruction, the first page data and the second page data sent by the first terminal, and then test or fault processing is carried out based on the real-time data.
Optionally, the page data in the embodiment of the present invention may be a DOM tree structure, and specifically may include an HTML DOM tree structure.
In the embodiment of the invention, the page data characterizes all data in one display page, and further, the server can test or process faults according to the page data.
Optionally, the server performs the testing process based on at least one operation instruction, the first page data and the second page data, as shown in fig. 6, and specifically includes the following steps:
step 610, at least one operation instruction and first page data are sent to at least one second terminal.
In practical application, the second terminal may be a terminal for testing, in which an application program of a version to be tested is running, and the application program may be the latest version or the tested version.
Meanwhile, in order to ensure the smoothness of the test process, the first terminal and the second terminal can operate different versions of the same application program in the same operation environment, wherein the operation environment can be android, IOS, windows and the like, and the embodiment is not particularly limited.
Step 620, receiving third page data sent by at least one second terminal.
The third page data is at least one page data generated by at least one second terminal executing a second program based on at least one operation instruction and the first page data, and the second program is an updated version of the first program.
Step 630, analysis determines at least one test conclusion.
Wherein the test conclusion is determined based on the second page data and the third page data.
Alternatively, step 630 may be specifically performed as: and comparing the DOM tree corresponding to the second page data with the DOM tree corresponding to the third page data, and determining the matching result as a test conclusion.
As shown in fig. 7, fig. 7 is a schematic diagram of another DOM tree according to an embodiment of the present invention, where the schematic diagram includes: "body", "img", "p", "hello", "span", "child" and "3 rd bit".
In connection with what is shown in fig. 3, fig. 7 differs from fig. 3 in that: the position of the tag node "div" on the far right side of the DOM tree shown in fig. 3 is "p" in fig. 7, and the annotation node "display" in the middle of the third layer of the DOM tree shown in fig. 3: the block "position is" display "in fig. 7: none).
If the DOM tree shown in fig. 3 is the second page data and the DOM tree shown in fig. 7 is the third page data, the server may compare the DOM tree shown in fig. 3 with the DOM tree shown in fig. 7, and determine that the matching result is the test conclusion.
Specifically, since there is a tag node mismatch (div in fig. 3, p in fig. 7) and an annotation node mismatch (display: block in fig. 3, display: none in fig. 7) in the DOM tree shown in fig. 3 and fig. 7, the matching result obtained by the server is a test conclusion of partial matching or matching error.
Furthermore, the server can update and maintain the second program according to the unmatched part of the DOM tree in the test conclusion, so that the second program tends to be more stable.
According to the embodiment of the invention, the server can receive the operation instruction, the first page data and the second page data which are actively reported by the first terminal, so that samples for testing by the server are more abundant, and further, the efficiency of testing the application program by the server can be greatly improved.
Optionally, the fault processing process of the server based on at least one operation instruction, the first page data and the second page data, as shown in fig. 8, specifically includes the following steps:
and step 640, determining standard page data according to at least one operation instruction in response to the second page data being the fault page and receiving the fault processing instruction.
The standard page data is used for representing page data expected to be generated when the first program sequentially runs at least one operation instruction based on the first page data.
Step 650, determining correction data according to the standard page data and the second page data.
The server may determine a difference between the DOM tree structure of the standard page data and the DOM tree structure of the second page data, and determine correction data according to the difference.
Specifically, as shown in fig. 9, step 650 may specifically include the following steps:
step 651, comparing the standard page data with the second page data to determine at least one abnormal node position.
With reference to fig. 3 and fig. 7, if the DOM tree shown in fig. 3 is the second page data and the DOM tree shown in fig. 7 is the standard page data, the server may compare the DOM tree shown in fig. 3 with the DOM tree shown in fig. 7, and determine at least one abnormal node position.
Specifically, fig. 7 differs from fig. 3 in that: the position of the tag node "div" on the far right side of the DOM tree shown in fig. 3 is "p" in fig. 7, and the annotation node "display" in the middle of the third layer of the DOM tree shown in fig. 3: the block "position is" display "in fig. 7: none).
Because the DOM tree shown in fig. 7 is standard page data, that is, each node in the DOM tree shown in fig. 7 is a normal node, the tag node "div" and the annotation node "display" in the DOM tree shown in fig. 3: block "is the outlier node location.
In the actual application process, the names, types or corresponding attribute values of part of nodes in the DOM tree can be changed due to page refreshing time and the like, and in the process of determining the abnormal node position of the DOM tree, the changed nodes can be preset as dynamic nodes, and the dynamic nodes in each DOM tree are deleted before comparison, so that erroneous judgment is prevented.
Step 652, determining the data at the position of at least one abnormal node in the standard page data as correction data.
In connection with what is shown in fig. 3 and 7, the correct data at the abnormal node position in fig. 3 should be the tag node "p" shown in fig. 7, and the annotation node "display: none).
Thus, the server may update the label node "p" shown in fig. 7, as well as the annotation node "display: none "as correction data.
And step 660, correcting the second page data according to the correction data to determine target page data.
Specifically, as shown in fig. 3 and fig. 7, after the server determines the abnormal node position and the correction data, the server may display the tag node "div" and the annotation node "display" in fig. 3: block ", modified to the tag node" p "shown in fig. 7, and the annotation node" display: none).
The server may then use the modified second page data as target page data, i.e., the modified DOM tree shown in fig. 3 is identical to the DOM tree shown in fig. 7.
Step 670, sending a fault handling result including the target page data.
Specifically, after determining the target page data, the server may generate a corresponding fault processing result based on the target page data, and then send the fault processing result to the sending terminal (i.e., the first terminal) of the fault processing instruction.
According to the embodiment of the invention, the server can receive the operation instruction, the first page data, the second page data and the fault processing instruction which are reported by the first terminal in real time, and further, the server can determine the target page data aiming at the fault interface in real time and return the fault processing result, so that the first terminal can receive the target page data in time, and the accident processing efficiency and the service effect are obviously improved.
Based on the same technical concept, the embodiment of the present invention further provides a data processing apparatus, where the apparatus is applied to a first terminal, as shown in fig. 10, and the apparatus includes: a first receiving module 101, a first determining module 102, a second determining module 103 and a first transmitting module 104.
A first receiving module 101, configured to receive at least one operation instruction;
a first determining module 102, configured to determine first page data, where the first page data is used to characterize data of a display page before the first program responds to at least one operation instruction;
a second determining module 103, configured to determine second page data, where the second page data is used to represent data of a display page after the first program responds to at least one operation instruction; and
The first sending module 104 is configured to send at least one operation instruction, the first page data, and the second page data to the server, so that the server performs a test or a fault process based on the at least one operation instruction, the first page data, and the second page data.
Optionally, the page data comprises a document object model DOM tree structure.
Optionally, the apparatus further comprises:
the second sending module is used for responding to the second page data as a fault page and sending a fault processing instruction to the server; and
the second receiving module is used for receiving a fault processing result which is sent by the server and comprises target page data, wherein the target page data is corrected second page data.
According to the embodiment of the invention, after receiving at least one operation instruction, the first terminal can actively report the at least one operation instruction, the first page data and the second page data to the server, and in the process, the operation instruction, the first page data and the second page data can completely describe one computer event, so that the server can fully utilize the data corresponding to each computer event in the processes of updating, testing and maintaining, namely, the utilization rate of the data is improved, and the working efficiency is further improved.
Based on the same technical concept, the embodiment of the present invention further provides a data processing apparatus, where the apparatus is applied to a server, as shown in fig. 11, and the apparatus includes: a receiving module 111, a testing module 112 and a fault handling module 113.
A receiving module 111, configured to receive at least one operation instruction, first page data and second page data sent by the first terminal;
the operation instruction is an instruction received when a first program of the first terminal is operated, the first page data is used for representing data of a display page before the first program responds to at least one operation instruction, and the second page data is used for representing data of the display page after the first program responds to at least one operation instruction;
a test module 112 for testing based on at least one operation instruction, the first page data and the second page data; and
the fault processing module 113 is configured to perform fault processing based on at least one operation instruction, the first page data, and the second page data.
Optionally, the page data comprises a DOM tree structure.
Optionally, the test module 112 is specifically configured to:
transmitting at least one operation instruction and first page data to at least one second terminal;
Receiving third page data sent by at least one second terminal, wherein the third page data is at least one page data generated by the at least one second terminal by executing a second program based on at least one operation instruction and the first page data, and the second program is an updated version of the first program; and
the analysis determines at least one test conclusion, the test conclusion being determined based on the second page data and the third page data.
Optionally, the test module 112 is specifically further configured to:
and comparing the DOM tree corresponding to the second page data with the DOM tree corresponding to the third page data, and determining the matching result as a test conclusion.
Optionally, the fault handling module 113 is specifically configured to:
responding to the second page data as a fault page and receiving a fault processing instruction, and determining standard page data according to at least one operation instruction, wherein the standard page data is used for representing page data expected to be generated when a first program sequentially runs at least one operation instruction based on the first page data;
determining correction data according to the standard page data and the second page data;
correcting the second page data according to the correction data to determine target page data; and
And sending a fault processing result comprising the target page data.
Optionally, the fault handling module 113 is specifically further configured to:
comparing the standard page data with the second page data to determine at least one abnormal node position; and
and determining the data at the position of at least one abnormal node in the standard page data as correction data.
According to the embodiment of the invention, the server can receive at least one operation instruction, the first page data and the second page data sent by the first terminal, and then test or fault processing is carried out based on the real-time data.
Fig. 12 is a schematic diagram of an electronic device according to an embodiment of the invention. As shown in fig. 12, the electronic device shown in fig. 12 is a general address query device, which includes a general computer hardware structure including at least a processor 121 and a memory 122. Processor 121 and memory 122 are connected by bus 123. The memory 122 is adapted to store instructions or programs executable by the processor 121. The processor 121 may be a separate microprocessor or a collection of one or more microprocessors. Thus, the processor 121 performs the process flow of the embodiment of the present invention described above to realize the processing of data and the control of other devices by executing the instructions stored in the memory 122. Bus 123 connects the above components together, as well as to display controller 124 and display devices and input/output (I/O) devices 125. Input/output (I/O) devices 125 may be a mouse, keyboard, modem, network interface, touch input device, somatosensory input device, printer, and other devices known in the art. Typically, input/output devices 125 are connected to the system through input/output (I/O) controllers 126.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, apparatus (device) or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may employ a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations of methods, apparatus (devices) and computer program products according to embodiments of the application. It will be understood that each of the flows in the flowchart may be implemented by computer program instructions.
These computer program instructions may be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows.
These computer program instructions may also be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows.
Another embodiment of the present invention is directed to a non-volatile storage medium storing a computer readable program for causing a computer to perform some or all of the method embodiments described above.
That is, it will be understood by those skilled in the art that all or part of the steps in implementing the methods of the embodiments described above may be implemented by a program stored in a storage medium, where the program includes several instructions for causing a device (which may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps in the methods of the embodiments described herein. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations may be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (18)

1. A data processing method, wherein the method is applied to a first terminal, the method comprising:
receiving at least one operation instruction;
determining first page data, wherein the first page data is used for representing data of a display page before a first program responds to the at least one operation instruction;
determining second page data, wherein the second page data is used for representing data of a display page after the first program responds to the at least one operation instruction; and
transmitting the at least one operation instruction, the first page data and the second page data to a server, so that the server performs testing or fault processing based on the at least one operation instruction, the first page data and the second page data;
the server receives third page data sent by at least one second terminal by sending the at least one operation instruction and the first page data to the at least one second terminal, and analyzes and determines at least one test conclusion to test;
the third page data is at least one page data generated by the at least one second terminal executing a second program based on the at least one operation instruction and the first page data, the second program is an updated version of the first program, and the test conclusion is determined based on the second page data and the third page data.
2. The method of claim 1, wherein the page data comprises a document object model DOM tree structure.
3. The method according to claim 1, wherein the method further comprises:
responding to the second page data as a fault page, and sending a fault processing instruction to a server; and
and receiving a fault processing result which is sent by the server and comprises target page data, wherein the target page data is corrected second page data.
4. A data processing method, wherein the method is applied to a server, the method comprising:
receiving at least one operation instruction, first page data and second page data sent by a first terminal; and
the operation instruction is an instruction received when a first program of a first terminal is operated, the first page data is used for representing data of a display page before the first program responds to the at least one operation instruction, and the second page data is used for representing data of the display page after the first program responds to the at least one operation instruction;
performing a test based on the at least one operation instruction, the first page data and the second page data, or performing a fault process based on the at least one operation instruction, the first page data and the second page data;
Wherein the testing based on the at least one operation instruction, the first page data, and the second page data includes:
transmitting the at least one operation instruction and the first page data to at least one second terminal;
receiving third page data sent by the at least one second terminal, wherein the third page data is at least one page data generated by the at least one second terminal by executing a second program based on the at least one operation instruction and the first page data, and the second program is an updated version of the first program; and
the analysis determines at least one test conclusion, the test conclusion being determined based on the second page data and the third page data.
5. The method of claim 4, wherein the page data comprises a DOM tree structure.
6. The method of claim 4, wherein the analyzing determines at least one test conclusion comprising:
and comparing the DOM tree corresponding to the second page data with the DOM tree corresponding to the third page data, and determining a matching result as the test conclusion.
7. The method of claim 5, wherein the performing fault handling based on the at least one operation instruction, the first page data, and the second page data comprises:
Determining standard page data according to the at least one operation instruction in response to the second page data being a fault page and receiving a fault processing instruction, wherein the standard page data is used for representing page data expected to be generated when the first program sequentially runs the at least one operation instruction based on the first page data;
determining correction data according to the standard page data and the second page data;
correcting the second page data according to the correction data to determine target page data; and
and sending a fault processing result comprising the target page data.
8. The method of claim 7, wherein said determining correction data based on said standard page data and said second page data comprises:
comparing the standard page data with the second page data to determine at least one abnormal node position; and
and determining the data at the position of at least one abnormal node in the standard page data as correction data.
9. A data processing apparatus, the apparatus being applied to a first terminal, the apparatus comprising:
the first receiving module is used for receiving at least one operation instruction;
A first determining module, configured to determine first page data, where the first page data is used to characterize data of a display page before the first program responds to the at least one operation instruction;
a second determining module, configured to determine second page data, where the second page data is used to characterize data of a display page after the first program responds to the at least one operation instruction; and
the first sending module is used for sending the at least one operation instruction, the first page data and the second page data to a server so that the server can perform testing or fault processing based on the at least one operation instruction, the first page data and the second page data;
the server receives third page data sent by at least one second terminal by sending the at least one operation instruction and the first page data to the at least one second terminal, and analyzes and determines at least one test conclusion to test;
the third page data is at least one page data generated by the at least one second terminal executing a second program based on the at least one operation instruction and the first page data, the second program is an updated version of the first program, and the test conclusion is determined based on the second page data and the third page data.
10. The apparatus of claim 9, wherein the page data comprises a document object model DOM tree structure.
11. The apparatus of claim 9, wherein the apparatus further comprises:
the second sending module is used for responding to the second page data as a fault page and sending a fault processing instruction to the server; and
the second receiving module is used for receiving a fault processing result which is sent by the server and comprises target page data, wherein the target page data is corrected second page data.
12. A data processing apparatus, the apparatus being applied to a server, the apparatus comprising:
the receiving module is used for receiving at least one operation instruction, first page data and second page data sent by the first terminal;
the operation instruction is an instruction received when a first program of a first terminal is operated, the first page data is used for representing data of a display page before the first program responds to the at least one operation instruction, and the second page data is used for representing data of the display page after the first program responds to the at least one operation instruction;
The testing module is used for testing based on the at least one operation instruction, the first page data and the second page data; and
the fault processing module is used for performing fault processing based on the at least one operation instruction, the first page data and the second page data;
the test module is specifically configured to:
transmitting the at least one operation instruction and the first page data to at least one second terminal;
receiving third page data sent by the at least one second terminal, wherein the third page data is at least one page data generated by the at least one second terminal by executing a second program based on the at least one operation instruction and the first page data, and the second program is an updated version of the first program; and
the analysis determines at least one test conclusion, the test conclusion being determined based on the second page data and the third page data.
13. The apparatus of claim 12, wherein the page data comprises a DOM tree structure.
14. The apparatus according to claim 12, wherein the test module is further configured to:
And comparing the DOM tree corresponding to the second page data with the DOM tree corresponding to the third page data, and determining a matching result as the test conclusion.
15. The apparatus of claim 13, wherein the fault handling module is specifically configured to:
determining standard page data according to the at least one operation instruction in response to the second page data being a fault page and receiving a fault processing instruction, wherein the standard page data is used for representing page data expected to be generated when the first program sequentially runs the at least one operation instruction based on the first page data;
determining correction data according to the standard page data and the second page data;
correcting the second page data according to the correction data to determine target page data; and
and sending a fault processing result comprising the target page data.
16. The apparatus of claim 15, wherein the fault handling module is further configured to:
comparing the standard page data with the second page data to determine at least one abnormal node position; and
and determining the data at the position of at least one abnormal node in the standard page data as correction data.
17. An electronic device comprising a memory and a processor, wherein the memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method of any of claims 1-8.
18. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-8.
CN202010732727.4A 2020-07-27 2020-07-27 Data processing method, device, electronic equipment and readable storage medium Active CN111930616B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010732727.4A CN111930616B (en) 2020-07-27 2020-07-27 Data processing method, device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010732727.4A CN111930616B (en) 2020-07-27 2020-07-27 Data processing method, device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111930616A CN111930616A (en) 2020-11-13
CN111930616B true CN111930616B (en) 2024-03-19

Family

ID=73314219

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010732727.4A Active CN111930616B (en) 2020-07-27 2020-07-27 Data processing method, device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111930616B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999420A (en) * 2011-09-13 2013-03-27 阿里巴巴集团控股有限公司 XSS (Cross Site Scripting) testing method and XSS testing system based on DOM (Document Object Model)
CN103635897A (en) * 2011-06-23 2014-03-12 微软公司 Dynamically updating a running page
US8849985B1 (en) * 2007-12-03 2014-09-30 Appcelerator, Inc. On-the-fly instrumentation of Web applications, Web-pages or Web-sites
CN104077221A (en) * 2014-06-27 2014-10-01 百度在线网络技术(北京)有限公司 Style test method and device for front-end page
US9262311B1 (en) * 2013-12-03 2016-02-16 Amazon Technologies, Inc. Network page test system and methods
CN105760290A (en) * 2014-12-17 2016-07-13 阿里巴巴集团控股有限公司 Problem positioning method based on web front-end testing as well as related device and system
CN106095674A (en) * 2016-06-07 2016-11-09 百度在线网络技术(北京)有限公司 A kind of website automation test method and device
US9507700B1 (en) * 2015-12-22 2016-11-29 Sap Se Generic method for automated software testing
CN107451065A (en) * 2017-08-18 2017-12-08 郑州云海信息技术有限公司 A kind of method and system of reparation web automatic test scripts
CN108170606A (en) * 2018-01-03 2018-06-15 中国工商银行股份有限公司 The test system and method for system software upgrading class application
CN108804299A (en) * 2017-04-26 2018-11-13 腾讯科技(深圳)有限公司 Application exception processing method and processing device
CN108829583A (en) * 2018-05-24 2018-11-16 广东睿江云计算股份有限公司 A kind of page compatibility test method and device based on Selenium
CN109144856A (en) * 2018-07-27 2019-01-04 北京皮尔布莱尼软件有限公司 A kind of UI automated testing method calculates equipment and storage medium
CN110297759A (en) * 2019-05-22 2019-10-01 深圳壹账通智能科技有限公司 A kind of method, apparatus making test page script, equipment and storage medium
CN110928791A (en) * 2019-11-27 2020-03-27 腾讯科技(深圳)有限公司 Program testing method, program testing device, computer equipment and storage medium
CN111176960A (en) * 2019-10-22 2020-05-19 腾讯科技(深圳)有限公司 User operation behavior tracking method, device, equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8392890B2 (en) * 2007-10-15 2013-03-05 Software Research, Inc. Method and system for testing websites
CN103164334B (en) * 2011-12-19 2016-03-30 国际商业机器公司 Detect the system and method for the breakaway poing in web application automatic test case
US10275339B2 (en) * 2017-08-04 2019-04-30 Sap Se Accessibility testing software automation tool
US10769056B2 (en) * 2018-02-26 2020-09-08 The Ultimate Software Group, Inc. System for autonomously testing a computer system
US20200050540A1 (en) * 2018-08-10 2020-02-13 International Business Machines Corporation Interactive automation test
US10802950B2 (en) * 2018-09-19 2020-10-13 Servicenow, Inc. Automated webpage testing

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8849985B1 (en) * 2007-12-03 2014-09-30 Appcelerator, Inc. On-the-fly instrumentation of Web applications, Web-pages or Web-sites
CN103635897A (en) * 2011-06-23 2014-03-12 微软公司 Dynamically updating a running page
CN102999420A (en) * 2011-09-13 2013-03-27 阿里巴巴集团控股有限公司 XSS (Cross Site Scripting) testing method and XSS testing system based on DOM (Document Object Model)
US9262311B1 (en) * 2013-12-03 2016-02-16 Amazon Technologies, Inc. Network page test system and methods
CN104077221A (en) * 2014-06-27 2014-10-01 百度在线网络技术(北京)有限公司 Style test method and device for front-end page
CN105760290A (en) * 2014-12-17 2016-07-13 阿里巴巴集团控股有限公司 Problem positioning method based on web front-end testing as well as related device and system
US9507700B1 (en) * 2015-12-22 2016-11-29 Sap Se Generic method for automated software testing
CN106095674A (en) * 2016-06-07 2016-11-09 百度在线网络技术(北京)有限公司 A kind of website automation test method and device
CN108804299A (en) * 2017-04-26 2018-11-13 腾讯科技(深圳)有限公司 Application exception processing method and processing device
CN107451065A (en) * 2017-08-18 2017-12-08 郑州云海信息技术有限公司 A kind of method and system of reparation web automatic test scripts
CN108170606A (en) * 2018-01-03 2018-06-15 中国工商银行股份有限公司 The test system and method for system software upgrading class application
CN108829583A (en) * 2018-05-24 2018-11-16 广东睿江云计算股份有限公司 A kind of page compatibility test method and device based on Selenium
CN109144856A (en) * 2018-07-27 2019-01-04 北京皮尔布莱尼软件有限公司 A kind of UI automated testing method calculates equipment and storage medium
CN110297759A (en) * 2019-05-22 2019-10-01 深圳壹账通智能科技有限公司 A kind of method, apparatus making test page script, equipment and storage medium
CN111176960A (en) * 2019-10-22 2020-05-19 腾讯科技(深圳)有限公司 User operation behavior tracking method, device, equipment and storage medium
CN110928791A (en) * 2019-11-27 2020-03-27 腾讯科技(深圳)有限公司 Program testing method, program testing device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111930616A (en) 2020-11-13

Similar Documents

Publication Publication Date Title
US10713149B2 (en) Processing automation scripts of software
CN108563768B (en) Data conversion method, device, equipment and storage medium for different data models
US8719797B2 (en) System and method for debugging dynamically generated code of an application
CN106990967B (en) Data processing method of rule engine
US9497248B2 (en) System for enabling rich network applications
CN112287009A (en) Interface calling and interface data warehousing method, device, equipment and storage medium
US20140113257A1 (en) Automated evaluation of programming code
CN113704110A (en) Automatic testing method and device for user interface
CN115599359A (en) Code generation method, device, equipment and medium
KR20100100161A (en) Method and apparatus for testing browser compatibility of web contents
CN116088846A (en) Processing method, related device and equipment for continuous integrated code format
JP2018092361A (en) Test script correction apparatus and test script correction program
CN111158973B (en) Web application dynamic evolution monitoring method
CN111930616B (en) Data processing method, device, electronic equipment and readable storage medium
CN113726610B (en) Routing protocol-based UI (user interface) automatic test method, device, equipment and medium
CN114116268A (en) Method and device for checking Flink SQL statement, computer equipment and storage medium
CN114817025A (en) Code testing method, device, equipment and storage medium
JP2018092362A (en) Test script correction apparatus and test script correction program
KR20200121611A (en) Server and method for controlling the server
CN113900665B (en) Security detection method and device for intelligent contract
CN116126345A (en) Page element processing method and device and related equipment
JP2005352861A (en) Electronic data processing method, apparatus and program
CN113986834A (en) Offline file updating method and device based on browser and electronic equipment
CN117609063A (en) API use case generation method, device, electronic equipment, storage medium and product
US20220405196A1 (en) Operation pattern generation apparatus, operation pattern generation method and program

Legal Events

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