Data verification method and device, equipment, storage medium and product
By obtaining business flow charts in the database and configuring verification components and verification parameter sequences, the problem of data verification in the database relying on a large amount of configuration work is solved, efficient data verification is achieved and labor costs are reduced.
Patent Information
- Application Number
- CN202411552558.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-03-25
AI Technical Summary
In the prior art, data verification in the database relies on a large amount of configuration work, resulting in low efficiency and high labor costs.
By obtaining the business flow chart corresponding to the data to be verified, a verification component and a verification parameter sequence are configured. The verification component is used to verify the service data packets corresponding to the service node. The verification parameter sequence includes multiple reference data of the business data to be verified.
This enables verification components to be configured for each business data, reduces the configuration workload of data verification, improves the efficiency of verification work and reduces labor costs.
Smart Images

Figure CN119690950A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data verification method, device, equipment, storage medium and product. Background Art
[0002] A database is a data management system that is used to store, organize, access, and update data. Databases are used in various scenarios in life, such as e-commerce, banking, social networks, etc. It can be used to store and manage various types of business data, such as customer information, product information, order information, etc. As the core cornerstone of all services, the importance of databases is self-evident. Therefore, it is necessary to verify the data in the database to ensure the normal operation of the business.
[0003] In the related art, the database used in the business scenario stores multiple pieces of data corresponding to each business node, and for each piece of data, a verification component needs to be configured to verify the data. Due to the large number of business nodes and the large amount of data under each business node, data verification relies on a lot of configuration work, resulting in low efficiency of data verification work and high labor costs.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a data verification method, device, equipment, storage medium and product, which can improve the efficiency of data verification work and reduce the manpower cost of data verification work.
[0006] To achieve the above purpose, the present application proposes a data verification method, which includes:
[0007] Obtaining a business process diagram corresponding to the data to be verified, wherein the business process diagram includes at least one business node;
[0008] Configure a verification component and a verification parameter sequence on the service node, wherein the verification component is used to verify a service data packet corresponding to the service node, the service data packet includes a plurality of service data to be verified, and the verification parameter sequence includes reference data of the plurality of service data to be verified;
[0009] Acquiring the service data from the service data packet and acquiring reference data of the service data from the verification parameter sequence through the verification component;
[0010] The business data is verified based on the reference data of the business data.
[0011] Optionally, obtaining the service data from the service data packet through the verification component, and obtaining reference data of the service data from the verification parameter sequence, includes:
[0012] Obtaining the service data and the sequence number of the service data in the service data packet from the service data packet through the verification component;
[0013] Using the sequence number as an index number, determining an index position of the index number in the verification parameter sequence;
[0014] Based on the index content in the index position, reference data of the business data is determined.
[0015] Optionally, the determining the reference data of the business data based on the index content in the index position includes at least one of the following:
[0016] In a case where the index content is reference data, determining the reference data as reference data corresponding to the business data;
[0017] In the case where the index content is a data interface, calling the data interface to obtain reference data corresponding to the business data;
[0018] In the case where the index content is a data relationship, the reference data corresponding to the business data is determined based on the data involved in the data relationship and the data relationship, wherein the data relationship is the relationship between the reference data of the business data and other data.
[0019] Optionally, using the sequence number as an index number to determine an index position of the index number in the verification parameter sequence includes:
[0020] For a target field in the business data, determining a verification parameter subsequence corresponding to the target field, wherein the target field is any field in the business data;
[0021] Using the sequence number as an index number, determining an index position of the index number in the verification parameter subsequence;
[0022] The determining the reference data of the business data based on the index content in the index position includes:
[0023] Based on the index content in the index position, reference data of the target field is determined.
[0024] Optionally, obtaining a business process diagram corresponding to the data to be verified includes:
[0025] Draw a business process diagram based on the business scenario to which the data to be verified is applied;
[0026] Among them, the multiple reference business nodes in the business scenario are drawn as one business node in the business process diagram, and the multiple reference business nodes in the business scenario generate the same type of business data.
[0027] Optionally, the verifying the business data based on the reference data of the business data includes:
[0028] If the business data is consistent with the reference data of the business data, determining that the business data passes the verification; or,
[0029] In a case where the business data is inconsistent with the reference data of the business data, it is determined that the business data has failed verification.
[0030] In addition, to achieve the above purpose, the present application also proposes a data verification device, the device comprising:
[0031] A flow chart acquisition module, used to acquire a business flow chart corresponding to the data to be verified, wherein the business flow chart includes at least one business node;
[0032] A component configuration module, configured to configure a verification component and a verification parameter sequence at the service node, wherein the verification component is used to verify a service data packet corresponding to the service node, the service data packet includes a plurality of service data to be verified, and the verification parameter sequence includes reference data of the plurality of service data to be verified;
[0033] A data acquisition module, which acquires the service data from the service data packet through the verification component, and acquires reference data of the service data from the verification parameter sequence;
[0034] The data verification module is used to verify the business data based on the reference data of the business data.
[0035] Optionally, the data acquisition module includes:
[0036] A sequence number obtaining unit, configured to obtain the service data and the sequence number of the service data in the service data packet from the service data packet through the verification component;
[0037] a position indexing unit, configured to use the sequence number as an index number to determine an index position of the index number in the verification parameter sequence;
[0038] A data determination unit is used to determine reference data of the business data based on the index content in the index position.
[0039] Optionally, the data determination unit includes at least one of the following:
[0040] A first determining subunit, configured to determine the reference data as reference data corresponding to the business data when the index content is reference data;
[0041] A second determining subunit is configured to, when the index content is a data interface, call the data interface to obtain reference data corresponding to the business data;
[0042] The third determination subunit is used to determine the reference data corresponding to the business data based on the data involved in the data relationship and the data relationship when the index content is a data relationship, wherein the data relationship is the relationship between the reference data of the business data and other data.
[0043] Optionally, the position index unit is used to determine, for a target field in the business data, a verification parameter subsequence corresponding to the target field, where the target field is any field in the business data; and use the sequence number as an index number to determine an index position of the index number in the verification parameter subsequence;
[0044] The data determination unit is used to determine the reference data of the target field based on the index content in the index position.
[0045] Optionally, the flowchart acquisition module is used to draw a business flowchart based on the business scenario to which the data to be verified is applied; wherein, multiple reference business nodes in the business scenario are drawn as one business node in the business flowchart, and the multiple reference business nodes in the business scenario generate the same type of business data.
[0046] Optionally, the data verification module is used to determine that the business data has passed the verification if the business data is consistent with the reference data of the business data; or to determine that the business data has not passed the verification if the business data is inconsistent with the reference data of the business data.
[0047] In addition, to achieve the above-mentioned purpose, the present application also proposes a data verification device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the data verification method described above.
[0048] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the data verification method described above are implemented.
[0049] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data verification method described above are implemented.
[0050] One or more technical solutions proposed in this application have at least the following technical effects:
[0051] The data verification scheme provided in the present application obtains the business process diagram corresponding to the data to be verified, and for the business nodes in the business process diagram, not only the verification component is configured, but also the verification parameter sequence is configured. Since the verification component is used to verify the business data packet corresponding to the business node, the business data packet includes multiple business data to be verified, and the verification parameter sequence includes reference data of these multiple business data, the reference data of multiple business data in the data packet can be obtained from the verification parameter sequence through the verification component, thereby completing the verification of multiple business data. In other words, the data verification scheme in the present application only needs to configure a verification component and a verification parameter sequence for multiple business data under the same business node, and there is no need to configure a verification component for each business data, which greatly reduces the configuration workload of data verification, thereby improving the efficiency of verification work and reducing labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0054] Figure 1 A schematic diagram of an implementation environment of the data verification method of the present application;
[0055] Figure 2 A schematic diagram of a flow chart provided for the first embodiment of the data verification method of the present application;
[0056] Figure 3 A business process diagram provided for this application;
[0057] Figure 4 Another business process diagram provided for this application;
[0058] Figure 5 A schematic diagram of a flow chart provided for the second embodiment of the data verification method of the present application;
[0059] Figure 6 This is a schematic diagram of the module structure of the data verification device according to an embodiment of the present application;
[0060] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the data verification method in the embodiment of the present application.
[0061] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0062] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0063] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0064] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Figure 1 The implementation environment includes a configuration terminal 101 and a verification terminal 102. The configuration terminal 101 and the verification terminal 102 are connected via a wireless or wired network. Exemplarily, the configuration terminal 101 and the verification terminal 102 are computers, mobile phones, laptops, tablet computers or other terminals.
[0065] In the embodiment of the present application, the configuration terminal 101 is used to obtain a business process diagram corresponding to the data to be verified, and the business process diagram includes at least one business node; a verification component and a verification parameter sequence are configured in the business node, and the verification component is used to verify the business data packet corresponding to the business node, and the business data packet includes multiple business data to be verified, and the verification parameter sequence includes multiple reference data of the business data to be verified. The configuration terminal 101 is also used to send the verification component and the verification parameter sequence to the detection terminal 102. The detection terminal 102 is used to receive the verification component and the verification parameter sequence, obtain business data from the business data packet through the verification component, and obtain reference data of the business data from the verification parameter sequence; verify the business data based on the reference data of the business data.
[0066] In a possible implementation, the data verification method in the present application may also be implemented independently by any terminal, and the embodiments of the present application do not limit this.
[0067] Figure 2 This is a flow chart of the first embodiment of the data verification method of this application. Figure 2 Taking the execution subject as a terminal as an example, the data verification method includes the following steps S10 to S40:
[0068] Step S10, obtaining a business process diagram corresponding to the data to be verified, where the business process diagram includes at least one business node.
[0069] The data to be verified is the business data to be verified stored in the database. The business process diagram corresponding to the data to be verified is a graphical representation of the business process corresponding to the business scenario to which the data to be verified is applied. Taking the database of a bank as an example, assuming that the business scenario is a loan scenario, the data to be verified is the business data generated by the loan business process under the loan scenario. The business process diagram is a graphical representation of the loan business process. Exemplarily, the business process diagram is also referred to as a model.
[0070] Exemplarily, the business process diagram is composed of at least one business node and the lines between the business nodes. The business node represents a specific business activity, for example, generating business data according to business rules, verifying business data, storing business data, etc. The lines between the business nodes represent the order of the business process.
[0071] Optionally, the terminal obtains a business process diagram corresponding to the data to be verified, including: drawing a business process diagram based on the business scenario to which the data to be verified applies, wherein multiple reference business nodes in the business scenario are drawn as one business node in the business process diagram, and the multiple reference business nodes in the business scenario generate the same type of business data.
[0072] Among them, the multiple reference business nodes in the business scenario refer to the multiple reference business nodes in the business process corresponding to the business scenario. In the actual business scenario, due to the complexity of the business process corresponding to the business scenario, the business process often includes multiple reference business nodes, that is, multiple business nodes that generate the same type of business data. If the business process diagram is drawn according to the business nodes in the business process corresponding to the business scenario, the business process diagram will contain multiple business nodes that generate the same type of business data, resulting in too many branches of the business process diagram, and the business process diagram is large and complicated. Considering that the business data generated by multiple reference business nodes are of the same type, they can be verified by the same verification component later. Therefore, when drawing the business process diagram, multiple reference business nodes are drawn as one business node, which can reduce the branches of the business process diagram and simplify the business process diagram. And by drawing multiple reference business nodes as one business node, the verification component is configured for the business node later, which also leads to the same type of business data can be verified by one verification component, thereby reducing the number of configured verification components, improving the efficiency of verification work, and reducing labor costs.
[0073] Figure 3 This is a business process diagram provided by this application. Figure 3, this business flow chart is a loan business flow chart under the loan scenario of the bank. There are 9 loan data reconciliation nodes in the loan business flow chart. The loan data reconciliation node is a rectangular box marked with the content "Reconciliation result record table, add successful record". The content indicates that when the loan data corresponding to the loan data reconciliation node passes the verification, the record of successful data verification should be added to the reconciliation result record table. It should be noted that the 9 loan data reconciliation nodes from top to bottom correspond to the loan data of 11 different users. The loan data description of the first user is "short-term normal + long-term normal", indicating that the user has two loans, one of which is a short-term loan and the other is a long-term loan, and the repayment status of both loans is normal. The loan data description of the second user is "short-term 90-+long-term normal", indicating that the user has two loans, one of which is a short-term loan, and the repayment is overdue for less than 90 days. The other loan is a long-term loan and the repayment status is normal. The fourth user and the fifth user correspond to the same loan data reconciliation node. The fourth user's loan data is described as "short-term 90-partial settlement + long-term 90-partial settlement", indicating that the user has two loans, one of which is a short-term loan. The short-term loan is overdue for 90 days, and the overdue part of the bill is partially settled. The other loan of the user is a long-term loan. The long-term loan is overdue for 90 days, and the overdue part of the bill is partially settled. The fifth user's loan data is described as "short-term 90-overdue full settlement + long-term 90-overdue full settlement", indicating that the user has two loans, one of which is a short-term loan. The short-term loan is overdue for 90 days, and the overdue part of the bill is fully settled. The other loan of the user is a long-term loan. The long-term loan is overdue for 90 days, and the overdue part of the bill is fully settled. The sixth user's loan data is described as "short-term 90++long-term normal", indicating that the user has two loans, one of which is a short-term loan, and the repayment is overdue for more than 90 days. The other loan is a long-term loan, and the repayment status is normal. The description of the loan data of other users is also understood in the same way, and will not be repeated here. In addition, since the first nine users have two loans and the last two users have four loans, the first nine users correspond to one IOU file reconciliation node and the last two users correspond to one IOU file reconciliation node. The IOU file reconciliation node is a rectangular box marked with the content "The IOU file at the beginning of the day is updated to reconciliation success", indicating that if the IOU file at the beginning of the day of the corresponding user passes the verification, the IOU file at the beginning of the day is updated to reconciliation success.
[0074] Continue to refer Figure 3 It can be seen that since the loan data of 11 different users are involved, the number of loan data of different users is not exactly the same, resulting in the loan business process diagram containing 9 loan data reconciliation nodes, which leads to many branches and redundant content in the loan business process diagram. Each subsequent loan data reconciliation node needs to be configured with a data verification component, resulting in a large amount of data configuration work for data verification.
[0075] Figure 4 This is another business process diagram provided by this application. Figure 4 , this business process diagram is a Figure 3 Considering that the loan data of 11 users belong to different users, but they all belong to the same data type, that is, they are all loan data, therefore, Figure 3 The nine loan data reconciliation nodes in the Figure 3 The two loan document reconciliation nodes in the system are optimized into one loan document reconciliation node, thereby simplifying the business process diagram and reducing the number of business nodes in the business process diagram. In the future, only one data verification component of the loan data reconciliation node needs to be configured, and the loan data of multiple users can be verified through the verification component, thereby greatly reducing the number of configured verification components, which not only improves the efficiency of verification work, but also reduces labor costs.
[0076] Step S20, configuring a verification component and a verification parameter sequence at the service node, the verification component is used to verify a service data packet corresponding to the service node, the service data packet includes multiple service data to be verified, and the verification parameter sequence includes reference data of multiple service data to be verified.
[0077] The verification component can be called a verification action or a verification script. When the verification component is run, it can query business data from the database and obtain reference data corresponding to the business data, and then compare the business data with its reference data, thereby completing the verification of the business data.
[0078] Reference data is the verification standard of business data, which can also be called expected value. If the business data stored in the database is the same as its reference data, it means that the business data stored in the database is accurate.
[0079] Exemplarily, the multiple business data in the business data packet belong to the same data type, for example, the multiple business data are loan data in the loan business, or the multiple business data are product subscription data in the wealth management business, etc. Exemplarily, the multiple business data in the business data packet are multiple business data under a business interface, or multiple business data in the same business data table.
[0080] The verification parameter sequence is a sequence of reference data for recording business data, which includes an index number and an index content. Among them, an index number corresponds to an index position in the verification parameter sequence, and the index position is used to record the index content corresponding to the index number. Exemplarily, the reference data or the method for obtaining the reference data is recorded as the index content in the verification parameter sequence.
[0081] Exemplarily, the verification parameter sequence is in a list format or a dictionary format, which is not limited in the embodiments of the present application.
[0082] Exemplarily, each piece of business data in a business data packet includes multiple fields to be checked, and accordingly, the check parameter sequence includes a check parameter subsequence corresponding to each field, which is used to record reference data of the same field of multiple business data in the business data packet. For example, a business data packet includes three pieces of business data, and each piece of business data includes field 1 and field 2. The check parameter sequence includes a check parameter subsequence corresponding to field 1 and a check parameter subsequence corresponding to field 2. The check parameter subsequence corresponding to field 1 is used to record the reference data corresponding to field 1 of the three pieces of data. The check parameter subsequence corresponding to field 2 is used to record the reference data corresponding to field 2 of the three pieces of data.
[0083] Step S30, obtaining the service data from the service data packet through the verification component, and obtaining the reference data of the service data from the verification parameter sequence.
[0084] Exemplarily, the terminal establishes a connection with a database through a verification component, queries multiple pieces of service data in a service data packet from the database, and obtains multiple pieces of service data in batches, and obtains reference data of multiple pieces of service data in batches based on a verification parameter sequence.
[0085] Exemplarily, the terminal sequentially obtains the service data from the service data packet through the verification component, and sequentially obtains the reference data corresponding to the service data from the verification parameter sequence.
[0086] The verification component is configured with a data query condition, which is used to filter out the business data to be verified from the database. For example, the data query condition of the verification component configured by the above-mentioned business node is used to filter out multiple business data in the business data packet corresponding to the business node from the database. Alternatively, the data query condition is also used to filter out the target business data from the multiple business data for subsequent data verification. Alternatively, the data query condition is also used to filter out the target field from multiple fields in the multiple business data for data verification.
[0087] It can be seen from the above step S10 that the business process diagram in the present application is simplified, which leads to a reduction in the number of configured verification components, and further leads to a reduction in the configuration workload of data query conditions, thereby improving the work efficiency of data verification.
[0088] Step S40: verifying the business data based on the reference data of the business data.
[0089] Data validation is a verification operation performed to ensure the integrity and accuracy of data in the database.
[0090] Optionally, the terminal verifies the business data based on the reference data of the business data, including: the terminal compares the business data with its reference data through a verification component, and determines that the business data has passed the verification if the business data is consistent with the reference data of the business data; or determines that the business data has failed the verification if the business data is inconsistent with the reference data of the business data.
[0091] In the embodiment of the present application, since the reference data is accurate, the business data is consistent with the reference data, indicating that the business data is accurate. In this case, it is determined that the business data has passed the verification, which ensures the accuracy of the data verification result. The business data is inconsistent with the reference data of the business data, indicating that the business data is not accurate. In this case, it is determined that the business data has not passed the verification, which also ensures the accuracy of the data verification result.
[0092] Optionally, after verifying the service data packet corresponding to the service node, the data verification result of each service data in the service data packet is recorded in a verification result record table corresponding to the service node to facilitate subsequent query.
[0093] The data verification scheme provided in the present application obtains the business process diagram corresponding to the data to be verified, and for the business nodes in the business process diagram, not only the verification component is configured, but also the verification parameter sequence is configured. Since the verification component is used to verify the business data packet corresponding to the business node, the business data packet includes multiple business data to be verified, and the verification parameter sequence includes reference data of these multiple business data, the reference data of multiple business data in the data packet can be obtained from the verification parameter sequence through the verification component, thereby completing the verification of multiple business data. In other words, the data verification scheme in the present application only needs to configure a verification component and a verification parameter sequence for multiple business data under the same business node, and there is no need to configure a verification component for each business data, which greatly reduces the configuration workload of data verification, thereby improving the efficiency of verification work and reducing labor costs.
[0094] Based on the above first embodiment, a second embodiment of the present application is proposed. For the same or similar contents as the first embodiment, please refer to the above introduction and will not be described in detail later. Figure 5 In the second embodiment, the above step S30 includes steps S301 to S303:
[0095] Step S10, obtaining a business process diagram corresponding to the data to be verified, where the business process diagram includes at least one business node.
[0096] Step S20, configuring a verification component and a verification parameter sequence at the service node, the verification component is used to verify a service data packet corresponding to the service node, the service data packet includes multiple service data to be verified, and the verification parameter sequence includes reference data of multiple service data to be verified.
[0097] Step S301, obtaining the business data and the sequence number of the business data in the business data packet from the business data packet through the verification component.
[0098] The multiple business data in the business data packet have sequence numbers. For example, the business data packet has 3 business data, and the sequence numbers are 1, 2, and 3. Alternatively, the multiple business data in the business data packet are recorded in sequence, and the position of the business data in the business data packet is used as its sequence number. For example, the business data packet is a data table, and three business data are recorded from top to bottom. The sequence numbers of the three business data are determined according to the position sequence of the three business data. Then, the sequence numbers of the three business data from top to bottom are 1, 2, and 3 respectively.
[0099] Step S302: Use the serial number as an index number to determine the index position of the index number in the verification parameter sequence.
[0100] The verification parameter sequence includes multiple index numbers and index content corresponding to each index number. The multiple index numbers correspond to the sequence numbers of multiple business data in the business data packet. Therefore, by taking the sequence number of the business data as the index number and determining the index position of the index number in the verification parameter sequence, the index content in the index position can be obtained, that is, the reference data of the business data or the method for obtaining the reference data of the business data.
[0101] Step S303: Determine reference data of the business data based on the index content in the index position.
[0102] Due to different business processes, the reference data of different business data may be obtained in different ways, resulting in the index content recording the reference data of the business data, or its reference data acquisition interface, or the data relationship between its reference data and other data. Accordingly, based on the index content in the index position, the reference data of the business data is determined, including the following three situations:
[0103] (1) When the index content is reference data, the reference data is determined to be reference data corresponding to the business data.
[0104] Exemplarily, when the reference data is referred to as expected values, the reference data obtained in this manner may be referred to as database expected values.
[0105] (2) When the index content is a data interface, the data interface is called to obtain reference data corresponding to the business data.
[0106] Exemplarily, the terminal sends a reference data acquisition request to the data interface through a verification component, and then receives response information returned by the data interface, wherein the response information includes the reference data.
[0107] Exemplarily, when the reference data is referred to as an expected value, the reference data obtained through the data interface may be referred to as a message expected value.
[0108] (3) When the index content is a data relationship, the reference data corresponding to the business data is determined based on the data involved in the data relationship and the data relationship, wherein the data relationship is the relationship between the reference data of the business data and other data.
[0109] Exemplarily, when the reference data is referred to as expected values, the reference data obtained in this manner may be referred to as database expected values.
[0110] For example, the data relationship is: reference data = data A + data B + data C, then in addition to the reference data, the data involved in the data relationship includes data A, data B and data C. Accordingly, the terminal obtains data A, data B and data C through the verification component, and calculates the reference data based on the obtained data and the data relationship.
[0111] In the embodiment of the present application, the sequence number of the business data in the business data packet is used as the index number through the verification component, the index position of the index number in the verification parameter sequence is determined, and the reference data of the business data is determined based on the index content in the index position. This method of flexibly transferring the reference data of multiple business data to the verification component through the verification parameter sequence and completing the verification of multiple business data in batches through one verification component greatly improves the efficiency of data verification.
[0112] Optionally, the service data includes multiple fields, and the service data is verified in units of fields. The verification parameter sequence includes multiple verification reference subsequences, each verification parameter subsequence corresponds to a field, and is used to record reference data of multiple service data in the field in the service data packet.
[0113] Accordingly, in the above step S302, the serial number is used as the index number to determine the index position of the index number in the verification parameter sequence, including: for the target field in the business data, the verification parameter subsequence corresponding to the target field is determined, and the serial number is used as the index number to determine the index position of the index number in the verification parameter subsequence. Accordingly, in the above step S303, the reference data of the business data is determined based on the index content in the index position, including: based on the index content in the index position, the reference data of the target field is determined. The target field is any field in the business data.
[0114] In an embodiment of the present application, by configuring a verification parameter subsequence corresponding to each field, for any business data in a business data packet, the verification component can obtain the reference data corresponding to each field of the business data based on the sequence number of the business data and using the verification parameter subsequence index, thereby enabling the verification of multiple fields of multiple business data in a business data packet to be completed through one verification component.
[0115] Step S40: verifying the business data based on the reference data of the business data.
[0116] In an embodiment of the present application, a verification component and a verification parameter sequence are configured for a service node, so that when the verification component obtains any service data in a service data packet, it can use the verification parameter sequence based on the sequence number of the service data to index and obtain the reference data corresponding to the service data, thereby being able to complete the verification of multiple service data in the service data packet through one verification component. In the related art, a verification component is configured for each service data, and the reference data of the service data is written into the verification component as a fixed parameter. Then, the reference data in the verification component needs to be modified for each service data, that is, each service data needs to be separately configured with a verification component, and the configuration workload of data verification is large.
[0117] Exemplarily, in an embodiment of the present application, for reference data that has no difference in multiple business data, for example, the reference data of a certain field of multiple business data is the same, the reference data can also be written into the verification component in the form of fixed parameters, thereby improving the verification efficiency of the verification component.
[0118] One thing that needs to be explained is that when the test case based on the flowchart is connected to the data verification component of the automated test, due to different business processes, the number of business data that needs to be verified in the same data table in the database is different. When drawing the business process diagram, these different numbers of business data will be assigned to different diagram nodes (that is, business nodes in the business process diagram), and verification components with different numbers of data will be bound. The problem is that the drawn business process diagram has many branches, the verification components are repeated, and the connection automation is complex and redundant.
[0119] The present application provides an automated verification optimization solution based on a flowchart. The business process diagram modeling ideas and automated configuration ideas are as follows: When modeling a business process diagram, first establish a model based on the business process and development design processing logic, and give the expected value of the business data tested under the path at one or more nodes where the business finally ends. Due to the complexity of the business scenario, the number of outputs of the expected value is different, and multiple flowchart nodes are required to represent it. The embodiment of the present application takes into account that the business data of multiple paths belong to the same type, and their expected values also belong to the same type, so the business process diagram is optimized into a branch to reduce the process nodes generated by different business processes. And configure a multi-package verification component on a graph node to verify multiple business data. Among them, multiple packages refer to multiple business data under a data interface, or multiple business data in a data table.
[0120] The embodiments of the present application achieve at least the following technical effects:
[0121] 1. Reduce the complexity of the business process diagram: optimize the business process diagram into a branch to reduce the number of business nodes generated by different business processes.
[0122] 2. Reduce configuration workload: There is no need to repeatedly configure multiple verification components for the verification of multiple business data. That is, there is no need to modify the query conditions and expected values of the verification components for each business data. Only one verification component is needed to complete the verification of multiple business data in the same table, which greatly reduces the duplication of work in connecting to automatic verification components.
[0123] 3. Improve data verification efficiency: There is no need to connect to the database once for each business data. Instead, the verification component is used to connect to the database and then batch obtain business data for data verification, which reduces the number of database connections and improves the efficiency of automatic verification. The verification of a single business data is reduced from nearly 20 seconds to 10 seconds, doubling the efficiency.
[0124] Another point that needs to be explained is that the above examples are only used to understand the present application and do not constitute a limitation on the data verification method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0125] This application also provides a data verification device, please refer to Figure 6 , the data verification device comprises:
[0126] A flow chart acquisition module 10 is used to acquire a business flow chart corresponding to the data to be verified, where the business flow chart includes at least one business node;
[0127] A component configuration module 20, configured to configure a verification component and a verification parameter sequence in a service node, wherein the verification component is used to verify a service data packet corresponding to the service node, the service data packet includes a plurality of service data to be verified, and the verification parameter sequence includes reference data of a plurality of service data to be verified;
[0128] The data acquisition module 30 acquires the service data from the service data packet through the verification component, and acquires the reference data of the service data from the verification parameter sequence;
[0129] The data verification module 40 is used to verify the business data based on the reference data of the business data.
[0130] Optionally, the data acquisition module 30 includes:
[0131] A sequence number acquisition unit, used to acquire the business data and the sequence number of the business data in the business data packet from the business data packet through the verification component;
[0132] A position index unit, used to use the sequence number as an index number to determine the index position of the index number in the verification parameter sequence;
[0133] The data determination unit is used to determine the reference data of the business data based on the index content in the index position.
[0134] Optionally, the data determination unit includes at least one of the following:
[0135] A first determining subunit, configured to determine the reference data as reference data corresponding to the business data when the index content is reference data;
[0136] The second determining subunit is used to call the data interface to obtain reference data corresponding to the business data when the index content is a data interface;
[0137] The third determination subunit is used to determine the reference data corresponding to the business data based on the data involved in the data relationship and the data relationship when the index content is a data relationship, wherein the data relationship is the relationship between the reference data of the business data and other data.
[0138] Optionally, a position index unit is used to determine, for a target field in the business data, a verification parameter subsequence corresponding to the target field, where the target field is any field in the business data; and to determine an index position of the index number in the verification parameter subsequence by using the sequence number as an index number;
[0139] The data determination unit is used to determine the reference data of the target field based on the index content in the index position.
[0140] Optionally, the flowchart acquisition module 10 is used to draw a business flowchart based on the business scenario to which the data to be verified is applied; wherein, multiple reference business nodes in the business scenario are drawn as one business node in the business flowchart, and the multiple reference business nodes in the business scenario generate the same type of business data.
[0141] Optionally, the data verification module 40 is used to determine that the business data has passed the verification when the business data is consistent with the reference data of the business data; or to determine that the business data has not passed the verification when the business data is inconsistent with the reference data of the business data.
[0142] The data verification scheme provided in the present application obtains the business process diagram corresponding to the data to be verified, and for the business nodes in the business process diagram, not only the verification component is configured, but also the verification parameter sequence is configured. Since the verification component is used to verify the business data packet corresponding to the business node, the business data packet includes multiple business data to be verified, and the verification parameter sequence includes reference data of these multiple business data, the reference data of multiple business data in the data packet can be obtained from the verification parameter sequence through the verification component, thereby completing the verification of multiple business data. In other words, the data verification scheme in the present application only needs to configure a verification component and a verification parameter sequence for multiple business data under the same business node, and there is no need to configure a verification component for each business data, which greatly reduces the configuration workload of data verification, thereby improving the efficiency of verification work and reducing labor costs.
[0143] The data verification device provided by the present application adopts the data verification method in the above embodiment, which can solve the technical problem that data verification in the related technology relies on a large amount of configuration work, resulting in low efficiency of data verification work and high labor cost. Compared with the prior art, the beneficial effects of the data verification device provided by the present application are the same as the beneficial effects of the data verification method provided by the above embodiment, and other technical features in the data verification device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0144] The present application provides a data verification device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data verification method in the above-mentioned embodiment one.
[0145] Reference below Figure 7, which shows a schematic diagram of the structure of a data verification device suitable for implementing an embodiment of the present application. The data verification device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The data verification device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0146] like Figure 7 As shown, the data verification device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data verification device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data verification device to communicate with other devices wirelessly or by wire to exchange data. Although the data verification device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0147] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0148] The data verification device provided by the present application adopts the data verification method in the above embodiment, which can solve the technical problem that data verification in the related technology relies on a large amount of configuration work, resulting in low efficiency of data verification work and high labor cost. Compared with the prior art, the beneficial effects of the data verification device provided by the present application are the same as the beneficial effects of the data verification method provided by the above embodiment, and the other technical features in the data verification device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0149] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0150] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0151] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data verification method in the above-mentioned embodiment.
[0152] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0153] The computer-readable storage medium may be included in the data verification device; or may exist independently without being assembled into the data verification device.
[0154] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the data verification device, the data verification device: obtains a business process diagram corresponding to the data to be verified, and the business process diagram includes at least one business node; configures a verification component and a verification parameter sequence at the business node, and the verification component is used to verify the business data packet corresponding to the business node, the business data packet includes multiple business data to be verified, and the verification parameter sequence includes reference data of multiple business data to be verified; obtains business data from the business data packet through the verification component, and obtains reference data of the business data from the verification parameter sequence; and verifies the business data based on the reference data of the business data.
[0155] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0156] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0157] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0158] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data verification method, and can solve the technical problems that data verification in the related art relies on a large amount of configuration work, resulting in low efficiency of data verification work and high labor costs. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the data verification method provided by the above-mentioned embodiment, and will not be repeated here.
[0159] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data verification method when executed by a processor.
[0160] The computer program product provided by the present application can solve the technical problem that data verification in the related art relies on a large amount of configuration work, resulting in low efficiency of data verification work and high labor costs. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the data verification method provided by the above embodiment, and will not be repeated here.
[0161] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A data verification method, characterized in that: The method comprises: Obtaining a business process diagram corresponding to the data to be verified, wherein the business process diagram includes at least one business node; Configure a verification component and a verification parameter sequence on the service node, wherein the verification component is used to verify a service data packet corresponding to the service node, the service data packet includes a plurality of service data to be verified, and the verification parameter sequence includes reference data of the plurality of service data to be verified; Acquiring the service data from the service data packet and acquiring reference data of the service data from the verification parameter sequence through the verification component; The business data is verified based on the reference data of the business data.
2. The method according to claim 1, characterized in that The obtaining of the service data from the service data packet through the verification component, and obtaining reference data of the service data from the verification parameter sequence, comprises: Obtaining the service data and the sequence number of the service data in the service data packet from the service data packet through the verification component; Using the sequence number as an index number, determining an index position of the index number in the verification parameter sequence; Based on the index content in the index position, reference data of the business data is determined.
3. The method according to claim 2, characterized in that The determining, based on the index content in the index position, the reference data of the business data comprises at least one of the following: In a case where the index content is reference data, determining the reference data as reference data corresponding to the business data; In the case where the index content is a data interface, calling the data interface to obtain reference data corresponding to the business data; In the case where the index content is a data relationship, the reference data corresponding to the business data is determined based on the data involved in the data relationship and the data relationship, wherein the data relationship is the relationship between the reference data of the business data and other data.
4. The method according to claim 2, characterized in that The using the sequence number as an index number and determining an index position of the index number in the verification parameter sequence includes: For a target field in the business data, determining a verification parameter subsequence corresponding to the target field, the target field being any field in the business data; Using the sequence number as an index number, determining an index position of the index number in the verification parameter subsequence; The determining the reference data of the business data based on the index content in the index position includes: Based on the index content in the index position, reference data of the target field is determined.
5. The method according to claim 1, characterized in that The obtaining of the business process diagram corresponding to the data to be verified includes: Draw a business process diagram based on the business scenario to which the data to be verified is applied; Among them, the multiple reference business nodes in the business scenario are drawn as one business node in the business process diagram, and the multiple reference business nodes in the business scenario generate the same type of business data.
6. The method according to claim 1, characterized in that The verifying the business data based on the reference data of the business data includes: If the business data is consistent with the reference data of the business data, determining that the business data passes the verification; or, In a case where the business data is inconsistent with the reference data of the business data, it is determined that the business data has failed verification.
7. A data verification device, characterized in that: The device comprises: A flow chart acquisition module, used to acquire a business flow chart corresponding to the data to be verified, wherein the business flow chart includes at least one business node; A component configuration module, configured to configure a verification component and a verification parameter sequence at the service node, wherein the verification component is used to verify a service data packet corresponding to the service node, the service data packet includes a plurality of service data to be verified, and the verification parameter sequence includes reference data of the plurality of service data to be verified; A data acquisition module, which acquires the service data from the service data packet through the verification component, and acquires reference data of the service data from the verification parameter sequence; The data verification module is used to verify the business data based on the reference data of the business data.
8. A data verification device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data verification method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data verification method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data verification method according to any one of claims 1 to 6 are implemented.