CN114840543A - 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
CN114840543A
CN114840543A CN202210483811.6A CN202210483811A CN114840543A CN 114840543 A CN114840543 A CN 114840543A CN 202210483811 A CN202210483811 A CN 202210483811A CN 114840543 A CN114840543 A CN 114840543A
Authority
CN
China
Prior art keywords
log
data
processing
result
query
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
CN202210483811.6A
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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202210483811.6A priority Critical patent/CN114840543A/en
Publication of CN114840543A publication Critical patent/CN114840543A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/23Updating
    • G06F16/2358Change logging, detection, and notification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • 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/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning

Landscapes

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

Abstract

The disclosure relates to a data processing method, a data processing device and a storage medium, and relates to the technical field of database verification. The method comprises the following specific steps: receiving request data sent by a front-end page process; monitoring change data corresponding to a target database, and acquiring a change operation log; screening the change operation log according to the target account to obtain a log to be verified; and performing operation logic verification according to the log to be verified and the request data to generate a verification result. According to the method and the device, the target database is monitored and screened to obtain the log to be verified, and the log to be verified is subjected to operation logic verification according to the request data sent by the front-end page process, so that the verification of the test result is realized, and the efficiency of the verification of the test result is improved.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of database verification technologies, and in particular, to a data processing method, an apparatus, and a storage medium.
Background
In the related art, the test and verification process of the database is as follows: the front-end testing personnel operate the front-end page, and the front-end page is processed by the system to finally change the data in the database; the tester needs to search the database again to find whether the modified data in the database is consistent with the data operated by the front-end tester, so as to check the correctness of the test result.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a data processing method, an apparatus and a storage medium, so as to at least solve the problem of low efficiency of manual verification in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided a data processing method, including:
receiving request data sent by a front-end page process;
monitoring change data corresponding to a target database, and acquiring a change operation log;
screening the change operation log according to the target account to obtain a log to be verified;
and performing operation logic verification according to the log to be verified and the request data to generate a verification result.
Optionally, the step of screening the change operation log according to the target account to obtain a log to be verified includes:
extracting at least one operation account identifier in the change operation log;
and screening the change operation log according to at least one operation account identifier and the target account, and acquiring the log to be verified.
Optionally, the change operation log includes a plurality of operation account identifiers, and the step of screening the change operation log according to at least one of the operation account identifiers and the target account to obtain the log to be verified includes:
calling a target account interface to acquire a target account identifier of the target account;
acquiring at least one operation account identifier which is the same as the target account identifier, and taking the operation account identifier as the target operation account identifier;
and screening logs corresponding to the target operation account identification from the change operation logs to serve as the logs to be verified.
Optionally, the step of performing operation logic verification according to the log to be verified and the request data further includes:
acquiring an operation type identifier in the request data;
if the operation type identifier comprises a query identifier, acquiring query data, preset data and a query result of the target account in the log to be verified, and performing operation logic verification on the log to be verified according to the query result;
and if the operation type identifier comprises a non-query identifier, acquiring processing data in the request data, and performing operation logic verification on the log to be verified according to the non-query identifier and the processing data.
Optionally, the step of performing operation logic verification on the log to be verified according to the query result includes:
processing preset data in the log to be verified according to the query data to obtain a preset result;
if the preset result is consistent with the query result, determining that the operation logic is successfully verified;
and if the preset result is inconsistent with the query result, determining that the operation logic check fails.
Optionally, the step of performing operation logic check on the log to be checked according to the non-query identifier and the processing data includes:
acquiring processing result data in the log to be checked;
processing the processing data according to the non-query identification to obtain a preset processing result;
matching the preset processing result with the processing result data, and if the preset processing result is matched with the processing result data, determining that the operation logic verification is successful;
and if the preset processing result is not matched with the processing result data, determining that the operation logic check fails.
Optionally, after the step of performing operation logic verification according to the log to be verified and the request data and generating a verification result, the method further includes:
and displaying the checking result.
According to a second aspect of the embodiments of the present disclosure, there is provided a data processing apparatus, comprising:
the receiving module is used for receiving request data sent by the front-end page process;
the monitoring module is used for monitoring the change data corresponding to the target database and acquiring a change operation log;
the log screening module is used for screening the change operation log according to the target account number to obtain a log to be verified;
and the checking module is used for performing operation logic checking according to the log to be checked and the request data to generate a checking result.
Optionally, the log screening module includes:
the identification detection submodule is used for extracting at least one operation account identification in the change operation log;
and the screening submodule is used for screening the change operation log according to at least one operation account identification and the target account and acquiring the log to be verified.
Optionally, the screening submodule includes:
the identification acquisition unit is used for calling a target account interface and acquiring a target account identification of the target account;
the identification determining unit is used for acquiring at least one operation account identification which is the same as the target account identification as the target operation account identification;
and the screening unit is used for screening the log corresponding to the target operation account identifier from the change operation log as the log to be verified.
Optionally, the verification module includes:
the operation type obtaining submodule is used for obtaining the operation type identification in the request data;
the first checking sub-module is used for acquiring the query data, the preset data and the query result of the target account in the log to be checked if the operation type identifier comprises a query identifier, and performing operation logic checking on the log to be checked according to the query result;
and the second checking sub-module is used for acquiring the processing data in the request data if the operation type identifier comprises a non-query identifier, and performing operation logic checking on the log to be checked according to the non-query identifier and the processing data.
Optionally, the first check submodule includes:
the preset result acquisition unit is used for processing preset data in the log to be checked according to the query data to acquire a preset result;
the first checking unit is used for determining that the operation logic is successfully checked if the preset result is consistent with the query result;
and the second checking unit is used for determining that the operation logic check fails if the preset result is inconsistent with the query result.
Optionally, the second check sub-module includes:
the processing data acquisition unit is used for acquiring processing result data in the log to be verified;
the processing unit is used for processing the processing data according to the non-inquiry identification to obtain a preset processing result;
the third verification unit is used for matching the preset processing result with the processing result data, and if the preset processing result is matched with the processing result data, the verification of the operation logic is determined to be successful;
and the fourth checking unit is used for determining that the operation logic check fails if the preset processing result is not matched with the processing result data.
Optionally, the method further includes:
and the display module is used for displaying the verification result.
According to a third aspect of the embodiments of the present disclosure, there is provided a data processing electronic device including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the data processing method of any of the first aspects above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, in which instructions that, when executed by a processor of a data processing electronic device, enable the data processing electronic device to perform the data processing method according to any one of the above-mentioned first aspects.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of the above first aspects.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the log to be verified is obtained by monitoring and screening the target database, and operation logic verification is carried out on the log to be verified according to the request data sent by the front-end page process, so that the verification of the test result is realized. The method and the device avoid complex operations of manual screening and verification, and improve the efficiency of testing result verification.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a flow chart illustrating a method of data processing according to an exemplary embodiment.
FIG. 2 is a flow chart illustrating a method of data processing according to an exemplary embodiment.
FIG. 3 is a flow chart illustrating a method of data processing according to an exemplary embodiment.
FIG. 4 is a flow chart illustrating a method of data processing according to an exemplary embodiment.
FIG. 5 is a flow chart illustrating a method of data processing according to an exemplary embodiment.
FIG. 6 is a block diagram illustrating a data processing apparatus according to an example embodiment.
Fig. 7 is a flowchart of a data processing method in the related art.
FIG. 8 is a block diagram of a data processing system in accordance with an illustrative embodiment.
FIG. 9 is a block diagram illustrating an apparatus in accordance with an example embodiment.
FIG. 10 is a block diagram illustrating an apparatus in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In the related art, the test and verification process of the database is as follows: the front-end testing personnel operate the front-end page, and the front-end page is processed by the system to finally change the data in the database; the tester needs to search the database again to find whether the modified data in the database is consistent with the data operated by the front-end tester, so as to check the correctness of the test result.
Fig. 7 is a flowchart of a data processing method in the related art, and as shown in fig. 7, a tester performs a certain operation on a front-end page, and a back-end processing system performs a corresponding operation on data in a database according to a front-end instruction, where the operation on the database includes adding, deleting, modifying, and searching data. Adding, namely adding new data, deleting, namely deleting specific data in the database, modifying, namely searching and summarizing the specific data in the database.
After the front-end operation, the tester inquires the target database, finds out the operation of the tester on the target database through the front-end page, and judges whether the change of the data in the target database is consistent with the operation of the tester on the database through the front-end page. The checking mode not only needs to consume a large amount of manpower, has large checking cost, but also has low checking efficiency.
FIG. 1 is a flow chart illustrating a method of data processing, as shown in FIG. 1, for use in a verification system, including the following steps, according to an exemplary embodiment.
In step 101, request data sent by a front-end page process is received.
In the embodiment of the disclosure, the website includes a front end and a back end, the front end refers to an interface visible to a user, and a front end page of the website is page development of a webpage, such as contents of special effects, layout, pictures, videos, audios, and the like on the webpage. The front-end working content is the webpage which can be operated by designing the effect diagram of the art designer into a webpage, and the back-end working content is matched with the data display, interaction and other visual aspects of the webpage. The back end refers to something invisible to the user, and generally performs data interaction with the front end and storage and reading of website data, and the back end of the website needs to set a server and a database, store and retrieve data, and an interface for connecting the server and the front end.
When the website function test is carried out, a tester carries out the test on a front-end page, namely a visual interface, sends request data to a back-end processing system and operates the data in a target database. The operation comprises operations of inquiring, adding data, deleting data, modifying data and the like.
And then, the checking system checks the operation logic of the target database, the request data sent by the front-end page process comprises an operation type identifier, and the operation type identifier is used for representing the operation logic. The operation logic is logic for processing various operations by the database, such as processing logic for data query operation, processing logic for data modification operation, and the like; the verification of the operation logic substantially judges the correctness of each operation processing result, and verifies the correctness of the operation logic through the correctness of the processing result. Specifically, an interface for providing verification service is arranged in the target database in advance, operation data of each operation is transmitted to the database by sending request data to call the interface, and the target database processes each operation data to obtain each processing result.
In a possible embodiment, the website is a website for commodity data retrieval, and a tester logs in a target account in a front-end page and performs an operation of adding a new commodity, specifically: and inputting the name and the attribute of the newly added commodity. The front-end page process sends corresponding request data to the back end, the target database processes the data according to the request data, the data are monitored and added into the operation log, and the verification system knows that the name and the attribute of the newly added commodity are correctly added into the operation log needing to be verified according to the request data.
In step 102, change data corresponding to the target database is monitored, and a change operation log is obtained.
In the embodiment of the present disclosure, the target database is used to store data, and the verification system monitors change data corresponding to the target database to obtain the change operation log. The change operation log is a binary log which records all changes on the target database and stores the changes in a disk in a binary form; it can be used to view the change history of the target database, incremental backup and recovery of the target database, and replication of the master and slave databases.
In step 103, the change operation log is screened according to the target account, and a log to be verified is obtained.
In the embodiment of the present disclosure, the data in the change operation log is all log statements in the target database in which the data is updated or the data has been potentially updated, wherein there are many log statements that are irrelevant to the test, that is, operations performed by non-target accounts.
In step 104, performing operation logic verification according to the log to be verified and the request data, and generating a verification result.
In the embodiment of the disclosure, the test results are different in the tests of different website functions. In order to adapt to the test of different website functions, the verification condition is set according to the operation type identifier in the request data. And setting corresponding verification conditions according to different tests, and verifying the log to be verified according to the verification conditions.
The method and the device have the advantages that the target database is monitored and screened, the log to be checked is obtained, operation logic check is carried out on the log to be checked according to the request data sent by the front-end page process, and the test result is checked. The method and the device avoid complex operations of manual screening and verification, and improve the efficiency of testing result verification.
Fig. 2 is a flowchart of a data processing method according to an exemplary embodiment, and as shown in fig. 2, when the method is used in data processing, the step 103 filters the change operation log according to a target account to obtain a log to be verified, which specifically includes the following steps.
In step 201, at least one operation account id in the change operation log is extracted.
In the embodiment of the present disclosure, the log statement in the change operation log includes an operation account identifier, and the operation account identifier represents an operator of an operation corresponding to the log statement. In this embodiment, the change operation log is screened according to the operation account id.
In step 202, the change operation log is screened according to at least one operation account id and the target account, and the log to be verified is obtained.
In the embodiment of the disclosure, an operation performed by a tester needs to be screened, and the tester performs a test operation at a front end by using a target account, that is, an operation performed by the tester in the change operation log can be screened according to an identifier of the target account, an operation account identifier corresponding to each log statement in the change operation log is checked, a log statement in which the operation account identifier is inconsistent with the target account identifier is deleted, and a log statement in which the operation account identifier is consistent with the target account identifier is reserved, so that the log to be verified can be obtained.
In a possible embodiment, the website is a website for commodity data retrieval, and a tester logs in a target account in a front-end page and performs an operation of adding a new commodity, specifically: and inputting the name and the attribute of the newly added commodity. The tester needs to search the log statements in the log to be verified, and judges whether the name and the attribute of the newly added commodity are added in the log statements.
According to the method and the device, the operation account identification in the change operation log is screened to obtain the log to be verified, and the operation related to the target account is screened, so that the complex operation of manual screening is avoided, and the efficiency of testing result verification is improved.
Fig. 3 is a flowchart of a data processing method according to an exemplary embodiment, where as shown in fig. 3, when the method is used in data processing, the step 202 filters the change operation log according to at least one operation account id and the target account, and obtains the log to be verified, specifically including:
step 301, calling a target account interface to obtain a target account identifier of the target account.
In the embodiment of the disclosure, the verification system reads the identifier of the target account through a target account interface, the target account is an account input by an operator, and the target account is used for testing the function of the website.
Step 302, acquiring at least one operation account id identical to the target account id as the target operation account id.
In the embodiment of the application, the verification system compares the operation account identifier with the target account identifier, and determines the operation account identifier corresponding to the target account identifier as the target operation account identifier.
Step 303, screening a log corresponding to the target operation account id from the change operation log, and using the log as the log to be verified.
In the embodiment of the disclosure, whether a log statement in a change operation log is an operation corresponding to a target account is determined according to whether the operation account identifier is the target operation account identifier, and the change operation log is screened. And reserving the log corresponding to the target operation account identification, wherein the log obtained after screening is the log to be verified.
In the embodiment of the disclosure, the change operation log is screened through the target operation account identifier to obtain the log to be verified, so that the influence of interference information in the change operation log on verification is avoided, and the verification accuracy and efficiency are improved.
Optionally, the step of performing operation logic verification according to the log to be verified and the request data further includes:
acquiring an operation type identifier in the request data; if the operation type identifier comprises a query identifier, acquiring query data, preset data and a query result of the target account in the log to be verified, and performing operation logic verification on the log to be verified according to the query result;
in the embodiment of the present disclosure, although the operation types of operating the target database according to the request data are various, each type of operation depends on the query operation, for example: modifying the data to be modified in the target database, and inquiring the data to be modified; and deleting the data to be deleted in the target database, and inquiring the data to be deleted in the same way. In order to ensure the correctness of various other operations depending on the query operation, an operation logic for judging the correctness of the query result obtained by the query operation is designed, and only after the query result is judged to be correct, the other operations are carried out to generate a final operation result.
The operation type which judges the correctness of the query result in the operation logic is represented by the query identifier, and the operation type which generates the final operation result in the operation logic is represented by other identifiers which are not the query identifier; the operation type is determined by the operation type identification in the request data. When receiving a log to be verified returned by a target database and needing to verify the operation logic of the target database according to a log statement in the log to be verified, a verification system firstly reads an operation type identifier in current request data, compares the read operation type identifier with a preset query identifier for representing query operation, and determines whether the operation type represented by the operation type identifier is a query type.
When the read operation type identifier is determined to contain a preset query identifier representing a query type through comparison, the operation type corresponding to the operation type identifier is the query type, and a corresponding verification condition needs to be obtained according to the operation logic of the query type and verified.
And detecting the returned log to be verified, and acquiring the query result, the query data and the preset data of the target account. The preset data is data to be queried in the target database, the query data is query action of the back-end processing system on the target database, and the query result is data obtained by the back-end processing system querying the target database according to the query data.
In one possible embodiment, the query data contains fields that require a query.
In a possible embodiment, the query data includes an "attribute" field of the commodity, and the content included in the "attribute" field in the target database is queried according to the query data.
And if the operation type identifier comprises a non-query identifier, acquiring processing data in the request data, and performing operation logic verification on the log to be verified according to the non-query identifier and the processing data.
When the read operation type identifier is determined to contain a preset non-query identifier representing a non-query type through comparison, the operation type corresponding to the operation type identifier is indicated to be the non-query type, and a corresponding verification condition needs to be generated according to the operation logic of the non-query type and is verified.
The log to be verified comprises processing result data, the processing result data are obtained by a back-end processing system processing the target database according to the non-query identifier, operation logic for generating the processing result data is verified, processing data and the non-logic identifier in the request data need to be read, and the processing data are data which need to be processed according to operation types. For example, if the operation corresponding to the non-logical identifier is a modification operation, and the modification represented by the non-logical identifier modifies data m into n, the processed data is m; and modifying m obtained by query in the target database to obtain modified data p, wherein p is the processing result data. In order to verify the correctness of the processing result data generated by the operation type logic processing of the non-query identifier, the processing data is processed according to the operation logic of the non-query identifier, and a corresponding preset processing result is obtained. And matching the preset processing result with the processing result data, and judging the consistency of the preset processing result and the processing result data.
In a possible embodiment, the processing data is attribute data "a" of a product "product X", and the operation logic of the non-query identifier is "modify attribute data to 'B'," so that ideally, the attribute data of the product "product X" in the target database will be changed to 'B' after the back-end processing system modifies the data in the target database according to the request data. The verification system needs to process the processing data according to the operation logic corresponding to the non-logic identifier, obtain the preset processing result, and judge whether the operation logic is verified successfully according to whether the preset processing result is consistent with the corresponding processing result data in the log to be verified.
Fig. 4 is a flowchart of a data processing method according to an exemplary embodiment, where as shown in fig. 4, the method is used in data processing, and the step of performing operation logic verification on the log to be verified according to the query result specifically includes:
step 401, processing preset data in the log to be checked according to the query data, and acquiring a preset result;
step 402a, if the preset result is consistent with the query result, determining that the operation logic is successfully verified;
step 402b, if the preset result is inconsistent with the query result, determining that the operation logic check fails.
In the embodiment of the application, the checking system processes the preset data in the log to be checked according to the query data to obtain the preset result. The operation type identifier in the request data comprises a query identifier, wherein preset data is data to be queried in the target database, and the query data comprises a data type to be queried in the target database of the back-end processing system; and the query result comprises data obtained by the back-end processing system performing query operation according to the query data.
The query action characterized by the query data is as follows: the "attribute" data of "article X" is queried. And the preset data of the attribute of the commodity X is A, and the verification system processes the preset data according to the query data to obtain a preset result A.
And if the back-end processing system performs query operation on the target database according to the request data, obtaining a query result of 'A'. The preset result is consistent with the query result, which indicates that the query operation of the back-end processing system is correct, and the operation logic verifies that the result is successful.
And if the back-end processing system performs query operation on the target database according to the request data, obtaining a query result of 'B'. If the preset result is inconsistent with the query result, it indicates that the query operation of the back-end processing system is wrong, and the operation logic checks that the result is failure.
Fig. 5 is a flowchart of a data processing method according to an exemplary embodiment, where as shown in fig. 5, the method is used in data processing, and the step of performing operation logic check on the log to be checked according to the non-query identifier and the processing data specifically includes:
step 501, acquiring processing result data in the log to be checked;
step 502, processing the processing data according to the non-query identifier, and obtaining a preset processing result.
Step 503a, matching the preset processing result with the processing result data, and if the preset processing result is matched with the processing result data, determining that the operation logic verification is successful;
in step 503b, if the preset processing result is not matched with the processing result data, it is determined that the operation logic check fails.
In the embodiment of the application, in order to verify the correctness of the processing result data generated by the operation processing corresponding to the non-query identifier, the preset processing result is obtained according to the preset processing data corresponding to the operation processing corresponding to the non-query identifier. And comparing the preset processing result with the second processing data, and judging the consistency of the preset processing result and the second processing data.
In a possible embodiment, the processing data is attribute data "a" of "commodity X", and the operation corresponding to the non-query identifier is "modify attribute data to 'B'", so that ideally, after the back-end processing system modifies the data in the target database according to the request data, the attribute data of "commodity X" in the target database will become "B". And the checking system obtains the preset processing result after the processing data is processed by the non-inquiry identifier, and then judges whether the operation logic is checked successfully according to whether the preset processing result is consistent with the corresponding processing result data in the log to be checked. In this embodiment, the preset processing result is attribute data "B" of "commodity X".
If the attribute data of the commodity X in the processing result data is 'B', the processing result data is consistent with the preset processing result 'B', and the judgment operation logic can be determined to be successfully verified; if the attribute data of the commodity X in the processing result data is "C", the processing result data is not consistent with the preset processing result "B", and it may be determined that the judgment operation logic check fails.
Optionally, after the step of performing operation logic verification according to the log to be verified and the request data and generating a verification result, the method further includes: and displaying the checking result.
In the embodiment of the disclosure, in order to facilitate the tester to intuitively know the verification result, the verification result is transmitted to the visual interface and displayed.
FIG. 8 is a block diagram of a data processing system in accordance with an illustrative embodiment. As shown in fig. 8, a tester operates on a front-end page, a back-end processing system performs corresponding operations of adding, deleting, modifying and checking on the target database according to the front-end operation, and a verification system monitors a change operation log of the target database to obtain all operation records in the target database, that is, the change operation log. And inputting the target account, and screening the operation record related to the target account from the change operation log according to the target account to generate the log to be verified. And receiving request data sent by a front-end page process, verifying the log to be verified according to the request data, and acquiring the verification result.
FIG. 6 is a block diagram illustrating a data processing apparatus according to an example embodiment. Referring to fig. 6, the apparatus includes a receiving module 610, a listening module 620, a log filtering module 630, and a checking module 640.
A receiving module 610, configured to receive request data sent by a front-end page process;
a monitoring module 620, configured to monitor change data corresponding to the target database, and obtain a change operation log;
the log screening module 630 is configured to screen the change operation log according to the target account to obtain a log to be verified;
and the checking module 640 is configured to perform operation logic checking according to the log to be checked and the request data, and generate a checking result.
Optionally, the log screening module includes:
the identification detection submodule is used for extracting at least one operation account identification in the change operation log;
and the screening submodule is used for screening the change operation log according to at least one operation account identification and the target account and acquiring the log to be verified.
Optionally, the screening submodule includes:
the identification detection unit is used for calling a target account interface and acquiring a target account identification of the target account;
the identification determining unit is used for acquiring at least one operation account identification which is the same as the target account identification as the target operation account identification;
and the screening unit is used for screening the log corresponding to the target operation account identifier from the change operation log as the to-be-verified day.
Optionally, the verification module includes:
the operation type obtaining submodule is used for obtaining the operation type identification in the request data;
the first checking sub-module is used for acquiring the query data, the preset data and the query result of the target account in the log to be checked if the operation type identifier comprises a query identifier, and performing operation logic checking on the log to be checked according to the query result;
and the second checking sub-module is used for acquiring the processing data in the request data if the operation type identifier comprises a non-query identifier, and performing operation logic checking on the log to be checked according to the operation type and the processing data.
Optionally, the first check submodule includes:
the preset result acquisition unit is used for processing preset data in the log to be checked according to the query data to acquire a preset result;
the first checking unit is used for determining that the operation logic is successfully checked if the preset result is consistent with the query result;
and the second checking unit is used for determining that the operation logic check fails if the preset result is inconsistent with the query result.
Optionally, the second check sub-module includes:
the processing data acquisition unit is used for acquiring processing result data in the log to be verified;
the processing unit is used for processing the processing data according to the operation type identifier to obtain a preset processing result;
the third verification unit is used for matching the preset processing result with the processing result data, and if the preset processing result is matched with the processing result data, the verification of the operation logic is determined to be successful;
and the fourth checking unit is used for determining that the operation logic check fails if the preset processing result is not matched with the processing result data.
Optionally, the method further includes:
and the display module is used for displaying the verification result.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 9 is a block diagram illustrating an apparatus 900 for data processing in accordance with an example embodiment. For example, the apparatus 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 9, apparatus 900 may include one or more of the following components: a processing component 902, a memory 904, a power component 906, a multimedia component 9010, an audio component 910, an input/output (I/O) interface 912, a sensor component 914, and a communications component 916.
The processing component 902 generally controls overall operation of the device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing component 902 may include one or more processors 920 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 902 can include one or more modules that facilitate interaction between processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operation at the device 900. Examples of such data include instructions for any application or method operating on device 900, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 904 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 906 provides power to the various components of the device 900. The power components 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.
The multimedia component 908 comprises a screen providing an output interface between the device 900 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 900 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 910 is configured to output and/or input audio signals. For example, audio component 910 includes a Microphone (MIC) configured to receive external audio signals when apparatus 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 904 or transmitted via the communication component 916. In some embodiments, audio component 910 also includes a speaker for outputting audio signals.
I/O interface 912 provides an interface between processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 914 includes one or more sensors for providing status assessment of various aspects of the apparatus 900. For example, the sensor assembly 914 may detect an open/closed state of the device 900, the relative positioning of components, such as a display and keypad of the apparatus 900, the sensor assembly 914 may also detect a change in the position of the apparatus 900 or components in the apparatus 900, the presence or absence of user contact with the apparatus 900, orientation or acceleration/deceleration of the apparatus 900, and a change in the temperature of the apparatus 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate communications between the apparatus 900 and other devices in a wired or wireless manner. The apparatus 900 may access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as memory 904 comprising instructions executable by processor 920 of device 900 to perform the above-described method is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 10 is a block diagram illustrating an apparatus 1000 for data processing in accordance with an example embodiment. For example, the apparatus 1000 may be provided as a server. Referring to fig. 10, the apparatus 1000 includes a processing component 1022 that further includes one or more processors and memory resources, represented by memory 1032, for storing instructions, such as application programs, that are executable by the processing component 1022. The application programs stored in memory 1032 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1022 is configured to execute instructions to perform the above-described methods.
The device 1000 may also include a power supply component 1026 configured to perform power management for the device 1000, a wired or wireless network interface 1050 configured to connect the device 1000 to a network, and an input/output (I/O) interface 1058. The apparatus 1000 may operate based on an operating system stored in memory 1032, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A data processing method, comprising:
receiving request data sent by a front-end page process;
monitoring change data corresponding to a target database, and acquiring a change operation log;
screening the change operation log according to the target account to obtain a log to be verified;
and performing operation logic verification according to the log to be verified and the request data to generate a verification result.
2. The method according to claim 1, wherein the step of screening the change operation log according to the target account to obtain a log to be verified comprises:
extracting at least one operation account identifier in the change operation log;
and screening the change operation log according to at least one operation account identifier and the target account, and acquiring the log to be verified.
3. The method according to claim 2, wherein the change operation log includes a plurality of operation account id, and the step of obtaining the log to be verified by filtering the change operation log according to at least one of the operation account id and the target account id specifically includes:
calling a target account interface to acquire a target account identifier of the target account;
acquiring at least one operation account identifier which is the same as the target account identifier, and taking the operation account identifier as the target operation account identifier;
and screening a log corresponding to the target operation account identifier from the change operation log to serve as the log to be verified.
4. The method according to claim 1, wherein the step of performing operation logic check according to the log to be checked and the request data further comprises:
acquiring an operation type identifier in the request data;
if the operation type identifier comprises a query identifier, acquiring query data, preset data and a query result of the target account in the log to be verified, and performing operation logic verification on the log to be verified according to the query result;
and if the operation type identifier comprises a non-query identifier, acquiring processing data in the request data, and performing operation logic verification on the log to be verified according to the non-query identifier and the processing data.
5. The method according to claim 4, wherein the step of performing operation logic check on the log to be checked according to the query result comprises:
processing preset data in the log to be checked according to the query data to obtain a preset result;
if the preset result is consistent with the query result, determining that the operation logic is successfully verified;
and if the preset result is inconsistent with the query result, determining that the operation logic check fails.
6. The method according to claim 4, wherein the step of performing operation logic check on the log to be checked according to the non-query identity and the processing data comprises:
acquiring processing result data in the log to be checked;
processing the processing data according to the non-query identification to obtain a preset processing result;
matching the preset processing result with the processing result data, and if the preset processing result is matched with the processing result data, determining that the operation logic verification is successful;
and if the preset processing result is not matched with the processing result data, determining that the operation logic check fails.
7. The method according to claim 1, wherein after the step of performing operation logic verification according to the log to be verified and the request data and generating a verification result, the method further comprises:
and displaying the checking result.
8. A data processing apparatus, characterized by comprising:
the receiving module is used for receiving request data sent by the front-end page process;
the monitoring module is used for monitoring the change data corresponding to the target database and acquiring a change operation log;
the log screening module is used for screening the change operation log according to the target account number to obtain a log to be verified;
and the checking module is used for performing operation logic checking according to the log to be checked and the request data to generate a checking result.
9. An electronic device for data processing, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the data processing method of any one of claims 1 to 7.
10. A computer readable storage medium, in which instructions, when executed by a processor of data processing electronics, enable the data processing electronics to perform a data processing method as claimed in any one of claims 1 to 7.
CN202210483811.6A 2022-05-05 2022-05-05 Data processing method and device, electronic equipment and storage medium Pending CN114840543A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210483811.6A CN114840543A (en) 2022-05-05 2022-05-05 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210483811.6A CN114840543A (en) 2022-05-05 2022-05-05 Data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114840543A true CN114840543A (en) 2022-08-02

