CN114943100A - Data verification method, apparatus, device, medium, and program product - Google Patents

Data verification method, apparatus, device, medium, and program product Download PDF

Info

Publication number
CN114943100A
CN114943100A CN202210644009.0A CN202210644009A CN114943100A CN 114943100 A CN114943100 A CN 114943100A CN 202210644009 A CN202210644009 A CN 202210644009A CN 114943100 A CN114943100 A CN 114943100A
Authority
CN
China
Prior art keywords
verification
program
data
report
checking
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210644009.0A
Other languages
Chinese (zh)
Inventor
张利文
翁迎旭
马潇俊
杨依宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210644009.0A priority Critical patent/CN114943100A/en
Publication of CN114943100A publication Critical patent/CN114943100A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure provides a data verification method, a data verification device, an electronic device, a storable medium and a program product, relates to the technical field of computers, and can be applied to the technical field of finance. The data verification method comprises the following steps: according to the report configuration information, determining report data to be verified; determining a check rule program corresponding to report data to be checked according to the incidence relation between the check rule configuration information and the report configuration information; and responding to the determined checking rule program, calling the checking rule program according to the checking main program to obtain the checking program, checking the report data to be checked, and obtaining a target checking result. The data verification method disclosed by the embodiment of the disclosure has higher data verification efficiency.

Description

