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

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

Info

Publication number
CN114443498A
CN114443498A CN202210115689.7A CN202210115689A CN114443498A CN 114443498 A CN114443498 A CN 114443498A CN 202210115689 A CN202210115689 A CN 202210115689A CN 114443498 A CN114443498 A CN 114443498A
Authority
CN
China
Prior art keywords
data
compared
response data
processed
array
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210115689.7A
Other languages
Chinese (zh)
Inventor
刘海迪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202210115689.7A priority Critical patent/CN114443498A/en
Publication of CN114443498A publication Critical patent/CN114443498A/en
Pending legal-status Critical Current

Links

Images

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/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data processing method, a data processing device, electronic equipment and a storage medium, wherein the data processing method comprises the following steps: receiving a data comparison request; acquiring at least two resource locators, and respectively determining to-be-processed response data corresponding to each resource locator; acquiring data extraction rules corresponding to the response data to be processed, and extracting response data to be compared in the corresponding response data to be processed based on the data extraction rules to obtain two groups of response data to be compared; and comparing the two groups of response data to be compared to obtain a target comparison result. According to the technical scheme, the problems that compared data need to be extracted firstly and then the data are sequenced and then the comparison operation is executed when the data are compared at present are solved, at the moment, if the extracted data are in a json format, a key corresponds to a plurality of values, json arrays cannot be sequenced, and therefore the data cannot be compared and processed, a data comparison result cannot be obtained, and the technical effects of convenience and accuracy of data comparison are achieved.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a data processing method and device, electronic equipment and a storage medium.
Background
At present, the requirements of data testing are more and the types are richer, including comparison processing of test data, so that corresponding effects are analyzed according to comparison processing results.
Generally, the data alignment method adopted is as follows: and extracting data returned by a certain data interface by using tools such as statepad + +, excel and the like, and importing the obtained partial data into the table. And thirdly, converting partial data into a specific format, namely, after the partial data are sequenced according to a certain mode, comparing the partial data to obtain a corresponding comparison result.
When the present invention is implemented based on the above-described embodiments, the inventors have found that the following problems occur:
when the data comparison operation is performed based on the tool, only a small amount of data can be processed each time, namely, part of data is extracted into excel, and then the data is sorted and then compared. When more data need to be extracted, the steps need to be repeatedly executed for multiple times to obtain corresponding comparison results, and the problems of complex and complicated data comparison and time waste exist.
Furthermore, when the extracted data is a json array, the array is mainly displayed in a key-value form, generally, one key may correspond to a plurality of values, and at this time, when sorting is performed based on the key, the json array cannot be sorted, so that the data cannot be compared, and a corresponding data comparison result cannot be obtained.
Disclosure of Invention
The invention provides a data processing method, a data processing device, electronic equipment and a storage medium, which are used for realizing the technical effects of quickly and conveniently comparing data and improving the data processing efficiency.
In a first aspect, an embodiment of the present invention provides a data processing method, where the method includes:
receiving a data comparison request; acquiring at least two resource locators, and respectively determining to-be-processed response data corresponding to each resource locator;
acquiring data extraction rules corresponding to the to-be-processed response data, and extracting the to-be-compared response data in the corresponding to-be-processed response data based on the data extraction rules to obtain two groups of to-be-compared response data;
and comparing the two groups of response data to be compared to obtain a target comparison result.
Further, the acquiring at least two resource locators and determining the to-be-processed response data corresponding to each resource locator respectively includes:
acquiring at least two resource locators carried in the data comparison request and an interface type corresponding to each resource locator;
and respectively acquiring the response data to be processed corresponding to the resource locator from the interface corresponding to the interface type.
Further, the data comparison request further includes a data extraction rule corresponding to each resource locator, the obtaining of the data extraction rule corresponding to each piece of response data to be processed, and the extracting of the response data to be compared in the corresponding response data to be processed based on the data extraction rule to obtain two sets of response data to be compared include:
acquiring a data extraction rule corresponding to each resource locator carried in the data comparison request;
and extracting the response data to be compared from the corresponding response data to be processed according to the data extraction rule corresponding to each response data to be processed to obtain two groups of response data to be compared.
Further, the comparing the two sets of response data to be compared to obtain a target comparison result includes:
and comparing the two groups of response data to be compared according to the theoretical fault tolerance carried in the data comparison request to obtain a target comparison result.
Further, the comparing the response data to be compared includes a field value corresponding to a field of a data extraction rule and data to be compared corresponding to the field value, and the comparing the two sets of response data to be compared according to a theoretical fault tolerance carried in the data comparison request to obtain a target comparison result includes:
taking the data with the same field value in the two groups of response data to be compared as an array to be processed;
aiming at each array to be processed, comparing data to be compared in the current array to be processed according to the theoretical fault-tolerant rate to obtain an array comparison result;
and determining the target comparison result according to the array comparison result of each array to be processed.
Further, the comparing the data to be compared in the current array to be processed according to the theoretical fault-tolerant ratio to obtain the array comparison result includes:
determining a difference value of data to be compared in a current array to be processed, and determining an actual fault tolerance rate according to the difference value and the data to be compared;
if the actual fault-tolerant rate is smaller than the theoretical fault-tolerant rate, determining that the comparison results of the arrays are equal;
and if the actual fault tolerance rate is greater than the theoretical fault tolerance rate, determining that the comparison results of the arrays are not equal.
Further, the target comparison result includes at least one group of field values corresponding to the fields of the array extraction rule, data to be compared corresponding to each group of field values, an array comparison result corresponding to each group of field values, and a difference value corresponding to the array comparison result when the array comparison results are not equal.
In a second aspect, an embodiment of the present invention further provides a data processing apparatus, where the apparatus includes:
the to-be-processed response data determining module is used for receiving a data comparison request; acquiring at least two resource locators, and respectively determining to-be-processed response data corresponding to each resource locator;
the to-be-compared response data determining module is used for acquiring data extraction rules corresponding to the to-be-processed response data, extracting the to-be-compared response data in the corresponding to-be-processed response data based on the data extraction rules, and obtaining two groups of to-be-compared response data;
and the comparison result determining module is used for comparing the two groups of response data to be compared to obtain a target comparison result.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method according to any one of the embodiments of the present invention.
In a fourth aspect, the embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for executing the data processing method according to any one of the embodiments of the present invention.
The technical scheme of the embodiment of the invention comprises the steps of receiving a data comparison request, obtaining at least two resource locators, respectively determining to-be-processed response data corresponding to each resource locator, obtaining a data extraction rule corresponding to each to-be-processed response data, extracting the to-be-compared response data in the corresponding to-be-processed data based on the data extraction rule to obtain two groups of to-be-compared response data, and comparing the two groups of to-be-compared response data to obtain a target comparison result, so that the problems of complex operation, complexity and high cost caused by the fact that the data can be processed by repeating for many times in the prior art are solved, the problems that when the extracted data is a json array, the arrays cannot be sequenced, the data cannot be compared and the corresponding data comparison result cannot be obtained are solved, and after the corresponding data is extracted according to the data extraction rule, the data can be compared without sequencing the data, so that the technical effects of convenience, accuracy and effectiveness of data comparison are improved.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an interface corresponding to a data comparison request according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a data processing method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a data comparison process according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some structures related to the present invention are shown in the drawings, not all of them.
Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present invention, where the embodiment is applicable to a situation where data comparison is performed on data to be tested, the method may be executed by a data processing apparatus, the system may be implemented in the form of software and/or hardware, and the hardware may be an electronic device, such as a mobile terminal or a PC.
Before the technical solution of the present embodiment is introduced, an application scenario may be exemplarily described. The technical scheme of the embodiment of the invention can be applied to the situation that two pieces of data need to be read for comparison, and files to be compared in various dimensions can be extracted according to the rules edited in advance. The data extraction rules corresponding to different application scenarios may be the same or different, and the user may also set the corresponding extraction rules according to actual requirements to obtain the files to be compared, i.e., the data to be compared. The application scenarios are more, for example, the difference of different environment data can be compared, the difference of real-time offline data can be compared, and the data meeting the standard can be displayed according to the acceptable difference rate of the services. For example, data generated by the business party and the system can be compared during the development process or the application process of the program. Alternatively, during the operation of a certain server, the offline data and the online data may be compared, so as to determine the operation information of the server according to the comparison result.
As shown in fig. 1, the method of this embodiment includes:
s110, receiving a data comparison request; at least two resource locators are obtained, and the to-be-processed response data corresponding to each resource locator is determined respectively.
It should be noted that, a corresponding application program may be developed based on the technical solution of the embodiment of the present invention, or the technical solution of the embodiment of the present invention may be integrated into one page. The user can edit the corresponding content in the application or page. After the content editing is completed and the confirmation key is triggered, a data comparison request can be generated and sent to the server, so that the server performs data comparison operation.
After the user finishes editing the corresponding content in the content editing control, the user can trigger the confirmation key, and at this time, a data comparison request can be generated. The data comparison request can be understood as a request for comparison of data contents. Namely, a request for performing a comparison test on data to be tested. The resource locator is also called a page address, and is an address of a standard resource on the internet. The reason for determining the resource locator is that the source of the data to be compared can be determined to obtain the data to be compared based on the resource locator. The number of the at least two resource locators can be two, three or more, and the specific number is determined according to the data sources to be compared. For example, if data from three sources are to be compared, the number of resource locators is three. Corresponding data can be acquired based on the resource locator, and the acquired data can be used as response data to be processed.
It should be noted that, based on the resource locator, one piece of response data to be processed corresponding to the resource locator may be obtained, that is, the number of the response data to be processed is consistent with the number of the resource locator.
Specifically, when a data comparison request is received, the resource locators edited by the user in advance may be obtained, and the to-be-processed response data corresponding to each resource locator may be obtained, so as to perform comparison processing on the data in the to-be-processed response data.
For example, referring to fig. 2, a user may edit corresponding content in each content editing control displayed in a page, and after the content editing is completed, if the user triggers the data comparison control a on the page, that is, when a target control corresponding to the data comparison request is generated, a corresponding data comparison request may be generated. The data comparison request may carry content edited in the page, for example, the content carried is a resource locator. The server may obtain pending response data corresponding to the resource locator.
In this embodiment, the obtaining at least two resource locators when receiving the data comparison request and determining the to-be-processed response data corresponding to each resource locator respectively includes: when a data comparison request is received, acquiring at least two resource locators carried in the data comparison request and an interface type corresponding to each resource locator; and respectively acquiring the response data to be processed corresponding to the resource locator from the interface corresponding to the interface type.
Each interface has an interface type corresponding to it, for example, the interface type may be an http interface type or the like. The interface type matches the resource locator.
Specifically, with continued reference to fig. 2, the user may edit the resource locator URL and the interface type in the page of the editing content, and may generate the data comparison request sent to the server when detecting that the control for generating the data comparison request is triggered. When a data comparison request is received, the resource locators carried in the data comparison request and the interface types corresponding to the resource locators can be obtained. And aiming at each resource locator, acquiring the response data to be processed corresponding to the current resource locator from the corresponding interface according to the interface type corresponding to the current resource locator.
Generally, at least two sets of data are needed in data alignment, so that resource locators of response data to be processed, which need to be acquired, can be set in a page respectively, and an interface type corresponding to each resource locator can be set. Correspondingly, the acquired response data to be processed is respectively matched with each resource locator.
And S120, acquiring data extraction rules corresponding to the response data to be processed, and extracting the response data to be compared in the corresponding response data to be processed based on the data extraction rules to obtain two groups of response data to be compared.
In order to extract data to be compared from the response data to be processed, a data extraction rule may be set. It can be understood as a rule of which data is extracted from the response data to be processed by the data extraction rule and how the data is extracted. The user may edit the corresponding data extraction rule in the page or the application program, for example, the to-be-processed response data corresponding to the URL1 and the URL2 needs to be compared, and the data extraction rule corresponding to the URL1 and the URL2 may be set respectively. At this time, the two rules set may be the same or different, and the user may set the rules according to actual requirements as long as the corresponding data to be compared can be extracted. And taking the data extracted from the response data to be processed based on the data extraction rule as response data to be compared. Namely, the response data to be compared is the data which finally participates in the data comparison.
Specifically, after the data extraction rule corresponding to each resource locator carried in the data comparison request is obtained, the data to be compared can be extracted from the corresponding to-be-processed response data based on the data extraction rule, so as to obtain to-be-compared response data of each to-be-processed response data. Namely, two groups of response data to be compared are obtained.
Illustratively, with continued reference to FIG. 2, the user has edited two resource locators URL1 and URL2, a data extraction rule corresponding to each resource locator, e.g., data extraction rule (parse rule) 1 corresponding to URL1, and data extraction rule (parse rule) 2 corresponding to URL2, in the page. Correspondingly, the data comparison request comprises the resource locator and the corresponding data extraction rule. After the user triggers the confirmation key, the to-be-processed data1 corresponding to the resource locator URL1, i.e., the parameter 1, and the to-be-processed data2 corresponding to the resource locator URL2, i.e., the parameter 2, may be obtained. The response data to be compared A can be extracted from the response data to be processed 1 based on the data extraction rule1, and the response data to be compared B can be extracted from the response data to be processed 2 based on the data extraction rule 2.
In this embodiment, the data comparison request further includes a data extraction rule corresponding to each resource locator, and the extracting, according to the data extraction rule corresponding to each piece of response data to be processed, response data to be compared in the corresponding response data to be processed to obtain two sets of response data to be compared includes: acquiring a data extraction rule corresponding to each resource locator carried in the data comparison request; and extracting the response data to be compared from the corresponding response data to be processed according to the data extraction rule corresponding to each response data to be processed to obtain two groups of response data to be compared.
It is understood that the data extraction rule carried by the received data comparison request and corresponding to each resource locator can be obtained from the received data comparison request. And extracting response data to be compared from the corresponding response data to be processed based on the data extraction rule. At this time, two sets of response data to be compared may be obtained, where each set of response data to be compared corresponds to corresponding response data to be processed.
S130, comparing the two groups of response data to be compared to obtain a target comparison result.
In this embodiment, the two sets of response data to be compared are compared to obtain a target comparison result, which may be: and comparing the two groups of response data to be compared according to the theoretical fault tolerance carried in the data comparison request to obtain a target comparison result.
The fault tolerance rate is understood to be an allowable error rate. E.g. the error rate between two data in the same comparison set of two sets of data to be compared. With reference to fig. 2, the user may edit the fault tolerance information in the fault tolerance control of the content editing page, and accordingly, the generated data comparison request further includes the fault tolerance, and the fault tolerance obtained at this time may be used as the theoretical fault tolerance. The theoretical fault tolerance rate is preset by a user according to actual requirements.
Specifically, the theoretical fault tolerance carried in the data comparison request is obtained. And comparing the data in the same comparison group in the two groups of response data to be compared based on the theoretical fault-tolerant rate to obtain corresponding comparison results. If the error tolerance is not edited, the theoretical error tolerance can be set as 0 by default, namely, the error rates of the two groups of corresponding data to be compared are set as 0.
It should be further noted that, during data comparison, a one-to-one comparison principle is usually followed, so that data belonging to the same comparison group in two groups of response data to be compared can be determined, and further, a target comparison result is determined according to a theoretical fault-tolerant rate.
In this embodiment, the comparing the response data to be compared includes a field value corresponding to a field of a data extraction rule and data to be compared corresponding to the field value, and the comparing the two sets of response data to be compared according to a theoretical fault tolerance carried in the data comparison request to obtain a target comparison result includes: taking the data with the same field value in the two groups of response data to be compared as an array to be processed; aiming at each array to be processed, comparing data to be compared in the current array to be processed according to the theoretical fault-tolerant rate to obtain an array comparison result; and determining the target comparison result according to the array comparison result of each array to be processed.
Wherein the pending response data may be program code. The data extraction rule may be how to extract data to be compared from the program code, and the extracted data is used as response data to be compared. At this time, corresponding fields may be set in the data extraction rule, and field values corresponding to the fields and corresponding data to be compared may be extracted from the response data to be processed according to the fields in the data extraction rule. For example, the field is gender, and the field value may be: for male. The data to be compared may be comparison data, for example, the data to be compared may be achievement, optionally 90 points. Of course, the above exemplary description is only for enhancing understanding of what field values and data to be compared may be, and is not limiting. It can be understood that the response data to be compared includes field values corresponding to the fields in the data extraction rule, and the data to be compared corresponding to the field values. For example, the fields in the data extraction rule are in turn: name, age, gender and score, and the corresponding field values of the fields are: li X, 20 years old, male and 90 points old, and the score of 90 points can be used as the data to be compared. Each group of response data to be compared comprises specific content and numerical value corresponding to the field of the data extraction rule. The two groups of response data to be compared comprise subdata with the same field value, and the subdata with the same field value can be extracted from the two groups of response data to be compared to be used as an array to be processed. That is to say, the to-be-processed array includes two to-be-processed subdata, the field values of the two to-be-processed subdata are the same, and the specific to-be-compared data may be the same or different. If the two sets of comparison response data respectively include ten sets of sub-data to be processed, the number of the sets to be processed may also include ten sets. Each array to be processed can be processed respectively, and a data comparison result of the array to be processed is obtained. And taking the set of the data comparison results of all the arrays to be processed as a target comparison result.
Specifically, after two groups of response data to be compared are obtained, the sub-data to be processed with the same rule field value can be extracted from each group of response data to be compared, and a plurality of arrays to be processed are obtained. And processing the numbers to be compared in the sub data to be processed according to the preset theoretical fault tolerance to obtain a comparison result. For example, if the theoretical fault tolerance is 0, if two data to be compared in the same array to be processed are the same, the comparison result of the array is the same, otherwise, the comparison result is different.
Optionally, the comparing the data to be compared in the current array to be processed according to the theoretical fault-tolerant rate to obtain an array comparison result, including: determining a difference value of data to be compared in a current array to be processed, and determining an actual fault tolerance rate according to the difference value and the data to be compared; if the actual fault-tolerant rate is smaller than the theoretical fault-tolerant rate, determining that the comparison results of the arrays are equal; and if the actual fault tolerance rate is greater than the theoretical fault tolerance rate, determining that the comparison results of the arrays are not equal.
It should be noted that, whether the data to be compared in the same array to be processed is the same or not is determined according to the theoretical fault tolerance, which may be determined according to the relationship between the actual fault tolerance and the theoretical fault tolerance of the two data to be compared.
Specifically, the difference between two data to be compared in the current array to be processed may be calculated, the ratio between the difference and the data to be compared is determined, and the obtained ratio result is used as the actual fault tolerance. If the actual fault tolerance rate is larger than the theoretical fault tolerance rate, the error at the moment is not in the preset range, and correspondingly, the comparison results of the arrays are not equal. If the actual fault-tolerant rate is smaller than the theoretical fault-tolerant rate, the error is in the preset range, and correspondingly, the comparison results of the arrays are the same.
On the basis of the technical scheme, in order to enable a user to clearly know a target comparison result, each array comparison result can be displayed on a content editing page so as to be convenient for the user to consult. The target comparison result comprises at least one group of field values corresponding to the fields of the array extraction rule, data to be compared corresponding to each group of field values, an array comparison result corresponding to each group of field values, and a difference value corresponding to the array comparison result when the array comparison results are unequal.
The technical scheme of the embodiment of the invention comprises the steps of receiving a data comparison request, obtaining at least two resource locators, respectively determining to-be-processed response data corresponding to each resource locator, obtaining a data extraction rule corresponding to each to-be-processed response data, extracting the to-be-compared response data in the corresponding to-be-processed data based on the data extraction rule to obtain two groups of to-be-compared response data, and comparing the two groups of to-be-compared response data to obtain a target comparison result, so that the problems of complex operation, complexity and high cost caused by the fact that the data can be processed by repeating for many times in the prior art are solved, the problems that when the extracted data is a json array, the arrays cannot be sequenced, the data cannot be compared and the corresponding data comparison result cannot be obtained are solved, and after the corresponding data is extracted according to the data extraction rule, the data can be compared without sequencing the data, so that the technical effects of convenience, accuracy and effectiveness of data comparison are improved.
As an alternative embodiment of the foregoing embodiment, fig. 3 is a schematic flow chart of a data processing method according to an embodiment of the present invention.
As shown in fig. 3, the method includes:
s210, receiving the data comparison request, and acquiring the access reference information carried in the data comparison request.
It should be noted that, when data is compared, at least two groups of data need to be compared, and for clearly describing the technical solution of the embodiment of the present invention, two groups of data are compared to be described. Of course, the technical solution can also expand each control in the content editing page to implement comparison processing of multiple sets of data.
In order to obtain two groups of response data to be processed, corresponding data to be compared are extracted from each group of response data to be processed respectively. At this time, the data source, namely, url corresponding to each data to be processed, may be edited in the page content editing page. Meanwhile, in specific application, part of data in the response data to be processed is usually compared, so that corresponding data extraction rules can be edited in the content editing page to extract the response data to be compared from the response data to be processed.
That is, the participating information may be information edited by the user in the content editing page, referring to fig. 2, the edited information may be: and editing the resource locator in the two URL editing controls corresponding to the to-be-processed response data source. Meanwhile, the method also comprises an analysis rule, namely a data extraction rule, for extracting the response data to be compared from each piece of response data to be processed. With continued reference to FIG. 2, there are two parsing rule editing controls, the parsing rule controls corresponding to the resource locator editing controls. The corresponding parsing rule may be edited in the parsing rule control.
Illustratively, with continued reference to FIG. 2, the corresponding resource locator may be edited in URL1 and URL2, respectively, in the content editing page. The to-be-processed response data1 can be acquired based on the URL1 and the to-be-processed response data2 can be acquired based on the URL2, and at the same time, the parsing rule compiled in the parsing rule 1: analyzeRule1 is result.quotlat. [ ]. optNum (twoLevel ═ nationwide, targetNo), the parsing rule edited in the edit control of parsing rule 2: AnalyzeRule2 is result. Wherein "optNum" represents the value to be aligned; "twoLevel" means that only twoLevel is acquired nationwide optNum; the targetNo represents the optNum value that traverses all targetNos in the array.
And S220, extracting response data to be compared from the corresponding response data to be processed based on each analysis rule.
With continued reference to fig. 2, parsing rule1 corresponds to URL1, that is, to-be-compared response data a is extracted from to-be-processed response data1 called based on URL1 based on parsing rule 1; the parsing rule2 corresponds to the URL2, that is, the to-be-compared response data 8 is extracted from the to-be-processed response data2 retrieved based on the URL2 based on the parsing rule 2.
For clarity, the technical solution may be described by taking the example of extracting the response data to be compared from the response data to be processed. The pending response data date1 is: the to-be-processed response data1 acquired based on the URL1 may be:
Figure BDA0003496271370000151
Figure BDA0003496271370000161
Figure BDA0003496271370000171
based on parsing rule1, result.quotlat. [ ]. optNum (twoLevel ═ nationwide, targetNo) extracts response data to be compared from response data to be processed, which may be: the former part of the rule is removed, the analysis rule is intercepted into optNum (twoLevel national targetNo), and value, that is, a specific numerical value, is obtained through the rules of optNum (twoLevel national targetNo). The final results obtained were:
{
"national, M _ QTY _001_4": 1000000",
"national, 005": 78888",
"national, M _ QTY _001_2": 794258"
}
The above-mentioned extracted data may be regarded as the comparison response data a corresponding to the data to be processed date 1.
In this embodiment, the same manner may be adopted to perform data extraction on the data to be processed 2, so as to obtain corresponding response data B to be compared.
And S230, comparing the obtained response data to be compared according to a preset theoretical fault tolerance rate to obtain a target comparison result.
With continued reference to fig. 2, a fault tolerance error rate edit control is included on the content edit page. The fault tolerance edited in the fault tolerance editing control can be used as a theoretical fault tolerance, optionally, the edited theoretical fault tolerance is 0.3, and the allowable error rate of the characterization is within 30%.
For example, the comparison response data result1 corresponding to the response data to be processed 1 is: { "nationwide, M _ QTY _001_4": 1000000"," nationwide, 005": 78888", "nationwide, M _ QTY _001_2": 794258 "}; the comparison response data result2 corresponding to the comparison response data date2 is: { "nationwide, 005": 78899"," nationwide, M _ QTY _001_4": 1000000", "nationwide, M _ QTY _001_2": 794250"," nationwide, 000": 9999999" }.
Comparing the comparison response data result1 with the comparison response data result2 based on the theoretical fault tolerance ratio can be seen in fig. 4:
step one, acquiring a result value equal to ' nationwide ', and traversing all targetNo's of two results.
The field may be optNum (national towlevel, targetNo) in the data extraction rule, and the specific number corresponding to targetNo may be a numeric value. The same value of the field content can be obtained from the two sets of response data to be compared.
On the basis of the above example, when the information with the same field content in the data extraction rule is used as one array to be processed, four sets of arrays to be processed can be obtained. The four groups to be treated are: pending array 1: result 1: nationwide, M _ QTY _001_4": 1000000", and result 2: "nationwide, M _ QTY _001_4": 1000000 "; pending array 2: result 1: "national, 005": 78888 "and result 2: "nationwide, 005": 78899 "; array to be processed 3: result 1: "national, M _ QTY _001_2": 794258 "and result 2: "nationwide, M _ QTY _001_2": 794250 "; pending array 4: result 1: null and result 2: national 000": 9999999".
Step two, after all targetNo of two results are obtained, whether the numerical result in the array to be processed is within the fault tolerance range can be judged by using a comparison function, and if yes, the step three is executed; if not, executing the step four.
On the above exemplary basis, the two numerical results of the array 1 to be processed are 1000000 and 1000000, respectively, and if the numerical results are the same, it indicates that the comparison results are equal; the two numerical results of the array 2 to be processed are 78888 and 78899 respectively, the numerical difference value is 11, and the comparison result is equal if the result is within 0.3 range by calculating the ratio of 11 to the array to be compared; the two numerical results of the array 3 to be processed are 794258 and 794250 respectively, the numerical difference value is 8, and the comparison result is equal if the result is within 0.3 range by calculating the ratio of 8 to the array to be compared; the two numerical results of the array 4 to be processed are respectively 0 and 999999999, the difference value is 999999999, and the comparison result is not equal if the result is out of the range of 0.3 by calculating the ratio of 11 to the array to be compared.
Of course, it should be noted that, if the theoretical fault tolerance is set to 0, the comparison results of the to-be-processed array 2 and the to-be-processed array 3 are also unequal.
And step three, inserting equal data into the result.
And step four, inserting unequal data into the result, and displaying the difference value.
And S240, displaying the target comparison result on a content editing page.
It should be noted that, in order to improve user experience, the comparison result may be displayed in a result display control of the page, and on the basis of the above example, the displayed result may be, with reference to fig. 2, the following target comparison result may be displayed in a control corresponding to the target comparison result:
nationwide, M _ QTY _001_4, optNum ═ equal 1000000:1000000
005, the optNum is not equal to 78888:78899, the difference value is 11: 11
Nationwide, M _ QTY _001_2, optNum ═ inequality 794258:794258: difference value: 8
000, optNum is not equal to 0: 99999999999: difference: 999999999 nationwide.
That is, the target comparison result includes at least one group of field values corresponding to the fields of the array extraction rule, data to be compared corresponding to each group of field values, an array comparison result corresponding to each group of field values, and a difference value corresponding to the different array comparison results.
According to the technical scheme of the embodiment of the invention, after a large amount of data are compared, the comparison result can be quickly generated according to the filling rule, the comparison efficiency is improved, furthermore, the filling rule is analyzed, the method is suitable for various scenes, expected result data is generated according to the filling rule, meanwhile, the called data can be compared based on the pre-edited fault tolerance rate, the comparison processing result is displayed in the page, the visualization of the comparison result is realized, and the technical effect of user experience is further improved.
On the basis of the above technical solution, it should be further explained that, referring to fig. 2, in order to facilitate the situation that url cannot be used to obtain the response data to be processed, data to be compared may also be directly imported into the controls corresponding to the parameters 1 and 2, for example, json character strings to be compared may be copied into the controls corresponding to the parameters 1 and 2, and corresponding fault tolerance rates are edited in the fault tolerance rate controls, so as to implement comparison processing on the contents in the parameters 1 and 2.
The technical scheme of the embodiment of the invention obtains at least two resource locators by receiving a data comparison request, respectively determines the to-be-processed response data corresponding to each resource locator, extracts the to-be-compared response data in the corresponding to-be-processed data according to the data extraction rule corresponding to each to-be-processed response data to obtain two groups of to-be-compared response data, obtains a target comparison result by comparing the two groups of to-be-compared response data, can display the target comparison result on a display interface, solves the problems that the data can be processed by repeating for many times in the prior art, has complex operation and high cost, and also solves the problems that when the extracted data is a json array, the array cannot be sequenced, the data cannot be compared and the corresponding data comparison result cannot be obtained, after corresponding data are extracted according to the data extraction rule, the data can be compared without sequencing the data, and therefore the technical effects of convenience, accuracy and effectiveness of data comparison are improved.
Fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention, where the apparatus includes: a pending response data determination module 310, a to-be-compared response data determination module 320, and a comparison result determination module 330.
The to-be-processed response data determining module 310 is configured to receive a data comparison request; acquiring at least two resource locators, and respectively determining to-be-processed response data corresponding to each resource locator; a to-be-compared response data determining module 320, configured to obtain a data extraction rule corresponding to each to-be-processed response data, and extract the to-be-compared response data in the corresponding to-be-processed response data based on the data extraction rule, so as to obtain two sets of to-be-compared response data; a comparison result determining module 330, configured to perform comparison processing on the two sets of response data to be compared to obtain a target comparison result.
On the basis of the above technical solution, the module for determining the response data to be processed includes:
an interface type determining unit, configured to obtain at least two resource locators carried in the data comparison request and an interface type corresponding to each resource locator;
and the to-be-processed response data determining unit is used for respectively acquiring the to-be-processed response data corresponding to the resource locator from the interface corresponding to the interface type.
On the basis of the above technical solution, the module for determining response data to be compared includes:
a data extraction rule determining unit, configured to obtain a data extraction rule corresponding to each resource locator and carried in the data comparison request;
and the to-be-compared response data determining unit is used for extracting the to-be-compared response data from the corresponding to-be-processed response data according to the data extraction rule corresponding to each to-be-processed response data to obtain two groups of to-be-compared response data.
On the basis of the above technical solutions, the target comparison result determining module is further configured to:
and comparing the two groups of response data to be compared according to the theoretical fault tolerance carried in the data comparison request to obtain a target comparison result.
On the basis of the above technical solutions, the response data to be compared includes a field value corresponding to a field of a data extraction rule and data to be compared corresponding to the field value, and the target comparison result determining module includes:
the array determining unit to be processed is used for taking the data with the same field value in the two groups of response data to be compared as an array to be processed;
an array comparison result determining unit, configured to compare, according to the theoretical fault-tolerant rate, to-be-compared data in the current to-be-processed array for each to-be-processed array, to obtain an array comparison result
And the target comparison result determining unit is used for determining the target comparison result according to the array comparison result of each array to be processed.
On the basis of the above technical solution, the array comparison result determining unit includes:
the actual fault tolerance rate determining subunit is used for determining a difference value of data to be compared in the current array to be processed, and determining the actual fault tolerance rate according to the difference value and the data to be compared; the first comparison result determining subunit is used for determining that the comparison results of the arrays are equal if the actual fault-tolerant rate is smaller than the theoretical fault-tolerant rate;
and the second comparison result determining subunit is used for determining that the array comparison results are not equal if the actual fault tolerance rate is greater than the theoretical fault tolerance rate.
On the basis of the above technical solutions, the target comparison result includes at least one group of field values corresponding to the fields of the array extraction rule, data to be compared corresponding to each group of field values, an array comparison result corresponding to each group of field values, and a difference value corresponding to the array comparison result when the array comparison results are not equal.
The technical scheme of the embodiment of the invention comprises the steps of receiving a data comparison request, obtaining at least two resource locators, respectively determining to-be-processed response data corresponding to each resource locator, obtaining a data extraction rule corresponding to each to-be-processed response data, extracting the to-be-compared response data in the corresponding to-be-processed data based on the data extraction rule to obtain two groups of to-be-compared response data, and comparing the two groups of to-be-compared response data to obtain a target comparison result, so that the problems of complex operation, complexity and high cost caused by the fact that the data can be processed by repeating for many times in the prior art are solved, the problems that when the extracted data is a json array, the arrays cannot be sequenced, the data cannot be compared and the corresponding data comparison result cannot be obtained are solved, and after the corresponding data is extracted according to the data extraction rule, the data can be compared without sequencing the data, so that the technical effects of convenience, accuracy and effectiveness of data comparison are improved.
The data processing device provided by the embodiment of the invention can execute the data processing method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the system are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary electronic device 40 suitable for use in implementing embodiments of the present invention. The electronic device 40 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 4, electronic device 40 is embodied in the form of a general purpose computing device. The components of electronic device 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 40 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. The electronic device 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), one or more devices that enable a user to interact with the electronic device 40, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 40 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Also, the electronic device 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 412. As shown, the network adapter 412 communicates with the other modules of the electronic device 40 over the bus 403. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing, for example, implementing a data processing method provided by an embodiment of the present invention, by executing a program stored in the system memory 402.
Embodiments of the present invention also provide a storage medium containing computer-executable instructions for performing a data processing method when executed by a computer processor.
The method comprises the following steps:
receiving a data comparison request; acquiring at least two resource locators, and respectively determining to-be-processed response data corresponding to each resource locator;
acquiring data extraction rules corresponding to the to-be-processed response data, and extracting the to-be-compared response data in the corresponding to-be-processed response data based on the data extraction rules to obtain two groups of to-be-compared response data;
and comparing the two groups of response data to be compared to obtain a target comparison result.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A data processing method, comprising:
receiving a data comparison request; acquiring at least two resource locators, and respectively determining to-be-processed response data corresponding to each resource locator;
acquiring data extraction rules corresponding to the to-be-processed response data, and extracting the to-be-compared response data in the corresponding to-be-processed response data based on the data extraction rules to obtain two groups of to-be-compared response data;
and comparing the two groups of response data to be compared to obtain a target comparison result.
2. The method of claim 1, wherein obtaining at least two resource locators and determining the pending response data corresponding to each resource locator respectively comprises:
acquiring at least two resource locators carried in the data comparison request and an interface type corresponding to each resource locator;
and respectively acquiring the response data to be processed corresponding to the resource locator from the interface corresponding to the interface type.
3. The method according to claim 1, wherein the obtaining of the data extraction rule corresponding to each of the response data to be processed and extracting the response data to be compared from the corresponding response data to be processed based on the data extraction rule to obtain two sets of response data to be compared comprises:
acquiring a data extraction rule corresponding to each resource locator carried in the data comparison request;
and extracting the response data to be compared from the corresponding response data to be processed according to the data extraction rule corresponding to each response data to be processed to obtain two groups of response data to be compared.
4. The method according to claim 1, wherein the obtaining of the target comparison result by comparing the two sets of response data to be compared comprises:
and comparing the two groups of response data to be compared according to the theoretical fault tolerance carried in the data comparison request to obtain a target comparison result.
5. The method according to claim 4, wherein the response data to be compared includes a field value corresponding to a field of a data extraction rule and data to be compared corresponding to the field value, and the comparing, according to a theoretical fault tolerance carried in the data comparison request, the two sets of response data to be compared are compared to obtain a target comparison result, including:
taking the data with the same field value in the two groups of response data to be compared as an array to be processed;
aiming at each array to be processed, comparing the data to be compared in the current array to be processed according to the theoretical fault-tolerant rate to obtain an array comparison result;
and determining the target comparison result according to the array comparison result of each array to be processed.
6. The method according to claim 5, wherein the comparing the data to be compared in the current array to be processed according to the theoretical fault tolerance ratio to obtain an array comparison result comprises:
determining a difference value of data to be compared in a current array to be processed, and determining an actual fault tolerance rate according to the difference value and the data to be compared;
if the actual fault-tolerant rate is smaller than the theoretical fault-tolerant rate, determining that the comparison results of the arrays are equal;
and if the actual fault tolerance rate is greater than the theoretical fault tolerance rate, determining that the comparison results of the arrays are not equal.
7. The method of claim 6, wherein the target comparison result comprises at least one group of field values corresponding to fields of the array extraction rule, data to be compared corresponding to each group of field values, an array comparison result corresponding to each group of field values, and a difference value corresponding to the different groups of field values.
8. A data processing apparatus, comprising:
the to-be-processed response data determining module is used for receiving a data comparison request; acquiring at least two resource locators, and respectively determining to-be-processed response data corresponding to each resource locator;
the to-be-compared response data determining module is used for acquiring data extraction rules corresponding to the to-be-processed response data, extracting the to-be-compared response data in the corresponding to-be-processed response data based on the data extraction rules, and obtaining two groups of to-be-compared response data;
and the comparison result determining module is used for comparing the two groups of response data to be compared to obtain a target comparison result.
9. An electronic device, wherein the device/terminal/server comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a data processing method as claimed in any one of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the data processing method of any one of claims 1-7 when executed by a computer processor.
CN202210115689.7A 2022-02-07 2022-02-07 Data processing method and device, electronic equipment and storage medium Pending CN114443498A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210115689.7A CN114443498A (en) 2022-02-07 2022-02-07 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210115689.7A CN114443498A (en) 2022-02-07 2022-02-07 Data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114443498A true CN114443498A (en) 2022-05-06

