CN113191852A - Data verification method and device, storage medium and computer equipment - Google Patents
Data verification method and device, storage medium and computer equipment Download PDFInfo
- Publication number
- CN113191852A CN113191852A CN202110560891.6A CN202110560891A CN113191852A CN 113191852 A CN113191852 A CN 113191852A CN 202110560891 A CN202110560891 A CN 202110560891A CN 113191852 A CN113191852 A CN 113191852A
- Authority
- CN
- China
- Prior art keywords
- data
- domain
- scene
- verification
- verified
- 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
Links
- 238000013524 data verification Methods 0.000 title claims abstract description 67
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000012795 verification Methods 0.000 claims abstract description 194
- 238000004590 computer program Methods 0.000 claims description 10
- 238000011144 upstream manufacturing Methods 0.000 claims description 8
- 238000012360 testing method Methods 0.000 abstract description 43
- 238000011161 development Methods 0.000 abstract description 17
- 238000004904 shortening Methods 0.000 abstract description 3
- 230000009286 beneficial effect Effects 0.000 abstract 1
- 230000009471 action Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000013522 software testing Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0633—Lists, e.g. purchase orders, compilation or processing
- G06Q30/0635—Processing of requisition or of purchase orders
- G06Q30/0637—Approvals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/36—Software reuse
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application discloses a data verification method and device, a storage medium and computer equipment, wherein the method comprises the following steps: responding to a data verification instruction, and selecting at least one domain to be verified matched with the scene to be verified in a plurality of functional domains according to the scene to be verified corresponding to the data verification instruction; carrying out general verification on the domain to be verified to verify whether the domain to be verified is data self-consistent; and acquiring scene standard data corresponding to the data verification instruction and scene verification data in the domain to be verified based on a preset scene data index of the scene to be verified, and performing scene verification on the domain to be verified to verify whether the scene standard data is consistent with the scene verification data. The method and the device are beneficial to reducing the test development amount, reducing the data verification amount, improving the verification efficiency and shortening the test period.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data verification method and apparatus, a storage medium, and a computer device.
Background
In the software testing link, joint debugging tests among a plurality of systems and tests for simulating real scenes from end to end are often performed. For example, in a purchase order payment scenario of e-commerce in shopping software, a user initiates purchase order and pays after adding commodities to the software, and for the test scenario, a basic flow of background service mainly comprises: 1. the stock is deducted in the commodity domain, and the over-selling scene is avoided; 2. the order field establishes an order, records commodity snapshot, user order/payment behavior, records all other necessary data in a transaction scene, and the like; 3. the payment domain records the payment behavior, the amount and the like of the user; 4. the marketing domain records platform marketing activity data used by the user, marketing asset use data under the user's personal name, preferential amount and detail data enjoyed by the user and the like; 5. the logistics area records physical goods purchased by the user, the conditions of transportation and the like.
In the prior art, testing is realized by a tool-based method, and engineers in a commodity domain provide a commodity query and verification tool; the order field engineer provides order data queries and checks, etc. These verification tools are typically customized and are based on the particular combination tools provided for a particular test scenario. For example, a verification tool for a purchase order scenario performs the following verification: data confirming that the order field falls on an order of "in order" + confirming that the payment field falls on an order of "in payment" + that the marketing field falls on a "user ticket in freeze", and the like. In another scenario, engineers in various domains are often required to work together to produce another customized verification tool. In the testing process, the problems of large development amount, low testing efficiency and long period exist in the verification of the data correctness of each system.
Disclosure of Invention
In view of this, the present application provides a data verification method and apparatus, a storage medium, and a computer device, which are helpful for reducing test development amount, improving data verification efficiency, and shortening test period.
According to an aspect of the present application, there is provided a data verification method, including:
responding to a data verification instruction, and selecting at least one domain to be verified matched with the scene to be verified in a plurality of functional domains according to the scene to be verified corresponding to the data verification instruction;
carrying out general verification on the domain to be verified to verify whether the domain to be verified is data self-consistent;
and acquiring scene standard data corresponding to the data verification instruction and scene verification data in the domain to be verified based on a preset scene data index of the scene to be verified, and performing scene verification on the domain to be verified to verify whether the scene standard data is consistent with the scene verification data.
Optionally, the functional domain comprises at least one of an order domain, a payment domain, an operation domain, a goods domain, a logistics domain and a user domain; any functional domain comprises document data and branch data, wherein the branch data comprises at least one of pipelining data, fund data, snapshot data, channel data and scheduling data.
Optionally, the performing general verification on the domain to be verified to verify whether the domain to be verified is data-consistent specifically includes:
and respectively checking whether the first preset general data type of each to-be-checked domain is consistent with the data according to the bill data and the branch data corresponding to each to-be-checked domain, wherein the first preset general data type is determined based on the type of each to-be-checked domain, and comprises at least one of a state data type, a money data type, a channel data type and a scheduling data type corresponding to each to-be-checked domain.
Optionally, the performing general verification on the domain to be verified specifically further includes:
if the data of the first preset general data type in each domain to be verified are consistent, verifying whether the second preset general data type of any domain to be verified and the associated domain of any domain to be verified is consistent or not according to the bill data corresponding to any domain to be verified and the bill data corresponding to the associated domain of any domain to be verified, wherein the associated domain comprises domains to be verified at the upstream and/or downstream of any domain to be verified, and the second preset general data type is determined based on the first preset general data type corresponding to any domain to be verified and the associated domain.
Optionally, the obtaining, based on the preset scenized data index of the scene to be checked, scenized standard data corresponding to the data checking instruction and scenized checking data in the domain to be checked, and performing scenized checking on the domain to be checked specifically includes:
based on a preset scene data index of the scene to be checked, reading the scene standard data from the sample check data corresponding to the data check instruction, or calculating the scene standard data based on the sample check data corresponding to the data check instruction;
reading scene verification data corresponding to the preset scene data indexes in a preset customized verification domain corresponding to the scene to be verified, wherein the preset customized verification domain comprises at least one of the fields to be verified;
and performing scene verification on the preset customized verification domain to verify whether the scene standard data is consistent with the scene verification data.
Optionally, the reading of the scenized check data corresponding to the preset scenized data index in the preset customized check domain corresponding to the scene to be checked specifically includes:
and reading the scene verification data corresponding to the preset scene data index from the document data of the preset customized verification field corresponding to the scene to be verified, wherein the preset customized verification field comprises an order field.
Optionally, the method further comprises:
if the to-be-verified field passes the universal verification and the scene verification, the to-be-verified scene verification is successful, and verification success information is output;
and if any one of the general check and the scene check of the domain to be checked can not pass the check, the scene to be checked fails to check, and check failure data is output.
According to another aspect of the present application, there is provided a data verification apparatus including:
the device comprises a to-be-verified domain determining module, a to-be-verified domain determining module and a verification module, wherein the to-be-verified domain determining module is used for responding to a data verification instruction and selecting at least one to-be-verified domain matched with a to-be-verified scene in a plurality of functional domains according to the to-be-verified scene corresponding to the data verification instruction;
the general checking module is used for performing general checking on the domain to be checked so as to check whether the domain to be checked is data self-consistent;
and the scene verification module is used for acquiring scene standard data corresponding to the data verification instruction and scene verification data in the domain to be verified based on a preset scene data index of the scene to be verified, and performing scene verification on the domain to be verified so as to verify whether the scene standard data and the scene verification data are consistent.
Optionally, the functional domain comprises at least one of an order domain, a payment domain, an operation domain, a goods domain, a logistics domain and a user domain; any functional domain comprises document data and branch data, wherein the branch data comprises at least one of pipelining data, fund data, snapshot data, channel data and scheduling data.
Optionally, the universal checking module specifically includes:
and the self-consistent checking unit is used for respectively checking whether the first preset general data type of each to-be-checked domain is consistent with the data according to the bill data and the branch data corresponding to each to-be-checked domain, wherein the first preset general data type is determined based on the type of each to-be-checked domain, and the first preset general data type comprises at least one of a state data type, a money data type, a channel data type and a scheduling data type corresponding to the to-be-checked domain.
Optionally, the universal checking module specifically further includes:
and the association checking unit is used for checking whether a second preset universal data type of any to-be-checked domain is consistent with a second preset universal data type of the association domain according to the bill data corresponding to any to-be-checked domain and the bill data corresponding to the association domain of any to-be-checked domain, wherein the association domain comprises the upstream and/or downstream to-be-checked domain, and the second preset universal data type is determined based on the first preset universal data type corresponding to each of the to-be-checked domain and the association domain.
Optionally, the scene verification module specifically includes:
a standard data obtaining unit, configured to read the scenario standard data from sample verification data corresponding to the data verification instruction based on a preset scenario data index of the scenario to be verified, or calculate the scenario standard data based on the sample verification data corresponding to the data verification instruction;
a check data obtaining unit, configured to read, in a preset customized check domain corresponding to the scene to be checked, scenized check data corresponding to the preset scenized data index, where the preset customized check domain includes at least one of the fields to be checked;
and the scene verification unit is used for performing scene verification on the preset customized verification domain so as to verify whether the scene standard data is consistent with the scene verification data.
Optionally, the check data obtaining unit is specifically configured to:
and reading the scene verification data corresponding to the preset scene data index from the document data of the preset customized verification field corresponding to the scene to be verified, wherein the preset customized verification field comprises an order field.
Optionally, the apparatus further comprises:
the verification passing module is used for successfully verifying the scene to be verified and outputting verification success information if the domain to be verified passes the universal verification and the scene verification;
and the verification failure module is used for determining that the verification of the scene to be verified fails and outputting verification failure data if any one of the general verification and the scene verification of the domain to be verified can not pass the verification.
According to yet another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described data verification method.
According to yet another aspect of the present application, there is provided a computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the above data verification method when executing the program.
By means of the technical scheme, according to the data verification method and device, the storage medium and the computer device, in response to a data verification instruction, firstly, a matched domain to be verified is selected in a function domain according to a scene to be verified indicated by the instruction, then, general verification and scene verification are carried out on the domain to be verified aiming at the scene so as to test the domain to be verified, wherein the general verification specifically comprises data self-consistency verification of each domain to be verified, and the scene verification specifically comprises consistency verification of scene standard data corresponding to preset scene data indexes and scene verification data in the domain to be verified. Compared with the prior art, the embodiment of the application carries out universal check on the to-be-checked domain by utilizing the self-consistent check mode configured for each functional domain, does not need to carry out customized development for each test scene, can be used for one-time development and is subsequently reusable, the development amount is reduced, and only the scene check is carried out on the preset scene data index, so that the data check amount is reduced, the check efficiency is improved, and the test period is shortened.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 illustrates a schematic flow chart of a data verification method provided in an embodiment of the present application;
FIG. 2 is a diagram illustrating a generic data check provided by an embodiment of the present application;
fig. 3 is a schematic diagram illustrating a scenarized data verification provided by an embodiment of the present application;
fig. 4 is a schematic flow chart illustrating another data verification method provided in the embodiment of the present application;
fig. 5 shows a schematic structural diagram of a data verification apparatus according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In this embodiment, a data verification method is provided, as shown in fig. 1, the method includes:
102, carrying out general verification on the domain to be verified to verify whether the domain to be verified is data self-consistent;
103, acquiring scene standard data corresponding to the data verification instruction and scene verification data in the domain to be verified based on a preset scene data index of the scene to be verified, and performing scene verification on the domain to be verified to verify whether the scene standard data and the scene verification data are consistent.
The embodiment of the application is mainly applied to a test system to realize software test. In the software testing link, for example, in the following single payment scenario, after the tester executes the single payment action, the testing system can verify the data in each background functional domain, thereby implementing the test in the testing scenario. The data verification instruction may be generated after the ordering payment action is finished, or may be an instruction for triggering execution of the ordering payment action, and in response to the data verification instruction, at least one to-be-verified domain corresponding to the to-be-verified scene is selected from a plurality of functional domains corresponding to the test system according to the to-be-verified scene (i.e., a test scene) corresponding to the data verification instruction, so that the test of the to-be-verified scene is realized by performing data verification on the to-be-verified domain. The to-be-verified scenario may specifically include the order payment scenario described above, and may also include a payment cancellation scenario, a refund scenario, a secondary payment scenario, a scenario including a marketing campaign, a scenario including logistics data, and the like, and the functional domain may specifically include an order domain, a payment domain, an operation domain, a commodity domain, a logistics domain, a user domain, and the like, for example, the order payment scenario of electronic commerce in shopping software is tested, and the following functional domains are usually involved: a commodity domain, which needs to check and deduct stock and increase sales records; a user domain, which needs to bill users (some commodities, each user can only buy limited number of copies in the same day or in a permanent way); an order field, which needs to drop order data; a payment domain requiring payment data; a logistics domain, a demand for drop data, etc. After the data fall into each functional domain, the data in each functional domain are verified, so that the software can be tested, namely, in order to test the order payment scene, a commodity domain, a user domain, an order domain, a payment domain and a logistics domain can be selected as the domain to be verified to perform data verification. In addition, each functional domain may specifically include a plurality of data tables, which record contents such as flow data and document data, in this embodiment of the application, optionally, any functional domain includes document data and branch data, where the branch data includes at least one of flow data, fund data, snapshot data, channel data, and scheduling data. The document data is a master table in each functional domain, records the most core business data, and can provide capabilities such as data query for the outside, as shown in fig. 2, the order data in the order domain, the payment document in the payment domain, and the marketing document in the operation domain are master tables in each domain. And subsequently, data verification and scene test are realized by taking the document data and the branch data as references.
After the domain to be verified is selected, general verification and scene verification may be performed on the domain to be verified, generally, general verification is performed first, and then scene verification is performed, although the general verification and the scene verification may be performed simultaneously, or scene verification is performed first and then verification is performed, and the order is not limited herein. For general verification, if the domain to be verified includes one domain, self-consistency verification is performed on internal data of the domain to be verified to verify whether the domain to be verified is self-consistent with the data, if the domain to be verified includes a plurality of domains, self-consistency verification is performed on the internal data of each domain to be verified respectively, in the above-mentioned user ordering payment test scenario, taking an order domain as an example, self-consistency verification is performed on the order domain around a main table, namely document data, in the order domain, for example, after the user orders, an operation flow "user orders" is recorded, at this time, a state machine of the order data should be "to be paid", after the user pays, an operation flow "user payment" is recorded, at this time, a state machine of the order data should be "successful payment", and the like, and in addition, data verification of funds, commodities, and the like is also similar to this. The self-consistent check of the domain to be checked mainly comprises data consistency check between a flow and a main table, state machine consistency check between the main table and branch data, and data consistency check (such as fund, snapshot, channel, logistics and the like) between the core data of the main table and the branch data. For the scene verification, according to the preset scene data index corresponding to the scene to be verified, respectively acquiring the scene standard data corresponding to the data verification instruction and the corresponding scene verification data in the domain to be verified, wherein, in the order payment test scene, the scene standard data is the data which should be generated in the functional domain after the order payment action, the scene check data is the data which is actually generated in the functional domain, the scene check can be realized by comparing the consistency of the two, in addition, the preset scene data index is an index strongly related to the scene to be verified, for example, a user places an order to purchase a commodity with the unit price of 1 yuan, and at the same time, enjoys the 0.2-yuan platform subsidy, the actual payment amount of the user in the order domain and the payment domain must be 0.8 yuan, the actual payment amount is strongly related to the scene to be verified, and can be used as a preset scene data index of the ordering payment scene. In the test scenario example, if the domain to be verified passes the universal verification, it is indicated that parameters such as data, states, and the like in each verification domain are self-consistent, and at this time, it is only necessary to perform the scenic verification on very few data strongly related to the scene to be verified in the domain to be verified, for example, the payment amounts in the payment domain and the order domain are verified, and if the scene passes the scenic verification, the scene can be considered to pass the test.
As shown in fig. 3, the above-mentioned general check for each functional domain may also be implemented by a pre-configured checker, and a self-consistent state checker, a fund balance checker, and other internal checkers may be provided in each functional domain (one checker may also be developed to implement check of multiple types of data in the functional domain), so as to implement state machine consistency check of the master document and other documents, data consistency check between the flow and the master document, and data consistency check of the core data of the master document and other documents, respectively, for example: funds, snapshots, etc. The universal check does not sense a specific scene, so the method has the characteristics of simple development and wide application range, can realize self-consistent check on the functional domains under different scenes by one-time development, and further can realize the test on the scene to be checked only by checking the key data which is strongly related to the scene in the functional domains after the universal check, thereby not only realizing the multiplexing of the check tool and reducing the development amount, but also reducing the data amount of the data to be checked, improving the check efficiency and shortening the test period.
By applying the technical scheme of the embodiment, in response to a data verification instruction, firstly, a matched domain to be verified is selected in a functional domain according to a scene to be verified indicated by the instruction, and then, general verification and scene verification are performed on the domain to be verified aiming at the scene, so as to realize the test of the domain to be verified, wherein the general verification specifically comprises self-consistent verification of data of each domain to be verified, and the scene verification specifically comprises consistency verification of scene standard data corresponding to preset scene data indexes and scene verification data in the domain to be verified. Compared with the prior art, the embodiment of the application carries out universal check on the to-be-checked domain by utilizing the self-consistent check mode configured for each functional domain, does not need to carry out customized development for each test scene, can be used for one-time development and is subsequently reusable, the development amount is reduced, and only the scene check is carried out on the preset scene data index, so that the data check amount is reduced, the check efficiency is improved, and the test period is shortened.
Further, as a refinement and an extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of the embodiment, another data verification method is provided, as shown in fig. 4, and the method includes:
optionally, the functional domain comprises at least one of an order domain, a payment domain, an operation domain, a goods domain, a logistics domain and a user domain; any functional domain comprises document data and branch data, wherein the branch data comprises at least one of pipelining data, fund data, snapshot data, channel data and scheduling data. In different test scenes, each functional domain can realize different functions and store different data, for example, in the following single payment scene, a commodity domain deducts inventory to avoid the occurrence of an over-sale scene, an order domain creates an order, records commodity snapshot, user ordering/payment behavior, other necessary data in a transaction scene and the like, a payment domain records user payment behavior, money amount and the like, a marketing domain records platform marketing activity data used by a user, marketing asset use data under the name of the user, preferential money amount and detail data enjoyed by the user and the like, and a logistics domain records physical commodities purchased by the user, the delivery condition and the like.
Step 202, respectively checking whether a first preset general data type of each to-be-checked domain is consistent with data according to bill data and branch data corresponding to each to-be-checked domain, wherein the first preset general data type is determined based on the type of each to-be-checked domain, and the first preset general data type comprises at least one of a state data type, a money amount data type, a channel data type and a scheduling data type corresponding to the to-be-checked domain.
In the above embodiment, data self-consistency verification is performed on each domain to be verified first, that is, whether data in each domain to be verified are consistent or not is verified, specifically, for verification of different domains to be verified, a data type to be verified, that is, a first preset general data type corresponding to each domain to be verified can be selected according to characteristics of data in the domain to be verified, for example, a state data type, an amount data type, a channel data type and the like can be verified for a payment domain, and a state data type, a channel data type, a scheduling data type and the like can be verified for a logistics domain.
In the above embodiment, after the internal data self-consistency condition of each domain to be verified is verified, data consistency between different domains to be verified may also be verified, and specifically, data consistency between any domain to be verified and its corresponding upstream and downstream domains to be verified (the upstream and downstream domains to be verified are determined according to the association relationship of each functional domain), that is, between the associated domains may be verified, as shown in fig. 3, the upstream and downstream data consistency verification specifically may include state machine consistency verification, fund balance consistency verification, and other data consistency verification (for example, scheduling, snapshot, etc.), if each domain to be verified is consistent with its corresponding associated domain average data, it indicates that data consistency between all domains to be verified, in an actual application scenario, because each domain to be verified has been internally self-consistent, and under the condition that internal data in each domain to be verified is self-consistent, whether the data between the domain to be verified and the associated domain are consistent or not can be verified only by utilizing the document data of any domain to be verified and the document data of the associated domain, namely, consistency verification is carried out by utilizing the main table of each domain to be verified, and if the data of the main table is consistent, the branch data is necessarily consistent, so that the data verification amount can be reduced.
the steps 204 to 206 are a scenarization verification process, and the preset scenarization data index corresponding to the scene to be verified is determined, and then the scenarization standard data is read from the sample verification data corresponding to the data verification instruction or calculated based on the sample verification data, where the sample verification data is test-related sample data of the scene to be verified, for example, in a placing payment scene, the sample verification data may include placing commodities, commodity amount, marketing activity data, and the like, and may also include an actual payment amount, then the scenarization verification data corresponding to the preset scenarization data index is obtained in a field to be verified, and finally, whether the scenarization standard data is consistent with the scenarization verification data is compared, and if so, the scenarization verification is passed, otherwise, the scenarization verification is not passed.
In the foregoing embodiment, optionally, step 205 may specifically include: and reading the scene verification data corresponding to the preset scene data index from the document data of the preset customized verification field corresponding to the scene to be verified, wherein the preset customized verification field comprises an order field.
In this embodiment, in the implementation manner of performing general verification first and then performing scenized verification, when general verification is performed on the domains to be verified, data consistency between the domains to be verified is verified, and under the condition that data consistency between the domains to be verified is ensured, only one domain to be verified needs to be selected for scenized verification, as long as one domain to be verified passes the scenized verification, since data of other domains to be verified and the domain to be verified are also consistent, specifically, one domain to be read as a preset customized verification domain can be randomly selected, a functional domain matched with a test scene can be designated in advance as the preset customized verification domain, and in addition, data recorded in the order domain is generally comprehensive and applied to almost all test scenes, and the order domain can also be directly used as the preset customized verification domain, the data volume of the check data is further reduced, the check efficiency is improved, and the test period is shortened.
and 208, if any one of the general check and the scene check of the domain to be checked cannot pass the check, the scene to be checked fails to check, and check failure data is output.
In the above embodiment, if the general verification and the scene verification pass, information that the verification of the scene to be verified succeeds is output, otherwise, if any one of the two verifications fails, the verification of the scene fails is determined, verification failure data is output, and specifically, which data fails to verify can be output, so that a tester can conveniently check.
By applying the technical scheme of the embodiment, aiming at the problems that in the prior art, a plurality of systems are involved in one-time calling in a real scene, so that the data needing to be verified is very much, and each system usually belongs to different owners, including corresponding development and testing, so that the data verification needs to be participated in by multiple parties, and the coordination cost is very high. In the embodiment of the application, each test scene spanning multiple domains needs to pass through general verification and then scene verification is carried out. The universal verification already ensures the self-consistency of the internal data of each domain to be verified and the consistency of the data among the domains to be verified, so the scene verification only needs to verify the correctness of the master list data of the first application. It can be seen that the universal check provided by the application can support a plurality of scene test joint debugging with high efficiency, and the universal check does not sense specific scenes, so that the universal check has the characteristics of simple development and wide application range.
Further, as a specific implementation of the method in fig. 1, an embodiment of the present application provides a data verification apparatus, as shown in fig. 5, the apparatus includes:
the device comprises a to-be-verified domain determining module, a to-be-verified domain determining module and a verification module, wherein the to-be-verified domain determining module is used for responding to a data verification instruction and selecting at least one to-be-verified domain matched with a to-be-verified scene in a plurality of functional domains according to the to-be-verified scene corresponding to the data verification instruction;
the general checking module is used for performing general checking on the domain to be checked so as to check whether the domain to be checked is data self-consistent;
and the scene verification module is used for acquiring scene standard data corresponding to the data verification instruction and scene verification data in the domain to be verified based on a preset scene data index of the scene to be verified, and performing scene verification on the domain to be verified so as to verify whether the scene standard data and the scene verification data are consistent.
Optionally, the functional domain comprises at least one of an order domain, a payment domain, an operation domain, a goods domain, a logistics domain and a user domain; any functional domain comprises document data and branch data, wherein the branch data comprises at least one of pipelining data, fund data, snapshot data, channel data and scheduling data.
Optionally, the universal checking module specifically includes:
and the self-consistent checking unit is used for respectively checking whether the first preset general data type of each to-be-checked domain is consistent with the data according to the bill data and the branch data corresponding to each to-be-checked domain, wherein the first preset general data type is determined based on the type of each to-be-checked domain, and the first preset general data type comprises at least one of a state data type, a money data type, a channel data type and a scheduling data type corresponding to the to-be-checked domain.
Optionally, the universal checking module specifically further includes:
and the association checking unit is used for checking whether a second preset universal data type of any to-be-checked domain is consistent with a second preset universal data type of the association domain according to the bill data corresponding to any to-be-checked domain and the bill data corresponding to the association domain of any to-be-checked domain, wherein the association domain comprises the upstream and/or downstream to-be-checked domain, and the second preset universal data type is determined based on the first preset universal data type corresponding to each of the to-be-checked domain and the association domain.
Optionally, the scene verification module specifically includes:
a standard data obtaining unit, configured to read the scenario standard data from sample verification data corresponding to the data verification instruction based on a preset scenario data index of the scenario to be verified, or calculate the scenario standard data based on the sample verification data corresponding to the data verification instruction;
a check data obtaining unit, configured to read, in a preset customized check domain corresponding to the scene to be checked, scenized check data corresponding to the preset scenized data index, where the preset customized check domain includes at least one of the fields to be checked;
and the scene verification unit is used for performing scene verification on the preset customized verification domain so as to verify whether the scene standard data is consistent with the scene verification data.
Optionally, the check data obtaining unit is specifically configured to:
and reading the scene verification data corresponding to the preset scene data index from the document data of the preset customized verification field corresponding to the scene to be verified, wherein the preset customized verification field comprises an order field.
Optionally, the apparatus further comprises:
the verification passing module is used for successfully verifying the scene to be verified and outputting verification success information if the domain to be verified passes the universal verification and the scene verification;
and the verification failure module is used for determining that the verification of the scene to be verified fails and outputting verification failure data if any one of the general verification and the scene verification of the domain to be verified can not pass the verification.
It should be noted that other corresponding descriptions of the functional units related to the data verification apparatus provided in the embodiment of the present application may refer to corresponding descriptions in the methods in fig. 1 to fig. 4, and are not described herein again.
Based on the above-mentioned methods shown in fig. 1 to 4, correspondingly, the present application further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the above-mentioned data verification method shown in fig. 1 to 4.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Based on the above methods shown in fig. 1 to fig. 4 and the virtual device embodiment shown in fig. 5, in order to achieve the above object, an embodiment of the present application further provides a computer device, which may specifically be a personal computer, a server, a network device, and the like, where the computer device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the data verification method as described above with reference to fig. 1 to 4.
Optionally, the computer device may also include a user interface, a network interface, a camera, Radio Frequency (RF) circuitry, sensors, audio circuitry, a WI-FI module, and so forth. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., a bluetooth interface, WI-FI interface), etc.
It will be appreciated by those skilled in the art that the present embodiment provides a computer device architecture that is not limiting of the computer device, and that may include more or fewer components, or some components in combination, or a different arrangement of components.
The storage medium may further include an operating system and a network communication module. An operating system is a program that manages and maintains the hardware and software resources of a computer device, supporting the operation of information handling programs, as well as other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and other hardware and software in the entity device.
Through the description of the above embodiments, those skilled in the art can clearly understand that the present application may be implemented by software plus a necessary general hardware platform, or may respond to a data verification instruction through hardware implementation, first select a matched domain to be verified in a functional domain according to a scene to be verified indicated by the instruction, and then perform general verification and scenarization verification on the domain to be verified for the scene, so as to implement a test on the scene to be verified, where the general verification specifically includes data self-consistency verification of each domain to be verified, and the scenarization verification specifically includes consistency verification of scenarization standard data corresponding to a preset scenarization data index and scenarization verification data in the domain to be verified. Compared with the prior art, the embodiment of the application carries out universal check on the to-be-checked domain by utilizing the self-consistent check mode configured for each functional domain, does not need to carry out customized development for each test scene, can be used for one-time development and is subsequently reusable, the development amount is reduced, and only the scene check is carried out on the preset scene data index, so that the data check amount is reduced, the check efficiency is improved, and the test period is shortened.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.
Claims (10)
1. A method for data verification, comprising:
responding to a data verification instruction, and selecting at least one domain to be verified matched with the scene to be verified in a plurality of functional domains according to the scene to be verified corresponding to the data verification instruction;
carrying out general verification on the domain to be verified to verify whether the domain to be verified is data self-consistent;
and acquiring scene standard data corresponding to the data verification instruction and scene verification data in the domain to be verified based on a preset scene data index of the scene to be verified, and performing scene verification on the domain to be verified to verify whether the scene standard data is consistent with the scene verification data.
2. The method of claim 1,
the functional domain comprises at least one of an order domain, a payment domain, an operation domain, a commodity domain, a logistics domain and a user domain; any functional domain comprises document data and branch data, wherein the branch data comprises at least one of pipelining data, fund data, snapshot data, channel data and scheduling data.
3. The method according to claim 2, wherein the performing the general check on the domain to be checked to check whether the domain to be checked is data-consistent specifically comprises:
and respectively checking whether the first preset general data type of each to-be-checked domain is consistent with the data according to the bill data and the branch data corresponding to each to-be-checked domain, wherein the first preset general data type is determined based on the type of each to-be-checked domain, and comprises at least one of a state data type, a money data type, a channel data type and a scheduling data type corresponding to each to-be-checked domain.
4. The method according to claim 3, wherein the performing the general check on the domain to be checked specifically further includes:
if the data of the first preset general data type in each domain to be verified are consistent, verifying whether the second preset general data type of any domain to be verified and the associated domain of any domain to be verified is consistent or not according to the bill data corresponding to any domain to be verified and the bill data corresponding to the associated domain of any domain to be verified, wherein the associated domain comprises domains to be verified at the upstream and/or downstream of any domain to be verified, and the second preset general data type is determined based on the first preset general data type corresponding to any domain to be verified and the associated domain.
5. The method according to claim 2, wherein the obtaining of the scenarized standard data corresponding to the data verification instruction and the scenarized verification data in the domain to be verified based on the preset scenarized data index of the scene to be verified, and the performing of the scenarized verification on the domain to be verified specifically include:
based on a preset scene data index of the scene to be checked, reading the scene standard data from the sample check data corresponding to the data check instruction, or calculating the scene standard data based on the sample check data corresponding to the data check instruction;
reading scene verification data corresponding to the preset scene data indexes in a preset customized verification domain corresponding to the scene to be verified, wherein the preset customized verification domain comprises at least one of the fields to be verified;
and performing scene verification on the preset customized verification domain to verify whether the scene standard data is consistent with the scene verification data.
6. The method according to claim 5, wherein if any domain to be verified is consistent with the second preset general data type data of the corresponding associated domain, reading the scenized verification data corresponding to the preset scenized data index in the preset customized verification domain corresponding to the scene to be verified, specifically comprising:
and reading the scene verification data corresponding to the preset scene data index from the document data of the preset customized verification field corresponding to the scene to be verified, wherein the preset customized verification field comprises an order field.
7. The method according to any one of claims 1 to 6, further comprising:
if the to-be-verified field passes the universal verification and the scene verification, the to-be-verified scene verification is successful, and verification success information is output;
and if any one of the general check and the scene check of the domain to be checked can not pass the check, the scene to be checked fails to check, and check failure data is output.
8. A data verification apparatus, comprising:
the device comprises a to-be-verified domain determining module, a to-be-verified domain determining module and a verification module, wherein the to-be-verified domain determining module is used for responding to a data verification instruction and selecting at least one to-be-verified domain matched with a to-be-verified scene in a plurality of functional domains according to the to-be-verified scene corresponding to the data verification instruction;
the general checking module is used for performing general checking on the domain to be checked so as to check whether the domain to be checked is data self-consistent;
and the scene verification module is used for acquiring scene standard data corresponding to the data verification instruction and scene verification data in the domain to be verified based on a preset scene data index of the scene to be verified, and performing scene verification on the domain to be verified so as to verify whether the scene standard data and the scene verification data are consistent.
9. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1 to 7.
10. A computer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 7 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110560891.6A CN113191852A (en) | 2021-05-19 | 2021-05-19 | Data verification method and device, storage medium and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110560891.6A CN113191852A (en) | 2021-05-19 | 2021-05-19 | Data verification method and device, storage medium and computer equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113191852A true CN113191852A (en) | 2021-07-30 |
Family
ID=76984750
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110560891.6A Pending CN113191852A (en) | 2021-05-19 | 2021-05-19 | Data verification method and device, storage medium and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113191852A (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103544074A (en) * | 2012-07-09 | 2014-01-29 | 阿里巴巴集团控股有限公司 | Method and device for verifying service |
CN105631669A (en) * | 2015-12-24 | 2016-06-01 | 中国建设银行股份有限公司 | Method and device which verifies payment data |
CN108629594A (en) * | 2018-05-10 | 2018-10-09 | Oppo广东移动通信有限公司 | Method of payment, device, server and storage medium |
CN109189669A (en) * | 2018-08-03 | 2019-01-11 | 平安科技(深圳)有限公司 | Test method, electronic device and the readable storage medium storing program for executing of business scenario |
CN109325027A (en) * | 2018-08-21 | 2019-02-12 | 朱常林 | One kind is based on the analysis of cloud data, Situation Awareness algorithm |
CN111582865A (en) * | 2020-04-29 | 2020-08-25 | 网银在线(北京)科技有限公司 | Data processing method and system for information verification |
CN112116339A (en) * | 2020-09-28 | 2020-12-22 | 中国建设银行股份有限公司 | Capital full link control verification method and device |
CN112187558A (en) * | 2019-07-03 | 2021-01-05 | 腾讯科技(深圳)有限公司 | Data verification method and device and electronic equipment |
CN112465528A (en) * | 2020-12-14 | 2021-03-09 | 马卓 | Digital commodity unsubscribe processing method, device, equipment and storage medium |
CN112561633A (en) * | 2020-12-09 | 2021-03-26 | 完美世界控股集团有限公司 | Order data verification method, device and equipment |
CN112581116A (en) * | 2019-09-30 | 2021-03-30 | 王宝伦 | Commodity verification method, related equipment and system |
-
2021
- 2021-05-19 CN CN202110560891.6A patent/CN113191852A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103544074A (en) * | 2012-07-09 | 2014-01-29 | 阿里巴巴集团控股有限公司 | Method and device for verifying service |
CN105631669A (en) * | 2015-12-24 | 2016-06-01 | 中国建设银行股份有限公司 | Method and device which verifies payment data |
CN108629594A (en) * | 2018-05-10 | 2018-10-09 | Oppo广东移动通信有限公司 | Method of payment, device, server and storage medium |
CN109189669A (en) * | 2018-08-03 | 2019-01-11 | 平安科技(深圳)有限公司 | Test method, electronic device and the readable storage medium storing program for executing of business scenario |
CN109325027A (en) * | 2018-08-21 | 2019-02-12 | 朱常林 | One kind is based on the analysis of cloud data, Situation Awareness algorithm |
CN112187558A (en) * | 2019-07-03 | 2021-01-05 | 腾讯科技(深圳)有限公司 | Data verification method and device and electronic equipment |
CN112581116A (en) * | 2019-09-30 | 2021-03-30 | 王宝伦 | Commodity verification method, related equipment and system |
CN111582865A (en) * | 2020-04-29 | 2020-08-25 | 网银在线(北京)科技有限公司 | Data processing method and system for information verification |
CN112116339A (en) * | 2020-09-28 | 2020-12-22 | 中国建设银行股份有限公司 | Capital full link control verification method and device |
CN112561633A (en) * | 2020-12-09 | 2021-03-26 | 完美世界控股集团有限公司 | Order data verification method, device and equipment |
CN112465528A (en) * | 2020-12-14 | 2021-03-09 | 马卓 | Digital commodity unsubscribe processing method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11625693B2 (en) | System and method for payment platform self-certification for processing financial transactions with payment networks | |
CN110060139B (en) | Accounting processing method and device | |
US20110089232A1 (en) | System and method for automated selection of testing criteria for payment devices | |
CN108564346A (en) | A kind of procurement of commodities method, medium and equipment | |
US11710117B1 (en) | Systems and methods for EMV terminal device testing using EMV card emulation | |
CN110148046A (en) | A kind of payment management method and device | |
CN111784510B (en) | Account checking method and device | |
CN106296178A (en) | Method of payment based on NFC and device | |
US20170286937A1 (en) | Redemption Network with Transaction Sequencer | |
CN108230130B (en) | Method and device for verifying daily cutting data and electronic equipment | |
CN110347887B (en) | Method and device for acquiring time sequence data of service scene | |
US20090248550A1 (en) | System and Method of Determining the Quality of Enhanced Transaction Data | |
CN111444105B (en) | Method, system and device for simulating payment | |
WO2013054296A2 (en) | Enterprise resource planning system | |
CN110175915B (en) | Service execution result obtaining method and system based on block chain | |
CN113191852A (en) | Data verification method and device, storage medium and computer equipment | |
JP2007233694A (en) | Evaluation collecting system, electronic settlement device, mobile terminal, method for collecting evaluation, method for providing right, and method and program for providing evaluation | |
CN111625458A (en) | Service system testing method, device and equipment | |
CN111538664A (en) | System and method for testing payment marking application | |
US20190272596A1 (en) | Systems and methods for implementing reverse gift card technology | |
CN109636543A (en) | A kind of block chain test method and device | |
CN113468059B (en) | Information acquisition method and device, terminal and server | |
CN111144867B (en) | Method and device for generating region code mapping relation | |
US12106298B1 (en) | Development environment for payment solutions using software-defined card processing | |
CN114003494A (en) | Automatic test method and device for data model 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210730 |