Data verification method, apparatus, device, medium, and program product
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of data processing technologies, and more particularly, to a data verification method, apparatus, device, medium, and program product.
Background
Data verification has important significance for data reporting and the like, most of the existing data verification modes are that data to be verified are verified through a verification program, for example, when a verification rule needs to be modified, the whole verification program needs to be changed, so that the reusability of the verification program is poor, the maintenance and development are difficult, and the data verification efficiency is low.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a data verification method, apparatus, device, medium, and program product that improve data verification efficiency.
According to a first aspect of the present disclosure, there is provided a data verification method, including: according to the report configuration information, determining report data to be verified; determining a check rule program corresponding to report data to be checked according to the incidence relation between the check rule configuration information and the report configuration information; and responding to the determined checking rule program, calling the checking rule program according to the checking main program to obtain the checking program, checking the report data to be checked, and obtaining a target checking result.
According to the embodiment of the disclosure, the corresponding checking rule programs of the report data to be checked comprise a plurality of programs, the checking of the report data to be checked and the obtaining of the target checking result comprise: calling each checking rule program respectively according to the checking main program to obtain a plurality of checking programs, checking report data to be checked, and obtaining a plurality of initial checking results; respectively checking report data to be checked according to a plurality of checking programs to obtain a plurality of initial checking results; and calculating the plurality of initial verification results according to the association relations of the plurality of verification rule programs to obtain a target verification result, wherein the association relations of the plurality of verification rule programs comprise at least one of the following relations: and, or.
According to the embodiment of the disclosure, the report configuration information includes at least one verification expected value, the verifying the report data to be verified, and the obtaining of the target verification result includes: running a checking program to check the report data to be checked to obtain running result data; and comparing the operation result data with the verification expected value according to the verification program to obtain a target verification result, wherein the target verification result comprises a verification pass and a verification fail, when the operation result data is consistent with the verification expected value, the target verification result is a verification pass, and when the operation result data is inconsistent with the verification expected value, the target verification result is a verification fail.
According to the embodiment of the disclosure, the report data to be verified comprises at least one cell to be verified, the report data to be verified is verified, and the obtaining of the target verification result comprises: determining whether to cache the check rule program according to the cache marks, wherein the cache marks comprise a cacheable mark and a non-cacheable mark; and responding to the cache mark as a cacheable mark, calling a cached verification rule program according to the verification main program to obtain a verification program, sequentially verifying each cell to be verified to obtain a target verification result of each cell to be verified, or responding to the cache mark as a non-cacheable mark, calling the verification rule program in real time according to the verification main program to obtain the verification program, and sequentially verifying each cell to be verified to obtain a target verification result of each cell to be verified.
According to the embodiment of the disclosure, the report configuration information is separated from the check rule configuration information, the check rule program is separated from the check main program, the report configuration information, the check rule configuration information and the check rule program all include associated identifiers, and the determining of the check rule program corresponding to the report data to be checked according to the association relationship between the check rule configuration information and the report configuration information includes: determining a corresponding checking rule program of the report data to be checked according to the same associated identifier, wherein the associated identifier at least comprises one of the following: report form identification, check rule identification and check rule program identification.
According to the embodiment of the present disclosure, the initial verification result includes pass verification and fail verification, and the data verification method further includes: recording an initial verification result which is not verified and a target verification result which is not verified to obtain prompt data; and generating report prompting information according to the prompting data.
A second aspect of the present disclosure provides a data verification apparatus, including: the report form verification system comprises a report form data to be verified determining module, a verification rule program determining module and a verification module.
The report data to be verified determining module is used for determining the report data to be verified according to the report configuration information; the verification rule program determining module is used for determining a verification rule program corresponding to report data to be verified according to the association relation between the verification rule configuration information and the report configuration information; and the checking module is used for responding to the determined checking rule program, calling the checking rule program according to the checking main program to obtain the checking program, checking the report data to be checked and obtaining a target checking result.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the above-described data verification method.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described data verification method.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described data verification method.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a data verification method, apparatus, device, medium and program product according to embodiments of the disclosure;
FIG. 2 schematically illustrates a flow diagram of a data verification method according to an embodiment of the present disclosure;
fig. 3 schematically shows a flowchart of operation S230 according to an embodiment of the present disclosure;
fig. 4 schematically shows a flowchart of operation S230 according to another embodiment of the present disclosure;
fig. 5 schematically shows a flowchart of operation S230 according to a further embodiment of the present disclosure;
fig. 6 schematically shows a flowchart of operation S220 according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates a flow diagram of a data verification method according to another embodiment of the present disclosure;
fig. 8 schematically shows a block diagram of a data verification apparatus according to an embodiment of the present disclosure; and
FIG. 9 schematically illustrates a block diagram of an electronic device suitable for implementing a data verification method in accordance with an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The report records a plurality of data in a table form, and the report data verification can be understood as a verification operation for ensuring the integrity of the report data. The report data verification relates to various industries such as finance, and the financial industry is exemplified below.
For example, with the continuous development of banking and financial services, more and more business data need to be reported to a business system in a report form for supervision by an upper-level department, different cells of different reports have different verification rules, and as long as the filled business data does not meet the verification rules, the report data cannot be reported successfully.
Most of business systems write the check rule logics of different reports into a program one by one, and when different reports are subjected to reporting operation, the corresponding check rules are matched to start checking the cells one by one.
Because the business system writes all the check rules in the program, when the report template needs to be replaced or the check rules of some cells need to be changed, the whole check program needs to be changed, which is time-consuming, labor-consuming and high in development cost. In addition, along with diversification of report templates and complicated check rules, check programs are more and more bloated, and subsequent development and maintenance are not convenient.
It should be noted that the data verification method and apparatus in the embodiments of the present disclosure may be used in the financial field, and may also be used in any field other than the financial field.
It should be noted that, in the technical solution of the present disclosure, the processes of collecting, storing, using, processing, transmitting, providing, disclosing and applying the personal information of the related users all conform to the regulations of the related laws and regulations, and necessary security measures are taken without violating the customs of the public order.
Fig. 1 schematically shows an application scenario diagram of a data verification method according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the data verification method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the data verification apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The data verification method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Correspondingly, the data verification apparatus provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The data verification method according to the embodiment of the present disclosure will be described in detail below with reference to fig. 2 to 7 based on the scenario described in fig. 1.
Fig. 2 schematically shows a flow chart of a data verification method according to an embodiment of the present disclosure.
As shown in fig. 2, the data verification method 200 of this embodiment includes operations S210 to S230.
In operation S210, report data to be verified is determined according to the report configuration information.
Report configuration information may be understood as configurable, report related information. The report comprises a plurality of data, at least a part of the data of the report needs to be checked, and the report configuration information can comprise information for determining the report data to be checked. For example, in one example, a report with 100 rows x 5 columns (the first row to the first hundred rows, the first column to the fifth column), the data to be verified (i.e., the report data to be verified) includes data with 100 rows x 2 columns (the first column and the second column), and the report configuration information may include information representing the first row to the first hundred rows and the first column to the second column.
In operation S220, a verification rule program corresponding to the report data to be verified is determined according to the association relationship between the verification rule configuration information and the report configuration information.
The verification rule configuration information may be understood as configurable, verification rule related information. The verification rules may be different for different reports. For example, the verification rules of report S1 include: whether the digit of the report data to be verified is 11 digits or not is judged, and the verification rule of the report S2 comprises the following steps: whether the integer number of the report data to be checked is 5 bits or not and whether the decimal number of the report data to be checked is 3 bits or not.
The check rule procedure can be understood as: the method can realize the program for verifying the report data to be verified according to the verification rule.
In operation S230, in response to determining the verification rule program, the verification program obtained by calling the verification rule program according to the verification main program verifies the report data to be verified, and obtains a target verification result.
The verification main program may be understood as a program applicable to different verification rule programs, similar to the template portion. When the report data to be verified is verified, the verification main program can call the verification rule program to obtain a complete verification program, and the complete verification program verifies the report data to be verified to obtain a target verification result.
The data verification method of the embodiment of the disclosure supports configuring report configuration information to adapt to the to-be-verified data of the variable report, and also supports configuring verification rule configuration information to adapt to the variable verification rule (the verification rule can determine the verification rule program capable of realizing the corresponding verification rule), so that the to-be-verified report data and the verification rule can be adjusted and adapted, and the data verification efficiency is higher. The data verification method of the embodiment of the disclosure can also reuse a verification main program and a verification rule program, and the report data to be verified can be verified according to different verification rules by changing the verification rule program, and meanwhile, the verification program is simpler, is convenient for subsequent development and maintenance, and has higher data verification efficiency.
It should be noted that when the report to be verified is determined, the to-be-verified report data of the report may be determined at the same time, and the report configuration information may represent information of the to-be-verified report data. For example, when the report S3 needing to be checked is determined, the report data to be checked can be synchronously determined to be 30 rows × 2 columns (the first row to the thirtieth row, and the first column to the second column) of the report S3. For example, the report configuration information may be in the form of a data table, and two fields are respectively set to store a row number (in the example of the report S3, the row number may be represented as 1 to 30) and a column number (in the example of the report S3, the column number may be represented as 1 to 2).
Fig. 3 schematically shows a flowchart of operation S230 according to an embodiment of the present disclosure. According to the data verification method disclosed by the embodiment of the disclosure, the corresponding verification rule program of the report data to be verified can comprise a plurality of programs.
The corresponding checking rule program of the report data to be checked comprises a plurality of programs which can be understood as follows: the report data to be verified needs to be verified according to a plurality of verification rules, namely, the report data to be verified is verified through a plurality of corresponding verification rule programs.
As shown in fig. 3, the verifying the report data to be verified in operation S230 to obtain the target verification result may include: operation S31-operation S33.
In operation S31, each verification rule program is called according to the verification main program, and a plurality of verification programs are obtained.
Operation S32, according to the multiple verification procedures, respectively verifying the report data to be verified, and obtaining multiple initial verification results.
In operation S33, the multiple initial verification results are computed according to the association relationship of the multiple verification rule programs, so as to obtain a target verification result.
Wherein, the association relationship of the plurality of check rule programs may include at least one of the following: and, or.
Illustratively, when the report data D1 to be checked is checked according to the check rule R1 and the check rule R2, the check program CP1 obtained by calling the check rule program RP1 (the check rule R1 corresponds to the check rule program CP1) according to the check main program MP may be obtained, the check program CP2 obtained by calling the check rule program RP2 (the check rule R2 corresponds to the check rule program CP2) according to the check main program MP may be obtained, and the report data D1 to be checked is checked according to the check program CPI and the check program CP2, so as to obtain the initial check result RE1 and the initial check result RE 2. When the association relationship between the check rule R1 and the check rule R2 is "and", the association relationship between the check rule program RP1 and the check rule program RP2 is also "and", and an and operation is performed on the initial check result RE1 and the initial check result RE2, so that a target check result T1 can be obtained. For example, if the initial check result RE1 is not verified, and the initial check result RE2 is verified, the target check result T1 is not verified.
According to the data verification method, on one hand, a plurality of verification rule programs can be combined, and the method is suitable for more complex report data verification conditions. On the other hand, the check rule program can be understood as a decoupled minimum program segment capable of realizing a certain check rule, so that development and maintenance are facilitated.
Fig. 4 schematically shows a flowchart of operation S230 according to yet another embodiment of the present disclosure. According to the data verification method disclosed by the embodiment of the disclosure, the report configuration information can further comprise at least one verification expected value.
As shown in fig. 4, the verifying the report data to be verified in operation S230 to obtain the target verification result may further include operations S34 to S35.
In operation S34, the verification program is run to verify the report data to be verified, so as to obtain run result data.
In operation S35, the report data to be verified is compared with the expected verification value according to the verification procedure, so as to obtain a target verification result.
The target verification result comprises a pass verification result and a fail verification result, when the operation result data is consistent with the expected verification value, the target verification result is a pass verification result, and when the operation result data is inconsistent with the expected verification value, the target verification result is a fail verification result.
The running result data can be understood as running a verification program, and data with the same attribute as the verification expected value is obtained after the report data to be verified is verified. The operation result data can be used for comparing with the verification expected value to obtain a target verification result.
The expression "the operation result data is identical to the expected verification value" means that the operation result data corresponds to the expected verification value. In some cases, the running result data is within the range of the expected verification value, and the report data to be verified can be considered to be consistent with the expected verification value. In some cases, the running result data is the same as the expected verification value, and the report data to be verified can be considered to be consistent with the expected verification value.
For example, when the report data D2 to be verified is a numerical value including an integer digit and a decimal digit, and the integer digit and the decimal digit of the report data D2 to be verified are verified, the verification program may be run to verify the report data to be verified, the obtained running result data includes the integer digit and the decimal digit of the report data D2 to be verified, the running result data, which is the integer digit of the report data D2 to be verified, is compared with the expected verification value E1 corresponding to the integer digit, the running result data, which is the decimal digit of the report data D2 to be verified, is compared with the expected verification value E2 corresponding to the decimal digit, and the target verification result T2 is obtained.
According to the data verification method, the running result data and the verification expected value of the report configuration information are compared, so that the report data to be verified can be simply, conveniently and quickly verified, and the target verification result is obtained.
Fig. 5 schematically illustrates a flowchart of operation S230 according to another embodiment of the present disclosure. According to the data verification method disclosed by the embodiment of the disclosure, the report data to be verified can comprise at least one cell to be verified.
"cell to be verified" is understood to mean the data in the cell to be verified. A report may include a plurality of cells to be verified, and the verification rules of different cells to be verified may be different, so that the verification program obtained by calling different verification rule programs according to the verification main program may be used to verify different cells to be verified.
As shown in FIG. 5, the verifying the report data to be verified in operation S230 to obtain the target verification result may include operations S36-S37.
In operation S36, it is determined whether to cache the check rule program according to the cache flag.
The cache mark comprises a cacheable mark and a non-cacheable mark, and the check rule configuration information can report the cache mark.
In some cases, the report needing to be verified is determined, and the operation of determining the report needing to be verified is separated from the operation of verifying the report data to be verified. For example, one party determines the report Si-Sj needing to be checked in real time, and the other party checks the report data to be checked determined by the report Si-Sj. At this time, the cache flag is an uncacheable flag, avoiding the following: at the current moment, a certain report Ss is determined as a report needing to be checked, the data of the report to be checked of the report Ss are checked according to the cached checking rule program, and at the next moment, the report Ss is determined as not belonging to the report needing to be checked.
In operation S37, in response to the cache flag being a cacheable flag, the cached check rule program is invoked according to the check main program to obtain a check program, and each cell to be checked is checked in sequence to obtain a target check result of each cell to be checked, or, in response to the cache flag being a non-cacheable flag, the check program obtained according to the check main program is invoked in real time to check each cell to be checked in sequence to obtain a target check result of each cell to be checked.
According to the data verification method disclosed by the embodiment of the disclosure, when the cache mark is a cacheable mark, the verification rule program Pi of the current cell Ci to be verified is cached, and when another cell Cj to be verified is verified and the verification rule program Pj of the cell Cj to be verified is the same as the verification rule program Pi of the cell Ci to be verified, the cached verification rule program Pi can be called by the verification main program, so that the data verification speed and the data verification efficiency are improved.
Fig. 6 schematically shows a flowchart of operation S220 according to an embodiment of the present disclosure. According to the data verification method disclosed by the embodiment of the disclosure, the report configuration information is separated from the verification rule configuration information, the verification rule program is separated from the verification main program, and the report configuration information, the verification rule configuration information and the verification rule program all comprise associated identifiers.
As shown in fig. 6, the determining, according to the association relationship between the checking rule configuration information and the report configuration information in operation S220, the checking rule program corresponding to the report data to be checked may include: operation S21.
In operation S21, according to the same association identifier, a verification rule program corresponding to the report data to be verified is determined.
Wherein the association identifier at least comprises one of the following: report identification, check rule identification and check rule program identification.
The report configuration information and the check rule configuration information are separated and can be understood as independently configurable report configuration information and independently configurable check rule configuration information, and the report configuration information and the check rule configuration information can be associated according to the association identifier. The separation of the verification rule program from the verification main program can be understood as an independent development and verification main program and an independent development and verification rule program.
According to the data verification method, the report configuration information and the verification rule configuration information can be configured independently by separating the report configuration information and the verification rule configuration information, and the verification rule can be established flexibly and quickly. The overall verification logic of the report data to be verified can be flexibly and quickly changed by separating the verification rule program and the verification main program.
For example, when the association identifier includes both the report identifier and the check rule identifier, the report configuration information and the check rule configuration information may include: and (5) report identification. The verification rule configuration information and the verification rule program may include: the rule identification is checked. The related report configuration information and the related check rule configuration information can be determined through the same report identifier, and the related check rule configuration information and the related check rule program can be determined through the same check rule identifier.
Illustratively, according to the data verification method of another embodiment of the present disclosure, the initial verification result may include a pass verification and a fail verification, and the data verification method may further include: recording the initial verification result which is not verified and the target verification result which is not verified to obtain prompt data, and generating report prompt information according to the prompt data.
According to the data verification method, the prompt data is obtained by recording the target verification result and the initial verification result which are not verified, the report prompt information generated according to the prompt data can be fed back to related personnel, and the report can be re-filled, reported and verified.
Illustratively, according to a data verification method of another embodiment of the present disclosure, the report configuration information may include: the number of the rows of the cells to be verified of the report and the number of the columns of the cells to be verified of the report. The verification rule configuration information may include: and checking the rule program. The report configuration information and the check rule configuration information are in a data table form.
For example, at least one cell to be verified may be determined according to the number of rows of cells to be verified of the report and the number of columns of cells to be verified of the report, for example, a plurality of cells to be verified may be determined with the number of rows Y of cells n-m (n is less than m) and/or the number of columns X of cells i-s (i is less than s). A specific cell to be verified may also be determined by the cell row number Y ═ r and the cell column number X ═ f.
For example, when the length of the check rule program is short (for example, the check rule program has only one row), the check rule program may be stored in the data table in which the check rule configuration information is located. When the length of the check rule program is long, the check rule program and the check rule configuration program can be stored separately.
Illustratively, the verification rule configuration information may further include verification rule description information, so that a relevant person can know the verification rule according to the verification rule description information.
A data verification method 300 of a further embodiment of the present disclosure will be described below in conjunction with fig. 7.
As shown in fig. 7, in operation S301, report data to be verified is determined according to the report configuration information. For example, for a report St including data in the first row to the first hundred rows and the first column to the eighth column (i.e., 100 × 8 report data), the data in the first row to the first hundred rows and the first column to the third column of the report St need to be checked, the report configuration information may include: line number: 1-100, number of columns: 1-3. According to the report configuration information, the data in the cells from the first row to the first hundred rows and from the first column to the third column can be determined as the cells to be verified (report data to be verified). In operation S302, each cell to be checked of the report data to be checked may be read sequentially (for example, in an order of increasing the number of rows and increasing the number of columns sequentially). The following will exemplify that a certain cell Ct to be verified needs to be verified at the current time. Operation S303, sequentially reading the configuration information of the verification rule according to the association relationship between the configuration information of the verification rule and the configuration information of the report. For example, the same report form identifier is used as the associated identifier, and the check rule configuration information is determined according to the report form configuration information. In operation S304, since the check rule configuration information is determined in operation S303, the check rule program Pt corresponding to the cell Ct to be checked may be determined, for example, through the check rule identifier of the check rule configuration information that is the same as that of the check rule program. In operation S305, it is determined whether the check rule program Pt is cached according to the cache flag. If the cache flag is a cacheable flag, the check rule program may be read from the cache (as in operation S306 in fig. 7). If the cache flag is a non-cacheable flag, the check rule program may be read from the database and cached as in operation S307 (operation S308). When the verification rule program includes a plurality of verification programs, in operation S309, the cells to be verified are verified according to the plurality of verification programs obtained by calling each verification rule program from the verification main program, so as to obtain a plurality of initial verification results. A target verification result may also be determined from the plurality of initial verification results. The specific verification method may be: and comparing the cell Ct to be checked with the expected check value. In operation S310, it is determined whether the initial verification result passes the verification, and if the verification fails, the initial verification result that fails the verification may be recorded as in operation S311. When the initial check result passes, it may be determined, as in operation S312, whether all the check programs corresponding to the multiple check rule programs are checked to be completed (for example, it is necessary to check the to-be-checked cells Ct according to the check rule program RP1, the check program CPI corresponding to the check rule program RP2, and the check program CP2, and if the check on the to-be-checked cells Ct is completed only by the check program CP1, the check is not completed), and when all the check programs corresponding to the multiple check rule programs are checked to be completed, it may be determined, as in operation S313, whether each to-be-checked cell of the to-be-checked report data is checked to be completed (for example, it is necessary to check 30 to-be-checked cells of the to-be checked report data, and if only the first 15 to-be checked cells are verified, the check is not completed).
Based on the data verification method, the disclosure also provides a data verification device. The apparatus will be described in detail below with reference to fig. 8.
Fig. 8 schematically shows a block diagram of a data verification apparatus according to an embodiment of the present disclosure.
As shown in fig. 8, the data verification apparatus 400 of this embodiment includes a to-be-verified report data determination module 410, a verification rule program determination module 420, and a verification module 430.
And the to-be-verified report data determining module 410 is configured to determine the to-be-verified report data according to the report configuration information. In an embodiment, the to-be-verified report data determining module 410 is configured to perform the operation S210, which is not described herein again.
And the checking rule program determining module 420 is configured to determine a checking rule program corresponding to the report data to be checked according to the association relationship between the checking rule configuration information and the report configuration information. In an embodiment, the check rule program determining module 420 is configured to perform the operation S220, which is not described herein again.
And the checking module 430 is configured to respond to the determination of the checking rule program, call the checking rule program according to the checking main program to obtain a checking program, check the report data to be checked, and obtain a target checking result. In an embodiment, the checking module 430 is configured to perform the operation S230, which is not described herein again.
According to the data verification device of the embodiment of the disclosure, the corresponding verification rule program of the report data to be verified comprises a plurality of verification rule programs, and the verification module may include: the report data to be verified is verified, and the target verification result is obtained by the method comprising the following steps: the system comprises a calling submodule, a checking submodule and an operation submodule.
And the calling sub-module can be used for calling each checking rule program respectively according to the checking main program to obtain a plurality of checking programs.
And the checking submodule can be used for respectively checking the report data to be checked according to the plurality of checking programs to obtain a plurality of initial checking results.
The operation submodule can be used for operating a plurality of initial checking results according to the incidence relation of a plurality of checking rule programs to obtain a target checking result,
wherein, the incidence relation of the plurality of checking rule programs comprises at least one of the following: and, or.
According to the data verification device of the embodiment of the disclosure, the report configuration information includes at least one verification expected value, and the verification module may include: and the operation result data determination submodule and the comparison submodule.
And the operation result data determining submodule is used for operating the verification program so as to verify the report data to be verified to obtain operation result data.
And the comparison submodule is used for comparing the operation result data with the verification expected value according to the verification program to obtain a target verification result, wherein the target verification result comprises a verification pass and a verification fail, when the operation result data is consistent with the verification expected value, the target verification result is a verification pass, and when the operation result data is inconsistent with the verification expected value, the target verification result is a verification fail.
According to the data verification apparatus of the embodiment of the present disclosure, the verification module may include: the cache determining submodule and the target verification result second determining submodule.
And the cache determining submodule is used for determining whether to cache the verification rule program according to cache marks, wherein the cache marks comprise a cacheable mark and a non-cacheable mark.
And the target verification result second determining submodule is used for responding to the cache mark as a cacheable mark, calling the cached verification rule program according to the verification main program to obtain the verification program, sequentially verifying each cell to be verified to obtain the target verification result of each cell to be verified, or calling the verification rule program in real time according to the verification main program to obtain the verification program according to the cache mark as a non-cacheable mark, sequentially verifying each cell to be verified to obtain the target verification result of each cell to be verified.
According to the data verification device of the embodiment of the disclosure, the report configuration information is separated from the verification rule configuration information, the verification rule program is separated from the verification main program, the report configuration information, the verification rule configuration information and the verification rule program all include associated identifiers, and the verification rule program determining module includes: and a check rule determining submodule.
The verification rule determining sub-module is used for determining a corresponding verification rule program of the report data to be verified according to the same associated identifier, wherein the associated identifier at least comprises one of the following identifiers: report identification, check rule identification and check rule program identification.
According to the data verification device of the embodiment of the present disclosure, the initial verification result includes pass verification and fail verification, and the data verification device may further include: the device comprises a recording module and a report prompt message generation module.
And the recording module is used for recording the initial verification result which is not verified and the target verification result which is not verified to obtain the prompt data.
And the report prompting information generating module can be used for generating report prompting information according to the prompting data.
According to the embodiment of the disclosure, any plurality of the to-be-verified report data determining module 410, the verification rule program determining module 420 and the verifying module 430 may be combined in one module to be implemented, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in one module. According to the embodiment of the present disclosure, at least one of the to-be-verified report data determining module 410, the verification rule program determining module 420, and the verifying module 430 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementation manners of software, hardware, and firmware, or implemented by a suitable combination of any several of them. Alternatively, at least one of the to-be-verified report data determining module 410, the verification rule program determining module 420 and the verifying module 430 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be executed.
FIG. 9 schematically illustrates a block diagram of an electronic device suitable for implementing a data verification method in accordance with an embodiment of the present disclosure.
As shown in fig. 9, an electronic device 500 according to an embodiment of the present disclosure includes a processor 50l that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. The processor 501 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 501 may also include on-board memory for caching purposes. Processor 501 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 502 and/or the RAM 503. Note that the programs may also be stored in one or more memories other than the ROM 502 and the RAM 503. The processor 501 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, electronic device 500 may also include an input/output (I/O) interface 505, input/output (I/O) interface 505 also being connected to bus 504. The electronic device 500 may also include one or more of the following components connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted on the storage section 508 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include ROM 502 and/or RAM 503 and/or one or more memories other than ROM 502 and RAM 503 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the data verification method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 501. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, and the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, downloaded and installed through the communication section 509, and/or installed from the removable medium 511. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program, when executed by the processor 501, performs the above-described functions defined in the system of the embodiments of the present disclosure. The above described systems, devices, apparatuses, modules, units, etc. may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It will be appreciated by a person skilled in the art that various combinations or/and combinations of features recited in the various embodiments of the disclosure and/or in the claims may be made, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (10)

