Data verification method, device, electronic equipment and storage medium
By obtaining and filtering the verification rules and data of banking business data, and using the abstract logic in the preset verification rules for verification, the problem of code maintenance and reuse caused by hard coding is solved, and the configurable and configurable verification rules are realized. It can be reused, which improves the flexibility and efficiency of banking business data verification.
Patent Information
- Application Number
- CN202010101346.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-19
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-02-19
AI Technical Summary
In the existing technology, banking business data verification rules mostly rely on hard coding, which results in difficulty in code maintenance, insufficient reuse, and difficulty in adapting to changing needs in different business scenarios.
By obtaining the verification data to be inspected and the inspection rule configuration parameters, the target inspection rules and data are filtered out, and the general logic extracted from the abstraction in the preset inspection rules is used for inspection, making the inspection rules configurable and reusable. .
It realizes the flexible configuration and full reuse of verification rules, reduces the complexity of code maintenance, improves the flexibility and efficiency of data verification, and reduces the cost of repeated coding and testing.
Smart Images

Figure CN111339136B
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer application technology, and in particular to a data verification method, device, electronic device and storage medium. Background Art
[0002] At present, a large number of banking businesses are processed based on the front-end and back-end separation mode, that is, the front-end teller scans the voucher, and the back-end business processing center performs a series of operations such as voucher splitting and entry, business data verification, etc. In this process, several complete vouchers that have been scanned and uploaded in a business can be image-split according to the preset voucher template, thereby obtaining key field slices on the voucher such as the payee and payee account number, voucher number, etc.; then, the slice data on these key field slices can be entered by manual entry or optical character recognition, and due to the seriousness and particularity of banking business, these entered slice data need to be verified to check whether they meet business specifications.
[0003] Most of the existing data verification schemes are hard-coded for different branches, different business scenarios, different voucher combinations (a business may require multiple vouchers to be filled in at the same time), different vouchers, different elements, etc. to implement their own verification rules, and perform data verification on the entered slice data based on the verification rules. This will require writing a branch code for each specific verification rule. This implementation scheme that completely integrates the verification rules into the code brings great difficulties to subsequent maintenance. In addition, the scope of vouchers and the scope of voucher elements used in banking business are relatively limited, and the verification rules of a single element or between elements are usually similar. Therefore, it is difficult to fully reuse the code by using hard coding. Summary of the invention
[0004] The embodiments of the present invention provide a data verification method, device, electronic device and storage medium, which solve the problems of difficult code maintenance and insufficient code reuse caused by implementing verification rules based on hard coding.
[0005] In a first aspect, an embodiment of the present invention provides a data verification method, which may include:
[0006] Obtain the data to be checked and the configuration parameters of the checking rules for the data to be checked;
[0007] According to the verification rule configuration parameters, a target verification rule is selected from the preset verification rules, and the target verification data is selected from the data to be verified, wherein the preset verification rule includes the general verification logic that has been abstracted and extracted;
[0008] The target verification data is verified based on the target verification rules.
[0009] Optionally, the verification rule configuration parameters include business scenario parameters. According to the verification rule configuration parameters, the target verification rules are screened out from the preset verification rules, and the target verification data are screened out from the data to be verified, which may include:
[0010] Target verification rules are screened out from preset verification rules according to business scenario parameters, and target verification parameters are determined according to the target verification rules and business scenario parameters, so as to screen out target verification data corresponding to the target verification parameters from the data to be verified.
[0011] Optionally, if the data to be checked includes slice data of slices to be checked in the service to be checked, then filtering out target check data corresponding to the target check parameter from the data to be checked may include:
[0012] A target verification slice is selected from the slices to be verified according to the target verification parameters, and slice data of the target verification slice is used as target verification data.
[0013] Optionally, the target verification parameters may include a voucher number and a slice element number.
[0014] Optionally, the preset check rule is pre-generated according to a preset check script. On this basis, the above method may further include:
[0015] The preset check script is scanned, and if it is determined according to the scan result that the preset check script has been updated, the preset check rule is regenerated according to the updated preset check script.
[0016] Optionally, checking the target check data based on the target check rule may include:
[0017] The target description information corresponding to the target verification rule is obtained, and based on the target verification rule and the target description information, the verification result of the target verification data is obtained.
[0018] Optionally, based on the target verification rule and the target description information, the verification result of the target verification data is obtained, which may include:
[0019] The target verification rule, the target verification data and the target description information are combined into a triple, and the verification result of the target verification data is obtained according to the triple.
[0020] In a second aspect, an embodiment of the present invention further provides a data checking device, which may include:
[0021] An acquisition module is used to acquire the data to be checked and the configuration parameters of the checking rules of the data to be checked;
[0022] A screening module is used to screen out target check rules from preset check rules according to check rule configuration parameters, and screen out target check data from the data to be checked, wherein the preset check rules include general check logic that has been abstracted and extracted;
[0023] The verification module is used to verify the target verification data based on the target verification rules.
[0024] In a third aspect, an embodiment of the present invention further provides an electronic device, which may include:
[0025] one or more processors;
[0026] A memory for storing one or more programs;
[0027] When one or more programs are executed by one or more processors, the one or more processors implement the data checking method provided by any embodiment of the present invention.
[0028] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the data checking method provided by any embodiment of the present invention is implemented.
[0029] The technical solution of the embodiment of the present invention can filter out target verification rules from preset verification rules and filter out target verification data from the data to be verified based on the verification rule configuration parameters by obtaining the data to be verified and the verification rule configuration parameters, so as to verify the target verification data based on the target verification rules. The above technical solution solves the problem of difficult code maintenance and insufficient reuse caused by implementing verification rules based on hard coding, and achieves the effect of configurable and reusable verification rules. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 is a flow chart of a data checking method in Embodiment 1 of the present invention;
[0031] Figure 2 It is a structural block diagram of a preferred embodiment of a data checking method in Embodiment 1 of the present invention;
[0032] Figure 3 It is a flow chart of a preferred embodiment of a data checking method in Embodiment 1 of the present invention;
[0033] Figure 4 It is a structural block diagram of a data checking device in Embodiment 2 of the present invention;
[0034] Figure 5 It is a structural schematic diagram of an electronic device in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0035] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It is also necessary to explain that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0036] Before introducing the embodiments of the present invention, the application scenarios of the embodiments of the present invention are first exemplified: in a computer program, hard coding (Hard Code) usually means writing the relevant parameters of input and output directly in the source code in the form of constants, rather than making appropriate responses to the settings, resources, data or formats specified by the outside world during runtime. Therefore, implementing the checking rules under different conditions based on hard coding means that the checking logic of each conditional branch is completely written once, and full code reuse is not achieved. Moreover, even if code reuse is achieved through parameter passing, it is also achieved through code when calling the "reusable code", that is, it still has a hard coding process. This implementation scheme of completely hard-coding the verification logic in the computer program has the following disadvantages: 1) The later code is difficult to maintain: when the verification logic of a certain business scenario needs to be added or deleted, the code needs to be modified; 2) The verification logic is not intuitive enough: due to the diversity of banking products, the verification logic in different business scenarios is also different. Therefore, after a period of multiple version iterations, the business requirements personnel will forget what verification logic a specific product has, and it can only be sorted out by the developers reviewing the code again; 3) The existing verification logic cannot be fully reused: when a new business scenario requires data verification, it can only be rewritten and implemented by hard coding, which has a long development cycle and high testing costs.
[0037] It should be noted that one possible implementation of data verification also includes the use of a rule engine, which can separate business logic from application code and configure rules. However, rule engines are generally suitable for reasoning logic in the form of WHEN / THEN (i.e., when certain conditions are met, a certain action is performed), which also leads to its limited support capabilities in application scenarios such as data verification of banking business. In addition, the use of rule engines still requires manual implementation of the writing of a large number of rule scripts, which is just a transfer of the writing language used from the program development language (such as Java) to the domain-specific language used by the rule engine.
[0038] Embodiment 1
[0039] Figure 1This is a flow chart of a data verification method provided in the first embodiment of the present invention. This embodiment is applicable to the case where the data to be verified is verified based on configurable preset verification rules, and is particularly applicable to the case where the banking business data is verified based on configurable preset verification rules. The method can be executed by the data verification device provided in the embodiment of the present invention, and the device can be implemented by software and / or hardware, and the device can be integrated in various user terminals or servers.
[0040] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:
[0041] S110: Obtain the data to be checked and the configuration parameters of the checking rules of the data to be checked.
[0042] Among them, the data to be checked is obtained. Optionally, in a banking business scenario, the data to be checked can be slice data of the slice to be checked in the business to be checked, such as the payer account number, voucher number, credit card type code, etc. At the same time, the verification rule configuration parameters of the data to be checked can also be obtained. The verification rule configuration parameters can be manually input or automatically identified in the previous link of data verification, which is not specifically limited here. It should be noted that the verification rule configuration parameters can exist in many forms, for example, it can include at least one of the business scenario parameters, target verification rules, target verification parameters and target description information, which is not specifically limited here.
[0043] S120 , according to the verification rule configuration parameters, select target verification rules from preset verification rules, and select target verification data from the data to be verified, wherein the preset verification rules include general verification logic that has been abstracted and extracted.
[0044] Among them, the preset verification rules can be pre-generated according to the preset verification script, which can include the general verification logic that has been abstracted and extracted. At the same time, it can also include the unique data verification logic suitable for special business scenarios. Exemplarily, an abstracted and extracted general verification logic is shown in Table 1. Taking "compareString" as an example, it is used to compare whether the values of "parameter 1" and "parameter 2" are consistent. Another example is that the unique data verification logic can be in the form of a chained Handler. The setting mode of this chained Handler is similar to the responsibility chain mode, and in order to facilitate the intuitiveness and maintainability of the subsequent logic, each Handler can only support the minimum unit of verification logic.
[0045] On this basis, optionally, the preset check script can be scanned in real time, and when it is determined based on the scan results that the preset check script has been updated, the preset check rules are regenerated based on the updated preset check script, which can realize dynamic updating of the preset check rules.
[0046] Table 1 Examples of general check logic
[0047]
[0048] Optionally, if the verification rule configuration parameters include business scenario parameters, for example, the business scenario parameters may include branches, business scenarios and voucher combinations, then the target verification rules can be screened out from the preset verification rules according to the business scenario parameters, and the target verification rules are preset verification rules that match the above business scenario parameters. Moreover, the target verification parameters can also be determined according to the target verification rules and business scenario parameters, thereby filtering out the target verification data corresponding to the target verification parameters from the data to be verified, and the target verification data can be considered as the specific value of the target verification parameter. On this basis, optionally, if the data to be verified includes the slice data of the slice to be verified in the business to be verified, the target verification slice can be filtered out from the slice to be verified according to the target verification parameters, and the target verification parameters can be the voucher number and the slice element number, that is, a target verification slice can be uniquely determined according to the target verification parameters, and then the slice data of the target verification slice can be used as the target verification data.
[0049] S130: Verify the target verification data based on the target verification rules.
[0050] Among them, the target verification data is verified based on the target verification rule to obtain the verification result of the target verification data, and the verification result can be a verification pass or a verification failure. On this basis, optionally, the target description information corresponding to the target verification rule can be obtained, and the verification result of the target verification data can be obtained based on the target verification rule and the target description information, such as the target verification rule, the target verification data and the target description information can be formed into a triple, and the verification result of the target verification data can be obtained according to the triple.
[0051] It should be noted that the embodiment of the present invention provides a general framework for data verification, which can be presented through verification rule configuration parameters. According to the verification rule configuration parameters, the target verification rules and target verification data corresponding to each business scenario can be determined. In other words, the embodiment of the present invention does not need to write corresponding verification logic code in each business scenario, and it is a rule-configurable data verification method. Specifically, the embodiment of the present invention abstractly extracts the general verification logic to generate preset verification rules, which can realize the unified management of preset verification rules and ensure the maximum reuse of codes; moreover, compared with the prior art, in which one business verification logic corresponds to one data verification rule, the embodiment of the present invention is a general verification logic that can correspond to multiple business verification logics, thereby realizing the decoupling of data verification rules and business verification logic, which can realize the configurability and maintainability of preset verification rules and data to be verified. For example, in a certain business scenario, if the preset verification rules change, the existing preset verification rules can be directly added or deleted without rewriting a set of codes. In summary, the embodiment of the present invention reduces the complexity of code logic maintenance by abstracting the general business verification logic to form preset verification rules, allowing business demand personnel to participate in later maintenance; at the same time, it realizes the full reuse of preset verification rules, avoids repeated coding, can quickly and flexibly expand data verification capabilities, and saves a lot of time for code quality assurance and application regression testing.
[0052] The technical solution of the embodiment of the present invention can filter out target verification rules from preset verification rules and filter out target verification data from the data to be verified based on the verification rule configuration parameters by obtaining the data to be verified and the verification rule configuration parameters, so as to verify the target verification data based on the target verification rules. The above technical solution solves the problem of difficult code maintenance and insufficient reuse caused by implementing verification rules based on hard coding, and achieves the effect of configurable and reusable verification rules.
[0053] In order to better understand the specific implementation process of the above steps, the data verification method of this embodiment is exemplarily described below with reference to specific examples. For example, in the data verification link of a banking business scenario, various situations may be involved. For example, in an intra-bank transfer business scenario, business requirements require a consistency comparison of the payment account number on the deposit slip and the check, and also a consistency comparison of the payee name on the deposit slip and the check. In addition, in a foreign exchange business scenario, it is also necessary to perform a consistency check on the real-time communication voucher and the other party's bank number on the deposit slip; and so on. At this point, based on the following, Figure 2 The data verification device shown implements data verification in banking business scenarios.
[0054] Specifically, Figure 2 and Figure 3 As shown, 1) the verification data loading module can first load the entered slice data of all slices of a business to form a "data set space", where each slice can be uniquely identified by "voucher number_slice element number", for example, the payment account of a check can be uniquely identified by "$0301_000401", where 0301 represents the voucher number defined for the check, and 000401 is the slice number defined for the payment account. Therefore, at runtime, the value of the corresponding field of a business can be obtained by this number, and the value is the slice data. This process is equivalent to obtaining the data to be verified as described in the embodiment of the present invention. 2) The verification rule loading module can load the preset verification rules defined in the source code when the data verification device is started to form a "rule set space". At the same time, a thread can be started in the background to scan the preset verification rules. When it is found that the preset verification script in the preset verification rules has changed, the background thread can reload the class to load the preset verification rules, thereby realizing the dynamic update of the preset verification rules. 3) The check rule matching module can read the check rule configuration parameters according to the slice data (i.e., the data to be checked), and parse them one by one, and obtain the corresponding target check rule R from the "rule set space" according to the parsing results, and obtain the corresponding target check parameter from the "data set space", so as to filter out the specific value V (i.e., the target check data) corresponding to the target check parameter from the data to be checked. At this time, R and V and the check failure / pass description information D (i.e., the target description information) can be combined to form a triple<R,V,D> , and convert this triple<R,V,D> Put it into the "check rule activity queue". 4) The check rule execution module can obtain the generated triples from the check rule activity queue through the check rule execution thread pool<R,V,D> , and execute the corresponding verification rules through the reflection mechanism provided by the corresponding programming language. When all the verification rules required for a business are executed, the verification rule execution module can output the final verification result.
[0055] On this basis, illustratively, an example of a verification rule configuration parameter can be shown in Table 2, wherein the "business scenario parameter" can be the business information contained in this business, which can be used to filter out the target verification rules configured for this business scenario; the "target verification rule" is a verification rule in the preset verification rules; the "target verification parameter" is the slice number that this business needs to meet this target verification rule. Its corresponding specific value can be obtained from the "data set space" in the running state, and the number of parameters must be consistent with the number of input parameters of the corresponding target verification rule.
[0056] Table 2 Examples of configuration parameters for check rules
[0057]
[0058] Embodiment 2
[0059] Figure 4 This is a structural block diagram of a data checking device provided in Embodiment 2 of the present invention. The device is used to execute the data checking method provided in any of the above embodiments. The device and the data checking method in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the data checking device, please refer to the embodiment of the above data checking method. Figure 4 The device may specifically include: an acquisition module 210, a screening module 220 and a checking module 230. Among them,
[0060] An acquisition module 210 is used to acquire the data to be checked and the configuration parameters of the checking rules of the data to be checked;
[0061] The screening module 220 is used to screen out target check rules from preset check rules according to the check rule configuration parameters, and screen out target check data from the data to be checked, wherein the preset check rules include the general check logic that has been abstracted and extracted;
[0062] The verification module 230 is used to verify the target verification data based on the target verification rules.
[0063] Optionally, the screening module 220 may specifically include:
[0064] The target verification data screening unit is used to configure verification rule parameters including business scenario parameters, screen out target verification rules from preset verification rules according to the business scenario parameters, and determine the target verification parameters according to the target verification rules and business scenario parameters, so as to screen out target verification data corresponding to the target verification parameters from the data to be verified.
[0065] Optionally, the target verification data screening unit may specifically include:
[0066] The target verification data screening subunit is used to screen out target verification slices from the slices to be checked according to the target verification parameters if the data to be checked includes slice data of the slices to be checked in the service to be checked, and use the slice data of the target verification slices as the target verification data.
[0067] Optionally, the target verification parameters include a voucher number and a slice element number.
[0068] Optionally, based on the above device, the device may further include:
[0069] The update module is used for pre-generating the preset check rules based on the preset check script, scanning the preset check script, and if it is determined according to the scanning result that the preset check script has been updated, regenerating the preset check rules based on the updated preset check script.
[0070] Optionally, the checking module 230 may specifically include:
[0071] The verification unit is used to obtain the target description information corresponding to the target verification rule, and obtain the verification result of the target verification data based on the target verification rule and the target description information.
[0072] Optional, verification unit, specifically can be used for:
[0073] The target verification rule, the target verification data and the target description information are combined into a triple, and the verification result of the target verification data is obtained according to the triple.
[0074] The data verification device provided in the second embodiment of the present invention can obtain the data to be verified and the verification rule configuration parameters of the data to be verified through the acquisition module; the screening module can filter out the target verification rules from the preset verification rules according to the verification rule configuration parameters, and filter out the target verification data from the data to be verified; thus, the verification module can verify the target verification data based on the target verification rules. The above device solves the problem of difficult code maintenance and insufficient reuse caused by implementing verification rules based on hard coding, and achieves the effect of configurable and reusable verification rules.
[0075] The data checking device provided in the embodiment of the present invention can execute the data checking method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0076] It is worth noting that in the embodiment of the above-mentioned data verification device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0077] Embodiment 3
[0078] Figure 5 A schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention, the electronic device may be a terminal and / or a server, such as Figure 5 As shown, the electronic device includes a memory 310, a processor 320, an input device 330, and an output device 340. The number of processors 320 in the electronic device can be one or more. Figure 5A processor 320 is taken as an example; the memory 310, the processor 320, the input device 330 and the output device 340 in the electronic device can be connected via a bus or other means. Figure 5 The connection via bus 350 is taken as an example.
[0079] The memory 310, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the data verification method in the embodiment of the present invention (for example, the acquisition module 210, the screening module 220 and the verification module 230 in the data verification device). The processor 320 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 310, that is, implements the above-mentioned data verification method.
[0080] The memory 310 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 310 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 310 may further include a memory remotely arranged relative to the processor 320, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0081] The input device 330 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 340 may include a display device such as a display screen.
[0082] Embodiment 4
[0083] Embodiment 4 of the present invention provides a storage medium including computer executable instructions, wherein the computer executable instructions are used to perform a data checking method when executed by a computer processor, the method comprising:
[0084] Obtain the data to be checked and the configuration parameters of the checking rules for the data to be checked;
[0085] According to the verification rule configuration parameters, a target verification rule is selected from the preset verification rules, and the target verification data is selected from the data to be verified, wherein the preset verification rule includes the general verification logic that has been abstracted and extracted;
[0086] The target verification data is verified based on the target verification rules.
[0087] Of course, the computer executable instructions of a storage medium including computer executable instructions provided by an embodiment of the present invention are not limited to the operations of the method described above, but can also execute related operations in the data checking method provided by any embodiment of the present invention.
[0088] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0089] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A data checking method, characterized in that: include: Acquire the data to be checked and the configuration parameters of the checking rules of the data to be checked; According to the verification rule configuration parameters, a target verification rule is selected from the preset verification rules, and the target verification data is selected from the data to be verified, wherein the preset verification rule includes the abstracted and extracted general verification logic, and also includes the unique data verification logic suitable for special business scenarios, and the unique data verification logic is in the form of a chained Handler; Among them, one general check logic corresponds to one or more business check logics; Verifying the target verification data based on the target verification rule; The verification rule configuration parameters include business scenario parameters, and the target verification rules are screened out from the preset verification rules according to the verification rule configuration parameters, and the target verification data are screened out from the data to be verified, including: Filtering out target verification rules from preset verification rules according to the business scenario parameters, and determining target verification parameters according to the target verification rules and the business scenario parameters, so as to filter out target verification data corresponding to the target verification parameters from the data to be verified; The target verification parameters include a voucher number and a slice element number; The preset check rule is pre-generated according to a preset check script, and the method further includes: Scanning the preset check script, if it is determined according to the scanning result that the preset check script has been updated, class loading is performed according to the updated preset check script to regenerate the preset check rule; The checking the target check data based on the target check rule includes: Acquire target description information corresponding to the target verification rule, and obtain a verification result of the target verification data based on the target verification rule and the target description information; The obtaining the verification result of the target verification data based on the target verification rule and the target description information includes: The target verification rule, the target verification data and the target description information are combined into a triple, and a verification result of the target verification data is obtained according to the triple.
2. The method according to claim 1, characterized in that If the data to be checked includes slice data of slices to be checked in the service to be checked, then the step of filtering out target check data corresponding to the target check parameter from the data to be checked includes: A target verification slice is selected from the slices to be verified according to the target verification parameter, and slice data of the target verification slice is used as target verification data.
3. A data checking device, characterized in that: include: An acquisition module, used to acquire the data to be checked and configuration parameters of the checking rules of the data to be checked; A screening module, used to screen out target check rules from preset check rules according to the check rule configuration parameters, and screen out target check data from the data to be checked, wherein the preset check rules include general check logic that has been abstracted and extracted, and also include unique data check logic suitable for special business scenarios, and the unique data check logic is in the form of a chained Handler; Among them, one general check logic corresponds to one or more business check logics; A verification module, configured to verify the target verification data based on the target verification rule; The screening module specifically includes: A target verification data screening unit, which is used for the verification rule configuration parameters including business scenario parameters, screening out target verification rules from preset verification rules according to the business scenario parameters, and determining the target verification parameters according to the target verification rules and the business scenario parameters, so as to screen out target verification data corresponding to the target verification parameters from the data to be verified; The target verification parameters include a voucher number and a slice element number; The data checking device further comprises: An update module, for pre-generating the preset check rules according to the preset check script, scanning the preset check script, and if it is determined according to the scanning result that the preset check script has been updated, class loading is performed according to the updated preset check script to regenerate the preset check rules; The verification module specifically includes: A verification unit, used to obtain target description information corresponding to the target verification rule, and obtain a verification result of the target verification data based on the target verification rule and the target description information; The checking unit is specifically used for: The target verification rule, the target verification data and the target description information are combined into a triple, and the verification result of the target verification data is obtained according to the triple.
4. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the data checking method as described in any one of claims 1-2.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data checking method according to any one of claims 1 to 2 is implemented.