Family

ID=81371268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210115689.7A Pending CN114443498A (en) 2022-02-07 2022-02-07 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114443498A (en)

Similar Documents

Publication Publication Date Title
CN109558525B (en) Test data set generation method, device, equipment and storage medium
CN111176996A (en) Test case generation method and device, computer equipment and storage medium
CN110191021B (en) Protocol testing method and device, electronic equipment and storage medium
CN109165209B (en) Data verification method, device, equipment and medium for object types in database
CN112732567B (en) Mock data testing method and device based on ip, electronic equipment and storage medium
CN111694561A (en) Interface management method, device, equipment and storage medium
CN110688111A (en) Configuration method, device, server and storage medium of business process
CN111079408A (en) Language identification method, device, equipment and storage medium
CN111061740A (en) Data synchronization method, equipment and storage medium
CN115757483A (en) Automatic testing method and device, electronic equipment and storage medium
CN110738056A (en) Method and apparatus for generating information
CN115599359A (en) Code generation method, device, equipment and medium
CN109543027B (en) Method, device and equipment for acquiring paging data and storage medium
CN111427784A (en) Data acquisition method, device, equipment and storage medium
CN113760894A (en) Data calling method and device, electronic equipment and storage medium
CN110196952B (en) Program code search processing method, device, equipment and storage medium
CN117033309A (en) Data conversion method and device, electronic equipment and readable storage medium
CN114443498A (en) Data processing method and device, electronic equipment and storage medium
CN112131611B (en) Data correctness verification method, device, equipment, system and storage medium
CN113792138A (en) Report generation method and device, electronic equipment and storage medium
CN113806556A (en) Method, device, equipment and medium for constructing knowledge graph based on power grid data
CN113238940A (en) Interface test result comparison method, device, equipment and storage medium
CN111401009A (en) Digital expression symbol recognition conversion method, device, server and storage medium
CN111859985A (en) AI customer service model testing method, device, electronic equipment and storage medium
CN111400623A (en) Method and apparatus for searching information

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