1. A method of data verification, comprising:
according to the report configuration information, determining report data to be verified;
determining a verification rule program corresponding to the report data to be verified according to the incidence relation between the verification rule configuration information and the report configuration information; and
and responding to the verification rule program, calling the verification rule program according to the verification main program to obtain a verification program, and verifying the report data to be verified to obtain a target verification result.
2. The method according to claim 1, wherein the checking rule programs corresponding to the report data to be checked include a plurality of programs, and the checking the report data to be checked to obtain the target checking result includes:
calling each checking rule program respectively according to a checking main program to obtain a plurality of checking programs;
respectively verifying the report data to be verified according to the plurality of verification programs to obtain a plurality of initial verification results; and
calculating the plurality of initial checking results according to the incidence relation of the plurality of checking rule programs to obtain the target checking result,
wherein the association relationship of the plurality of check rule programs includes at least one of: and, or.
3. The method according to claim 1, wherein the report configuration information includes at least one expected verification value, and the verifying the report data to be verified to obtain a target verification result includes:
running the checking program to check the report data to be checked to obtain running result data;
and comparing the operation result data with the expected verification value according to the verification program to obtain a target verification result, wherein the target verification result comprises a pass verification result and a fail verification result, the target verification result is a pass verification result when the operation result data is consistent with the expected verification value, and the target verification result is a fail verification result when the operation result data is inconsistent with the expected verification value.
4. The method according to any one of claims 1 to 3, wherein the report data to be verified comprises at least one cell to be verified, and the verifying the report data to be verified to obtain a target verification result comprises:
determining whether to cache the verification rule program according to cache marks, wherein the cache marks comprise a cacheable mark and a non-cacheable mark; and
in response to the cache mark being the cacheable mark, calling the cached verification rule program according to a verification main program to obtain the verification program, sequentially verifying each cell to be verified to obtain the target verification result of each cell to be verified, or
And responding to the fact that the cache mark is the non-cache mark, calling the verification program obtained by the verification rule program in real time according to the verification main program, sequentially verifying each cell to be verified, and obtaining the target verification result of each cell to be verified.
5. The method according to any one of claims 1 to 3, wherein the report configuration information is separated from the checking rule configuration information, the checking rule program is separated from the checking main program, the report configuration information, the checking rule configuration information and the checking rule program each include an association identifier, and determining the checking rule program corresponding to the report data to be checked according to the association relationship between the checking rule configuration information and the report configuration information includes:
determining a corresponding checking rule program of the report data to be checked according to the same associated identifier, wherein the associated identifier at least comprises one of the following: report identification, check rule identification and check rule program identification.
6. The method of claim 2, wherein the initial verification result comprises a pass verification and a fail verification, and the data verification method further comprises:
recording the initial verification result which is not verified and the target verification result which is not verified to obtain prompt data; and
and generating report prompting information according to the prompting data.
7. A data verification apparatus, comprising:
the report data to be verified determining module is used for determining the report data to be verified according to the report configuration information;
the checking rule program determining module is used for determining a checking rule program corresponding to the report data to be checked according to the incidence relation between the checking rule configuration information and the report configuration information; and
and the checking module is used for responding to the determined checking rule program, calling the checking rule program according to a checking main program to obtain a checking program, checking the report data to be checked and obtaining a target checking result.
8. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-6.
9. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program which, when executed by a processor, carries out the method according to any one of claims 1 to 6.
CN202210644009.0A 2022-06-08 2022-06-08 Data verification method, apparatus, device, medium, and program product Pending CN114943100A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210644009.0A CN114943100A (en) 2022-06-08 2022-06-08 Data verification method, apparatus, device, medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210644009.0A CN114943100A (en) 2022-06-08 2022-06-08 Data verification method, apparatus, device, medium, and program product