Family

ID=82568537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210483811.6A Pending CN114840543A (en) 2022-05-05 2022-05-05 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114840543A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107844400A (en) * 2017-10-16 2018-03-27 阿里巴巴集团控股有限公司 The method of calibration and device of a kind of daily record data
CN110209521A (en) * 2019-02-22 2019-09-06 腾讯科技(深圳)有限公司 Data verification method, device, computer readable storage medium and computer equipment
CN113190531A (en) * 2021-05-10 2021-07-30 挂号网(杭州)科技有限公司 Database migration method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107844400A (en) * 2017-10-16 2018-03-27 阿里巴巴集团控股有限公司 The method of calibration and device of a kind of daily record data
CN110209521A (en) * 2019-02-22 2019-09-06 腾讯科技(深圳)有限公司 Data verification method, device, computer readable storage medium and computer equipment
CN113190531A (en) * 2021-05-10 2021-07-30 挂号网(杭州)科技有限公司 Database migration method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110941942B (en) Circuit schematic diagram inspection method, device and system
CN111274131A (en) Interface testing method and device, electronic equipment and storage medium
CN111221733A (en) Information processing method and device, mobile terminal and storage medium
CN115185717B (en) Interface calling method and device, electronic equipment and storage medium
CN109684112B (en) Program file operation method, device, terminal and storage medium
KR101787918B1 (en) Search method, apparatus, program and recording medium
CN116069612A (en) Abnormality positioning method and device and electronic equipment
CN112559309A (en) Method and device for adjusting page performance acquisition algorithm
CN112416751A (en) Processing method and device for interface automation test and storage medium
CN110213062B (en) Method and device for processing message
CN115729609A (en) Configuration library information normalization checking method, device, equipment and storage medium
CN115408277A (en) Interface testing method and device
CN114840543A (en) Data processing method and device, electronic equipment and storage medium
CN112383661B (en) Mobile terminal automatic test method and device, electronic equipment and storage medium
CN112333233B (en) Event information reporting method and device, electronic equipment and storage medium
CN114417133A (en) Business data processing method and device, electronic equipment and computer storage medium
CN113590605A (en) Data processing method and device, electronic equipment and storage medium
CN112733141B (en) Information processing method and device
CN111611470A (en) Data processing method and device and electronic equipment
CN113206772B (en) Method, device, equipment, medium and product for judging correctness of response message
CN115688187B (en) Method, device and equipment for safety management of hard link data and storage medium
CN110119471B (en) Method and device for checking consistency of search results
CN114201484A (en) Information processing method, information processing device, electronic equipment and storage medium
CN110020244B (en) Method and device for correcting website information
CN117149742A (en) Data migration testing method and electronic equipment

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