Publications (1)

Publication Number Publication Date
CN114943100A true CN114943100A (en) 2022-08-26

Family

ID=82909650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210644009.0A Pending CN114943100A (en) 2022-06-08 2022-06-08 Data verification method, apparatus, device, medium, and program product

Country Status (1)

Country Link
CN (1) CN114943100A (en)

Similar Documents

Publication Publication Date Title
CN112463729A (en) Data file storage method and device, electronic equipment and medium
CN115357761A (en) Link tracking method and device, electronic equipment and storage medium
CN113535577B (en) Application testing method and device based on knowledge graph, electronic equipment and medium
CN114238993A (en) Risk detection method, apparatus, device and medium
CN115760013A (en) Operation and maintenance model construction method and device, electronic equipment and storage medium
CN111865726B (en) Service message testing method, device, computer system and storage medium
CN114780807A (en) Service detection method, device, computer system and readable storage medium
CN115033574A (en) Information generation method, information generation device, electronic device, and storage medium
CN114943100A (en) Data verification method, apparatus, device, medium, and program product
CN115080433A (en) Testing method and device based on flow playback
CN114218283A (en) Abnormality detection method, apparatus, device, and medium
CN115203178A (en) Data quality inspection method and device, electronic equipment and storage medium
CN114037523A (en) Letter service test method, device, equipment, medium and program product
CN113487224A (en) Content processing method, apparatus, device, medium, and program product
CN114817314A (en) Data processing method and device, electronic equipment and storage medium
CN112394962B (en) Service execution method, service logic updating method and device
CN113568838A (en) Test data generation method, device, equipment, storage medium and program product
CN114266547A (en) Method, device, equipment, medium and program product for identifying business processing strategy
CN117176576A (en) Network resource changing method, device, equipment and storage medium
CN111914065A (en) Short message content verification method, device, computer system and computer readable medium
CN115840730A (en) File verification method, device, equipment and storage medium
CN114461367A (en) Batch execution method, apparatus, electronic device, medium, and computer program product
CN114064484A (en) Interface testing method and device, electronic equipment and readable storage medium
CN113360417A (en) Test method, session modifier, electronic device, and medium
CN114862552A (en) Credit investigation data sending method, device, system, equipment and medium

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